UNPKG

329 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
3 typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BootstrapTable = factory(global.jQuery));
5})(this, (function ($$o) { 'use strict';
6
7 function _iterableToArrayLimit(arr, i) {
8 var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
9 if (null != _i) {
10 var _s,
11 _e,
12 _x,
13 _r,
14 _arr = [],
15 _n = !0,
16 _d = !1;
17 try {
18 if (_x = (_i = _i.call(arr)).next, 0 === i) {
19 if (Object(_i) !== _i) return;
20 _n = !1;
21 } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
22 } catch (err) {
23 _d = !0, _e = err;
24 } finally {
25 try {
26 if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
27 } finally {
28 if (_d) throw _e;
29 }
30 }
31 return _arr;
32 }
33 }
34 function _typeof(obj) {
35 "@babel/helpers - typeof";
36
37 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
38 return typeof obj;
39 } : function (obj) {
40 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
41 }, _typeof(obj);
42 }
43 function _classCallCheck(instance, Constructor) {
44 if (!(instance instanceof Constructor)) {
45 throw new TypeError("Cannot call a class as a function");
46 }
47 }
48 function _defineProperties(target, props) {
49 for (var i = 0; i < props.length; i++) {
50 var descriptor = props[i];
51 descriptor.enumerable = descriptor.enumerable || false;
52 descriptor.configurable = true;
53 if ("value" in descriptor) descriptor.writable = true;
54 Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
55 }
56 }
57 function _createClass(Constructor, protoProps, staticProps) {
58 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
59 if (staticProps) _defineProperties(Constructor, staticProps);
60 Object.defineProperty(Constructor, "prototype", {
61 writable: false
62 });
63 return Constructor;
64 }
65 function _slicedToArray(arr, i) {
66 return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
67 }
68 function _toConsumableArray(arr) {
69 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
70 }
71 function _arrayWithoutHoles(arr) {
72 if (Array.isArray(arr)) return _arrayLikeToArray(arr);
73 }
74 function _arrayWithHoles(arr) {
75 if (Array.isArray(arr)) return arr;
76 }
77 function _iterableToArray(iter) {
78 if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
79 }
80 function _unsupportedIterableToArray(o, minLen) {
81 if (!o) return;
82 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
83 var n = Object.prototype.toString.call(o).slice(8, -1);
84 if (n === "Object" && o.constructor) n = o.constructor.name;
85 if (n === "Map" || n === "Set") return Array.from(o);
86 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
87 }
88 function _arrayLikeToArray(arr, len) {
89 if (len == null || len > arr.length) len = arr.length;
90 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
91 return arr2;
92 }
93 function _nonIterableSpread() {
94 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
95 }
96 function _nonIterableRest() {
97 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
98 }
99 function _createForOfIteratorHelper(o, allowArrayLike) {
100 var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
101 if (!it) {
102 if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
103 if (it) o = it;
104 var i = 0;
105 var F = function () {};
106 return {
107 s: F,
108 n: function () {
109 if (i >= o.length) return {
110 done: true
111 };
112 return {
113 done: false,
114 value: o[i++]
115 };
116 },
117 e: function (e) {
118 throw e;
119 },
120 f: F
121 };
122 }
123 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124 }
125 var normalCompletion = true,
126 didErr = false,
127 err;
128 return {
129 s: function () {
130 it = it.call(o);
131 },
132 n: function () {
133 var step = it.next();
134 normalCompletion = step.done;
135 return step;
136 },
137 e: function (e) {
138 didErr = true;
139 err = e;
140 },
141 f: function () {
142 try {
143 if (!normalCompletion && it.return != null) it.return();
144 } finally {
145 if (didErr) throw err;
146 }
147 }
148 };
149 }
150 function _toPrimitive(input, hint) {
151 if (typeof input !== "object" || input === null) return input;
152 var prim = input[Symbol.toPrimitive];
153 if (prim !== undefined) {
154 var res = prim.call(input, hint || "default");
155 if (typeof res !== "object") return res;
156 throw new TypeError("@@toPrimitive must return a primitive value.");
157 }
158 return (hint === "string" ? String : Number)(input);
159 }
160 function _toPropertyKey(arg) {
161 var key = _toPrimitive(arg, "string");
162 return typeof key === "symbol" ? key : String(key);
163 }
164
165 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
166
167 var check = function (it) {
168 return it && it.Math == Math && it;
169 };
170
171 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
172 var global$k =
173 // eslint-disable-next-line es/no-global-this -- safe
174 check(typeof globalThis == 'object' && globalThis) ||
175 check(typeof window == 'object' && window) ||
176 // eslint-disable-next-line no-restricted-globals -- safe
177 check(typeof self == 'object' && self) ||
178 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
179 // eslint-disable-next-line no-new-func -- fallback
180 (function () { return this; })() || Function('return this')();
181
182 var objectGetOwnPropertyDescriptor = {};
183
184 var fails$u = function (exec) {
185 try {
186 return !!exec();
187 } catch (error) {
188 return true;
189 }
190 };
191
192 var fails$t = fails$u;
193
194 // Detect IE8's incomplete defineProperty implementation
195 var descriptors = !fails$t(function () {
196 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
197 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
198 });
199
200 var fails$s = fails$u;
201
202 var functionBindNative = !fails$s(function () {
203 // eslint-disable-next-line es/no-function-prototype-bind -- safe
204 var test = (function () { /* empty */ }).bind();
205 // eslint-disable-next-line no-prototype-builtins -- safe
206 return typeof test != 'function' || test.hasOwnProperty('prototype');
207 });
208
209 var NATIVE_BIND$3 = functionBindNative;
210
211 var call$e = Function.prototype.call;
212
213 var functionCall = NATIVE_BIND$3 ? call$e.bind(call$e) : function () {
214 return call$e.apply(call$e, arguments);
215 };
216
217 var objectPropertyIsEnumerable = {};
218
219 var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
220 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
221 var getOwnPropertyDescriptor$5 = Object.getOwnPropertyDescriptor;
222
223 // Nashorn ~ JDK8 bug
224 var NASHORN_BUG = getOwnPropertyDescriptor$5 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
225
226 // `Object.prototype.propertyIsEnumerable` method implementation
227 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
228 objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
229 var descriptor = getOwnPropertyDescriptor$5(this, V);
230 return !!descriptor && descriptor.enumerable;
231 } : $propertyIsEnumerable$1;
232
233 var createPropertyDescriptor$4 = function (bitmap, value) {
234 return {
235 enumerable: !(bitmap & 1),
236 configurable: !(bitmap & 2),
237 writable: !(bitmap & 4),
238 value: value
239 };
240 };
241
242 var NATIVE_BIND$2 = functionBindNative;
243
244 var FunctionPrototype$2 = Function.prototype;
245 var call$d = FunctionPrototype$2.call;
246 var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$d, call$d);
247
248 var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
249 return function () {
250 return call$d.apply(fn, arguments);
251 };
252 };
253
254 var uncurryThis$z = functionUncurryThis;
255
256 var toString$h = uncurryThis$z({}.toString);
257 var stringSlice$9 = uncurryThis$z(''.slice);
258
259 var classofRaw$2 = function (it) {
260 return stringSlice$9(toString$h(it), 8, -1);
261 };
262
263 var uncurryThis$y = functionUncurryThis;
264 var fails$r = fails$u;
265 var classof$7 = classofRaw$2;
266
267 var $Object$4 = Object;
268 var split = uncurryThis$y(''.split);
269
270 // fallback for non-array-like ES3 and non-enumerable old V8 strings
271 var indexedObject = fails$r(function () {
272 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
273 // eslint-disable-next-line no-prototype-builtins -- safe
274 return !$Object$4('z').propertyIsEnumerable(0);
275 }) ? function (it) {
276 return classof$7(it) == 'String' ? split(it, '') : $Object$4(it);
277 } : $Object$4;
278
279 // we can't use just `it == null` since of `document.all` special case
280 // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
281 var isNullOrUndefined$7 = function (it) {
282 return it === null || it === undefined;
283 };
284
285 var isNullOrUndefined$6 = isNullOrUndefined$7;
286
287 var $TypeError$c = TypeError;
288
289 // `RequireObjectCoercible` abstract operation
290 // https://tc39.es/ecma262/#sec-requireobjectcoercible
291 var requireObjectCoercible$b = function (it) {
292 if (isNullOrUndefined$6(it)) throw $TypeError$c("Can't call method on " + it);
293 return it;
294 };
295
296 // toObject with fallback for non-array-like ES3 strings
297 var IndexedObject$3 = indexedObject;
298 var requireObjectCoercible$a = requireObjectCoercible$b;
299
300 var toIndexedObject$8 = function (it) {
301 return IndexedObject$3(requireObjectCoercible$a(it));
302 };
303
304 var documentAll$2 = typeof document == 'object' && document.all;
305
306 // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
307 // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
308 var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
309
310 var documentAll_1 = {
311 all: documentAll$2,
312 IS_HTMLDDA: IS_HTMLDDA
313 };
314
315 var $documentAll$1 = documentAll_1;
316
317 var documentAll$1 = $documentAll$1.all;
318
319 // `IsCallable` abstract operation
320 // https://tc39.es/ecma262/#sec-iscallable
321 var isCallable$j = $documentAll$1.IS_HTMLDDA ? function (argument) {
322 return typeof argument == 'function' || argument === documentAll$1;
323 } : function (argument) {
324 return typeof argument == 'function';
325 };
326
327 var isCallable$i = isCallable$j;
328 var $documentAll = documentAll_1;
329
330 var documentAll = $documentAll.all;
331
332 var isObject$b = $documentAll.IS_HTMLDDA ? function (it) {
333 return typeof it == 'object' ? it !== null : isCallable$i(it) || it === documentAll;
334 } : function (it) {
335 return typeof it == 'object' ? it !== null : isCallable$i(it);
336 };
337
338 var global$j = global$k;
339 var isCallable$h = isCallable$j;
340
341 var aFunction = function (argument) {
342 return isCallable$h(argument) ? argument : undefined;
343 };
344
345 var getBuiltIn$5 = function (namespace, method) {
346 return arguments.length < 2 ? aFunction(global$j[namespace]) : global$j[namespace] && global$j[namespace][method];
347 };
348
349 var uncurryThis$x = functionUncurryThis;
350
351 var objectIsPrototypeOf = uncurryThis$x({}.isPrototypeOf);
352
353 var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
354
355 var global$i = global$k;
356 var userAgent$2 = engineUserAgent;
357
358 var process = global$i.process;
359 var Deno = global$i.Deno;
360 var versions = process && process.versions || Deno && Deno.version;
361 var v8 = versions && versions.v8;
362 var match, version;
363
364 if (v8) {
365 match = v8.split('.');
366 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
367 // but their correct versions are not interesting for us
368 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
369 }
370
371 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
372 // so check `userAgent` even if `.v8` exists, but 0
373 if (!version && userAgent$2) {
374 match = userAgent$2.match(/Edge\/(\d+)/);
375 if (!match || match[1] >= 74) {
376 match = userAgent$2.match(/Chrome\/(\d+)/);
377 if (match) version = +match[1];
378 }
379 }
380
381 var engineV8Version = version;
382
383 /* eslint-disable es/no-symbol -- required for testing */
384
385 var V8_VERSION$2 = engineV8Version;
386 var fails$q = fails$u;
387
388 // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
389 var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$q(function () {
390 var symbol = Symbol();
391 // Chrome 38 Symbol has incorrect toString conversion
392 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
393 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
394 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
395 !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
396 });
397
398 /* eslint-disable es/no-symbol -- required for testing */
399
400 var NATIVE_SYMBOL$1 = symbolConstructorDetection;
401
402 var useSymbolAsUid = NATIVE_SYMBOL$1
403 && !Symbol.sham
404 && typeof Symbol.iterator == 'symbol';
405
406 var getBuiltIn$4 = getBuiltIn$5;
407 var isCallable$g = isCallable$j;
408 var isPrototypeOf$3 = objectIsPrototypeOf;
409 var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
410
411 var $Object$3 = Object;
412
413 var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
414 return typeof it == 'symbol';
415 } : function (it) {
416 var $Symbol = getBuiltIn$4('Symbol');
417 return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
418 };
419
420 var $String$4 = String;
421
422 var tryToString$3 = function (argument) {
423 try {
424 return $String$4(argument);
425 } catch (error) {
426 return 'Object';
427 }
428 };
429
430 var isCallable$f = isCallable$j;
431 var tryToString$2 = tryToString$3;
432
433 var $TypeError$b = TypeError;
434
435 // `Assert: IsCallable(argument) is true`
436 var aCallable$4 = function (argument) {
437 if (isCallable$f(argument)) return argument;
438 throw $TypeError$b(tryToString$2(argument) + ' is not a function');
439 };
440
441 var aCallable$3 = aCallable$4;
442 var isNullOrUndefined$5 = isNullOrUndefined$7;
443
444 // `GetMethod` abstract operation
445 // https://tc39.es/ecma262/#sec-getmethod
446 var getMethod$5 = function (V, P) {
447 var func = V[P];
448 return isNullOrUndefined$5(func) ? undefined : aCallable$3(func);
449 };
450
451 var call$c = functionCall;
452 var isCallable$e = isCallable$j;
453 var isObject$a = isObject$b;
454
455 var $TypeError$a = TypeError;
456
457 // `OrdinaryToPrimitive` abstract operation
458 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
459 var ordinaryToPrimitive$1 = function (input, pref) {
460 var fn, val;
461 if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$a(val = call$c(fn, input))) return val;
462 if (isCallable$e(fn = input.valueOf) && !isObject$a(val = call$c(fn, input))) return val;
463 if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$a(val = call$c(fn, input))) return val;
464 throw $TypeError$a("Can't convert object to primitive value");
465 };
466
467 var sharedExports = {};
468 var shared$4 = {
469 get exports(){ return sharedExports; },
470 set exports(v){ sharedExports = v; },
471 };
472
473 var isPure = false;
474
475 var global$h = global$k;
476
477 // eslint-disable-next-line es/no-object-defineproperty -- safe
478 var defineProperty$8 = Object.defineProperty;
479
480 var defineGlobalProperty$3 = function (key, value) {
481 try {
482 defineProperty$8(global$h, key, { value: value, configurable: true, writable: true });
483 } catch (error) {
484 global$h[key] = value;
485 } return value;
486 };
487
488 var global$g = global$k;
489 var defineGlobalProperty$2 = defineGlobalProperty$3;
490
491 var SHARED = '__core-js_shared__';
492 var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
493
494 var sharedStore = store$3;
495
496 var store$2 = sharedStore;
497
498 (shared$4.exports = function (key, value) {
499 return store$2[key] || (store$2[key] = value !== undefined ? value : {});
500 })('versions', []).push({
501 version: '3.29.0',
502 mode: 'global',
503 copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
504 license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
505 source: 'https://github.com/zloirock/core-js'
506 });
507
508 var requireObjectCoercible$9 = requireObjectCoercible$b;
509
510 var $Object$2 = Object;
511
512 // `ToObject` abstract operation
513 // https://tc39.es/ecma262/#sec-toobject
514 var toObject$9 = function (argument) {
515 return $Object$2(requireObjectCoercible$9(argument));
516 };
517
518 var uncurryThis$w = functionUncurryThis;
519 var toObject$8 = toObject$9;
520
521 var hasOwnProperty = uncurryThis$w({}.hasOwnProperty);
522
523 // `HasOwnProperty` abstract operation
524 // https://tc39.es/ecma262/#sec-hasownproperty
525 // eslint-disable-next-line es/no-object-hasown -- safe
526 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
527 return hasOwnProperty(toObject$8(it), key);
528 };
529
530 var uncurryThis$v = functionUncurryThis;
531
532 var id = 0;
533 var postfix = Math.random();
534 var toString$g = uncurryThis$v(1.0.toString);
535
536 var uid$2 = function (key) {
537 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$g(++id + postfix, 36);
538 };
539
540 var global$f = global$k;
541 var shared$3 = sharedExports;
542 var hasOwn$b = hasOwnProperty_1;
543 var uid$1 = uid$2;
544 var NATIVE_SYMBOL = symbolConstructorDetection;
545 var USE_SYMBOL_AS_UID = useSymbolAsUid;
546
547 var Symbol$3 = global$f.Symbol;
548 var WellKnownSymbolsStore = shared$3('wks');
549 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$3['for'] || Symbol$3 : Symbol$3 && Symbol$3.withoutSetter || uid$1;
550
551 var wellKnownSymbol$j = function (name) {
552 if (!hasOwn$b(WellKnownSymbolsStore, name)) {
553 WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$b(Symbol$3, name)
554 ? Symbol$3[name]
555 : createWellKnownSymbol('Symbol.' + name);
556 } return WellKnownSymbolsStore[name];
557 };
558
559 var call$b = functionCall;
560 var isObject$9 = isObject$b;
561 var isSymbol$2 = isSymbol$3;
562 var getMethod$4 = getMethod$5;
563 var ordinaryToPrimitive = ordinaryToPrimitive$1;
564 var wellKnownSymbol$i = wellKnownSymbol$j;
565
566 var $TypeError$9 = TypeError;
567 var TO_PRIMITIVE = wellKnownSymbol$i('toPrimitive');
568
569 // `ToPrimitive` abstract operation
570 // https://tc39.es/ecma262/#sec-toprimitive
571 var toPrimitive$2 = function (input, pref) {
572 if (!isObject$9(input) || isSymbol$2(input)) return input;
573 var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
574 var result;
575 if (exoticToPrim) {
576 if (pref === undefined) pref = 'default';
577 result = call$b(exoticToPrim, input, pref);
578 if (!isObject$9(result) || isSymbol$2(result)) return result;
579 throw $TypeError$9("Can't convert object to primitive value");
580 }
581 if (pref === undefined) pref = 'number';
582 return ordinaryToPrimitive(input, pref);
583 };
584
585 var toPrimitive$1 = toPrimitive$2;
586 var isSymbol$1 = isSymbol$3;
587
588 // `ToPropertyKey` abstract operation
589 // https://tc39.es/ecma262/#sec-topropertykey
590 var toPropertyKey$3 = function (argument) {
591 var key = toPrimitive$1(argument, 'string');
592 return isSymbol$1(key) ? key : key + '';
593 };
594
595 var global$e = global$k;
596 var isObject$8 = isObject$b;
597
598 var document$1 = global$e.document;
599 // typeof document.createElement is 'object' in old IE
600 var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
601
602 var documentCreateElement$2 = function (it) {
603 return EXISTS$1 ? document$1.createElement(it) : {};
604 };
605
606 var DESCRIPTORS$e = descriptors;
607 var fails$p = fails$u;
608 var createElement = documentCreateElement$2;
609
610 // Thanks to IE8 for its funny defineProperty
611 var ie8DomDefine = !DESCRIPTORS$e && !fails$p(function () {
612 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
613 return Object.defineProperty(createElement('div'), 'a', {
614 get: function () { return 7; }
615 }).a != 7;
616 });
617
618 var DESCRIPTORS$d = descriptors;
619 var call$a = functionCall;
620 var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
621 var createPropertyDescriptor$3 = createPropertyDescriptor$4;
622 var toIndexedObject$7 = toIndexedObject$8;
623 var toPropertyKey$2 = toPropertyKey$3;
624 var hasOwn$a = hasOwnProperty_1;
625 var IE8_DOM_DEFINE$1 = ie8DomDefine;
626
627 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
628 var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
629
630 // `Object.getOwnPropertyDescriptor` method
631 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
632 objectGetOwnPropertyDescriptor.f = DESCRIPTORS$d ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
633 O = toIndexedObject$7(O);
634 P = toPropertyKey$2(P);
635 if (IE8_DOM_DEFINE$1) try {
636 return $getOwnPropertyDescriptor$1(O, P);
637 } catch (error) { /* empty */ }
638 if (hasOwn$a(O, P)) return createPropertyDescriptor$3(!call$a(propertyIsEnumerableModule$1.f, O, P), O[P]);
639 };
640
641 var objectDefineProperty = {};
642
643 var DESCRIPTORS$c = descriptors;
644 var fails$o = fails$u;
645
646 // V8 ~ Chrome 36-
647 // https://bugs.chromium.org/p/v8/issues/detail?id=3334
648 var v8PrototypeDefineBug = DESCRIPTORS$c && fails$o(function () {
649 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
650 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
651 value: 42,
652 writable: false
653 }).prototype != 42;
654 });
655
656 var isObject$7 = isObject$b;
657
658 var $String$3 = String;
659 var $TypeError$8 = TypeError;
660
661 // `Assert: Type(argument) is Object`
662 var anObject$d = function (argument) {
663 if (isObject$7(argument)) return argument;
664 throw $TypeError$8($String$3(argument) + ' is not an object');
665 };
666
667 var DESCRIPTORS$b = descriptors;
668 var IE8_DOM_DEFINE = ie8DomDefine;
669 var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
670 var anObject$c = anObject$d;
671 var toPropertyKey$1 = toPropertyKey$3;
672
673 var $TypeError$7 = TypeError;
674 // eslint-disable-next-line es/no-object-defineproperty -- safe
675 var $defineProperty = Object.defineProperty;
676 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
677 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
678 var ENUMERABLE = 'enumerable';
679 var CONFIGURABLE$1 = 'configurable';
680 var WRITABLE = 'writable';
681
682 // `Object.defineProperty` method
683 // https://tc39.es/ecma262/#sec-object.defineproperty
684 objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
685 anObject$c(O);
686 P = toPropertyKey$1(P);
687 anObject$c(Attributes);
688 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
689 var current = $getOwnPropertyDescriptor(O, P);
690 if (current && current[WRITABLE]) {
691 O[P] = Attributes.value;
692 Attributes = {
693 configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
694 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
695 writable: false
696 };
697 }
698 } return $defineProperty(O, P, Attributes);
699 } : $defineProperty : function defineProperty(O, P, Attributes) {
700 anObject$c(O);
701 P = toPropertyKey$1(P);
702 anObject$c(Attributes);
703 if (IE8_DOM_DEFINE) try {
704 return $defineProperty(O, P, Attributes);
705 } catch (error) { /* empty */ }
706 if ('get' in Attributes || 'set' in Attributes) throw $TypeError$7('Accessors not supported');
707 if ('value' in Attributes) O[P] = Attributes.value;
708 return O;
709 };
710
711 var DESCRIPTORS$a = descriptors;
712 var definePropertyModule$4 = objectDefineProperty;
713 var createPropertyDescriptor$2 = createPropertyDescriptor$4;
714
715 var createNonEnumerableProperty$7 = DESCRIPTORS$a ? function (object, key, value) {
716 return definePropertyModule$4.f(object, key, createPropertyDescriptor$2(1, value));
717 } : function (object, key, value) {
718 object[key] = value;
719 return object;
720 };
721
722 var makeBuiltInExports = {};
723 var makeBuiltIn$3 = {
724 get exports(){ return makeBuiltInExports; },
725 set exports(v){ makeBuiltInExports = v; },
726 };
727
728 var DESCRIPTORS$9 = descriptors;
729 var hasOwn$9 = hasOwnProperty_1;
730
731 var FunctionPrototype$1 = Function.prototype;
732 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
733 var getDescriptor = DESCRIPTORS$9 && Object.getOwnPropertyDescriptor;
734
735 var EXISTS = hasOwn$9(FunctionPrototype$1, 'name');
736 // additional protection from minified / mangled / dropped function names
737 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
738 var CONFIGURABLE = EXISTS && (!DESCRIPTORS$9 || (DESCRIPTORS$9 && getDescriptor(FunctionPrototype$1, 'name').configurable));
739
740 var functionName = {
741 EXISTS: EXISTS,
742 PROPER: PROPER,
743 CONFIGURABLE: CONFIGURABLE
744 };
745
746 var uncurryThis$u = functionUncurryThis;
747 var isCallable$d = isCallable$j;
748 var store$1 = sharedStore;
749
750 var functionToString = uncurryThis$u(Function.toString);
751
752 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
753 if (!isCallable$d(store$1.inspectSource)) {
754 store$1.inspectSource = function (it) {
755 return functionToString(it);
756 };
757 }
758
759 var inspectSource$2 = store$1.inspectSource;
760
761 var global$d = global$k;
762 var isCallable$c = isCallable$j;
763
764 var WeakMap$1 = global$d.WeakMap;
765
766 var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
767
768 var shared$2 = sharedExports;
769 var uid = uid$2;
770
771 var keys$1 = shared$2('keys');
772
773 var sharedKey$3 = function (key) {
774 return keys$1[key] || (keys$1[key] = uid(key));
775 };
776
777 var hiddenKeys$4 = {};
778
779 var NATIVE_WEAK_MAP = weakMapBasicDetection;
780 var global$c = global$k;
781 var isObject$6 = isObject$b;
782 var createNonEnumerableProperty$6 = createNonEnumerableProperty$7;
783 var hasOwn$8 = hasOwnProperty_1;
784 var shared$1 = sharedStore;
785 var sharedKey$2 = sharedKey$3;
786 var hiddenKeys$3 = hiddenKeys$4;
787
788 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
789 var TypeError$2 = global$c.TypeError;
790 var WeakMap = global$c.WeakMap;
791 var set, get, has;
792
793 var enforce = function (it) {
794 return has(it) ? get(it) : set(it, {});
795 };
796
797 var getterFor = function (TYPE) {
798 return function (it) {
799 var state;
800 if (!isObject$6(it) || (state = get(it)).type !== TYPE) {
801 throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
802 } return state;
803 };
804 };
805
806 if (NATIVE_WEAK_MAP || shared$1.state) {
807 var store = shared$1.state || (shared$1.state = new WeakMap());
808 /* eslint-disable no-self-assign -- prototype methods protection */
809 store.get = store.get;
810 store.has = store.has;
811 store.set = store.set;
812 /* eslint-enable no-self-assign -- prototype methods protection */
813 set = function (it, metadata) {
814 if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
815 metadata.facade = it;
816 store.set(it, metadata);
817 return metadata;
818 };
819 get = function (it) {
820 return store.get(it) || {};
821 };
822 has = function (it) {
823 return store.has(it);
824 };
825 } else {
826 var STATE = sharedKey$2('state');
827 hiddenKeys$3[STATE] = true;
828 set = function (it, metadata) {
829 if (hasOwn$8(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
830 metadata.facade = it;
831 createNonEnumerableProperty$6(it, STATE, metadata);
832 return metadata;
833 };
834 get = function (it) {
835 return hasOwn$8(it, STATE) ? it[STATE] : {};
836 };
837 has = function (it) {
838 return hasOwn$8(it, STATE);
839 };
840 }
841
842 var internalState = {
843 set: set,
844 get: get,
845 has: has,
846 enforce: enforce,
847 getterFor: getterFor
848 };
849
850 var uncurryThis$t = functionUncurryThis;
851 var fails$n = fails$u;
852 var isCallable$b = isCallable$j;
853 var hasOwn$7 = hasOwnProperty_1;
854 var DESCRIPTORS$8 = descriptors;
855 var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
856 var inspectSource$1 = inspectSource$2;
857 var InternalStateModule$1 = internalState;
858
859 var enforceInternalState$1 = InternalStateModule$1.enforce;
860 var getInternalState$2 = InternalStateModule$1.get;
861 var $String$2 = String;
862 // eslint-disable-next-line es/no-object-defineproperty -- safe
863 var defineProperty$7 = Object.defineProperty;
864 var stringSlice$8 = uncurryThis$t(''.slice);
865 var replace$4 = uncurryThis$t(''.replace);
866 var join = uncurryThis$t([].join);
867
868 var CONFIGURABLE_LENGTH = DESCRIPTORS$8 && !fails$n(function () {
869 return defineProperty$7(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
870 });
871
872 var TEMPLATE = String(String).split('String');
873
874 var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
875 if (stringSlice$8($String$2(name), 0, 7) === 'Symbol(') {
876 name = '[' + replace$4($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
877 }
878 if (options && options.getter) name = 'get ' + name;
879 if (options && options.setter) name = 'set ' + name;
880 if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
881 if (DESCRIPTORS$8) defineProperty$7(value, 'name', { value: name, configurable: true });
882 else value.name = name;
883 }
884 if (CONFIGURABLE_LENGTH && options && hasOwn$7(options, 'arity') && value.length !== options.arity) {
885 defineProperty$7(value, 'length', { value: options.arity });
886 }
887 try {
888 if (options && hasOwn$7(options, 'constructor') && options.constructor) {
889 if (DESCRIPTORS$8) defineProperty$7(value, 'prototype', { writable: false });
890 // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
891 } else if (value.prototype) value.prototype = undefined;
892 } catch (error) { /* empty */ }
893 var state = enforceInternalState$1(value);
894 if (!hasOwn$7(state, 'source')) {
895 state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
896 } return value;
897 };
898
899 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
900 // eslint-disable-next-line no-extend-native -- required
901 Function.prototype.toString = makeBuiltIn$2(function toString() {
902 return isCallable$b(this) && getInternalState$2(this).source || inspectSource$1(this);
903 }, 'toString');
904
905 var isCallable$a = isCallable$j;
906 var definePropertyModule$3 = objectDefineProperty;
907 var makeBuiltIn$1 = makeBuiltInExports;
908 var defineGlobalProperty$1 = defineGlobalProperty$3;
909
910 var defineBuiltIn$7 = function (O, key, value, options) {
911 if (!options) options = {};
912 var simple = options.enumerable;
913 var name = options.name !== undefined ? options.name : key;
914 if (isCallable$a(value)) makeBuiltIn$1(value, name, options);
915 if (options.global) {
916 if (simple) O[key] = value;
917 else defineGlobalProperty$1(key, value);
918 } else {
919 try {
920 if (!options.unsafe) delete O[key];
921 else if (O[key]) simple = true;
922 } catch (error) { /* empty */ }
923 if (simple) O[key] = value;
924 else definePropertyModule$3.f(O, key, {
925 value: value,
926 enumerable: false,
927 configurable: !options.nonConfigurable,
928 writable: !options.nonWritable
929 });
930 } return O;
931 };
932
933 var objectGetOwnPropertyNames = {};
934
935 var ceil = Math.ceil;
936 var floor$2 = Math.floor;
937
938 // `Math.trunc` method
939 // https://tc39.es/ecma262/#sec-math.trunc
940 // eslint-disable-next-line es/no-math-trunc -- safe
941 var mathTrunc = Math.trunc || function trunc(x) {
942 var n = +x;
943 return (n > 0 ? floor$2 : ceil)(n);
944 };
945
946 var trunc = mathTrunc;
947
948 // `ToIntegerOrInfinity` abstract operation
949 // https://tc39.es/ecma262/#sec-tointegerorinfinity
950 var toIntegerOrInfinity$5 = function (argument) {
951 var number = +argument;
952 // eslint-disable-next-line no-self-compare -- NaN check
953 return number !== number || number === 0 ? 0 : trunc(number);
954 };
955
956 var toIntegerOrInfinity$4 = toIntegerOrInfinity$5;
957
958 var max$4 = Math.max;
959 var min$6 = Math.min;
960
961 // Helper for a popular repeating case of the spec:
962 // Let integer be ? ToInteger(index).
963 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
964 var toAbsoluteIndex$4 = function (index, length) {
965 var integer = toIntegerOrInfinity$4(index);
966 return integer < 0 ? max$4(integer + length, 0) : min$6(integer, length);
967 };
968
969 var toIntegerOrInfinity$3 = toIntegerOrInfinity$5;
970
971 var min$5 = Math.min;
972
973 // `ToLength` abstract operation
974 // https://tc39.es/ecma262/#sec-tolength
975 var toLength$6 = function (argument) {
976 return argument > 0 ? min$5(toIntegerOrInfinity$3(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
977 };
978
979 var toLength$5 = toLength$6;
980
981 // `LengthOfArrayLike` abstract operation
982 // https://tc39.es/ecma262/#sec-lengthofarraylike
983 var lengthOfArrayLike$7 = function (obj) {
984 return toLength$5(obj.length);
985 };
986
987 var toIndexedObject$6 = toIndexedObject$8;
988 var toAbsoluteIndex$3 = toAbsoluteIndex$4;
989 var lengthOfArrayLike$6 = lengthOfArrayLike$7;
990
991 // `Array.prototype.{ indexOf, includes }` methods implementation
992 var createMethod$4 = function (IS_INCLUDES) {
993 return function ($this, el, fromIndex) {
994 var O = toIndexedObject$6($this);
995 var length = lengthOfArrayLike$6(O);
996 var index = toAbsoluteIndex$3(fromIndex, length);
997 var value;
998 // Array#includes uses SameValueZero equality algorithm
999 // eslint-disable-next-line no-self-compare -- NaN check
1000 if (IS_INCLUDES && el != el) while (length > index) {
1001 value = O[index++];
1002 // eslint-disable-next-line no-self-compare -- NaN check
1003 if (value != value) return true;
1004 // Array#indexOf ignores holes, Array#includes - not
1005 } else for (;length > index; index++) {
1006 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1007 } return !IS_INCLUDES && -1;
1008 };
1009 };
1010
1011 var arrayIncludes = {
1012 // `Array.prototype.includes` method
1013 // https://tc39.es/ecma262/#sec-array.prototype.includes
1014 includes: createMethod$4(true),
1015 // `Array.prototype.indexOf` method
1016 // https://tc39.es/ecma262/#sec-array.prototype.indexof
1017 indexOf: createMethod$4(false)
1018 };
1019
1020 var uncurryThis$s = functionUncurryThis;
1021 var hasOwn$6 = hasOwnProperty_1;
1022 var toIndexedObject$5 = toIndexedObject$8;
1023 var indexOf$1 = arrayIncludes.indexOf;
1024 var hiddenKeys$2 = hiddenKeys$4;
1025
1026 var push$5 = uncurryThis$s([].push);
1027
1028 var objectKeysInternal = function (object, names) {
1029 var O = toIndexedObject$5(object);
1030 var i = 0;
1031 var result = [];
1032 var key;
1033 for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push$5(result, key);
1034 // Don't enum bug & hidden keys
1035 while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
1036 ~indexOf$1(result, key) || push$5(result, key);
1037 }
1038 return result;
1039 };
1040
1041 // IE8- don't enum bug keys
1042 var enumBugKeys$3 = [
1043 'constructor',
1044 'hasOwnProperty',
1045 'isPrototypeOf',
1046 'propertyIsEnumerable',
1047 'toLocaleString',
1048 'toString',
1049 'valueOf'
1050 ];
1051
1052 var internalObjectKeys$1 = objectKeysInternal;
1053 var enumBugKeys$2 = enumBugKeys$3;
1054
1055 var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1056
1057 // `Object.getOwnPropertyNames` method
1058 // https://tc39.es/ecma262/#sec-object.getownpropertynames
1059 // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1060 objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1061 return internalObjectKeys$1(O, hiddenKeys$1);
1062 };
1063
1064 var objectGetOwnPropertySymbols = {};
1065
1066 // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1067 objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1068
1069 var getBuiltIn$3 = getBuiltIn$5;
1070 var uncurryThis$r = functionUncurryThis;
1071 var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1072 var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1073 var anObject$b = anObject$d;
1074
1075 var concat$2 = uncurryThis$r([].concat);
1076
1077 // all object keys, includes non-enumerable and symbols
1078 var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
1079 var keys = getOwnPropertyNamesModule.f(anObject$b(it));
1080 var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1081 return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
1082 };
1083
1084 var hasOwn$5 = hasOwnProperty_1;
1085 var ownKeys = ownKeys$1;
1086 var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1087 var definePropertyModule$2 = objectDefineProperty;
1088
1089 var copyConstructorProperties$2 = function (target, source, exceptions) {
1090 var keys = ownKeys(source);
1091 var defineProperty = definePropertyModule$2.f;
1092 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1093 for (var i = 0; i < keys.length; i++) {
1094 var key = keys[i];
1095 if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
1096 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1097 }
1098 }
1099 };
1100
1101 var fails$m = fails$u;
1102 var isCallable$9 = isCallable$j;
1103
1104 var replacement = /#|\.prototype\./;
1105
1106 var isForced$3 = function (feature, detection) {
1107 var value = data[normalize(feature)];
1108 return value == POLYFILL ? true
1109 : value == NATIVE ? false
1110 : isCallable$9(detection) ? fails$m(detection)
1111 : !!detection;
1112 };
1113
1114 var normalize = isForced$3.normalize = function (string) {
1115 return String(string).replace(replacement, '.').toLowerCase();
1116 };
1117
1118 var data = isForced$3.data = {};
1119 var NATIVE = isForced$3.NATIVE = 'N';
1120 var POLYFILL = isForced$3.POLYFILL = 'P';
1121
1122 var isForced_1 = isForced$3;
1123
1124 var global$b = global$k;
1125 var getOwnPropertyDescriptor$4 = objectGetOwnPropertyDescriptor.f;
1126 var createNonEnumerableProperty$5 = createNonEnumerableProperty$7;
1127 var defineBuiltIn$6 = defineBuiltIn$7;
1128 var defineGlobalProperty = defineGlobalProperty$3;
1129 var copyConstructorProperties$1 = copyConstructorProperties$2;
1130 var isForced$2 = isForced_1;
1131
1132 /*
1133 options.target - name of the target object
1134 options.global - target is the global object
1135 options.stat - export as static methods of target
1136 options.proto - export as prototype methods of target
1137 options.real - real prototype method for the `pure` version
1138 options.forced - export even if the native feature is available
1139 options.bind - bind methods to the target, required for the `pure` version
1140 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1141 options.unsafe - use the simple assignment of property instead of delete + defineProperty
1142 options.sham - add a flag to not completely full polyfills
1143 options.enumerable - export as enumerable property
1144 options.dontCallGetSet - prevent calling a getter on target
1145 options.name - the .name of the function if it does not match the key
1146 */
1147 var _export = function (options, source) {
1148 var TARGET = options.target;
1149 var GLOBAL = options.global;
1150 var STATIC = options.stat;
1151 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1152 if (GLOBAL) {
1153 target = global$b;
1154 } else if (STATIC) {
1155 target = global$b[TARGET] || defineGlobalProperty(TARGET, {});
1156 } else {
1157 target = (global$b[TARGET] || {}).prototype;
1158 }
1159 if (target) for (key in source) {
1160 sourceProperty = source[key];
1161 if (options.dontCallGetSet) {
1162 descriptor = getOwnPropertyDescriptor$4(target, key);
1163 targetProperty = descriptor && descriptor.value;
1164 } else targetProperty = target[key];
1165 FORCED = isForced$2(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1166 // contained in target
1167 if (!FORCED && targetProperty !== undefined) {
1168 if (typeof sourceProperty == typeof targetProperty) continue;
1169 copyConstructorProperties$1(sourceProperty, targetProperty);
1170 }
1171 // add a flag to not completely full polyfills
1172 if (options.sham || (targetProperty && targetProperty.sham)) {
1173 createNonEnumerableProperty$5(sourceProperty, 'sham', true);
1174 }
1175 defineBuiltIn$6(target, key, sourceProperty, options);
1176 }
1177 };
1178
1179 var internalObjectKeys = objectKeysInternal;
1180 var enumBugKeys$1 = enumBugKeys$3;
1181
1182 // `Object.keys` method
1183 // https://tc39.es/ecma262/#sec-object.keys
1184 // eslint-disable-next-line es/no-object-keys -- safe
1185 var objectKeys$3 = Object.keys || function keys(O) {
1186 return internalObjectKeys(O, enumBugKeys$1);
1187 };
1188
1189 var DESCRIPTORS$7 = descriptors;
1190 var uncurryThis$q = functionUncurryThis;
1191 var call$9 = functionCall;
1192 var fails$l = fails$u;
1193 var objectKeys$2 = objectKeys$3;
1194 var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1195 var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1196 var toObject$7 = toObject$9;
1197 var IndexedObject$2 = indexedObject;
1198
1199 // eslint-disable-next-line es/no-object-assign -- safe
1200 var $assign = Object.assign;
1201 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1202 var defineProperty$6 = Object.defineProperty;
1203 var concat$1 = uncurryThis$q([].concat);
1204
1205 // `Object.assign` method
1206 // https://tc39.es/ecma262/#sec-object.assign
1207 var objectAssign = !$assign || fails$l(function () {
1208 // should have correct order of operations (Edge bug)
1209 if (DESCRIPTORS$7 && $assign({ b: 1 }, $assign(defineProperty$6({}, 'a', {
1210 enumerable: true,
1211 get: function () {
1212 defineProperty$6(this, 'b', {
1213 value: 3,
1214 enumerable: false
1215 });
1216 }
1217 }), { b: 2 })).b !== 1) return true;
1218 // should work with symbols and should have deterministic property order (V8 bug)
1219 var A = {};
1220 var B = {};
1221 // eslint-disable-next-line es/no-symbol -- safe
1222 var symbol = Symbol();
1223 var alphabet = 'abcdefghijklmnopqrst';
1224 A[symbol] = 7;
1225 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1226 return $assign({}, A)[symbol] != 7 || objectKeys$2($assign({}, B)).join('') != alphabet;
1227 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1228 var T = toObject$7(target);
1229 var argumentsLength = arguments.length;
1230 var index = 1;
1231 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1232 var propertyIsEnumerable = propertyIsEnumerableModule.f;
1233 while (argumentsLength > index) {
1234 var S = IndexedObject$2(arguments[index++]);
1235 var keys = getOwnPropertySymbols ? concat$1(objectKeys$2(S), getOwnPropertySymbols(S)) : objectKeys$2(S);
1236 var length = keys.length;
1237 var j = 0;
1238 var key;
1239 while (length > j) {
1240 key = keys[j++];
1241 if (!DESCRIPTORS$7 || call$9(propertyIsEnumerable, S, key)) T[key] = S[key];
1242 }
1243 } return T;
1244 } : $assign;
1245
1246 var $$n = _export;
1247 var assign = objectAssign;
1248
1249 // `Object.assign` method
1250 // https://tc39.es/ecma262/#sec-object.assign
1251 // eslint-disable-next-line es/no-object-assign -- required for testing
1252 $$n({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1253 assign: assign
1254 });
1255
1256 var wellKnownSymbol$h = wellKnownSymbol$j;
1257
1258 var TO_STRING_TAG$3 = wellKnownSymbol$h('toStringTag');
1259 var test$2 = {};
1260
1261 test$2[TO_STRING_TAG$3] = 'z';
1262
1263 var toStringTagSupport = String(test$2) === '[object z]';
1264
1265 var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
1266 var isCallable$8 = isCallable$j;
1267 var classofRaw$1 = classofRaw$2;
1268 var wellKnownSymbol$g = wellKnownSymbol$j;
1269
1270 var TO_STRING_TAG$2 = wellKnownSymbol$g('toStringTag');
1271 var $Object$1 = Object;
1272
1273 // ES3 wrong here
1274 var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1275
1276 // fallback for IE11 Script Access Denied error
1277 var tryGet = function (it, key) {
1278 try {
1279 return it[key];
1280 } catch (error) { /* empty */ }
1281 };
1282
1283 // getting tag from ES6+ `Object.prototype.toString`
1284 var classof$6 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
1285 var O, tag, result;
1286 return it === undefined ? 'Undefined' : it === null ? 'Null'
1287 // @@toStringTag case
1288 : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$2)) == 'string' ? tag
1289 // builtinTag case
1290 : CORRECT_ARGUMENTS ? classofRaw$1(O)
1291 // ES3 arguments fallback
1292 : (result = classofRaw$1(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
1293 };
1294
1295 var classof$5 = classof$6;
1296
1297 var $String$1 = String;
1298
1299 var toString$f = function (argument) {
1300 if (classof$5(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1301 return $String$1(argument);
1302 };
1303
1304 // a string of all valid unicode whitespaces
1305 var whitespaces$4 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1306 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1307
1308 var uncurryThis$p = functionUncurryThis;
1309 var requireObjectCoercible$8 = requireObjectCoercible$b;
1310 var toString$e = toString$f;
1311 var whitespaces$3 = whitespaces$4;
1312
1313 var replace$3 = uncurryThis$p(''.replace);
1314 var ltrim = RegExp('^[' + whitespaces$3 + ']+');
1315 var rtrim = RegExp('(^|[^' + whitespaces$3 + '])[' + whitespaces$3 + ']+$');
1316
1317 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1318 var createMethod$3 = function (TYPE) {
1319 return function ($this) {
1320 var string = toString$e(requireObjectCoercible$8($this));
1321 if (TYPE & 1) string = replace$3(string, ltrim, '');
1322 if (TYPE & 2) string = replace$3(string, rtrim, '$1');
1323 return string;
1324 };
1325 };
1326
1327 var stringTrim = {
1328 // `String.prototype.{ trimLeft, trimStart }` methods
1329 // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1330 start: createMethod$3(1),
1331 // `String.prototype.{ trimRight, trimEnd }` methods
1332 // https://tc39.es/ecma262/#sec-string.prototype.trimend
1333 end: createMethod$3(2),
1334 // `String.prototype.trim` method
1335 // https://tc39.es/ecma262/#sec-string.prototype.trim
1336 trim: createMethod$3(3)
1337 };
1338
1339 var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
1340 var fails$k = fails$u;
1341 var whitespaces$2 = whitespaces$4;
1342
1343 var non = '\u200B\u0085\u180E';
1344
1345 // check that a method works with the correct list
1346 // of whitespaces and has a correct name
1347 var stringTrimForced = function (METHOD_NAME) {
1348 return fails$k(function () {
1349 return !!whitespaces$2[METHOD_NAME]()
1350 || non[METHOD_NAME]() !== non
1351 || (PROPER_FUNCTION_NAME$2 && whitespaces$2[METHOD_NAME].name !== METHOD_NAME);
1352 });
1353 };
1354
1355 var $$m = _export;
1356 var $trim = stringTrim.trim;
1357 var forcedStringTrimMethod = stringTrimForced;
1358
1359 // `String.prototype.trim` method
1360 // https://tc39.es/ecma262/#sec-string.prototype.trim
1361 $$m({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
1362 trim: function trim() {
1363 return $trim(this);
1364 }
1365 });
1366
1367 var fails$j = fails$u;
1368
1369 var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
1370 var method = [][METHOD_NAME];
1371 return !!method && fails$j(function () {
1372 // eslint-disable-next-line no-useless-call -- required for testing
1373 method.call(null, argument || function () { return 1; }, 1);
1374 });
1375 };
1376
1377 var $$l = _export;
1378 var uncurryThis$o = functionUncurryThis;
1379 var IndexedObject$1 = indexedObject;
1380 var toIndexedObject$4 = toIndexedObject$8;
1381 var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
1382
1383 var nativeJoin = uncurryThis$o([].join);
1384
1385 var ES3_STRINGS = IndexedObject$1 != Object;
1386 var FORCED$6 = ES3_STRINGS || !arrayMethodIsStrict$3('join', ',');
1387
1388 // `Array.prototype.join` method
1389 // https://tc39.es/ecma262/#sec-array.prototype.join
1390 $$l({ target: 'Array', proto: true, forced: FORCED$6 }, {
1391 join: function join(separator) {
1392 return nativeJoin(toIndexedObject$4(this), separator === undefined ? ',' : separator);
1393 }
1394 });
1395
1396 var anObject$a = anObject$d;
1397
1398 // `RegExp.prototype.flags` getter implementation
1399 // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1400 var regexpFlags$1 = function () {
1401 var that = anObject$a(this);
1402 var result = '';
1403 if (that.hasIndices) result += 'd';
1404 if (that.global) result += 'g';
1405 if (that.ignoreCase) result += 'i';
1406 if (that.multiline) result += 'm';
1407 if (that.dotAll) result += 's';
1408 if (that.unicode) result += 'u';
1409 if (that.unicodeSets) result += 'v';
1410 if (that.sticky) result += 'y';
1411 return result;
1412 };
1413
1414 var fails$i = fails$u;
1415 var global$a = global$k;
1416
1417 // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1418 var $RegExp$2 = global$a.RegExp;
1419
1420 var UNSUPPORTED_Y$3 = fails$i(function () {
1421 var re = $RegExp$2('a', 'y');
1422 re.lastIndex = 2;
1423 return re.exec('abcd') != null;
1424 });
1425
1426 // UC Browser bug
1427 // https://github.com/zloirock/core-js/issues/1008
1428 var MISSED_STICKY$1 = UNSUPPORTED_Y$3 || fails$i(function () {
1429 return !$RegExp$2('a', 'y').sticky;
1430 });
1431
1432 var BROKEN_CARET = UNSUPPORTED_Y$3 || fails$i(function () {
1433 // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1434 var re = $RegExp$2('^r', 'gy');
1435 re.lastIndex = 2;
1436 return re.exec('str') != null;
1437 });
1438
1439 var regexpStickyHelpers = {
1440 BROKEN_CARET: BROKEN_CARET,
1441 MISSED_STICKY: MISSED_STICKY$1,
1442 UNSUPPORTED_Y: UNSUPPORTED_Y$3
1443 };
1444
1445 var objectDefineProperties = {};
1446
1447 var DESCRIPTORS$6 = descriptors;
1448 var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1449 var definePropertyModule$1 = objectDefineProperty;
1450 var anObject$9 = anObject$d;
1451 var toIndexedObject$3 = toIndexedObject$8;
1452 var objectKeys$1 = objectKeys$3;
1453
1454 // `Object.defineProperties` method
1455 // https://tc39.es/ecma262/#sec-object.defineproperties
1456 // eslint-disable-next-line es/no-object-defineproperties -- safe
1457 objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1458 anObject$9(O);
1459 var props = toIndexedObject$3(Properties);
1460 var keys = objectKeys$1(Properties);
1461 var length = keys.length;
1462 var index = 0;
1463 var key;
1464 while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1465 return O;
1466 };
1467
1468 var getBuiltIn$2 = getBuiltIn$5;
1469
1470 var html$1 = getBuiltIn$2('document', 'documentElement');
1471
1472 /* global ActiveXObject -- old IE, WSH */
1473
1474 var anObject$8 = anObject$d;
1475 var definePropertiesModule = objectDefineProperties;
1476 var enumBugKeys = enumBugKeys$3;
1477 var hiddenKeys = hiddenKeys$4;
1478 var html = html$1;
1479 var documentCreateElement$1 = documentCreateElement$2;
1480 var sharedKey$1 = sharedKey$3;
1481
1482 var GT = '>';
1483 var LT = '<';
1484 var PROTOTYPE = 'prototype';
1485 var SCRIPT = 'script';
1486 var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1487
1488 var EmptyConstructor = function () { /* empty */ };
1489
1490 var scriptTag = function (content) {
1491 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1492 };
1493
1494 // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1495 var NullProtoObjectViaActiveX = function (activeXDocument) {
1496 activeXDocument.write(scriptTag(''));
1497 activeXDocument.close();
1498 var temp = activeXDocument.parentWindow.Object;
1499 activeXDocument = null; // avoid memory leak
1500 return temp;
1501 };
1502
1503 // Create object with fake `null` prototype: use iframe Object with cleared prototype
1504 var NullProtoObjectViaIFrame = function () {
1505 // Thrash, waste and sodomy: IE GC bug
1506 var iframe = documentCreateElement$1('iframe');
1507 var JS = 'java' + SCRIPT + ':';
1508 var iframeDocument;
1509 iframe.style.display = 'none';
1510 html.appendChild(iframe);
1511 // https://github.com/zloirock/core-js/issues/475
1512 iframe.src = String(JS);
1513 iframeDocument = iframe.contentWindow.document;
1514 iframeDocument.open();
1515 iframeDocument.write(scriptTag('document.F=Object'));
1516 iframeDocument.close();
1517 return iframeDocument.F;
1518 };
1519
1520 // Check for document.domain and active x support
1521 // No need to use active x approach when document.domain is not set
1522 // see https://github.com/es-shims/es5-shim/issues/150
1523 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1524 // avoid IE GC bug
1525 var activeXDocument;
1526 var NullProtoObject = function () {
1527 try {
1528 activeXDocument = new ActiveXObject('htmlfile');
1529 } catch (error) { /* ignore */ }
1530 NullProtoObject = typeof document != 'undefined'
1531 ? document.domain && activeXDocument
1532 ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1533 : NullProtoObjectViaIFrame()
1534 : NullProtoObjectViaActiveX(activeXDocument); // WSH
1535 var length = enumBugKeys.length;
1536 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1537 return NullProtoObject();
1538 };
1539
1540 hiddenKeys[IE_PROTO$1] = true;
1541
1542 // `Object.create` method
1543 // https://tc39.es/ecma262/#sec-object.create
1544 // eslint-disable-next-line es/no-object-create -- safe
1545 var objectCreate = Object.create || function create(O, Properties) {
1546 var result;
1547 if (O !== null) {
1548 EmptyConstructor[PROTOTYPE] = anObject$8(O);
1549 result = new EmptyConstructor();
1550 EmptyConstructor[PROTOTYPE] = null;
1551 // add "__proto__" for Object.getPrototypeOf polyfill
1552 result[IE_PROTO$1] = O;
1553 } else result = NullProtoObject();
1554 return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1555 };
1556
1557 var fails$h = fails$u;
1558 var global$9 = global$k;
1559
1560 // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1561 var $RegExp$1 = global$9.RegExp;
1562
1563 var regexpUnsupportedDotAll = fails$h(function () {
1564 var re = $RegExp$1('.', 's');
1565 return !(re.dotAll && re.exec('\n') && re.flags === 's');
1566 });
1567
1568 var fails$g = fails$u;
1569 var global$8 = global$k;
1570
1571 // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1572 var $RegExp = global$8.RegExp;
1573
1574 var regexpUnsupportedNcg = fails$g(function () {
1575 var re = $RegExp('(?<a>b)', 'g');
1576 return re.exec('b').groups.a !== 'b' ||
1577 'b'.replace(re, '$<a>c') !== 'bc';
1578 });
1579
1580 /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1581 /* eslint-disable regexp/no-useless-quantifier -- testing */
1582 var call$8 = functionCall;
1583 var uncurryThis$n = functionUncurryThis;
1584 var toString$d = toString$f;
1585 var regexpFlags = regexpFlags$1;
1586 var stickyHelpers$2 = regexpStickyHelpers;
1587 var shared = sharedExports;
1588 var create$2 = objectCreate;
1589 var getInternalState$1 = internalState.get;
1590 var UNSUPPORTED_DOT_ALL$1 = regexpUnsupportedDotAll;
1591 var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
1592
1593 var nativeReplace = shared('native-string-replace', String.prototype.replace);
1594 var nativeExec = RegExp.prototype.exec;
1595 var patchedExec = nativeExec;
1596 var charAt$5 = uncurryThis$n(''.charAt);
1597 var indexOf = uncurryThis$n(''.indexOf);
1598 var replace$2 = uncurryThis$n(''.replace);
1599 var stringSlice$7 = uncurryThis$n(''.slice);
1600
1601 var UPDATES_LAST_INDEX_WRONG = (function () {
1602 var re1 = /a/;
1603 var re2 = /b*/g;
1604 call$8(nativeExec, re1, 'a');
1605 call$8(nativeExec, re2, 'a');
1606 return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1607 })();
1608
1609 var UNSUPPORTED_Y$2 = stickyHelpers$2.BROKEN_CARET;
1610
1611 // nonparticipating capturing group, copied from es5-shim's String#split patch.
1612 var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1613
1614 var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2 || UNSUPPORTED_DOT_ALL$1 || UNSUPPORTED_NCG$1;
1615
1616 if (PATCH) {
1617 patchedExec = function exec(string) {
1618 var re = this;
1619 var state = getInternalState$1(re);
1620 var str = toString$d(string);
1621 var raw = state.raw;
1622 var result, reCopy, lastIndex, match, i, object, group;
1623
1624 if (raw) {
1625 raw.lastIndex = re.lastIndex;
1626 result = call$8(patchedExec, raw, str);
1627 re.lastIndex = raw.lastIndex;
1628 return result;
1629 }
1630
1631 var groups = state.groups;
1632 var sticky = UNSUPPORTED_Y$2 && re.sticky;
1633 var flags = call$8(regexpFlags, re);
1634 var source = re.source;
1635 var charsAdded = 0;
1636 var strCopy = str;
1637
1638 if (sticky) {
1639 flags = replace$2(flags, 'y', '');
1640 if (indexOf(flags, 'g') === -1) {
1641 flags += 'g';
1642 }
1643
1644 strCopy = stringSlice$7(str, re.lastIndex);
1645 // Support anchored sticky behavior.
1646 if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$5(str, re.lastIndex - 1) !== '\n')) {
1647 source = '(?: ' + source + ')';
1648 strCopy = ' ' + strCopy;
1649 charsAdded++;
1650 }
1651 // ^(? + rx + ) is needed, in combination with some str slicing, to
1652 // simulate the 'y' flag.
1653 reCopy = new RegExp('^(?:' + source + ')', flags);
1654 }
1655
1656 if (NPCG_INCLUDED) {
1657 reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1658 }
1659 if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1660
1661 match = call$8(nativeExec, sticky ? reCopy : re, strCopy);
1662
1663 if (sticky) {
1664 if (match) {
1665 match.input = stringSlice$7(match.input, charsAdded);
1666 match[0] = stringSlice$7(match[0], charsAdded);
1667 match.index = re.lastIndex;
1668 re.lastIndex += match[0].length;
1669 } else re.lastIndex = 0;
1670 } else if (UPDATES_LAST_INDEX_WRONG && match) {
1671 re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1672 }
1673 if (NPCG_INCLUDED && match && match.length > 1) {
1674 // Fix browsers whose `exec` methods don't consistently return `undefined`
1675 // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1676 call$8(nativeReplace, match[0], reCopy, function () {
1677 for (i = 1; i < arguments.length - 2; i++) {
1678 if (arguments[i] === undefined) match[i] = undefined;
1679 }
1680 });
1681 }
1682
1683 if (match && groups) {
1684 match.groups = object = create$2(null);
1685 for (i = 0; i < groups.length; i++) {
1686 group = groups[i];
1687 object[group[0]] = match[group[1]];
1688 }
1689 }
1690
1691 return match;
1692 };
1693 }
1694
1695 var regexpExec$3 = patchedExec;
1696
1697 var $$k = _export;
1698 var exec$4 = regexpExec$3;
1699
1700 // `RegExp.prototype.exec` method
1701 // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1702 $$k({ target: 'RegExp', proto: true, forced: /./.exec !== exec$4 }, {
1703 exec: exec$4
1704 });
1705
1706 var NATIVE_BIND$1 = functionBindNative;
1707
1708 var FunctionPrototype = Function.prototype;
1709 var apply$2 = FunctionPrototype.apply;
1710 var call$7 = FunctionPrototype.call;
1711
1712 // eslint-disable-next-line es/no-reflect -- safe
1713 var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$2) : function () {
1714 return call$7.apply(apply$2, arguments);
1715 });
1716
1717 var classofRaw = classofRaw$2;
1718 var uncurryThis$m = functionUncurryThis;
1719
1720 var functionUncurryThisClause = function (fn) {
1721 // Nashorn bug:
1722 // https://github.com/zloirock/core-js/issues/1128
1723 // https://github.com/zloirock/core-js/issues/1130
1724 if (classofRaw(fn) === 'Function') return uncurryThis$m(fn);
1725 };
1726
1727 // TODO: Remove from `core-js@4` since it's moved to entry points
1728
1729 var uncurryThis$l = functionUncurryThisClause;
1730 var defineBuiltIn$5 = defineBuiltIn$7;
1731 var regexpExec$2 = regexpExec$3;
1732 var fails$f = fails$u;
1733 var wellKnownSymbol$f = wellKnownSymbol$j;
1734 var createNonEnumerableProperty$4 = createNonEnumerableProperty$7;
1735
1736 var SPECIES$5 = wellKnownSymbol$f('species');
1737 var RegExpPrototype$3 = RegExp.prototype;
1738
1739 var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1740 var SYMBOL = wellKnownSymbol$f(KEY);
1741
1742 var DELEGATES_TO_SYMBOL = !fails$f(function () {
1743 // String methods call symbol-named RegEp methods
1744 var O = {};
1745 O[SYMBOL] = function () { return 7; };
1746 return ''[KEY](O) != 7;
1747 });
1748
1749 var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$f(function () {
1750 // Symbol-named RegExp methods call .exec
1751 var execCalled = false;
1752 var re = /a/;
1753
1754 if (KEY === 'split') {
1755 // We can't use real regex here since it causes deoptimization
1756 // and serious performance degradation in V8
1757 // https://github.com/zloirock/core-js/issues/306
1758 re = {};
1759 // RegExp[@@split] doesn't call the regex's exec method, but first creates
1760 // a new one. We need to return the patched regex when creating the new one.
1761 re.constructor = {};
1762 re.constructor[SPECIES$5] = function () { return re; };
1763 re.flags = '';
1764 re[SYMBOL] = /./[SYMBOL];
1765 }
1766
1767 re.exec = function () { execCalled = true; return null; };
1768
1769 re[SYMBOL]('');
1770 return !execCalled;
1771 });
1772
1773 if (
1774 !DELEGATES_TO_SYMBOL ||
1775 !DELEGATES_TO_EXEC ||
1776 FORCED
1777 ) {
1778 var uncurriedNativeRegExpMethod = uncurryThis$l(/./[SYMBOL]);
1779 var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1780 var uncurriedNativeMethod = uncurryThis$l(nativeMethod);
1781 var $exec = regexp.exec;
1782 if ($exec === regexpExec$2 || $exec === RegExpPrototype$3.exec) {
1783 if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1784 // The native String method already delegates to @@method (this
1785 // polyfilled function), leasing to infinite recursion.
1786 // We avoid it by directly calling the native @@method method.
1787 return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1788 }
1789 return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1790 }
1791 return { done: false };
1792 });
1793
1794 defineBuiltIn$5(String.prototype, KEY, methods[0]);
1795 defineBuiltIn$5(RegExpPrototype$3, SYMBOL, methods[1]);
1796 }
1797
1798 if (SHAM) createNonEnumerableProperty$4(RegExpPrototype$3[SYMBOL], 'sham', true);
1799 };
1800
1801 var isObject$5 = isObject$b;
1802 var classof$4 = classofRaw$2;
1803 var wellKnownSymbol$e = wellKnownSymbol$j;
1804
1805 var MATCH$2 = wellKnownSymbol$e('match');
1806
1807 // `IsRegExp` abstract operation
1808 // https://tc39.es/ecma262/#sec-isregexp
1809 var isRegexp = function (it) {
1810 var isRegExp;
1811 return isObject$5(it) && ((isRegExp = it[MATCH$2]) !== undefined ? !!isRegExp : classof$4(it) == 'RegExp');
1812 };
1813
1814 var uncurryThis$k = functionUncurryThis;
1815 var fails$e = fails$u;
1816 var isCallable$7 = isCallable$j;
1817 var classof$3 = classof$6;
1818 var getBuiltIn$1 = getBuiltIn$5;
1819 var inspectSource = inspectSource$2;
1820
1821 var noop = function () { /* empty */ };
1822 var empty = [];
1823 var construct = getBuiltIn$1('Reflect', 'construct');
1824 var constructorRegExp = /^\s*(?:class|function)\b/;
1825 var exec$3 = uncurryThis$k(constructorRegExp.exec);
1826 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1827
1828 var isConstructorModern = function isConstructor(argument) {
1829 if (!isCallable$7(argument)) return false;
1830 try {
1831 construct(noop, empty, argument);
1832 return true;
1833 } catch (error) {
1834 return false;
1835 }
1836 };
1837
1838 var isConstructorLegacy = function isConstructor(argument) {
1839 if (!isCallable$7(argument)) return false;
1840 switch (classof$3(argument)) {
1841 case 'AsyncFunction':
1842 case 'GeneratorFunction':
1843 case 'AsyncGeneratorFunction': return false;
1844 }
1845 try {
1846 // we can't check .prototype since constructors produced by .bind haven't it
1847 // `Function#toString` throws on some built-it function in some legacy engines
1848 // (for example, `DOMQuad` and similar in FF41-)
1849 return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource(argument));
1850 } catch (error) {
1851 return true;
1852 }
1853 };
1854
1855 isConstructorLegacy.sham = true;
1856
1857 // `IsConstructor` abstract operation
1858 // https://tc39.es/ecma262/#sec-isconstructor
1859 var isConstructor$3 = !construct || fails$e(function () {
1860 var called;
1861 return isConstructorModern(isConstructorModern.call)
1862 || !isConstructorModern(Object)
1863 || !isConstructorModern(function () { called = true; })
1864 || called;
1865 }) ? isConstructorLegacy : isConstructorModern;
1866
1867 var isConstructor$2 = isConstructor$3;
1868 var tryToString$1 = tryToString$3;
1869
1870 var $TypeError$6 = TypeError;
1871
1872 // `Assert: IsConstructor(argument) is true`
1873 var aConstructor$1 = function (argument) {
1874 if (isConstructor$2(argument)) return argument;
1875 throw $TypeError$6(tryToString$1(argument) + ' is not a constructor');
1876 };
1877
1878 var anObject$7 = anObject$d;
1879 var aConstructor = aConstructor$1;
1880 var isNullOrUndefined$4 = isNullOrUndefined$7;
1881 var wellKnownSymbol$d = wellKnownSymbol$j;
1882
1883 var SPECIES$4 = wellKnownSymbol$d('species');
1884
1885 // `SpeciesConstructor` abstract operation
1886 // https://tc39.es/ecma262/#sec-speciesconstructor
1887 var speciesConstructor$1 = function (O, defaultConstructor) {
1888 var C = anObject$7(O).constructor;
1889 var S;
1890 return C === undefined || isNullOrUndefined$4(S = anObject$7(C)[SPECIES$4]) ? defaultConstructor : aConstructor(S);
1891 };
1892
1893 var uncurryThis$j = functionUncurryThis;
1894 var toIntegerOrInfinity$2 = toIntegerOrInfinity$5;
1895 var toString$c = toString$f;
1896 var requireObjectCoercible$7 = requireObjectCoercible$b;
1897
1898 var charAt$4 = uncurryThis$j(''.charAt);
1899 var charCodeAt$1 = uncurryThis$j(''.charCodeAt);
1900 var stringSlice$6 = uncurryThis$j(''.slice);
1901
1902 var createMethod$2 = function (CONVERT_TO_STRING) {
1903 return function ($this, pos) {
1904 var S = toString$c(requireObjectCoercible$7($this));
1905 var position = toIntegerOrInfinity$2(pos);
1906 var size = S.length;
1907 var first, second;
1908 if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1909 first = charCodeAt$1(S, position);
1910 return first < 0xD800 || first > 0xDBFF || position + 1 === size
1911 || (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF
1912 ? CONVERT_TO_STRING
1913 ? charAt$4(S, position)
1914 : first
1915 : CONVERT_TO_STRING
1916 ? stringSlice$6(S, position, position + 2)
1917 : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1918 };
1919 };
1920
1921 var stringMultibyte = {
1922 // `String.prototype.codePointAt` method
1923 // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1924 codeAt: createMethod$2(false),
1925 // `String.prototype.at` method
1926 // https://github.com/mathiasbynens/String.prototype.at
1927 charAt: createMethod$2(true)
1928 };
1929
1930 var charAt$3 = stringMultibyte.charAt;
1931
1932 // `AdvanceStringIndex` abstract operation
1933 // https://tc39.es/ecma262/#sec-advancestringindex
1934 var advanceStringIndex$3 = function (S, index, unicode) {
1935 return index + (unicode ? charAt$3(S, index).length : 1);
1936 };
1937
1938 var toPropertyKey = toPropertyKey$3;
1939 var definePropertyModule = objectDefineProperty;
1940 var createPropertyDescriptor$1 = createPropertyDescriptor$4;
1941
1942 var createProperty$4 = function (object, key, value) {
1943 var propertyKey = toPropertyKey(key);
1944 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor$1(0, value));
1945 else object[propertyKey] = value;
1946 };
1947
1948 var toAbsoluteIndex$2 = toAbsoluteIndex$4;
1949 var lengthOfArrayLike$5 = lengthOfArrayLike$7;
1950 var createProperty$3 = createProperty$4;
1951
1952 var $Array$2 = Array;
1953 var max$3 = Math.max;
1954
1955 var arraySliceSimple = function (O, start, end) {
1956 var length = lengthOfArrayLike$5(O);
1957 var k = toAbsoluteIndex$2(start, length);
1958 var fin = toAbsoluteIndex$2(end === undefined ? length : end, length);
1959 var result = $Array$2(max$3(fin - k, 0));
1960 for (var n = 0; k < fin; k++, n++) createProperty$3(result, n, O[k]);
1961 result.length = n;
1962 return result;
1963 };
1964
1965 var call$6 = functionCall;
1966 var anObject$6 = anObject$d;
1967 var isCallable$6 = isCallable$j;
1968 var classof$2 = classofRaw$2;
1969 var regexpExec$1 = regexpExec$3;
1970
1971 var $TypeError$5 = TypeError;
1972
1973 // `RegExpExec` abstract operation
1974 // https://tc39.es/ecma262/#sec-regexpexec
1975 var regexpExecAbstract = function (R, S) {
1976 var exec = R.exec;
1977 if (isCallable$6(exec)) {
1978 var result = call$6(exec, R, S);
1979 if (result !== null) anObject$6(result);
1980 return result;
1981 }
1982 if (classof$2(R) === 'RegExp') return call$6(regexpExec$1, R, S);
1983 throw $TypeError$5('RegExp#exec called on incompatible receiver');
1984 };
1985
1986 var apply$1 = functionApply;
1987 var call$5 = functionCall;
1988 var uncurryThis$i = functionUncurryThis;
1989 var fixRegExpWellKnownSymbolLogic$3 = fixRegexpWellKnownSymbolLogic;
1990 var anObject$5 = anObject$d;
1991 var isNullOrUndefined$3 = isNullOrUndefined$7;
1992 var isRegExp$2 = isRegexp;
1993 var requireObjectCoercible$6 = requireObjectCoercible$b;
1994 var speciesConstructor = speciesConstructor$1;
1995 var advanceStringIndex$2 = advanceStringIndex$3;
1996 var toLength$4 = toLength$6;
1997 var toString$b = toString$f;
1998 var getMethod$3 = getMethod$5;
1999 var arraySlice$2 = arraySliceSimple;
2000 var callRegExpExec = regexpExecAbstract;
2001 var regexpExec = regexpExec$3;
2002 var stickyHelpers$1 = regexpStickyHelpers;
2003 var fails$d = fails$u;
2004
2005 var UNSUPPORTED_Y$1 = stickyHelpers$1.UNSUPPORTED_Y;
2006 var MAX_UINT32 = 0xFFFFFFFF;
2007 var min$4 = Math.min;
2008 var $push = [].push;
2009 var exec$2 = uncurryThis$i(/./.exec);
2010 var push$4 = uncurryThis$i($push);
2011 var stringSlice$5 = uncurryThis$i(''.slice);
2012
2013 // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
2014 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
2015 var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$d(function () {
2016 // eslint-disable-next-line regexp/no-empty-group -- required for testing
2017 var re = /(?:)/;
2018 var originalExec = re.exec;
2019 re.exec = function () { return originalExec.apply(this, arguments); };
2020 var result = 'ab'.split(re);
2021 return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
2022 });
2023
2024 // @@split logic
2025 fixRegExpWellKnownSymbolLogic$3('split', function (SPLIT, nativeSplit, maybeCallNative) {
2026 var internalSplit;
2027 if (
2028 'abbc'.split(/(b)*/)[1] == 'c' ||
2029 // eslint-disable-next-line regexp/no-empty-group -- required for testing
2030 'test'.split(/(?:)/, -1).length != 4 ||
2031 'ab'.split(/(?:ab)*/).length != 2 ||
2032 '.'.split(/(.?)(.?)/).length != 4 ||
2033 // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
2034 '.'.split(/()()/).length > 1 ||
2035 ''.split(/.?/).length
2036 ) {
2037 // based on es5-shim implementation, need to rework it
2038 internalSplit = function (separator, limit) {
2039 var string = toString$b(requireObjectCoercible$6(this));
2040 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2041 if (lim === 0) return [];
2042 if (separator === undefined) return [string];
2043 // If `separator` is not a regex, use native split
2044 if (!isRegExp$2(separator)) {
2045 return call$5(nativeSplit, string, separator, lim);
2046 }
2047 var output = [];
2048 var flags = (separator.ignoreCase ? 'i' : '') +
2049 (separator.multiline ? 'm' : '') +
2050 (separator.unicode ? 'u' : '') +
2051 (separator.sticky ? 'y' : '');
2052 var lastLastIndex = 0;
2053 // Make `global` and avoid `lastIndex` issues by working with a copy
2054 var separatorCopy = new RegExp(separator.source, flags + 'g');
2055 var match, lastIndex, lastLength;
2056 while (match = call$5(regexpExec, separatorCopy, string)) {
2057 lastIndex = separatorCopy.lastIndex;
2058 if (lastIndex > lastLastIndex) {
2059 push$4(output, stringSlice$5(string, lastLastIndex, match.index));
2060 if (match.length > 1 && match.index < string.length) apply$1($push, output, arraySlice$2(match, 1));
2061 lastLength = match[0].length;
2062 lastLastIndex = lastIndex;
2063 if (output.length >= lim) break;
2064 }
2065 if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
2066 }
2067 if (lastLastIndex === string.length) {
2068 if (lastLength || !exec$2(separatorCopy, '')) push$4(output, '');
2069 } else push$4(output, stringSlice$5(string, lastLastIndex));
2070 return output.length > lim ? arraySlice$2(output, 0, lim) : output;
2071 };
2072 // Chakra, V8
2073 } else if ('0'.split(undefined, 0).length) {
2074 internalSplit = function (separator, limit) {
2075 return separator === undefined && limit === 0 ? [] : call$5(nativeSplit, this, separator, limit);
2076 };
2077 } else internalSplit = nativeSplit;
2078
2079 return [
2080 // `String.prototype.split` method
2081 // https://tc39.es/ecma262/#sec-string.prototype.split
2082 function split(separator, limit) {
2083 var O = requireObjectCoercible$6(this);
2084 var splitter = isNullOrUndefined$3(separator) ? undefined : getMethod$3(separator, SPLIT);
2085 return splitter
2086 ? call$5(splitter, separator, O, limit)
2087 : call$5(internalSplit, toString$b(O), separator, limit);
2088 },
2089 // `RegExp.prototype[@@split]` method
2090 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
2091 //
2092 // NOTE: This cannot be properly polyfilled in engines that don't support
2093 // the 'y' flag.
2094 function (string, limit) {
2095 var rx = anObject$5(this);
2096 var S = toString$b(string);
2097 var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
2098
2099 if (res.done) return res.value;
2100
2101 var C = speciesConstructor(rx, RegExp);
2102
2103 var unicodeMatching = rx.unicode;
2104 var flags = (rx.ignoreCase ? 'i' : '') +
2105 (rx.multiline ? 'm' : '') +
2106 (rx.unicode ? 'u' : '') +
2107 (UNSUPPORTED_Y$1 ? 'g' : 'y');
2108
2109 // ^(? + rx + ) is needed, in combination with some S slicing, to
2110 // simulate the 'y' flag.
2111 var splitter = new C(UNSUPPORTED_Y$1 ? '^(?:' + rx.source + ')' : rx, flags);
2112 var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
2113 if (lim === 0) return [];
2114 if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
2115 var p = 0;
2116 var q = 0;
2117 var A = [];
2118 while (q < S.length) {
2119 splitter.lastIndex = UNSUPPORTED_Y$1 ? 0 : q;
2120 var z = callRegExpExec(splitter, UNSUPPORTED_Y$1 ? stringSlice$5(S, q) : S);
2121 var e;
2122 if (
2123 z === null ||
2124 (e = min$4(toLength$4(splitter.lastIndex + (UNSUPPORTED_Y$1 ? q : 0)), S.length)) === p
2125 ) {
2126 q = advanceStringIndex$2(S, q, unicodeMatching);
2127 } else {
2128 push$4(A, stringSlice$5(S, p, q));
2129 if (A.length === lim) return A;
2130 for (var i = 1; i <= z.length - 1; i++) {
2131 push$4(A, z[i]);
2132 if (A.length === lim) return A;
2133 }
2134 q = p = e;
2135 }
2136 }
2137 push$4(A, stringSlice$5(S, p));
2138 return A;
2139 }
2140 ];
2141 }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y$1);
2142
2143 var DESCRIPTORS$5 = descriptors;
2144 var uncurryThis$h = functionUncurryThis;
2145 var objectKeys = objectKeys$3;
2146 var toIndexedObject$2 = toIndexedObject$8;
2147 var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
2148
2149 var propertyIsEnumerable = uncurryThis$h($propertyIsEnumerable);
2150 var push$3 = uncurryThis$h([].push);
2151
2152 // `Object.{ entries, values }` methods implementation
2153 var createMethod$1 = function (TO_ENTRIES) {
2154 return function (it) {
2155 var O = toIndexedObject$2(it);
2156 var keys = objectKeys(O);
2157 var length = keys.length;
2158 var i = 0;
2159 var result = [];
2160 var key;
2161 while (length > i) {
2162 key = keys[i++];
2163 if (!DESCRIPTORS$5 || propertyIsEnumerable(O, key)) {
2164 push$3(result, TO_ENTRIES ? [key, O[key]] : O[key]);
2165 }
2166 }
2167 return result;
2168 };
2169 };
2170
2171 var objectToArray = {
2172 // `Object.entries` method
2173 // https://tc39.es/ecma262/#sec-object.entries
2174 entries: createMethod$1(true),
2175 // `Object.values` method
2176 // https://tc39.es/ecma262/#sec-object.values
2177 values: createMethod$1(false)
2178 };
2179
2180 var $$j = _export;
2181 var $entries = objectToArray.entries;
2182
2183 // `Object.entries` method
2184 // https://tc39.es/ecma262/#sec-object.entries
2185 $$j({ target: 'Object', stat: true }, {
2186 entries: function entries(O) {
2187 return $entries(O);
2188 }
2189 });
2190
2191 var wellKnownSymbol$c = wellKnownSymbol$j;
2192 var create$1 = objectCreate;
2193 var defineProperty$5 = objectDefineProperty.f;
2194
2195 var UNSCOPABLES = wellKnownSymbol$c('unscopables');
2196 var ArrayPrototype = Array.prototype;
2197
2198 // Array.prototype[@@unscopables]
2199 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2200 if (ArrayPrototype[UNSCOPABLES] == undefined) {
2201 defineProperty$5(ArrayPrototype, UNSCOPABLES, {
2202 configurable: true,
2203 value: create$1(null)
2204 });
2205 }
2206
2207 // add a key to Array.prototype[@@unscopables]
2208 var addToUnscopables$4 = function (key) {
2209 ArrayPrototype[UNSCOPABLES][key] = true;
2210 };
2211
2212 var $$i = _export;
2213 var $includes = arrayIncludes.includes;
2214 var fails$c = fails$u;
2215 var addToUnscopables$3 = addToUnscopables$4;
2216
2217 // FF99+ bug
2218 var BROKEN_ON_SPARSE = fails$c(function () {
2219 // eslint-disable-next-line es/no-array-prototype-includes -- detection
2220 return !Array(1).includes();
2221 });
2222
2223 // `Array.prototype.includes` method
2224 // https://tc39.es/ecma262/#sec-array.prototype.includes
2225 $$i({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2226 includes: function includes(el /* , fromIndex = 0 */) {
2227 return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2228 }
2229 });
2230
2231 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2232 addToUnscopables$3('includes');
2233
2234 var classof$1 = classofRaw$2;
2235
2236 // `IsArray` abstract operation
2237 // https://tc39.es/ecma262/#sec-isarray
2238 // eslint-disable-next-line es/no-array-isarray -- safe
2239 var isArray$5 = Array.isArray || function isArray(argument) {
2240 return classof$1(argument) == 'Array';
2241 };
2242
2243 var $TypeError$4 = TypeError;
2244 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2245
2246 var doesNotExceedSafeInteger$2 = function (it) {
2247 if (it > MAX_SAFE_INTEGER) throw $TypeError$4('Maximum allowed index exceeded');
2248 return it;
2249 };
2250
2251 var isArray$4 = isArray$5;
2252 var isConstructor$1 = isConstructor$3;
2253 var isObject$4 = isObject$b;
2254 var wellKnownSymbol$b = wellKnownSymbol$j;
2255
2256 var SPECIES$3 = wellKnownSymbol$b('species');
2257 var $Array$1 = Array;
2258
2259 // a part of `ArraySpeciesCreate` abstract operation
2260 // https://tc39.es/ecma262/#sec-arrayspeciescreate
2261 var arraySpeciesConstructor$1 = function (originalArray) {
2262 var C;
2263 if (isArray$4(originalArray)) {
2264 C = originalArray.constructor;
2265 // cross-realm fallback
2266 if (isConstructor$1(C) && (C === $Array$1 || isArray$4(C.prototype))) C = undefined;
2267 else if (isObject$4(C)) {
2268 C = C[SPECIES$3];
2269 if (C === null) C = undefined;
2270 }
2271 } return C === undefined ? $Array$1 : C;
2272 };
2273
2274 var arraySpeciesConstructor = arraySpeciesConstructor$1;
2275
2276 // `ArraySpeciesCreate` abstract operation
2277 // https://tc39.es/ecma262/#sec-arrayspeciescreate
2278 var arraySpeciesCreate$3 = function (originalArray, length) {
2279 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2280 };
2281
2282 var fails$b = fails$u;
2283 var wellKnownSymbol$a = wellKnownSymbol$j;
2284 var V8_VERSION$1 = engineV8Version;
2285
2286 var SPECIES$2 = wellKnownSymbol$a('species');
2287
2288 var arrayMethodHasSpeciesSupport$5 = function (METHOD_NAME) {
2289 // We can't use this feature detection in V8 since it causes
2290 // deoptimization and serious performance degradation
2291 // https://github.com/zloirock/core-js/issues/677
2292 return V8_VERSION$1 >= 51 || !fails$b(function () {
2293 var array = [];
2294 var constructor = array.constructor = {};
2295 constructor[SPECIES$2] = function () {
2296 return { foo: 1 };
2297 };
2298 return array[METHOD_NAME](Boolean).foo !== 1;
2299 });
2300 };
2301
2302 var $$h = _export;
2303 var fails$a = fails$u;
2304 var isArray$3 = isArray$5;
2305 var isObject$3 = isObject$b;
2306 var toObject$6 = toObject$9;
2307 var lengthOfArrayLike$4 = lengthOfArrayLike$7;
2308 var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
2309 var createProperty$2 = createProperty$4;
2310 var arraySpeciesCreate$2 = arraySpeciesCreate$3;
2311 var arrayMethodHasSpeciesSupport$4 = arrayMethodHasSpeciesSupport$5;
2312 var wellKnownSymbol$9 = wellKnownSymbol$j;
2313 var V8_VERSION = engineV8Version;
2314
2315 var IS_CONCAT_SPREADABLE = wellKnownSymbol$9('isConcatSpreadable');
2316
2317 // We can't use this feature detection in V8 since it causes
2318 // deoptimization and serious performance degradation
2319 // https://github.com/zloirock/core-js/issues/679
2320 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$a(function () {
2321 var array = [];
2322 array[IS_CONCAT_SPREADABLE] = false;
2323 return array.concat()[0] !== array;
2324 });
2325
2326 var isConcatSpreadable = function (O) {
2327 if (!isObject$3(O)) return false;
2328 var spreadable = O[IS_CONCAT_SPREADABLE];
2329 return spreadable !== undefined ? !!spreadable : isArray$3(O);
2330 };
2331
2332 var FORCED$5 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$4('concat');
2333
2334 // `Array.prototype.concat` method
2335 // https://tc39.es/ecma262/#sec-array.prototype.concat
2336 // with adding support of @@isConcatSpreadable and @@species
2337 $$h({ target: 'Array', proto: true, arity: 1, forced: FORCED$5 }, {
2338 // eslint-disable-next-line no-unused-vars -- required for `.length`
2339 concat: function concat(arg) {
2340 var O = toObject$6(this);
2341 var A = arraySpeciesCreate$2(O, 0);
2342 var n = 0;
2343 var i, k, length, len, E;
2344 for (i = -1, length = arguments.length; i < length; i++) {
2345 E = i === -1 ? O : arguments[i];
2346 if (isConcatSpreadable(E)) {
2347 len = lengthOfArrayLike$4(E);
2348 doesNotExceedSafeInteger$1(n + len);
2349 for (k = 0; k < len; k++, n++) if (k in E) createProperty$2(A, n, E[k]);
2350 } else {
2351 doesNotExceedSafeInteger$1(n + 1);
2352 createProperty$2(A, n++, E);
2353 }
2354 }
2355 A.length = n;
2356 return A;
2357 }
2358 });
2359
2360 var uncurryThis$g = functionUncurryThisClause;
2361 var aCallable$2 = aCallable$4;
2362 var NATIVE_BIND = functionBindNative;
2363
2364 var bind$1 = uncurryThis$g(uncurryThis$g.bind);
2365
2366 // optional / simple context binding
2367 var functionBindContext = function (fn, that) {
2368 aCallable$2(fn);
2369 return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
2370 return fn.apply(that, arguments);
2371 };
2372 };
2373
2374 var bind = functionBindContext;
2375 var uncurryThis$f = functionUncurryThis;
2376 var IndexedObject = indexedObject;
2377 var toObject$5 = toObject$9;
2378 var lengthOfArrayLike$3 = lengthOfArrayLike$7;
2379 var arraySpeciesCreate$1 = arraySpeciesCreate$3;
2380
2381 var push$2 = uncurryThis$f([].push);
2382
2383 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2384 var createMethod = function (TYPE) {
2385 var IS_MAP = TYPE == 1;
2386 var IS_FILTER = TYPE == 2;
2387 var IS_SOME = TYPE == 3;
2388 var IS_EVERY = TYPE == 4;
2389 var IS_FIND_INDEX = TYPE == 6;
2390 var IS_FILTER_REJECT = TYPE == 7;
2391 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
2392 return function ($this, callbackfn, that, specificCreate) {
2393 var O = toObject$5($this);
2394 var self = IndexedObject(O);
2395 var boundFunction = bind(callbackfn, that);
2396 var length = lengthOfArrayLike$3(self);
2397 var index = 0;
2398 var create = specificCreate || arraySpeciesCreate$1;
2399 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
2400 var value, result;
2401 for (;length > index; index++) if (NO_HOLES || index in self) {
2402 value = self[index];
2403 result = boundFunction(value, index, O);
2404 if (TYPE) {
2405 if (IS_MAP) target[index] = result; // map
2406 else if (result) switch (TYPE) {
2407 case 3: return true; // some
2408 case 5: return value; // find
2409 case 6: return index; // findIndex
2410 case 2: push$2(target, value); // filter
2411 } else switch (TYPE) {
2412 case 4: return false; // every
2413 case 7: push$2(target, value); // filterReject
2414 }
2415 }
2416 }
2417 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
2418 };
2419 };
2420
2421 var arrayIteration = {
2422 // `Array.prototype.forEach` method
2423 // https://tc39.es/ecma262/#sec-array.prototype.foreach
2424 forEach: createMethod(0),
2425 // `Array.prototype.map` method
2426 // https://tc39.es/ecma262/#sec-array.prototype.map
2427 map: createMethod(1),
2428 // `Array.prototype.filter` method
2429 // https://tc39.es/ecma262/#sec-array.prototype.filter
2430 filter: createMethod(2),
2431 // `Array.prototype.some` method
2432 // https://tc39.es/ecma262/#sec-array.prototype.some
2433 some: createMethod(3),
2434 // `Array.prototype.every` method
2435 // https://tc39.es/ecma262/#sec-array.prototype.every
2436 every: createMethod(4),
2437 // `Array.prototype.find` method
2438 // https://tc39.es/ecma262/#sec-array.prototype.find
2439 find: createMethod(5),
2440 // `Array.prototype.findIndex` method
2441 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2442 findIndex: createMethod(6),
2443 // `Array.prototype.filterReject` method
2444 // https://github.com/tc39/proposal-array-filtering
2445 filterReject: createMethod(7)
2446 };
2447
2448 var $$g = _export;
2449 var $find = arrayIteration.find;
2450 var addToUnscopables$2 = addToUnscopables$4;
2451
2452 var FIND = 'find';
2453 var SKIPS_HOLES$1 = true;
2454
2455 // Shouldn't skip holes
2456 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES$1 = false; });
2457
2458 // `Array.prototype.find` method
2459 // https://tc39.es/ecma262/#sec-array.prototype.find
2460 $$g({ target: 'Array', proto: true, forced: SKIPS_HOLES$1 }, {
2461 find: function find(callbackfn /* , that = undefined */) {
2462 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2463 }
2464 });
2465
2466 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2467 addToUnscopables$2(FIND);
2468
2469 var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
2470 var classof = classof$6;
2471
2472 // `Object.prototype.toString` method implementation
2473 // https://tc39.es/ecma262/#sec-object.prototype.tostring
2474 var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
2475 return '[object ' + classof(this) + ']';
2476 };
2477
2478 var TO_STRING_TAG_SUPPORT = toStringTagSupport;
2479 var defineBuiltIn$4 = defineBuiltIn$7;
2480 var toString$a = objectToString;
2481
2482 // `Object.prototype.toString` method
2483 // https://tc39.es/ecma262/#sec-object.prototype.tostring
2484 if (!TO_STRING_TAG_SUPPORT) {
2485 defineBuiltIn$4(Object.prototype, 'toString', toString$a, { unsafe: true });
2486 }
2487
2488 var isRegExp$1 = isRegexp;
2489
2490 var $TypeError$3 = TypeError;
2491
2492 var notARegexp = function (it) {
2493 if (isRegExp$1(it)) {
2494 throw $TypeError$3("The method doesn't accept regular expressions");
2495 } return it;
2496 };
2497
2498 var wellKnownSymbol$8 = wellKnownSymbol$j;
2499
2500 var MATCH$1 = wellKnownSymbol$8('match');
2501
2502 var correctIsRegexpLogic = function (METHOD_NAME) {
2503 var regexp = /./;
2504 try {
2505 '/./'[METHOD_NAME](regexp);
2506 } catch (error1) {
2507 try {
2508 regexp[MATCH$1] = false;
2509 return '/./'[METHOD_NAME](regexp);
2510 } catch (error2) { /* empty */ }
2511 } return false;
2512 };
2513
2514 var $$f = _export;
2515 var uncurryThis$e = functionUncurryThis;
2516 var notARegExp$2 = notARegexp;
2517 var requireObjectCoercible$5 = requireObjectCoercible$b;
2518 var toString$9 = toString$f;
2519 var correctIsRegExpLogic$2 = correctIsRegexpLogic;
2520
2521 var stringIndexOf$2 = uncurryThis$e(''.indexOf);
2522
2523 // `String.prototype.includes` method
2524 // https://tc39.es/ecma262/#sec-string.prototype.includes
2525 $$f({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
2526 includes: function includes(searchString /* , position = 0 */) {
2527 return !!~stringIndexOf$2(
2528 toString$9(requireObjectCoercible$5(this)),
2529 toString$9(notARegExp$2(searchString)),
2530 arguments.length > 1 ? arguments[1] : undefined
2531 );
2532 }
2533 });
2534
2535 // iterable DOM collections
2536 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2537 var domIterables = {
2538 CSSRuleList: 0,
2539 CSSStyleDeclaration: 0,
2540 CSSValueList: 0,
2541 ClientRectList: 0,
2542 DOMRectList: 0,
2543 DOMStringList: 0,
2544 DOMTokenList: 1,
2545 DataTransferItemList: 0,
2546 FileList: 0,
2547 HTMLAllCollection: 0,
2548 HTMLCollection: 0,
2549 HTMLFormElement: 0,
2550 HTMLSelectElement: 0,
2551 MediaList: 0,
2552 MimeTypeArray: 0,
2553 NamedNodeMap: 0,
2554 NodeList: 1,
2555 PaintRequestList: 0,
2556 Plugin: 0,
2557 PluginArray: 0,
2558 SVGLengthList: 0,
2559 SVGNumberList: 0,
2560 SVGPathSegList: 0,
2561 SVGPointList: 0,
2562 SVGStringList: 0,
2563 SVGTransformList: 0,
2564 SourceBufferList: 0,
2565 StyleSheetList: 0,
2566 TextTrackCueList: 0,
2567 TextTrackList: 0,
2568 TouchList: 0
2569 };
2570
2571 // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2572 var documentCreateElement = documentCreateElement$2;
2573
2574 var classList = documentCreateElement('span').classList;
2575 var DOMTokenListPrototype$2 = classList && classList.constructor && classList.constructor.prototype;
2576
2577 var domTokenListPrototype = DOMTokenListPrototype$2 === Object.prototype ? undefined : DOMTokenListPrototype$2;
2578
2579 var $forEach = arrayIteration.forEach;
2580 var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
2581
2582 var STRICT_METHOD$1 = arrayMethodIsStrict$2('forEach');
2583
2584 // `Array.prototype.forEach` method implementation
2585 // https://tc39.es/ecma262/#sec-array.prototype.foreach
2586 var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
2587 return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
2588 // eslint-disable-next-line es/no-array-prototype-foreach -- safe
2589 } : [].forEach;
2590
2591 var global$7 = global$k;
2592 var DOMIterables$1 = domIterables;
2593 var DOMTokenListPrototype$1 = domTokenListPrototype;
2594 var forEach = arrayForEach;
2595 var createNonEnumerableProperty$3 = createNonEnumerableProperty$7;
2596
2597 var handlePrototype$1 = function (CollectionPrototype) {
2598 // some Chrome versions have non-configurable methods on DOMTokenList
2599 if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
2600 createNonEnumerableProperty$3(CollectionPrototype, 'forEach', forEach);
2601 } catch (error) {
2602 CollectionPrototype.forEach = forEach;
2603 }
2604 };
2605
2606 for (var COLLECTION_NAME$1 in DOMIterables$1) {
2607 if (DOMIterables$1[COLLECTION_NAME$1]) {
2608 handlePrototype$1(global$7[COLLECTION_NAME$1] && global$7[COLLECTION_NAME$1].prototype);
2609 }
2610 }
2611
2612 handlePrototype$1(DOMTokenListPrototype$1);
2613
2614 var global$6 = global$k;
2615 var fails$9 = fails$u;
2616 var uncurryThis$d = functionUncurryThis;
2617 var toString$8 = toString$f;
2618 var trim$2 = stringTrim.trim;
2619 var whitespaces$1 = whitespaces$4;
2620
2621 var charAt$2 = uncurryThis$d(''.charAt);
2622 var $parseFloat$1 = global$6.parseFloat;
2623 var Symbol$2 = global$6.Symbol;
2624 var ITERATOR$4 = Symbol$2 && Symbol$2.iterator;
2625 var FORCED$4 = 1 / $parseFloat$1(whitespaces$1 + '-0') !== -Infinity
2626 // MS Edge 18- broken with boxed symbols
2627 || (ITERATOR$4 && !fails$9(function () { $parseFloat$1(Object(ITERATOR$4)); }));
2628
2629 // `parseFloat` method
2630 // https://tc39.es/ecma262/#sec-parsefloat-string
2631 var numberParseFloat = FORCED$4 ? function parseFloat(string) {
2632 var trimmedString = trim$2(toString$8(string));
2633 var result = $parseFloat$1(trimmedString);
2634 return result === 0 && charAt$2(trimmedString, 0) == '-' ? -0 : result;
2635 } : $parseFloat$1;
2636
2637 var $$e = _export;
2638 var $parseFloat = numberParseFloat;
2639
2640 // `parseFloat` method
2641 // https://tc39.es/ecma262/#sec-parsefloat-string
2642 $$e({ global: true, forced: parseFloat != $parseFloat }, {
2643 parseFloat: $parseFloat
2644 });
2645
2646 var $$d = _export;
2647 var toObject$4 = toObject$9;
2648 var nativeKeys = objectKeys$3;
2649 var fails$8 = fails$u;
2650
2651 var FAILS_ON_PRIMITIVES = fails$8(function () { nativeKeys(1); });
2652
2653 // `Object.keys` method
2654 // https://tc39.es/ecma262/#sec-object.keys
2655 $$d({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
2656 keys: function keys(it) {
2657 return nativeKeys(toObject$4(it));
2658 }
2659 });
2660
2661 /* eslint-disable es/no-array-prototype-indexof -- required for testing */
2662 var $$c = _export;
2663 var uncurryThis$c = functionUncurryThisClause;
2664 var $indexOf = arrayIncludes.indexOf;
2665 var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
2666
2667 var nativeIndexOf = uncurryThis$c([].indexOf);
2668
2669 var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
2670 var FORCED$3 = NEGATIVE_ZERO || !arrayMethodIsStrict$1('indexOf');
2671
2672 // `Array.prototype.indexOf` method
2673 // https://tc39.es/ecma262/#sec-array.prototype.indexof
2674 $$c({ target: 'Array', proto: true, forced: FORCED$3 }, {
2675 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
2676 var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
2677 return NEGATIVE_ZERO
2678 // convert -0 to +0
2679 ? nativeIndexOf(this, searchElement, fromIndex) || 0
2680 : $indexOf(this, searchElement, fromIndex);
2681 }
2682 });
2683
2684 var tryToString = tryToString$3;
2685
2686 var $TypeError$2 = TypeError;
2687
2688 var deletePropertyOrThrow$2 = function (O, P) {
2689 if (!delete O[P]) throw $TypeError$2('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
2690 };
2691
2692 var arraySlice$1 = arraySliceSimple;
2693
2694 var floor$1 = Math.floor;
2695
2696 var mergeSort = function (array, comparefn) {
2697 var length = array.length;
2698 var middle = floor$1(length / 2);
2699 return length < 8 ? insertionSort(array, comparefn) : merge(
2700 array,
2701 mergeSort(arraySlice$1(array, 0, middle), comparefn),
2702 mergeSort(arraySlice$1(array, middle), comparefn),
2703 comparefn
2704 );
2705 };
2706
2707 var insertionSort = function (array, comparefn) {
2708 var length = array.length;
2709 var i = 1;
2710 var element, j;
2711
2712 while (i < length) {
2713 j = i;
2714 element = array[i];
2715 while (j && comparefn(array[j - 1], element) > 0) {
2716 array[j] = array[--j];
2717 }
2718 if (j !== i++) array[j] = element;
2719 } return array;
2720 };
2721
2722 var merge = function (array, left, right, comparefn) {
2723 var llength = left.length;
2724 var rlength = right.length;
2725 var lindex = 0;
2726 var rindex = 0;
2727
2728 while (lindex < llength || rindex < rlength) {
2729 array[lindex + rindex] = (lindex < llength && rindex < rlength)
2730 ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
2731 : lindex < llength ? left[lindex++] : right[rindex++];
2732 } return array;
2733 };
2734
2735 var arraySort = mergeSort;
2736
2737 var userAgent$1 = engineUserAgent;
2738
2739 var firefox = userAgent$1.match(/firefox\/(\d+)/i);
2740
2741 var engineFfVersion = !!firefox && +firefox[1];
2742
2743 var UA = engineUserAgent;
2744
2745 var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
2746
2747 var userAgent = engineUserAgent;
2748
2749 var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
2750
2751 var engineWebkitVersion = !!webkit && +webkit[1];
2752
2753 var $$b = _export;
2754 var uncurryThis$b = functionUncurryThis;
2755 var aCallable$1 = aCallable$4;
2756 var toObject$3 = toObject$9;
2757 var lengthOfArrayLike$2 = lengthOfArrayLike$7;
2758 var deletePropertyOrThrow$1 = deletePropertyOrThrow$2;
2759 var toString$7 = toString$f;
2760 var fails$7 = fails$u;
2761 var internalSort = arraySort;
2762 var arrayMethodIsStrict = arrayMethodIsStrict$4;
2763 var FF = engineFfVersion;
2764 var IE_OR_EDGE = engineIsIeOrEdge;
2765 var V8 = engineV8Version;
2766 var WEBKIT = engineWebkitVersion;
2767
2768 var test$1 = [];
2769 var nativeSort = uncurryThis$b(test$1.sort);
2770 var push$1 = uncurryThis$b(test$1.push);
2771
2772 // IE8-
2773 var FAILS_ON_UNDEFINED = fails$7(function () {
2774 test$1.sort(undefined);
2775 });
2776 // V8 bug
2777 var FAILS_ON_NULL = fails$7(function () {
2778 test$1.sort(null);
2779 });
2780 // Old WebKit
2781 var STRICT_METHOD = arrayMethodIsStrict('sort');
2782
2783 var STABLE_SORT = !fails$7(function () {
2784 // feature detection can be too slow, so check engines versions
2785 if (V8) return V8 < 70;
2786 if (FF && FF > 3) return;
2787 if (IE_OR_EDGE) return true;
2788 if (WEBKIT) return WEBKIT < 603;
2789
2790 var result = '';
2791 var code, chr, value, index;
2792
2793 // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
2794 for (code = 65; code < 76; code++) {
2795 chr = String.fromCharCode(code);
2796
2797 switch (code) {
2798 case 66: case 69: case 70: case 72: value = 3; break;
2799 case 68: case 71: value = 4; break;
2800 default: value = 2;
2801 }
2802
2803 for (index = 0; index < 47; index++) {
2804 test$1.push({ k: chr + index, v: value });
2805 }
2806 }
2807
2808 test$1.sort(function (a, b) { return b.v - a.v; });
2809
2810 for (index = 0; index < test$1.length; index++) {
2811 chr = test$1[index].k.charAt(0);
2812 if (result.charAt(result.length - 1) !== chr) result += chr;
2813 }
2814
2815 return result !== 'DGBEFHACIJK';
2816 });
2817
2818 var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
2819
2820 var getSortCompare = function (comparefn) {
2821 return function (x, y) {
2822 if (y === undefined) return -1;
2823 if (x === undefined) return 1;
2824 if (comparefn !== undefined) return +comparefn(x, y) || 0;
2825 return toString$7(x) > toString$7(y) ? 1 : -1;
2826 };
2827 };
2828
2829 // `Array.prototype.sort` method
2830 // https://tc39.es/ecma262/#sec-array.prototype.sort
2831 $$b({ target: 'Array', proto: true, forced: FORCED$2 }, {
2832 sort: function sort(comparefn) {
2833 if (comparefn !== undefined) aCallable$1(comparefn);
2834
2835 var array = toObject$3(this);
2836
2837 if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
2838
2839 var items = [];
2840 var arrayLength = lengthOfArrayLike$2(array);
2841 var itemsLength, index;
2842
2843 for (index = 0; index < arrayLength; index++) {
2844 if (index in array) push$1(items, array[index]);
2845 }
2846
2847 internalSort(items, getSortCompare(comparefn));
2848
2849 itemsLength = lengthOfArrayLike$2(items);
2850 index = 0;
2851
2852 while (index < itemsLength) array[index] = items[index++];
2853 while (index < arrayLength) deletePropertyOrThrow$1(array, index++);
2854
2855 return array;
2856 }
2857 });
2858
2859 var uncurryThis$a = functionUncurryThis;
2860 var toObject$2 = toObject$9;
2861
2862 var floor = Math.floor;
2863 var charAt$1 = uncurryThis$a(''.charAt);
2864 var replace$1 = uncurryThis$a(''.replace);
2865 var stringSlice$4 = uncurryThis$a(''.slice);
2866 // eslint-disable-next-line redos/no-vulnerable -- safe
2867 var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2868 var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2869
2870 // `GetSubstitution` abstract operation
2871 // https://tc39.es/ecma262/#sec-getsubstitution
2872 var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
2873 var tailPos = position + matched.length;
2874 var m = captures.length;
2875 var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2876 if (namedCaptures !== undefined) {
2877 namedCaptures = toObject$2(namedCaptures);
2878 symbols = SUBSTITUTION_SYMBOLS;
2879 }
2880 return replace$1(replacement, symbols, function (match, ch) {
2881 var capture;
2882 switch (charAt$1(ch, 0)) {
2883 case '$': return '$';
2884 case '&': return matched;
2885 case '`': return stringSlice$4(str, 0, position);
2886 case "'": return stringSlice$4(str, tailPos);
2887 case '<':
2888 capture = namedCaptures[stringSlice$4(ch, 1, -1)];
2889 break;
2890 default: // \d\d?
2891 var n = +ch;
2892 if (n === 0) return match;
2893 if (n > m) {
2894 var f = floor(n / 10);
2895 if (f === 0) return match;
2896 if (f <= m) return captures[f - 1] === undefined ? charAt$1(ch, 1) : captures[f - 1] + charAt$1(ch, 1);
2897 return match;
2898 }
2899 capture = captures[n - 1];
2900 }
2901 return capture === undefined ? '' : capture;
2902 });
2903 };
2904
2905 var apply = functionApply;
2906 var call$4 = functionCall;
2907 var uncurryThis$9 = functionUncurryThis;
2908 var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
2909 var fails$6 = fails$u;
2910 var anObject$4 = anObject$d;
2911 var isCallable$5 = isCallable$j;
2912 var isNullOrUndefined$2 = isNullOrUndefined$7;
2913 var toIntegerOrInfinity$1 = toIntegerOrInfinity$5;
2914 var toLength$3 = toLength$6;
2915 var toString$6 = toString$f;
2916 var requireObjectCoercible$4 = requireObjectCoercible$b;
2917 var advanceStringIndex$1 = advanceStringIndex$3;
2918 var getMethod$2 = getMethod$5;
2919 var getSubstitution = getSubstitution$1;
2920 var regExpExec$2 = regexpExecAbstract;
2921 var wellKnownSymbol$7 = wellKnownSymbol$j;
2922
2923 var REPLACE = wellKnownSymbol$7('replace');
2924 var max$2 = Math.max;
2925 var min$3 = Math.min;
2926 var concat = uncurryThis$9([].concat);
2927 var push = uncurryThis$9([].push);
2928 var stringIndexOf$1 = uncurryThis$9(''.indexOf);
2929 var stringSlice$3 = uncurryThis$9(''.slice);
2930
2931 var maybeToString = function (it) {
2932 return it === undefined ? it : String(it);
2933 };
2934
2935 // IE <= 11 replaces $0 with the whole match, as if it was $&
2936 // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2937 var REPLACE_KEEPS_$0 = (function () {
2938 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
2939 return 'a'.replace(/./, '$0') === '$0';
2940 })();
2941
2942 // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2943 var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2944 if (/./[REPLACE]) {
2945 return /./[REPLACE]('a', '$0') === '';
2946 }
2947 return false;
2948 })();
2949
2950 var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$6(function () {
2951 var re = /./;
2952 re.exec = function () {
2953 var result = [];
2954 result.groups = { a: '7' };
2955 return result;
2956 };
2957 // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
2958 return ''.replace(re, '$<a>') !== '7';
2959 });
2960
2961 // @@replace logic
2962 fixRegExpWellKnownSymbolLogic$2('replace', function (_, nativeReplace, maybeCallNative) {
2963 var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
2964
2965 return [
2966 // `String.prototype.replace` method
2967 // https://tc39.es/ecma262/#sec-string.prototype.replace
2968 function replace(searchValue, replaceValue) {
2969 var O = requireObjectCoercible$4(this);
2970 var replacer = isNullOrUndefined$2(searchValue) ? undefined : getMethod$2(searchValue, REPLACE);
2971 return replacer
2972 ? call$4(replacer, searchValue, O, replaceValue)
2973 : call$4(nativeReplace, toString$6(O), searchValue, replaceValue);
2974 },
2975 // `RegExp.prototype[@@replace]` method
2976 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2977 function (string, replaceValue) {
2978 var rx = anObject$4(this);
2979 var S = toString$6(string);
2980
2981 if (
2982 typeof replaceValue == 'string' &&
2983 stringIndexOf$1(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2984 stringIndexOf$1(replaceValue, '$<') === -1
2985 ) {
2986 var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
2987 if (res.done) return res.value;
2988 }
2989
2990 var functionalReplace = isCallable$5(replaceValue);
2991 if (!functionalReplace) replaceValue = toString$6(replaceValue);
2992
2993 var global = rx.global;
2994 if (global) {
2995 var fullUnicode = rx.unicode;
2996 rx.lastIndex = 0;
2997 }
2998 var results = [];
2999 while (true) {
3000 var result = regExpExec$2(rx, S);
3001 if (result === null) break;
3002
3003 push(results, result);
3004 if (!global) break;
3005
3006 var matchStr = toString$6(result[0]);
3007 if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$3(rx.lastIndex), fullUnicode);
3008 }
3009
3010 var accumulatedResult = '';
3011 var nextSourcePosition = 0;
3012 for (var i = 0; i < results.length; i++) {
3013 result = results[i];
3014
3015 var matched = toString$6(result[0]);
3016 var position = max$2(min$3(toIntegerOrInfinity$1(result.index), S.length), 0);
3017 var captures = [];
3018 // NOTE: This is equivalent to
3019 // captures = result.slice(1).map(maybeToString)
3020 // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
3021 // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
3022 // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
3023 for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
3024 var namedCaptures = result.groups;
3025 if (functionalReplace) {
3026 var replacerArgs = concat([matched], captures, position, S);
3027 if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
3028 var replacement = toString$6(apply(replaceValue, undefined, replacerArgs));
3029 } else {
3030 replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
3031 }
3032 if (position >= nextSourcePosition) {
3033 accumulatedResult += stringSlice$3(S, nextSourcePosition, position) + replacement;
3034 nextSourcePosition = position + matched.length;
3035 }
3036 }
3037 return accumulatedResult + stringSlice$3(S, nextSourcePosition);
3038 }
3039 ];
3040 }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
3041
3042 var $$a = _export;
3043 var $filter = arrayIteration.filter;
3044 var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$5;
3045
3046 var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport$3('filter');
3047
3048 // `Array.prototype.filter` method
3049 // https://tc39.es/ecma262/#sec-array.prototype.filter
3050 // with adding support of @@species
3051 $$a({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, {
3052 filter: function filter(callbackfn /* , thisArg */) {
3053 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3054 }
3055 });
3056
3057 // `SameValue` abstract operation
3058 // https://tc39.es/ecma262/#sec-samevalue
3059 // eslint-disable-next-line es/no-object-is -- safe
3060 var sameValue$1 = Object.is || function is(x, y) {
3061 // eslint-disable-next-line no-self-compare -- NaN check
3062 return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
3063 };
3064
3065 var call$3 = functionCall;
3066 var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
3067 var anObject$3 = anObject$d;
3068 var isNullOrUndefined$1 = isNullOrUndefined$7;
3069 var requireObjectCoercible$3 = requireObjectCoercible$b;
3070 var sameValue = sameValue$1;
3071 var toString$5 = toString$f;
3072 var getMethod$1 = getMethod$5;
3073 var regExpExec$1 = regexpExecAbstract;
3074
3075 // @@search logic
3076 fixRegExpWellKnownSymbolLogic$1('search', function (SEARCH, nativeSearch, maybeCallNative) {
3077 return [
3078 // `String.prototype.search` method
3079 // https://tc39.es/ecma262/#sec-string.prototype.search
3080 function search(regexp) {
3081 var O = requireObjectCoercible$3(this);
3082 var searcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, SEARCH);
3083 return searcher ? call$3(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString$5(O));
3084 },
3085 // `RegExp.prototype[@@search]` method
3086 // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
3087 function (string) {
3088 var rx = anObject$3(this);
3089 var S = toString$5(string);
3090 var res = maybeCallNative(nativeSearch, rx, S);
3091
3092 if (res.done) return res.value;
3093
3094 var previousLastIndex = rx.lastIndex;
3095 if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
3096 var result = regExpExec$1(rx, S);
3097 if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
3098 return result === null ? -1 : result.index;
3099 }
3100 ];
3101 });
3102
3103 var global$5 = global$k;
3104 var fails$5 = fails$u;
3105 var uncurryThis$8 = functionUncurryThis;
3106 var toString$4 = toString$f;
3107 var trim$1 = stringTrim.trim;
3108 var whitespaces = whitespaces$4;
3109
3110 var $parseInt$1 = global$5.parseInt;
3111 var Symbol$1 = global$5.Symbol;
3112 var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
3113 var hex = /^[+-]?0x/i;
3114 var exec$1 = uncurryThis$8(hex.exec);
3115 var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
3116 // MS Edge 18- broken with boxed symbols
3117 || (ITERATOR$3 && !fails$5(function () { $parseInt$1(Object(ITERATOR$3)); }));
3118
3119 // `parseInt` method
3120 // https://tc39.es/ecma262/#sec-parseint-string-radix
3121 var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
3122 var S = trim$1(toString$4(string));
3123 return $parseInt$1(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10));
3124 } : $parseInt$1;
3125
3126 var $$9 = _export;
3127 var $parseInt = numberParseInt;
3128
3129 // `parseInt` method
3130 // https://tc39.es/ecma262/#sec-parseint-string-radix
3131 $$9({ global: true, forced: parseInt != $parseInt }, {
3132 parseInt: $parseInt
3133 });
3134
3135 var $$8 = _export;
3136 var $map = arrayIteration.map;
3137 var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$5;
3138
3139 var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$2('map');
3140
3141 // `Array.prototype.map` method
3142 // https://tc39.es/ecma262/#sec-array.prototype.map
3143 // with adding support of @@species
3144 $$8({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
3145 map: function map(callbackfn /* , thisArg */) {
3146 return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3147 }
3148 });
3149
3150 var $$7 = _export;
3151 var $findIndex = arrayIteration.findIndex;
3152 var addToUnscopables$1 = addToUnscopables$4;
3153
3154 var FIND_INDEX = 'findIndex';
3155 var SKIPS_HOLES = true;
3156
3157 // Shouldn't skip holes
3158 if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
3159
3160 // `Array.prototype.findIndex` method
3161 // https://tc39.es/ecma262/#sec-array.prototype.findindex
3162 $$7({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
3163 findIndex: function findIndex(callbackfn /* , that = undefined */) {
3164 return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3165 }
3166 });
3167
3168 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3169 addToUnscopables$1(FIND_INDEX);
3170
3171 var uncurryThis$7 = functionUncurryThis;
3172 var aCallable = aCallable$4;
3173
3174 var functionUncurryThisAccessor = function (object, key, method) {
3175 try {
3176 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3177 return uncurryThis$7(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
3178 } catch (error) { /* empty */ }
3179 };
3180
3181 var isCallable$4 = isCallable$j;
3182
3183 var $String = String;
3184 var $TypeError$1 = TypeError;
3185
3186 var aPossiblePrototype$1 = function (argument) {
3187 if (typeof argument == 'object' || isCallable$4(argument)) return argument;
3188 throw $TypeError$1("Can't set " + $String(argument) + ' as a prototype');
3189 };
3190
3191 /* eslint-disable no-proto -- safe */
3192
3193 var uncurryThisAccessor = functionUncurryThisAccessor;
3194 var anObject$2 = anObject$d;
3195 var aPossiblePrototype = aPossiblePrototype$1;
3196
3197 // `Object.setPrototypeOf` method
3198 // https://tc39.es/ecma262/#sec-object.setprototypeof
3199 // Works with __proto__ only. Old v8 can't work with null proto objects.
3200 // eslint-disable-next-line es/no-object-setprototypeof -- safe
3201 var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
3202 var CORRECT_SETTER = false;
3203 var test = {};
3204 var setter;
3205 try {
3206 setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
3207 setter(test, []);
3208 CORRECT_SETTER = test instanceof Array;
3209 } catch (error) { /* empty */ }
3210 return function setPrototypeOf(O, proto) {
3211 anObject$2(O);
3212 aPossiblePrototype(proto);
3213 if (CORRECT_SETTER) setter(O, proto);
3214 else O.__proto__ = proto;
3215 return O;
3216 };
3217 }() : undefined);
3218
3219 var isCallable$3 = isCallable$j;
3220 var isObject$2 = isObject$b;
3221 var setPrototypeOf$1 = objectSetPrototypeOf;
3222
3223 // makes subclassing work correct for wrapped built-ins
3224 var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
3225 var NewTarget, NewTargetPrototype;
3226 if (
3227 // it can work only with native `setPrototypeOf`
3228 setPrototypeOf$1 &&
3229 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3230 isCallable$3(NewTarget = dummy.constructor) &&
3231 NewTarget !== Wrapper &&
3232 isObject$2(NewTargetPrototype = NewTarget.prototype) &&
3233 NewTargetPrototype !== Wrapper.prototype
3234 ) setPrototypeOf$1($this, NewTargetPrototype);
3235 return $this;
3236 };
3237
3238 var call$2 = functionCall;
3239 var hasOwn$4 = hasOwnProperty_1;
3240 var isPrototypeOf$2 = objectIsPrototypeOf;
3241 var regExpFlags = regexpFlags$1;
3242
3243 var RegExpPrototype$2 = RegExp.prototype;
3244
3245 var regexpGetFlags = function (R) {
3246 var flags = R.flags;
3247 return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$4(R, 'flags') && isPrototypeOf$2(RegExpPrototype$2, R)
3248 ? call$2(regExpFlags, R) : flags;
3249 };
3250
3251 var defineProperty$4 = objectDefineProperty.f;
3252
3253 var proxyAccessor$1 = function (Target, Source, key) {
3254 key in Target || defineProperty$4(Target, key, {
3255 configurable: true,
3256 get: function () { return Source[key]; },
3257 set: function (it) { Source[key] = it; }
3258 });
3259 };
3260
3261 var makeBuiltIn = makeBuiltInExports;
3262 var defineProperty$3 = objectDefineProperty;
3263
3264 var defineBuiltInAccessor$1 = function (target, name, descriptor) {
3265 if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
3266 if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
3267 return defineProperty$3.f(target, name, descriptor);
3268 };
3269
3270 var getBuiltIn = getBuiltIn$5;
3271 var defineBuiltInAccessor = defineBuiltInAccessor$1;
3272 var wellKnownSymbol$6 = wellKnownSymbol$j;
3273 var DESCRIPTORS$4 = descriptors;
3274
3275 var SPECIES$1 = wellKnownSymbol$6('species');
3276
3277 var setSpecies$1 = function (CONSTRUCTOR_NAME) {
3278 var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
3279
3280 if (DESCRIPTORS$4 && Constructor && !Constructor[SPECIES$1]) {
3281 defineBuiltInAccessor(Constructor, SPECIES$1, {
3282 configurable: true,
3283 get: function () { return this; }
3284 });
3285 }
3286 };
3287
3288 var DESCRIPTORS$3 = descriptors;
3289 var global$4 = global$k;
3290 var uncurryThis$6 = functionUncurryThis;
3291 var isForced$1 = isForced_1;
3292 var inheritIfRequired$1 = inheritIfRequired$2;
3293 var createNonEnumerableProperty$2 = createNonEnumerableProperty$7;
3294 var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
3295 var isPrototypeOf$1 = objectIsPrototypeOf;
3296 var isRegExp = isRegexp;
3297 var toString$3 = toString$f;
3298 var getRegExpFlags$1 = regexpGetFlags;
3299 var stickyHelpers = regexpStickyHelpers;
3300 var proxyAccessor = proxyAccessor$1;
3301 var defineBuiltIn$3 = defineBuiltIn$7;
3302 var fails$4 = fails$u;
3303 var hasOwn$3 = hasOwnProperty_1;
3304 var enforceInternalState = internalState.enforce;
3305 var setSpecies = setSpecies$1;
3306 var wellKnownSymbol$5 = wellKnownSymbol$j;
3307 var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
3308 var UNSUPPORTED_NCG = regexpUnsupportedNcg;
3309
3310 var MATCH = wellKnownSymbol$5('match');
3311 var NativeRegExp = global$4.RegExp;
3312 var RegExpPrototype$1 = NativeRegExp.prototype;
3313 var SyntaxError = global$4.SyntaxError;
3314 var exec = uncurryThis$6(RegExpPrototype$1.exec);
3315 var charAt = uncurryThis$6(''.charAt);
3316 var replace = uncurryThis$6(''.replace);
3317 var stringIndexOf = uncurryThis$6(''.indexOf);
3318 var stringSlice$2 = uncurryThis$6(''.slice);
3319 // TODO: Use only proper RegExpIdentifierName
3320 var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
3321 var re1 = /a/g;
3322 var re2 = /a/g;
3323
3324 // "new" should create a new object, old webkit bug
3325 var CORRECT_NEW = new NativeRegExp(re1) !== re1;
3326
3327 var MISSED_STICKY = stickyHelpers.MISSED_STICKY;
3328 var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
3329
3330 var BASE_FORCED = DESCRIPTORS$3 &&
3331 (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails$4(function () {
3332 re2[MATCH] = false;
3333 // RegExp constructor can alter flags and IsRegExp works correct with @@match
3334 return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
3335 }));
3336
3337 var handleDotAll = function (string) {
3338 var length = string.length;
3339 var index = 0;
3340 var result = '';
3341 var brackets = false;
3342 var chr;
3343 for (; index <= length; index++) {
3344 chr = charAt(string, index);
3345 if (chr === '\\') {
3346 result += chr + charAt(string, ++index);
3347 continue;
3348 }
3349 if (!brackets && chr === '.') {
3350 result += '[\\s\\S]';
3351 } else {
3352 if (chr === '[') {
3353 brackets = true;
3354 } else if (chr === ']') {
3355 brackets = false;
3356 } result += chr;
3357 }
3358 } return result;
3359 };
3360
3361 var handleNCG = function (string) {
3362 var length = string.length;
3363 var index = 0;
3364 var result = '';
3365 var named = [];
3366 var names = {};
3367 var brackets = false;
3368 var ncg = false;
3369 var groupid = 0;
3370 var groupname = '';
3371 var chr;
3372 for (; index <= length; index++) {
3373 chr = charAt(string, index);
3374 if (chr === '\\') {
3375 chr = chr + charAt(string, ++index);
3376 } else if (chr === ']') {
3377 brackets = false;
3378 } else if (!brackets) switch (true) {
3379 case chr === '[':
3380 brackets = true;
3381 break;
3382 case chr === '(':
3383 if (exec(IS_NCG, stringSlice$2(string, index + 1))) {
3384 index += 2;
3385 ncg = true;
3386 }
3387 result += chr;
3388 groupid++;
3389 continue;
3390 case chr === '>' && ncg:
3391 if (groupname === '' || hasOwn$3(names, groupname)) {
3392 throw new SyntaxError('Invalid capture group name');
3393 }
3394 names[groupname] = true;
3395 named[named.length] = [groupname, groupid];
3396 ncg = false;
3397 groupname = '';
3398 continue;
3399 }
3400 if (ncg) groupname += chr;
3401 else result += chr;
3402 } return [result, named];
3403 };
3404
3405 // `RegExp` constructor
3406 // https://tc39.es/ecma262/#sec-regexp-constructor
3407 if (isForced$1('RegExp', BASE_FORCED)) {
3408 var RegExpWrapper = function RegExp(pattern, flags) {
3409 var thisIsRegExp = isPrototypeOf$1(RegExpPrototype$1, this);
3410 var patternIsRegExp = isRegExp(pattern);
3411 var flagsAreUndefined = flags === undefined;
3412 var groups = [];
3413 var rawPattern = pattern;
3414 var rawFlags, dotAll, sticky, handled, result, state;
3415
3416 if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
3417 return pattern;
3418 }
3419
3420 if (patternIsRegExp || isPrototypeOf$1(RegExpPrototype$1, pattern)) {
3421 pattern = pattern.source;
3422 if (flagsAreUndefined) flags = getRegExpFlags$1(rawPattern);
3423 }
3424
3425 pattern = pattern === undefined ? '' : toString$3(pattern);
3426 flags = flags === undefined ? '' : toString$3(flags);
3427 rawPattern = pattern;
3428
3429 if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {
3430 dotAll = !!flags && stringIndexOf(flags, 's') > -1;
3431 if (dotAll) flags = replace(flags, /s/g, '');
3432 }
3433
3434 rawFlags = flags;
3435
3436 if (MISSED_STICKY && 'sticky' in re1) {
3437 sticky = !!flags && stringIndexOf(flags, 'y') > -1;
3438 if (sticky && UNSUPPORTED_Y) flags = replace(flags, /y/g, '');
3439 }
3440
3441 if (UNSUPPORTED_NCG) {
3442 handled = handleNCG(pattern);
3443 pattern = handled[0];
3444 groups = handled[1];
3445 }
3446
3447 result = inheritIfRequired$1(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper);
3448
3449 if (dotAll || sticky || groups.length) {
3450 state = enforceInternalState(result);
3451 if (dotAll) {
3452 state.dotAll = true;
3453 state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
3454 }
3455 if (sticky) state.sticky = true;
3456 if (groups.length) state.groups = groups;
3457 }
3458
3459 if (pattern !== rawPattern) try {
3460 // fails in old engines, but we have no alternatives for unsupported regex syntax
3461 createNonEnumerableProperty$2(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
3462 } catch (error) { /* empty */ }
3463
3464 return result;
3465 };
3466
3467 for (var keys = getOwnPropertyNames$1(NativeRegExp), index = 0; keys.length > index;) {
3468 proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
3469 }
3470
3471 RegExpPrototype$1.constructor = RegExpWrapper;
3472 RegExpWrapper.prototype = RegExpPrototype$1;
3473 defineBuiltIn$3(global$4, 'RegExp', RegExpWrapper, { constructor: true });
3474 }
3475
3476 // https://tc39.es/ecma262/#sec-get-regexp-@@species
3477 setSpecies('RegExp');
3478
3479 var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
3480 var defineBuiltIn$2 = defineBuiltIn$7;
3481 var anObject$1 = anObject$d;
3482 var $toString = toString$f;
3483 var fails$3 = fails$u;
3484 var getRegExpFlags = regexpGetFlags;
3485
3486 var TO_STRING = 'toString';
3487 var RegExpPrototype = RegExp.prototype;
3488 var nativeToString = RegExpPrototype[TO_STRING];
3489
3490 var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3491 // FF44- RegExp#toString has a wrong name
3492 var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name != TO_STRING;
3493
3494 // `RegExp.prototype.toString` method
3495 // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
3496 if (NOT_GENERIC || INCORRECT_NAME) {
3497 defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
3498 var R = anObject$1(this);
3499 var pattern = $toString(R.source);
3500 var flags = $toString(getRegExpFlags(R));
3501 return '/' + pattern + '/' + flags;
3502 }, { unsafe: true });
3503 }
3504
3505 var uncurryThis$5 = functionUncurryThis;
3506
3507 var arraySlice = uncurryThis$5([].slice);
3508
3509 var $$6 = _export;
3510 var isArray$2 = isArray$5;
3511 var isConstructor = isConstructor$3;
3512 var isObject$1 = isObject$b;
3513 var toAbsoluteIndex$1 = toAbsoluteIndex$4;
3514 var lengthOfArrayLike$1 = lengthOfArrayLike$7;
3515 var toIndexedObject$1 = toIndexedObject$8;
3516 var createProperty$1 = createProperty$4;
3517 var wellKnownSymbol$4 = wellKnownSymbol$j;
3518 var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$5;
3519 var nativeSlice = arraySlice;
3520
3521 var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
3522
3523 var SPECIES = wellKnownSymbol$4('species');
3524 var $Array = Array;
3525 var max$1 = Math.max;
3526
3527 // `Array.prototype.slice` method
3528 // https://tc39.es/ecma262/#sec-array.prototype.slice
3529 // fallback for not array-like ES3 strings and DOM objects
3530 $$6({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
3531 slice: function slice(start, end) {
3532 var O = toIndexedObject$1(this);
3533 var length = lengthOfArrayLike$1(O);
3534 var k = toAbsoluteIndex$1(start, length);
3535 var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
3536 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
3537 var Constructor, result, n;
3538 if (isArray$2(O)) {
3539 Constructor = O.constructor;
3540 // cross-realm fallback
3541 if (isConstructor(Constructor) && (Constructor === $Array || isArray$2(Constructor.prototype))) {
3542 Constructor = undefined;
3543 } else if (isObject$1(Constructor)) {
3544 Constructor = Constructor[SPECIES];
3545 if (Constructor === null) Constructor = undefined;
3546 }
3547 if (Constructor === $Array || Constructor === undefined) {
3548 return nativeSlice(O, k, fin);
3549 }
3550 }
3551 result = new (Constructor === undefined ? $Array : Constructor)(max$1(fin - k, 0));
3552 for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]);
3553 result.length = n;
3554 return result;
3555 }
3556 });
3557
3558 var iterators = {};
3559
3560 var fails$2 = fails$u;
3561
3562 var correctPrototypeGetter = !fails$2(function () {
3563 function F() { /* empty */ }
3564 F.prototype.constructor = null;
3565 // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
3566 return Object.getPrototypeOf(new F()) !== F.prototype;
3567 });
3568
3569 var hasOwn$2 = hasOwnProperty_1;
3570 var isCallable$2 = isCallable$j;
3571 var toObject$1 = toObject$9;
3572 var sharedKey = sharedKey$3;
3573 var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
3574
3575 var IE_PROTO = sharedKey('IE_PROTO');
3576 var $Object = Object;
3577 var ObjectPrototype = $Object.prototype;
3578
3579 // `Object.getPrototypeOf` method
3580 // https://tc39.es/ecma262/#sec-object.getprototypeof
3581 // eslint-disable-next-line es/no-object-getprototypeof -- safe
3582 var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
3583 var object = toObject$1(O);
3584 if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
3585 var constructor = object.constructor;
3586 if (isCallable$2(constructor) && object instanceof constructor) {
3587 return constructor.prototype;
3588 } return object instanceof $Object ? ObjectPrototype : null;
3589 };
3590
3591 var fails$1 = fails$u;
3592 var isCallable$1 = isCallable$j;
3593 var isObject = isObject$b;
3594 var getPrototypeOf$1 = objectGetPrototypeOf;
3595 var defineBuiltIn$1 = defineBuiltIn$7;
3596 var wellKnownSymbol$3 = wellKnownSymbol$j;
3597
3598 var ITERATOR$2 = wellKnownSymbol$3('iterator');
3599 var BUGGY_SAFARI_ITERATORS$1 = false;
3600
3601 // `%IteratorPrototype%` object
3602 // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
3603 var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
3604
3605 /* eslint-disable es/no-array-prototype-keys -- safe */
3606 if ([].keys) {
3607 arrayIterator = [].keys();
3608 // Safari 8 has buggy iterators w/o `next`
3609 if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
3610 else {
3611 PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
3612 if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
3613 }
3614 }
3615
3616 var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$1(function () {
3617 var test = {};
3618 // FF44- legacy iterators case
3619 return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
3620 });
3621
3622 if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
3623
3624 // `%IteratorPrototype%[@@iterator]()` method
3625 // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
3626 if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
3627 defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
3628 return this;
3629 });
3630 }
3631
3632 var iteratorsCore = {
3633 IteratorPrototype: IteratorPrototype$2,
3634 BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
3635 };
3636
3637 var defineProperty$2 = objectDefineProperty.f;
3638 var hasOwn$1 = hasOwnProperty_1;
3639 var wellKnownSymbol$2 = wellKnownSymbol$j;
3640
3641 var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
3642
3643 var setToStringTag$2 = function (target, TAG, STATIC) {
3644 if (target && !STATIC) target = target.prototype;
3645 if (target && !hasOwn$1(target, TO_STRING_TAG$1)) {
3646 defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
3647 }
3648 };
3649
3650 var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
3651 var create = objectCreate;
3652 var createPropertyDescriptor = createPropertyDescriptor$4;
3653 var setToStringTag$1 = setToStringTag$2;
3654 var Iterators$2 = iterators;
3655
3656 var returnThis$1 = function () { return this; };
3657
3658 var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
3659 var TO_STRING_TAG = NAME + ' Iterator';
3660 IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
3661 setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
3662 Iterators$2[TO_STRING_TAG] = returnThis$1;
3663 return IteratorConstructor;
3664 };
3665
3666 var $$5 = _export;
3667 var call$1 = functionCall;
3668 var FunctionName = functionName;
3669 var isCallable = isCallable$j;
3670 var createIteratorConstructor = iteratorCreateConstructor;
3671 var getPrototypeOf = objectGetPrototypeOf;
3672 var setPrototypeOf = objectSetPrototypeOf;
3673 var setToStringTag = setToStringTag$2;
3674 var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
3675 var defineBuiltIn = defineBuiltIn$7;
3676 var wellKnownSymbol$1 = wellKnownSymbol$j;
3677 var Iterators$1 = iterators;
3678 var IteratorsCore = iteratorsCore;
3679
3680 var PROPER_FUNCTION_NAME = FunctionName.PROPER;
3681 var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
3682 var IteratorPrototype = IteratorsCore.IteratorPrototype;
3683 var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
3684 var ITERATOR$1 = wellKnownSymbol$1('iterator');
3685 var KEYS = 'keys';
3686 var VALUES = 'values';
3687 var ENTRIES = 'entries';
3688
3689 var returnThis = function () { return this; };
3690
3691 var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
3692 createIteratorConstructor(IteratorConstructor, NAME, next);
3693
3694 var getIterationMethod = function (KIND) {
3695 if (KIND === DEFAULT && defaultIterator) return defaultIterator;
3696 if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
3697 switch (KIND) {
3698 case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
3699 case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
3700 case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
3701 } return function () { return new IteratorConstructor(this); };
3702 };
3703
3704 var TO_STRING_TAG = NAME + ' Iterator';
3705 var INCORRECT_VALUES_NAME = false;
3706 var IterablePrototype = Iterable.prototype;
3707 var nativeIterator = IterablePrototype[ITERATOR$1]
3708 || IterablePrototype['@@iterator']
3709 || DEFAULT && IterablePrototype[DEFAULT];
3710 var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
3711 var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
3712 var CurrentIteratorPrototype, methods, KEY;
3713
3714 // fix native
3715 if (anyNativeIterator) {
3716 CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
3717 if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
3718 if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
3719 if (setPrototypeOf) {
3720 setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
3721 } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
3722 defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
3723 }
3724 }
3725 // Set @@toStringTag to native iterators
3726 setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
3727 }
3728 }
3729
3730 // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
3731 if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3732 if (CONFIGURABLE_FUNCTION_NAME) {
3733 createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
3734 } else {
3735 INCORRECT_VALUES_NAME = true;
3736 defaultIterator = function values() { return call$1(nativeIterator, this); };
3737 }
3738 }
3739
3740 // export additional methods
3741 if (DEFAULT) {
3742 methods = {
3743 values: getIterationMethod(VALUES),
3744 keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
3745 entries: getIterationMethod(ENTRIES)
3746 };
3747 if (FORCED) for (KEY in methods) {
3748 if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
3749 defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
3750 }
3751 } else $$5({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3752 }
3753
3754 // define iterator
3755 if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
3756 defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
3757 }
3758 Iterators$1[NAME] = defaultIterator;
3759
3760 return methods;
3761 };
3762
3763 // `CreateIterResultObject` abstract operation
3764 // https://tc39.es/ecma262/#sec-createiterresultobject
3765 var createIterResultObject$1 = function (value, done) {
3766 return { value: value, done: done };
3767 };
3768
3769 var toIndexedObject = toIndexedObject$8;
3770 var addToUnscopables = addToUnscopables$4;
3771 var Iterators = iterators;
3772 var InternalStateModule = internalState;
3773 var defineProperty$1 = objectDefineProperty.f;
3774 var defineIterator = iteratorDefine;
3775 var createIterResultObject = createIterResultObject$1;
3776 var DESCRIPTORS$2 = descriptors;
3777
3778 var ARRAY_ITERATOR = 'Array Iterator';
3779 var setInternalState = InternalStateModule.set;
3780 var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
3781
3782 // `Array.prototype.entries` method
3783 // https://tc39.es/ecma262/#sec-array.prototype.entries
3784 // `Array.prototype.keys` method
3785 // https://tc39.es/ecma262/#sec-array.prototype.keys
3786 // `Array.prototype.values` method
3787 // https://tc39.es/ecma262/#sec-array.prototype.values
3788 // `Array.prototype[@@iterator]` method
3789 // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
3790 // `CreateArrayIterator` internal method
3791 // https://tc39.es/ecma262/#sec-createarrayiterator
3792 var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
3793 setInternalState(this, {
3794 type: ARRAY_ITERATOR,
3795 target: toIndexedObject(iterated), // target
3796 index: 0, // next index
3797 kind: kind // kind
3798 });
3799 // `%ArrayIteratorPrototype%.next` method
3800 // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
3801 }, function () {
3802 var state = getInternalState(this);
3803 var target = state.target;
3804 var kind = state.kind;
3805 var index = state.index++;
3806 if (!target || index >= target.length) {
3807 state.target = undefined;
3808 return createIterResultObject(undefined, true);
3809 }
3810 if (kind == 'keys') return createIterResultObject(index, false);
3811 if (kind == 'values') return createIterResultObject(target[index], false);
3812 return createIterResultObject([index, target[index]], false);
3813 }, 'values');
3814
3815 // argumentsList[@@iterator] is %ArrayProto_values%
3816 // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
3817 // https://tc39.es/ecma262/#sec-createmappedargumentsobject
3818 var values = Iterators.Arguments = Iterators.Array;
3819
3820 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3821 addToUnscopables('keys');
3822 addToUnscopables('values');
3823 addToUnscopables('entries');
3824
3825 // V8 ~ Chrome 45- bug
3826 if (DESCRIPTORS$2 && values.name !== 'values') try {
3827 defineProperty$1(values, 'name', { value: 'values' });
3828 } catch (error) { /* empty */ }
3829
3830 var global$3 = global$k;
3831 var DOMIterables = domIterables;
3832 var DOMTokenListPrototype = domTokenListPrototype;
3833 var ArrayIteratorMethods = es_array_iterator;
3834 var createNonEnumerableProperty = createNonEnumerableProperty$7;
3835 var wellKnownSymbol = wellKnownSymbol$j;
3836
3837 var ITERATOR = wellKnownSymbol('iterator');
3838 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3839 var ArrayValues = ArrayIteratorMethods.values;
3840
3841 var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3842 if (CollectionPrototype) {
3843 // some Chrome versions have non-configurable methods on DOMTokenList
3844 if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
3845 createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
3846 } catch (error) {
3847 CollectionPrototype[ITERATOR] = ArrayValues;
3848 }
3849 if (!CollectionPrototype[TO_STRING_TAG]) {
3850 createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
3851 }
3852 if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3853 // some Chrome versions have non-configurable methods on DOMTokenList
3854 if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3855 createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3856 } catch (error) {
3857 CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3858 }
3859 }
3860 }
3861 };
3862
3863 for (var COLLECTION_NAME in DOMIterables) {
3864 handlePrototype(global$3[COLLECTION_NAME] && global$3[COLLECTION_NAME].prototype, COLLECTION_NAME);
3865 }
3866
3867 handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3868
3869 var DESCRIPTORS$1 = descriptors;
3870 var isArray$1 = isArray$5;
3871
3872 var $TypeError = TypeError;
3873 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3874 var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
3875
3876 // Safari < 13 does not throw an error in this case
3877 var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$1 && !function () {
3878 // makes no sense without proper strict mode support
3879 if (this !== undefined) return true;
3880 try {
3881 // eslint-disable-next-line es/no-object-defineproperty -- safe
3882 Object.defineProperty([], 'length', { writable: false }).length = 1;
3883 } catch (error) {
3884 return error instanceof TypeError;
3885 }
3886 }();
3887
3888 var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
3889 if (isArray$1(O) && !getOwnPropertyDescriptor$3(O, 'length').writable) {
3890 throw $TypeError('Cannot set read only .length');
3891 } return O.length = length;
3892 } : function (O, length) {
3893 return O.length = length;
3894 };
3895
3896 var $$4 = _export;
3897 var toObject = toObject$9;
3898 var toAbsoluteIndex = toAbsoluteIndex$4;
3899 var toIntegerOrInfinity = toIntegerOrInfinity$5;
3900 var lengthOfArrayLike = lengthOfArrayLike$7;
3901 var setArrayLength = arraySetLength;
3902 var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
3903 var arraySpeciesCreate = arraySpeciesCreate$3;
3904 var createProperty = createProperty$4;
3905 var deletePropertyOrThrow = deletePropertyOrThrow$2;
3906 var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$5;
3907
3908 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
3909
3910 var max = Math.max;
3911 var min$2 = Math.min;
3912
3913 // `Array.prototype.splice` method
3914 // https://tc39.es/ecma262/#sec-array.prototype.splice
3915 // with adding support of @@species
3916 $$4({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
3917 splice: function splice(start, deleteCount /* , ...items */) {
3918 var O = toObject(this);
3919 var len = lengthOfArrayLike(O);
3920 var actualStart = toAbsoluteIndex(start, len);
3921 var argumentsLength = arguments.length;
3922 var insertCount, actualDeleteCount, A, k, from, to;
3923 if (argumentsLength === 0) {
3924 insertCount = actualDeleteCount = 0;
3925 } else if (argumentsLength === 1) {
3926 insertCount = 0;
3927 actualDeleteCount = len - actualStart;
3928 } else {
3929 insertCount = argumentsLength - 2;
3930 actualDeleteCount = min$2(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
3931 }
3932 doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
3933 A = arraySpeciesCreate(O, actualDeleteCount);
3934 for (k = 0; k < actualDeleteCount; k++) {
3935 from = actualStart + k;
3936 if (from in O) createProperty(A, k, O[from]);
3937 }
3938 A.length = actualDeleteCount;
3939 if (insertCount < actualDeleteCount) {
3940 for (k = actualStart; k < len - actualDeleteCount; k++) {
3941 from = k + actualDeleteCount;
3942 to = k + insertCount;
3943 if (from in O) O[to] = O[from];
3944 else deletePropertyOrThrow(O, to);
3945 }
3946 for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
3947 } else if (insertCount > actualDeleteCount) {
3948 for (k = len - actualDeleteCount; k > actualStart; k--) {
3949 from = k + actualDeleteCount - 1;
3950 to = k + insertCount - 1;
3951 if (from in O) O[to] = O[from];
3952 else deletePropertyOrThrow(O, to);
3953 }
3954 }
3955 for (k = 0; k < insertCount; k++) {
3956 O[k + actualStart] = arguments[k + 2];
3957 }
3958 setArrayLength(O, len - actualDeleteCount + insertCount);
3959 return A;
3960 }
3961 });
3962
3963 var global$2 = global$k;
3964
3965 var path$1 = global$2;
3966
3967 var uncurryThis$4 = functionUncurryThis;
3968
3969 // `thisNumberValue` abstract operation
3970 // https://tc39.es/ecma262/#sec-thisnumbervalue
3971 var thisNumberValue$1 = uncurryThis$4(1.0.valueOf);
3972
3973 var $$3 = _export;
3974 var IS_PURE = isPure;
3975 var DESCRIPTORS = descriptors;
3976 var global$1 = global$k;
3977 var path = path$1;
3978 var uncurryThis$3 = functionUncurryThis;
3979 var isForced = isForced_1;
3980 var hasOwn = hasOwnProperty_1;
3981 var inheritIfRequired = inheritIfRequired$2;
3982 var isPrototypeOf = objectIsPrototypeOf;
3983 var isSymbol = isSymbol$3;
3984 var toPrimitive = toPrimitive$2;
3985 var fails = fails$u;
3986 var getOwnPropertyNames = objectGetOwnPropertyNames.f;
3987 var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
3988 var defineProperty = objectDefineProperty.f;
3989 var thisNumberValue = thisNumberValue$1;
3990 var trim = stringTrim.trim;
3991
3992 var NUMBER = 'Number';
3993 var NativeNumber = global$1[NUMBER];
3994 path[NUMBER];
3995 var NumberPrototype = NativeNumber.prototype;
3996 var TypeError$1 = global$1.TypeError;
3997 var stringSlice$1 = uncurryThis$3(''.slice);
3998 var charCodeAt = uncurryThis$3(''.charCodeAt);
3999
4000 // `ToNumeric` abstract operation
4001 // https://tc39.es/ecma262/#sec-tonumeric
4002 var toNumeric = function (value) {
4003 var primValue = toPrimitive(value, 'number');
4004 return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
4005 };
4006
4007 // `ToNumber` abstract operation
4008 // https://tc39.es/ecma262/#sec-tonumber
4009 var toNumber = function (argument) {
4010 var it = toPrimitive(argument, 'number');
4011 var first, third, radix, maxCode, digits, length, index, code;
4012 if (isSymbol(it)) throw TypeError$1('Cannot convert a Symbol value to a number');
4013 if (typeof it == 'string' && it.length > 2) {
4014 it = trim(it);
4015 first = charCodeAt(it, 0);
4016 if (first === 43 || first === 45) {
4017 third = charCodeAt(it, 2);
4018 if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
4019 } else if (first === 48) {
4020 switch (charCodeAt(it, 1)) {
4021 case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
4022 case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
4023 default: return +it;
4024 }
4025 digits = stringSlice$1(it, 2);
4026 length = digits.length;
4027 for (index = 0; index < length; index++) {
4028 code = charCodeAt(digits, index);
4029 // parseInt parses a string to a first unavailable symbol
4030 // but ToNumber should return NaN if a string contains unavailable symbols
4031 if (code < 48 || code > maxCode) return NaN;
4032 } return parseInt(digits, radix);
4033 }
4034 } return +it;
4035 };
4036
4037 var FORCED = isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'));
4038
4039 var calledWithNew = function (dummy) {
4040 // includes check on 1..constructor(foo) case
4041 return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); });
4042 };
4043
4044 // `Number` constructor
4045 // https://tc39.es/ecma262/#sec-number-constructor
4046 var NumberWrapper = function Number(value) {
4047 var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
4048 return calledWithNew(this) ? inheritIfRequired(Object(n), this, NumberWrapper) : n;
4049 };
4050
4051 NumberWrapper.prototype = NumberPrototype;
4052 if (FORCED && !IS_PURE) NumberPrototype.constructor = NumberWrapper;
4053
4054 $$3({ global: true, constructor: true, wrap: true, forced: FORCED }, {
4055 Number: NumberWrapper
4056 });
4057
4058 // Use `internal/copy-constructor-properties` helper in `core-js@4`
4059 var copyConstructorProperties = function (target, source) {
4060 for (var keys = DESCRIPTORS ? getOwnPropertyNames(source) : (
4061 // ES3:
4062 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
4063 // ES2015 (in case, if modules with ES2015 Number statics required before):
4064 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
4065 // ESNext
4066 'fromString,range'
4067 ).split(','), j = 0, key; keys.length > j; j++) {
4068 if (hasOwn(source, key = keys[j]) && !hasOwn(target, key)) {
4069 defineProperty(target, key, getOwnPropertyDescriptor$2(source, key));
4070 }
4071 }
4072 };
4073 if (FORCED || IS_PURE) copyConstructorProperties(path[NUMBER], NativeNumber);
4074
4075 var $$2 = _export;
4076 var uncurryThis$2 = functionUncurryThis;
4077 var isArray = isArray$5;
4078
4079 var nativeReverse = uncurryThis$2([].reverse);
4080 var test = [1, 2];
4081
4082 // `Array.prototype.reverse` method
4083 // https://tc39.es/ecma262/#sec-array.prototype.reverse
4084 // fix for Safari 12.0 bug
4085 // https://bugs.webkit.org/show_bug.cgi?id=188794
4086 $$2({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
4087 reverse: function reverse() {
4088 // eslint-disable-next-line no-self-assign -- dirty hack
4089 if (isArray(this)) this.length = this.length;
4090 return nativeReverse(this);
4091 }
4092 });
4093
4094 var call = functionCall;
4095 var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
4096 var anObject = anObject$d;
4097 var isNullOrUndefined = isNullOrUndefined$7;
4098 var toLength$2 = toLength$6;
4099 var toString$2 = toString$f;
4100 var requireObjectCoercible$2 = requireObjectCoercible$b;
4101 var getMethod = getMethod$5;
4102 var advanceStringIndex = advanceStringIndex$3;
4103 var regExpExec = regexpExecAbstract;
4104
4105 // @@match logic
4106 fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
4107 return [
4108 // `String.prototype.match` method
4109 // https://tc39.es/ecma262/#sec-string.prototype.match
4110 function match(regexp) {
4111 var O = requireObjectCoercible$2(this);
4112 var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);
4113 return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$2(O));
4114 },
4115 // `RegExp.prototype[@@match]` method
4116 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
4117 function (string) {
4118 var rx = anObject(this);
4119 var S = toString$2(string);
4120 var res = maybeCallNative(nativeMatch, rx, S);
4121
4122 if (res.done) return res.value;
4123
4124 if (!rx.global) return regExpExec(rx, S);
4125
4126 var fullUnicode = rx.unicode;
4127 rx.lastIndex = 0;
4128 var A = [];
4129 var n = 0;
4130 var result;
4131 while ((result = regExpExec(rx, S)) !== null) {
4132 var matchStr = toString$2(result[0]);
4133 A[n] = matchStr;
4134 if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$2(rx.lastIndex), fullUnicode);
4135 n++;
4136 }
4137 return n === 0 ? null : A;
4138 }
4139 ];
4140 });
4141
4142 var $$1 = _export;
4143 var uncurryThis$1 = functionUncurryThisClause;
4144 var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
4145 var toLength$1 = toLength$6;
4146 var toString$1 = toString$f;
4147 var notARegExp$1 = notARegexp;
4148 var requireObjectCoercible$1 = requireObjectCoercible$b;
4149 var correctIsRegExpLogic$1 = correctIsRegexpLogic;
4150
4151 // eslint-disable-next-line es/no-string-prototype-startswith -- safe
4152 var nativeStartsWith = uncurryThis$1(''.startsWith);
4153 var stringSlice = uncurryThis$1(''.slice);
4154 var min$1 = Math.min;
4155
4156 var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegExpLogic$1('startsWith');
4157 // https://github.com/zloirock/core-js/pull/702
4158 var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
4159 var descriptor = getOwnPropertyDescriptor$1(String.prototype, 'startsWith');
4160 return descriptor && !descriptor.writable;
4161 }();
4162
4163 // `String.prototype.startsWith` method
4164 // https://tc39.es/ecma262/#sec-string.prototype.startswith
4165 $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
4166 startsWith: function startsWith(searchString /* , position = 0 */) {
4167 var that = toString$1(requireObjectCoercible$1(this));
4168 notARegExp$1(searchString);
4169 var index = toLength$1(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length));
4170 var search = toString$1(searchString);
4171 return nativeStartsWith
4172 ? nativeStartsWith(that, search, index)
4173 : stringSlice(that, index, index + search.length) === search;
4174 }
4175 });
4176
4177 var $ = _export;
4178 var uncurryThis = functionUncurryThisClause;
4179 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
4180 var toLength = toLength$6;
4181 var toString = toString$f;
4182 var notARegExp = notARegexp;
4183 var requireObjectCoercible = requireObjectCoercible$b;
4184 var correctIsRegExpLogic = correctIsRegexpLogic;
4185
4186 // eslint-disable-next-line es/no-string-prototype-endswith -- safe
4187 var nativeEndsWith = uncurryThis(''.endsWith);
4188 var slice = uncurryThis(''.slice);
4189 var min = Math.min;
4190
4191 var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
4192 // https://github.com/zloirock/core-js/pull/702
4193 var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
4194 var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');
4195 return descriptor && !descriptor.writable;
4196 }();
4197
4198 // `String.prototype.endsWith` method
4199 // https://tc39.es/ecma262/#sec-string.prototype.endswith
4200 $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
4201 endsWith: function endsWith(searchString /* , endPosition = @length */) {
4202 var that = toString(requireObjectCoercible(this));
4203 notARegExp(searchString);
4204 var endPosition = arguments.length > 1 ? arguments[1] : undefined;
4205 var len = that.length;
4206 var end = endPosition === undefined ? len : min(toLength(endPosition), len);
4207 var search = toString(searchString);
4208 return nativeEndsWith
4209 ? nativeEndsWith(that, search, end)
4210 : slice(that, end - search.length, end) === search;
4211 }
4212 });
4213
4214 var Utils = {
4215 getBootstrapVersion: function getBootstrapVersion() {
4216 var bootstrapVersion = 5;
4217 try {
4218 var rawVersion = $$o.fn.dropdown.Constructor.VERSION;
4219
4220 // Only try to parse VERSION if it is defined.
4221 // It is undefined in older versions of Bootstrap (tested with 3.1.1).
4222 if (rawVersion !== undefined) {
4223 bootstrapVersion = parseInt(rawVersion, 10);
4224 }
4225 } catch (e) {
4226 // ignore
4227 }
4228 try {
4229 // eslint-disable-next-line no-undef
4230 var _rawVersion = bootstrap.Tooltip.VERSION;
4231 if (_rawVersion !== undefined) {
4232 bootstrapVersion = parseInt(_rawVersion, 10);
4233 }
4234 } catch (e) {
4235 // ignore
4236 }
4237 return bootstrapVersion;
4238 },
4239 getIconsPrefix: function getIconsPrefix(theme) {
4240 return {
4241 bootstrap3: 'glyphicon',
4242 bootstrap4: 'fa',
4243 bootstrap5: 'bi',
4244 'bootstrap-table': 'icon',
4245 bulma: 'fa',
4246 foundation: 'fa',
4247 materialize: 'material-icons',
4248 semantic: 'fa'
4249 }[theme] || 'fa';
4250 },
4251 getIcons: function getIcons(prefix) {
4252 return {
4253 glyphicon: {
4254 paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
4255 paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
4256 refresh: 'glyphicon-refresh icon-refresh',
4257 toggleOff: 'glyphicon-list-alt icon-list-alt',
4258 toggleOn: 'glyphicon-list-alt icon-list-alt',
4259 columns: 'glyphicon-th icon-th',
4260 detailOpen: 'glyphicon-plus icon-plus',
4261 detailClose: 'glyphicon-minus icon-minus',
4262 fullscreen: 'glyphicon-fullscreen',
4263 search: 'glyphicon-search',
4264 clearSearch: 'glyphicon-trash'
4265 },
4266 fa: {
4267 paginationSwitchDown: 'fa-caret-square-down',
4268 paginationSwitchUp: 'fa-caret-square-up',
4269 refresh: 'fa-sync',
4270 toggleOff: 'fa-toggle-off',
4271 toggleOn: 'fa-toggle-on',
4272 columns: 'fa-th-list',
4273 detailOpen: 'fa-plus',
4274 detailClose: 'fa-minus',
4275 fullscreen: 'fa-arrows-alt',
4276 search: 'fa-search',
4277 clearSearch: 'fa-trash'
4278 },
4279 bi: {
4280 paginationSwitchDown: 'bi-caret-down-square',
4281 paginationSwitchUp: 'bi-caret-up-square',
4282 refresh: 'bi-arrow-clockwise',
4283 toggleOff: 'bi-toggle-off',
4284 toggleOn: 'bi-toggle-on',
4285 columns: 'bi-list-ul',
4286 detailOpen: 'bi-plus',
4287 detailClose: 'bi-dash',
4288 fullscreen: 'bi-arrows-move',
4289 search: 'bi-search',
4290 clearSearch: 'bi-trash'
4291 },
4292 icon: {
4293 paginationSwitchDown: 'icon-arrow-up-circle',
4294 paginationSwitchUp: 'icon-arrow-down-circle',
4295 refresh: 'icon-refresh-cw',
4296 toggleOff: 'icon-toggle-right',
4297 toggleOn: 'icon-toggle-right',
4298 columns: 'icon-list',
4299 detailOpen: 'icon-plus',
4300 detailClose: 'icon-minus',
4301 fullscreen: 'icon-maximize',
4302 search: 'icon-search',
4303 clearSearch: 'icon-trash-2'
4304 },
4305 'material-icons': {
4306 paginationSwitchDown: 'grid_on',
4307 paginationSwitchUp: 'grid_off',
4308 refresh: 'refresh',
4309 toggleOff: 'tablet',
4310 toggleOn: 'tablet_android',
4311 columns: 'view_list',
4312 detailOpen: 'add',
4313 detailClose: 'remove',
4314 fullscreen: 'fullscreen',
4315 sort: 'sort',
4316 search: 'search',
4317 clearSearch: 'delete'
4318 }
4319 }[prefix];
4320 },
4321 getSearchInput: function getSearchInput(that) {
4322 if (typeof that.options.searchSelector === 'string') {
4323 return $$o(that.options.searchSelector);
4324 }
4325 return that.$toolbar.find('.search input');
4326 },
4327 // $.extend: https://github.com/jquery/jquery/blob/3.6.2/src/core.js#L132
4328 extend: function extend() {
4329 var _this = this;
4330 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4331 args[_key] = arguments[_key];
4332 }
4333 var target = args[0] || {};
4334 var i = 1;
4335 var deep = false;
4336 var clone;
4337
4338 // Handle a deep copy situation
4339 if (typeof target === 'boolean') {
4340 deep = target;
4341
4342 // Skip the boolean and the target
4343 target = args[i] || {};
4344 i++;
4345 }
4346
4347 // Handle case when target is a string or something (possible in deep copy)
4348 if (_typeof(target) !== 'object' && typeof target !== 'function') {
4349 target = {};
4350 }
4351 for (; i < args.length; i++) {
4352 var options = args[i];
4353
4354 // Ignore undefined/null values
4355 if (typeof options === 'undefined' || options === null) {
4356 continue;
4357 }
4358
4359 // Extend the base object
4360 // eslint-disable-next-line guard-for-in
4361 for (var name in options) {
4362 var copy = options[name];
4363
4364 // Prevent Object.prototype pollution
4365 // Prevent never-ending loop
4366 if (name === '__proto__' || target === copy) {
4367 continue;
4368 }
4369 var copyIsArray = Array.isArray(copy);
4370
4371 // Recurse if we're merging plain objects or arrays
4372 if (deep && copy && (this.isObject(copy) || copyIsArray)) {
4373 var src = target[name];
4374 if (copyIsArray && Array.isArray(src)) {
4375 if (src.every(function (it) {
4376 return !_this.isObject(it) && !Array.isArray(it);
4377 })) {
4378 target[name] = copy;
4379 continue;
4380 }
4381 }
4382 if (copyIsArray && !Array.isArray(src)) {
4383 clone = [];
4384 } else if (!copyIsArray && !this.isObject(src)) {
4385 clone = {};
4386 } else {
4387 clone = src;
4388 }
4389
4390 // Never move original objects, clone them
4391 target[name] = this.extend(deep, clone, copy);
4392
4393 // Don't bring in undefined values
4394 } else if (copy !== undefined) {
4395 target[name] = copy;
4396 }
4397 }
4398 }
4399 return target;
4400 },
4401 // it only does '%s', and return '' when arguments are undefined
4402 sprintf: function sprintf(_str) {
4403 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
4404 args[_key2 - 1] = arguments[_key2];
4405 }
4406 var flag = true;
4407 var i = 0;
4408 var str = _str.replace(/%s/g, function () {
4409 var arg = args[i++];
4410 if (typeof arg === 'undefined') {
4411 flag = false;
4412 return '';
4413 }
4414 return arg;
4415 });
4416 return flag ? str : '';
4417 },
4418 isObject: function isObject(obj) {
4419 return _typeof(obj) === 'object' && obj !== null && !Array.isArray(obj);
4420 },
4421 isEmptyObject: function isEmptyObject() {
4422 var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4423 return Object.entries(obj).length === 0 && obj.constructor === Object;
4424 },
4425 isNumeric: function isNumeric(n) {
4426 return !isNaN(parseFloat(n)) && isFinite(n);
4427 },
4428 getFieldTitle: function getFieldTitle(list, value) {
4429 var _iterator = _createForOfIteratorHelper(list),
4430 _step;
4431 try {
4432 for (_iterator.s(); !(_step = _iterator.n()).done;) {
4433 var item = _step.value;
4434 if (item.field === value) {
4435 return item.title;
4436 }
4437 }
4438 } catch (err) {
4439 _iterator.e(err);
4440 } finally {
4441 _iterator.f();
4442 }
4443 return '';
4444 },
4445 setFieldIndex: function setFieldIndex(columns) {
4446 var totalCol = 0;
4447 var flag = [];
4448 var _iterator2 = _createForOfIteratorHelper(columns[0]),
4449 _step2;
4450 try {
4451 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
4452 var column = _step2.value;
4453 totalCol += column.colspan || 1;
4454 }
4455 } catch (err) {
4456 _iterator2.e(err);
4457 } finally {
4458 _iterator2.f();
4459 }
4460 for (var i = 0; i < columns.length; i++) {
4461 flag[i] = [];
4462 for (var j = 0; j < totalCol; j++) {
4463 flag[i][j] = false;
4464 }
4465 }
4466 for (var _i = 0; _i < columns.length; _i++) {
4467 var _iterator3 = _createForOfIteratorHelper(columns[_i]),
4468 _step3;
4469 try {
4470 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
4471 var r = _step3.value;
4472 var rowspan = r.rowspan || 1;
4473 var colspan = r.colspan || 1;
4474 var index = flag[_i].indexOf(false);
4475 r.colspanIndex = index;
4476 if (colspan === 1) {
4477 r.fieldIndex = index;
4478 // when field is undefined, use index instead
4479 if (typeof r.field === 'undefined') {
4480 r.field = index;
4481 }
4482 } else {
4483 r.colspanGroup = r.colspan;
4484 }
4485 for (var _j = 0; _j < rowspan; _j++) {
4486 for (var k = 0; k < colspan; k++) {
4487 flag[_i + _j][index + k] = true;
4488 }
4489 }
4490 }
4491 } catch (err) {
4492 _iterator3.e(err);
4493 } finally {
4494 _iterator3.f();
4495 }
4496 }
4497 },
4498 normalizeAccent: function normalizeAccent(value) {
4499 if (typeof value !== 'string') {
4500 return value;
4501 }
4502 return value.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
4503 },
4504 updateFieldGroup: function updateFieldGroup(columns, fieldColumns) {
4505 var _ref;
4506 var allColumns = (_ref = []).concat.apply(_ref, _toConsumableArray(columns));
4507 var _iterator4 = _createForOfIteratorHelper(columns),
4508 _step4;
4509 try {
4510 for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
4511 var c = _step4.value;
4512 var _iterator6 = _createForOfIteratorHelper(c),
4513 _step6;
4514 try {
4515 for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
4516 var r = _step6.value;
4517 if (r.colspanGroup > 1) {
4518 var colspan = 0;
4519 var _loop = function _loop(i) {
4520 var column = allColumns.find(function (col) {
4521 return col.fieldIndex === i;
4522 });
4523 if (column.visible) {
4524 colspan++;
4525 }
4526 };
4527 for (var i = r.colspanIndex; i < r.colspanIndex + r.colspanGroup; i++) {
4528 _loop(i);
4529 }
4530 r.colspan = colspan;
4531 r.visible = colspan > 0;
4532 }
4533 }
4534 } catch (err) {
4535 _iterator6.e(err);
4536 } finally {
4537 _iterator6.f();
4538 }
4539 }
4540 } catch (err) {
4541 _iterator4.e(err);
4542 } finally {
4543 _iterator4.f();
4544 }
4545 if (columns.length < 2) {
4546 return;
4547 }
4548 var _iterator5 = _createForOfIteratorHelper(fieldColumns),
4549 _step5;
4550 try {
4551 var _loop2 = function _loop2() {
4552 var column = _step5.value;
4553 var sameColumns = allColumns.filter(function (col) {
4554 return col.fieldIndex === column.fieldIndex;
4555 });
4556 if (sameColumns.length > 1) {
4557 var _iterator7 = _createForOfIteratorHelper(sameColumns),
4558 _step7;
4559 try {
4560 for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
4561 var _c = _step7.value;
4562 _c.visible = column.visible;
4563 }
4564 } catch (err) {
4565 _iterator7.e(err);
4566 } finally {
4567 _iterator7.f();
4568 }
4569 }
4570 };
4571 for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
4572 _loop2();
4573 }
4574 } catch (err) {
4575 _iterator5.e(err);
4576 } finally {
4577 _iterator5.f();
4578 }
4579 },
4580 getScrollBarWidth: function getScrollBarWidth() {
4581 if (this.cachedWidth === undefined) {
4582 var $inner = $$o('<div/>').addClass('fixed-table-scroll-inner');
4583 var $outer = $$o('<div/>').addClass('fixed-table-scroll-outer');
4584 $outer.append($inner);
4585 $$o('body').append($outer);
4586 var w1 = $inner[0].offsetWidth;
4587 $outer.css('overflow', 'scroll');
4588 var w2 = $inner[0].offsetWidth;
4589 if (w1 === w2) {
4590 w2 = $outer[0].clientWidth;
4591 }
4592 $outer.remove();
4593 this.cachedWidth = w1 - w2;
4594 }
4595 return this.cachedWidth;
4596 },
4597 calculateObjectValue: function calculateObjectValue(self, name, args, defaultValue) {
4598 var func = name;
4599 if (typeof name === 'string') {
4600 // support obj.func1.func2
4601 var names = name.split('.');
4602 if (names.length > 1) {
4603 func = window;
4604 var _iterator8 = _createForOfIteratorHelper(names),
4605 _step8;
4606 try {
4607 for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
4608 var f = _step8.value;
4609 func = func[f];
4610 }
4611 } catch (err) {
4612 _iterator8.e(err);
4613 } finally {
4614 _iterator8.f();
4615 }
4616 } else {
4617 func = window[name];
4618 }
4619 }
4620 if (func !== null && _typeof(func) === 'object') {
4621 return func;
4622 }
4623 if (typeof func === 'function') {
4624 return func.apply(self, args || []);
4625 }
4626 if (!func && typeof name === 'string' && args && this.sprintf.apply(this, [name].concat(_toConsumableArray(args)))) {
4627 return this.sprintf.apply(this, [name].concat(_toConsumableArray(args)));
4628 }
4629 return defaultValue;
4630 },
4631 compareObjects: function compareObjects(objectA, objectB, compareLength) {
4632 var aKeys = Object.keys(objectA);
4633 var bKeys = Object.keys(objectB);
4634 if (compareLength && aKeys.length !== bKeys.length) {
4635 return false;
4636 }
4637 for (var _i2 = 0, _aKeys = aKeys; _i2 < _aKeys.length; _i2++) {
4638 var key = _aKeys[_i2];
4639 if (bKeys.includes(key) && objectA[key] !== objectB[key]) {
4640 return false;
4641 }
4642 }
4643 return true;
4644 },
4645 regexCompare: function regexCompare(value, search) {
4646 try {
4647 var regexpParts = search.match(/^\/(.*?)\/([gim]*)$/);
4648 if (value.toString().search(regexpParts ? new RegExp(regexpParts[1], regexpParts[2]) : new RegExp(search, 'gim')) !== -1) {
4649 return true;
4650 }
4651 } catch (e) {
4652 return false;
4653 }
4654 return false;
4655 },
4656 escapeApostrophe: function escapeApostrophe(value) {
4657 return value.toString().replace(/'/g, '&#39;');
4658 },
4659 escapeHTML: function escapeHTML(text) {
4660 if (!text) {
4661 return text;
4662 }
4663 return text.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
4664 },
4665 unescapeHTML: function unescapeHTML(text) {
4666 if (typeof text !== 'string' || !text) {
4667 return text;
4668 }
4669 return text.toString().replace(/&amp;/g, '&').replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&quot;/g, '"').replace(/&#39;/g, '\'');
4670 },
4671 removeHTML: function removeHTML(text) {
4672 if (!text) {
4673 return text;
4674 }
4675 return text.toString().replace(/(<([^>]+)>)/ig, '').replace(/&[#A-Za-z0-9]+;/gi, '').trim();
4676 },
4677 getRealDataAttr: function getRealDataAttr(dataAttr) {
4678 for (var _i3 = 0, _Object$entries = Object.entries(dataAttr); _i3 < _Object$entries.length; _i3++) {
4679 var _Object$entries$_i = _slicedToArray(_Object$entries[_i3], 2),
4680 attr = _Object$entries$_i[0],
4681 value = _Object$entries$_i[1];
4682 var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase();
4683 if (auxAttr !== attr) {
4684 dataAttr[auxAttr] = value;
4685 delete dataAttr[attr];
4686 }
4687 }
4688 return dataAttr;
4689 },
4690 getItemField: function getItemField(item, field, escape) {
4691 var columnEscape = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
4692 var value = item;
4693
4694 // use column escape if it is defined
4695 if (typeof columnEscape !== 'undefined') {
4696 escape = columnEscape;
4697 }
4698 if (typeof field !== 'string' || item.hasOwnProperty(field)) {
4699 return escape ? this.escapeHTML(item[field]) : item[field];
4700 }
4701 var props = field.split('.');
4702 var _iterator9 = _createForOfIteratorHelper(props),
4703 _step9;
4704 try {
4705 for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
4706 var p = _step9.value;
4707 value = value && value[p];
4708 }
4709 } catch (err) {
4710 _iterator9.e(err);
4711 } finally {
4712 _iterator9.f();
4713 }
4714 return escape ? this.escapeHTML(value) : value;
4715 },
4716 isIEBrowser: function isIEBrowser() {
4717 return navigator.userAgent.includes('MSIE ') || /Trident.*rv:11\./.test(navigator.userAgent);
4718 },
4719 findIndex: function findIndex(items, item) {
4720 var _iterator10 = _createForOfIteratorHelper(items),
4721 _step10;
4722 try {
4723 for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
4724 var it = _step10.value;
4725 if (JSON.stringify(it) === JSON.stringify(item)) {
4726 return items.indexOf(it);
4727 }
4728 }
4729 } catch (err) {
4730 _iterator10.e(err);
4731 } finally {
4732 _iterator10.f();
4733 }
4734 return -1;
4735 },
4736 trToData: function trToData(columns, $els) {
4737 var _this2 = this;
4738 var data = [];
4739 var m = [];
4740 $els.each(function (y, el) {
4741 var $el = $$o(el);
4742 var row = {};
4743
4744 // save tr's id, class and data-* attributes
4745 row._id = $el.attr('id');
4746 row._class = $el.attr('class');
4747 row._data = _this2.getRealDataAttr($el.data());
4748 row._style = $el.attr('style');
4749 $el.find('>td,>th').each(function (_x, el) {
4750 var $el = $$o(el);
4751 var cspan = +$el.attr('colspan') || 1;
4752 var rspan = +$el.attr('rowspan') || 1;
4753 var x = _x;
4754
4755 // skip already occupied cells in current row
4756 for (; m[y] && m[y][x]; x++) {
4757 // ignore
4758 }
4759
4760 // mark matrix elements occupied by current cell with true
4761 for (var tx = x; tx < x + cspan; tx++) {
4762 for (var ty = y; ty < y + rspan; ty++) {
4763 if (!m[ty]) {
4764 // fill missing rows
4765 m[ty] = [];
4766 }
4767 m[ty][tx] = true;
4768 }
4769 }
4770 var field = columns[x].field;
4771 row[field] = _this2.escapeApostrophe($el.html().trim());
4772 // save td's id, class and data-* attributes
4773 row["_".concat(field, "_id")] = $el.attr('id');
4774 row["_".concat(field, "_class")] = $el.attr('class');
4775 row["_".concat(field, "_rowspan")] = $el.attr('rowspan');
4776 row["_".concat(field, "_colspan")] = $el.attr('colspan');
4777 row["_".concat(field, "_title")] = $el.attr('title');
4778 row["_".concat(field, "_data")] = _this2.getRealDataAttr($el.data());
4779 row["_".concat(field, "_style")] = $el.attr('style');
4780 });
4781 data.push(row);
4782 });
4783 return data;
4784 },
4785 sort: function sort(a, b, order, options, aPosition, bPosition) {
4786 if (a === undefined || a === null) {
4787 a = '';
4788 }
4789 if (b === undefined || b === null) {
4790 b = '';
4791 }
4792 if (options.sortStable && a === b) {
4793 a = aPosition;
4794 b = bPosition;
4795 }
4796
4797 // If both values are numeric, do a numeric comparison
4798 if (this.isNumeric(a) && this.isNumeric(b)) {
4799 // Convert numerical values form string to float.
4800 a = parseFloat(a);
4801 b = parseFloat(b);
4802 if (a < b) {
4803 return order * -1;
4804 }
4805 if (a > b) {
4806 return order;
4807 }
4808 return 0;
4809 }
4810 if (options.sortEmptyLast) {
4811 if (a === '') {
4812 return 1;
4813 }
4814 if (b === '') {
4815 return -1;
4816 }
4817 }
4818 if (a === b) {
4819 return 0;
4820 }
4821
4822 // If value is not a string, convert to string
4823 if (typeof a !== 'string') {
4824 a = a.toString();
4825 }
4826 if (a.localeCompare(b) === -1) {
4827 return order * -1;
4828 }
4829 return order;
4830 },
4831 getEventName: function getEventName(eventPrefix) {
4832 var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
4833 id = id || "".concat(+new Date()).concat(~~(Math.random() * 1000000));
4834 return "".concat(eventPrefix, "-").concat(id);
4835 },
4836 hasDetailViewIcon: function hasDetailViewIcon(options) {
4837 return options.detailView && options.detailViewIcon && !options.cardView;
4838 },
4839 getDetailViewIndexOffset: function getDetailViewIndexOffset(options) {
4840 return this.hasDetailViewIcon(options) && options.detailViewAlign !== 'right' ? 1 : 0;
4841 },
4842 checkAutoMergeCells: function checkAutoMergeCells(data) {
4843 var _iterator11 = _createForOfIteratorHelper(data),
4844 _step11;
4845 try {
4846 for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
4847 var row = _step11.value;
4848 for (var _i4 = 0, _Object$keys = Object.keys(row); _i4 < _Object$keys.length; _i4++) {
4849 var key = _Object$keys[_i4];
4850 if (key.startsWith('_') && (key.endsWith('_rowspan') || key.endsWith('_colspan'))) {
4851 return true;
4852 }
4853 }
4854 }
4855 } catch (err) {
4856 _iterator11.e(err);
4857 } finally {
4858 _iterator11.f();
4859 }
4860 return false;
4861 },
4862 deepCopy: function deepCopy(arg) {
4863 if (arg === undefined) {
4864 return arg;
4865 }
4866 return this.extend(true, Array.isArray(arg) ? [] : {}, arg);
4867 },
4868 debounce: function debounce(func, wait, immediate) {
4869 var timeout;
4870 return function executedFunction() {
4871 var context = this;
4872 var args = arguments;
4873 var later = function later() {
4874 timeout = null;
4875 if (!immediate) func.apply(context, args);
4876 };
4877 var callNow = immediate && !timeout;
4878 clearTimeout(timeout);
4879 timeout = setTimeout(later, wait);
4880 if (callNow) func.apply(context, args);
4881 };
4882 }
4883 };
4884
4885 var VERSION = '1.21.3';
4886 var bootstrapVersion = Utils.getBootstrapVersion();
4887 var CONSTANTS = {
4888 3: {
4889 classes: {
4890 buttonsPrefix: 'btn',
4891 buttons: 'default',
4892 buttonsGroup: 'btn-group',
4893 buttonsDropdown: 'btn-group',
4894 pull: 'pull',
4895 inputGroup: 'input-group',
4896 inputPrefix: 'input-',
4897 input: 'form-control',
4898 select: 'form-control',
4899 paginationDropdown: 'btn-group dropdown',
4900 dropup: 'dropup',
4901 dropdownActive: 'active',
4902 paginationActive: 'active',
4903 buttonActive: 'active'
4904 },
4905 html: {
4906 toolbarDropdown: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
4907 toolbarDropdownItem: '<li class="dropdown-item-marker" role="menuitem"><label>%s</label></li>',
4908 toolbarDropdownSeparator: '<li class="divider"></li>',
4909 pageDropdown: ['<ul class="dropdown-menu" role="menu">', '</ul>'],
4910 pageDropdownItem: '<li role="menuitem" class="%s"><a href="#">%s</a></li>',
4911 dropdownCaret: '<span class="caret"></span>',
4912 pagination: ['<ul class="pagination%s">', '</ul>'],
4913 paginationItem: '<li class="page-item%s"><a class="page-link" aria-label="%s" href="javascript:void(0)">%s</a></li>',
4914 icon: '<i class="%s %s"></i>',
4915 inputGroup: '<div class="input-group">%s<span class="input-group-btn">%s</span></div>',
4916 searchInput: '<input class="%s%s" type="text" placeholder="%s">',
4917 searchButton: '<button class="%s" type="button" name="search" title="%s">%s %s</button>',
4918 searchClearButton: '<button class="%s" type="button" name="clearSearch" title="%s">%s %s</button>'
4919 }
4920 },
4921 4: {
4922 classes: {
4923 buttonsPrefix: 'btn',
4924 buttons: 'secondary',
4925 buttonsGroup: 'btn-group',
4926 buttonsDropdown: 'btn-group',
4927 pull: 'float',
4928 inputGroup: 'btn-group',
4929 inputPrefix: 'form-control-',
4930 input: 'form-control',
4931 select: 'form-control',
4932 paginationDropdown: 'btn-group dropdown',
4933 dropup: 'dropup',
4934 dropdownActive: 'active',
4935 paginationActive: 'active',
4936 buttonActive: 'active'
4937 },
4938 html: {
4939 toolbarDropdown: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
4940 toolbarDropdownItem: '<label class="dropdown-item dropdown-item-marker">%s</label>',
4941 pageDropdown: ['<div class="dropdown-menu">', '</div>'],
4942 pageDropdownItem: '<a class="dropdown-item %s" href="#">%s</a>',
4943 toolbarDropdownSeparator: '<div class="dropdown-divider"></div>',
4944 dropdownCaret: '<span class="caret"></span>',
4945 pagination: ['<ul class="pagination%s">', '</ul>'],
4946 paginationItem: '<li class="page-item%s"><a class="page-link" aria-label="%s" href="javascript:void(0)">%s</a></li>',
4947 icon: '<i class="%s %s"></i>',
4948 inputGroup: '<div class="input-group">%s<div class="input-group-append">%s</div></div>',
4949 searchInput: '<input class="%s%s" type="text" placeholder="%s">',
4950 searchButton: '<button class="%s" type="button" name="search" title="%s">%s %s</button>',
4951 searchClearButton: '<button class="%s" type="button" name="clearSearch" title="%s">%s %s</button>'
4952 }
4953 },
4954 5: {
4955 classes: {
4956 buttonsPrefix: 'btn',
4957 buttons: 'secondary',
4958 buttonsGroup: 'btn-group',
4959 buttonsDropdown: 'btn-group',
4960 pull: 'float',
4961 inputGroup: 'btn-group',
4962 inputPrefix: 'form-control-',
4963 input: 'form-control',
4964 select: 'form-select',
4965 paginationDropdown: 'btn-group dropdown',
4966 dropup: 'dropup',
4967 dropdownActive: 'active',
4968 paginationActive: 'active',
4969 buttonActive: 'active'
4970 },
4971 html: {
4972 dataToggle: 'data-bs-toggle',
4973 toolbarDropdown: ['<div class="dropdown-menu dropdown-menu-right">', '</div>'],
4974 toolbarDropdownItem: '<label class="dropdown-item dropdown-item-marker">%s</label>',
4975 pageDropdown: ['<div class="dropdown-menu">', '</div>'],
4976 pageDropdownItem: '<a class="dropdown-item %s" href="#">%s</a>',
4977 toolbarDropdownSeparator: '<div class="dropdown-divider"></div>',
4978 dropdownCaret: '<span class="caret"></span>',
4979 pagination: ['<ul class="pagination%s">', '</ul>'],
4980 paginationItem: '<li class="page-item%s"><a class="page-link" aria-label="%s" href="javascript:void(0)">%s</a></li>',
4981 icon: '<i class="%s %s"></i>',
4982 inputGroup: '<div class="input-group">%s%s</div>',
4983 searchInput: '<input class="%s%s" type="text" placeholder="%s">',
4984 searchButton: '<button class="%s" type="button" name="search" title="%s">%s %s</button>',
4985 searchClearButton: '<button class="%s" type="button" name="clearSearch" title="%s">%s %s</button>'
4986 }
4987 }
4988 }[bootstrapVersion];
4989 var DEFAULTS = {
4990 height: undefined,
4991 classes: 'table table-bordered table-hover',
4992 buttons: {},
4993 theadClasses: '',
4994 headerStyle: function headerStyle(column) {
4995 return {};
4996 },
4997 rowStyle: function rowStyle(row, index) {
4998 return {};
4999 },
5000 rowAttributes: function rowAttributes(row, index) {
5001 return {};
5002 },
5003 undefinedText: '-',
5004 locale: undefined,
5005 virtualScroll: false,
5006 virtualScrollItemHeight: undefined,
5007 sortable: true,
5008 sortClass: undefined,
5009 silentSort: true,
5010 sortEmptyLast: false,
5011 sortName: undefined,
5012 sortOrder: undefined,
5013 sortReset: false,
5014 sortStable: false,
5015 sortResetPage: false,
5016 rememberOrder: false,
5017 serverSort: true,
5018 customSort: undefined,
5019 columns: [[]],
5020 data: [],
5021 url: undefined,
5022 method: 'get',
5023 cache: true,
5024 contentType: 'application/json',
5025 dataType: 'json',
5026 ajax: undefined,
5027 ajaxOptions: {},
5028 queryParams: function queryParams(params) {
5029 return params;
5030 },
5031 queryParamsType: 'limit',
5032 // 'limit', undefined
5033 responseHandler: function responseHandler(res) {
5034 return res;
5035 },
5036 totalField: 'total',
5037 totalNotFilteredField: 'totalNotFiltered',
5038 dataField: 'rows',
5039 footerField: 'footer',
5040 pagination: false,
5041 paginationParts: ['pageInfo', 'pageSize', 'pageList'],
5042 showExtendedPagination: false,
5043 paginationLoop: true,
5044 sidePagination: 'client',
5045 // client or server
5046 totalRows: 0,
5047 totalNotFiltered: 0,
5048 pageNumber: 1,
5049 pageSize: 10,
5050 pageList: [10, 25, 50, 100],
5051 paginationHAlign: 'right',
5052 // right, left
5053 paginationVAlign: 'bottom',
5054 // bottom, top, both
5055 paginationDetailHAlign: 'left',
5056 // right, left
5057 paginationPreText: '&lsaquo;',
5058 paginationNextText: '&rsaquo;',
5059 paginationSuccessivelySize: 5,
5060 // Maximum successively number of pages in a row
5061 paginationPagesBySide: 1,
5062 // Number of pages on each side (right, left) of the current page.
5063 paginationUseIntermediate: false,
5064 // Calculate intermediate pages for quick access
5065 search: false,
5066 searchHighlight: false,
5067 searchOnEnterKey: false,
5068 strictSearch: false,
5069 regexSearch: false,
5070 searchSelector: false,
5071 visibleSearch: false,
5072 showButtonIcons: true,
5073 showButtonText: false,
5074 showSearchButton: false,
5075 showSearchClearButton: false,
5076 trimOnSearch: true,
5077 searchAlign: 'right',
5078 searchTimeOut: 500,
5079 searchText: '',
5080 customSearch: undefined,
5081 showHeader: true,
5082 showFooter: false,
5083 footerStyle: function footerStyle(column) {
5084 return {};
5085 },
5086 searchAccentNeutralise: false,
5087 showColumns: false,
5088 showColumnsToggleAll: false,
5089 showColumnsSearch: false,
5090 minimumCountColumns: 1,
5091 showPaginationSwitch: false,
5092 showRefresh: false,
5093 showToggle: false,
5094 showFullscreen: false,
5095 smartDisplay: true,
5096 escape: false,
5097 escapeTitle: true,
5098 filterOptions: {
5099 filterAlgorithm: 'and'
5100 },
5101 idField: undefined,
5102 selectItemName: 'btSelectItem',
5103 clickToSelect: false,
5104 ignoreClickToSelectOn: function ignoreClickToSelectOn(_ref) {
5105 var tagName = _ref.tagName;
5106 return ['A', 'BUTTON'].includes(tagName);
5107 },
5108 singleSelect: false,
5109 checkboxHeader: true,
5110 maintainMetaData: false,
5111 multipleSelectRow: false,
5112 uniqueId: undefined,
5113 cardView: false,
5114 detailView: false,
5115 detailViewIcon: true,
5116 detailViewByClick: false,
5117 detailViewAlign: 'left',
5118 detailFormatter: function detailFormatter(index, row) {
5119 return '';
5120 },
5121 detailFilter: function detailFilter(index, row) {
5122 return true;
5123 },
5124 toolbar: undefined,
5125 toolbarAlign: 'left',
5126 buttonsToolbar: undefined,
5127 buttonsAlign: 'right',
5128 buttonsOrder: ['paginationSwitch', 'refresh', 'toggle', 'fullscreen', 'columns'],
5129 buttonsPrefix: CONSTANTS.classes.buttonsPrefix,
5130 buttonsClass: CONSTANTS.classes.buttons,
5131 iconsPrefix: undefined,
5132 // init in initConstants
5133 icons: {},
5134 // init in initConstants
5135 iconSize: undefined,
5136 loadingFontSize: 'auto',
5137 loadingTemplate: function loadingTemplate(loadingMessage) {
5138 return "<span class=\"loading-wrap\">\n <span class=\"loading-text\">".concat(loadingMessage, "</span>\n <span class=\"animation-wrap\"><span class=\"animation-dot\"></span></span>\n </span>\n ");
5139 },
5140 onAll: function onAll(name, args) {
5141 return false;
5142 },
5143 onClickCell: function onClickCell(field, value, row, $element) {
5144 return false;
5145 },
5146 onDblClickCell: function onDblClickCell(field, value, row, $element) {
5147 return false;
5148 },
5149 onClickRow: function onClickRow(item, $element) {
5150 return false;
5151 },
5152 onDblClickRow: function onDblClickRow(item, $element) {
5153 return false;
5154 },
5155 onSort: function onSort(name, order) {
5156 return false;
5157 },
5158 onCheck: function onCheck(row) {
5159 return false;
5160 },
5161 onUncheck: function onUncheck(row) {
5162 return false;
5163 },
5164 onCheckAll: function onCheckAll(rows) {
5165 return false;
5166 },
5167 onUncheckAll: function onUncheckAll(rows) {
5168 return false;
5169 },
5170 onCheckSome: function onCheckSome(rows) {
5171 return false;
5172 },
5173 onUncheckSome: function onUncheckSome(rows) {
5174 return false;
5175 },
5176 onLoadSuccess: function onLoadSuccess(data) {
5177 return false;
5178 },
5179 onLoadError: function onLoadError(status) {
5180 return false;
5181 },
5182 onColumnSwitch: function onColumnSwitch(field, checked) {
5183 return false;
5184 },
5185 onColumnSwitchAll: function onColumnSwitchAll(checked) {
5186 return false;
5187 },
5188 onPageChange: function onPageChange(number, size) {
5189 return false;
5190 },
5191 onSearch: function onSearch(text) {
5192 return false;
5193 },
5194 onToggle: function onToggle(cardView) {
5195 return false;
5196 },
5197 onPreBody: function onPreBody(data) {
5198 return false;
5199 },
5200 onPostBody: function onPostBody() {
5201 return false;
5202 },
5203 onPostHeader: function onPostHeader() {
5204 return false;
5205 },
5206 onPostFooter: function onPostFooter() {
5207 return false;
5208 },
5209 onExpandRow: function onExpandRow(index, row, $detail) {
5210 return false;
5211 },
5212 onCollapseRow: function onCollapseRow(index, row) {
5213 return false;
5214 },
5215 onRefreshOptions: function onRefreshOptions(options) {
5216 return false;
5217 },
5218 onRefresh: function onRefresh(params) {
5219 return false;
5220 },
5221 onResetView: function onResetView() {
5222 return false;
5223 },
5224 onScrollBody: function onScrollBody() {
5225 return false;
5226 },
5227 onTogglePagination: function onTogglePagination(newState) {
5228 return false;
5229 },
5230 onVirtualScroll: function onVirtualScroll(startIndex, endIndex) {
5231 return false;
5232 }
5233 };
5234 var EN = {
5235 formatLoadingMessage: function formatLoadingMessage() {
5236 return 'Loading, please wait';
5237 },
5238 formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
5239 return "".concat(pageNumber, " rows per page");
5240 },
5241 formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows, totalNotFiltered) {
5242 if (totalNotFiltered !== undefined && totalNotFiltered > 0 && totalNotFiltered > totalRows) {
5243 return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows (filtered from ").concat(totalNotFiltered, " total rows)");
5244 }
5245 return "Showing ".concat(pageFrom, " to ").concat(pageTo, " of ").concat(totalRows, " rows");
5246 },
5247 formatSRPaginationPreText: function formatSRPaginationPreText() {
5248 return 'previous page';
5249 },
5250 formatSRPaginationPageText: function formatSRPaginationPageText(page) {
5251 return "to page ".concat(page);
5252 },
5253 formatSRPaginationNextText: function formatSRPaginationNextText() {
5254 return 'next page';
5255 },
5256 formatDetailPagination: function formatDetailPagination(totalRows) {
5257 return "Showing ".concat(totalRows, " rows");
5258 },
5259 formatSearch: function formatSearch() {
5260 return 'Search';
5261 },
5262 formatClearSearch: function formatClearSearch() {
5263 return 'Clear Search';
5264 },
5265 formatNoMatches: function formatNoMatches() {
5266 return 'No matching records found';
5267 },
5268 formatPaginationSwitch: function formatPaginationSwitch() {
5269 return 'Hide/Show pagination';
5270 },
5271 formatPaginationSwitchDown: function formatPaginationSwitchDown() {
5272 return 'Show pagination';
5273 },
5274 formatPaginationSwitchUp: function formatPaginationSwitchUp() {
5275 return 'Hide pagination';
5276 },
5277 formatRefresh: function formatRefresh() {
5278 return 'Refresh';
5279 },
5280 formatToggleOn: function formatToggleOn() {
5281 return 'Show card view';
5282 },
5283 formatToggleOff: function formatToggleOff() {
5284 return 'Hide card view';
5285 },
5286 formatColumns: function formatColumns() {
5287 return 'Columns';
5288 },
5289 formatColumnsToggleAll: function formatColumnsToggleAll() {
5290 return 'Toggle all';
5291 },
5292 formatFullscreen: function formatFullscreen() {
5293 return 'Fullscreen';
5294 },
5295 formatAllRows: function formatAllRows() {
5296 return 'All';
5297 }
5298 };
5299 var COLUMN_DEFAULTS = {
5300 field: undefined,
5301 title: undefined,
5302 titleTooltip: undefined,
5303 class: undefined,
5304 width: undefined,
5305 widthUnit: 'px',
5306 rowspan: undefined,
5307 colspan: undefined,
5308 align: undefined,
5309 // left, right, center
5310 halign: undefined,
5311 // left, right, center
5312 falign: undefined,
5313 // left, right, center
5314 valign: undefined,
5315 // top, middle, bottom
5316 cellStyle: undefined,
5317 radio: false,
5318 checkbox: false,
5319 checkboxEnabled: true,
5320 clickToSelect: true,
5321 showSelectTitle: false,
5322 sortable: false,
5323 sortName: undefined,
5324 order: 'asc',
5325 // asc, desc
5326 sorter: undefined,
5327 visible: true,
5328 switchable: true,
5329 cardVisible: true,
5330 searchable: true,
5331 formatter: undefined,
5332 footerFormatter: undefined,
5333 detailFormatter: undefined,
5334 searchFormatter: true,
5335 searchHighlightFormatter: false,
5336 escape: undefined,
5337 events: undefined
5338 };
5339 var METHODS = ['getOptions', 'refreshOptions', 'getData', 'getSelections', 'load', 'append', 'prepend', 'remove', 'removeAll', 'insertRow', 'updateRow', 'getRowByUniqueId', 'updateByUniqueId', 'removeByUniqueId', 'updateCell', 'updateCellByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', 'showColumn', 'hideColumn', 'getVisibleColumns', 'getHiddenColumns', 'showAllColumns', 'hideAllColumns', 'mergeCells', 'checkAll', 'uncheckAll', 'checkInvert', 'check', 'uncheck', 'checkBy', 'uncheckBy', 'refresh', 'destroy', 'resetView', 'showLoading', 'hideLoading', 'togglePagination', 'toggleFullscreen', 'toggleView', 'resetSearch', 'filterBy', 'scrollTo', 'getScrollPosition', 'selectPage', 'prevPage', 'nextPage', 'toggleDetailView', 'expandRow', 'collapseRow', 'expandRowByUniqueId', 'collapseRowByUniqueId', 'expandAllRows', 'collapseAllRows', 'updateColumnTitle', 'updateFormatText'];
5340 var EVENTS = {
5341 'all.bs.table': 'onAll',
5342 'click-row.bs.table': 'onClickRow',
5343 'dbl-click-row.bs.table': 'onDblClickRow',
5344 'click-cell.bs.table': 'onClickCell',
5345 'dbl-click-cell.bs.table': 'onDblClickCell',
5346 'sort.bs.table': 'onSort',
5347 'check.bs.table': 'onCheck',
5348 'uncheck.bs.table': 'onUncheck',
5349 'check-all.bs.table': 'onCheckAll',
5350 'uncheck-all.bs.table': 'onUncheckAll',
5351 'check-some.bs.table': 'onCheckSome',
5352 'uncheck-some.bs.table': 'onUncheckSome',
5353 'load-success.bs.table': 'onLoadSuccess',
5354 'load-error.bs.table': 'onLoadError',
5355 'column-switch.bs.table': 'onColumnSwitch',
5356 'column-switch-all.bs.table': 'onColumnSwitchAll',
5357 'page-change.bs.table': 'onPageChange',
5358 'search.bs.table': 'onSearch',
5359 'toggle.bs.table': 'onToggle',
5360 'pre-body.bs.table': 'onPreBody',
5361 'post-body.bs.table': 'onPostBody',
5362 'post-header.bs.table': 'onPostHeader',
5363 'post-footer.bs.table': 'onPostFooter',
5364 'expand-row.bs.table': 'onExpandRow',
5365 'collapse-row.bs.table': 'onCollapseRow',
5366 'refresh-options.bs.table': 'onRefreshOptions',
5367 'reset-view.bs.table': 'onResetView',
5368 'refresh.bs.table': 'onRefresh',
5369 'scroll-body.bs.table': 'onScrollBody',
5370 'toggle-pagination.bs.table': 'onTogglePagination',
5371 'virtual-scroll.bs.table': 'onVirtualScroll'
5372 };
5373 Object.assign(DEFAULTS, EN);
5374 var Constants = {
5375 VERSION: VERSION,
5376 THEME: "bootstrap".concat(bootstrapVersion),
5377 CONSTANTS: CONSTANTS,
5378 DEFAULTS: DEFAULTS,
5379 COLUMN_DEFAULTS: COLUMN_DEFAULTS,
5380 METHODS: METHODS,
5381 EVENTS: EVENTS,
5382 LOCALES: {
5383 en: EN,
5384 'en-US': EN
5385 }
5386 };
5387
5388 var BLOCK_ROWS = 50;
5389 var CLUSTER_BLOCKS = 4;
5390 var VirtualScroll = /*#__PURE__*/function () {
5391 function VirtualScroll(options) {
5392 var _this = this;
5393 _classCallCheck(this, VirtualScroll);
5394 this.rows = options.rows;
5395 this.scrollEl = options.scrollEl;
5396 this.contentEl = options.contentEl;
5397 this.callback = options.callback;
5398 this.itemHeight = options.itemHeight;
5399 this.cache = {};
5400 this.scrollTop = this.scrollEl.scrollTop;
5401 this.initDOM(this.rows, options.fixedScroll);
5402 this.scrollEl.scrollTop = this.scrollTop;
5403 this.lastCluster = 0;
5404 var onScroll = function onScroll() {
5405 if (_this.lastCluster !== (_this.lastCluster = _this.getNum())) {
5406 _this.initDOM(_this.rows);
5407 _this.callback(_this.startIndex, _this.endIndex);
5408 }
5409 };
5410 this.scrollEl.addEventListener('scroll', onScroll, false);
5411 this.destroy = function () {
5412 _this.contentEl.innerHtml = '';
5413 _this.scrollEl.removeEventListener('scroll', onScroll, false);
5414 };
5415 }
5416 _createClass(VirtualScroll, [{
5417 key: "initDOM",
5418 value: function initDOM(rows, fixedScroll) {
5419 if (typeof this.clusterHeight === 'undefined') {
5420 this.cache.scrollTop = this.scrollEl.scrollTop;
5421 this.cache.data = this.contentEl.innerHTML = rows[0] + rows[0] + rows[0];
5422 this.getRowsHeight(rows);
5423 }
5424 var data = this.initData(rows, this.getNum(fixedScroll));
5425 var thisRows = data.rows.join('');
5426 var dataChanged = this.checkChanges('data', thisRows);
5427 var topOffsetChanged = this.checkChanges('top', data.topOffset);
5428 var bottomOffsetChanged = this.checkChanges('bottom', data.bottomOffset);
5429 var html = [];
5430 if (dataChanged && topOffsetChanged) {
5431 if (data.topOffset) {
5432 html.push(this.getExtra('top', data.topOffset));
5433 }
5434 html.push(thisRows);
5435 if (data.bottomOffset) {
5436 html.push(this.getExtra('bottom', data.bottomOffset));
5437 }
5438 this.startIndex = data.start;
5439 this.endIndex = data.end;
5440 this.contentEl.innerHTML = html.join('');
5441 if (fixedScroll) {
5442 this.contentEl.scrollTop = this.cache.scrollTop;
5443 }
5444 } else if (bottomOffsetChanged) {
5445 this.contentEl.lastChild.style.height = "".concat(data.bottomOffset, "px");
5446 }
5447 }
5448 }, {
5449 key: "getRowsHeight",
5450 value: function getRowsHeight() {
5451 if (typeof this.itemHeight === 'undefined') {
5452 var nodes = this.contentEl.children;
5453 var node = nodes[Math.floor(nodes.length / 2)];
5454 this.itemHeight = node.offsetHeight;
5455 }
5456 this.blockHeight = this.itemHeight * BLOCK_ROWS;
5457 this.clusterRows = BLOCK_ROWS * CLUSTER_BLOCKS;
5458 this.clusterHeight = this.blockHeight * CLUSTER_BLOCKS;
5459 }
5460 }, {
5461 key: "getNum",
5462 value: function getNum(fixedScroll) {
5463 this.scrollTop = fixedScroll ? this.cache.scrollTop : this.scrollEl.scrollTop;
5464 return Math.floor(this.scrollTop / (this.clusterHeight - this.blockHeight)) || 0;
5465 }
5466 }, {
5467 key: "initData",
5468 value: function initData(rows, num) {
5469 if (rows.length < BLOCK_ROWS) {
5470 return {
5471 topOffset: 0,
5472 bottomOffset: 0,
5473 rowsAbove: 0,
5474 rows: rows
5475 };
5476 }
5477 var start = Math.max((this.clusterRows - BLOCK_ROWS) * num, 0);
5478 var end = start + this.clusterRows;
5479 var topOffset = Math.max(start * this.itemHeight, 0);
5480 var bottomOffset = Math.max((rows.length - end) * this.itemHeight, 0);
5481 var thisRows = [];
5482 var rowsAbove = start;
5483 if (topOffset < 1) {
5484 rowsAbove++;
5485 }
5486 for (var i = start; i < end; i++) {
5487 rows[i] && thisRows.push(rows[i]);
5488 }
5489 return {
5490 start: start,
5491 end: end,
5492 topOffset: topOffset,
5493 bottomOffset: bottomOffset,
5494 rowsAbove: rowsAbove,
5495 rows: thisRows
5496 };
5497 }
5498 }, {
5499 key: "checkChanges",
5500 value: function checkChanges(type, value) {
5501 var changed = value !== this.cache[type];
5502 this.cache[type] = value;
5503 return changed;
5504 }
5505 }, {
5506 key: "getExtra",
5507 value: function getExtra(className, height) {
5508 var tag = document.createElement('tr');
5509 tag.className = "virtual-scroll-".concat(className);
5510 if (height) {
5511 tag.style.height = "".concat(height, "px");
5512 }
5513 return tag.outerHTML;
5514 }
5515 }]);
5516 return VirtualScroll;
5517 }();
5518
5519 var BootstrapTable = /*#__PURE__*/function () {
5520 function BootstrapTable(el, options) {
5521 _classCallCheck(this, BootstrapTable);
5522 this.options = options;
5523 this.$el = $$o(el);
5524 this.$el_ = this.$el.clone();
5525 this.timeoutId_ = 0;
5526 this.timeoutFooter_ = 0;
5527 }
5528 _createClass(BootstrapTable, [{
5529 key: "init",
5530 value: function init() {
5531 this.initConstants();
5532 this.initLocale();
5533 this.initContainer();
5534 this.initTable();
5535 this.initHeader();
5536 this.initData();
5537 this.initHiddenRows();
5538 this.initToolbar();
5539 this.initPagination();
5540 this.initBody();
5541 this.initSearchText();
5542 this.initServer();
5543 }
5544 }, {
5545 key: "initConstants",
5546 value: function initConstants() {
5547 var opts = this.options;
5548 this.constants = Constants.CONSTANTS;
5549 this.constants.theme = $$o.fn.bootstrapTable.theme;
5550 this.constants.dataToggle = this.constants.html.dataToggle || 'data-toggle';
5551
5552 // init iconsPrefix and icons
5553 var iconsPrefix = Utils.getIconsPrefix($$o.fn.bootstrapTable.theme);
5554 var icons = Utils.getIcons(iconsPrefix);
5555 if (typeof opts.icons === 'string') {
5556 opts.icons = Utils.calculateObjectValue(null, opts.icons);
5557 }
5558 opts.iconsPrefix = opts.iconsPrefix || $$o.fn.bootstrapTable.defaults.iconsPrefix || iconsPrefix;
5559 opts.icons = Object.assign(icons, $$o.fn.bootstrapTable.defaults.icons, opts.icons);
5560
5561 // init buttons class
5562 var buttonsPrefix = opts.buttonsPrefix ? "".concat(opts.buttonsPrefix, "-") : '';
5563 this.constants.buttonsClass = [opts.buttonsPrefix, buttonsPrefix + opts.buttonsClass, Utils.sprintf("".concat(buttonsPrefix, "%s"), opts.iconSize)].join(' ').trim();
5564 this.buttons = Utils.calculateObjectValue(this, opts.buttons, [], {});
5565 if (_typeof(this.buttons) !== 'object') {
5566 this.buttons = {};
5567 }
5568 }
5569 }, {
5570 key: "initLocale",
5571 value: function initLocale() {
5572 if (this.options.locale) {
5573 var locales = $$o.fn.bootstrapTable.locales;
5574 var parts = this.options.locale.split(/-|_/);
5575 parts[0] = parts[0].toLowerCase();
5576 if (parts[1]) {
5577 parts[1] = parts[1].toUpperCase();
5578 }
5579 var localesToExtend = {};
5580 if (locales[this.options.locale]) {
5581 localesToExtend = locales[this.options.locale];
5582 } else if (locales[parts.join('-')]) {
5583 localesToExtend = locales[parts.join('-')];
5584 } else if (locales[parts[0]]) {
5585 localesToExtend = locales[parts[0]];
5586 }
5587 for (var _i = 0, _Object$entries = Object.entries(localesToExtend); _i < _Object$entries.length; _i++) {
5588 var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
5589 formatName = _Object$entries$_i[0],
5590 func = _Object$entries$_i[1];
5591 if (this.options[formatName] !== BootstrapTable.DEFAULTS[formatName]) {
5592 continue;
5593 }
5594 this.options[formatName] = func;
5595 }
5596 }
5597 }
5598 }, {
5599 key: "initContainer",
5600 value: function initContainer() {
5601 var topPagination = ['top', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination clearfix"></div>' : '';
5602 var bottomPagination = ['bottom', 'both'].includes(this.options.paginationVAlign) ? '<div class="fixed-table-pagination"></div>' : '';
5603 var loadingTemplate = Utils.calculateObjectValue(this.options, this.options.loadingTemplate, [this.options.formatLoadingMessage()]);
5604 this.$container = $$o("\n <div class=\"bootstrap-table ".concat(this.constants.theme, "\">\n <div class=\"fixed-table-toolbar\"></div>\n ").concat(topPagination, "\n <div class=\"fixed-table-container\">\n <div class=\"fixed-table-header\"><table></table></div>\n <div class=\"fixed-table-body\">\n <div class=\"fixed-table-loading\">\n ").concat(loadingTemplate, "\n </div>\n </div>\n <div class=\"fixed-table-footer\"></div>\n </div>\n ").concat(bottomPagination, "\n </div>\n "));
5605 this.$container.insertAfter(this.$el);
5606 this.$tableContainer = this.$container.find('.fixed-table-container');
5607 this.$tableHeader = this.$container.find('.fixed-table-header');
5608 this.$tableBody = this.$container.find('.fixed-table-body');
5609 this.$tableLoading = this.$container.find('.fixed-table-loading');
5610 this.$tableFooter = this.$el.find('tfoot');
5611 // checking if custom table-toolbar exists or not
5612 if (this.options.buttonsToolbar) {
5613 this.$toolbar = $$o('body').find(this.options.buttonsToolbar);
5614 } else {
5615 this.$toolbar = this.$container.find('.fixed-table-toolbar');
5616 }
5617 this.$pagination = this.$container.find('.fixed-table-pagination');
5618 this.$tableBody.append(this.$el);
5619 this.$container.after('<div class="clearfix"></div>');
5620 this.$el.addClass(this.options.classes);
5621 this.$tableLoading.addClass(this.options.classes);
5622 if (this.options.height) {
5623 this.$tableContainer.addClass('fixed-height');
5624 if (this.options.showFooter) {
5625 this.$tableContainer.addClass('has-footer');
5626 }
5627 if (this.options.classes.split(' ').includes('table-bordered')) {
5628 this.$tableBody.append('<div class="fixed-table-border"></div>');
5629 this.$tableBorder = this.$tableBody.find('.fixed-table-border');
5630 this.$tableLoading.addClass('fixed-table-border');
5631 }
5632 this.$tableFooter = this.$container.find('.fixed-table-footer');
5633 }
5634 }
5635 }, {
5636 key: "initTable",
5637 value: function initTable() {
5638 var _this = this;
5639 var columns = [];
5640 this.$header = this.$el.find('>thead');
5641 if (!this.$header.length) {
5642 this.$header = $$o("<thead class=\"".concat(this.options.theadClasses, "\"></thead>")).appendTo(this.$el);
5643 } else if (this.options.theadClasses) {
5644 this.$header.addClass(this.options.theadClasses);
5645 }
5646 this._headerTrClasses = [];
5647 this._headerTrStyles = [];
5648 this.$header.find('tr').each(function (i, el) {
5649 var $tr = $$o(el);
5650 var column = [];
5651 $tr.find('th').each(function (i, el) {
5652 var $th = $$o(el);
5653
5654 // #2014: getFieldIndex and elsewhere assume this is string, causes issues if not
5655 if (typeof $th.data('field') !== 'undefined') {
5656 $th.data('field', "".concat($th.data('field')));
5657 }
5658 var _data = Object.assign({}, $th.data());
5659 for (var key in _data) {
5660 if ($$o.fn.bootstrapTable.columnDefaults.hasOwnProperty(key)) {
5661 delete _data[key];
5662 }
5663 }
5664 column.push(Utils.extend({}, {
5665 _data: Utils.getRealDataAttr(_data),
5666 title: $th.html(),
5667 class: $th.attr('class'),
5668 titleTooltip: $th.attr('title'),
5669 rowspan: $th.attr('rowspan') ? +$th.attr('rowspan') : undefined,
5670 colspan: $th.attr('colspan') ? +$th.attr('colspan') : undefined
5671 }, $th.data()));
5672 });
5673 columns.push(column);
5674 if ($tr.attr('class')) {
5675 _this._headerTrClasses.push($tr.attr('class'));
5676 }
5677 if ($tr.attr('style')) {
5678 _this._headerTrStyles.push($tr.attr('style'));
5679 }
5680 });
5681 if (!Array.isArray(this.options.columns[0])) {
5682 this.options.columns = [this.options.columns];
5683 }
5684 this.options.columns = Utils.extend(true, [], columns, this.options.columns);
5685 this.columns = [];
5686 this.fieldsColumnsIndex = [];
5687 Utils.setFieldIndex(this.options.columns);
5688 this.options.columns.forEach(function (columns, i) {
5689 columns.forEach(function (_column, j) {
5690 var column = Utils.extend({}, BootstrapTable.COLUMN_DEFAULTS, _column, {
5691 passed: _column
5692 });
5693 if (typeof column.fieldIndex !== 'undefined') {
5694 _this.columns[column.fieldIndex] = column;
5695 _this.fieldsColumnsIndex[column.field] = column.fieldIndex;
5696 }
5697 _this.options.columns[i][j] = column;
5698 });
5699 });
5700
5701 // if options.data is setting, do not process tbody and tfoot data
5702 if (!this.options.data.length) {
5703 var htmlData = Utils.trToData(this.columns, this.$el.find('>tbody>tr'));
5704 if (htmlData.length) {
5705 this.options.data = htmlData;
5706 this.fromHtml = true;
5707 }
5708 }
5709 if (!(this.options.pagination && this.options.sidePagination !== 'server')) {
5710 this.footerData = Utils.trToData(this.columns, this.$el.find('>tfoot>tr'));
5711 }
5712 if (this.footerData) {
5713 this.$el.find('tfoot').html('<tr></tr>');
5714 }
5715 if (!this.options.showFooter || this.options.cardView) {
5716 this.$tableFooter.hide();
5717 } else {
5718 this.$tableFooter.show();
5719 }
5720 }
5721 }, {
5722 key: "initHeader",
5723 value: function initHeader() {
5724 var _this2 = this;
5725 var visibleColumns = {};
5726 var headerHtml = [];
5727 this.header = {
5728 fields: [],
5729 styles: [],
5730 classes: [],
5731 formatters: [],
5732 detailFormatters: [],
5733 events: [],
5734 sorters: [],
5735 sortNames: [],
5736 cellStyles: [],
5737 searchables: []
5738 };
5739 Utils.updateFieldGroup(this.options.columns, this.columns);
5740 this.options.columns.forEach(function (columns, i) {
5741 var html = [];
5742 html.push("<tr".concat(Utils.sprintf(' class="%s"', _this2._headerTrClasses[i]), " ").concat(Utils.sprintf(' style="%s"', _this2._headerTrStyles[i]), ">"));
5743 var detailViewTemplate = '';
5744 if (i === 0 && Utils.hasDetailViewIcon(_this2.options)) {
5745 var rowspan = _this2.options.columns.length > 1 ? " rowspan=\"".concat(_this2.options.columns.length, "\"") : '';
5746 detailViewTemplate = "<th class=\"detail\"".concat(rowspan, ">\n <div class=\"fht-cell\"></div>\n </th>");
5747 }
5748 if (detailViewTemplate && _this2.options.detailViewAlign !== 'right') {
5749 html.push(detailViewTemplate);
5750 }
5751 columns.forEach(function (column, j) {
5752 var class_ = Utils.sprintf(' class="%s"', column['class']);
5753 var unitWidth = column.widthUnit;
5754 var width = parseFloat(column.width);
5755 var columnHalign = column.halign ? column.halign : column.align;
5756 var halign = Utils.sprintf('text-align: %s; ', columnHalign);
5757 var align = Utils.sprintf('text-align: %s; ', column.align);
5758 var style = Utils.sprintf('vertical-align: %s; ', column.valign);
5759 style += Utils.sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? !column.showSelectTitle ? '36px' : undefined : width ? width + unitWidth : undefined);
5760 if (typeof column.fieldIndex === 'undefined' && !column.visible) {
5761 return;
5762 }
5763 var headerStyle = Utils.calculateObjectValue(null, _this2.options.headerStyle, [column]);
5764 var csses = [];
5765 var data_ = [];
5766 var classes = '';
5767 if (headerStyle && headerStyle.css) {
5768 for (var _i2 = 0, _Object$entries2 = Object.entries(headerStyle.css); _i2 < _Object$entries2.length; _i2++) {
5769 var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2),
5770 key = _Object$entries2$_i[0],
5771 value = _Object$entries2$_i[1];
5772 csses.push("".concat(key, ": ").concat(value));
5773 }
5774 }
5775 if (headerStyle && headerStyle.classes) {
5776 classes = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], headerStyle.classes].join(' ') : headerStyle.classes);
5777 }
5778 if (typeof column.fieldIndex !== 'undefined') {
5779 _this2.header.fields[column.fieldIndex] = column.field;
5780 _this2.header.styles[column.fieldIndex] = align + style;
5781 _this2.header.classes[column.fieldIndex] = class_;
5782 _this2.header.formatters[column.fieldIndex] = column.formatter;
5783 _this2.header.detailFormatters[column.fieldIndex] = column.detailFormatter;
5784 _this2.header.events[column.fieldIndex] = column.events;
5785 _this2.header.sorters[column.fieldIndex] = column.sorter;
5786 _this2.header.sortNames[column.fieldIndex] = column.sortName;
5787 _this2.header.cellStyles[column.fieldIndex] = column.cellStyle;
5788 _this2.header.searchables[column.fieldIndex] = column.searchable;
5789 if (!column.visible) {
5790 return;
5791 }
5792 if (_this2.options.cardView && !column.cardVisible) {
5793 return;
5794 }
5795 visibleColumns[column.field] = column;
5796 }
5797 if (Object.keys(column._data || {}).length > 0) {
5798 for (var _i3 = 0, _Object$entries3 = Object.entries(column._data); _i3 < _Object$entries3.length; _i3++) {
5799 var _Object$entries3$_i = _slicedToArray(_Object$entries3[_i3], 2),
5800 k = _Object$entries3$_i[0],
5801 v = _Object$entries3$_i[1];
5802 data_.push("data-".concat(k, "='").concat(_typeof(v) === 'object' ? JSON.stringify(v) : v, "'"));
5803 }
5804 }
5805 html.push("<th".concat(Utils.sprintf(' title="%s"', column.titleTooltip)), column.checkbox || column.radio ? Utils.sprintf(' class="bs-checkbox %s"', column['class'] || '') : classes || class_, Utils.sprintf(' style="%s"', halign + style + csses.join('; ')), Utils.sprintf(' rowspan="%s"', column.rowspan), Utils.sprintf(' colspan="%s"', column.colspan), Utils.sprintf(' data-field="%s"', column.field),
5806 // If `column` is not the first element of `this.options.columns[0]`, then className 'data-not-first-th' should be added.
5807 j === 0 && i > 0 ? ' data-not-first-th' : '', data_.length > 0 ? data_.join(' ') : '', '>');
5808 html.push(Utils.sprintf('<div class="th-inner %s">', _this2.options.sortable && column.sortable ? "sortable".concat(columnHalign === 'center' ? ' sortable-center' : '', " both") : ''));
5809 var text = _this2.options.escape && _this2.options.escapeTitle ? Utils.escapeHTML(column.title) : column.title;
5810 var title = text;
5811 if (column.checkbox) {
5812 text = '';
5813 if (!_this2.options.singleSelect && _this2.options.checkboxHeader) {
5814 text = '<label><input name="btSelectAll" type="checkbox" /><span></span></label>';
5815 }
5816 _this2.header.stateField = column.field;
5817 }
5818 if (column.radio) {
5819 text = '';
5820 _this2.header.stateField = column.field;
5821 }
5822 if (!text && column.showSelectTitle) {
5823 text += title;
5824 }
5825 html.push(text);
5826 html.push('</div>');
5827 html.push('<div class="fht-cell"></div>');
5828 html.push('</div>');
5829 html.push('</th>');
5830 });
5831 if (detailViewTemplate && _this2.options.detailViewAlign === 'right') {
5832 html.push(detailViewTemplate);
5833 }
5834 html.push('</tr>');
5835 if (html.length > 3) {
5836 headerHtml.push(html.join(''));
5837 }
5838 });
5839 this.$header.html(headerHtml.join(''));
5840 this.$header.find('th[data-field]').each(function (i, el) {
5841 $$o(el).data(visibleColumns[$$o(el).data('field')]);
5842 });
5843 this.$container.off('click', '.th-inner').on('click', '.th-inner', function (e) {
5844 var $this = $$o(e.currentTarget);
5845 if (_this2.options.detailView && !$this.parent().hasClass('bs-checkbox')) {
5846 if ($this.closest('.bootstrap-table')[0] !== _this2.$container[0]) {
5847 return false;
5848 }
5849 }
5850 if (_this2.options.sortable && $this.parent().data().sortable) {
5851 _this2.onSort(e);
5852 }
5853 });
5854 var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id'));
5855 $$o(window).off(resizeEvent);
5856 if (!this.options.showHeader || this.options.cardView) {
5857 this.$header.hide();
5858 this.$tableHeader.hide();
5859 this.$tableLoading.css('top', 0);
5860 } else {
5861 this.$header.show();
5862 this.$tableHeader.show();
5863 this.$tableLoading.css('top', this.$header.outerHeight() + 1);
5864 // Assign the correct sortable arrow
5865 this.getCaret();
5866 $$o(window).on(resizeEvent, function () {
5867 return _this2.resetView();
5868 });
5869 }
5870 this.$selectAll = this.$header.find('[name="btSelectAll"]');
5871 this.$selectAll.off('click').on('click', function (e) {
5872 e.stopPropagation();
5873 var checked = $$o(e.currentTarget).prop('checked');
5874 _this2[checked ? 'checkAll' : 'uncheckAll']();
5875 _this2.updateSelected();
5876 });
5877 }
5878 }, {
5879 key: "initData",
5880 value: function initData(data, type) {
5881 if (type === 'append') {
5882 this.options.data = this.options.data.concat(data);
5883 } else if (type === 'prepend') {
5884 this.options.data = [].concat(data).concat(this.options.data);
5885 } else {
5886 data = data || Utils.deepCopy(this.options.data);
5887 this.options.data = Array.isArray(data) ? data : data[this.options.dataField];
5888 }
5889 this.data = _toConsumableArray(this.options.data);
5890 if (this.options.sortReset) {
5891 this.unsortedData = _toConsumableArray(this.data);
5892 }
5893 if (this.options.sidePagination === 'server') {
5894 return;
5895 }
5896 this.initSort();
5897 }
5898 }, {
5899 key: "initSort",
5900 value: function initSort() {
5901 var _this3 = this;
5902 var name = this.options.sortName;
5903 var order = this.options.sortOrder === 'desc' ? -1 : 1;
5904 var index = this.header.fields.indexOf(this.options.sortName);
5905 var timeoutId = 0;
5906 if (index !== -1) {
5907 if (this.options.sortStable) {
5908 this.data.forEach(function (row, i) {
5909 if (!row.hasOwnProperty('_position')) {
5910 row._position = i;
5911 }
5912 });
5913 }
5914 if (this.options.customSort) {
5915 Utils.calculateObjectValue(this.options, this.options.customSort, [this.options.sortName, this.options.sortOrder, this.data]);
5916 } else {
5917 this.data.sort(function (a, b) {
5918 if (_this3.header.sortNames[index]) {
5919 name = _this3.header.sortNames[index];
5920 }
5921 var aa = Utils.getItemField(a, name, _this3.options.escape);
5922 var bb = Utils.getItemField(b, name, _this3.options.escape);
5923 var value = Utils.calculateObjectValue(_this3.header, _this3.header.sorters[index], [aa, bb, a, b]);
5924 if (value !== undefined) {
5925 if (_this3.options.sortStable && value === 0) {
5926 return order * (a._position - b._position);
5927 }
5928 return order * value;
5929 }
5930 return Utils.sort(aa, bb, order, _this3.options, a._position, b._position);
5931 });
5932 }
5933 if (this.options.sortClass !== undefined) {
5934 clearTimeout(timeoutId);
5935 timeoutId = setTimeout(function () {
5936 _this3.$el.removeClass(_this3.options.sortClass);
5937 var index = _this3.$header.find("[data-field=\"".concat(_this3.options.sortName, "\"]")).index();
5938 _this3.$el.find("tr td:nth-child(".concat(index + 1, ")")).addClass(_this3.options.sortClass);
5939 }, 250);
5940 }
5941 } else if (this.options.sortReset) {
5942 this.data = _toConsumableArray(this.unsortedData);
5943 }
5944 }
5945 }, {
5946 key: "onSort",
5947 value: function onSort(_ref) {
5948 var type = _ref.type,
5949 currentTarget = _ref.currentTarget;
5950 var $this = type === 'keypress' ? $$o(currentTarget) : $$o(currentTarget).parent();
5951 var $this_ = this.$header.find('th').eq($this.index());
5952 this.$header.add(this.$header_).find('span.order').remove();
5953 if (this.options.sortName === $this.data('field')) {
5954 var currentSortOrder = this.options.sortOrder;
5955 var initialSortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].sortOrder || this.columns[this.fieldsColumnsIndex[$this.data('field')]].order;
5956 if (currentSortOrder === undefined) {
5957 this.options.sortOrder = 'asc';
5958 } else if (currentSortOrder === 'asc') {
5959 this.options.sortOrder = this.options.sortReset ? initialSortOrder === 'asc' ? 'desc' : undefined : 'desc';
5960 } else if (this.options.sortOrder === 'desc') {
5961 this.options.sortOrder = this.options.sortReset ? initialSortOrder === 'desc' ? 'asc' : undefined : 'asc';
5962 }
5963 if (this.options.sortOrder === undefined) {
5964 this.options.sortName = undefined;
5965 }
5966 } else {
5967 this.options.sortName = $this.data('field');
5968 if (this.options.rememberOrder) {
5969 this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
5970 } else {
5971 this.options.sortOrder = this.columns[this.fieldsColumnsIndex[$this.data('field')]].sortOrder || this.columns[this.fieldsColumnsIndex[$this.data('field')]].order;
5972 }
5973 }
5974 this.trigger('sort', this.options.sortName, this.options.sortOrder);
5975 $this.add($this_).data('order', this.options.sortOrder);
5976
5977 // Assign the correct sortable arrow
5978 this.getCaret();
5979 if (this.options.sidePagination === 'server' && this.options.serverSort) {
5980 this.options.pageNumber = 1;
5981 this.initServer(this.options.silentSort);
5982 return;
5983 }
5984 if (this.options.pagination && this.options.sortResetPage) {
5985 this.options.pageNumber = 1;
5986 this.initPagination();
5987 }
5988 this.initSort();
5989 this.initBody();
5990 }
5991 }, {
5992 key: "initToolbar",
5993 value: function initToolbar() {
5994 var _this4 = this;
5995 var opts = this.options;
5996 var html = [];
5997 var timeoutId = 0;
5998 var $keepOpen;
5999 var switchableCount = 0;
6000 if (this.$toolbar.find('.bs-bars').children().length) {
6001 $$o('body').append($$o(opts.toolbar));
6002 }
6003 this.$toolbar.html('');
6004 if (typeof opts.toolbar === 'string' || _typeof(opts.toolbar) === 'object') {
6005 $$o(Utils.sprintf('<div class="bs-bars %s-%s"></div>', this.constants.classes.pull, opts.toolbarAlign)).appendTo(this.$toolbar).append($$o(opts.toolbar));
6006 }
6007
6008 // showColumns, showToggle, showRefresh
6009 html = ["<div class=\"".concat(['columns', "columns-".concat(opts.buttonsAlign), this.constants.classes.buttonsGroup, "".concat(this.constants.classes.pull, "-").concat(opts.buttonsAlign)].join(' '), "\">")];
6010 if (typeof opts.buttonsOrder === 'string') {
6011 opts.buttonsOrder = opts.buttonsOrder.replace(/\[|\]| |'/g, '').split(',');
6012 }
6013 this.buttons = Object.assign(this.buttons, {
6014 paginationSwitch: {
6015 text: opts.pagination ? opts.formatPaginationSwitchUp() : opts.formatPaginationSwitchDown(),
6016 icon: opts.pagination ? opts.icons.paginationSwitchDown : opts.icons.paginationSwitchUp,
6017 render: false,
6018 event: this.togglePagination,
6019 attributes: {
6020 'aria-label': opts.formatPaginationSwitch(),
6021 title: opts.formatPaginationSwitch()
6022 }
6023 },
6024 refresh: {
6025 text: opts.formatRefresh(),
6026 icon: opts.icons.refresh,
6027 render: false,
6028 event: this.refresh,
6029 attributes: {
6030 'aria-label': opts.formatRefresh(),
6031 title: opts.formatRefresh()
6032 }
6033 },
6034 toggle: {
6035 text: opts.formatToggleOn(),
6036 icon: opts.icons.toggleOff,
6037 render: false,
6038 event: this.toggleView,
6039 attributes: {
6040 'aria-label': opts.formatToggleOn(),
6041 title: opts.formatToggleOn()
6042 }
6043 },
6044 fullscreen: {
6045 text: opts.formatFullscreen(),
6046 icon: opts.icons.fullscreen,
6047 render: false,
6048 event: this.toggleFullscreen,
6049 attributes: {
6050 'aria-label': opts.formatFullscreen(),
6051 title: opts.formatFullscreen()
6052 }
6053 },
6054 columns: {
6055 render: false,
6056 html: function html() {
6057 var html = [];
6058 html.push("<div class=\"keep-open ".concat(_this4.constants.classes.buttonsDropdown, "\" title=\"").concat(opts.formatColumns(), "\">\n <button class=\"").concat(_this4.constants.buttonsClass, " dropdown-toggle\" type=\"button\" ").concat(_this4.constants.dataToggle, "=\"dropdown\"\n aria-label=\"").concat(opts.formatColumns(), "\" title=\"").concat(opts.formatColumns(), "\">\n ").concat(opts.showButtonIcons ? Utils.sprintf(_this4.constants.html.icon, opts.iconsPrefix, opts.icons.columns) : '', "\n ").concat(opts.showButtonText ? opts.formatColumns() : '', "\n ").concat(_this4.constants.html.dropdownCaret, "\n </button>\n ").concat(_this4.constants.html.toolbarDropdown[0]));
6059 if (opts.showColumnsSearch) {
6060 html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="text" class="%s" name="columnsSearch" placeholder="%s" autocomplete="off">', _this4.constants.classes.input, opts.formatSearch())));
6061 html.push(_this4.constants.html.toolbarDropdownSeparator);
6062 }
6063 if (opts.showColumnsToggleAll) {
6064 var allFieldsVisible = _this4.getVisibleColumns().length === _this4.columns.filter(function (column) {
6065 return !_this4.isSelectionColumn(column);
6066 }).length;
6067 html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" class="toggle-all" %s> <span>%s</span>', allFieldsVisible ? 'checked="checked"' : '', opts.formatColumnsToggleAll())));
6068 html.push(_this4.constants.html.toolbarDropdownSeparator);
6069 }
6070 var visibleColumns = 0;
6071 _this4.columns.forEach(function (column) {
6072 if (column.visible) {
6073 visibleColumns++;
6074 }
6075 });
6076 _this4.columns.forEach(function (column, i) {
6077 if (_this4.isSelectionColumn(column)) {
6078 return;
6079 }
6080 if (opts.cardView && !column.cardVisible) {
6081 return;
6082 }
6083 var checked = column.visible ? ' checked="checked"' : '';
6084 var disabled = visibleColumns <= opts.minimumCountColumns && checked ? ' disabled="disabled"' : '';
6085 if (column.switchable) {
6086 html.push(Utils.sprintf(_this4.constants.html.toolbarDropdownItem, Utils.sprintf('<input type="checkbox" data-field="%s" value="%s"%s%s> <span>%s</span>', column.field, i, checked, disabled, column.title)));
6087 switchableCount++;
6088 }
6089 });
6090 html.push(_this4.constants.html.toolbarDropdown[1], '</div>');
6091 return html.join('');
6092 }
6093 }
6094 });
6095 var buttonsHtml = {};
6096 for (var _i4 = 0, _Object$entries4 = Object.entries(this.buttons); _i4 < _Object$entries4.length; _i4++) {
6097 var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i4], 2),
6098 buttonName = _Object$entries4$_i[0],
6099 buttonConfig = _Object$entries4$_i[1];
6100 var buttonHtml = void 0;
6101 if (buttonConfig.hasOwnProperty('html')) {
6102 if (typeof buttonConfig.html === 'function') {
6103 buttonHtml = buttonConfig.html();
6104 } else if (typeof buttonConfig.html === 'string') {
6105 buttonHtml = buttonConfig.html;
6106 }
6107 } else {
6108 buttonHtml = "<button class=\"".concat(this.constants.buttonsClass, "\" type=\"button\" name=\"").concat(buttonName, "\"");
6109 if (buttonConfig.hasOwnProperty('attributes')) {
6110 for (var _i5 = 0, _Object$entries5 = Object.entries(buttonConfig.attributes); _i5 < _Object$entries5.length; _i5++) {
6111 var _Object$entries5$_i = _slicedToArray(_Object$entries5[_i5], 2),
6112 attributeName = _Object$entries5$_i[0],
6113 value = _Object$entries5$_i[1];
6114 buttonHtml += " ".concat(attributeName, "=\"").concat(value, "\"");
6115 }
6116 }
6117 buttonHtml += '>';
6118 if (opts.showButtonIcons && buttonConfig.hasOwnProperty('icon')) {
6119 buttonHtml += "".concat(Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, buttonConfig.icon), " ");
6120 }
6121 if (opts.showButtonText && buttonConfig.hasOwnProperty('text')) {
6122 buttonHtml += buttonConfig.text;
6123 }
6124 buttonHtml += '</button>';
6125 }
6126 buttonsHtml[buttonName] = buttonHtml;
6127 var optionName = "show".concat(buttonName.charAt(0).toUpperCase()).concat(buttonName.substring(1));
6128 var showOption = opts[optionName];
6129 if ((!buttonConfig.hasOwnProperty('render') || buttonConfig.hasOwnProperty('render') && buttonConfig.render) && (showOption === undefined || showOption === true)) {
6130 opts[optionName] = true;
6131 }
6132 if (!opts.buttonsOrder.includes(buttonName)) {
6133 opts.buttonsOrder.push(buttonName);
6134 }
6135 }
6136
6137 // Adding the button html to the final toolbar html when the showOption is true
6138 var _iterator = _createForOfIteratorHelper(opts.buttonsOrder),
6139 _step;
6140 try {
6141 for (_iterator.s(); !(_step = _iterator.n()).done;) {
6142 var button = _step.value;
6143 var _showOption = opts["show".concat(button.charAt(0).toUpperCase()).concat(button.substring(1))];
6144 if (_showOption) {
6145 html.push(buttonsHtml[button]);
6146 }
6147 }
6148 } catch (err) {
6149 _iterator.e(err);
6150 } finally {
6151 _iterator.f();
6152 }
6153 html.push('</div>');
6154
6155 // Fix #188: this.showToolbar is for extensions
6156 if (this.showToolbar || html.length > 2) {
6157 this.$toolbar.append(html.join(''));
6158 }
6159 for (var _i6 = 0, _Object$entries6 = Object.entries(this.buttons); _i6 < _Object$entries6.length; _i6++) {
6160 var _Object$entries6$_i = _slicedToArray(_Object$entries6[_i6], 2),
6161 _buttonName = _Object$entries6$_i[0],
6162 _buttonConfig = _Object$entries6$_i[1];
6163 if (_buttonConfig.hasOwnProperty('event')) {
6164 if (typeof _buttonConfig.event === 'function' || typeof _buttonConfig.event === 'string') {
6165 var _ret = function () {
6166 var event = typeof _buttonConfig.event === 'string' ? window[_buttonConfig.event] : _buttonConfig.event;
6167 _this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off('click').on('click', function () {
6168 return event.call(_this4);
6169 });
6170 return "continue";
6171 }();
6172 if (_ret === "continue") continue;
6173 }
6174 var _loop = function _loop() {
6175 var _Object$entries7$_i = _slicedToArray(_Object$entries7[_i7], 2),
6176 eventType = _Object$entries7$_i[0],
6177 eventFunction = _Object$entries7$_i[1];
6178 var event = typeof eventFunction === 'string' ? window[eventFunction] : eventFunction;
6179 _this4.$toolbar.find("button[name=\"".concat(_buttonName, "\"]")).off(eventType).on(eventType, function () {
6180 return event.call(_this4);
6181 });
6182 };
6183 for (var _i7 = 0, _Object$entries7 = Object.entries(_buttonConfig.event); _i7 < _Object$entries7.length; _i7++) {
6184 _loop();
6185 }
6186 }
6187 }
6188 if (opts.showColumns) {
6189 $keepOpen = this.$toolbar.find('.keep-open');
6190 var $checkboxes = $keepOpen.find('input[type="checkbox"]:not(".toggle-all")');
6191 var $toggleAll = $keepOpen.find('input[type="checkbox"].toggle-all');
6192 if (switchableCount <= opts.minimumCountColumns) {
6193 $keepOpen.find('input').prop('disabled', true);
6194 }
6195 $keepOpen.find('li, label').off('click').on('click', function (e) {
6196 e.stopImmediatePropagation();
6197 });
6198 $checkboxes.off('click').on('click', function (_ref2) {
6199 var currentTarget = _ref2.currentTarget;
6200 var $this = $$o(currentTarget);
6201 _this4._toggleColumn($this.val(), $this.prop('checked'), false);
6202 _this4.trigger('column-switch', $this.data('field'), $this.prop('checked'));
6203 $toggleAll.prop('checked', $checkboxes.filter(':checked').length === _this4.columns.filter(function (column) {
6204 return !_this4.isSelectionColumn(column);
6205 }).length);
6206 });
6207 $toggleAll.off('click').on('click', function (_ref3) {
6208 var currentTarget = _ref3.currentTarget;
6209 _this4._toggleAllColumns($$o(currentTarget).prop('checked'));
6210 _this4.trigger('column-switch-all', $$o(currentTarget).prop('checked'));
6211 });
6212 if (opts.showColumnsSearch) {
6213 var $columnsSearch = $keepOpen.find('[name="columnsSearch"]');
6214 var $listItems = $keepOpen.find('.dropdown-item-marker');
6215 $columnsSearch.on('keyup paste change', function (_ref4) {
6216 var currentTarget = _ref4.currentTarget;
6217 var $this = $$o(currentTarget);
6218 var searchValue = $this.val().toLowerCase();
6219 $listItems.show();
6220 $checkboxes.each(function (i, el) {
6221 var $checkbox = $$o(el);
6222 var $listItem = $checkbox.parents('.dropdown-item-marker');
6223 var text = $listItem.text().toLowerCase();
6224 if (!text.includes(searchValue)) {
6225 $listItem.hide();
6226 }
6227 });
6228 });
6229 }
6230 }
6231 var handleInputEvent = function handleInputEvent($searchInput) {
6232 var eventTriggers = 'keyup drop blur mouseup';
6233 $searchInput.off(eventTriggers).on(eventTriggers, function (event) {
6234 if (opts.searchOnEnterKey && event.keyCode !== 13) {
6235 return;
6236 }
6237 if ([37, 38, 39, 40].includes(event.keyCode)) {
6238 return;
6239 }
6240 clearTimeout(timeoutId); // doesn't matter if it's 0
6241 timeoutId = setTimeout(function () {
6242 _this4.onSearch({
6243 currentTarget: event.currentTarget
6244 });
6245 }, opts.searchTimeOut);
6246 });
6247 };
6248
6249 // Fix #4516: this.showSearchClearButton is for extensions
6250 if ((opts.search || this.showSearchClearButton) && typeof opts.searchSelector !== 'string') {
6251 html = [];
6252 var showSearchButton = Utils.sprintf(this.constants.html.searchButton, this.constants.buttonsClass, opts.formatSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.search) : '', opts.showButtonText ? opts.formatSearch() : '');
6253 var showSearchClearButton = Utils.sprintf(this.constants.html.searchClearButton, this.constants.buttonsClass, opts.formatClearSearch(), opts.showButtonIcons ? Utils.sprintf(this.constants.html.icon, opts.iconsPrefix, opts.icons.clearSearch) : '', opts.showButtonText ? opts.formatClearSearch() : '');
6254 var searchInputHtml = "<input class=\"".concat(this.constants.classes.input, "\n ").concat(Utils.sprintf(' %s%s', this.constants.classes.inputPrefix, opts.iconSize), "\n search-input\" type=\"search\" aria-label=\"").concat(opts.formatSearch(), "\" placeholder=\"").concat(opts.formatSearch(), "\" autocomplete=\"off\">");
6255 var searchInputFinalHtml = searchInputHtml;
6256 if (opts.showSearchButton || opts.showSearchClearButton) {
6257 var _buttonsHtml = (opts.showSearchButton ? showSearchButton : '') + (opts.showSearchClearButton ? showSearchClearButton : '');
6258 searchInputFinalHtml = opts.search ? Utils.sprintf(this.constants.html.inputGroup, searchInputHtml, _buttonsHtml) : _buttonsHtml;
6259 }
6260 html.push(Utils.sprintf("\n <div class=\"".concat(this.constants.classes.pull, "-").concat(opts.searchAlign, " search ").concat(this.constants.classes.inputGroup, "\">\n %s\n </div>\n "), searchInputFinalHtml));
6261 this.$toolbar.append(html.join(''));
6262 var $searchInput = Utils.getSearchInput(this);
6263 if (opts.showSearchButton) {
6264 this.$toolbar.find('.search button[name=search]').off('click').on('click', function () {
6265 clearTimeout(timeoutId); // doesn't matter if it's 0
6266 timeoutId = setTimeout(function () {
6267 _this4.onSearch({
6268 currentTarget: $searchInput
6269 });
6270 }, opts.searchTimeOut);
6271 });
6272 if (opts.searchOnEnterKey) {
6273 handleInputEvent($searchInput);
6274 }
6275 } else {
6276 handleInputEvent($searchInput);
6277 }
6278 if (opts.showSearchClearButton) {
6279 this.$toolbar.find('.search button[name=clearSearch]').click(function () {
6280 _this4.resetSearch();
6281 });
6282 }
6283 } else if (typeof opts.searchSelector === 'string') {
6284 var _$searchInput = Utils.getSearchInput(this);
6285 handleInputEvent(_$searchInput);
6286 }
6287 }
6288 }, {
6289 key: "onSearch",
6290 value: function onSearch() {
6291 var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
6292 currentTarget = _ref5.currentTarget,
6293 firedByInitSearchText = _ref5.firedByInitSearchText;
6294 var overwriteSearchText = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
6295 if (currentTarget !== undefined && $$o(currentTarget).length && overwriteSearchText) {
6296 var text = $$o(currentTarget).val().trim();
6297 if (this.options.trimOnSearch && $$o(currentTarget).val() !== text) {
6298 $$o(currentTarget).val(text);
6299 }
6300 if (this.searchText === text) {
6301 return;
6302 }
6303 var $searchInput = Utils.getSearchInput(this);
6304 var $currentTarget = currentTarget instanceof jQuery ? currentTarget : $$o(currentTarget);
6305 if ($currentTarget.is($searchInput) || $currentTarget.hasClass('search-input')) {
6306 this.searchText = text;
6307 this.options.searchText = text;
6308 }
6309 }
6310 if (!firedByInitSearchText) {
6311 this.options.pageNumber = 1;
6312 }
6313 this.initSearch();
6314 if (firedByInitSearchText) {
6315 if (this.options.sidePagination === 'client') {
6316 this.updatePagination();
6317 }
6318 } else {
6319 this.updatePagination();
6320 }
6321 this.trigger('search', this.searchText);
6322 }
6323 }, {
6324 key: "initSearch",
6325 value: function initSearch() {
6326 var _this5 = this;
6327 this.filterOptions = this.filterOptions || this.options.filterOptions;
6328 if (this.options.sidePagination !== 'server') {
6329 if (this.options.customSearch) {
6330 this.data = Utils.calculateObjectValue(this.options, this.options.customSearch, [this.options.data, this.searchText, this.filterColumns]);
6331 if (this.options.sortReset) {
6332 this.unsortedData = _toConsumableArray(this.data);
6333 }
6334 this.initSort();
6335 return;
6336 }
6337 var rawSearchText = this.searchText && (this.fromHtml ? Utils.escapeHTML(this.searchText) : this.searchText);
6338 var searchText = rawSearchText ? rawSearchText.toLowerCase() : '';
6339 var f = Utils.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
6340 if (this.options.searchAccentNeutralise) {
6341 searchText = Utils.normalizeAccent(searchText);
6342 }
6343
6344 // Check filter
6345 if (typeof this.filterOptions.filterAlgorithm === 'function') {
6346 this.data = this.options.data.filter(function (item) {
6347 return _this5.filterOptions.filterAlgorithm.apply(null, [item, f]);
6348 });
6349 } else if (typeof this.filterOptions.filterAlgorithm === 'string') {
6350 this.data = f ? this.options.data.filter(function (item) {
6351 var filterAlgorithm = _this5.filterOptions.filterAlgorithm;
6352 if (filterAlgorithm === 'and') {
6353 for (var key in f) {
6354 if (Array.isArray(f[key]) && !f[key].includes(item[key]) || !Array.isArray(f[key]) && item[key] !== f[key]) {
6355 return false;
6356 }
6357 }
6358 } else if (filterAlgorithm === 'or') {
6359 var match = false;
6360 for (var _key in f) {
6361 if (Array.isArray(f[_key]) && f[_key].includes(item[_key]) || !Array.isArray(f[_key]) && item[_key] === f[_key]) {
6362 match = true;
6363 }
6364 }
6365 return match;
6366 }
6367 return true;
6368 }) : _toConsumableArray(this.options.data);
6369 }
6370 var visibleFields = this.getVisibleFields();
6371 this.data = searchText ? this.data.filter(function (item, i) {
6372 for (var j = 0; j < _this5.header.fields.length; j++) {
6373 if (!_this5.header.searchables[j] || _this5.options.visibleSearch && visibleFields.indexOf(_this5.header.fields[j]) === -1) {
6374 continue;
6375 }
6376 var key = Utils.isNumeric(_this5.header.fields[j]) ? parseInt(_this5.header.fields[j], 10) : _this5.header.fields[j];
6377 var column = _this5.columns[_this5.fieldsColumnsIndex[key]];
6378 var value = void 0;
6379 if (typeof key === 'string') {
6380 value = item;
6381 var props = key.split('.');
6382 for (var _i8 = 0; _i8 < props.length; _i8++) {
6383 if (value[props[_i8]] !== null) {
6384 value = value[props[_i8]];
6385 } else {
6386 value = null;
6387 break;
6388 }
6389 }
6390 } else {
6391 value = item[key];
6392 }
6393 if (_this5.options.searchAccentNeutralise) {
6394 value = Utils.normalizeAccent(value);
6395 }
6396
6397 // Fix #142: respect searchFormatter boolean
6398 if (column && column.searchFormatter) {
6399 value = Utils.calculateObjectValue(column, _this5.header.formatters[j], [value, item, i, column.field], value);
6400 }
6401 if (typeof value === 'string' || typeof value === 'number') {
6402 if (_this5.options.strictSearch && "".concat(value).toLowerCase() === searchText || _this5.options.regexSearch && Utils.regexCompare(value, rawSearchText)) {
6403 return true;
6404 }
6405 var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(-?\d+)?|(-?\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
6406 var matches = largerSmallerEqualsRegex.exec(_this5.searchText);
6407 var comparisonCheck = false;
6408 if (matches) {
6409 var operator = matches[1] || "".concat(matches[5], "l");
6410 var comparisonValue = matches[2] || matches[3];
6411 var int = parseInt(value, 10);
6412 var comparisonInt = parseInt(comparisonValue, 10);
6413 switch (operator) {
6414 case '>':
6415 case '<l':
6416 comparisonCheck = int > comparisonInt;
6417 break;
6418 case '<':
6419 case '>l':
6420 comparisonCheck = int < comparisonInt;
6421 break;
6422 case '<=':
6423 case '=<':
6424 case '>=l':
6425 case '=>l':
6426 comparisonCheck = int <= comparisonInt;
6427 break;
6428 case '>=':
6429 case '=>':
6430 case '<=l':
6431 case '=<l':
6432 comparisonCheck = int >= comparisonInt;
6433 break;
6434 }
6435 }
6436 if (comparisonCheck || "".concat(value).toLowerCase().includes(searchText)) {
6437 return true;
6438 }
6439 }
6440 }
6441 return false;
6442 }) : this.data;
6443 if (this.options.sortReset) {
6444 this.unsortedData = _toConsumableArray(this.data);
6445 }
6446 this.initSort();
6447 }
6448 }
6449 }, {
6450 key: "initPagination",
6451 value: function initPagination() {
6452 var _this6 = this;
6453 var opts = this.options;
6454 if (!opts.pagination) {
6455 this.$pagination.hide();
6456 return;
6457 }
6458 this.$pagination.show();
6459 var html = [];
6460 var allSelected = false;
6461 var i;
6462 var from;
6463 var to;
6464 var $pageList;
6465 var $pre;
6466 var $next;
6467 var $number;
6468 var data = this.getData({
6469 includeHiddenRows: false
6470 });
6471 var pageList = opts.pageList;
6472 if (typeof pageList === 'string') {
6473 pageList = pageList.replace(/\[|\]| /g, '').toLowerCase().split(',');
6474 }
6475 pageList = pageList.map(function (value) {
6476 if (typeof value === 'string') {
6477 return value.toLowerCase() === opts.formatAllRows().toLowerCase() || ['all', 'unlimited'].includes(value.toLowerCase()) ? opts.formatAllRows() : +value;
6478 }
6479 return value;
6480 });
6481 this.paginationParts = opts.paginationParts;
6482 if (typeof this.paginationParts === 'string') {
6483 this.paginationParts = this.paginationParts.replace(/\[|\]| |'/g, '').split(',');
6484 }
6485 if (opts.sidePagination !== 'server') {
6486 opts.totalRows = data.length;
6487 }
6488 this.totalPages = 0;
6489 if (opts.totalRows) {
6490 if (opts.pageSize === opts.formatAllRows()) {
6491 opts.pageSize = opts.totalRows;
6492 allSelected = true;
6493 }
6494 this.totalPages = ~~((opts.totalRows - 1) / opts.pageSize) + 1;
6495 opts.totalPages = this.totalPages;
6496 }
6497 if (this.totalPages > 0 && opts.pageNumber > this.totalPages) {
6498 opts.pageNumber = this.totalPages;
6499 }
6500 this.pageFrom = (opts.pageNumber - 1) * opts.pageSize + 1;
6501 this.pageTo = opts.pageNumber * opts.pageSize;
6502 if (this.pageTo > opts.totalRows) {
6503 this.pageTo = opts.totalRows;
6504 }
6505 if (this.options.pagination && this.options.sidePagination !== 'server') {
6506 this.options.totalNotFiltered = this.options.data.length;
6507 }
6508 if (!this.options.showExtendedPagination) {
6509 this.options.totalNotFiltered = undefined;
6510 }
6511 if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) {
6512 html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationDetailHAlign, " pagination-detail\">"));
6513 }
6514 if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort')) {
6515 var paginationInfo = this.paginationParts.includes('pageInfoShort') ? opts.formatDetailPagination(opts.totalRows) : opts.formatShowingRows(this.pageFrom, this.pageTo, opts.totalRows, opts.totalNotFiltered);
6516 html.push("<span class=\"pagination-info\">\n ".concat(paginationInfo, "\n </span>"));
6517 }
6518 if (this.paginationParts.includes('pageSize')) {
6519 html.push('<div class="page-list">');
6520 var pageNumber = ["<div class=\"".concat(this.constants.classes.paginationDropdown, "\">\n <button class=\"").concat(this.constants.buttonsClass, " dropdown-toggle\" type=\"button\" ").concat(this.constants.dataToggle, "=\"dropdown\">\n <span class=\"page-size\">\n ").concat(allSelected ? opts.formatAllRows() : opts.pageSize, "\n </span>\n ").concat(this.constants.html.dropdownCaret, "\n </button>\n ").concat(this.constants.html.pageDropdown[0])];
6521 pageList.forEach(function (page, i) {
6522 if (!opts.smartDisplay || i === 0 || pageList[i - 1] < opts.totalRows || page === opts.formatAllRows()) {
6523 var active;
6524 if (allSelected) {
6525 active = page === opts.formatAllRows() ? _this6.constants.classes.dropdownActive : '';
6526 } else {
6527 active = page === opts.pageSize ? _this6.constants.classes.dropdownActive : '';
6528 }
6529 pageNumber.push(Utils.sprintf(_this6.constants.html.pageDropdownItem, active, page));
6530 }
6531 });
6532 pageNumber.push("".concat(this.constants.html.pageDropdown[1], "</div>"));
6533 html.push(opts.formatRecordsPerPage(pageNumber.join('')));
6534 }
6535 if (this.paginationParts.includes('pageInfo') || this.paginationParts.includes('pageInfoShort') || this.paginationParts.includes('pageSize')) {
6536 html.push('</div></div>');
6537 }
6538 if (this.paginationParts.includes('pageList')) {
6539 html.push("<div class=\"".concat(this.constants.classes.pull, "-").concat(opts.paginationHAlign, " pagination\">"), Utils.sprintf(this.constants.html.pagination[0], Utils.sprintf(' pagination-%s', opts.iconSize)), Utils.sprintf(this.constants.html.paginationItem, ' page-pre', opts.formatSRPaginationPreText(), opts.paginationPreText));
6540 if (this.totalPages < opts.paginationSuccessivelySize) {
6541 from = 1;
6542 to = this.totalPages;
6543 } else {
6544 from = opts.pageNumber - opts.paginationPagesBySide;
6545 to = from + opts.paginationPagesBySide * 2;
6546 }
6547 if (opts.pageNumber < opts.paginationSuccessivelySize - 1) {
6548 to = opts.paginationSuccessivelySize;
6549 }
6550 if (opts.paginationSuccessivelySize > this.totalPages - from) {
6551 from = from - (opts.paginationSuccessivelySize - (this.totalPages - from)) + 1;
6552 }
6553 if (from < 1) {
6554 from = 1;
6555 }
6556 if (to > this.totalPages) {
6557 to = this.totalPages;
6558 }
6559 var middleSize = Math.round(opts.paginationPagesBySide / 2);
6560 var pageItem = function pageItem(i) {
6561 var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
6562 return Utils.sprintf(_this6.constants.html.paginationItem, classes + (i === opts.pageNumber ? " ".concat(_this6.constants.classes.paginationActive) : ''), opts.formatSRPaginationPageText(i), i);
6563 };
6564 if (from > 1) {
6565 var max = opts.paginationPagesBySide;
6566 if (max >= from) max = from - 1;
6567 for (i = 1; i <= max; i++) {
6568 html.push(pageItem(i));
6569 }
6570 if (from - 1 === max + 1) {
6571 i = from - 1;
6572 html.push(pageItem(i));
6573 } else if (from - 1 > max) {
6574 if (from - opts.paginationPagesBySide * 2 > opts.paginationPagesBySide && opts.paginationUseIntermediate) {
6575 i = Math.round((from - middleSize) / 2 + middleSize);
6576 html.push(pageItem(i, ' page-intermediate'));
6577 } else {
6578 html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-first-separator disabled', '', '...'));
6579 }
6580 }
6581 }
6582 for (i = from; i <= to; i++) {
6583 html.push(pageItem(i));
6584 }
6585 if (this.totalPages > to) {
6586 var min = this.totalPages - (opts.paginationPagesBySide - 1);
6587 if (to >= min) min = to + 1;
6588 if (to + 1 === min - 1) {
6589 i = to + 1;
6590 html.push(pageItem(i));
6591 } else if (min > to + 1) {
6592 if (this.totalPages - to > opts.paginationPagesBySide * 2 && opts.paginationUseIntermediate) {
6593 i = Math.round((this.totalPages - middleSize - to) / 2 + to);
6594 html.push(pageItem(i, ' page-intermediate'));
6595 } else {
6596 html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-last-separator disabled', '', '...'));
6597 }
6598 }
6599 for (i = min; i <= this.totalPages; i++) {
6600 html.push(pageItem(i));
6601 }
6602 }
6603 html.push(Utils.sprintf(this.constants.html.paginationItem, ' page-next', opts.formatSRPaginationNextText(), opts.paginationNextText));
6604 html.push(this.constants.html.pagination[1], '</div>');
6605 }
6606 this.$pagination.html(html.join(''));
6607 var dropupClass = ['bottom', 'both'].includes(opts.paginationVAlign) ? " ".concat(this.constants.classes.dropup) : '';
6608 this.$pagination.last().find('.page-list > div').addClass(dropupClass);
6609 if (!opts.onlyInfoPagination) {
6610 $pageList = this.$pagination.find('.page-list a');
6611 $pre = this.$pagination.find('.page-pre');
6612 $next = this.$pagination.find('.page-next');
6613 $number = this.$pagination.find('.page-item').not('.page-next, .page-pre, .page-last-separator, .page-first-separator');
6614 if (this.totalPages <= 1) {
6615 this.$pagination.find('div.pagination').hide();
6616 }
6617 if (opts.smartDisplay) {
6618 if (pageList.length < 2 || opts.totalRows <= pageList[0]) {
6619 this.$pagination.find('div.page-list').hide();
6620 }
6621 }
6622
6623 // when data is empty, hide the pagination
6624 this.$pagination[this.getData().length ? 'show' : 'hide']();
6625 if (!opts.paginationLoop) {
6626 if (opts.pageNumber === 1) {
6627 $pre.addClass('disabled');
6628 }
6629 if (opts.pageNumber === this.totalPages) {
6630 $next.addClass('disabled');
6631 }
6632 }
6633 if (allSelected) {
6634 opts.pageSize = opts.formatAllRows();
6635 }
6636 // removed the events for last and first, onPageNumber executeds the same logic
6637 $pageList.off('click').on('click', function (e) {
6638 return _this6.onPageListChange(e);
6639 });
6640 $pre.off('click').on('click', function (e) {
6641 return _this6.onPagePre(e);
6642 });
6643 $next.off('click').on('click', function (e) {
6644 return _this6.onPageNext(e);
6645 });
6646 $number.off('click').on('click', function (e) {
6647 return _this6.onPageNumber(e);
6648 });
6649 }
6650 }
6651 }, {
6652 key: "updatePagination",
6653 value: function updatePagination(event) {
6654 // Fix #171: IE disabled button can be clicked bug.
6655 if (event && $$o(event.currentTarget).hasClass('disabled')) {
6656 return;
6657 }
6658 if (!this.options.maintainMetaData) {
6659 this.resetRows();
6660 }
6661 this.initPagination();
6662 this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
6663 if (this.options.sidePagination === 'server') {
6664 this.initServer();
6665 } else {
6666 this.initBody();
6667 }
6668 }
6669 }, {
6670 key: "onPageListChange",
6671 value: function onPageListChange(event) {
6672 event.preventDefault();
6673 var $this = $$o(event.currentTarget);
6674 $this.parent().addClass(this.constants.classes.dropdownActive).siblings().removeClass(this.constants.classes.dropdownActive);
6675 this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text();
6676 this.$toolbar.find('.page-size').text(this.options.pageSize);
6677 this.updatePagination(event);
6678 return false;
6679 }
6680 }, {
6681 key: "onPagePre",
6682 value: function onPagePre(event) {
6683 if ($$o(event.target).hasClass('disabled')) {
6684 return;
6685 }
6686 event.preventDefault();
6687 if (this.options.pageNumber - 1 === 0) {
6688 this.options.pageNumber = this.options.totalPages;
6689 } else {
6690 this.options.pageNumber--;
6691 }
6692 this.updatePagination(event);
6693 return false;
6694 }
6695 }, {
6696 key: "onPageNext",
6697 value: function onPageNext(event) {
6698 if ($$o(event.target).hasClass('disabled')) {
6699 return;
6700 }
6701 event.preventDefault();
6702 if (this.options.pageNumber + 1 > this.options.totalPages) {
6703 this.options.pageNumber = 1;
6704 } else {
6705 this.options.pageNumber++;
6706 }
6707 this.updatePagination(event);
6708 return false;
6709 }
6710 }, {
6711 key: "onPageNumber",
6712 value: function onPageNumber(event) {
6713 event.preventDefault();
6714 if (this.options.pageNumber === +$$o(event.currentTarget).text()) {
6715 return;
6716 }
6717 this.options.pageNumber = +$$o(event.currentTarget).text();
6718 this.updatePagination(event);
6719 return false;
6720 }
6721
6722 // eslint-disable-next-line no-unused-vars
6723 }, {
6724 key: "initRow",
6725 value: function initRow(item, i, data, trFragments) {
6726 var _this7 = this;
6727 var html = [];
6728 var style = {};
6729 var csses = [];
6730 var data_ = '';
6731 var attributes = {};
6732 var htmlAttributes = [];
6733 if (Utils.findIndex(this.hiddenRows, item) > -1) {
6734 return;
6735 }
6736 style = Utils.calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
6737 if (style && style.css) {
6738 for (var _i9 = 0, _Object$entries8 = Object.entries(style.css); _i9 < _Object$entries8.length; _i9++) {
6739 var _Object$entries8$_i = _slicedToArray(_Object$entries8[_i9], 2),
6740 key = _Object$entries8$_i[0],
6741 value = _Object$entries8$_i[1];
6742 csses.push("".concat(key, ": ").concat(value));
6743 }
6744 }
6745 attributes = Utils.calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes);
6746 if (attributes) {
6747 for (var _i10 = 0, _Object$entries9 = Object.entries(attributes); _i10 < _Object$entries9.length; _i10++) {
6748 var _Object$entries9$_i = _slicedToArray(_Object$entries9[_i10], 2),
6749 _key2 = _Object$entries9$_i[0],
6750 _value = _Object$entries9$_i[1];
6751 htmlAttributes.push("".concat(_key2, "=\"").concat(Utils.escapeHTML(_value), "\""));
6752 }
6753 }
6754 if (item._data && !Utils.isEmptyObject(item._data)) {
6755 for (var _i11 = 0, _Object$entries10 = Object.entries(item._data); _i11 < _Object$entries10.length; _i11++) {
6756 var _Object$entries10$_i = _slicedToArray(_Object$entries10[_i11], 2),
6757 k = _Object$entries10$_i[0],
6758 v = _Object$entries10$_i[1];
6759 // ignore data-index
6760 if (k === 'index') {
6761 return;
6762 }
6763 data_ += " data-".concat(k, "='").concat(_typeof(v) === 'object' ? JSON.stringify(v) : v, "'");
6764 }
6765 }
6766 html.push('<tr', Utils.sprintf(' %s', htmlAttributes.length ? htmlAttributes.join(' ') : undefined), Utils.sprintf(' id="%s"', Array.isArray(item) ? undefined : item._id), Utils.sprintf(' class="%s"', style.classes || (Array.isArray(item) ? undefined : item._class)), Utils.sprintf(' style="%s"', Array.isArray(item) ? undefined : item._style), " data-index=\"".concat(i, "\""), Utils.sprintf(' data-uniqueid="%s"', Utils.getItemField(item, this.options.uniqueId, false)), Utils.sprintf(' data-has-detail-view="%s"', this.options.detailView && Utils.calculateObjectValue(null, this.options.detailFilter, [i, item]) ? 'true' : undefined), Utils.sprintf('%s', data_), '>');
6767 if (this.options.cardView) {
6768 html.push("<td colspan=\"".concat(this.header.fields.length, "\"><div class=\"card-views\">"));
6769 }
6770 var detailViewTemplate = '';
6771 if (Utils.hasDetailViewIcon(this.options)) {
6772 detailViewTemplate = '<td>';
6773 if (Utils.calculateObjectValue(null, this.options.detailFilter, [i, item])) {
6774 detailViewTemplate += "\n <a class=\"detail-icon\" href=\"#\">\n ".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen), "\n </a>\n ");
6775 }
6776 detailViewTemplate += '</td>';
6777 }
6778 if (detailViewTemplate && this.options.detailViewAlign !== 'right') {
6779 html.push(detailViewTemplate);
6780 }
6781 this.header.fields.forEach(function (field, j) {
6782 var column = _this7.columns[j];
6783 var text = '';
6784 var value_ = Utils.getItemField(item, field, _this7.options.escape, column.escape);
6785 var value = '';
6786 var type = '';
6787 var cellStyle = {};
6788 var id_ = '';
6789 var class_ = _this7.header.classes[j];
6790 var style_ = '';
6791 var styleToAdd_ = '';
6792 var data_ = '';
6793 var rowspan_ = '';
6794 var colspan_ = '';
6795 var title_ = '';
6796 if ((_this7.fromHtml || _this7.autoMergeCells) && typeof value_ === 'undefined') {
6797 if (!column.checkbox && !column.radio) {
6798 return;
6799 }
6800 }
6801 if (!column.visible) {
6802 return;
6803 }
6804 if (_this7.options.cardView && !column.cardVisible) {
6805 return;
6806 }
6807
6808 // Style concat
6809 if (csses.concat([_this7.header.styles[j]]).length) {
6810 styleToAdd_ += "".concat(csses.concat([_this7.header.styles[j]]).join('; '));
6811 }
6812 if (item["_".concat(field, "_style")]) {
6813 styleToAdd_ += "".concat(item["_".concat(field, "_style")]);
6814 }
6815 if (styleToAdd_) {
6816 style_ = " style=\"".concat(styleToAdd_, "\"");
6817 }
6818 // Style concat
6819
6820 // handle id and class of td
6821 if (item["_".concat(field, "_id")]) {
6822 id_ = Utils.sprintf(' id="%s"', item["_".concat(field, "_id")]);
6823 }
6824 if (item["_".concat(field, "_class")]) {
6825 class_ = Utils.sprintf(' class="%s"', item["_".concat(field, "_class")]);
6826 }
6827 if (item["_".concat(field, "_rowspan")]) {
6828 rowspan_ = Utils.sprintf(' rowspan="%s"', item["_".concat(field, "_rowspan")]);
6829 }
6830 if (item["_".concat(field, "_colspan")]) {
6831 colspan_ = Utils.sprintf(' colspan="%s"', item["_".concat(field, "_colspan")]);
6832 }
6833 if (item["_".concat(field, "_title")]) {
6834 title_ = Utils.sprintf(' title="%s"', item["_".concat(field, "_title")]);
6835 }
6836 cellStyle = Utils.calculateObjectValue(_this7.header, _this7.header.cellStyles[j], [value_, item, i, field], cellStyle);
6837 if (cellStyle.classes) {
6838 class_ = " class=\"".concat(cellStyle.classes, "\"");
6839 }
6840 if (cellStyle.css) {
6841 var csses_ = [];
6842 for (var _i12 = 0, _Object$entries11 = Object.entries(cellStyle.css); _i12 < _Object$entries11.length; _i12++) {
6843 var _Object$entries11$_i = _slicedToArray(_Object$entries11[_i12], 2),
6844 _key3 = _Object$entries11$_i[0],
6845 _value2 = _Object$entries11$_i[1];
6846 csses_.push("".concat(_key3, ": ").concat(_value2));
6847 }
6848 style_ = " style=\"".concat(csses_.concat(_this7.header.styles[j]).join('; '), "\"");
6849 }
6850 value = Utils.calculateObjectValue(column, _this7.header.formatters[j], [value_, item, i, field], value_);
6851 if (!(column.checkbox || column.radio)) {
6852 value = typeof value === 'undefined' || value === null ? _this7.options.undefinedText : value;
6853 }
6854 if (column.searchable && _this7.searchText && _this7.options.searchHighlight && !(column.checkbox || column.radio)) {
6855 var defValue = '';
6856 var searchText = _this7.searchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
6857 if (_this7.options.searchAccentNeutralise) {
6858 var indexRegex = new RegExp("".concat(Utils.normalizeAccent(searchText)), 'gmi');
6859 var match = indexRegex.exec(Utils.normalizeAccent(value));
6860 if (match) {
6861 searchText = value.substring(match.index, match.index + searchText.length);
6862 }
6863 }
6864 var regExp = new RegExp("(".concat(searchText, ")"), 'gim');
6865 var marker = '<mark>$1</mark>';
6866 var isHTML = value && /<(?=.*? .*?\/ ?>|br|hr|input|!--|wbr)[a-z]+.*?>|<([a-z]+).*?<\/\1>/i.test(value);
6867 if (isHTML) {
6868 // value can contains a HTML tags
6869 var textContent = new DOMParser().parseFromString(value.toString(), 'text/html').documentElement.textContent;
6870 var textReplaced = textContent.replace(regExp, marker);
6871 textContent = textContent.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
6872 defValue = value.replace(new RegExp("(>\\s*)(".concat(textContent, ")(\\s*)"), 'gm'), "$1".concat(textReplaced, "$3"));
6873 } else {
6874 // but usually not
6875 defValue = value.toString().replace(regExp, marker);
6876 }
6877 value = Utils.calculateObjectValue(column, column.searchHighlightFormatter, [value, _this7.searchText], defValue);
6878 }
6879 if (item["_".concat(field, "_data")] && !Utils.isEmptyObject(item["_".concat(field, "_data")])) {
6880 for (var _i13 = 0, _Object$entries12 = Object.entries(item["_".concat(field, "_data")]); _i13 < _Object$entries12.length; _i13++) {
6881 var _Object$entries12$_i = _slicedToArray(_Object$entries12[_i13], 2),
6882 _k = _Object$entries12$_i[0],
6883 _v = _Object$entries12$_i[1];
6884 // ignore data-index
6885 if (_k === 'index') {
6886 return;
6887 }
6888 data_ += " data-".concat(_k, "=\"").concat(_v, "\"");
6889 }
6890 }
6891 if (column.checkbox || column.radio) {
6892 type = column.checkbox ? 'checkbox' : type;
6893 type = column.radio ? 'radio' : type;
6894 var c = column['class'] || '';
6895 var isChecked = Utils.isObject(value) && value.hasOwnProperty('checked') ? value.checked : (value === true || value_) && value !== false;
6896 var isDisabled = !column.checkboxEnabled || value && value.disabled;
6897 text = [_this7.options.cardView ? "<div class=\"card-view ".concat(c, "\">") : "<td class=\"bs-checkbox ".concat(c, "\"").concat(class_).concat(style_, ">"), "<label>\n <input\n data-index=\"".concat(i, "\"\n name=\"").concat(_this7.options.selectItemName, "\"\n type=\"").concat(type, "\"\n ").concat(Utils.sprintf('value="%s"', item[_this7.options.idField]), "\n ").concat(Utils.sprintf('checked="%s"', isChecked ? 'checked' : undefined), "\n ").concat(Utils.sprintf('disabled="%s"', isDisabled ? 'disabled' : undefined), " />\n <span></span>\n </label>"), _this7.header.formatters[j] && typeof value === 'string' ? value : '', _this7.options.cardView ? '</div>' : '</td>'].join('');
6898 item[_this7.header.stateField] = value === true || !!value_ || value && value.checked;
6899 } else if (_this7.options.cardView) {
6900 var cardTitle = _this7.options.showHeader ? "<span class=\"card-view-title ".concat(cellStyle.classes || '', "\"").concat(style_, ">").concat(Utils.getFieldTitle(_this7.columns, field), "</span>") : '';
6901 text = "<div class=\"card-view\">".concat(cardTitle, "<span class=\"card-view-value ").concat(cellStyle.classes || '', "\"").concat(style_, ">").concat(value, "</span></div>");
6902 if (_this7.options.smartDisplay && value === '') {
6903 text = '<div class="card-view"></div>';
6904 }
6905 } else {
6906 text = "<td".concat(id_).concat(class_).concat(style_).concat(data_).concat(rowspan_).concat(colspan_).concat(title_, ">").concat(value, "</td>");
6907 }
6908 html.push(text);
6909 });
6910 if (detailViewTemplate && this.options.detailViewAlign === 'right') {
6911 html.push(detailViewTemplate);
6912 }
6913 if (this.options.cardView) {
6914 html.push('</div></td>');
6915 }
6916 html.push('</tr>');
6917 return html.join('');
6918 }
6919 }, {
6920 key: "initBody",
6921 value: function initBody(fixedScroll, updatedUid) {
6922 var _this8 = this;
6923 var data = this.getData();
6924 this.trigger('pre-body', data);
6925 this.$body = this.$el.find('>tbody');
6926 if (!this.$body.length) {
6927 this.$body = $$o('<tbody></tbody>').appendTo(this.$el);
6928 }
6929
6930 // Fix #389 Bootstrap-table-flatJSON is not working
6931 if (!this.options.pagination || this.options.sidePagination === 'server') {
6932 this.pageFrom = 1;
6933 this.pageTo = data.length;
6934 }
6935 var rows = [];
6936 var trFragments = $$o(document.createDocumentFragment());
6937 var hasTr = false;
6938 var toExpand = [];
6939 this.autoMergeCells = Utils.checkAutoMergeCells(data.slice(this.pageFrom - 1, this.pageTo));
6940 for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
6941 var item = data[i];
6942 var tr = this.initRow(item, i, data, trFragments);
6943 hasTr = hasTr || !!tr;
6944 if (tr && typeof tr === 'string') {
6945 var uniqueId = this.options.uniqueId;
6946 if (uniqueId && item.hasOwnProperty(uniqueId)) {
6947 var itemUniqueId = item[uniqueId];
6948 var oldTr = this.$body.find(Utils.sprintf('> tr[data-uniqueid="%s"][data-has-detail-view]', itemUniqueId));
6949 var oldTrNext = oldTr.next();
6950 if (oldTrNext.is('tr.detail-view')) {
6951 toExpand.push(i);
6952 if (!updatedUid || itemUniqueId !== updatedUid) {
6953 tr += oldTrNext[0].outerHTML;
6954 }
6955 }
6956 }
6957 if (!this.options.virtualScroll) {
6958 trFragments.append(tr);
6959 } else {
6960 rows.push(tr);
6961 }
6962 }
6963 }
6964
6965 // show no records
6966 if (!hasTr) {
6967 this.$body.html("<tr class=\"no-records-found\">".concat(Utils.sprintf('<td colspan="%s">%s</td>', this.getVisibleFields().length + Utils.getDetailViewIndexOffset(this.options), this.options.formatNoMatches()), "</tr>"));
6968 } else if (!this.options.virtualScroll) {
6969 this.$body.html(trFragments);
6970 } else {
6971 if (this.virtualScroll) {
6972 this.virtualScroll.destroy();
6973 }
6974 this.virtualScroll = new VirtualScroll({
6975 rows: rows,
6976 fixedScroll: fixedScroll,
6977 scrollEl: this.$tableBody[0],
6978 contentEl: this.$body[0],
6979 itemHeight: this.options.virtualScrollItemHeight,
6980 callback: function callback(startIndex, endIndex) {
6981 _this8.fitHeader();
6982 _this8.initBodyEvent();
6983 _this8.trigger('virtual-scroll', startIndex, endIndex);
6984 }
6985 });
6986 }
6987 toExpand.forEach(function (index) {
6988 _this8.expandRow(index);
6989 });
6990 if (!fixedScroll) {
6991 this.scrollTo(0);
6992 }
6993 this.initBodyEvent();
6994 this.initFooter();
6995 this.resetView();
6996 this.updateSelected();
6997 if (this.options.sidePagination !== 'server') {
6998 this.options.totalRows = data.length;
6999 }
7000 this.trigger('post-body', data);
7001 }
7002 }, {
7003 key: "initBodyEvent",
7004 value: function initBodyEvent() {
7005 var _this9 = this;
7006 // click to select by column
7007 this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) {
7008 var $td = $$o(e.currentTarget);
7009 if ($td.find('.detail-icon').length || $td.index() - Utils.getDetailViewIndexOffset(_this9.options) < 0) {
7010 return;
7011 }
7012 var $tr = $td.parent();
7013 var $cardViewArr = $$o(e.target).parents('.card-views').children();
7014 var $cardViewTarget = $$o(e.target).parents('.card-view');
7015 var rowIndex = $tr.data('index');
7016 var item = _this9.data[rowIndex];
7017 var index = _this9.options.cardView ? $cardViewArr.index($cardViewTarget) : $td[0].cellIndex;
7018 var fields = _this9.getVisibleFields();
7019 var field = fields[index - Utils.getDetailViewIndexOffset(_this9.options)];
7020 var column = _this9.columns[_this9.fieldsColumnsIndex[field]];
7021 var value = Utils.getItemField(item, field, _this9.options.escape, column.escape);
7022 _this9.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td);
7023 _this9.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field);
7024
7025 // if click to select - then trigger the checkbox/radio click
7026 if (e.type === 'click' && _this9.options.clickToSelect && column.clickToSelect && !Utils.calculateObjectValue(_this9.options, _this9.options.ignoreClickToSelectOn, [e.target])) {
7027 var $selectItem = $tr.find(Utils.sprintf('[name="%s"]', _this9.options.selectItemName));
7028 if ($selectItem.length) {
7029 $selectItem[0].click();
7030 }
7031 }
7032 if (e.type === 'click' && _this9.options.detailViewByClick) {
7033 _this9.toggleDetailView(rowIndex, _this9.header.detailFormatters[_this9.fieldsColumnsIndex[field]]);
7034 }
7035 }).off('mousedown').on('mousedown', function (e) {
7036 // https://github.com/jquery/jquery/issues/1741
7037 _this9.multipleSelectRowCtrlKey = e.ctrlKey || e.metaKey;
7038 _this9.multipleSelectRowShiftKey = e.shiftKey;
7039 });
7040 this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function (e) {
7041 e.preventDefault();
7042 _this9.toggleDetailView($$o(e.currentTarget).parent().parent().data('index'));
7043 return false;
7044 });
7045 this.$selectItem = this.$body.find(Utils.sprintf('[name="%s"]', this.options.selectItemName));
7046 this.$selectItem.off('click').on('click', function (e) {
7047 e.stopImmediatePropagation();
7048 var $this = $$o(e.currentTarget);
7049 _this9._toggleCheck($this.prop('checked'), $this.data('index'));
7050 });
7051 this.header.events.forEach(function (_events, i) {
7052 var events = _events;
7053 if (!events) {
7054 return;
7055 }
7056 // fix bug, if events is defined with namespace
7057 if (typeof events === 'string') {
7058 events = Utils.calculateObjectValue(null, events);
7059 }
7060 if (!events) {
7061 throw new Error("Unknown event in the scope: ".concat(_events));
7062 }
7063 var field = _this9.header.fields[i];
7064 var fieldIndex = _this9.getVisibleFields().indexOf(field);
7065 if (fieldIndex === -1) {
7066 return;
7067 }
7068 fieldIndex += Utils.getDetailViewIndexOffset(_this9.options);
7069 var _loop2 = function _loop2(key) {
7070 if (!events.hasOwnProperty(key)) {
7071 return "continue";
7072 }
7073 var event = events[key];
7074 _this9.$body.find('>tr:not(.no-records-found)').each(function (i, tr) {
7075 var $tr = $$o(tr);
7076 var $td = $tr.find(_this9.options.cardView ? '.card-views>.card-view' : '>td').eq(fieldIndex);
7077 var index = key.indexOf(' ');
7078 var name = key.substring(0, index);
7079 var el = key.substring(index + 1);
7080 $td.find(el).off(name).on(name, function (e) {
7081 var index = $tr.data('index');
7082 var row = _this9.data[index];
7083 var value = row[field];
7084 event.apply(_this9, [e, value, row, index]);
7085 });
7086 });
7087 };
7088 for (var key in events) {
7089 var _ret2 = _loop2(key);
7090 if (_ret2 === "continue") continue;
7091 }
7092 });
7093 }
7094 }, {
7095 key: "initServer",
7096 value: function initServer(silent, query, url) {
7097 var _this10 = this;
7098 var data = {};
7099 var index = this.header.fields.indexOf(this.options.sortName);
7100 var params = {
7101 searchText: this.searchText,
7102 sortName: this.options.sortName,
7103 sortOrder: this.options.sortOrder
7104 };
7105 if (this.header.sortNames[index]) {
7106 params.sortName = this.header.sortNames[index];
7107 }
7108 if (this.options.pagination && this.options.sidePagination === 'server') {
7109 params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
7110 params.pageNumber = this.options.pageNumber;
7111 }
7112 if (!(url || this.options.url) && !this.options.ajax) {
7113 return;
7114 }
7115 if (this.options.queryParamsType === 'limit') {
7116 params = {
7117 search: params.searchText,
7118 sort: params.sortName,
7119 order: params.sortOrder
7120 };
7121 if (this.options.pagination && this.options.sidePagination === 'server') {
7122 params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1);
7123 params.limit = this.options.pageSize;
7124 if (params.limit === 0 || this.options.pageSize === this.options.formatAllRows()) {
7125 delete params.limit;
7126 }
7127 }
7128 }
7129 if (this.options.search && this.options.sidePagination === 'server' && this.columns.filter(function (column) {
7130 return column.searchable;
7131 }).length) {
7132 params.searchable = [];
7133 var _iterator2 = _createForOfIteratorHelper(this.columns),
7134 _step2;
7135 try {
7136 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
7137 var column = _step2.value;
7138 if (!column.checkbox && column.searchable && (this.options.visibleSearch && column.visible || !this.options.visibleSearch)) {
7139 params.searchable.push(column.field);
7140 }
7141 }
7142 } catch (err) {
7143 _iterator2.e(err);
7144 } finally {
7145 _iterator2.f();
7146 }
7147 }
7148 if (!Utils.isEmptyObject(this.filterColumnsPartial)) {
7149 params.filter = JSON.stringify(this.filterColumnsPartial, null);
7150 }
7151 Utils.extend(params, query || {});
7152 data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data);
7153
7154 // false to stop request
7155 if (data === false) {
7156 return;
7157 }
7158 if (!silent) {
7159 this.showLoading();
7160 }
7161 var request = Utils.extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), {
7162 type: this.options.method,
7163 url: url || this.options.url,
7164 data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data,
7165 cache: this.options.cache,
7166 contentType: this.options.contentType,
7167 dataType: this.options.dataType,
7168 success: function success(_res, textStatus, jqXHR) {
7169 var res = Utils.calculateObjectValue(_this10.options, _this10.options.responseHandler, [_res, jqXHR], _res);
7170 _this10.load(res);
7171 _this10.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR);
7172 if (!silent) {
7173 _this10.hideLoading();
7174 }
7175 if (_this10.options.sidePagination === 'server' && _this10.options.pageNumber > 1 && res[_this10.options.totalField] > 0 && !res[_this10.options.dataField].length) {
7176 _this10.updatePagination();
7177 }
7178 },
7179 error: function error(jqXHR) {
7180 // abort ajax by multiple request
7181 if (jqXHR && jqXHR.status === 0 && _this10._xhrAbort) {
7182 _this10._xhrAbort = false;
7183 return;
7184 }
7185 var data = [];
7186 if (_this10.options.sidePagination === 'server') {
7187 data = {};
7188 data[_this10.options.totalField] = 0;
7189 data[_this10.options.dataField] = [];
7190 }
7191 _this10.load(data);
7192 _this10.trigger('load-error', jqXHR && jqXHR.status, jqXHR);
7193 if (!silent) {
7194 _this10.hideLoading();
7195 }
7196 }
7197 });
7198 if (this.options.ajax) {
7199 Utils.calculateObjectValue(this, this.options.ajax, [request], null);
7200 } else {
7201 if (this._xhr && this._xhr.readyState !== 4) {
7202 this._xhrAbort = true;
7203 this._xhr.abort();
7204 }
7205 this._xhr = $$o.ajax(request);
7206 }
7207 return data;
7208 }
7209 }, {
7210 key: "initSearchText",
7211 value: function initSearchText() {
7212 if (this.options.search) {
7213 this.searchText = '';
7214 if (this.options.searchText !== '') {
7215 var $search = Utils.getSearchInput(this);
7216 $search.val(this.options.searchText);
7217 this.onSearch({
7218 currentTarget: $search,
7219 firedByInitSearchText: true
7220 });
7221 }
7222 }
7223 }
7224 }, {
7225 key: "getCaret",
7226 value: function getCaret() {
7227 var _this11 = this;
7228 this.$header.find('th').each(function (i, th) {
7229 $$o(th).find('.sortable').removeClass('desc asc').addClass($$o(th).data('field') === _this11.options.sortName ? _this11.options.sortOrder : 'both');
7230 });
7231 }
7232 }, {
7233 key: "updateSelected",
7234 value: function updateSelected() {
7235 var checkAll = this.$selectItem.filter(':enabled').length && this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length;
7236 this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
7237 this.$selectItem.each(function (i, el) {
7238 $$o(el).closest('tr')[$$o(el).prop('checked') ? 'addClass' : 'removeClass']('selected');
7239 });
7240 }
7241 }, {
7242 key: "updateRows",
7243 value: function updateRows() {
7244 var _this12 = this;
7245 this.$selectItem.each(function (i, el) {
7246 _this12.data[$$o(el).data('index')][_this12.header.stateField] = $$o(el).prop('checked');
7247 });
7248 }
7249 }, {
7250 key: "resetRows",
7251 value: function resetRows() {
7252 var _iterator3 = _createForOfIteratorHelper(this.data),
7253 _step3;
7254 try {
7255 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
7256 var row = _step3.value;
7257 this.$selectAll.prop('checked', false);
7258 this.$selectItem.prop('checked', false);
7259 if (this.header.stateField) {
7260 row[this.header.stateField] = false;
7261 }
7262 }
7263 } catch (err) {
7264 _iterator3.e(err);
7265 } finally {
7266 _iterator3.f();
7267 }
7268 this.initHiddenRows();
7269 }
7270 }, {
7271 key: "trigger",
7272 value: function trigger(_name) {
7273 var _this$options, _this$options2;
7274 var name = "".concat(_name, ".bs.table");
7275 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key4 = 1; _key4 < _len; _key4++) {
7276 args[_key4 - 1] = arguments[_key4];
7277 }
7278 (_this$options = this.options)[BootstrapTable.EVENTS[name]].apply(_this$options, [].concat(args, [this]));
7279 this.$el.trigger($$o.Event(name, {
7280 sender: this
7281 }), args);
7282 (_this$options2 = this.options).onAll.apply(_this$options2, [name].concat([].concat(args, [this])));
7283 this.$el.trigger($$o.Event('all.bs.table', {
7284 sender: this
7285 }), [name, args]);
7286 }
7287 }, {
7288 key: "resetHeader",
7289 value: function resetHeader() {
7290 var _this13 = this;
7291 // fix #61: the hidden table reset header bug.
7292 // fix bug: get $el.css('width') error sometime (height = 500)
7293 clearTimeout(this.timeoutId_);
7294 this.timeoutId_ = setTimeout(function () {
7295 return _this13.fitHeader();
7296 }, this.$el.is(':hidden') ? 100 : 0);
7297 }
7298 }, {
7299 key: "fitHeader",
7300 value: function fitHeader() {
7301 var _this14 = this;
7302 if (this.$el.is(':hidden')) {
7303 this.timeoutId_ = setTimeout(function () {
7304 return _this14.fitHeader();
7305 }, 100);
7306 return;
7307 }
7308 var fixedBody = this.$tableBody.get(0);
7309 var scrollWidth = this.hasScrollBar && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0;
7310 this.$el.css('margin-top', -this.$header.outerHeight());
7311 var focused = this.$tableHeader.find(':focus');
7312 if (focused.length > 0) {
7313 var $th = focused.parents('th');
7314 if ($th.length > 0) {
7315 var dataField = $th.attr('data-field');
7316 if (dataField !== undefined) {
7317 var $headerTh = this.$header.find("[data-field='".concat(dataField, "']"));
7318 if ($headerTh.length > 0) {
7319 $headerTh.find(':input').addClass('focus-temp');
7320 }
7321 }
7322 }
7323 }
7324 this.$header_ = this.$header.clone(true, true);
7325 this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
7326 this.$tableHeader.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).html('').attr('class', this.$el.attr('class')).append(this.$header_);
7327 this.$tableLoading.css('width', this.$el.outerWidth());
7328 var focusedTemp = $$o('.focus-temp:visible:eq(0)');
7329 if (focusedTemp.length > 0) {
7330 focusedTemp.focus();
7331 this.$header.find('.focus-temp').removeClass('focus-temp');
7332 }
7333
7334 // fix bug: $.data() is not working as expected after $.append()
7335 this.$header.find('th[data-field]').each(function (i, el) {
7336 _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', $$o(el).data('field'))).data($$o(el).data());
7337 });
7338 var visibleFields = this.getVisibleFields();
7339 var $ths = this.$header_.find('th');
7340 var $tr = this.$body.find('>tr:not(.no-records-found,.virtual-scroll-top)').eq(0);
7341 while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) {
7342 $tr = $tr.next();
7343 }
7344 var trLength = $tr.find('> *').length;
7345 $tr.find('> *').each(function (i, el) {
7346 var $this = $$o(el);
7347 if (Utils.hasDetailViewIcon(_this14.options)) {
7348 if (i === 0 && _this14.options.detailViewAlign !== 'right' || i === trLength - 1 && _this14.options.detailViewAlign === 'right') {
7349 var $thDetail = $ths.filter('.detail');
7350 var _zoomWidth = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width();
7351 $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth);
7352 return;
7353 }
7354 }
7355 var index = i - Utils.getDetailViewIndexOffset(_this14.options);
7356 var $th = _this14.$header_.find(Utils.sprintf('th[data-field="%s"]', visibleFields[index]));
7357 if ($th.length > 1) {
7358 $th = $$o($ths[$this[0].cellIndex]);
7359 }
7360 var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width();
7361 $th.find('.fht-cell').width($this.innerWidth() - zoomWidth);
7362 });
7363 this.horizontalScroll();
7364 this.trigger('post-header');
7365 }
7366 }, {
7367 key: "initFooter",
7368 value: function initFooter() {
7369 if (!this.options.showFooter || this.options.cardView) {
7370 // do nothing
7371 return;
7372 }
7373 var data = this.getData();
7374 var html = [];
7375 var detailTemplate = '';
7376 if (Utils.hasDetailViewIcon(this.options)) {
7377 detailTemplate = '<th class="detail"><div class="th-inner"></div><div class="fht-cell"></div></th>';
7378 }
7379 if (detailTemplate && this.options.detailViewAlign !== 'right') {
7380 html.push(detailTemplate);
7381 }
7382 var _iterator4 = _createForOfIteratorHelper(this.columns),
7383 _step4;
7384 try {
7385 for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
7386 var column = _step4.value;
7387 var falign = '';
7388 var valign = '';
7389 var csses = [];
7390 var style = {};
7391 var class_ = Utils.sprintf(' class="%s"', column['class']);
7392 if (!column.visible || this.footerData && this.footerData.length > 0 && !(column.field in this.footerData[0])) {
7393 continue;
7394 }
7395 if (this.options.cardView && !column.cardVisible) {
7396 return;
7397 }
7398 falign = Utils.sprintf('text-align: %s; ', column.falign ? column.falign : column.align);
7399 valign = Utils.sprintf('vertical-align: %s; ', column.valign);
7400 style = Utils.calculateObjectValue(null, this.options.footerStyle, [column]);
7401 if (style && style.css) {
7402 for (var _i14 = 0, _Object$entries13 = Object.entries(style.css); _i14 < _Object$entries13.length; _i14++) {
7403 var _Object$entries13$_i = _slicedToArray(_Object$entries13[_i14], 2),
7404 key = _Object$entries13$_i[0],
7405 _value3 = _Object$entries13$_i[1];
7406 csses.push("".concat(key, ": ").concat(_value3));
7407 }
7408 }
7409 if (style && style.classes) {
7410 class_ = Utils.sprintf(' class="%s"', column['class'] ? [column['class'], style.classes].join(' ') : style.classes);
7411 }
7412 html.push('<th', class_, Utils.sprintf(' style="%s"', falign + valign + csses.concat().join('; ')));
7413 var colspan = 0;
7414 if (this.footerData && this.footerData.length > 0) {
7415 colspan = this.footerData[0]["_".concat(column.field, "_colspan")] || 0;
7416 }
7417 if (colspan) {
7418 html.push(" colspan=\"".concat(colspan, "\" "));
7419 }
7420 html.push('>');
7421 html.push('<div class="th-inner">');
7422 var value = '';
7423 if (this.footerData && this.footerData.length > 0) {
7424 value = this.footerData[0][column.field] || '';
7425 }
7426 html.push(Utils.calculateObjectValue(column, column.footerFormatter, [data, value], value));
7427 html.push('</div>');
7428 html.push('<div class="fht-cell"></div>');
7429 html.push('</div>');
7430 html.push('</th>');
7431 }
7432 } catch (err) {
7433 _iterator4.e(err);
7434 } finally {
7435 _iterator4.f();
7436 }
7437 if (detailTemplate && this.options.detailViewAlign === 'right') {
7438 html.push(detailTemplate);
7439 }
7440 if (!this.options.height && !this.$tableFooter.length) {
7441 this.$el.append('<tfoot><tr></tr></tfoot>');
7442 this.$tableFooter = this.$el.find('tfoot');
7443 }
7444 if (!this.$tableFooter.find('tr').length) {
7445 this.$tableFooter.html('<table><thead><tr></tr></thead></table>');
7446 }
7447 this.$tableFooter.find('tr').html(html.join(''));
7448 this.trigger('post-footer', this.$tableFooter);
7449 }
7450 }, {
7451 key: "fitFooter",
7452 value: function fitFooter() {
7453 var _this15 = this;
7454 if (this.$el.is(':hidden')) {
7455 setTimeout(function () {
7456 return _this15.fitFooter();
7457 }, 100);
7458 return;
7459 }
7460 var fixedBody = this.$tableBody.get(0);
7461 var scrollWidth = this.hasScrollBar && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? Utils.getScrollBarWidth() : 0;
7462 this.$tableFooter.css('margin-right', scrollWidth).find('table').css('width', this.$el.outerWidth()).attr('class', this.$el.attr('class'));
7463 var $ths = this.$tableFooter.find('th');
7464 var $tr = this.$body.find('>tr:first-child:not(.no-records-found)');
7465 $ths.find('.fht-cell').width('auto');
7466 while ($tr.length && $tr.find('>td[colspan]:not([colspan="1"])').length) {
7467 $tr = $tr.next();
7468 }
7469 var trLength = $tr.find('> *').length;
7470 $tr.find('> *').each(function (i, el) {
7471 var $this = $$o(el);
7472 if (Utils.hasDetailViewIcon(_this15.options)) {
7473 if (i === 0 && _this15.options.detailViewAlign === 'left' || i === trLength - 1 && _this15.options.detailViewAlign === 'right') {
7474 var $thDetail = $ths.filter('.detail');
7475 var _zoomWidth2 = $thDetail.innerWidth() - $thDetail.find('.fht-cell').width();
7476 $thDetail.find('.fht-cell').width($this.innerWidth() - _zoomWidth2);
7477 return;
7478 }
7479 }
7480 var $th = $ths.eq(i);
7481 var zoomWidth = $th.innerWidth() - $th.find('.fht-cell').width();
7482 $th.find('.fht-cell').width($this.innerWidth() - zoomWidth);
7483 });
7484 this.horizontalScroll();
7485 }
7486 }, {
7487 key: "horizontalScroll",
7488 value: function horizontalScroll() {
7489 var _this16 = this;
7490 // horizontal scroll event
7491 // TODO: it's probably better improving the layout than binding to scroll event
7492 this.$tableBody.off('scroll').on('scroll', function () {
7493 var scrollLeft = _this16.$tableBody.scrollLeft();
7494 if (_this16.options.showHeader && _this16.options.height) {
7495 _this16.$tableHeader.scrollLeft(scrollLeft);
7496 }
7497 if (_this16.options.showFooter && !_this16.options.cardView) {
7498 _this16.$tableFooter.scrollLeft(scrollLeft);
7499 }
7500 _this16.trigger('scroll-body', _this16.$tableBody);
7501 });
7502 }
7503 }, {
7504 key: "getVisibleFields",
7505 value: function getVisibleFields() {
7506 var visibleFields = [];
7507 var _iterator5 = _createForOfIteratorHelper(this.header.fields),
7508 _step5;
7509 try {
7510 for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
7511 var field = _step5.value;
7512 var column = this.columns[this.fieldsColumnsIndex[field]];
7513 if (!column || !column.visible || this.options.cardView && !column.cardVisible) {
7514 continue;
7515 }
7516 visibleFields.push(field);
7517 }
7518 } catch (err) {
7519 _iterator5.e(err);
7520 } finally {
7521 _iterator5.f();
7522 }
7523 return visibleFields;
7524 }
7525 }, {
7526 key: "initHiddenRows",
7527 value: function initHiddenRows() {
7528 this.hiddenRows = [];
7529 }
7530
7531 // PUBLIC FUNCTION DEFINITION
7532 // =======================
7533 }, {
7534 key: "getOptions",
7535 value: function getOptions() {
7536 // deep copy and remove data
7537 var options = Utils.extend({}, this.options);
7538 delete options.data;
7539 return Utils.extend(true, {}, options);
7540 }
7541 }, {
7542 key: "refreshOptions",
7543 value: function refreshOptions(options) {
7544 // If the objects are equivalent then avoid the call of destroy / init methods
7545 if (Utils.compareObjects(this.options, options, true)) {
7546 return;
7547 }
7548 this.options = Utils.extend(this.options, options);
7549 this.trigger('refresh-options', this.options);
7550 this.destroy();
7551 this.init();
7552 }
7553 }, {
7554 key: "getData",
7555 value: function getData(params) {
7556 var _this17 = this;
7557 var data = this.options.data;
7558 if ((this.searchText || this.options.customSearch || this.options.sortName !== undefined || this.enableCustomSort ||
7559 // Fix #4616: this.enableCustomSort is for extensions
7560 !Utils.isEmptyObject(this.filterColumns) || typeof this.options.filterOptions.filterAlgorithm === 'function' || !Utils.isEmptyObject(this.filterColumnsPartial)) && (!params || !params.unfiltered)) {
7561 data = this.data;
7562 }
7563 if (params && params.useCurrentPage) {
7564 data = data.slice(this.pageFrom - 1, this.pageTo);
7565 }
7566 if (params && !params.includeHiddenRows) {
7567 var hiddenRows = this.getHiddenRows();
7568 data = data.filter(function (row) {
7569 return Utils.findIndex(hiddenRows, row) === -1;
7570 });
7571 }
7572 if (params && params.formatted) {
7573 data.forEach(function (row) {
7574 for (var _i15 = 0, _Object$entries14 = Object.entries(row); _i15 < _Object$entries14.length; _i15++) {
7575 var _Object$entries14$_i = _slicedToArray(_Object$entries14[_i15], 2),
7576 key = _Object$entries14$_i[0],
7577 value = _Object$entries14$_i[1];
7578 var column = _this17.columns[_this17.fieldsColumnsIndex[key]];
7579 if (!column) {
7580 return;
7581 }
7582 row[key] = Utils.calculateObjectValue(column, _this17.header.formatters[column.fieldIndex], [value, row, row.index, column.field], value);
7583 }
7584 });
7585 }
7586 return data;
7587 }
7588 }, {
7589 key: "getSelections",
7590 value: function getSelections() {
7591 var _this18 = this;
7592 return (this.options.maintainMetaData ? this.options.data : this.data).filter(function (row) {
7593 return row[_this18.header.stateField] === true;
7594 });
7595 }
7596 }, {
7597 key: "load",
7598 value: function load(_data) {
7599 var fixedScroll = false;
7600 var data = _data;
7601
7602 // #431: support pagination
7603 if (this.options.pagination && this.options.sidePagination === 'server') {
7604 this.options.totalRows = data[this.options.totalField];
7605 this.options.totalNotFiltered = data[this.options.totalNotFilteredField];
7606 this.footerData = data[this.options.footerField] ? [data[this.options.footerField]] : undefined;
7607 }
7608 fixedScroll = data.fixedScroll;
7609 data = Array.isArray(data) ? data : data[this.options.dataField];
7610 this.initData(data);
7611 this.initSearch();
7612 this.initPagination();
7613 this.initBody(fixedScroll);
7614 }
7615 }, {
7616 key: "append",
7617 value: function append(data) {
7618 this.initData(data, 'append');
7619 this.initSearch();
7620 this.initPagination();
7621 this.initSort();
7622 this.initBody(true);
7623 }
7624 }, {
7625 key: "prepend",
7626 value: function prepend(data) {
7627 this.initData(data, 'prepend');
7628 this.initSearch();
7629 this.initPagination();
7630 this.initSort();
7631 this.initBody(true);
7632 }
7633 }, {
7634 key: "remove",
7635 value: function remove(params) {
7636 var removed = 0;
7637 for (var i = this.options.data.length - 1; i >= 0; i--) {
7638 var row = this.options.data[i];
7639 var value = Utils.getItemField(row, params.field, this.options.escape, row.escape);
7640 if (value === undefined && params.field !== '$index') {
7641 continue;
7642 }
7643 if (!row.hasOwnProperty(params.field) && params.field === '$index' && params.values.includes(i) || params.values.includes(value)) {
7644 removed++;
7645 this.options.data.splice(i, 1);
7646 }
7647 }
7648 if (!removed) {
7649 return;
7650 }
7651 if (this.options.sidePagination === 'server') {
7652 this.options.totalRows -= removed;
7653 this.data = _toConsumableArray(this.options.data);
7654 }
7655 this.initSearch();
7656 this.initPagination();
7657 this.initSort();
7658 this.initBody(true);
7659 }
7660 }, {
7661 key: "removeAll",
7662 value: function removeAll() {
7663 if (this.options.data.length > 0) {
7664 this.options.data.splice(0, this.options.data.length);
7665 this.initSearch();
7666 this.initPagination();
7667 this.initBody(true);
7668 }
7669 }
7670 }, {
7671 key: "insertRow",
7672 value: function insertRow(params) {
7673 if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
7674 return;
7675 }
7676 this.options.data.splice(params.index, 0, params.row);
7677 this.initSearch();
7678 this.initPagination();
7679 this.initSort();
7680 this.initBody(true);
7681 }
7682 }, {
7683 key: "updateRow",
7684 value: function updateRow(params) {
7685 var allParams = Array.isArray(params) ? params : [params];
7686 var _iterator6 = _createForOfIteratorHelper(allParams),
7687 _step6;
7688 try {
7689 for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
7690 var _params = _step6.value;
7691 if (!_params.hasOwnProperty('index') || !_params.hasOwnProperty('row')) {
7692 continue;
7693 }
7694 if (_params.hasOwnProperty('replace') && _params.replace) {
7695 this.options.data[_params.index] = _params.row;
7696 } else {
7697 Utils.extend(this.options.data[_params.index], _params.row);
7698 }
7699 }
7700 } catch (err) {
7701 _iterator6.e(err);
7702 } finally {
7703 _iterator6.f();
7704 }
7705 this.initSearch();
7706 this.initPagination();
7707 this.initSort();
7708 this.initBody(true);
7709 }
7710 }, {
7711 key: "getRowByUniqueId",
7712 value: function getRowByUniqueId(_id) {
7713 var uniqueId = this.options.uniqueId;
7714 var len = this.options.data.length;
7715 var id = _id;
7716 var dataRow = null;
7717 var i;
7718 var row;
7719 for (i = len - 1; i >= 0; i--) {
7720 row = this.options.data[i];
7721 var rowUniqueId = Utils.getItemField(row, uniqueId, this.options.escape, row.escape);
7722 if (rowUniqueId === undefined) {
7723 continue;
7724 }
7725 if (typeof rowUniqueId === 'string') {
7726 id = id.toString();
7727 } else if (typeof rowUniqueId === 'number') {
7728 if (Number(rowUniqueId) === rowUniqueId && rowUniqueId % 1 === 0) {
7729 id = parseInt(id, 10);
7730 } else if (rowUniqueId === Number(rowUniqueId) && rowUniqueId !== 0) {
7731 id = parseFloat(id);
7732 }
7733 }
7734 if (rowUniqueId === id) {
7735 dataRow = row;
7736 break;
7737 }
7738 }
7739 return dataRow;
7740 }
7741 }, {
7742 key: "updateByUniqueId",
7743 value: function updateByUniqueId(params) {
7744 var allParams = Array.isArray(params) ? params : [params];
7745 var updatedUid = null;
7746 var _iterator7 = _createForOfIteratorHelper(allParams),
7747 _step7;
7748 try {
7749 for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
7750 var _params2 = _step7.value;
7751 if (!_params2.hasOwnProperty('id') || !_params2.hasOwnProperty('row')) {
7752 continue;
7753 }
7754 var rowId = this.options.data.indexOf(this.getRowByUniqueId(_params2.id));
7755 if (rowId === -1) {
7756 continue;
7757 }
7758 if (_params2.hasOwnProperty('replace') && _params2.replace) {
7759 this.options.data[rowId] = _params2.row;
7760 } else {
7761 Utils.extend(this.options.data[rowId], _params2.row);
7762 }
7763 updatedUid = _params2.id;
7764 }
7765 } catch (err) {
7766 _iterator7.e(err);
7767 } finally {
7768 _iterator7.f();
7769 }
7770 this.initSearch();
7771 this.initPagination();
7772 this.initSort();
7773 this.initBody(true, updatedUid);
7774 }
7775 }, {
7776 key: "removeByUniqueId",
7777 value: function removeByUniqueId(id) {
7778 var len = this.options.data.length;
7779 var row = this.getRowByUniqueId(id);
7780 if (row) {
7781 this.options.data.splice(this.options.data.indexOf(row), 1);
7782 }
7783 if (len === this.options.data.length) {
7784 return;
7785 }
7786 if (this.options.sidePagination === 'server') {
7787 this.options.totalRows -= 1;
7788 this.data = _toConsumableArray(this.options.data);
7789 }
7790 this.initSearch();
7791 this.initPagination();
7792 this.initBody(true);
7793 }
7794 }, {
7795 key: "_updateCellOnly",
7796 value: function _updateCellOnly(field, index) {
7797 var rowHtml = this.initRow(this.options.data[index], index);
7798 var fieldIndex = this.getVisibleFields().indexOf(field);
7799 if (fieldIndex === -1) {
7800 return;
7801 }
7802 fieldIndex += Utils.getDetailViewIndexOffset(this.options);
7803 this.$body.find(">tr[data-index=".concat(index, "]")).find(">td:eq(".concat(fieldIndex, ")")).replaceWith($$o(rowHtml).find(">td:eq(".concat(fieldIndex, ")")));
7804 this.initBodyEvent();
7805 this.initFooter();
7806 this.resetView();
7807 this.updateSelected();
7808 }
7809 }, {
7810 key: "updateCell",
7811 value: function updateCell(params) {
7812 if (!params.hasOwnProperty('index') || !params.hasOwnProperty('field') || !params.hasOwnProperty('value')) {
7813 return;
7814 }
7815 this.options.data[params.index][params.field] = params.value;
7816 if (params.reinit === false) {
7817 this._updateCellOnly(params.field, params.index);
7818 return;
7819 }
7820 this.initSort();
7821 this.initBody(true);
7822 }
7823 }, {
7824 key: "updateCellByUniqueId",
7825 value: function updateCellByUniqueId(params) {
7826 var _this19 = this;
7827 var allParams = Array.isArray(params) ? params : [params];
7828 allParams.forEach(function (_ref6) {
7829 var id = _ref6.id,
7830 field = _ref6.field,
7831 value = _ref6.value;
7832 var index = _this19.options.data.indexOf(_this19.getRowByUniqueId(id));
7833 if (index === -1) {
7834 return;
7835 }
7836 _this19.options.data[index][field] = value;
7837 });
7838 if (params.reinit === false) {
7839 this._updateCellOnly(params.field, this.options.data.indexOf(this.getRowByUniqueId(params.id)));
7840 return;
7841 }
7842 this.initSort();
7843 this.initBody(true);
7844 }
7845 }, {
7846 key: "showRow",
7847 value: function showRow(params) {
7848 this._toggleRow(params, true);
7849 }
7850 }, {
7851 key: "hideRow",
7852 value: function hideRow(params) {
7853 this._toggleRow(params, false);
7854 }
7855 }, {
7856 key: "_toggleRow",
7857 value: function _toggleRow(params, visible) {
7858 var row;
7859 if (params.hasOwnProperty('index')) {
7860 row = this.getData()[params.index];
7861 } else if (params.hasOwnProperty('uniqueId')) {
7862 row = this.getRowByUniqueId(params.uniqueId);
7863 }
7864 if (!row) {
7865 return;
7866 }
7867 var index = Utils.findIndex(this.hiddenRows, row);
7868 if (!visible && index === -1) {
7869 this.hiddenRows.push(row);
7870 } else if (visible && index > -1) {
7871 this.hiddenRows.splice(index, 1);
7872 }
7873 this.initBody(true);
7874 this.initPagination();
7875 }
7876 }, {
7877 key: "getHiddenRows",
7878 value: function getHiddenRows(show) {
7879 if (show) {
7880 this.initHiddenRows();
7881 this.initBody(true);
7882 this.initPagination();
7883 return;
7884 }
7885 var data = this.getData();
7886 var rows = [];
7887 var _iterator8 = _createForOfIteratorHelper(data),
7888 _step8;
7889 try {
7890 for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
7891 var row = _step8.value;
7892 if (this.hiddenRows.includes(row)) {
7893 rows.push(row);
7894 }
7895 }
7896 } catch (err) {
7897 _iterator8.e(err);
7898 } finally {
7899 _iterator8.f();
7900 }
7901 this.hiddenRows = rows;
7902 return rows;
7903 }
7904 }, {
7905 key: "showColumn",
7906 value: function showColumn(field) {
7907 var _this20 = this;
7908 var fields = Array.isArray(field) ? field : [field];
7909 fields.forEach(function (field) {
7910 _this20._toggleColumn(_this20.fieldsColumnsIndex[field], true, true);
7911 });
7912 }
7913 }, {
7914 key: "hideColumn",
7915 value: function hideColumn(field) {
7916 var _this21 = this;
7917 var fields = Array.isArray(field) ? field : [field];
7918 fields.forEach(function (field) {
7919 _this21._toggleColumn(_this21.fieldsColumnsIndex[field], false, true);
7920 });
7921 }
7922 }, {
7923 key: "_toggleColumn",
7924 value: function _toggleColumn(index, checked, needUpdate) {
7925 if (index === -1 || this.columns[index].visible === checked) {
7926 return;
7927 }
7928 this.columns[index].visible = checked;
7929 this.initHeader();
7930 this.initSearch();
7931 this.initPagination();
7932 this.initBody();
7933 if (this.options.showColumns) {
7934 var $items = this.$toolbar.find('.keep-open input:not(".toggle-all")').prop('disabled', false);
7935 if (needUpdate) {
7936 $items.filter(Utils.sprintf('[value="%s"]', index)).prop('checked', checked);
7937 }
7938 if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
7939 $items.filter(':checked').prop('disabled', true);
7940 }
7941 }
7942 }
7943 }, {
7944 key: "getVisibleColumns",
7945 value: function getVisibleColumns() {
7946 var _this22 = this;
7947 return this.columns.filter(function (column) {
7948 return column.visible && !_this22.isSelectionColumn(column);
7949 });
7950 }
7951 }, {
7952 key: "getHiddenColumns",
7953 value: function getHiddenColumns() {
7954 return this.columns.filter(function (_ref7) {
7955 var visible = _ref7.visible;
7956 return !visible;
7957 });
7958 }
7959 }, {
7960 key: "isSelectionColumn",
7961 value: function isSelectionColumn(column) {
7962 return column.radio || column.checkbox;
7963 }
7964 }, {
7965 key: "showAllColumns",
7966 value: function showAllColumns() {
7967 this._toggleAllColumns(true);
7968 }
7969 }, {
7970 key: "hideAllColumns",
7971 value: function hideAllColumns() {
7972 this._toggleAllColumns(false);
7973 }
7974 }, {
7975 key: "_toggleAllColumns",
7976 value: function _toggleAllColumns(visible) {
7977 var _this23 = this;
7978 var _iterator9 = _createForOfIteratorHelper(this.columns.slice().reverse()),
7979 _step9;
7980 try {
7981 for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
7982 var column = _step9.value;
7983 if (column.switchable) {
7984 if (!visible && this.options.showColumns && this.getVisibleColumns().filter(function (it) {
7985 return it.switchable;
7986 }).length === this.options.minimumCountColumns) {
7987 continue;
7988 }
7989 column.visible = visible;
7990 }
7991 }
7992 } catch (err) {
7993 _iterator9.e(err);
7994 } finally {
7995 _iterator9.f();
7996 }
7997 this.initHeader();
7998 this.initSearch();
7999 this.initPagination();
8000 this.initBody();
8001 if (this.options.showColumns) {
8002 var $items = this.$toolbar.find('.keep-open input[type="checkbox"]:not(".toggle-all")').prop('disabled', false);
8003 if (visible) {
8004 $items.prop('checked', visible);
8005 } else {
8006 $items.get().reverse().forEach(function (item) {
8007 if ($items.filter(':checked').length > _this23.options.minimumCountColumns) {
8008 $$o(item).prop('checked', visible);
8009 }
8010 });
8011 }
8012 if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
8013 $items.filter(':checked').prop('disabled', true);
8014 }
8015 }
8016 }
8017 }, {
8018 key: "mergeCells",
8019 value: function mergeCells(options) {
8020 var row = options.index;
8021 var col = this.getVisibleFields().indexOf(options.field);
8022 var rowspan = options.rowspan || 1;
8023 var colspan = options.colspan || 1;
8024 var i;
8025 var j;
8026 var $tr = this.$body.find('>tr[data-index]');
8027 col += Utils.getDetailViewIndexOffset(this.options);
8028 var $td = $tr.eq(row).find('>td').eq(col);
8029 if (row < 0 || col < 0 || row >= this.data.length) {
8030 return;
8031 }
8032 for (i = row; i < row + rowspan; i++) {
8033 for (j = col; j < col + colspan; j++) {
8034 $tr.eq(i).find('>td').eq(j).hide();
8035 }
8036 }
8037 $td.attr('rowspan', rowspan).attr('colspan', colspan).show();
8038 }
8039 }, {
8040 key: "checkAll",
8041 value: function checkAll() {
8042 this._toggleCheckAll(true);
8043 }
8044 }, {
8045 key: "uncheckAll",
8046 value: function uncheckAll() {
8047 this._toggleCheckAll(false);
8048 }
8049 }, {
8050 key: "_toggleCheckAll",
8051 value: function _toggleCheckAll(checked) {
8052 var rowsBefore = this.getSelections();
8053 this.$selectAll.add(this.$selectAll_).prop('checked', checked);
8054 this.$selectItem.filter(':enabled').prop('checked', checked);
8055 this.updateRows();
8056 this.updateSelected();
8057 var rowsAfter = this.getSelections();
8058 if (checked) {
8059 this.trigger('check-all', rowsAfter, rowsBefore);
8060 return;
8061 }
8062 this.trigger('uncheck-all', rowsAfter, rowsBefore);
8063 }
8064 }, {
8065 key: "checkInvert",
8066 value: function checkInvert() {
8067 var $items = this.$selectItem.filter(':enabled');
8068 var checked = $items.filter(':checked');
8069 $items.each(function (i, el) {
8070 $$o(el).prop('checked', !$$o(el).prop('checked'));
8071 });
8072 this.updateRows();
8073 this.updateSelected();
8074 this.trigger('uncheck-some', checked);
8075 checked = this.getSelections();
8076 this.trigger('check-some', checked);
8077 }
8078 }, {
8079 key: "check",
8080 value: function check(index) {
8081 this._toggleCheck(true, index);
8082 }
8083 }, {
8084 key: "uncheck",
8085 value: function uncheck(index) {
8086 this._toggleCheck(false, index);
8087 }
8088 }, {
8089 key: "_toggleCheck",
8090 value: function _toggleCheck(checked, index) {
8091 var $el = this.$selectItem.filter("[data-index=\"".concat(index, "\"]"));
8092 var row = this.data[index];
8093 if ($el.is(':radio') || this.options.singleSelect || this.options.multipleSelectRow && !this.multipleSelectRowCtrlKey && !this.multipleSelectRowShiftKey) {
8094 var _iterator10 = _createForOfIteratorHelper(this.options.data),
8095 _step10;
8096 try {
8097 for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
8098 var r = _step10.value;
8099 r[this.header.stateField] = false;
8100 }
8101 } catch (err) {
8102 _iterator10.e(err);
8103 } finally {
8104 _iterator10.f();
8105 }
8106 this.$selectItem.filter(':checked').not($el).prop('checked', false);
8107 }
8108 row[this.header.stateField] = checked;
8109 if (this.options.multipleSelectRow) {
8110 if (this.multipleSelectRowShiftKey && this.multipleSelectRowLastSelectedIndex >= 0) {
8111 var _ref8 = this.multipleSelectRowLastSelectedIndex < index ? [this.multipleSelectRowLastSelectedIndex, index] : [index, this.multipleSelectRowLastSelectedIndex],
8112 _ref9 = _slicedToArray(_ref8, 2),
8113 fromIndex = _ref9[0],
8114 toIndex = _ref9[1];
8115 for (var i = fromIndex + 1; i < toIndex; i++) {
8116 this.data[i][this.header.stateField] = true;
8117 this.$selectItem.filter("[data-index=\"".concat(i, "\"]")).prop('checked', true);
8118 }
8119 }
8120 this.multipleSelectRowCtrlKey = false;
8121 this.multipleSelectRowShiftKey = false;
8122 this.multipleSelectRowLastSelectedIndex = checked ? index : -1;
8123 }
8124 $el.prop('checked', checked);
8125 this.updateSelected();
8126 this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el);
8127 }
8128 }, {
8129 key: "checkBy",
8130 value: function checkBy(obj) {
8131 this._toggleCheckBy(true, obj);
8132 }
8133 }, {
8134 key: "uncheckBy",
8135 value: function uncheckBy(obj) {
8136 this._toggleCheckBy(false, obj);
8137 }
8138 }, {
8139 key: "_toggleCheckBy",
8140 value: function _toggleCheckBy(checked, obj) {
8141 var _this24 = this;
8142 if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
8143 return;
8144 }
8145 var rows = [];
8146 this.data.forEach(function (row, i) {
8147 if (!row.hasOwnProperty(obj.field)) {
8148 return false;
8149 }
8150 if (obj.values.includes(row[obj.field])) {
8151 var $el = _this24.$selectItem.filter(':enabled').filter(Utils.sprintf('[data-index="%s"]', i));
8152 var onlyCurrentPage = obj.hasOwnProperty('onlyCurrentPage') ? obj.onlyCurrentPage : false;
8153 $el = checked ? $el.not(':checked') : $el.filter(':checked');
8154 if (!$el.length && onlyCurrentPage) {
8155 return;
8156 }
8157 $el.prop('checked', checked);
8158 row[_this24.header.stateField] = checked;
8159 rows.push(row);
8160 _this24.trigger(checked ? 'check' : 'uncheck', row, $el);
8161 }
8162 });
8163 this.updateSelected();
8164 this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
8165 }
8166 }, {
8167 key: "refresh",
8168 value: function refresh(params) {
8169 if (params && params.url) {
8170 this.options.url = params.url;
8171 }
8172 if (params && params.pageNumber) {
8173 this.options.pageNumber = params.pageNumber;
8174 }
8175 if (params && params.pageSize) {
8176 this.options.pageSize = params.pageSize;
8177 }
8178 this.trigger('refresh', this.initServer(params && params.silent, params && params.query, params && params.url));
8179 }
8180 }, {
8181 key: "destroy",
8182 value: function destroy() {
8183 this.$el.insertBefore(this.$container);
8184 $$o(this.options.toolbar).insertBefore(this.$el);
8185 this.$container.next().remove();
8186 this.$container.remove();
8187 this.$el.html(this.$el_.html()).css('margin-top', '0').attr('class', this.$el_.attr('class') || ''); // reset the class
8188
8189 var resizeEvent = Utils.getEventName('resize.bootstrap-table', this.$el.attr('id'));
8190 $$o(window).off(resizeEvent);
8191 }
8192 }, {
8193 key: "resetView",
8194 value: function resetView(params) {
8195 var padding = 0;
8196 if (params && params.height) {
8197 this.options.height = params.height;
8198 }
8199 this.$tableContainer.toggleClass('has-card-view', this.options.cardView);
8200 if (this.options.height) {
8201 var fixedBody = this.$tableBody.get(0);
8202 this.hasScrollBar = fixedBody.scrollWidth > fixedBody.clientWidth;
8203 }
8204 if (!this.options.cardView && this.options.showHeader && this.options.height) {
8205 this.$tableHeader.show();
8206 this.resetHeader();
8207 padding += this.$header.outerHeight(true) + 1;
8208 } else {
8209 this.$tableHeader.hide();
8210 this.trigger('post-header');
8211 }
8212 if (!this.options.cardView && this.options.showFooter) {
8213 this.$tableFooter.show();
8214 this.fitFooter();
8215 if (this.options.height) {
8216 padding += this.$tableFooter.outerHeight(true);
8217 }
8218 }
8219 if (this.$container.hasClass('fullscreen')) {
8220 this.$tableContainer.css('height', '');
8221 this.$tableContainer.css('width', '');
8222 } else if (this.options.height) {
8223 if (this.$tableBorder) {
8224 this.$tableBorder.css('width', '');
8225 this.$tableBorder.css('height', '');
8226 }
8227 var toolbarHeight = this.$toolbar.outerHeight(true);
8228 var paginationHeight = this.$pagination.outerHeight(true);
8229 var height = this.options.height - toolbarHeight - paginationHeight;
8230 var $bodyTable = this.$tableBody.find('>table');
8231 var tableHeight = $bodyTable.outerHeight();
8232 this.$tableContainer.css('height', "".concat(height, "px"));
8233 if (this.$tableBorder && $bodyTable.is(':visible')) {
8234 var tableBorderHeight = height - tableHeight - 2;
8235 if (this.hasScrollBar) {
8236 tableBorderHeight -= Utils.getScrollBarWidth();
8237 }
8238 this.$tableBorder.css('width', "".concat($bodyTable.outerWidth(), "px"));
8239 this.$tableBorder.css('height', "".concat(tableBorderHeight, "px"));
8240 }
8241 }
8242 if (this.options.cardView) {
8243 // remove the element css
8244 this.$el.css('margin-top', '0');
8245 this.$tableContainer.css('padding-bottom', '0');
8246 this.$tableFooter.hide();
8247 } else {
8248 // Assign the correct sortable arrow
8249 this.getCaret();
8250 this.$tableContainer.css('padding-bottom', "".concat(padding, "px"));
8251 }
8252 this.trigger('reset-view');
8253 }
8254 }, {
8255 key: "showLoading",
8256 value: function showLoading() {
8257 this.$tableLoading.toggleClass('open', true);
8258 var fontSize = this.options.loadingFontSize;
8259 if (this.options.loadingFontSize === 'auto') {
8260 fontSize = this.$tableLoading.width() * 0.04;
8261 fontSize = Math.max(12, fontSize);
8262 fontSize = Math.min(32, fontSize);
8263 fontSize = "".concat(fontSize, "px");
8264 }
8265 this.$tableLoading.find('.loading-text').css('font-size', fontSize);
8266 }
8267 }, {
8268 key: "hideLoading",
8269 value: function hideLoading() {
8270 this.$tableLoading.toggleClass('open', false);
8271 }
8272 }, {
8273 key: "togglePagination",
8274 value: function togglePagination() {
8275 this.options.pagination = !this.options.pagination;
8276 var icon = this.options.showButtonIcons ? this.options.pagination ? this.options.icons.paginationSwitchDown : this.options.icons.paginationSwitchUp : '';
8277 var text = this.options.showButtonText ? this.options.pagination ? this.options.formatPaginationSwitchUp() : this.options.formatPaginationSwitchDown() : '';
8278 this.$toolbar.find('button[name="paginationSwitch"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
8279 this.updatePagination();
8280 this.trigger('toggle-pagination', this.options.pagination);
8281 }
8282 }, {
8283 key: "toggleFullscreen",
8284 value: function toggleFullscreen() {
8285 this.$el.closest('.bootstrap-table').toggleClass('fullscreen');
8286 this.resetView();
8287 }
8288 }, {
8289 key: "toggleView",
8290 value: function toggleView() {
8291 this.options.cardView = !this.options.cardView;
8292 this.initHeader();
8293 var icon = this.options.showButtonIcons ? this.options.cardView ? this.options.icons.toggleOn : this.options.icons.toggleOff : '';
8294 var text = this.options.showButtonText ? this.options.cardView ? this.options.formatToggleOff() : this.options.formatToggleOn() : '';
8295 this.$toolbar.find('button[name="toggle"]').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text)).attr('aria-label', text).attr('title', text);
8296 this.initBody();
8297 this.trigger('toggle', this.options.cardView);
8298 }
8299 }, {
8300 key: "resetSearch",
8301 value: function resetSearch(text) {
8302 var $search = Utils.getSearchInput(this);
8303 var textToUse = text || '';
8304 $search.val(textToUse);
8305 this.searchText = textToUse;
8306 this.onSearch({
8307 currentTarget: $search
8308 }, false);
8309 }
8310 }, {
8311 key: "filterBy",
8312 value: function filterBy(columns, options) {
8313 this.filterOptions = Utils.isEmptyObject(options) ? this.options.filterOptions : Utils.extend(this.options.filterOptions, options);
8314 this.filterColumns = Utils.isEmptyObject(columns) ? {} : columns;
8315 this.options.pageNumber = 1;
8316 this.initSearch();
8317 this.updatePagination();
8318 }
8319 }, {
8320 key: "scrollTo",
8321 value: function scrollTo(params) {
8322 var options = {
8323 unit: 'px',
8324 value: 0
8325 };
8326 if (_typeof(params) === 'object') {
8327 options = Object.assign(options, params);
8328 } else if (typeof params === 'string' && params === 'bottom') {
8329 options.value = this.$tableBody[0].scrollHeight;
8330 } else if (typeof params === 'string' || typeof params === 'number') {
8331 options.value = params;
8332 }
8333 var scrollTo = options.value;
8334 if (options.unit === 'rows') {
8335 scrollTo = 0;
8336 this.$body.find("> tr:lt(".concat(options.value, ")")).each(function (i, el) {
8337 scrollTo += $$o(el).outerHeight(true);
8338 });
8339 }
8340 this.$tableBody.scrollTop(scrollTo);
8341 }
8342 }, {
8343 key: "getScrollPosition",
8344 value: function getScrollPosition() {
8345 return this.$tableBody.scrollTop();
8346 }
8347 }, {
8348 key: "selectPage",
8349 value: function selectPage(page) {
8350 if (page > 0 && page <= this.options.totalPages) {
8351 this.options.pageNumber = page;
8352 this.updatePagination();
8353 }
8354 }
8355 }, {
8356 key: "prevPage",
8357 value: function prevPage() {
8358 if (this.options.pageNumber > 1) {
8359 this.options.pageNumber--;
8360 this.updatePagination();
8361 }
8362 }
8363 }, {
8364 key: "nextPage",
8365 value: function nextPage() {
8366 if (this.options.pageNumber < this.options.totalPages) {
8367 this.options.pageNumber++;
8368 this.updatePagination();
8369 }
8370 }
8371 }, {
8372 key: "toggleDetailView",
8373 value: function toggleDetailView(index, _columnDetailFormatter) {
8374 var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"]', index));
8375 if ($tr.next().is('tr.detail-view')) {
8376 this.collapseRow(index);
8377 } else {
8378 this.expandRow(index, _columnDetailFormatter);
8379 }
8380 this.resetView();
8381 }
8382 }, {
8383 key: "expandRow",
8384 value: function expandRow(index, _columnDetailFormatter) {
8385 var row = this.data[index];
8386 var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index));
8387 if (this.options.detailViewIcon) {
8388 $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailClose));
8389 }
8390 if ($tr.next().is('tr.detail-view')) {
8391 return;
8392 }
8393 $tr.after(Utils.sprintf('<tr class="detail-view"><td colspan="%s"></td></tr>', $tr.children('td').length));
8394 var $element = $tr.next().find('td');
8395 var detailFormatter = _columnDetailFormatter || this.options.detailFormatter;
8396 var content = Utils.calculateObjectValue(this.options, detailFormatter, [index, row, $element], '');
8397 if ($element.length === 1) {
8398 $element.append(content);
8399 }
8400 this.trigger('expand-row', index, row, $element);
8401 }
8402 }, {
8403 key: "expandRowByUniqueId",
8404 value: function expandRowByUniqueId(uniqueId) {
8405 var row = this.getRowByUniqueId(uniqueId);
8406 if (!row) {
8407 return;
8408 }
8409 this.expandRow(this.data.indexOf(row));
8410 }
8411 }, {
8412 key: "collapseRow",
8413 value: function collapseRow(index) {
8414 var row = this.data[index];
8415 var $tr = this.$body.find(Utils.sprintf('> tr[data-index="%s"][data-has-detail-view]', index));
8416 if (!$tr.next().is('tr.detail-view')) {
8417 return;
8418 }
8419 if (this.options.detailViewIcon) {
8420 $tr.find('a.detail-icon').html(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.detailOpen));
8421 }
8422 this.trigger('collapse-row', index, row, $tr.next());
8423 $tr.next().remove();
8424 }
8425 }, {
8426 key: "collapseRowByUniqueId",
8427 value: function collapseRowByUniqueId(uniqueId) {
8428 var row = this.getRowByUniqueId(uniqueId);
8429 if (!row) {
8430 return;
8431 }
8432 this.collapseRow(this.data.indexOf(row));
8433 }
8434 }, {
8435 key: "expandAllRows",
8436 value: function expandAllRows() {
8437 var trs = this.$body.find('> tr[data-index][data-has-detail-view]');
8438 for (var i = 0; i < trs.length; i++) {
8439 this.expandRow($$o(trs[i]).data('index'));
8440 }
8441 }
8442 }, {
8443 key: "collapseAllRows",
8444 value: function collapseAllRows() {
8445 var trs = this.$body.find('> tr[data-index][data-has-detail-view]');
8446 for (var i = 0; i < trs.length; i++) {
8447 this.collapseRow($$o(trs[i]).data('index'));
8448 }
8449 }
8450 }, {
8451 key: "updateColumnTitle",
8452 value: function updateColumnTitle(params) {
8453 if (!params.hasOwnProperty('field') || !params.hasOwnProperty('title')) {
8454 return;
8455 }
8456 this.columns[this.fieldsColumnsIndex[params.field]].title = this.options.escape && this.options.escapeTitle ? Utils.escapeHTML(params.title) : params.title;
8457 if (this.columns[this.fieldsColumnsIndex[params.field]].visible) {
8458 this.$header.find('th[data-field]').each(function (i, el) {
8459 if ($$o(el).data('field') === params.field) {
8460 $$o($$o(el).find('.th-inner')[0]).text(params.title);
8461 return false;
8462 }
8463 });
8464 this.resetView();
8465 }
8466 }
8467 }, {
8468 key: "updateFormatText",
8469 value: function updateFormatText(formatName, text) {
8470 if (!/^format/.test(formatName) || !this.options[formatName]) {
8471 return;
8472 }
8473 if (typeof text === 'string') {
8474 this.options[formatName] = function () {
8475 return text;
8476 };
8477 } else if (typeof text === 'function') {
8478 this.options[formatName] = text;
8479 }
8480 this.initToolbar();
8481 this.initPagination();
8482 this.initBody();
8483 }
8484 }]);
8485 return BootstrapTable;
8486 }();
8487 BootstrapTable.VERSION = Constants.VERSION;
8488 BootstrapTable.DEFAULTS = Constants.DEFAULTS;
8489 BootstrapTable.LOCALES = Constants.LOCALES;
8490 BootstrapTable.COLUMN_DEFAULTS = Constants.COLUMN_DEFAULTS;
8491 BootstrapTable.METHODS = Constants.METHODS;
8492 BootstrapTable.EVENTS = Constants.EVENTS;
8493
8494 // BOOTSTRAP TABLE PLUGIN DEFINITION
8495 // =======================
8496
8497 $$o.BootstrapTable = BootstrapTable;
8498 $$o.fn.bootstrapTable = function (option) {
8499 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key5 = 1; _key5 < _len2; _key5++) {
8500 args[_key5 - 1] = arguments[_key5];
8501 }
8502 var value;
8503 this.each(function (i, el) {
8504 var data = $$o(el).data('bootstrap.table');
8505 if (typeof option === 'string') {
8506 var _data2;
8507 if (!Constants.METHODS.includes(option)) {
8508 throw new Error("Unknown method: ".concat(option));
8509 }
8510 if (!data) {
8511 return;
8512 }
8513 value = (_data2 = data)[option].apply(_data2, args);
8514 if (option === 'destroy') {
8515 $$o(el).removeData('bootstrap.table');
8516 }
8517 return;
8518 }
8519 var options = Utils.extend(true, {}, BootstrapTable.DEFAULTS, $$o(el).data(), _typeof(option) === 'object' && option);
8520 if (!data) {
8521 data = new $$o.BootstrapTable(el, options);
8522 $$o(el).data('bootstrap.table', data);
8523 data.init();
8524 }
8525 });
8526 return typeof value === 'undefined' ? this : value;
8527 };
8528 $$o.fn.bootstrapTable.Constructor = BootstrapTable;
8529 $$o.fn.bootstrapTable.theme = Constants.THEME;
8530 $$o.fn.bootstrapTable.VERSION = Constants.VERSION;
8531 $$o.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
8532 $$o.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
8533 $$o.fn.bootstrapTable.events = BootstrapTable.EVENTS;
8534 $$o.fn.bootstrapTable.locales = BootstrapTable.LOCALES;
8535 $$o.fn.bootstrapTable.methods = BootstrapTable.METHODS;
8536 $$o.fn.bootstrapTable.utils = Utils;
8537
8538 // BOOTSTRAP TABLE INIT
8539 // =======================
8540
8541 $$o(function () {
8542 $$o('[data-toggle="table"]').bootstrapTable();
8543 });
8544
8545 return BootstrapTable;
8546
8547}));