UNPKG

65.9 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3 typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
5})(this, (function ($$5) { 'use strict';
6
7 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
9 var check = function (it) {
10 return it && it.Math == Math && it;
11 };
12
13 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
14 var global$b =
15 // eslint-disable-next-line es/no-global-this -- safe
16 check(typeof globalThis == 'object' && globalThis) ||
17 check(typeof window == 'object' && window) ||
18 // eslint-disable-next-line no-restricted-globals -- safe
19 check(typeof self == 'object' && self) ||
20 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
21 // eslint-disable-next-line no-new-func -- fallback
22 (function () { return this; })() || Function('return this')();
23
24 var objectGetOwnPropertyDescriptor = {};
25
26 var fails$d = function (exec) {
27 try {
28 return !!exec();
29 } catch (error) {
30 return true;
31 }
32 };
33
34 var fails$c = fails$d;
35
36 // Detect IE8's incomplete defineProperty implementation
37 var descriptors = !fails$c(function () {
38 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
39 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
40 });
41
42 var fails$b = fails$d;
43
44 var functionBindNative = !fails$b(function () {
45 // eslint-disable-next-line es/no-function-prototype-bind -- safe
46 var test = (function () { /* empty */ }).bind();
47 // eslint-disable-next-line no-prototype-builtins -- safe
48 return typeof test != 'function' || test.hasOwnProperty('prototype');
49 });
50
51 var NATIVE_BIND$2 = functionBindNative;
52
53 var call$5 = Function.prototype.call;
54
55 var functionCall = NATIVE_BIND$2 ? call$5.bind(call$5) : function () {
56 return call$5.apply(call$5, arguments);
57 };
58
59 var objectPropertyIsEnumerable = {};
60
61 var $propertyIsEnumerable = {}.propertyIsEnumerable;
62 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
63 var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
64
65 // Nashorn ~ JDK8 bug
66 var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
67
68 // `Object.prototype.propertyIsEnumerable` method implementation
69 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
70 objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
71 var descriptor = getOwnPropertyDescriptor$1(this, V);
72 return !!descriptor && descriptor.enumerable;
73 } : $propertyIsEnumerable;
74
75 var createPropertyDescriptor$3 = function (bitmap, value) {
76 return {
77 enumerable: !(bitmap & 1),
78 configurable: !(bitmap & 2),
79 writable: !(bitmap & 4),
80 value: value
81 };
82 };
83
84 var NATIVE_BIND$1 = functionBindNative;
85
86 var FunctionPrototype$1 = Function.prototype;
87 var call$4 = FunctionPrototype$1.call;
88 var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$4, call$4);
89
90 var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
91 return function () {
92 return call$4.apply(fn, arguments);
93 };
94 };
95
96 var uncurryThis$h = functionUncurryThis;
97
98 var toString$5 = uncurryThis$h({}.toString);
99 var stringSlice$1 = uncurryThis$h(''.slice);
100
101 var classofRaw$2 = function (it) {
102 return stringSlice$1(toString$5(it), 8, -1);
103 };
104
105 var uncurryThis$g = functionUncurryThis;
106 var fails$a = fails$d;
107 var classof$5 = classofRaw$2;
108
109 var $Object$3 = Object;
110 var split = uncurryThis$g(''.split);
111
112 // fallback for non-array-like ES3 and non-enumerable old V8 strings
113 var indexedObject = fails$a(function () {
114 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
115 // eslint-disable-next-line no-prototype-builtins -- safe
116 return !$Object$3('z').propertyIsEnumerable(0);
117 }) ? function (it) {
118 return classof$5(it) == 'String' ? split(it, '') : $Object$3(it);
119 } : $Object$3;
120
121 // we can't use just `it == null` since of `document.all` special case
122 // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
123 var isNullOrUndefined$2 = function (it) {
124 return it === null || it === undefined;
125 };
126
127 var isNullOrUndefined$1 = isNullOrUndefined$2;
128
129 var $TypeError$5 = TypeError;
130
131 // `RequireObjectCoercible` abstract operation
132 // https://tc39.es/ecma262/#sec-requireobjectcoercible
133 var requireObjectCoercible$3 = function (it) {
134 if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
135 return it;
136 };
137
138 // toObject with fallback for non-array-like ES3 strings
139 var IndexedObject$2 = indexedObject;
140 var requireObjectCoercible$2 = requireObjectCoercible$3;
141
142 var toIndexedObject$4 = function (it) {
143 return IndexedObject$2(requireObjectCoercible$2(it));
144 };
145
146 var documentAll$2 = typeof document == 'object' && document.all;
147
148 // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
149 // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
150 var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
151
152 var documentAll_1 = {
153 all: documentAll$2,
154 IS_HTMLDDA: IS_HTMLDDA
155 };
156
157 var $documentAll$1 = documentAll_1;
158
159 var documentAll$1 = $documentAll$1.all;
160
161 // `IsCallable` abstract operation
162 // https://tc39.es/ecma262/#sec-iscallable
163 var isCallable$c = $documentAll$1.IS_HTMLDDA ? function (argument) {
164 return typeof argument == 'function' || argument === documentAll$1;
165 } : function (argument) {
166 return typeof argument == 'function';
167 };
168
169 var isCallable$b = isCallable$c;
170 var $documentAll = documentAll_1;
171
172 var documentAll = $documentAll.all;
173
174 var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
175 return typeof it == 'object' ? it !== null : isCallable$b(it) || it === documentAll;
176 } : function (it) {
177 return typeof it == 'object' ? it !== null : isCallable$b(it);
178 };
179
180 var global$a = global$b;
181 var isCallable$a = isCallable$c;
182
183 var aFunction = function (argument) {
184 return isCallable$a(argument) ? argument : undefined;
185 };
186
187 var getBuiltIn$3 = function (namespace, method) {
188 return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
189 };
190
191 var uncurryThis$f = functionUncurryThis;
192
193 var objectIsPrototypeOf = uncurryThis$f({}.isPrototypeOf);
194
195 var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
196
197 var global$9 = global$b;
198 var userAgent = engineUserAgent;
199
200 var process = global$9.process;
201 var Deno = global$9.Deno;
202 var versions = process && process.versions || Deno && Deno.version;
203 var v8 = versions && versions.v8;
204 var match, version;
205
206 if (v8) {
207 match = v8.split('.');
208 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
209 // but their correct versions are not interesting for us
210 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
211 }
212
213 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
214 // so check `userAgent` even if `.v8` exists, but 0
215 if (!version && userAgent) {
216 match = userAgent.match(/Edge\/(\d+)/);
217 if (!match || match[1] >= 74) {
218 match = userAgent.match(/Chrome\/(\d+)/);
219 if (match) version = +match[1];
220 }
221 }
222
223 var engineV8Version = version;
224
225 /* eslint-disable es/no-symbol -- required for testing */
226
227 var V8_VERSION$1 = engineV8Version;
228 var fails$9 = fails$d;
229
230 // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
231 var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
232 var symbol = Symbol();
233 // Chrome 38 Symbol has incorrect toString conversion
234 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
235 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
236 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
237 !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
238 });
239
240 /* eslint-disable es/no-symbol -- required for testing */
241
242 var NATIVE_SYMBOL$1 = symbolConstructorDetection;
243
244 var useSymbolAsUid = NATIVE_SYMBOL$1
245 && !Symbol.sham
246 && typeof Symbol.iterator == 'symbol';
247
248 var getBuiltIn$2 = getBuiltIn$3;
249 var isCallable$9 = isCallable$c;
250 var isPrototypeOf = objectIsPrototypeOf;
251 var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
252
253 var $Object$2 = Object;
254
255 var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
256 return typeof it == 'symbol';
257 } : function (it) {
258 var $Symbol = getBuiltIn$2('Symbol');
259 return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
260 };
261
262 var $String$3 = String;
263
264 var tryToString$1 = function (argument) {
265 try {
266 return $String$3(argument);
267 } catch (error) {
268 return 'Object';
269 }
270 };
271
272 var isCallable$8 = isCallable$c;
273 var tryToString = tryToString$1;
274
275 var $TypeError$4 = TypeError;
276
277 // `Assert: IsCallable(argument) is true`
278 var aCallable$2 = function (argument) {
279 if (isCallable$8(argument)) return argument;
280 throw $TypeError$4(tryToString(argument) + ' is not a function');
281 };
282
283 var aCallable$1 = aCallable$2;
284 var isNullOrUndefined = isNullOrUndefined$2;
285
286 // `GetMethod` abstract operation
287 // https://tc39.es/ecma262/#sec-getmethod
288 var getMethod$1 = function (V, P) {
289 var func = V[P];
290 return isNullOrUndefined(func) ? undefined : aCallable$1(func);
291 };
292
293 var call$3 = functionCall;
294 var isCallable$7 = isCallable$c;
295 var isObject$6 = isObject$7;
296
297 var $TypeError$3 = TypeError;
298
299 // `OrdinaryToPrimitive` abstract operation
300 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
301 var ordinaryToPrimitive$1 = function (input, pref) {
302 var fn, val;
303 if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val;
304 if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$3(fn, input))) return val;
305 if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$3(fn, input))) return val;
306 throw $TypeError$3("Can't convert object to primitive value");
307 };
308
309 var sharedExports = {};
310 var shared$3 = {
311 get exports(){ return sharedExports; },
312 set exports(v){ sharedExports = v; },
313 };
314
315 var global$8 = global$b;
316
317 // eslint-disable-next-line es/no-object-defineproperty -- safe
318 var defineProperty$2 = Object.defineProperty;
319
320 var defineGlobalProperty$3 = function (key, value) {
321 try {
322 defineProperty$2(global$8, key, { value: value, configurable: true, writable: true });
323 } catch (error) {
324 global$8[key] = value;
325 } return value;
326 };
327
328 var global$7 = global$b;
329 var defineGlobalProperty$2 = defineGlobalProperty$3;
330
331 var SHARED = '__core-js_shared__';
332 var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
333
334 var sharedStore = store$3;
335
336 var store$2 = sharedStore;
337
338 (shared$3.exports = function (key, value) {
339 return store$2[key] || (store$2[key] = value !== undefined ? value : {});
340 })('versions', []).push({
341 version: '3.29.0',
342 mode: 'global',
343 copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
344 license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
345 source: 'https://github.com/zloirock/core-js'
346 });
347
348 var requireObjectCoercible$1 = requireObjectCoercible$3;
349
350 var $Object$1 = Object;
351
352 // `ToObject` abstract operation
353 // https://tc39.es/ecma262/#sec-toobject
354 var toObject$3 = function (argument) {
355 return $Object$1(requireObjectCoercible$1(argument));
356 };
357
358 var uncurryThis$e = functionUncurryThis;
359 var toObject$2 = toObject$3;
360
361 var hasOwnProperty = uncurryThis$e({}.hasOwnProperty);
362
363 // `HasOwnProperty` abstract operation
364 // https://tc39.es/ecma262/#sec-hasownproperty
365 // eslint-disable-next-line es/no-object-hasown -- safe
366 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
367 return hasOwnProperty(toObject$2(it), key);
368 };
369
370 var uncurryThis$d = functionUncurryThis;
371
372 var id = 0;
373 var postfix = Math.random();
374 var toString$4 = uncurryThis$d(1.0.toString);
375
376 var uid$2 = function (key) {
377 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
378 };
379
380 var global$6 = global$b;
381 var shared$2 = sharedExports;
382 var hasOwn$6 = hasOwnProperty_1;
383 var uid$1 = uid$2;
384 var NATIVE_SYMBOL = symbolConstructorDetection;
385 var USE_SYMBOL_AS_UID = useSymbolAsUid;
386
387 var Symbol$2 = global$6.Symbol;
388 var WellKnownSymbolsStore = shared$2('wks');
389 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
390
391 var wellKnownSymbol$6 = function (name) {
392 if (!hasOwn$6(WellKnownSymbolsStore, name)) {
393 WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)
394 ? Symbol$2[name]
395 : createWellKnownSymbol('Symbol.' + name);
396 } return WellKnownSymbolsStore[name];
397 };
398
399 var call$2 = functionCall;
400 var isObject$5 = isObject$7;
401 var isSymbol$1 = isSymbol$2;
402 var getMethod = getMethod$1;
403 var ordinaryToPrimitive = ordinaryToPrimitive$1;
404 var wellKnownSymbol$5 = wellKnownSymbol$6;
405
406 var $TypeError$2 = TypeError;
407 var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
408
409 // `ToPrimitive` abstract operation
410 // https://tc39.es/ecma262/#sec-toprimitive
411 var toPrimitive$1 = function (input, pref) {
412 if (!isObject$5(input) || isSymbol$1(input)) return input;
413 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
414 var result;
415 if (exoticToPrim) {
416 if (pref === undefined) pref = 'default';
417 result = call$2(exoticToPrim, input, pref);
418 if (!isObject$5(result) || isSymbol$1(result)) return result;
419 throw $TypeError$2("Can't convert object to primitive value");
420 }
421 if (pref === undefined) pref = 'number';
422 return ordinaryToPrimitive(input, pref);
423 };
424
425 var toPrimitive = toPrimitive$1;
426 var isSymbol = isSymbol$2;
427
428 // `ToPropertyKey` abstract operation
429 // https://tc39.es/ecma262/#sec-topropertykey
430 var toPropertyKey$3 = function (argument) {
431 var key = toPrimitive(argument, 'string');
432 return isSymbol(key) ? key : key + '';
433 };
434
435 var global$5 = global$b;
436 var isObject$4 = isObject$7;
437
438 var document$1 = global$5.document;
439 // typeof document.createElement is 'object' in old IE
440 var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
441
442 var documentCreateElement = function (it) {
443 return EXISTS$1 ? document$1.createElement(it) : {};
444 };
445
446 var DESCRIPTORS$7 = descriptors;
447 var fails$8 = fails$d;
448 var createElement = documentCreateElement;
449
450 // Thanks to IE8 for its funny defineProperty
451 var ie8DomDefine = !DESCRIPTORS$7 && !fails$8(function () {
452 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
453 return Object.defineProperty(createElement('div'), 'a', {
454 get: function () { return 7; }
455 }).a != 7;
456 });
457
458 var DESCRIPTORS$6 = descriptors;
459 var call$1 = functionCall;
460 var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
461 var createPropertyDescriptor$2 = createPropertyDescriptor$3;
462 var toIndexedObject$3 = toIndexedObject$4;
463 var toPropertyKey$2 = toPropertyKey$3;
464 var hasOwn$5 = hasOwnProperty_1;
465 var IE8_DOM_DEFINE$1 = ie8DomDefine;
466
467 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
468 var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
469
470 // `Object.getOwnPropertyDescriptor` method
471 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
472 objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
473 O = toIndexedObject$3(O);
474 P = toPropertyKey$2(P);
475 if (IE8_DOM_DEFINE$1) try {
476 return $getOwnPropertyDescriptor$1(O, P);
477 } catch (error) { /* empty */ }
478 if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
479 };
480
481 var objectDefineProperty = {};
482
483 var DESCRIPTORS$5 = descriptors;
484 var fails$7 = fails$d;
485
486 // V8 ~ Chrome 36-
487 // https://bugs.chromium.org/p/v8/issues/detail?id=3334
488 var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$7(function () {
489 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
490 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
491 value: 42,
492 writable: false
493 }).prototype != 42;
494 });
495
496 var isObject$3 = isObject$7;
497
498 var $String$2 = String;
499 var $TypeError$1 = TypeError;
500
501 // `Assert: Type(argument) is Object`
502 var anObject$2 = function (argument) {
503 if (isObject$3(argument)) return argument;
504 throw $TypeError$1($String$2(argument) + ' is not an object');
505 };
506
507 var DESCRIPTORS$4 = descriptors;
508 var IE8_DOM_DEFINE = ie8DomDefine;
509 var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
510 var anObject$1 = anObject$2;
511 var toPropertyKey$1 = toPropertyKey$3;
512
513 var $TypeError = TypeError;
514 // eslint-disable-next-line es/no-object-defineproperty -- safe
515 var $defineProperty = Object.defineProperty;
516 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
517 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
518 var ENUMERABLE = 'enumerable';
519 var CONFIGURABLE$1 = 'configurable';
520 var WRITABLE = 'writable';
521
522 // `Object.defineProperty` method
523 // https://tc39.es/ecma262/#sec-object.defineproperty
524 objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
525 anObject$1(O);
526 P = toPropertyKey$1(P);
527 anObject$1(Attributes);
528 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
529 var current = $getOwnPropertyDescriptor(O, P);
530 if (current && current[WRITABLE]) {
531 O[P] = Attributes.value;
532 Attributes = {
533 configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
534 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
535 writable: false
536 };
537 }
538 } return $defineProperty(O, P, Attributes);
539 } : $defineProperty : function defineProperty(O, P, Attributes) {
540 anObject$1(O);
541 P = toPropertyKey$1(P);
542 anObject$1(Attributes);
543 if (IE8_DOM_DEFINE) try {
544 return $defineProperty(O, P, Attributes);
545 } catch (error) { /* empty */ }
546 if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
547 if ('value' in Attributes) O[P] = Attributes.value;
548 return O;
549 };
550
551 var DESCRIPTORS$3 = descriptors;
552 var definePropertyModule$3 = objectDefineProperty;
553 var createPropertyDescriptor$1 = createPropertyDescriptor$3;
554
555 var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
556 return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
557 } : function (object, key, value) {
558 object[key] = value;
559 return object;
560 };
561
562 var makeBuiltInExports = {};
563 var makeBuiltIn$2 = {
564 get exports(){ return makeBuiltInExports; },
565 set exports(v){ makeBuiltInExports = v; },
566 };
567
568 var DESCRIPTORS$2 = descriptors;
569 var hasOwn$4 = hasOwnProperty_1;
570
571 var FunctionPrototype = Function.prototype;
572 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
573 var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
574
575 var EXISTS = hasOwn$4(FunctionPrototype, 'name');
576 // additional protection from minified / mangled / dropped function names
577 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
578 var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
579
580 var functionName = {
581 EXISTS: EXISTS,
582 PROPER: PROPER,
583 CONFIGURABLE: CONFIGURABLE
584 };
585
586 var uncurryThis$c = functionUncurryThis;
587 var isCallable$6 = isCallable$c;
588 var store$1 = sharedStore;
589
590 var functionToString = uncurryThis$c(Function.toString);
591
592 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
593 if (!isCallable$6(store$1.inspectSource)) {
594 store$1.inspectSource = function (it) {
595 return functionToString(it);
596 };
597 }
598
599 var inspectSource$2 = store$1.inspectSource;
600
601 var global$4 = global$b;
602 var isCallable$5 = isCallable$c;
603
604 var WeakMap$1 = global$4.WeakMap;
605
606 var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
607
608 var shared$1 = sharedExports;
609 var uid = uid$2;
610
611 var keys = shared$1('keys');
612
613 var sharedKey$1 = function (key) {
614 return keys[key] || (keys[key] = uid(key));
615 };
616
617 var hiddenKeys$3 = {};
618
619 var NATIVE_WEAK_MAP = weakMapBasicDetection;
620 var global$3 = global$b;
621 var isObject$2 = isObject$7;
622 var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
623 var hasOwn$3 = hasOwnProperty_1;
624 var shared = sharedStore;
625 var sharedKey = sharedKey$1;
626 var hiddenKeys$2 = hiddenKeys$3;
627
628 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
629 var TypeError$1 = global$3.TypeError;
630 var WeakMap = global$3.WeakMap;
631 var set, get, has;
632
633 var enforce = function (it) {
634 return has(it) ? get(it) : set(it, {});
635 };
636
637 var getterFor = function (TYPE) {
638 return function (it) {
639 var state;
640 if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
641 throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
642 } return state;
643 };
644 };
645
646 if (NATIVE_WEAK_MAP || shared.state) {
647 var store = shared.state || (shared.state = new WeakMap());
648 /* eslint-disable no-self-assign -- prototype methods protection */
649 store.get = store.get;
650 store.has = store.has;
651 store.set = store.set;
652 /* eslint-enable no-self-assign -- prototype methods protection */
653 set = function (it, metadata) {
654 if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
655 metadata.facade = it;
656 store.set(it, metadata);
657 return metadata;
658 };
659 get = function (it) {
660 return store.get(it) || {};
661 };
662 has = function (it) {
663 return store.has(it);
664 };
665 } else {
666 var STATE = sharedKey('state');
667 hiddenKeys$2[STATE] = true;
668 set = function (it, metadata) {
669 if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
670 metadata.facade = it;
671 createNonEnumerableProperty$1(it, STATE, metadata);
672 return metadata;
673 };
674 get = function (it) {
675 return hasOwn$3(it, STATE) ? it[STATE] : {};
676 };
677 has = function (it) {
678 return hasOwn$3(it, STATE);
679 };
680 }
681
682 var internalState = {
683 set: set,
684 get: get,
685 has: has,
686 enforce: enforce,
687 getterFor: getterFor
688 };
689
690 var uncurryThis$b = functionUncurryThis;
691 var fails$6 = fails$d;
692 var isCallable$4 = isCallable$c;
693 var hasOwn$2 = hasOwnProperty_1;
694 var DESCRIPTORS$1 = descriptors;
695 var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
696 var inspectSource$1 = inspectSource$2;
697 var InternalStateModule = internalState;
698
699 var enforceInternalState = InternalStateModule.enforce;
700 var getInternalState = InternalStateModule.get;
701 var $String$1 = String;
702 // eslint-disable-next-line es/no-object-defineproperty -- safe
703 var defineProperty$1 = Object.defineProperty;
704 var stringSlice = uncurryThis$b(''.slice);
705 var replace$1 = uncurryThis$b(''.replace);
706 var join = uncurryThis$b([].join);
707
708 var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$6(function () {
709 return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
710 });
711
712 var TEMPLATE = String(String).split('String');
713
714 var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
715 if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
716 name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
717 }
718 if (options && options.getter) name = 'get ' + name;
719 if (options && options.setter) name = 'set ' + name;
720 if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
721 if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
722 else value.name = name;
723 }
724 if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
725 defineProperty$1(value, 'length', { value: options.arity });
726 }
727 try {
728 if (options && hasOwn$2(options, 'constructor') && options.constructor) {
729 if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
730 // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
731 } else if (value.prototype) value.prototype = undefined;
732 } catch (error) { /* empty */ }
733 var state = enforceInternalState(value);
734 if (!hasOwn$2(state, 'source')) {
735 state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
736 } return value;
737 };
738
739 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
740 // eslint-disable-next-line no-extend-native -- required
741 Function.prototype.toString = makeBuiltIn$1(function toString() {
742 return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
743 }, 'toString');
744
745 var isCallable$3 = isCallable$c;
746 var definePropertyModule$2 = objectDefineProperty;
747 var makeBuiltIn = makeBuiltInExports;
748 var defineGlobalProperty$1 = defineGlobalProperty$3;
749
750 var defineBuiltIn$2 = function (O, key, value, options) {
751 if (!options) options = {};
752 var simple = options.enumerable;
753 var name = options.name !== undefined ? options.name : key;
754 if (isCallable$3(value)) makeBuiltIn(value, name, options);
755 if (options.global) {
756 if (simple) O[key] = value;
757 else defineGlobalProperty$1(key, value);
758 } else {
759 try {
760 if (!options.unsafe) delete O[key];
761 else if (O[key]) simple = true;
762 } catch (error) { /* empty */ }
763 if (simple) O[key] = value;
764 else definePropertyModule$2.f(O, key, {
765 value: value,
766 enumerable: false,
767 configurable: !options.nonConfigurable,
768 writable: !options.nonWritable
769 });
770 } return O;
771 };
772
773 var objectGetOwnPropertyNames = {};
774
775 var ceil = Math.ceil;
776 var floor = Math.floor;
777
778 // `Math.trunc` method
779 // https://tc39.es/ecma262/#sec-math.trunc
780 // eslint-disable-next-line es/no-math-trunc -- safe
781 var mathTrunc = Math.trunc || function trunc(x) {
782 var n = +x;
783 return (n > 0 ? floor : ceil)(n);
784 };
785
786 var trunc = mathTrunc;
787
788 // `ToIntegerOrInfinity` abstract operation
789 // https://tc39.es/ecma262/#sec-tointegerorinfinity
790 var toIntegerOrInfinity$2 = function (argument) {
791 var number = +argument;
792 // eslint-disable-next-line no-self-compare -- NaN check
793 return number !== number || number === 0 ? 0 : trunc(number);
794 };
795
796 var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
797
798 var max$1 = Math.max;
799 var min$1 = Math.min;
800
801 // Helper for a popular repeating case of the spec:
802 // Let integer be ? ToInteger(index).
803 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
804 var toAbsoluteIndex$2 = function (index, length) {
805 var integer = toIntegerOrInfinity$1(index);
806 return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
807 };
808
809 var toIntegerOrInfinity = toIntegerOrInfinity$2;
810
811 var min = Math.min;
812
813 // `ToLength` abstract operation
814 // https://tc39.es/ecma262/#sec-tolength
815 var toLength$1 = function (argument) {
816 return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
817 };
818
819 var toLength = toLength$1;
820
821 // `LengthOfArrayLike` abstract operation
822 // https://tc39.es/ecma262/#sec-lengthofarraylike
823 var lengthOfArrayLike$3 = function (obj) {
824 return toLength(obj.length);
825 };
826
827 var toIndexedObject$2 = toIndexedObject$4;
828 var toAbsoluteIndex$1 = toAbsoluteIndex$2;
829 var lengthOfArrayLike$2 = lengthOfArrayLike$3;
830
831 // `Array.prototype.{ indexOf, includes }` methods implementation
832 var createMethod$2 = function (IS_INCLUDES) {
833 return function ($this, el, fromIndex) {
834 var O = toIndexedObject$2($this);
835 var length = lengthOfArrayLike$2(O);
836 var index = toAbsoluteIndex$1(fromIndex, length);
837 var value;
838 // Array#includes uses SameValueZero equality algorithm
839 // eslint-disable-next-line no-self-compare -- NaN check
840 if (IS_INCLUDES && el != el) while (length > index) {
841 value = O[index++];
842 // eslint-disable-next-line no-self-compare -- NaN check
843 if (value != value) return true;
844 // Array#indexOf ignores holes, Array#includes - not
845 } else for (;length > index; index++) {
846 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
847 } return !IS_INCLUDES && -1;
848 };
849 };
850
851 var arrayIncludes = {
852 // `Array.prototype.includes` method
853 // https://tc39.es/ecma262/#sec-array.prototype.includes
854 includes: createMethod$2(true),
855 // `Array.prototype.indexOf` method
856 // https://tc39.es/ecma262/#sec-array.prototype.indexof
857 indexOf: createMethod$2(false)
858 };
859
860 var uncurryThis$a = functionUncurryThis;
861 var hasOwn$1 = hasOwnProperty_1;
862 var toIndexedObject$1 = toIndexedObject$4;
863 var indexOf = arrayIncludes.indexOf;
864 var hiddenKeys$1 = hiddenKeys$3;
865
866 var push$1 = uncurryThis$a([].push);
867
868 var objectKeysInternal = function (object, names) {
869 var O = toIndexedObject$1(object);
870 var i = 0;
871 var result = [];
872 var key;
873 for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key);
874 // Don't enum bug & hidden keys
875 while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
876 ~indexOf(result, key) || push$1(result, key);
877 }
878 return result;
879 };
880
881 // IE8- don't enum bug keys
882 var enumBugKeys$2 = [
883 'constructor',
884 'hasOwnProperty',
885 'isPrototypeOf',
886 'propertyIsEnumerable',
887 'toLocaleString',
888 'toString',
889 'valueOf'
890 ];
891
892 var internalObjectKeys$1 = objectKeysInternal;
893 var enumBugKeys$1 = enumBugKeys$2;
894
895 var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
896
897 // `Object.getOwnPropertyNames` method
898 // https://tc39.es/ecma262/#sec-object.getownpropertynames
899 // eslint-disable-next-line es/no-object-getownpropertynames -- safe
900 objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
901 return internalObjectKeys$1(O, hiddenKeys);
902 };
903
904 var objectGetOwnPropertySymbols = {};
905
906 // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
907 objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
908
909 var getBuiltIn$1 = getBuiltIn$3;
910 var uncurryThis$9 = functionUncurryThis;
911 var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
912 var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
913 var anObject = anObject$2;
914
915 var concat$1 = uncurryThis$9([].concat);
916
917 // all object keys, includes non-enumerable and symbols
918 var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
919 var keys = getOwnPropertyNamesModule.f(anObject(it));
920 var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
921 return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
922 };
923
924 var hasOwn = hasOwnProperty_1;
925 var ownKeys = ownKeys$1;
926 var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
927 var definePropertyModule$1 = objectDefineProperty;
928
929 var copyConstructorProperties$1 = function (target, source, exceptions) {
930 var keys = ownKeys(source);
931 var defineProperty = definePropertyModule$1.f;
932 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
933 for (var i = 0; i < keys.length; i++) {
934 var key = keys[i];
935 if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
936 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
937 }
938 }
939 };
940
941 var fails$5 = fails$d;
942 var isCallable$2 = isCallable$c;
943
944 var replacement = /#|\.prototype\./;
945
946 var isForced$1 = function (feature, detection) {
947 var value = data[normalize(feature)];
948 return value == POLYFILL ? true
949 : value == NATIVE ? false
950 : isCallable$2(detection) ? fails$5(detection)
951 : !!detection;
952 };
953
954 var normalize = isForced$1.normalize = function (string) {
955 return String(string).replace(replacement, '.').toLowerCase();
956 };
957
958 var data = isForced$1.data = {};
959 var NATIVE = isForced$1.NATIVE = 'N';
960 var POLYFILL = isForced$1.POLYFILL = 'P';
961
962 var isForced_1 = isForced$1;
963
964 var global$2 = global$b;
965 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
966 var createNonEnumerableProperty = createNonEnumerableProperty$2;
967 var defineBuiltIn$1 = defineBuiltIn$2;
968 var defineGlobalProperty = defineGlobalProperty$3;
969 var copyConstructorProperties = copyConstructorProperties$1;
970 var isForced = isForced_1;
971
972 /*
973 options.target - name of the target object
974 options.global - target is the global object
975 options.stat - export as static methods of target
976 options.proto - export as prototype methods of target
977 options.real - real prototype method for the `pure` version
978 options.forced - export even if the native feature is available
979 options.bind - bind methods to the target, required for the `pure` version
980 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
981 options.unsafe - use the simple assignment of property instead of delete + defineProperty
982 options.sham - add a flag to not completely full polyfills
983 options.enumerable - export as enumerable property
984 options.dontCallGetSet - prevent calling a getter on target
985 options.name - the .name of the function if it does not match the key
986 */
987 var _export = function (options, source) {
988 var TARGET = options.target;
989 var GLOBAL = options.global;
990 var STATIC = options.stat;
991 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
992 if (GLOBAL) {
993 target = global$2;
994 } else if (STATIC) {
995 target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
996 } else {
997 target = (global$2[TARGET] || {}).prototype;
998 }
999 if (target) for (key in source) {
1000 sourceProperty = source[key];
1001 if (options.dontCallGetSet) {
1002 descriptor = getOwnPropertyDescriptor(target, key);
1003 targetProperty = descriptor && descriptor.value;
1004 } else targetProperty = target[key];
1005 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1006 // contained in target
1007 if (!FORCED && targetProperty !== undefined) {
1008 if (typeof sourceProperty == typeof targetProperty) continue;
1009 copyConstructorProperties(sourceProperty, targetProperty);
1010 }
1011 // add a flag to not completely full polyfills
1012 if (options.sham || (targetProperty && targetProperty.sham)) {
1013 createNonEnumerableProperty(sourceProperty, 'sham', true);
1014 }
1015 defineBuiltIn$1(target, key, sourceProperty, options);
1016 }
1017 };
1018
1019 var internalObjectKeys = objectKeysInternal;
1020 var enumBugKeys = enumBugKeys$2;
1021
1022 // `Object.keys` method
1023 // https://tc39.es/ecma262/#sec-object.keys
1024 // eslint-disable-next-line es/no-object-keys -- safe
1025 var objectKeys$1 = Object.keys || function keys(O) {
1026 return internalObjectKeys(O, enumBugKeys);
1027 };
1028
1029 var DESCRIPTORS = descriptors;
1030 var uncurryThis$8 = functionUncurryThis;
1031 var call = functionCall;
1032 var fails$4 = fails$d;
1033 var objectKeys = objectKeys$1;
1034 var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1035 var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1036 var toObject$1 = toObject$3;
1037 var IndexedObject$1 = indexedObject;
1038
1039 // eslint-disable-next-line es/no-object-assign -- safe
1040 var $assign = Object.assign;
1041 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1042 var defineProperty = Object.defineProperty;
1043 var concat = uncurryThis$8([].concat);
1044
1045 // `Object.assign` method
1046 // https://tc39.es/ecma262/#sec-object.assign
1047 var objectAssign = !$assign || fails$4(function () {
1048 // should have correct order of operations (Edge bug)
1049 if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1050 enumerable: true,
1051 get: function () {
1052 defineProperty(this, 'b', {
1053 value: 3,
1054 enumerable: false
1055 });
1056 }
1057 }), { b: 2 })).b !== 1) return true;
1058 // should work with symbols and should have deterministic property order (V8 bug)
1059 var A = {};
1060 var B = {};
1061 // eslint-disable-next-line es/no-symbol -- safe
1062 var symbol = Symbol();
1063 var alphabet = 'abcdefghijklmnopqrst';
1064 A[symbol] = 7;
1065 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1066 return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1067 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1068 var T = toObject$1(target);
1069 var argumentsLength = arguments.length;
1070 var index = 1;
1071 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1072 var propertyIsEnumerable = propertyIsEnumerableModule.f;
1073 while (argumentsLength > index) {
1074 var S = IndexedObject$1(arguments[index++]);
1075 var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1076 var length = keys.length;
1077 var j = 0;
1078 var key;
1079 while (length > j) {
1080 key = keys[j++];
1081 if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1082 }
1083 } return T;
1084 } : $assign;
1085
1086 var $$4 = _export;
1087 var assign = objectAssign;
1088
1089 // `Object.assign` method
1090 // https://tc39.es/ecma262/#sec-object.assign
1091 // eslint-disable-next-line es/no-object-assign -- required for testing
1092 $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1093 assign: assign
1094 });
1095
1096 var classof$4 = classofRaw$2;
1097
1098 // `IsArray` abstract operation
1099 // https://tc39.es/ecma262/#sec-isarray
1100 // eslint-disable-next-line es/no-array-isarray -- safe
1101 var isArray$2 = Array.isArray || function isArray(argument) {
1102 return classof$4(argument) == 'Array';
1103 };
1104
1105 var wellKnownSymbol$4 = wellKnownSymbol$6;
1106
1107 var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
1108 var test = {};
1109
1110 test[TO_STRING_TAG$1] = 'z';
1111
1112 var toStringTagSupport = String(test) === '[object z]';
1113
1114 var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
1115 var isCallable$1 = isCallable$c;
1116 var classofRaw$1 = classofRaw$2;
1117 var wellKnownSymbol$3 = wellKnownSymbol$6;
1118
1119 var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
1120 var $Object = Object;
1121
1122 // ES3 wrong here
1123 var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1124
1125 // fallback for IE11 Script Access Denied error
1126 var tryGet = function (it, key) {
1127 try {
1128 return it[key];
1129 } catch (error) { /* empty */ }
1130 };
1131
1132 // getting tag from ES6+ `Object.prototype.toString`
1133 var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
1134 var O, tag, result;
1135 return it === undefined ? 'Undefined' : it === null ? 'Null'
1136 // @@toStringTag case
1137 : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1138 // builtinTag case
1139 : CORRECT_ARGUMENTS ? classofRaw$1(O)
1140 // ES3 arguments fallback
1141 : (result = classofRaw$1(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1142 };
1143
1144 var uncurryThis$7 = functionUncurryThis;
1145 var fails$3 = fails$d;
1146 var isCallable = isCallable$c;
1147 var classof$2 = classof$3;
1148 var getBuiltIn = getBuiltIn$3;
1149 var inspectSource = inspectSource$2;
1150
1151 var noop = function () { /* empty */ };
1152 var empty = [];
1153 var construct = getBuiltIn('Reflect', 'construct');
1154 var constructorRegExp = /^\s*(?:class|function)\b/;
1155 var exec$1 = uncurryThis$7(constructorRegExp.exec);
1156 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1157
1158 var isConstructorModern = function isConstructor(argument) {
1159 if (!isCallable(argument)) return false;
1160 try {
1161 construct(noop, empty, argument);
1162 return true;
1163 } catch (error) {
1164 return false;
1165 }
1166 };
1167
1168 var isConstructorLegacy = function isConstructor(argument) {
1169 if (!isCallable(argument)) return false;
1170 switch (classof$2(argument)) {
1171 case 'AsyncFunction':
1172 case 'GeneratorFunction':
1173 case 'AsyncGeneratorFunction': return false;
1174 }
1175 try {
1176 // we can't check .prototype since constructors produced by .bind haven't it
1177 // `Function#toString` throws on some built-it function in some legacy engines
1178 // (for example, `DOMQuad` and similar in FF41-)
1179 return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
1180 } catch (error) {
1181 return true;
1182 }
1183 };
1184
1185 isConstructorLegacy.sham = true;
1186
1187 // `IsConstructor` abstract operation
1188 // https://tc39.es/ecma262/#sec-isconstructor
1189 var isConstructor$2 = !construct || fails$3(function () {
1190 var called;
1191 return isConstructorModern(isConstructorModern.call)
1192 || !isConstructorModern(Object)
1193 || !isConstructorModern(function () { called = true; })
1194 || called;
1195 }) ? isConstructorLegacy : isConstructorModern;
1196
1197 var toPropertyKey = toPropertyKey$3;
1198 var definePropertyModule = objectDefineProperty;
1199 var createPropertyDescriptor = createPropertyDescriptor$3;
1200
1201 var createProperty$1 = function (object, key, value) {
1202 var propertyKey = toPropertyKey(key);
1203 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1204 else object[propertyKey] = value;
1205 };
1206
1207 var fails$2 = fails$d;
1208 var wellKnownSymbol$2 = wellKnownSymbol$6;
1209 var V8_VERSION = engineV8Version;
1210
1211 var SPECIES$2 = wellKnownSymbol$2('species');
1212
1213 var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
1214 // We can't use this feature detection in V8 since it causes
1215 // deoptimization and serious performance degradation
1216 // https://github.com/zloirock/core-js/issues/677
1217 return V8_VERSION >= 51 || !fails$2(function () {
1218 var array = [];
1219 var constructor = array.constructor = {};
1220 constructor[SPECIES$2] = function () {
1221 return { foo: 1 };
1222 };
1223 return array[METHOD_NAME](Boolean).foo !== 1;
1224 });
1225 };
1226
1227 var uncurryThis$6 = functionUncurryThis;
1228
1229 var arraySlice = uncurryThis$6([].slice);
1230
1231 var $$3 = _export;
1232 var isArray$1 = isArray$2;
1233 var isConstructor$1 = isConstructor$2;
1234 var isObject$1 = isObject$7;
1235 var toAbsoluteIndex = toAbsoluteIndex$2;
1236 var lengthOfArrayLike$1 = lengthOfArrayLike$3;
1237 var toIndexedObject = toIndexedObject$4;
1238 var createProperty = createProperty$1;
1239 var wellKnownSymbol$1 = wellKnownSymbol$6;
1240 var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
1241 var nativeSlice = arraySlice;
1242
1243 var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
1244
1245 var SPECIES$1 = wellKnownSymbol$1('species');
1246 var $Array$1 = Array;
1247 var max = Math.max;
1248
1249 // `Array.prototype.slice` method
1250 // https://tc39.es/ecma262/#sec-array.prototype.slice
1251 // fallback for not array-like ES3 strings and DOM objects
1252 $$3({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
1253 slice: function slice(start, end) {
1254 var O = toIndexedObject(this);
1255 var length = lengthOfArrayLike$1(O);
1256 var k = toAbsoluteIndex(start, length);
1257 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
1258 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
1259 var Constructor, result, n;
1260 if (isArray$1(O)) {
1261 Constructor = O.constructor;
1262 // cross-realm fallback
1263 if (isConstructor$1(Constructor) && (Constructor === $Array$1 || isArray$1(Constructor.prototype))) {
1264 Constructor = undefined;
1265 } else if (isObject$1(Constructor)) {
1266 Constructor = Constructor[SPECIES$1];
1267 if (Constructor === null) Constructor = undefined;
1268 }
1269 if (Constructor === $Array$1 || Constructor === undefined) {
1270 return nativeSlice(O, k, fin);
1271 }
1272 }
1273 result = new (Constructor === undefined ? $Array$1 : Constructor)(max(fin - k, 0));
1274 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
1275 result.length = n;
1276 return result;
1277 }
1278 });
1279
1280 var classof$1 = classof$3;
1281
1282 var $String = String;
1283
1284 var toString$3 = function (argument) {
1285 if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1286 return $String(argument);
1287 };
1288
1289 // a string of all valid unicode whitespaces
1290 var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1291 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1292
1293 var uncurryThis$5 = functionUncurryThis;
1294 var requireObjectCoercible = requireObjectCoercible$3;
1295 var toString$2 = toString$3;
1296 var whitespaces$1 = whitespaces$2;
1297
1298 var replace = uncurryThis$5(''.replace);
1299 var ltrim = RegExp('^[' + whitespaces$1 + ']+');
1300 var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
1301
1302 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1303 var createMethod$1 = function (TYPE) {
1304 return function ($this) {
1305 var string = toString$2(requireObjectCoercible($this));
1306 if (TYPE & 1) string = replace(string, ltrim, '');
1307 if (TYPE & 2) string = replace(string, rtrim, '$1');
1308 return string;
1309 };
1310 };
1311
1312 var stringTrim = {
1313 // `String.prototype.{ trimLeft, trimStart }` methods
1314 // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1315 start: createMethod$1(1),
1316 // `String.prototype.{ trimRight, trimEnd }` methods
1317 // https://tc39.es/ecma262/#sec-string.prototype.trimend
1318 end: createMethod$1(2),
1319 // `String.prototype.trim` method
1320 // https://tc39.es/ecma262/#sec-string.prototype.trim
1321 trim: createMethod$1(3)
1322 };
1323
1324 var global$1 = global$b;
1325 var fails$1 = fails$d;
1326 var uncurryThis$4 = functionUncurryThis;
1327 var toString$1 = toString$3;
1328 var trim = stringTrim.trim;
1329 var whitespaces = whitespaces$2;
1330
1331 var $parseInt$1 = global$1.parseInt;
1332 var Symbol$1 = global$1.Symbol;
1333 var ITERATOR = Symbol$1 && Symbol$1.iterator;
1334 var hex = /^[+-]?0x/i;
1335 var exec = uncurryThis$4(hex.exec);
1336 var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1337 // MS Edge 18- broken with boxed symbols
1338 || (ITERATOR && !fails$1(function () { $parseInt$1(Object(ITERATOR)); }));
1339
1340 // `parseInt` method
1341 // https://tc39.es/ecma262/#sec-parseint-string-radix
1342 var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
1343 var S = trim(toString$1(string));
1344 return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
1345 } : $parseInt$1;
1346
1347 var $$2 = _export;
1348 var $parseInt = numberParseInt;
1349
1350 // `parseInt` method
1351 // https://tc39.es/ecma262/#sec-parseint-string-radix
1352 $$2({ global: true, forced: parseInt != $parseInt }, {
1353 parseInt: $parseInt
1354 });
1355
1356 var classofRaw = classofRaw$2;
1357 var uncurryThis$3 = functionUncurryThis;
1358
1359 var functionUncurryThisClause = function (fn) {
1360 // Nashorn bug:
1361 // https://github.com/zloirock/core-js/issues/1128
1362 // https://github.com/zloirock/core-js/issues/1130
1363 if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
1364 };
1365
1366 var fails = fails$d;
1367
1368 var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1369 var method = [][METHOD_NAME];
1370 return !!method && fails(function () {
1371 // eslint-disable-next-line no-useless-call -- required for testing
1372 method.call(null, argument || function () { return 1; }, 1);
1373 });
1374 };
1375
1376 /* eslint-disable es/no-array-prototype-indexof -- required for testing */
1377 var $$1 = _export;
1378 var uncurryThis$2 = functionUncurryThisClause;
1379 var $indexOf = arrayIncludes.indexOf;
1380 var arrayMethodIsStrict = arrayMethodIsStrict$1;
1381
1382 var nativeIndexOf = uncurryThis$2([].indexOf);
1383
1384 var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
1385 var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');
1386
1387 // `Array.prototype.indexOf` method
1388 // https://tc39.es/ecma262/#sec-array.prototype.indexof
1389 $$1({ target: 'Array', proto: true, forced: FORCED }, {
1390 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
1391 var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
1392 return NEGATIVE_ZERO
1393 // convert -0 to +0
1394 ? nativeIndexOf(this, searchElement, fromIndex) || 0
1395 : $indexOf(this, searchElement, fromIndex);
1396 }
1397 });
1398
1399 var uncurryThis$1 = functionUncurryThisClause;
1400 var aCallable = aCallable$2;
1401 var NATIVE_BIND = functionBindNative;
1402
1403 var bind$1 = uncurryThis$1(uncurryThis$1.bind);
1404
1405 // optional / simple context binding
1406 var functionBindContext = function (fn, that) {
1407 aCallable(fn);
1408 return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1409 return fn.apply(that, arguments);
1410 };
1411 };
1412
1413 var isArray = isArray$2;
1414 var isConstructor = isConstructor$2;
1415 var isObject = isObject$7;
1416 var wellKnownSymbol = wellKnownSymbol$6;
1417
1418 var SPECIES = wellKnownSymbol('species');
1419 var $Array = Array;
1420
1421 // a part of `ArraySpeciesCreate` abstract operation
1422 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1423 var arraySpeciesConstructor$1 = function (originalArray) {
1424 var C;
1425 if (isArray(originalArray)) {
1426 C = originalArray.constructor;
1427 // cross-realm fallback
1428 if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
1429 else if (isObject(C)) {
1430 C = C[SPECIES];
1431 if (C === null) C = undefined;
1432 }
1433 } return C === undefined ? $Array : C;
1434 };
1435
1436 var arraySpeciesConstructor = arraySpeciesConstructor$1;
1437
1438 // `ArraySpeciesCreate` abstract operation
1439 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1440 var arraySpeciesCreate$1 = function (originalArray, length) {
1441 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1442 };
1443
1444 var bind = functionBindContext;
1445 var uncurryThis = functionUncurryThis;
1446 var IndexedObject = indexedObject;
1447 var toObject = toObject$3;
1448 var lengthOfArrayLike = lengthOfArrayLike$3;
1449 var arraySpeciesCreate = arraySpeciesCreate$1;
1450
1451 var push = uncurryThis([].push);
1452
1453 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1454 var createMethod = function (TYPE) {
1455 var IS_MAP = TYPE == 1;
1456 var IS_FILTER = TYPE == 2;
1457 var IS_SOME = TYPE == 3;
1458 var IS_EVERY = TYPE == 4;
1459 var IS_FIND_INDEX = TYPE == 6;
1460 var IS_FILTER_REJECT = TYPE == 7;
1461 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1462 return function ($this, callbackfn, that, specificCreate) {
1463 var O = toObject($this);
1464 var self = IndexedObject(O);
1465 var boundFunction = bind(callbackfn, that);
1466 var length = lengthOfArrayLike(self);
1467 var index = 0;
1468 var create = specificCreate || arraySpeciesCreate;
1469 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1470 var value, result;
1471 for (;length > index; index++) if (NO_HOLES || index in self) {
1472 value = self[index];
1473 result = boundFunction(value, index, O);
1474 if (TYPE) {
1475 if (IS_MAP) target[index] = result; // map
1476 else if (result) switch (TYPE) {
1477 case 3: return true; // some
1478 case 5: return value; // find
1479 case 6: return index; // findIndex
1480 case 2: push(target, value); // filter
1481 } else switch (TYPE) {
1482 case 4: return false; // every
1483 case 7: push(target, value); // filterReject
1484 }
1485 }
1486 }
1487 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
1488 };
1489 };
1490
1491 var arrayIteration = {
1492 // `Array.prototype.forEach` method
1493 // https://tc39.es/ecma262/#sec-array.prototype.foreach
1494 forEach: createMethod(0),
1495 // `Array.prototype.map` method
1496 // https://tc39.es/ecma262/#sec-array.prototype.map
1497 map: createMethod(1),
1498 // `Array.prototype.filter` method
1499 // https://tc39.es/ecma262/#sec-array.prototype.filter
1500 filter: createMethod(2),
1501 // `Array.prototype.some` method
1502 // https://tc39.es/ecma262/#sec-array.prototype.some
1503 some: createMethod(3),
1504 // `Array.prototype.every` method
1505 // https://tc39.es/ecma262/#sec-array.prototype.every
1506 every: createMethod(4),
1507 // `Array.prototype.find` method
1508 // https://tc39.es/ecma262/#sec-array.prototype.find
1509 find: createMethod(5),
1510 // `Array.prototype.findIndex` method
1511 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
1512 findIndex: createMethod(6),
1513 // `Array.prototype.filterReject` method
1514 // https://github.com/tc39/proposal-array-filtering
1515 filterReject: createMethod(7)
1516 };
1517
1518 var $ = _export;
1519 var $filter = arrayIteration.filter;
1520 var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
1521
1522 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1523
1524 // `Array.prototype.filter` method
1525 // https://tc39.es/ecma262/#sec-array.prototype.filter
1526 // with adding support of @@species
1527 $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1528 filter: function filter(callbackfn /* , thisArg */) {
1529 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1530 }
1531 });
1532
1533 var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
1534 var classof = classof$3;
1535
1536 // `Object.prototype.toString` method implementation
1537 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1538 var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
1539 return '[object ' + classof(this) + ']';
1540 };
1541
1542 var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1543 var defineBuiltIn = defineBuiltIn$2;
1544 var toString = objectToString;
1545
1546 // `Object.prototype.toString` method
1547 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1548 if (!TO_STRING_TAG_SUPPORT) {
1549 defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
1550 }
1551
1552 /**
1553 * @author doug-the-guy
1554 * @version v1.0.0
1555 *
1556 * Bootstrap Table Pipeline
1557 * -----------------------
1558 *
1559 * This plugin enables client side data caching for server side requests which will
1560 * eliminate the need to issue a new request every page change. This will allow
1561 * for a performance balance for a large data set between returning all data at once
1562 * (client side paging) and a new server side request (server side paging).
1563 *
1564 * There are two new options:
1565 * - usePipeline: enables this feature
1566 * - pipelineSize: the size of each cache window
1567 *
1568 * The size of the pipeline must be evenly divisible by the current page size. This is
1569 * assured by rounding up to the nearest evenly divisible value. For example, if
1570 * the pipeline size is 4990 and the current page size is 25, then pipeline size will
1571 * be dynamically set to 5000.
1572 *
1573 * The cache windows are computed based on the pipeline size and the total number of rows
1574 * returned by the server side query. For example, with pipeline size 500 and total rows
1575 * 1300, the cache windows will be:
1576 *
1577 * [{'lower': 0, 'upper': 499}, {'lower': 500, 'upper': 999}, {'lower': 1000, 'upper': 1499}]
1578 *
1579 * Using the limit (i.e. the pipelineSize) and offset parameters, the server side request
1580 * **MUST** return only the data in the requested cache window **AND** the total number of rows.
1581 * To wit, the server side code must use the offset and limit parameters to prepare the response
1582 * data.
1583 *
1584 * On a page change, the new offset is checked if it is within the current cache window. If so,
1585 * the requested page data is returned from the cached data set. Otherwise, a new server side
1586 * request will be issued for the new cache window.
1587 *
1588 * The current cached data is only invalidated on these events:
1589 * * sorting
1590 * * searching
1591 * * page size change
1592 * * page change moves into a new cache window
1593 *
1594 * There are two new events:
1595 * - cached-data-hit.bs.table: issued when cached data is used on a page change
1596 * - cached-data-reset.bs.table: issued when the cached data is invalidated and a
1597 * new server side request is issued
1598 *
1599 **/
1600
1601 var Utils = $$5.fn.bootstrapTable.utils;
1602 Object.assign($$5.fn.bootstrapTable.defaults, {
1603 usePipeline: false,
1604 pipelineSize: 1000,
1605 // eslint-disable-next-line no-unused-vars
1606 onCachedDataHit: function onCachedDataHit(data) {
1607 return false;
1608 },
1609 // eslint-disable-next-line no-unused-vars
1610 onCachedDataReset: function onCachedDataReset(data) {
1611 return false;
1612 }
1613 });
1614 Object.assign($$5.fn.bootstrapTable.events, {
1615 'cached-data-hit.bs.table': 'onCachedDataHit',
1616 'cached-data-reset.bs.table': 'onCachedDataReset'
1617 });
1618 var BootstrapTable = $$5.fn.bootstrapTable.Constructor;
1619 var _init = BootstrapTable.prototype.init;
1620 var _onSearch = BootstrapTable.prototype.onSearch;
1621 var _onSort = BootstrapTable.prototype.onSort;
1622 var _onPageListChange = BootstrapTable.prototype.onPageListChange;
1623 BootstrapTable.prototype.init = function () {
1624 // needs to be called before initServer()
1625 this.initPipeline();
1626 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1627 args[_key] = arguments[_key];
1628 }
1629 _init.apply(this, Array.prototype.slice.apply(args));
1630 };
1631 BootstrapTable.prototype.initPipeline = function () {
1632 this.cacheRequestJSON = {};
1633 this.cacheWindows = [];
1634 this.currWindow = 0;
1635 this.resetCache = true;
1636 };
1637 BootstrapTable.prototype.onSearch = function () {
1638 /* force a cache reset on search */
1639 if (this.options.usePipeline) {
1640 this.resetCache = true;
1641 }
1642 _onSearch.apply(this, Array.prototype.slice.apply(arguments));
1643 };
1644 BootstrapTable.prototype.onSort = function () {
1645 /* force a cache reset on sort */
1646 if (this.options.usePipeline) {
1647 this.resetCache = true;
1648 }
1649 _onSort.apply(this, Array.prototype.slice.apply(arguments));
1650 };
1651 BootstrapTable.prototype.onPageListChange = function (event) {
1652 /* rebuild cache window on page size change */
1653 var target = $$5(event.currentTarget);
1654 var newPageSize = parseInt(target.text(), 10);
1655 this.options.pipelineSize = this.calculatePipelineSize(this.options.pipelineSize, newPageSize);
1656 this.resetCache = true;
1657 _onPageListChange.apply(this, Array.prototype.slice.apply(arguments));
1658 };
1659 BootstrapTable.prototype.calculatePipelineSize = function (pipelineSize, pageSize) {
1660 /* calculate pipeline size by rounding up to the nearest value evenly divisible
1661 * by the pageSize */
1662 if (pageSize === 0) return 0;
1663 return Math.ceil(pipelineSize / pageSize) * pageSize;
1664 };
1665 BootstrapTable.prototype.setCacheWindows = function () {
1666 /* set cache windows based on the total number of rows returned by server side
1667 * request and the pipelineSize */
1668 this.cacheWindows = [];
1669 var numWindows = this.options.totalRows / this.options.pipelineSize;
1670 for (var i = 0; i <= numWindows; i++) {
1671 var b = i * this.options.pipelineSize;
1672 this.cacheWindows[i] = {
1673 lower: b,
1674 upper: b + this.options.pipelineSize - 1
1675 };
1676 }
1677 };
1678 BootstrapTable.prototype.setCurrWindow = function (offset) {
1679 /* set the current cache window index, based on where the current offset falls */
1680 this.currWindow = 0;
1681 for (var i = 0; i < this.cacheWindows.length; i++) {
1682 if (this.cacheWindows[i].lower <= offset && offset <= this.cacheWindows[i].upper) {
1683 this.currWindow = i;
1684 break;
1685 }
1686 }
1687 };
1688 BootstrapTable.prototype.drawFromCache = function (offset, limit) {
1689 /* draw rows from the cache using offset and limit */
1690 var res = Utils.extend(true, {}, this.cacheRequestJSON);
1691 var drawStart = offset - this.cacheWindows[this.currWindow].lower;
1692 var drawEnd = drawStart + limit;
1693 res.rows = res.rows.slice(drawStart, drawEnd);
1694 return res;
1695 };
1696 BootstrapTable.prototype.initServer = function (silent, query, url) {
1697 /* determine if requested data is in cache (on paging) or if
1698 * a new ajax request needs to be issued (sorting, searching, paging
1699 * moving outside of cached data, page size change)
1700 * initial version of this extension will entirely override base initServer
1701 **/
1702
1703 var data = {};
1704 var index = this.header.fields.indexOf(this.options.sortName);
1705 var params = {
1706 searchText: this.searchText,
1707 sortName: this.options.sortName,
1708 sortOrder: this.options.sortOrder
1709 };
1710 var request = null;
1711 if (this.header.sortNames[index]) {
1712 params.sortName = this.header.sortNames[index];
1713 }
1714 if (this.options.pagination && this.options.sidePagination === 'server') {
1715 params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
1716 params.pageNumber = this.options.pageNumber;
1717 }
1718 if (!(url || this.options.url) && !this.options.ajax) {
1719 return;
1720 }
1721 var useAjax = true;
1722 if (this.options.queryParamsType === 'limit') {
1723 params = {
1724 searchText: params.searchText,
1725 sortName: params.sortName,
1726 sortOrder: params.sortOrder
1727 };
1728 if (this.options.pagination && this.options.sidePagination === 'server') {
1729 params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
1730 params.offset = (this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize) * (this.options.pageNumber - 1);
1731 if (this.options.usePipeline) {
1732 // if cacheWindows is empty, this is the initial request
1733 if (!this.cacheWindows.length) {
1734 useAjax = true;
1735 params.drawOffset = params.offset;
1736 // cache exists: determine if the page request is entirely within the current cached window
1737 } else {
1738 var w = this.cacheWindows[this.currWindow];
1739
1740 // case 1: reset cache but stay within current window (e.g. column sort)
1741 // case 2: move outside of the current window (e.g. search or paging)
1742 // since each cache window is aligned with the current page size
1743 // checking if params.offset is outside the current window is sufficient.
1744 // need to requery for preceding or succeeding cache window
1745 // also handle case
1746 if (this.resetCache || params.offset < w.lower || params.offset > w.upper) {
1747 useAjax = true;
1748 this.setCurrWindow(params.offset);
1749 // store the relative offset for drawing the page data afterwards
1750 params.drawOffset = params.offset;
1751 // now set params.offset to the lower bound of the new cache window
1752 // the server will return that whole cache window
1753 params.offset = this.cacheWindows[this.currWindow].lower;
1754 // within current cache window
1755 } else {
1756 useAjax = false;
1757 }
1758 }
1759 } else if (params.limit === 0) {
1760 delete params.limit;
1761 }
1762 }
1763 }
1764
1765 // force an ajax call - this is on search, sort or page size change
1766 if (this.resetCache) {
1767 useAjax = true;
1768 this.resetCache = false;
1769 }
1770 if (this.options.usePipeline && useAjax) {
1771 /* in this scenario limit is used on the server to get the cache window
1772 * and drawLimit is used to get the page data afterwards */
1773 params.drawLimit = params.limit;
1774 params.limit = this.options.pipelineSize;
1775 }
1776
1777 // cached results can be used
1778 if (!useAjax) {
1779 var res = this.drawFromCache(params.offset, params.limit);
1780 this.load(res);
1781 this.trigger('load-success', res);
1782 this.trigger('cached-data-hit', res);
1783 return;
1784 }
1785 // cached results can't be used
1786 // continue base initServer code
1787 if (!$$5.isEmptyObject(this.filterColumnsPartial)) {
1788 params.filter = JSON.stringify(this.filterColumnsPartial, null);
1789 }
1790 data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data);
1791 Utils.extend(data, query || {});
1792
1793 // false to stop request
1794 if (data === false) {
1795 return;
1796 }
1797 if (!silent) {
1798 this.$tableLoading.show();
1799 }
1800 var self = this;
1801 request = Utils.extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), {
1802 type: this.options.method,
1803 url: url || this.options.url,
1804 data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data,
1805 cache: this.options.cache,
1806 contentType: this.options.contentType,
1807 dataType: this.options.dataType,
1808 success: function success(res) {
1809 res = Utils.calculateObjectValue(self.options, self.options.responseHandler, [res], res);
1810 // cache results if using pipelining
1811 if (self.options.usePipeline) {
1812 // store entire request in cache
1813 self.cacheRequestJSON = Utils.extend(true, {}, res);
1814 // this gets set in load() also but needs to be set before
1815 // setting cacheWindows
1816 self.options.totalRows = res[self.options.totalField];
1817 // if this is a search, potentially less results will be returned
1818 // so cache windows need to be rebuilt. Otherwise it
1819 // will come out the same
1820 self.setCacheWindows();
1821 self.setCurrWindow(params.drawOffset);
1822 // just load data for the page
1823 res = self.drawFromCache(params.drawOffset, params.drawLimit);
1824 self.trigger('cached-data-reset', res);
1825 }
1826 self.load(res);
1827 self.trigger('load-success', res);
1828 if (!silent) {
1829 self.hideLoading();
1830 }
1831 },
1832 error: function error(res) {
1833 var data = [];
1834 if (self.options.sidePagination === 'server') {
1835 data = {};
1836 data[self.options.totalField] = 0;
1837 data[self.options.dataField] = [];
1838 }
1839 self.load(data);
1840 self.trigger('load-error', res.status, res);
1841 if (!silent) {
1842 self.hideLoading();
1843 }
1844 }
1845 });
1846 if (this.options.ajax) {
1847 Utils.calculateObjectValue(this, this.options.ajax, [request], null);
1848 } else {
1849 if (this._xhr && this._xhr.readyState !== 4) {
1850 this._xhr.abort();
1851 }
1852 this._xhr = $$5.ajax(request);
1853 }
1854 };
1855
1856}));