bootstrap-table-rails 1.18.1 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +31 -133
  5. data/lib/bootstrap-table-rails/version.rb +1 -1
  6. data/vendor/.DS_Store +0 -0
  7. data/vendor/assets/.DS_Store +0 -0
  8. data/vendor/assets/javascripts/.DS_Store +0 -0
  9. data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
  10. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +375 -306
  11. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +585 -1374
  12. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +1499 -2288
  13. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +12 -2
  14. data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +7534 -7805
  15. data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1787 -1671
  16. data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +1224 -1137
  17. data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +2610 -3020
  18. data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +1255 -1176
  19. data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1269 -1193
  20. data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +876 -815
  21. data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1912 -2459
  22. data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +2238 -2742
  23. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +3163 -3028
  24. data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2442 -2367
  25. data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +1622 -1547
  26. data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +1619 -1542
  27. data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +45 -11
  28. data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +1473 -1377
  29. data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +1305 -1232
  30. data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +1809 -1760
  31. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.css +5 -2
  32. data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +1132 -1061
  33. data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +343 -309
  34. data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +1660 -2282
  35. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +1486 -1407
  36. data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +1067 -984
  37. data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +927 -711
  38. data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +1263 -1160
  39. data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +2049 -2634
  40. data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +1250 -1918
  41. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +149 -120
  42. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +149 -120
  43. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +149 -120
  44. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +149 -120
  45. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +149 -120
  46. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +149 -120
  47. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +188 -120
  48. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +149 -120
  49. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +149 -120
  50. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +149 -120
  51. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +149 -120
  52. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +149 -120
  53. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +149 -120
  54. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +167 -137
  55. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +149 -120
  56. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +149 -120
  57. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +149 -120
  58. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +149 -120
  59. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +168 -139
  60. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +149 -120
  61. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +149 -120
  62. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +149 -120
  63. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +149 -120
  64. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +149 -120
  65. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +149 -120
  66. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +149 -120
  67. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +149 -120
  68. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +149 -120
  69. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +149 -120
  70. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +149 -120
  71. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +149 -120
  72. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +149 -120
  73. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +149 -120
  74. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +149 -120
  75. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +149 -120
  76. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +149 -120
  77. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +149 -120
  78. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +149 -120
  79. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +172 -143
  80. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +149 -120
  81. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +172 -143
  82. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +149 -120
  83. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +149 -120
  84. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +149 -120
  85. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +149 -120
  86. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +149 -120
  87. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +149 -120
  88. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +149 -120
  89. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +149 -120
  90. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +149 -120
  91. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +149 -120
  92. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +149 -120
  93. data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +149 -120
  94. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +11 -1
  95. data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1133 -1044
  96. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +11 -1
  97. data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +1125 -1036
  98. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +15 -1
  99. data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +1141 -1052
  100. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +15 -1
  101. data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +1134 -1045
  102. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +11 -1
  103. data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +1102 -1013
  104. metadata +8 -3
@@ -1,1765 +1,1814 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3
- typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4
- (global = global || self, factory(global.jQuery));
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
5
  }(this, (function ($) { 'use strict';
6
6
 
7
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
8
-
9
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
-
11
- function createCommonjsModule(fn, module) {
12
- return module = { exports: {} }, fn(module, module.exports), module.exports;
13
- }
14
-
15
- var check = function (it) {
16
- return it && it.Math == Math && it;
17
- };
18
-
19
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
20
- var global_1 =
21
- // eslint-disable-next-line no-undef
22
- check(typeof globalThis == 'object' && globalThis) ||
23
- check(typeof window == 'object' && window) ||
24
- check(typeof self == 'object' && self) ||
25
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
- // eslint-disable-next-line no-new-func
27
- Function('return this')();
28
-
29
- var fails = function (exec) {
30
- try {
31
- return !!exec();
32
- } catch (error) {
33
- return true;
34
- }
35
- };
36
-
37
- // Thank's IE8 for his funny defineProperty
38
- var descriptors = !fails(function () {
39
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
40
- });
41
-
42
- var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
43
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
44
-
45
- // Nashorn ~ JDK8 bug
46
- var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
47
-
48
- // `Object.prototype.propertyIsEnumerable` method implementation
49
- // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
50
- var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
51
- var descriptor = getOwnPropertyDescriptor(this, V);
52
- return !!descriptor && descriptor.enumerable;
53
- } : nativePropertyIsEnumerable;
54
-
55
- var objectPropertyIsEnumerable = {
56
- f: f
57
- };
58
-
59
- var createPropertyDescriptor = function (bitmap, value) {
60
- return {
61
- enumerable: !(bitmap & 1),
62
- configurable: !(bitmap & 2),
63
- writable: !(bitmap & 4),
64
- value: value
65
- };
66
- };
67
-
68
- var toString = {}.toString;
69
-
70
- var classofRaw = function (it) {
71
- return toString.call(it).slice(8, -1);
72
- };
73
-
74
- var split = ''.split;
75
-
76
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
77
- var indexedObject = fails(function () {
78
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
79
- // eslint-disable-next-line no-prototype-builtins
80
- return !Object('z').propertyIsEnumerable(0);
81
- }) ? function (it) {
82
- return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
83
- } : Object;
84
-
85
- // `RequireObjectCoercible` abstract operation
86
- // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
87
- var requireObjectCoercible = function (it) {
88
- if (it == undefined) throw TypeError("Can't call method on " + it);
89
- return it;
90
- };
91
-
92
- // toObject with fallback for non-array-like ES3 strings
93
-
94
-
95
-
96
- var toIndexedObject = function (it) {
97
- return indexedObject(requireObjectCoercible(it));
98
- };
99
-
100
- var isObject = function (it) {
101
- return typeof it === 'object' ? it !== null : typeof it === 'function';
102
- };
103
-
104
- // `ToPrimitive` abstract operation
105
- // https://tc39.github.io/ecma262/#sec-toprimitive
106
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
107
- // and the second argument - flag - preferred type is a string
108
- var toPrimitive = function (input, PREFERRED_STRING) {
109
- if (!isObject(input)) return input;
110
- var fn, val;
111
- if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
112
- if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
113
- if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
114
- throw TypeError("Can't convert object to primitive value");
115
- };
116
-
117
- var hasOwnProperty = {}.hasOwnProperty;
118
-
119
- var has = function (it, key) {
120
- return hasOwnProperty.call(it, key);
121
- };
122
-
123
- var document$1 = global_1.document;
124
- // typeof document.createElement is 'object' in old IE
125
- var EXISTS = isObject(document$1) && isObject(document$1.createElement);
126
-
127
- var documentCreateElement = function (it) {
128
- return EXISTS ? document$1.createElement(it) : {};
129
- };
130
-
131
- // Thank's IE8 for his funny defineProperty
132
- var ie8DomDefine = !descriptors && !fails(function () {
133
- return Object.defineProperty(documentCreateElement('div'), 'a', {
134
- get: function () { return 7; }
135
- }).a != 7;
136
- });
137
-
138
- var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
139
-
140
- // `Object.getOwnPropertyDescriptor` method
141
- // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
142
- var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
143
- O = toIndexedObject(O);
144
- P = toPrimitive(P, true);
145
- if (ie8DomDefine) try {
146
- return nativeGetOwnPropertyDescriptor(O, P);
147
- } catch (error) { /* empty */ }
148
- if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
149
- };
150
-
151
- var objectGetOwnPropertyDescriptor = {
152
- f: f$1
153
- };
154
-
155
- var anObject = function (it) {
156
- if (!isObject(it)) {
157
- throw TypeError(String(it) + ' is not an object');
158
- } return it;
159
- };
160
-
161
- var nativeDefineProperty = Object.defineProperty;
162
-
163
- // `Object.defineProperty` method
164
- // https://tc39.github.io/ecma262/#sec-object.defineproperty
165
- var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
166
- anObject(O);
167
- P = toPrimitive(P, true);
168
- anObject(Attributes);
169
- if (ie8DomDefine) try {
170
- return nativeDefineProperty(O, P, Attributes);
171
- } catch (error) { /* empty */ }
172
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
173
- if ('value' in Attributes) O[P] = Attributes.value;
174
- return O;
175
- };
176
-
177
- var objectDefineProperty = {
178
- f: f$2
179
- };
180
-
181
- var createNonEnumerableProperty = descriptors ? function (object, key, value) {
182
- return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
183
- } : function (object, key, value) {
184
- object[key] = value;
185
- return object;
186
- };
187
-
188
- var setGlobal = function (key, value) {
189
- try {
190
- createNonEnumerableProperty(global_1, key, value);
191
- } catch (error) {
192
- global_1[key] = value;
193
- } return value;
194
- };
195
-
196
- var SHARED = '__core-js_shared__';
197
- var store = global_1[SHARED] || setGlobal(SHARED, {});
198
-
199
- var sharedStore = store;
200
-
201
- var functionToString = Function.toString;
202
-
203
- // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
204
- if (typeof sharedStore.inspectSource != 'function') {
205
- sharedStore.inspectSource = function (it) {
206
- return functionToString.call(it);
207
- };
208
- }
209
-
210
- var inspectSource = sharedStore.inspectSource;
211
-
212
- var WeakMap = global_1.WeakMap;
213
-
214
- var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
215
-
216
- var shared = createCommonjsModule(function (module) {
217
- (module.exports = function (key, value) {
218
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
219
- })('versions', []).push({
220
- version: '3.6.0',
221
- mode: 'global',
222
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
223
- });
224
- });
225
-
226
- var id = 0;
227
- var postfix = Math.random();
228
-
229
- var uid = function (key) {
230
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
231
- };
232
-
233
- var keys = shared('keys');
234
-
235
- var sharedKey = function (key) {
236
- return keys[key] || (keys[key] = uid(key));
237
- };
238
-
239
- var hiddenKeys = {};
240
-
241
- var WeakMap$1 = global_1.WeakMap;
242
- var set, get, has$1;
243
-
244
- var enforce = function (it) {
245
- return has$1(it) ? get(it) : set(it, {});
246
- };
247
-
248
- var getterFor = function (TYPE) {
249
- return function (it) {
250
- var state;
251
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
252
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
253
- } return state;
254
- };
255
- };
256
-
257
- if (nativeWeakMap) {
258
- var store$1 = new WeakMap$1();
259
- var wmget = store$1.get;
260
- var wmhas = store$1.has;
261
- var wmset = store$1.set;
262
- set = function (it, metadata) {
263
- wmset.call(store$1, it, metadata);
264
- return metadata;
265
- };
266
- get = function (it) {
267
- return wmget.call(store$1, it) || {};
268
- };
269
- has$1 = function (it) {
270
- return wmhas.call(store$1, it);
271
- };
272
- } else {
273
- var STATE = sharedKey('state');
274
- hiddenKeys[STATE] = true;
275
- set = function (it, metadata) {
276
- createNonEnumerableProperty(it, STATE, metadata);
277
- return metadata;
278
- };
279
- get = function (it) {
280
- return has(it, STATE) ? it[STATE] : {};
281
- };
282
- has$1 = function (it) {
283
- return has(it, STATE);
284
- };
285
- }
286
-
287
- var internalState = {
288
- set: set,
289
- get: get,
290
- has: has$1,
291
- enforce: enforce,
292
- getterFor: getterFor
293
- };
294
-
295
- var redefine = createCommonjsModule(function (module) {
296
- var getInternalState = internalState.get;
297
- var enforceInternalState = internalState.enforce;
298
- var TEMPLATE = String(String).split('String');
299
-
300
- (module.exports = function (O, key, value, options) {
301
- var unsafe = options ? !!options.unsafe : false;
302
- var simple = options ? !!options.enumerable : false;
303
- var noTargetGet = options ? !!options.noTargetGet : false;
304
- if (typeof value == 'function') {
305
- if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
306
- enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
307
- }
308
- if (O === global_1) {
309
- if (simple) O[key] = value;
310
- else setGlobal(key, value);
311
- return;
312
- } else if (!unsafe) {
313
- delete O[key];
314
- } else if (!noTargetGet && O[key]) {
315
- simple = true;
316
- }
317
- if (simple) O[key] = value;
318
- else createNonEnumerableProperty(O, key, value);
319
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
320
- })(Function.prototype, 'toString', function toString() {
321
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
322
- });
323
- });
324
-
325
- var path = global_1;
326
-
327
- var aFunction = function (variable) {
328
- return typeof variable == 'function' ? variable : undefined;
329
- };
330
-
331
- var getBuiltIn = function (namespace, method) {
332
- return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
333
- : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
334
- };
335
-
336
- var ceil = Math.ceil;
337
- var floor = Math.floor;
338
-
339
- // `ToInteger` abstract operation
340
- // https://tc39.github.io/ecma262/#sec-tointeger
341
- var toInteger = function (argument) {
342
- return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
343
- };
344
-
345
- var min = Math.min;
346
-
347
- // `ToLength` abstract operation
348
- // https://tc39.github.io/ecma262/#sec-tolength
349
- var toLength = function (argument) {
350
- return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
351
- };
352
-
353
- var max = Math.max;
354
- var min$1 = Math.min;
355
-
356
- // Helper for a popular repeating case of the spec:
357
- // Let integer be ? ToInteger(index).
358
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
359
- var toAbsoluteIndex = function (index, length) {
360
- var integer = toInteger(index);
361
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
362
- };
363
-
364
- // `Array.prototype.{ indexOf, includes }` methods implementation
365
- var createMethod = function (IS_INCLUDES) {
366
- return function ($this, el, fromIndex) {
367
- var O = toIndexedObject($this);
368
- var length = toLength(O.length);
369
- var index = toAbsoluteIndex(fromIndex, length);
370
- var value;
371
- // Array#includes uses SameValueZero equality algorithm
372
- // eslint-disable-next-line no-self-compare
373
- if (IS_INCLUDES && el != el) while (length > index) {
374
- value = O[index++];
375
- // eslint-disable-next-line no-self-compare
376
- if (value != value) return true;
377
- // Array#indexOf ignores holes, Array#includes - not
378
- } else for (;length > index; index++) {
379
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
380
- } return !IS_INCLUDES && -1;
381
- };
382
- };
383
-
384
- var arrayIncludes = {
385
- // `Array.prototype.includes` method
386
- // https://tc39.github.io/ecma262/#sec-array.prototype.includes
387
- includes: createMethod(true),
388
- // `Array.prototype.indexOf` method
389
- // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
390
- indexOf: createMethod(false)
391
- };
392
-
393
- var indexOf = arrayIncludes.indexOf;
394
-
395
-
396
- var objectKeysInternal = function (object, names) {
397
- var O = toIndexedObject(object);
398
- var i = 0;
399
- var result = [];
400
- var key;
401
- for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
402
- // Don't enum bug & hidden keys
403
- while (names.length > i) if (has(O, key = names[i++])) {
404
- ~indexOf(result, key) || result.push(key);
405
- }
406
- return result;
407
- };
408
-
409
- // IE8- don't enum bug keys
410
- var enumBugKeys = [
411
- 'constructor',
412
- 'hasOwnProperty',
413
- 'isPrototypeOf',
414
- 'propertyIsEnumerable',
415
- 'toLocaleString',
416
- 'toString',
417
- 'valueOf'
418
- ];
419
-
420
- var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
421
-
422
- // `Object.getOwnPropertyNames` method
423
- // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
424
- var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
425
- return objectKeysInternal(O, hiddenKeys$1);
426
- };
427
-
428
- var objectGetOwnPropertyNames = {
429
- f: f$3
430
- };
431
-
432
- var f$4 = Object.getOwnPropertySymbols;
433
-
434
- var objectGetOwnPropertySymbols = {
435
- f: f$4
436
- };
437
-
438
- // all object keys, includes non-enumerable and symbols
439
- var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
440
- var keys = objectGetOwnPropertyNames.f(anObject(it));
441
- var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
442
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
443
- };
444
-
445
- var copyConstructorProperties = function (target, source) {
446
- var keys = ownKeys(source);
447
- var defineProperty = objectDefineProperty.f;
448
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
449
- for (var i = 0; i < keys.length; i++) {
450
- var key = keys[i];
451
- if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
452
- }
453
- };
454
-
455
- var replacement = /#|\.prototype\./;
456
-
457
- var isForced = function (feature, detection) {
458
- var value = data[normalize(feature)];
459
- return value == POLYFILL ? true
460
- : value == NATIVE ? false
461
- : typeof detection == 'function' ? fails(detection)
462
- : !!detection;
463
- };
464
-
465
- var normalize = isForced.normalize = function (string) {
466
- return String(string).replace(replacement, '.').toLowerCase();
467
- };
468
-
469
- var data = isForced.data = {};
470
- var NATIVE = isForced.NATIVE = 'N';
471
- var POLYFILL = isForced.POLYFILL = 'P';
472
-
473
- var isForced_1 = isForced;
474
-
475
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
476
-
477
-
478
-
479
-
480
-
481
-
482
- /*
483
- options.target - name of the target object
484
- options.global - target is the global object
485
- options.stat - export as static methods of target
486
- options.proto - export as prototype methods of target
487
- options.real - real prototype method for the `pure` version
488
- options.forced - export even if the native feature is available
489
- options.bind - bind methods to the target, required for the `pure` version
490
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
491
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
492
- options.sham - add a flag to not completely full polyfills
493
- options.enumerable - export as enumerable property
494
- options.noTargetGet - prevent calling a getter on target
495
- */
496
- var _export = function (options, source) {
497
- var TARGET = options.target;
498
- var GLOBAL = options.global;
499
- var STATIC = options.stat;
500
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
501
- if (GLOBAL) {
502
- target = global_1;
503
- } else if (STATIC) {
504
- target = global_1[TARGET] || setGlobal(TARGET, {});
505
- } else {
506
- target = (global_1[TARGET] || {}).prototype;
507
- }
508
- if (target) for (key in source) {
509
- sourceProperty = source[key];
510
- if (options.noTargetGet) {
511
- descriptor = getOwnPropertyDescriptor$1(target, key);
512
- targetProperty = descriptor && descriptor.value;
513
- } else targetProperty = target[key];
514
- FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
515
- // contained in target
516
- if (!FORCED && targetProperty !== undefined) {
517
- if (typeof sourceProperty === typeof targetProperty) continue;
518
- copyConstructorProperties(sourceProperty, targetProperty);
519
- }
520
- // add a flag to not completely full polyfills
521
- if (options.sham || (targetProperty && targetProperty.sham)) {
522
- createNonEnumerableProperty(sourceProperty, 'sham', true);
523
- }
524
- // extend global
525
- redefine(target, key, sourceProperty, options);
526
- }
527
- };
528
-
529
- // `IsArray` abstract operation
530
- // https://tc39.github.io/ecma262/#sec-isarray
531
- var isArray = Array.isArray || function isArray(arg) {
532
- return classofRaw(arg) == 'Array';
533
- };
534
-
535
- // `ToObject` abstract operation
536
- // https://tc39.github.io/ecma262/#sec-toobject
537
- var toObject = function (argument) {
538
- return Object(requireObjectCoercible(argument));
539
- };
540
-
541
- var createProperty = function (object, key, value) {
542
- var propertyKey = toPrimitive(key);
543
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
544
- else object[propertyKey] = value;
545
- };
546
-
547
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
548
- // Chrome 38 Symbol has incorrect toString conversion
549
- // eslint-disable-next-line no-undef
550
- return !String(Symbol());
551
- });
552
-
553
- var useSymbolAsUid = nativeSymbol
554
- // eslint-disable-next-line no-undef
555
- && !Symbol.sham
556
- // eslint-disable-next-line no-undef
557
- && typeof Symbol() == 'symbol';
558
-
559
- var WellKnownSymbolsStore = shared('wks');
560
- var Symbol$1 = global_1.Symbol;
561
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
562
-
563
- var wellKnownSymbol = function (name) {
564
- if (!has(WellKnownSymbolsStore, name)) {
565
- if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
566
- else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
567
- } return WellKnownSymbolsStore[name];
568
- };
569
-
570
- var SPECIES = wellKnownSymbol('species');
571
-
572
- // `ArraySpeciesCreate` abstract operation
573
- // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
574
- var arraySpeciesCreate = function (originalArray, length) {
575
- var C;
576
- if (isArray(originalArray)) {
577
- C = originalArray.constructor;
578
- // cross-realm fallback
579
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
580
- else if (isObject(C)) {
581
- C = C[SPECIES];
582
- if (C === null) C = undefined;
583
- }
584
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
585
- };
586
-
587
- var userAgent = getBuiltIn('navigator', 'userAgent') || '';
588
-
589
- var process = global_1.process;
590
- var versions = process && process.versions;
591
- var v8 = versions && versions.v8;
592
- var match, version;
593
-
594
- if (v8) {
595
- match = v8.split('.');
596
- version = match[0] + match[1];
597
- } else if (userAgent) {
598
- match = userAgent.match(/Edge\/(\d+)/);
599
- if (!match || match[1] >= 74) {
600
- match = userAgent.match(/Chrome\/(\d+)/);
601
- if (match) version = match[1];
602
- }
603
- }
604
-
605
- var v8Version = version && +version;
606
-
607
- var SPECIES$1 = wellKnownSymbol('species');
608
-
609
- var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
610
- // We can't use this feature detection in V8 since it causes
611
- // deoptimization and serious performance degradation
612
- // https://github.com/zloirock/core-js/issues/677
613
- return v8Version >= 51 || !fails(function () {
614
- var array = [];
615
- var constructor = array.constructor = {};
616
- constructor[SPECIES$1] = function () {
617
- return { foo: 1 };
618
- };
619
- return array[METHOD_NAME](Boolean).foo !== 1;
620
- });
621
- };
622
-
623
- var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
624
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
625
- var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
626
-
627
- // We can't use this feature detection in V8 since it causes
628
- // deoptimization and serious performance degradation
629
- // https://github.com/zloirock/core-js/issues/679
630
- var IS_CONCAT_SPREADABLE_SUPPORT = v8Version >= 51 || !fails(function () {
631
- var array = [];
632
- array[IS_CONCAT_SPREADABLE] = false;
633
- return array.concat()[0] !== array;
634
- });
635
-
636
- var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
637
-
638
- var isConcatSpreadable = function (O) {
639
- if (!isObject(O)) return false;
640
- var spreadable = O[IS_CONCAT_SPREADABLE];
641
- return spreadable !== undefined ? !!spreadable : isArray(O);
642
- };
643
-
644
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
645
-
646
- // `Array.prototype.concat` method
647
- // https://tc39.github.io/ecma262/#sec-array.prototype.concat
648
- // with adding support of @@isConcatSpreadable and @@species
649
- _export({ target: 'Array', proto: true, forced: FORCED }, {
650
- concat: function concat(arg) { // eslint-disable-line no-unused-vars
651
- var O = toObject(this);
652
- var A = arraySpeciesCreate(O, 0);
653
- var n = 0;
654
- var i, k, length, len, E;
655
- for (i = -1, length = arguments.length; i < length; i++) {
656
- E = i === -1 ? O : arguments[i];
657
- if (isConcatSpreadable(E)) {
658
- len = toLength(E.length);
659
- if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
660
- for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
661
- } else {
662
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
663
- createProperty(A, n++, E);
664
- }
665
- }
666
- A.length = n;
667
- return A;
668
- }
669
- });
670
-
671
- var aFunction$1 = function (it) {
672
- if (typeof it != 'function') {
673
- throw TypeError(String(it) + ' is not a function');
674
- } return it;
675
- };
676
-
677
- // optional / simple context binding
678
- var bindContext = function (fn, that, length) {
679
- aFunction$1(fn);
680
- if (that === undefined) return fn;
681
- switch (length) {
682
- case 0: return function () {
683
- return fn.call(that);
684
- };
685
- case 1: return function (a) {
686
- return fn.call(that, a);
687
- };
688
- case 2: return function (a, b) {
689
- return fn.call(that, a, b);
690
- };
691
- case 3: return function (a, b, c) {
692
- return fn.call(that, a, b, c);
693
- };
694
- }
695
- return function (/* ...args */) {
696
- return fn.apply(that, arguments);
697
- };
698
- };
699
-
700
- var push = [].push;
701
-
702
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
703
- var createMethod$1 = function (TYPE) {
704
- var IS_MAP = TYPE == 1;
705
- var IS_FILTER = TYPE == 2;
706
- var IS_SOME = TYPE == 3;
707
- var IS_EVERY = TYPE == 4;
708
- var IS_FIND_INDEX = TYPE == 6;
709
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
710
- return function ($this, callbackfn, that, specificCreate) {
711
- var O = toObject($this);
712
- var self = indexedObject(O);
713
- var boundFunction = bindContext(callbackfn, that, 3);
714
- var length = toLength(self.length);
715
- var index = 0;
716
- var create = specificCreate || arraySpeciesCreate;
717
- var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
718
- var value, result;
719
- for (;length > index; index++) if (NO_HOLES || index in self) {
720
- value = self[index];
721
- result = boundFunction(value, index, O);
722
- if (TYPE) {
723
- if (IS_MAP) target[index] = result; // map
724
- else if (result) switch (TYPE) {
725
- case 3: return true; // some
726
- case 5: return value; // find
727
- case 6: return index; // findIndex
728
- case 2: push.call(target, value); // filter
729
- } else if (IS_EVERY) return false; // every
730
- }
731
- }
732
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
733
- };
734
- };
735
-
736
- var arrayIteration = {
737
- // `Array.prototype.forEach` method
738
- // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
739
- forEach: createMethod$1(0),
740
- // `Array.prototype.map` method
741
- // https://tc39.github.io/ecma262/#sec-array.prototype.map
742
- map: createMethod$1(1),
743
- // `Array.prototype.filter` method
744
- // https://tc39.github.io/ecma262/#sec-array.prototype.filter
745
- filter: createMethod$1(2),
746
- // `Array.prototype.some` method
747
- // https://tc39.github.io/ecma262/#sec-array.prototype.some
748
- some: createMethod$1(3),
749
- // `Array.prototype.every` method
750
- // https://tc39.github.io/ecma262/#sec-array.prototype.every
751
- every: createMethod$1(4),
752
- // `Array.prototype.find` method
753
- // https://tc39.github.io/ecma262/#sec-array.prototype.find
754
- find: createMethod$1(5),
755
- // `Array.prototype.findIndex` method
756
- // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
757
- findIndex: createMethod$1(6)
758
- };
759
-
760
- // `Object.keys` method
761
- // https://tc39.github.io/ecma262/#sec-object.keys
762
- var objectKeys = Object.keys || function keys(O) {
763
- return objectKeysInternal(O, enumBugKeys);
764
- };
765
-
766
- // `Object.defineProperties` method
767
- // https://tc39.github.io/ecma262/#sec-object.defineproperties
768
- var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
769
- anObject(O);
770
- var keys = objectKeys(Properties);
771
- var length = keys.length;
772
- var index = 0;
773
- var key;
774
- while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
775
- return O;
776
- };
777
-
778
- var html = getBuiltIn('document', 'documentElement');
779
-
780
- var GT = '>';
781
- var LT = '<';
782
- var PROTOTYPE = 'prototype';
783
- var SCRIPT = 'script';
784
- var IE_PROTO = sharedKey('IE_PROTO');
785
-
786
- var EmptyConstructor = function () { /* empty */ };
787
-
788
- var scriptTag = function (content) {
789
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
790
- };
791
-
792
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
793
- var NullProtoObjectViaActiveX = function (activeXDocument) {
794
- activeXDocument.write(scriptTag(''));
795
- activeXDocument.close();
796
- var temp = activeXDocument.parentWindow.Object;
797
- activeXDocument = null; // avoid memory leak
798
- return temp;
799
- };
800
-
801
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
802
- var NullProtoObjectViaIFrame = function () {
803
- // Thrash, waste and sodomy: IE GC bug
804
- var iframe = documentCreateElement('iframe');
805
- var JS = 'java' + SCRIPT + ':';
806
- var iframeDocument;
807
- iframe.style.display = 'none';
808
- html.appendChild(iframe);
809
- // https://github.com/zloirock/core-js/issues/475
810
- iframe.src = String(JS);
811
- iframeDocument = iframe.contentWindow.document;
812
- iframeDocument.open();
813
- iframeDocument.write(scriptTag('document.F=Object'));
814
- iframeDocument.close();
815
- return iframeDocument.F;
816
- };
817
-
818
- // Check for document.domain and active x support
819
- // No need to use active x approach when document.domain is not set
820
- // see https://github.com/es-shims/es5-shim/issues/150
821
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
822
- // avoid IE GC bug
823
- var activeXDocument;
824
- var NullProtoObject = function () {
825
- try {
826
- /* global ActiveXObject */
827
- activeXDocument = document.domain && new ActiveXObject('htmlfile');
828
- } catch (error) { /* ignore */ }
829
- NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
830
- var length = enumBugKeys.length;
831
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
832
- return NullProtoObject();
833
- };
834
-
835
- hiddenKeys[IE_PROTO] = true;
836
-
837
- // `Object.create` method
838
- // https://tc39.github.io/ecma262/#sec-object.create
839
- var objectCreate = Object.create || function create(O, Properties) {
840
- var result;
841
- if (O !== null) {
842
- EmptyConstructor[PROTOTYPE] = anObject(O);
843
- result = new EmptyConstructor();
844
- EmptyConstructor[PROTOTYPE] = null;
845
- // add "__proto__" for Object.getPrototypeOf polyfill
846
- result[IE_PROTO] = O;
847
- } else result = NullProtoObject();
848
- return Properties === undefined ? result : objectDefineProperties(result, Properties);
849
- };
850
-
851
- var UNSCOPABLES = wellKnownSymbol('unscopables');
852
- var ArrayPrototype = Array.prototype;
853
-
854
- // Array.prototype[@@unscopables]
855
- // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
856
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
857
- objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
858
- configurable: true,
859
- value: objectCreate(null)
860
- });
861
- }
862
-
863
- // add a key to Array.prototype[@@unscopables]
864
- var addToUnscopables = function (key) {
865
- ArrayPrototype[UNSCOPABLES][key] = true;
866
- };
867
-
868
- var $find = arrayIteration.find;
869
-
870
-
871
- var FIND = 'find';
872
- var SKIPS_HOLES = true;
873
-
874
- // Shouldn't skip holes
875
- if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
876
-
877
- // `Array.prototype.find` method
878
- // https://tc39.github.io/ecma262/#sec-array.prototype.find
879
- _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
880
- find: function find(callbackfn /* , that = undefined */) {
881
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
882
- }
883
- });
884
-
885
- // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
886
- addToUnscopables(FIND);
887
-
888
- var sloppyArrayMethod = function (METHOD_NAME, argument) {
889
- var method = [][METHOD_NAME];
890
- return !method || !fails(function () {
891
- // eslint-disable-next-line no-useless-call,no-throw-literal
892
- method.call(null, argument || function () { throw 1; }, 1);
893
- });
894
- };
895
-
896
- var $indexOf = arrayIncludes.indexOf;
897
-
898
-
899
- var nativeIndexOf = [].indexOf;
900
-
901
- var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
902
- var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
903
-
904
- // `Array.prototype.indexOf` method
905
- // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
906
- _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
907
- indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
908
- return NEGATIVE_ZERO
909
- // convert -0 to +0
910
- ? nativeIndexOf.apply(this, arguments) || 0
911
- : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
912
- }
913
- });
914
-
915
- var $map = arrayIteration.map;
916
-
917
-
918
-
919
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
920
- // FF49- issue
921
- var USES_TO_LENGTH = HAS_SPECIES_SUPPORT && !fails(function () {
922
- [].map.call({ length: -1, 0: 1 }, function (it) { throw it; });
923
- });
924
-
925
- // `Array.prototype.map` method
926
- // https://tc39.github.io/ecma262/#sec-array.prototype.map
927
- // with adding support of @@species
928
- _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
929
- map: function map(callbackfn /* , thisArg */) {
930
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
931
- }
932
- });
933
-
934
- var SPECIES$2 = wellKnownSymbol('species');
935
- var nativeSlice = [].slice;
936
- var max$1 = Math.max;
937
-
938
- // `Array.prototype.slice` method
939
- // https://tc39.github.io/ecma262/#sec-array.prototype.slice
940
- // fallback for not array-like ES3 strings and DOM objects
941
- _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
942
- slice: function slice(start, end) {
943
- var O = toIndexedObject(this);
944
- var length = toLength(O.length);
945
- var k = toAbsoluteIndex(start, length);
946
- var fin = toAbsoluteIndex(end === undefined ? length : end, length);
947
- // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
948
- var Constructor, result, n;
949
- if (isArray(O)) {
950
- Constructor = O.constructor;
951
- // cross-realm fallback
952
- if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
953
- Constructor = undefined;
954
- } else if (isObject(Constructor)) {
955
- Constructor = Constructor[SPECIES$2];
956
- if (Constructor === null) Constructor = undefined;
957
- }
958
- if (Constructor === Array || Constructor === undefined) {
959
- return nativeSlice.call(O, k, fin);
960
- }
961
- }
962
- result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
963
- for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
964
- result.length = n;
965
- return result;
966
- }
967
- });
968
-
969
- var test = [];
970
- var nativeSort = test.sort;
971
-
972
- // IE8-
973
- var FAILS_ON_UNDEFINED = fails(function () {
974
- test.sort(undefined);
975
- });
976
- // V8 bug
977
- var FAILS_ON_NULL = fails(function () {
978
- test.sort(null);
979
- });
980
- // Old WebKit
981
- var SLOPPY_METHOD$1 = sloppyArrayMethod('sort');
982
-
983
- var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD$1;
984
-
985
- // `Array.prototype.sort` method
986
- // https://tc39.github.io/ecma262/#sec-array.prototype.sort
987
- _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
988
- sort: function sort(comparefn) {
989
- return comparefn === undefined
990
- ? nativeSort.call(toObject(this))
991
- : nativeSort.call(toObject(this), aFunction$1(comparefn));
992
- }
993
- });
994
-
995
- var max$2 = Math.max;
996
- var min$2 = Math.min;
997
- var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
998
- var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
999
-
1000
- // `Array.prototype.splice` method
1001
- // https://tc39.github.io/ecma262/#sec-array.prototype.splice
1002
- // with adding support of @@species
1003
- _export({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, {
1004
- splice: function splice(start, deleteCount /* , ...items */) {
1005
- var O = toObject(this);
1006
- var len = toLength(O.length);
1007
- var actualStart = toAbsoluteIndex(start, len);
1008
- var argumentsLength = arguments.length;
1009
- var insertCount, actualDeleteCount, A, k, from, to;
1010
- if (argumentsLength === 0) {
1011
- insertCount = actualDeleteCount = 0;
1012
- } else if (argumentsLength === 1) {
1013
- insertCount = 0;
1014
- actualDeleteCount = len - actualStart;
1015
- } else {
1016
- insertCount = argumentsLength - 2;
1017
- actualDeleteCount = min$2(max$2(toInteger(deleteCount), 0), len - actualStart);
1018
- }
1019
- if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
1020
- throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
1021
- }
1022
- A = arraySpeciesCreate(O, actualDeleteCount);
1023
- for (k = 0; k < actualDeleteCount; k++) {
1024
- from = actualStart + k;
1025
- if (from in O) createProperty(A, k, O[from]);
1026
- }
1027
- A.length = actualDeleteCount;
1028
- if (insertCount < actualDeleteCount) {
1029
- for (k = actualStart; k < len - actualDeleteCount; k++) {
1030
- from = k + actualDeleteCount;
1031
- to = k + insertCount;
1032
- if (from in O) O[to] = O[from];
1033
- else delete O[to];
1034
- }
1035
- for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
1036
- } else if (insertCount > actualDeleteCount) {
1037
- for (k = len - actualDeleteCount; k > actualStart; k--) {
1038
- from = k + actualDeleteCount - 1;
1039
- to = k + insertCount - 1;
1040
- if (from in O) O[to] = O[from];
1041
- else delete O[to];
1042
- }
1043
- }
1044
- for (k = 0; k < insertCount; k++) {
1045
- O[k + actualStart] = arguments[k + 2];
1046
- }
1047
- O.length = len - actualDeleteCount + insertCount;
1048
- return A;
1049
- }
1050
- });
1051
-
1052
- var nativeAssign = Object.assign;
1053
- var defineProperty = Object.defineProperty;
1054
-
1055
- // `Object.assign` method
1056
- // https://tc39.github.io/ecma262/#sec-object.assign
1057
- var objectAssign = !nativeAssign || fails(function () {
1058
- // should have correct order of operations (Edge bug)
1059
- if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
1060
- enumerable: true,
1061
- get: function () {
1062
- defineProperty(this, 'b', {
1063
- value: 3,
1064
- enumerable: false
1065
- });
1066
- }
1067
- }), { b: 2 })).b !== 1) return true;
1068
- // should work with symbols and should have deterministic property order (V8 bug)
1069
- var A = {};
1070
- var B = {};
1071
- // eslint-disable-next-line no-undef
1072
- var symbol = Symbol();
1073
- var alphabet = 'abcdefghijklmnopqrst';
1074
- A[symbol] = 7;
1075
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1076
- return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
1077
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
1078
- var T = toObject(target);
1079
- var argumentsLength = arguments.length;
1080
- var index = 1;
1081
- var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
1082
- var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1083
- while (argumentsLength > index) {
1084
- var S = indexedObject(arguments[index++]);
1085
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
1086
- var length = keys.length;
1087
- var j = 0;
1088
- var key;
1089
- while (length > j) {
1090
- key = keys[j++];
1091
- if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
1092
- }
1093
- } return T;
1094
- } : nativeAssign;
1095
-
1096
- // `Object.assign` method
1097
- // https://tc39.github.io/ecma262/#sec-object.assign
1098
- _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
1099
- assign: objectAssign
1100
- });
1101
-
1102
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1103
- var test$1 = {};
1104
-
1105
- test$1[TO_STRING_TAG] = 'z';
1106
-
1107
- var toStringTagSupport = String(test$1) === '[object z]';
1108
-
1109
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1110
- // ES3 wrong here
1111
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1112
-
1113
- // fallback for IE11 Script Access Denied error
1114
- var tryGet = function (it, key) {
1115
- try {
1116
- return it[key];
1117
- } catch (error) { /* empty */ }
1118
- };
1119
-
1120
- // getting tag from ES6+ `Object.prototype.toString`
1121
- var classof = toStringTagSupport ? classofRaw : function (it) {
1122
- var O, tag, result;
1123
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1124
- // @@toStringTag case
1125
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1126
- // builtinTag case
1127
- : CORRECT_ARGUMENTS ? classofRaw(O)
1128
- // ES3 arguments fallback
1129
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1130
- };
1131
-
1132
- // `Object.prototype.toString` method implementation
1133
- // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1134
- var objectToString = toStringTagSupport ? {}.toString : function toString() {
1135
- return '[object ' + classof(this) + ']';
1136
- };
1137
-
1138
- // `Object.prototype.toString` method
1139
- // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1140
- if (!toStringTagSupport) {
1141
- redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
1142
- }
1143
-
1144
- // a string of all valid unicode whitespaces
1145
- // eslint-disable-next-line max-len
1146
- var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1147
-
1148
- var whitespace = '[' + whitespaces + ']';
1149
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
1150
- var rtrim = RegExp(whitespace + whitespace + '*$');
1151
-
1152
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1153
- var createMethod$2 = function (TYPE) {
1154
- return function ($this) {
1155
- var string = String(requireObjectCoercible($this));
1156
- if (TYPE & 1) string = string.replace(ltrim, '');
1157
- if (TYPE & 2) string = string.replace(rtrim, '');
1158
- return string;
1159
- };
1160
- };
1161
-
1162
- var stringTrim = {
1163
- // `String.prototype.{ trimLeft, trimStart }` methods
1164
- // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
1165
- start: createMethod$2(1),
1166
- // `String.prototype.{ trimRight, trimEnd }` methods
1167
- // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
1168
- end: createMethod$2(2),
1169
- // `String.prototype.trim` method
1170
- // https://tc39.github.io/ecma262/#sec-string.prototype.trim
1171
- trim: createMethod$2(3)
1172
- };
1173
-
1174
- var trim = stringTrim.trim;
1175
-
1176
-
1177
- var nativeParseFloat = global_1.parseFloat;
1178
- var FORCED$2 = 1 / nativeParseFloat(whitespaces + '-0') !== -Infinity;
1179
-
1180
- // `parseFloat` method
1181
- // https://tc39.github.io/ecma262/#sec-parsefloat-string
1182
- var _parseFloat = FORCED$2 ? function parseFloat(string) {
1183
- var trimmedString = trim(String(string));
1184
- var result = nativeParseFloat(trimmedString);
1185
- return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
1186
- } : nativeParseFloat;
1187
-
1188
- // `parseFloat` method
1189
- // https://tc39.github.io/ecma262/#sec-parsefloat-string
1190
- _export({ global: true, forced: parseFloat != _parseFloat }, {
1191
- parseFloat: _parseFloat
1192
- });
1193
-
1194
- // `RegExp.prototype.flags` getter implementation
1195
- // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
1196
- var regexpFlags = function () {
1197
- var that = anObject(this);
1198
- var result = '';
1199
- if (that.global) result += 'g';
1200
- if (that.ignoreCase) result += 'i';
1201
- if (that.multiline) result += 'm';
1202
- if (that.dotAll) result += 's';
1203
- if (that.unicode) result += 'u';
1204
- if (that.sticky) result += 'y';
1205
- return result;
1206
- };
1207
-
1208
- var TO_STRING = 'toString';
1209
- var RegExpPrototype = RegExp.prototype;
1210
- var nativeToString = RegExpPrototype[TO_STRING];
1211
-
1212
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1213
- // FF44- RegExp#toString has a wrong name
1214
- var INCORRECT_NAME = nativeToString.name != TO_STRING;
1215
-
1216
- // `RegExp.prototype.toString` method
1217
- // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
1218
- if (NOT_GENERIC || INCORRECT_NAME) {
1219
- redefine(RegExp.prototype, TO_STRING, function toString() {
1220
- var R = anObject(this);
1221
- var p = String(R.source);
1222
- var rf = R.flags;
1223
- var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
1224
- return '/' + p + '/' + f;
1225
- }, { unsafe: true });
1226
- }
1227
-
1228
- function _typeof(obj) {
1229
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1230
- _typeof = function (obj) {
1231
- return typeof obj;
1232
- };
1233
- } else {
1234
- _typeof = function (obj) {
1235
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1236
- };
1237
- }
1238
-
1239
- return _typeof(obj);
1240
- }
1241
-
1242
- /**
1243
- * @author Nadim Basalamah <dimbslmh@gmail.com>
1244
- * @version: v1.1.0
1245
- * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js
1246
- * Modification: ErwannNevou <https://github.com/ErwannNevou>
1247
- */
1248
-
1249
- var isSingleSort = false;
1250
- var Utils = $.fn.bootstrapTable.utils;
1251
- $.extend($.fn.bootstrapTable.defaults.icons, {
1252
- plus: {
1253
- bootstrap3: 'glyphicon-plus',
1254
- bootstrap4: 'fa-plus',
1255
- bootstrap5: 'fa-plus',
1256
- semantic: 'fa-plus',
1257
- materialize: 'plus',
1258
- foundation: 'fa-plus',
1259
- bulma: 'fa-plus',
1260
- 'bootstrap-table': 'icon-plus'
1261
- }[$.fn.bootstrapTable.theme] || 'fa-clock',
1262
- minus: {
1263
- bootstrap3: 'glyphicon-minus',
1264
- bootstrap4: 'fa-minus',
1265
- bootstrap5: 'fa-minus',
1266
- semantic: 'fa-minus',
1267
- materialize: 'minus',
1268
- foundation: 'fa-minus',
1269
- bulma: 'fa-minus',
1270
- 'bootstrap-table': 'icon-minus'
1271
- }[$.fn.bootstrapTable.theme] || 'fa-clock',
1272
- sort: {
1273
- bootstrap3: 'glyphicon-sort',
1274
- bootstrap4: 'fa-sort',
1275
- bootstrap5: 'fa-sort',
1276
- semantic: 'fa-sort',
1277
- materialize: 'sort',
1278
- foundation: 'fa-sort',
1279
- bulma: 'fa-sort',
1280
- 'bootstrap-table': 'icon-sort-amount-asc'
1281
- }[$.fn.bootstrapTable.theme] || 'fa-clock'
1282
- });
1283
- var theme = {
1284
- bootstrap3: {
1285
- html: {
1286
- multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1287
- multipleSortButton: '<button class="multi-sort btn btn-default" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1288
- multipleSortSelect: '<select class="%s %s form-control">'
1289
- }
1290
- },
1291
- bootstrap4: {
1292
- html: {
1293
- multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1294
- multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1295
- multipleSortSelect: '<select class="%s %s form-control">'
1296
- }
1297
- },
1298
- bootstrap5: {
1299
- html: {
1300
- multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1301
- multipleSortButton: '<button class="multi-sort btn btn-secondary" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1302
- multipleSortSelect: '<select class="%s %s form-control">'
1303
- }
1304
- },
1305
- semantic: {
1306
- html: {
1307
- multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
1308
- multipleSortButton: '<button class="multi-sort ui button" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1309
- multipleSortSelect: '<select class="%s %s">'
1310
- }
1311
- },
1312
- materialize: {
1313
- html: {
1314
- multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
1315
- multipleSortButton: '<a href="#%s" class="multi-sort waves-effect waves-light btn modal-trigger" type="button" data-toggle="modal" title="%s">%s</a>',
1316
- multipleSortSelect: '<select class="%s %s browser-default">'
1317
- }
1318
- },
1319
- foundation: {
1320
- html: {
1321
- multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
1322
- multipleSortButton: '<button class="button multi-sort" data-open="%s" title="%s">%s</button>',
1323
- multipleSortSelect: '<select class="%s %s browser-default">'
1324
- }
1325
- },
1326
- bulma: {
1327
- html: {
1328
- multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
1329
- multipleSortButton: '<button class="button multi-sort" data-target="%s" title="%s">%s</button>',
1330
- multipleSortSelect: '<select class="%s %s browser-default">'
1331
- }
1332
- },
1333
- 'bootstrap-table': {
1334
- html: {
1335
- multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1336
- multipleSortButton: '<button class="btn multi-sort" data-target="%s" title="%s">%s</button>',
1337
- multipleSortSelect: '<select class="%s %s browser-default">'
1338
- }
1339
- }
1340
- }[$.fn.bootstrapTable.theme];
1341
-
1342
- var showSortModal = function showSortModal(that) {
1343
- var _selector = that.sortModalSelector;
1344
-
1345
- var _id = "#".concat(_selector);
1346
-
1347
- var o = that.options;
1348
-
1349
- if (!$(_id).hasClass('modal')) {
1350
- var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
1351
- $('body').append($(sModal));
1352
- that.$sortModal = $(_id);
1353
- var $rows = that.$sortModal.find('tbody > tr');
1354
- that.$sortModal.off('click', '#add').on('click', '#add', function () {
1355
- var total = that.$sortModal.find('.multi-sort-name:first option').length;
1356
- var current = that.$sortModal.find('tbody tr').length;
1357
-
1358
- if (current < total) {
1359
- current++;
1360
- that.addLevel();
1361
- that.setButtonStates();
1362
- }
1363
- });
1364
- that.$sortModal.off('click', '#delete').on('click', '#delete', function () {
1365
- var total = that.$sortModal.find('.multi-sort-name:first option').length;
1366
- var current = that.$sortModal.find('tbody tr').length;
1367
-
1368
- if (current > 1 && current <= total) {
1369
- current--;
1370
- that.$sortModal.find('tbody tr:last').remove();
1371
- that.setButtonStates();
1372
- }
1373
- });
1374
- that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
1375
- var $rows = that.$sortModal.find('tbody > tr');
1376
- var $alert = that.$sortModal.find('div.alert');
1377
- var fields = [];
1378
- var results = [];
1379
- var sortPriority = $.map($rows, function (row) {
1380
- var $row = $(row);
1381
- var name = $row.find('.multi-sort-name').val();
1382
- var order = $row.find('.multi-sort-order').val();
1383
- fields.push(name);
1384
- return {
1385
- sortName: name,
1386
- sortOrder: order
1387
- };
1388
- });
1389
- var sorted_fields = fields.sort();
1390
-
1391
- for (var i = 0; i < fields.length - 1; i++) {
1392
- if (sorted_fields[i + 1] === sorted_fields[i]) {
1393
- results.push(sorted_fields[i]);
1394
- }
1395
- }
1396
-
1397
- if (results.length > 0) {
1398
- if ($alert.length === 0) {
1399
- $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
1400
- $($alert).insertBefore(that.$sortModal.find('.bars'));
1401
- }
1402
- } else {
1403
- if ($alert.length === 1) {
1404
- $($alert).remove();
1405
- }
1406
-
1407
- if ($.inArray($.fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
1408
- that.$sortModal.modal('hide');
1409
- }
1410
-
1411
- that.multiSort(sortPriority);
1412
- }
1413
- });
1414
-
1415
- if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
1416
- if (that.options.sortName) {
1417
- that.options.sortPriority = [{
1418
- sortName: that.options.sortName,
1419
- sortOrder: that.options.sortOrder
1420
- }];
1421
- }
1422
- }
1423
-
1424
- if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
1425
- if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
1426
- for (var i = 0; i < that.options.sortPriority.length; i++) {
1427
- that.addLevel(i, that.options.sortPriority[i]);
1428
- }
1429
- }
1430
- } else {
1431
- that.addLevel(0);
1432
- }
1433
-
1434
- that.setButtonStates();
1435
- }
1436
- };
1437
-
1438
- $.fn.bootstrapTable.methods.push('multipleSort');
1439
- $.fn.bootstrapTable.methods.push('multiSort');
1440
- $.extend($.fn.bootstrapTable.defaults, {
1441
- showMultiSort: false,
1442
- showMultiSortButton: true,
1443
- multiSortStrictSort: false,
1444
- sortPriority: null,
1445
- onMultipleSort: function onMultipleSort() {
1446
- return false;
1447
- }
1448
- });
1449
- $.extend($.fn.bootstrapTable.Constructor.EVENTS, {
1450
- 'multiple-sort.bs.table': 'onMultipleSort'
1451
- });
1452
- $.extend($.fn.bootstrapTable.locales, {
1453
- formatMultipleSort: function formatMultipleSort() {
1454
- return 'Multiple Sort';
1455
- },
1456
- formatAddLevel: function formatAddLevel() {
1457
- return 'Add Level';
1458
- },
1459
- formatDeleteLevel: function formatDeleteLevel() {
1460
- return 'Delete Level';
1461
- },
1462
- formatColumn: function formatColumn() {
1463
- return 'Column';
1464
- },
1465
- formatOrder: function formatOrder() {
1466
- return 'Order';
1467
- },
1468
- formatSortBy: function formatSortBy() {
1469
- return 'Sort by';
1470
- },
1471
- formatThenBy: function formatThenBy() {
1472
- return 'Then by';
1473
- },
1474
- formatSort: function formatSort() {
1475
- return 'Sort';
1476
- },
1477
- formatCancel: function formatCancel() {
1478
- return 'Cancel';
1479
- },
1480
- formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
1481
- return 'Duplicate(s) detected!';
1482
- },
1483
- formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
1484
- return 'Please remove or change any duplicate column.';
1485
- },
1486
- formatSortOrders: function formatSortOrders() {
1487
- return {
1488
- asc: 'Ascending',
1489
- desc: 'Descending'
1490
- };
1491
- }
1492
- });
1493
- $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
1494
- var BootstrapTable = $.fn.bootstrapTable.Constructor;
1495
- var _initToolbar = BootstrapTable.prototype.initToolbar;
1496
- var _destroy = BootstrapTable.prototype.destroy;
1497
-
1498
- BootstrapTable.prototype.initToolbar = function () {
1499
- var _this = this;
1500
-
1501
- this.showToolbar = this.showToolbar || this.options.showMultiSort;
1502
- var that = this;
1503
- var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
1504
- var sortModalId = "#".concat(sortModalSelector);
1505
- var $multiSortBtn = this.$toolbar.find('div.multi-sort');
1506
- var o = this.options;
1507
- this.$sortModal = $(sortModalId);
1508
- this.sortModalSelector = sortModalSelector;
1509
-
1510
- if (that.options.sortPriority !== null) {
1511
- that.onMultipleSort();
1512
- }
1513
-
1514
- if (this.options.showMultiSortButton) {
1515
- this.buttons = Object.assign(this.buttons, {
1516
- multipleSort: {
1517
- html: Utils.sprintf(theme.html.multipleSortButton, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
1518
- }
1519
- });
1520
- }
1521
-
1522
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1523
- args[_key] = arguments[_key];
1524
- }
1525
-
1526
- _initToolbar.apply(this, Array.prototype.slice.apply(args));
1527
-
1528
- if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
1529
- var t = that.options.queryParams;
1530
-
1531
- that.options.queryParams = function (params) {
1532
- params.multiSort = that.options.sortPriority;
1533
- return t(params);
1534
- };
1535
- }
1536
-
1537
- if (this.options.showMultiSort) {
1538
- if (!$multiSortBtn.length && this.options.showMultiSortButton) {
1539
- if ($.fn.bootstrapTable.theme === 'semantic') {
1540
- this.$toolbar.find('.multi-sort').on('click', function () {
1541
- $(sortModalId).modal('show');
1542
- });
1543
- } else if ($.fn.bootstrapTable.theme === 'materialize') {
1544
- this.$toolbar.find('.multi-sort').on('click', function () {
1545
- $(sortModalId).modal();
1546
- });
1547
- } else if ($.fn.bootstrapTable.theme === 'bootstrap-table') {
1548
- this.$toolbar.find('.multi-sort').on('click', function () {
1549
- $(sortModalId).addClass('show');
1550
- });
1551
- } else if ($.fn.bootstrapTable.theme === 'foundation') {
1552
- this.$toolbar.find('.multi-sort').on('click', function () {
1553
- if (!_this.foundationModal) {
1554
- // eslint-disable-next-line no-undef
1555
- _this.foundationModal = new Foundation.Reveal($(sortModalId));
1556
- }
1557
-
1558
- _this.foundationModal.open();
1559
- });
1560
- } else if ($.fn.bootstrapTable.theme === 'bulma') {
1561
- this.$toolbar.find('.multi-sort').on('click', function () {
1562
- $('html').toggleClass('is-clipped');
1563
- $(sortModalId).toggleClass('is-active');
1564
- $('button[data-close]').one('click', function () {
1565
- $('html').toggleClass('is-clipped');
1566
- $(sortModalId).toggleClass('is-active');
1567
- });
1568
- });
1569
- }
1570
-
1571
- showSortModal(that);
1572
- }
1573
-
1574
- this.$el.on('sort.bs.table', function () {
1575
- isSingleSort = true;
1576
- });
1577
- this.$el.on('multiple-sort.bs.table', function () {
1578
- isSingleSort = false;
1579
- });
1580
- this.$el.on('load-success.bs.table', function () {
1581
- if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
1582
- that.onMultipleSort();
1583
- }
1584
- });
1585
- this.$el.on('column-switch.bs.table', function (field, checked) {
1586
- for (var i = 0; i < that.options.sortPriority.length; i++) {
1587
- if (that.options.sortPriority[i].sortName === checked) {
1588
- that.options.sortPriority.splice(i, 1);
1589
- }
1590
- }
1591
-
1592
- that.assignSortableArrows();
1593
- that.$sortModal.remove();
1594
- showSortModal(that);
1595
- });
1596
- this.$el.on('reset-view.bs.table', function () {
1597
- if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
1598
- that.assignSortableArrows();
1599
- }
1600
- });
1601
- }
1602
- };
1603
-
1604
- BootstrapTable.prototype.destroy = function () {
1605
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1606
- args[_key2] = arguments[_key2];
1607
- }
1608
-
1609
- _destroy.apply(this, Array.prototype.slice.apply(args));
1610
-
1611
- if (this.options.showMultiSort) {
1612
- this.$sortModal.remove();
1613
- }
1614
- };
1615
-
1616
- BootstrapTable.prototype.multipleSort = function () {
1617
- var that = this;
1618
-
1619
- if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
1620
- that.onMultipleSort();
1621
- }
1622
- };
1623
-
1624
- BootstrapTable.prototype.onMultipleSort = function () {
1625
- var that = this;
1626
-
1627
- var cmp = function cmp(x, y) {
1628
- return x > y ? 1 : x < y ? -1 : 0;
1629
- };
1630
-
1631
- var arrayCmp = function arrayCmp(a, b) {
1632
- var arr1 = [];
1633
- var arr2 = [];
1634
-
1635
- for (var i = 0; i < that.options.sortPriority.length; i++) {
1636
- var fieldName = that.options.sortPriority[i].sortName;
1637
- var fieldIndex = that.header.fields.indexOf(fieldName);
1638
- var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
1639
-
1640
- if (that.header.sortNames[fieldIndex]) {
1641
- fieldName = that.header.sortNames[fieldIndex];
1642
- }
1643
-
1644
- var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
1645
- var aa = Utils.getItemField(a, fieldName);
1646
- var bb = Utils.getItemField(b, fieldName);
1647
- var value1 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
1648
- var value2 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
1649
-
1650
- if (value1 !== undefined && value2 !== undefined) {
1651
- arr1.push(order * value1);
1652
- arr2.push(order * value2);
1653
- continue;
1654
- }
1655
-
1656
- if (aa === undefined || aa === null) aa = '';
1657
- if (bb === undefined || bb === null) bb = '';
1658
-
1659
- if ($.isNumeric(aa) && $.isNumeric(bb)) {
1660
- aa = parseFloat(aa);
1661
- bb = parseFloat(bb);
1662
- } else {
1663
- aa = aa.toString();
1664
- bb = bb.toString();
1665
-
1666
- if (that.options.multiSortStrictSort) {
1667
- aa = aa.toLowerCase();
1668
- bb = bb.toLowerCase();
1669
- }
1670
- }
1671
-
1672
- arr1.push(order * cmp(aa, bb));
1673
- arr2.push(order * cmp(bb, aa));
1674
- }
1675
-
1676
- return cmp(arr1, arr2);
1677
- };
1678
-
1679
- this.data.sort(function (a, b) {
1680
- return arrayCmp(a, b);
1681
- });
1682
- this.initBody();
1683
- this.assignSortableArrows();
1684
- this.trigger('multiple-sort');
1685
- };
1686
-
1687
- BootstrapTable.prototype.addLevel = function (index, sortPriority) {
1688
- var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
1689
- this.$sortModal.find('tbody').append($('<tr>').append($('<td>').text(text)).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
1690
- var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
1691
- var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
1692
- $.each(this.columns, function (i, column) {
1693
- if (column.sortable === false || column.visible === false) {
1694
- return true;
1695
- }
1696
-
1697
- $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
1698
- });
1699
- $.each(this.options.formatSortOrders(), function (value, order) {
1700
- $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
1701
- });
1702
-
1703
- if (sortPriority !== undefined) {
1704
- $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
1705
- $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
1706
- }
1707
- };
1708
-
1709
- BootstrapTable.prototype.assignSortableArrows = function () {
1710
- var that = this;
1711
- var headers = that.$header.find('th');
1712
-
1713
- for (var i = 0; i < headers.length; i++) {
1714
- for (var c = 0; c < that.options.sortPriority.length; c++) {
1715
- if ($(headers[i]).data('field') === that.options.sortPriority[c].sortName) {
1716
- $(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
1717
- }
1718
- }
1719
- }
1720
- };
1721
-
1722
- BootstrapTable.prototype.setButtonStates = function () {
1723
- var total = this.$sortModal.find('.multi-sort-name:first option').length;
1724
- var current = this.$sortModal.find('tbody tr').length;
1725
-
1726
- if (current === total) {
1727
- this.$sortModal.find('#add').attr('disabled', 'disabled');
1728
- }
1729
-
1730
- if (current > 1) {
1731
- this.$sortModal.find('#delete').removeAttr('disabled');
1732
- }
1733
-
1734
- if (current < total) {
1735
- this.$sortModal.find('#add').removeAttr('disabled');
1736
- }
1737
-
1738
- if (current === 1) {
1739
- this.$sortModal.find('#delete').attr('disabled', 'disabled');
1740
- }
1741
- };
1742
-
1743
- BootstrapTable.prototype.multiSort = function (sortPriority) {
1744
- var _this2 = this;
1745
-
1746
- this.options.sortPriority = sortPriority;
1747
- this.options.sortName = undefined;
1748
-
1749
- if (this.options.sidePagination === 'server') {
1750
- var queryParams = this.options.queryParams;
1751
-
1752
- this.options.queryParams = function (params) {
1753
- params.multiSort = _this2.options.sortPriority;
1754
- return $.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
1755
- };
1756
-
1757
- isSingleSort = false;
1758
- this.initServer(this.options.silentSort);
1759
- return;
1760
- }
1761
-
1762
- this.onMultipleSort();
1763
- };
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var $__default = /*#__PURE__*/_interopDefaultLegacy($);
10
+
11
+ function _typeof(obj) {
12
+ "@babel/helpers - typeof";
13
+
14
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
15
+ _typeof = function (obj) {
16
+ return typeof obj;
17
+ };
18
+ } else {
19
+ _typeof = function (obj) {
20
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
21
+ };
22
+ }
23
+
24
+ return _typeof(obj);
25
+ }
26
+
27
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
28
+
29
+ function createCommonjsModule(fn, module) {
30
+ return module = { exports: {} }, fn(module, module.exports), module.exports;
31
+ }
32
+
33
+ var check = function (it) {
34
+ return it && it.Math == Math && it;
35
+ };
36
+
37
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
38
+ var global_1 =
39
+ // eslint-disable-next-line es/no-global-this -- safe
40
+ check(typeof globalThis == 'object' && globalThis) ||
41
+ check(typeof window == 'object' && window) ||
42
+ // eslint-disable-next-line no-restricted-globals -- safe
43
+ check(typeof self == 'object' && self) ||
44
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
45
+ // eslint-disable-next-line no-new-func -- fallback
46
+ (function () { return this; })() || Function('return this')();
47
+
48
+ var fails = function (exec) {
49
+ try {
50
+ return !!exec();
51
+ } catch (error) {
52
+ return true;
53
+ }
54
+ };
55
+
56
+ // Detect IE8's incomplete defineProperty implementation
57
+ var descriptors = !fails(function () {
58
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
59
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
60
+ });
61
+
62
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
63
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
64
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
65
+
66
+ // Nashorn ~ JDK8 bug
67
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
68
+
69
+ // `Object.prototype.propertyIsEnumerable` method implementation
70
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
71
+ var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
72
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
73
+ return !!descriptor && descriptor.enumerable;
74
+ } : $propertyIsEnumerable;
75
+
76
+ var objectPropertyIsEnumerable = {
77
+ f: f$4
78
+ };
79
+
80
+ var createPropertyDescriptor = function (bitmap, value) {
81
+ return {
82
+ enumerable: !(bitmap & 1),
83
+ configurable: !(bitmap & 2),
84
+ writable: !(bitmap & 4),
85
+ value: value
86
+ };
87
+ };
88
+
89
+ var toString = {}.toString;
90
+
91
+ var classofRaw = function (it) {
92
+ return toString.call(it).slice(8, -1);
93
+ };
94
+
95
+ var split = ''.split;
96
+
97
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
98
+ var indexedObject = fails(function () {
99
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
100
+ // eslint-disable-next-line no-prototype-builtins -- safe
101
+ return !Object('z').propertyIsEnumerable(0);
102
+ }) ? function (it) {
103
+ return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
104
+ } : Object;
105
+
106
+ // `RequireObjectCoercible` abstract operation
107
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
108
+ var requireObjectCoercible = function (it) {
109
+ if (it == undefined) throw TypeError("Can't call method on " + it);
110
+ return it;
111
+ };
112
+
113
+ // toObject with fallback for non-array-like ES3 strings
114
+
115
+
116
+
117
+ var toIndexedObject = function (it) {
118
+ return indexedObject(requireObjectCoercible(it));
119
+ };
120
+
121
+ var isObject = function (it) {
122
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
123
+ };
124
+
125
+ // `ToPrimitive` abstract operation
126
+ // https://tc39.es/ecma262/#sec-toprimitive
127
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
128
+ // and the second argument - flag - preferred type is a string
129
+ var toPrimitive = function (input, PREFERRED_STRING) {
130
+ if (!isObject(input)) return input;
131
+ var fn, val;
132
+ if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
133
+ if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
134
+ if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
135
+ throw TypeError("Can't convert object to primitive value");
136
+ };
137
+
138
+ var hasOwnProperty = {}.hasOwnProperty;
139
+
140
+ var has$1 = function (it, key) {
141
+ return hasOwnProperty.call(it, key);
142
+ };
143
+
144
+ var document$1 = global_1.document;
145
+ // typeof document.createElement is 'object' in old IE
146
+ var EXISTS = isObject(document$1) && isObject(document$1.createElement);
147
+
148
+ var documentCreateElement = function (it) {
149
+ return EXISTS ? document$1.createElement(it) : {};
150
+ };
151
+
152
+ // Thank's IE8 for his funny defineProperty
153
+ var ie8DomDefine = !descriptors && !fails(function () {
154
+ // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
155
+ return Object.defineProperty(documentCreateElement('div'), 'a', {
156
+ get: function () { return 7; }
157
+ }).a != 7;
158
+ });
159
+
160
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
161
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
162
+
163
+ // `Object.getOwnPropertyDescriptor` method
164
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
165
+ var f$3 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
166
+ O = toIndexedObject(O);
167
+ P = toPrimitive(P, true);
168
+ if (ie8DomDefine) try {
169
+ return $getOwnPropertyDescriptor(O, P);
170
+ } catch (error) { /* empty */ }
171
+ if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
172
+ };
173
+
174
+ var objectGetOwnPropertyDescriptor = {
175
+ f: f$3
176
+ };
177
+
178
+ var anObject = function (it) {
179
+ if (!isObject(it)) {
180
+ throw TypeError(String(it) + ' is not an object');
181
+ } return it;
182
+ };
183
+
184
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
185
+ var $defineProperty = Object.defineProperty;
186
+
187
+ // `Object.defineProperty` method
188
+ // https://tc39.es/ecma262/#sec-object.defineproperty
189
+ var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
190
+ anObject(O);
191
+ P = toPrimitive(P, true);
192
+ anObject(Attributes);
193
+ if (ie8DomDefine) try {
194
+ return $defineProperty(O, P, Attributes);
195
+ } catch (error) { /* empty */ }
196
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
197
+ if ('value' in Attributes) O[P] = Attributes.value;
198
+ return O;
199
+ };
200
+
201
+ var objectDefineProperty = {
202
+ f: f$2
203
+ };
204
+
205
+ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
206
+ return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
207
+ } : function (object, key, value) {
208
+ object[key] = value;
209
+ return object;
210
+ };
211
+
212
+ var setGlobal = function (key, value) {
213
+ try {
214
+ createNonEnumerableProperty(global_1, key, value);
215
+ } catch (error) {
216
+ global_1[key] = value;
217
+ } return value;
218
+ };
219
+
220
+ var SHARED = '__core-js_shared__';
221
+ var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
222
+
223
+ var sharedStore = store$1;
224
+
225
+ var functionToString = Function.toString;
226
+
227
+ // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
228
+ if (typeof sharedStore.inspectSource != 'function') {
229
+ sharedStore.inspectSource = function (it) {
230
+ return functionToString.call(it);
231
+ };
232
+ }
233
+
234
+ var inspectSource = sharedStore.inspectSource;
235
+
236
+ var WeakMap$1 = global_1.WeakMap;
237
+
238
+ var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
239
+
240
+ var shared = createCommonjsModule(function (module) {
241
+ (module.exports = function (key, value) {
242
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
243
+ })('versions', []).push({
244
+ version: '3.10.1',
245
+ mode: 'global',
246
+ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
247
+ });
248
+ });
249
+
250
+ var id = 0;
251
+ var postfix = Math.random();
252
+
253
+ var uid = function (key) {
254
+ return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
255
+ };
256
+
257
+ var keys = shared('keys');
258
+
259
+ var sharedKey = function (key) {
260
+ return keys[key] || (keys[key] = uid(key));
261
+ };
262
+
263
+ var hiddenKeys$1 = {};
264
+
265
+ var WeakMap = global_1.WeakMap;
266
+ var set, get, has;
267
+
268
+ var enforce = function (it) {
269
+ return has(it) ? get(it) : set(it, {});
270
+ };
271
+
272
+ var getterFor = function (TYPE) {
273
+ return function (it) {
274
+ var state;
275
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
276
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
277
+ } return state;
278
+ };
279
+ };
280
+
281
+ if (nativeWeakMap) {
282
+ var store = sharedStore.state || (sharedStore.state = new WeakMap());
283
+ var wmget = store.get;
284
+ var wmhas = store.has;
285
+ var wmset = store.set;
286
+ set = function (it, metadata) {
287
+ metadata.facade = it;
288
+ wmset.call(store, it, metadata);
289
+ return metadata;
290
+ };
291
+ get = function (it) {
292
+ return wmget.call(store, it) || {};
293
+ };
294
+ has = function (it) {
295
+ return wmhas.call(store, it);
296
+ };
297
+ } else {
298
+ var STATE = sharedKey('state');
299
+ hiddenKeys$1[STATE] = true;
300
+ set = function (it, metadata) {
301
+ metadata.facade = it;
302
+ createNonEnumerableProperty(it, STATE, metadata);
303
+ return metadata;
304
+ };
305
+ get = function (it) {
306
+ return has$1(it, STATE) ? it[STATE] : {};
307
+ };
308
+ has = function (it) {
309
+ return has$1(it, STATE);
310
+ };
311
+ }
312
+
313
+ var internalState = {
314
+ set: set,
315
+ get: get,
316
+ has: has,
317
+ enforce: enforce,
318
+ getterFor: getterFor
319
+ };
320
+
321
+ var redefine = createCommonjsModule(function (module) {
322
+ var getInternalState = internalState.get;
323
+ var enforceInternalState = internalState.enforce;
324
+ var TEMPLATE = String(String).split('String');
325
+
326
+ (module.exports = function (O, key, value, options) {
327
+ var unsafe = options ? !!options.unsafe : false;
328
+ var simple = options ? !!options.enumerable : false;
329
+ var noTargetGet = options ? !!options.noTargetGet : false;
330
+ var state;
331
+ if (typeof value == 'function') {
332
+ if (typeof key == 'string' && !has$1(value, 'name')) {
333
+ createNonEnumerableProperty(value, 'name', key);
334
+ }
335
+ state = enforceInternalState(value);
336
+ if (!state.source) {
337
+ state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
338
+ }
339
+ }
340
+ if (O === global_1) {
341
+ if (simple) O[key] = value;
342
+ else setGlobal(key, value);
343
+ return;
344
+ } else if (!unsafe) {
345
+ delete O[key];
346
+ } else if (!noTargetGet && O[key]) {
347
+ simple = true;
348
+ }
349
+ if (simple) O[key] = value;
350
+ else createNonEnumerableProperty(O, key, value);
351
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
352
+ })(Function.prototype, 'toString', function toString() {
353
+ return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
354
+ });
355
+ });
356
+
357
+ var path = global_1;
358
+
359
+ var aFunction$1 = function (variable) {
360
+ return typeof variable == 'function' ? variable : undefined;
361
+ };
362
+
363
+ var getBuiltIn = function (namespace, method) {
364
+ return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
365
+ : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
366
+ };
367
+
368
+ var ceil = Math.ceil;
369
+ var floor = Math.floor;
370
+
371
+ // `ToInteger` abstract operation
372
+ // https://tc39.es/ecma262/#sec-tointeger
373
+ var toInteger = function (argument) {
374
+ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
375
+ };
376
+
377
+ var min$2 = Math.min;
378
+
379
+ // `ToLength` abstract operation
380
+ // https://tc39.es/ecma262/#sec-tolength
381
+ var toLength = function (argument) {
382
+ return argument > 0 ? min$2(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
383
+ };
384
+
385
+ var max$2 = Math.max;
386
+ var min$1 = Math.min;
387
+
388
+ // Helper for a popular repeating case of the spec:
389
+ // Let integer be ? ToInteger(index).
390
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
391
+ var toAbsoluteIndex = function (index, length) {
392
+ var integer = toInteger(index);
393
+ return integer < 0 ? max$2(integer + length, 0) : min$1(integer, length);
394
+ };
395
+
396
+ // `Array.prototype.{ indexOf, includes }` methods implementation
397
+ var createMethod$2 = function (IS_INCLUDES) {
398
+ return function ($this, el, fromIndex) {
399
+ var O = toIndexedObject($this);
400
+ var length = toLength(O.length);
401
+ var index = toAbsoluteIndex(fromIndex, length);
402
+ var value;
403
+ // Array#includes uses SameValueZero equality algorithm
404
+ // eslint-disable-next-line no-self-compare -- NaN check
405
+ if (IS_INCLUDES && el != el) while (length > index) {
406
+ value = O[index++];
407
+ // eslint-disable-next-line no-self-compare -- NaN check
408
+ if (value != value) return true;
409
+ // Array#indexOf ignores holes, Array#includes - not
410
+ } else for (;length > index; index++) {
411
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
412
+ } return !IS_INCLUDES && -1;
413
+ };
414
+ };
415
+
416
+ var arrayIncludes = {
417
+ // `Array.prototype.includes` method
418
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
419
+ includes: createMethod$2(true),
420
+ // `Array.prototype.indexOf` method
421
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
422
+ indexOf: createMethod$2(false)
423
+ };
424
+
425
+ var indexOf = arrayIncludes.indexOf;
426
+
427
+
428
+ var objectKeysInternal = function (object, names) {
429
+ var O = toIndexedObject(object);
430
+ var i = 0;
431
+ var result = [];
432
+ var key;
433
+ for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
434
+ // Don't enum bug & hidden keys
435
+ while (names.length > i) if (has$1(O, key = names[i++])) {
436
+ ~indexOf(result, key) || result.push(key);
437
+ }
438
+ return result;
439
+ };
440
+
441
+ // IE8- don't enum bug keys
442
+ var enumBugKeys = [
443
+ 'constructor',
444
+ 'hasOwnProperty',
445
+ 'isPrototypeOf',
446
+ 'propertyIsEnumerable',
447
+ 'toLocaleString',
448
+ 'toString',
449
+ 'valueOf'
450
+ ];
451
+
452
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
453
+
454
+ // `Object.getOwnPropertyNames` method
455
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
456
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
457
+ var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
458
+ return objectKeysInternal(O, hiddenKeys);
459
+ };
460
+
461
+ var objectGetOwnPropertyNames = {
462
+ f: f$1
463
+ };
464
+
465
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
466
+ var f = Object.getOwnPropertySymbols;
467
+
468
+ var objectGetOwnPropertySymbols = {
469
+ f: f
470
+ };
471
+
472
+ // all object keys, includes non-enumerable and symbols
473
+ var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
474
+ var keys = objectGetOwnPropertyNames.f(anObject(it));
475
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
476
+ return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
477
+ };
478
+
479
+ var copyConstructorProperties = function (target, source) {
480
+ var keys = ownKeys(source);
481
+ var defineProperty = objectDefineProperty.f;
482
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
483
+ for (var i = 0; i < keys.length; i++) {
484
+ var key = keys[i];
485
+ if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
486
+ }
487
+ };
488
+
489
+ var replacement = /#|\.prototype\./;
490
+
491
+ var isForced = function (feature, detection) {
492
+ var value = data[normalize(feature)];
493
+ return value == POLYFILL ? true
494
+ : value == NATIVE ? false
495
+ : typeof detection == 'function' ? fails(detection)
496
+ : !!detection;
497
+ };
498
+
499
+ var normalize = isForced.normalize = function (string) {
500
+ return String(string).replace(replacement, '.').toLowerCase();
501
+ };
502
+
503
+ var data = isForced.data = {};
504
+ var NATIVE = isForced.NATIVE = 'N';
505
+ var POLYFILL = isForced.POLYFILL = 'P';
506
+
507
+ var isForced_1 = isForced;
508
+
509
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
510
+
511
+
512
+
513
+
514
+
515
+
516
+ /*
517
+ options.target - name of the target object
518
+ options.global - target is the global object
519
+ options.stat - export as static methods of target
520
+ options.proto - export as prototype methods of target
521
+ options.real - real prototype method for the `pure` version
522
+ options.forced - export even if the native feature is available
523
+ options.bind - bind methods to the target, required for the `pure` version
524
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
525
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
526
+ options.sham - add a flag to not completely full polyfills
527
+ options.enumerable - export as enumerable property
528
+ options.noTargetGet - prevent calling a getter on target
529
+ */
530
+ var _export = function (options, source) {
531
+ var TARGET = options.target;
532
+ var GLOBAL = options.global;
533
+ var STATIC = options.stat;
534
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
535
+ if (GLOBAL) {
536
+ target = global_1;
537
+ } else if (STATIC) {
538
+ target = global_1[TARGET] || setGlobal(TARGET, {});
539
+ } else {
540
+ target = (global_1[TARGET] || {}).prototype;
541
+ }
542
+ if (target) for (key in source) {
543
+ sourceProperty = source[key];
544
+ if (options.noTargetGet) {
545
+ descriptor = getOwnPropertyDescriptor(target, key);
546
+ targetProperty = descriptor && descriptor.value;
547
+ } else targetProperty = target[key];
548
+ FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
549
+ // contained in target
550
+ if (!FORCED && targetProperty !== undefined) {
551
+ if (typeof sourceProperty === typeof targetProperty) continue;
552
+ copyConstructorProperties(sourceProperty, targetProperty);
553
+ }
554
+ // add a flag to not completely full polyfills
555
+ if (options.sham || (targetProperty && targetProperty.sham)) {
556
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
557
+ }
558
+ // extend global
559
+ redefine(target, key, sourceProperty, options);
560
+ }
561
+ };
562
+
563
+ var aFunction = function (it) {
564
+ if (typeof it != 'function') {
565
+ throw TypeError(String(it) + ' is not a function');
566
+ } return it;
567
+ };
568
+
569
+ // optional / simple context binding
570
+ var functionBindContext = function (fn, that, length) {
571
+ aFunction(fn);
572
+ if (that === undefined) return fn;
573
+ switch (length) {
574
+ case 0: return function () {
575
+ return fn.call(that);
576
+ };
577
+ case 1: return function (a) {
578
+ return fn.call(that, a);
579
+ };
580
+ case 2: return function (a, b) {
581
+ return fn.call(that, a, b);
582
+ };
583
+ case 3: return function (a, b, c) {
584
+ return fn.call(that, a, b, c);
585
+ };
586
+ }
587
+ return function (/* ...args */) {
588
+ return fn.apply(that, arguments);
589
+ };
590
+ };
591
+
592
+ // `ToObject` abstract operation
593
+ // https://tc39.es/ecma262/#sec-toobject
594
+ var toObject = function (argument) {
595
+ return Object(requireObjectCoercible(argument));
596
+ };
597
+
598
+ // `IsArray` abstract operation
599
+ // https://tc39.es/ecma262/#sec-isarray
600
+ // eslint-disable-next-line es/no-array-isarray -- safe
601
+ var isArray = Array.isArray || function isArray(arg) {
602
+ return classofRaw(arg) == 'Array';
603
+ };
604
+
605
+ var engineIsNode = classofRaw(global_1.process) == 'process';
606
+
607
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
608
+
609
+ var process = global_1.process;
610
+ var versions = process && process.versions;
611
+ var v8 = versions && versions.v8;
612
+ var match, version;
613
+
614
+ if (v8) {
615
+ match = v8.split('.');
616
+ version = match[0] + match[1];
617
+ } else if (engineUserAgent) {
618
+ match = engineUserAgent.match(/Edge\/(\d+)/);
619
+ if (!match || match[1] >= 74) {
620
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
621
+ if (match) version = match[1];
622
+ }
623
+ }
624
+
625
+ var engineV8Version = version && +version;
626
+
627
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
628
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
629
+ // eslint-disable-next-line es/no-symbol -- required for testing
630
+ return !Symbol.sham &&
631
+ // Chrome 38 Symbol has incorrect toString conversion
632
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
633
+ (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
634
+ });
635
+
636
+ /* eslint-disable es/no-symbol -- required for testing */
637
+
638
+
639
+ var useSymbolAsUid = nativeSymbol
640
+ && !Symbol.sham
641
+ && typeof Symbol.iterator == 'symbol';
642
+
643
+ var WellKnownSymbolsStore = shared('wks');
644
+ var Symbol$1 = global_1.Symbol;
645
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
646
+
647
+ var wellKnownSymbol = function (name) {
648
+ if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
649
+ if (nativeSymbol && has$1(Symbol$1, name)) {
650
+ WellKnownSymbolsStore[name] = Symbol$1[name];
651
+ } else {
652
+ WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
653
+ }
654
+ } return WellKnownSymbolsStore[name];
655
+ };
656
+
657
+ var SPECIES$2 = wellKnownSymbol('species');
658
+
659
+ // `ArraySpeciesCreate` abstract operation
660
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
661
+ var arraySpeciesCreate = function (originalArray, length) {
662
+ var C;
663
+ if (isArray(originalArray)) {
664
+ C = originalArray.constructor;
665
+ // cross-realm fallback
666
+ if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
667
+ else if (isObject(C)) {
668
+ C = C[SPECIES$2];
669
+ if (C === null) C = undefined;
670
+ }
671
+ } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
672
+ };
673
+
674
+ var push = [].push;
675
+
676
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
677
+ var createMethod$1 = function (TYPE) {
678
+ var IS_MAP = TYPE == 1;
679
+ var IS_FILTER = TYPE == 2;
680
+ var IS_SOME = TYPE == 3;
681
+ var IS_EVERY = TYPE == 4;
682
+ var IS_FIND_INDEX = TYPE == 6;
683
+ var IS_FILTER_OUT = TYPE == 7;
684
+ var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
685
+ return function ($this, callbackfn, that, specificCreate) {
686
+ var O = toObject($this);
687
+ var self = indexedObject(O);
688
+ var boundFunction = functionBindContext(callbackfn, that, 3);
689
+ var length = toLength(self.length);
690
+ var index = 0;
691
+ var create = specificCreate || arraySpeciesCreate;
692
+ var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
693
+ var value, result;
694
+ for (;length > index; index++) if (NO_HOLES || index in self) {
695
+ value = self[index];
696
+ result = boundFunction(value, index, O);
697
+ if (TYPE) {
698
+ if (IS_MAP) target[index] = result; // map
699
+ else if (result) switch (TYPE) {
700
+ case 3: return true; // some
701
+ case 5: return value; // find
702
+ case 6: return index; // findIndex
703
+ case 2: push.call(target, value); // filter
704
+ } else switch (TYPE) {
705
+ case 4: return false; // every
706
+ case 7: push.call(target, value); // filterOut
707
+ }
708
+ }
709
+ }
710
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
711
+ };
712
+ };
713
+
714
+ var arrayIteration = {
715
+ // `Array.prototype.forEach` method
716
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
717
+ forEach: createMethod$1(0),
718
+ // `Array.prototype.map` method
719
+ // https://tc39.es/ecma262/#sec-array.prototype.map
720
+ map: createMethod$1(1),
721
+ // `Array.prototype.filter` method
722
+ // https://tc39.es/ecma262/#sec-array.prototype.filter
723
+ filter: createMethod$1(2),
724
+ // `Array.prototype.some` method
725
+ // https://tc39.es/ecma262/#sec-array.prototype.some
726
+ some: createMethod$1(3),
727
+ // `Array.prototype.every` method
728
+ // https://tc39.es/ecma262/#sec-array.prototype.every
729
+ every: createMethod$1(4),
730
+ // `Array.prototype.find` method
731
+ // https://tc39.es/ecma262/#sec-array.prototype.find
732
+ find: createMethod$1(5),
733
+ // `Array.prototype.findIndex` method
734
+ // https://tc39.es/ecma262/#sec-array.prototype.findIndex
735
+ findIndex: createMethod$1(6),
736
+ // `Array.prototype.filterOut` method
737
+ // https://github.com/tc39/proposal-array-filtering
738
+ filterOut: createMethod$1(7)
739
+ };
740
+
741
+ // `Object.keys` method
742
+ // https://tc39.es/ecma262/#sec-object.keys
743
+ // eslint-disable-next-line es/no-object-keys -- safe
744
+ var objectKeys = Object.keys || function keys(O) {
745
+ return objectKeysInternal(O, enumBugKeys);
746
+ };
747
+
748
+ // `Object.defineProperties` method
749
+ // https://tc39.es/ecma262/#sec-object.defineproperties
750
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
751
+ var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
752
+ anObject(O);
753
+ var keys = objectKeys(Properties);
754
+ var length = keys.length;
755
+ var index = 0;
756
+ var key;
757
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
758
+ return O;
759
+ };
760
+
761
+ var html = getBuiltIn('document', 'documentElement');
762
+
763
+ var GT = '>';
764
+ var LT = '<';
765
+ var PROTOTYPE = 'prototype';
766
+ var SCRIPT = 'script';
767
+ var IE_PROTO = sharedKey('IE_PROTO');
768
+
769
+ var EmptyConstructor = function () { /* empty */ };
770
+
771
+ var scriptTag = function (content) {
772
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
773
+ };
774
+
775
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
776
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
777
+ activeXDocument.write(scriptTag(''));
778
+ activeXDocument.close();
779
+ var temp = activeXDocument.parentWindow.Object;
780
+ activeXDocument = null; // avoid memory leak
781
+ return temp;
782
+ };
783
+
784
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
785
+ var NullProtoObjectViaIFrame = function () {
786
+ // Thrash, waste and sodomy: IE GC bug
787
+ var iframe = documentCreateElement('iframe');
788
+ var JS = 'java' + SCRIPT + ':';
789
+ var iframeDocument;
790
+ iframe.style.display = 'none';
791
+ html.appendChild(iframe);
792
+ // https://github.com/zloirock/core-js/issues/475
793
+ iframe.src = String(JS);
794
+ iframeDocument = iframe.contentWindow.document;
795
+ iframeDocument.open();
796
+ iframeDocument.write(scriptTag('document.F=Object'));
797
+ iframeDocument.close();
798
+ return iframeDocument.F;
799
+ };
800
+
801
+ // Check for document.domain and active x support
802
+ // No need to use active x approach when document.domain is not set
803
+ // see https://github.com/es-shims/es5-shim/issues/150
804
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
805
+ // avoid IE GC bug
806
+ var activeXDocument;
807
+ var NullProtoObject = function () {
808
+ try {
809
+ /* global ActiveXObject -- old IE */
810
+ activeXDocument = document.domain && new ActiveXObject('htmlfile');
811
+ } catch (error) { /* ignore */ }
812
+ NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
813
+ var length = enumBugKeys.length;
814
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
815
+ return NullProtoObject();
816
+ };
817
+
818
+ hiddenKeys$1[IE_PROTO] = true;
819
+
820
+ // `Object.create` method
821
+ // https://tc39.es/ecma262/#sec-object.create
822
+ var objectCreate = Object.create || function create(O, Properties) {
823
+ var result;
824
+ if (O !== null) {
825
+ EmptyConstructor[PROTOTYPE] = anObject(O);
826
+ result = new EmptyConstructor();
827
+ EmptyConstructor[PROTOTYPE] = null;
828
+ // add "__proto__" for Object.getPrototypeOf polyfill
829
+ result[IE_PROTO] = O;
830
+ } else result = NullProtoObject();
831
+ return Properties === undefined ? result : objectDefineProperties(result, Properties);
832
+ };
833
+
834
+ var UNSCOPABLES = wellKnownSymbol('unscopables');
835
+ var ArrayPrototype = Array.prototype;
836
+
837
+ // Array.prototype[@@unscopables]
838
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
839
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
840
+ objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
841
+ configurable: true,
842
+ value: objectCreate(null)
843
+ });
844
+ }
845
+
846
+ // add a key to Array.prototype[@@unscopables]
847
+ var addToUnscopables = function (key) {
848
+ ArrayPrototype[UNSCOPABLES][key] = true;
849
+ };
850
+
851
+ var $find = arrayIteration.find;
852
+
853
+
854
+ var FIND = 'find';
855
+ var SKIPS_HOLES = true;
856
+
857
+ // Shouldn't skip holes
858
+ if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
859
+
860
+ // `Array.prototype.find` method
861
+ // https://tc39.es/ecma262/#sec-array.prototype.find
862
+ _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
863
+ find: function find(callbackfn /* , that = undefined */) {
864
+ return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
865
+ }
866
+ });
867
+
868
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
869
+ addToUnscopables(FIND);
870
+
871
+ var SPECIES$1 = wellKnownSymbol('species');
872
+
873
+ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
874
+ // We can't use this feature detection in V8 since it causes
875
+ // deoptimization and serious performance degradation
876
+ // https://github.com/zloirock/core-js/issues/677
877
+ return engineV8Version >= 51 || !fails(function () {
878
+ var array = [];
879
+ var constructor = array.constructor = {};
880
+ constructor[SPECIES$1] = function () {
881
+ return { foo: 1 };
882
+ };
883
+ return array[METHOD_NAME](Boolean).foo !== 1;
884
+ });
885
+ };
886
+
887
+ var $map = arrayIteration.map;
888
+
889
+
890
+ var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map');
891
+
892
+ // `Array.prototype.map` method
893
+ // https://tc39.es/ecma262/#sec-array.prototype.map
894
+ // with adding support of @@species
895
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
896
+ map: function map(callbackfn /* , thisArg */) {
897
+ return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
898
+ }
899
+ });
900
+
901
+ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
902
+ var method = [][METHOD_NAME];
903
+ return !!method && fails(function () {
904
+ // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
905
+ method.call(null, argument || function () { throw 1; }, 1);
906
+ });
907
+ };
908
+
909
+ var test$1 = [];
910
+ var nativeSort = test$1.sort;
911
+
912
+ // IE8-
913
+ var FAILS_ON_UNDEFINED = fails(function () {
914
+ test$1.sort(undefined);
915
+ });
916
+ // V8 bug
917
+ var FAILS_ON_NULL = fails(function () {
918
+ test$1.sort(null);
919
+ });
920
+ // Old WebKit
921
+ var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
922
+
923
+ var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1;
924
+
925
+ // `Array.prototype.sort` method
926
+ // https://tc39.es/ecma262/#sec-array.prototype.sort
927
+ _export({ target: 'Array', proto: true, forced: FORCED$2 }, {
928
+ sort: function sort(comparefn) {
929
+ return comparefn === undefined
930
+ ? nativeSort.call(toObject(this))
931
+ : nativeSort.call(toObject(this), aFunction(comparefn));
932
+ }
933
+ });
934
+
935
+ var createProperty = function (object, key, value) {
936
+ var propertyKey = toPrimitive(key);
937
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
938
+ else object[propertyKey] = value;
939
+ };
940
+
941
+ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
942
+ var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
943
+ var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
944
+
945
+ // We can't use this feature detection in V8 since it causes
946
+ // deoptimization and serious performance degradation
947
+ // https://github.com/zloirock/core-js/issues/679
948
+ var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
949
+ var array = [];
950
+ array[IS_CONCAT_SPREADABLE] = false;
951
+ return array.concat()[0] !== array;
952
+ });
953
+
954
+ var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
955
+
956
+ var isConcatSpreadable = function (O) {
957
+ if (!isObject(O)) return false;
958
+ var spreadable = O[IS_CONCAT_SPREADABLE];
959
+ return spreadable !== undefined ? !!spreadable : isArray(O);
960
+ };
961
+
962
+ var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
963
+
964
+ // `Array.prototype.concat` method
965
+ // https://tc39.es/ecma262/#sec-array.prototype.concat
966
+ // with adding support of @@isConcatSpreadable and @@species
967
+ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
968
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
969
+ concat: function concat(arg) {
970
+ var O = toObject(this);
971
+ var A = arraySpeciesCreate(O, 0);
972
+ var n = 0;
973
+ var i, k, length, len, E;
974
+ for (i = -1, length = arguments.length; i < length; i++) {
975
+ E = i === -1 ? O : arguments[i];
976
+ if (isConcatSpreadable(E)) {
977
+ len = toLength(E.length);
978
+ if (n + len > MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
979
+ for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
980
+ } else {
981
+ if (n >= MAX_SAFE_INTEGER$1) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
982
+ createProperty(A, n++, E);
983
+ }
984
+ }
985
+ A.length = n;
986
+ return A;
987
+ }
988
+ });
989
+
990
+ // eslint-disable-next-line es/no-object-assign -- safe
991
+ var $assign = Object.assign;
992
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
993
+ var defineProperty = Object.defineProperty;
994
+
995
+ // `Object.assign` method
996
+ // https://tc39.es/ecma262/#sec-object.assign
997
+ var objectAssign = !$assign || fails(function () {
998
+ // should have correct order of operations (Edge bug)
999
+ if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1000
+ enumerable: true,
1001
+ get: function () {
1002
+ defineProperty(this, 'b', {
1003
+ value: 3,
1004
+ enumerable: false
1005
+ });
1006
+ }
1007
+ }), { b: 2 })).b !== 1) return true;
1008
+ // should work with symbols and should have deterministic property order (V8 bug)
1009
+ var A = {};
1010
+ var B = {};
1011
+ // eslint-disable-next-line es/no-symbol -- safe
1012
+ var symbol = Symbol();
1013
+ var alphabet = 'abcdefghijklmnopqrst';
1014
+ A[symbol] = 7;
1015
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1016
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1017
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1018
+ var T = toObject(target);
1019
+ var argumentsLength = arguments.length;
1020
+ var index = 1;
1021
+ var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
1022
+ var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1023
+ while (argumentsLength > index) {
1024
+ var S = indexedObject(arguments[index++]);
1025
+ var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
1026
+ var length = keys.length;
1027
+ var j = 0;
1028
+ var key;
1029
+ while (length > j) {
1030
+ key = keys[j++];
1031
+ if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
1032
+ }
1033
+ } return T;
1034
+ } : $assign;
1035
+
1036
+ // `Object.assign` method
1037
+ // https://tc39.es/ecma262/#sec-object.assign
1038
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1039
+ _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
1040
+ assign: objectAssign
1041
+ });
1042
+
1043
+ var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('slice');
1044
+
1045
+ var SPECIES = wellKnownSymbol('species');
1046
+ var nativeSlice = [].slice;
1047
+ var max$1 = Math.max;
1048
+
1049
+ // `Array.prototype.slice` method
1050
+ // https://tc39.es/ecma262/#sec-array.prototype.slice
1051
+ // fallback for not array-like ES3 strings and DOM objects
1052
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
1053
+ slice: function slice(start, end) {
1054
+ var O = toIndexedObject(this);
1055
+ var length = toLength(O.length);
1056
+ var k = toAbsoluteIndex(start, length);
1057
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
1058
+ // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
1059
+ var Constructor, result, n;
1060
+ if (isArray(O)) {
1061
+ Constructor = O.constructor;
1062
+ // cross-realm fallback
1063
+ if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
1064
+ Constructor = undefined;
1065
+ } else if (isObject(Constructor)) {
1066
+ Constructor = Constructor[SPECIES];
1067
+ if (Constructor === null) Constructor = undefined;
1068
+ }
1069
+ if (Constructor === Array || Constructor === undefined) {
1070
+ return nativeSlice.call(O, k, fin);
1071
+ }
1072
+ }
1073
+ result = new (Constructor === undefined ? Array : Constructor)(max$1(fin - k, 0));
1074
+ for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
1075
+ result.length = n;
1076
+ return result;
1077
+ }
1078
+ });
1079
+
1080
+ var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
1081
+
1082
+ var max = Math.max;
1083
+ var min = Math.min;
1084
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1085
+ var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
1086
+
1087
+ // `Array.prototype.splice` method
1088
+ // https://tc39.es/ecma262/#sec-array.prototype.splice
1089
+ // with adding support of @@species
1090
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1091
+ splice: function splice(start, deleteCount /* , ...items */) {
1092
+ var O = toObject(this);
1093
+ var len = toLength(O.length);
1094
+ var actualStart = toAbsoluteIndex(start, len);
1095
+ var argumentsLength = arguments.length;
1096
+ var insertCount, actualDeleteCount, A, k, from, to;
1097
+ if (argumentsLength === 0) {
1098
+ insertCount = actualDeleteCount = 0;
1099
+ } else if (argumentsLength === 1) {
1100
+ insertCount = 0;
1101
+ actualDeleteCount = len - actualStart;
1102
+ } else {
1103
+ insertCount = argumentsLength - 2;
1104
+ actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
1105
+ }
1106
+ if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
1107
+ throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
1108
+ }
1109
+ A = arraySpeciesCreate(O, actualDeleteCount);
1110
+ for (k = 0; k < actualDeleteCount; k++) {
1111
+ from = actualStart + k;
1112
+ if (from in O) createProperty(A, k, O[from]);
1113
+ }
1114
+ A.length = actualDeleteCount;
1115
+ if (insertCount < actualDeleteCount) {
1116
+ for (k = actualStart; k < len - actualDeleteCount; k++) {
1117
+ from = k + actualDeleteCount;
1118
+ to = k + insertCount;
1119
+ if (from in O) O[to] = O[from];
1120
+ else delete O[to];
1121
+ }
1122
+ for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
1123
+ } else if (insertCount > actualDeleteCount) {
1124
+ for (k = len - actualDeleteCount; k > actualStart; k--) {
1125
+ from = k + actualDeleteCount - 1;
1126
+ to = k + insertCount - 1;
1127
+ if (from in O) O[to] = O[from];
1128
+ else delete O[to];
1129
+ }
1130
+ }
1131
+ for (k = 0; k < insertCount; k++) {
1132
+ O[k + actualStart] = arguments[k + 2];
1133
+ }
1134
+ O.length = len - actualDeleteCount + insertCount;
1135
+ return A;
1136
+ }
1137
+ });
1138
+
1139
+ /* eslint-disable es/no-array-prototype-indexof -- required for testing */
1140
+
1141
+ var $indexOf = arrayIncludes.indexOf;
1142
+
1143
+
1144
+ var nativeIndexOf = [].indexOf;
1145
+
1146
+ var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
1147
+ var STRICT_METHOD = arrayMethodIsStrict('indexOf');
1148
+
1149
+ // `Array.prototype.indexOf` method
1150
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
1151
+ _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
1152
+ indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
1153
+ return NEGATIVE_ZERO
1154
+ // convert -0 to +0
1155
+ ? nativeIndexOf.apply(this, arguments) || 0
1156
+ : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
1157
+ }
1158
+ });
1159
+
1160
+ // a string of all valid unicode whitespaces
1161
+ var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1162
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1163
+
1164
+ var whitespace = '[' + whitespaces + ']';
1165
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
1166
+ var rtrim = RegExp(whitespace + whitespace + '*$');
1167
+
1168
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1169
+ var createMethod = function (TYPE) {
1170
+ return function ($this) {
1171
+ var string = String(requireObjectCoercible($this));
1172
+ if (TYPE & 1) string = string.replace(ltrim, '');
1173
+ if (TYPE & 2) string = string.replace(rtrim, '');
1174
+ return string;
1175
+ };
1176
+ };
1177
+
1178
+ var stringTrim = {
1179
+ // `String.prototype.{ trimLeft, trimStart }` methods
1180
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1181
+ start: createMethod(1),
1182
+ // `String.prototype.{ trimRight, trimEnd }` methods
1183
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
1184
+ end: createMethod(2),
1185
+ // `String.prototype.trim` method
1186
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
1187
+ trim: createMethod(3)
1188
+ };
1189
+
1190
+ var trim = stringTrim.trim;
1191
+
1192
+
1193
+ var $parseFloat = global_1.parseFloat;
1194
+ var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
1195
+
1196
+ // `parseFloat` method
1197
+ // https://tc39.es/ecma262/#sec-parsefloat-string
1198
+ var numberParseFloat = FORCED ? function parseFloat(string) {
1199
+ var trimmedString = trim(String(string));
1200
+ var result = $parseFloat(trimmedString);
1201
+ return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
1202
+ } : $parseFloat;
1203
+
1204
+ // `parseFloat` method
1205
+ // https://tc39.es/ecma262/#sec-parsefloat-string
1206
+ _export({ global: true, forced: parseFloat != numberParseFloat }, {
1207
+ parseFloat: numberParseFloat
1208
+ });
1209
+
1210
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1211
+ var test = {};
1212
+
1213
+ test[TO_STRING_TAG$1] = 'z';
1214
+
1215
+ var toStringTagSupport = String(test) === '[object z]';
1216
+
1217
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1218
+ // ES3 wrong here
1219
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1220
+
1221
+ // fallback for IE11 Script Access Denied error
1222
+ var tryGet = function (it, key) {
1223
+ try {
1224
+ return it[key];
1225
+ } catch (error) { /* empty */ }
1226
+ };
1227
+
1228
+ // getting tag from ES6+ `Object.prototype.toString`
1229
+ var classof = toStringTagSupport ? classofRaw : function (it) {
1230
+ var O, tag, result;
1231
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1232
+ // @@toStringTag case
1233
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
1234
+ // builtinTag case
1235
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1236
+ // ES3 arguments fallback
1237
+ : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1238
+ };
1239
+
1240
+ // `Object.prototype.toString` method implementation
1241
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1242
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
1243
+ return '[object ' + classof(this) + ']';
1244
+ };
1245
+
1246
+ // `Object.prototype.toString` method
1247
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1248
+ if (!toStringTagSupport) {
1249
+ redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
1250
+ }
1251
+
1252
+ // `RegExp.prototype.flags` getter implementation
1253
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1254
+ var regexpFlags = function () {
1255
+ var that = anObject(this);
1256
+ var result = '';
1257
+ if (that.global) result += 'g';
1258
+ if (that.ignoreCase) result += 'i';
1259
+ if (that.multiline) result += 'm';
1260
+ if (that.dotAll) result += 's';
1261
+ if (that.unicode) result += 'u';
1262
+ if (that.sticky) result += 'y';
1263
+ return result;
1264
+ };
1265
+
1266
+ var TO_STRING = 'toString';
1267
+ var RegExpPrototype = RegExp.prototype;
1268
+ var nativeToString = RegExpPrototype[TO_STRING];
1269
+
1270
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1271
+ // FF44- RegExp#toString has a wrong name
1272
+ var INCORRECT_NAME = nativeToString.name != TO_STRING;
1273
+
1274
+ // `RegExp.prototype.toString` method
1275
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
1276
+ if (NOT_GENERIC || INCORRECT_NAME) {
1277
+ redefine(RegExp.prototype, TO_STRING, function toString() {
1278
+ var R = anObject(this);
1279
+ var p = String(R.source);
1280
+ var rf = R.flags;
1281
+ var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
1282
+ return '/' + p + '/' + f;
1283
+ }, { unsafe: true });
1284
+ }
1285
+
1286
+ /**
1287
+ * @author Nadim Basalamah <dimbslmh@gmail.com>
1288
+ * @version: v1.1.0
1289
+ * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js
1290
+ * Modification: ErwannNevou <https://github.com/ErwannNevou>
1291
+ */
1292
+
1293
+ var isSingleSort = false;
1294
+ var Utils = $__default['default'].fn.bootstrapTable.utils;
1295
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
1296
+ plus: {
1297
+ bootstrap3: 'glyphicon-plus',
1298
+ bootstrap4: 'fa-plus',
1299
+ bootstrap5: 'bi-plus',
1300
+ semantic: 'fa-plus',
1301
+ materialize: 'plus',
1302
+ foundation: 'fa-plus',
1303
+ bulma: 'fa-plus',
1304
+ 'bootstrap-table': 'icon-plus'
1305
+ }[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock',
1306
+ minus: {
1307
+ bootstrap3: 'glyphicon-minus',
1308
+ bootstrap4: 'fa-minus',
1309
+ bootstrap5: 'bi-dash',
1310
+ semantic: 'fa-minus',
1311
+ materialize: 'minus',
1312
+ foundation: 'fa-minus',
1313
+ bulma: 'fa-minus',
1314
+ 'bootstrap-table': 'icon-minus'
1315
+ }[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock',
1316
+ sort: {
1317
+ bootstrap3: 'glyphicon-sort',
1318
+ bootstrap4: 'fa-sort',
1319
+ bootstrap5: 'bi-arrow-down-up',
1320
+ semantic: 'fa-sort',
1321
+ materialize: 'sort',
1322
+ foundation: 'fa-sort',
1323
+ bulma: 'fa-sort',
1324
+ 'bootstrap-table': 'icon-sort-amount-asc'
1325
+ }[$__default['default'].fn.bootstrapTable.theme] || 'fa-clock'
1326
+ });
1327
+ var theme = {
1328
+ bootstrap3: {
1329
+ html: {
1330
+ multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1331
+ multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1332
+ multipleSortSelect: '<select class="%s %s form-control">'
1333
+ }
1334
+ },
1335
+ bootstrap4: {
1336
+ html: {
1337
+ multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1338
+ multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1339
+ multipleSortSelect: '<select class="%s %s form-control">'
1340
+ }
1341
+ },
1342
+ bootstrap5: {
1343
+ html: {
1344
+ multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1345
+ multipleSortButton: '<button class="multi-sort %s" type="button" data-bs-toggle="modal" data-bs-target="#%s" title="%s">%s</button>',
1346
+ multipleSortSelect: '<select class="%s %s form-control">'
1347
+ }
1348
+ },
1349
+ semantic: {
1350
+ html: {
1351
+ multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
1352
+ multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
1353
+ multipleSortSelect: '<select class="%s %s">'
1354
+ }
1355
+ },
1356
+ materialize: {
1357
+ html: {
1358
+ multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
1359
+ multipleSortButton: '<a class="multi-sort %s modal-trigger" href="#%s" type="button" data-toggle="modal" title="%s">%s</a>',
1360
+ multipleSortSelect: '<select class="%s %s browser-default">'
1361
+ }
1362
+ },
1363
+ foundation: {
1364
+ html: {
1365
+ multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
1366
+ multipleSortButton: '<button class="multi-sort %s" data-open="%s" title="%s">%s</button>',
1367
+ multipleSortSelect: '<select class="%s %s browser-default">'
1368
+ }
1369
+ },
1370
+ bulma: {
1371
+ html: {
1372
+ multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
1373
+ multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
1374
+ multipleSortSelect: '<select class="%s %s browser-default">'
1375
+ }
1376
+ },
1377
+ 'bootstrap-table': {
1378
+ html: {
1379
+ multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
1380
+ multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
1381
+ multipleSortSelect: '<select class="%s %s browser-default">'
1382
+ }
1383
+ }
1384
+ }[$__default['default'].fn.bootstrapTable.theme];
1385
+
1386
+ var showSortModal = function showSortModal(that) {
1387
+ var _selector = that.sortModalSelector;
1388
+
1389
+ var _id = "#".concat(_selector);
1390
+
1391
+ var o = that.options;
1392
+
1393
+ if (!$__default['default'](_id).hasClass('modal')) {
1394
+ var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
1395
+ $__default['default']('body').append($__default['default'](sModal));
1396
+ that.$sortModal = $__default['default'](_id);
1397
+ var $rows = that.$sortModal.find('tbody > tr');
1398
+ that.$sortModal.off('click', '#add').on('click', '#add', function () {
1399
+ var total = that.$sortModal.find('.multi-sort-name:first option').length;
1400
+ var current = that.$sortModal.find('tbody tr').length;
1401
+
1402
+ if (current < total) {
1403
+ current++;
1404
+ that.addLevel();
1405
+ that.setButtonStates();
1406
+ }
1407
+ });
1408
+ that.$sortModal.off('click', '#delete').on('click', '#delete', function () {
1409
+ var total = that.$sortModal.find('.multi-sort-name:first option').length;
1410
+ var current = that.$sortModal.find('tbody tr').length;
1411
+
1412
+ if (current > 1 && current <= total) {
1413
+ current--;
1414
+ that.$sortModal.find('tbody tr:last').remove();
1415
+ that.setButtonStates();
1416
+ }
1417
+ });
1418
+ that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
1419
+ var $rows = that.$sortModal.find('tbody > tr');
1420
+ var $alert = that.$sortModal.find('div.alert');
1421
+ var fields = [];
1422
+ var results = [];
1423
+ var sortPriority = $__default['default'].map($rows, function (row) {
1424
+ var $row = $__default['default'](row);
1425
+ var name = $row.find('.multi-sort-name').val();
1426
+ var order = $row.find('.multi-sort-order').val();
1427
+ fields.push(name);
1428
+ return {
1429
+ sortName: name,
1430
+ sortOrder: order
1431
+ };
1432
+ });
1433
+ var sorted_fields = fields.sort();
1434
+
1435
+ for (var i = 0; i < fields.length - 1; i++) {
1436
+ if (sorted_fields[i + 1] === sorted_fields[i]) {
1437
+ results.push(sorted_fields[i]);
1438
+ }
1439
+ }
1440
+
1441
+ if (results.length > 0) {
1442
+ if ($alert.length === 0) {
1443
+ $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
1444
+ $__default['default']($alert).insertBefore(that.$sortModal.find('.bars'));
1445
+ }
1446
+ } else {
1447
+ if ($alert.length === 1) {
1448
+ $__default['default']($alert).remove();
1449
+ }
1450
+
1451
+ if ($__default['default'].inArray($__default['default'].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
1452
+ that.$sortModal.modal('hide');
1453
+ }
1454
+
1455
+ that.multiSort(sortPriority);
1456
+ }
1457
+ });
1458
+
1459
+ if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
1460
+ if (that.options.sortName) {
1461
+ that.options.sortPriority = [{
1462
+ sortName: that.options.sortName,
1463
+ sortOrder: that.options.sortOrder
1464
+ }];
1465
+ }
1466
+ }
1467
+
1468
+ if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
1469
+ if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
1470
+ for (var i = 0; i < that.options.sortPriority.length; i++) {
1471
+ that.addLevel(i, that.options.sortPriority[i]);
1472
+ }
1473
+ }
1474
+ } else {
1475
+ that.addLevel(0);
1476
+ }
1477
+
1478
+ that.setButtonStates();
1479
+ }
1480
+ };
1481
+
1482
+ $__default['default'].fn.bootstrapTable.methods.push('multipleSort');
1483
+ $__default['default'].fn.bootstrapTable.methods.push('multiSort');
1484
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
1485
+ showMultiSort: false,
1486
+ showMultiSortButton: true,
1487
+ multiSortStrictSort: false,
1488
+ sortPriority: null,
1489
+ onMultipleSort: function onMultipleSort() {
1490
+ return false;
1491
+ }
1492
+ });
1493
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, {
1494
+ 'multiple-sort.bs.table': 'onMultipleSort'
1495
+ });
1496
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, {
1497
+ formatMultipleSort: function formatMultipleSort() {
1498
+ return 'Multiple Sort';
1499
+ },
1500
+ formatAddLevel: function formatAddLevel() {
1501
+ return 'Add Level';
1502
+ },
1503
+ formatDeleteLevel: function formatDeleteLevel() {
1504
+ return 'Delete Level';
1505
+ },
1506
+ formatColumn: function formatColumn() {
1507
+ return 'Column';
1508
+ },
1509
+ formatOrder: function formatOrder() {
1510
+ return 'Order';
1511
+ },
1512
+ formatSortBy: function formatSortBy() {
1513
+ return 'Sort by';
1514
+ },
1515
+ formatThenBy: function formatThenBy() {
1516
+ return 'Then by';
1517
+ },
1518
+ formatSort: function formatSort() {
1519
+ return 'Sort';
1520
+ },
1521
+ formatCancel: function formatCancel() {
1522
+ return 'Cancel';
1523
+ },
1524
+ formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
1525
+ return 'Duplicate(s) detected!';
1526
+ },
1527
+ formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
1528
+ return 'Please remove or change any duplicate column.';
1529
+ },
1530
+ formatSortOrders: function formatSortOrders() {
1531
+ return {
1532
+ asc: 'Ascending',
1533
+ desc: 'Descending'
1534
+ };
1535
+ }
1536
+ });
1537
+ $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales);
1538
+ var BootstrapTable = $__default['default'].fn.bootstrapTable.Constructor;
1539
+ var _initToolbar = BootstrapTable.prototype.initToolbar;
1540
+ var _destroy = BootstrapTable.prototype.destroy;
1541
+
1542
+ BootstrapTable.prototype.initToolbar = function () {
1543
+ var _this = this;
1544
+
1545
+ this.showToolbar = this.showToolbar || this.options.showMultiSort;
1546
+ var that = this;
1547
+ var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
1548
+ var sortModalId = "#".concat(sortModalSelector);
1549
+ var $multiSortBtn = this.$toolbar.find('div.multi-sort');
1550
+ var o = this.options;
1551
+ this.$sortModal = $__default['default'](sortModalId);
1552
+ this.sortModalSelector = sortModalSelector;
1553
+
1554
+ if (that.options.sortPriority !== null) {
1555
+ that.onMultipleSort();
1556
+ }
1557
+
1558
+ if (this.options.showMultiSortButton) {
1559
+ this.buttons = Object.assign(this.buttons, {
1560
+ multipleSort: {
1561
+ html: Utils.sprintf(theme.html.multipleSortButton, that.constants.buttonsClass, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
1562
+ }
1563
+ });
1564
+ }
1565
+
1566
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1567
+ args[_key] = arguments[_key];
1568
+ }
1569
+
1570
+ _initToolbar.apply(this, Array.prototype.slice.apply(args));
1571
+
1572
+ if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
1573
+ var t = that.options.queryParams;
1574
+
1575
+ that.options.queryParams = function (params) {
1576
+ params.multiSort = that.options.sortPriority;
1577
+ return t(params);
1578
+ };
1579
+ }
1580
+
1581
+ if (this.options.showMultiSort) {
1582
+ if (!$multiSortBtn.length && this.options.showMultiSortButton) {
1583
+ if ($__default['default'].fn.bootstrapTable.theme === 'semantic') {
1584
+ this.$toolbar.find('.multi-sort').on('click', function () {
1585
+ $__default['default'](sortModalId).modal('show');
1586
+ });
1587
+ } else if ($__default['default'].fn.bootstrapTable.theme === 'materialize') {
1588
+ this.$toolbar.find('.multi-sort').on('click', function () {
1589
+ $__default['default'](sortModalId).modal();
1590
+ });
1591
+ } else if ($__default['default'].fn.bootstrapTable.theme === 'bootstrap-table') {
1592
+ this.$toolbar.find('.multi-sort').on('click', function () {
1593
+ $__default['default'](sortModalId).addClass('show');
1594
+ });
1595
+ } else if ($__default['default'].fn.bootstrapTable.theme === 'foundation') {
1596
+ this.$toolbar.find('.multi-sort').on('click', function () {
1597
+ if (!_this.foundationModal) {
1598
+ // eslint-disable-next-line no-undef
1599
+ _this.foundationModal = new Foundation.Reveal($__default['default'](sortModalId));
1600
+ }
1601
+
1602
+ _this.foundationModal.open();
1603
+ });
1604
+ } else if ($__default['default'].fn.bootstrapTable.theme === 'bulma') {
1605
+ this.$toolbar.find('.multi-sort').on('click', function () {
1606
+ $__default['default']('html').toggleClass('is-clipped');
1607
+ $__default['default'](sortModalId).toggleClass('is-active');
1608
+ $__default['default']('button[data-close]').one('click', function () {
1609
+ $__default['default']('html').toggleClass('is-clipped');
1610
+ $__default['default'](sortModalId).toggleClass('is-active');
1611
+ });
1612
+ });
1613
+ }
1614
+
1615
+ showSortModal(that);
1616
+ }
1617
+
1618
+ this.$el.on('sort.bs.table', function () {
1619
+ isSingleSort = true;
1620
+ });
1621
+ this.$el.on('multiple-sort.bs.table', function () {
1622
+ isSingleSort = false;
1623
+ });
1624
+ this.$el.on('load-success.bs.table', function () {
1625
+ if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
1626
+ that.onMultipleSort();
1627
+ }
1628
+ });
1629
+ this.$el.on('column-switch.bs.table', function (field, checked) {
1630
+ if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
1631
+ for (var i = 0; i < that.options.sortPriority.length; i++) {
1632
+ if (that.options.sortPriority[i].sortName === checked) {
1633
+ that.options.sortPriority.splice(i, 1);
1634
+ }
1635
+ }
1636
+
1637
+ that.assignSortableArrows();
1638
+ }
1639
+
1640
+ that.$sortModal.remove();
1641
+ showSortModal(that);
1642
+ });
1643
+ this.$el.on('reset-view.bs.table', function () {
1644
+ if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
1645
+ that.assignSortableArrows();
1646
+ }
1647
+ });
1648
+ }
1649
+ };
1650
+
1651
+ BootstrapTable.prototype.destroy = function () {
1652
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1653
+ args[_key2] = arguments[_key2];
1654
+ }
1655
+
1656
+ _destroy.apply(this, Array.prototype.slice.apply(args));
1657
+
1658
+ if (this.options.showMultiSort) {
1659
+ this.enableCustomSort = false;
1660
+ this.$sortModal.remove();
1661
+ }
1662
+ };
1663
+
1664
+ BootstrapTable.prototype.multipleSort = function () {
1665
+ var that = this;
1666
+
1667
+ if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
1668
+ that.onMultipleSort();
1669
+ }
1670
+ };
1671
+
1672
+ BootstrapTable.prototype.onMultipleSort = function () {
1673
+ var that = this;
1674
+
1675
+ var cmp = function cmp(x, y) {
1676
+ return x > y ? 1 : x < y ? -1 : 0;
1677
+ };
1678
+
1679
+ var arrayCmp = function arrayCmp(a, b) {
1680
+ var arr1 = [];
1681
+ var arr2 = [];
1682
+
1683
+ for (var i = 0; i < that.options.sortPriority.length; i++) {
1684
+ var fieldName = that.options.sortPriority[i].sortName;
1685
+ var fieldIndex = that.header.fields.indexOf(fieldName);
1686
+ var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
1687
+
1688
+ if (that.header.sortNames[fieldIndex]) {
1689
+ fieldName = that.header.sortNames[fieldIndex];
1690
+ }
1691
+
1692
+ var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
1693
+ var aa = Utils.getItemField(a, fieldName);
1694
+ var bb = Utils.getItemField(b, fieldName);
1695
+ var value1 = $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
1696
+ var value2 = $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
1697
+
1698
+ if (value1 !== undefined && value2 !== undefined) {
1699
+ arr1.push(order * value1);
1700
+ arr2.push(order * value2);
1701
+ continue;
1702
+ }
1703
+
1704
+ if (aa === undefined || aa === null) aa = '';
1705
+ if (bb === undefined || bb === null) bb = '';
1706
+
1707
+ if ($__default['default'].isNumeric(aa) && $__default['default'].isNumeric(bb)) {
1708
+ aa = parseFloat(aa);
1709
+ bb = parseFloat(bb);
1710
+ } else {
1711
+ aa = aa.toString();
1712
+ bb = bb.toString();
1713
+
1714
+ if (that.options.multiSortStrictSort) {
1715
+ aa = aa.toLowerCase();
1716
+ bb = bb.toLowerCase();
1717
+ }
1718
+ }
1719
+
1720
+ arr1.push(order * cmp(aa, bb));
1721
+ arr2.push(order * cmp(bb, aa));
1722
+ }
1723
+
1724
+ return cmp(arr1, arr2);
1725
+ };
1726
+
1727
+ this.enableCustomSort = true;
1728
+ this.data.sort(function (a, b) {
1729
+ return arrayCmp(a, b);
1730
+ });
1731
+ this.initBody();
1732
+ this.assignSortableArrows();
1733
+ this.trigger('multiple-sort');
1734
+ };
1735
+
1736
+ BootstrapTable.prototype.addLevel = function (index, sortPriority) {
1737
+ var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
1738
+ this.$sortModal.find('tbody').append($__default['default']('<tr>').append($__default['default']('<td>').text(text)).append($__default['default']('<td>').append($__default['default'](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($__default['default']('<td>').append($__default['default'](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
1739
+ var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
1740
+ var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
1741
+ $__default['default'].each(this.columns, function (i, column) {
1742
+ if (column.sortable === false || column.visible === false) {
1743
+ return true;
1744
+ }
1745
+
1746
+ $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
1747
+ });
1748
+ $__default['default'].each(this.options.formatSortOrders(), function (value, order) {
1749
+ $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
1750
+ });
1751
+
1752
+ if (sortPriority !== undefined) {
1753
+ $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
1754
+ $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
1755
+ }
1756
+ };
1757
+
1758
+ BootstrapTable.prototype.assignSortableArrows = function () {
1759
+ var that = this;
1760
+ var headers = that.$header.find('th');
1761
+
1762
+ for (var i = 0; i < headers.length; i++) {
1763
+ for (var c = 0; c < that.options.sortPriority.length; c++) {
1764
+ if ($__default['default'](headers[i]).data('field') === that.options.sortPriority[c].sortName) {
1765
+ $__default['default'](headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
1766
+ }
1767
+ }
1768
+ }
1769
+ };
1770
+
1771
+ BootstrapTable.prototype.setButtonStates = function () {
1772
+ var total = this.$sortModal.find('.multi-sort-name:first option').length;
1773
+ var current = this.$sortModal.find('tbody tr').length;
1774
+
1775
+ if (current === total) {
1776
+ this.$sortModal.find('#add').attr('disabled', 'disabled');
1777
+ }
1778
+
1779
+ if (current > 1) {
1780
+ this.$sortModal.find('#delete').removeAttr('disabled');
1781
+ }
1782
+
1783
+ if (current < total) {
1784
+ this.$sortModal.find('#add').removeAttr('disabled');
1785
+ }
1786
+
1787
+ if (current === 1) {
1788
+ this.$sortModal.find('#delete').attr('disabled', 'disabled');
1789
+ }
1790
+ };
1791
+
1792
+ BootstrapTable.prototype.multiSort = function (sortPriority) {
1793
+ var _this2 = this;
1794
+
1795
+ this.options.sortPriority = sortPriority;
1796
+ this.options.sortName = undefined;
1797
+
1798
+ if (this.options.sidePagination === 'server') {
1799
+ var queryParams = this.options.queryParams;
1800
+
1801
+ this.options.queryParams = function (params) {
1802
+ params.multiSort = _this2.options.sortPriority;
1803
+ return $__default['default'].fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
1804
+ };
1805
+
1806
+ isSingleSort = false;
1807
+ this.initServer(this.options.silentSort);
1808
+ return;
1809
+ }
1810
+
1811
+ this.onMultipleSort();
1812
+ };
1764
1813
 
1765
1814
  })));