bootstrap-table-rails 1.19.0 → 1.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/bootstrap-table-rails.gemspec +2 -2
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/.DS_Store +0 -0
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +946 -358
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +858 -403
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +859 -404
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +7 -6
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +2900 -2041
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +1066 -465
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +585 -268
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1443 -949
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +594 -278
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +595 -277
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +511 -207
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +921 -542
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +912 -478
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +9 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +2798 -1187
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +1352 -754
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +610 -296
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +902 -435
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +16 -8
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +697 -375
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +623 -274
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +847 -403
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +575 -260
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +578 -267
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +800 -324
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +615 -281
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +555 -222
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +511 -207
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +582 -267
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +916 -556
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +566 -256
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +505 -209
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +517 -221
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +500 -203
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hi-IN.js +1102 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +522 -225
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-lb-LU.js +1102 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +536 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +536 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +497 -201
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +596 -278
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +592 -258
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +596 -262
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +594 -275
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +6 -5
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +590 -256
- metadata +9 -8
- data/vendor/assets/javascripts/bootstrap-table/.DS_Store +0 -0
data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
3
3
|
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
|
5
|
-
}(this, (function ($) { 'use strict';
|
5
|
+
})(this, (function ($) { 'use strict';
|
6
6
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
8
|
|
@@ -27,6 +27,9 @@
|
|
27
27
|
function _createClass(Constructor, protoProps, staticProps) {
|
28
28
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
29
29
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
30
|
+
Object.defineProperty(Constructor, "prototype", {
|
31
|
+
writable: false
|
32
|
+
});
|
30
33
|
return Constructor;
|
31
34
|
}
|
32
35
|
|
@@ -42,6 +45,9 @@
|
|
42
45
|
configurable: true
|
43
46
|
}
|
44
47
|
});
|
48
|
+
Object.defineProperty(subClass, "prototype", {
|
49
|
+
writable: false
|
50
|
+
});
|
45
51
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
46
52
|
}
|
47
53
|
|
@@ -85,6 +91,8 @@
|
|
85
91
|
function _possibleConstructorReturn(self, call) {
|
86
92
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
87
93
|
return call;
|
94
|
+
} else if (call !== void 0) {
|
95
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
88
96
|
}
|
89
97
|
|
90
98
|
return _assertThisInitialized(self);
|
@@ -118,7 +126,7 @@
|
|
118
126
|
return object;
|
119
127
|
}
|
120
128
|
|
121
|
-
function _get(
|
129
|
+
function _get() {
|
122
130
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
123
131
|
_get = Reflect.get;
|
124
132
|
} else {
|
@@ -129,14 +137,14 @@
|
|
129
137
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
130
138
|
|
131
139
|
if (desc.get) {
|
132
|
-
return desc.get.call(receiver);
|
140
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
133
141
|
}
|
134
142
|
|
135
143
|
return desc.value;
|
136
144
|
};
|
137
145
|
}
|
138
146
|
|
139
|
-
return _get(
|
147
|
+
return _get.apply(this, arguments);
|
140
148
|
}
|
141
149
|
|
142
150
|
function _slicedToArray(arr, i) {
|
@@ -156,18 +164,21 @@
|
|
156
164
|
}
|
157
165
|
|
158
166
|
function _iterableToArray(iter) {
|
159
|
-
if (typeof Symbol !== "undefined" && Symbol.iterator
|
167
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
160
168
|
}
|
161
169
|
|
162
170
|
function _iterableToArrayLimit(arr, i) {
|
163
|
-
|
171
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
172
|
+
|
173
|
+
if (_i == null) return;
|
164
174
|
var _arr = [];
|
165
175
|
var _n = true;
|
166
176
|
var _d = false;
|
167
|
-
|
177
|
+
|
178
|
+
var _s, _e;
|
168
179
|
|
169
180
|
try {
|
170
|
-
for (
|
181
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
171
182
|
_arr.push(_s.value);
|
172
183
|
|
173
184
|
if (i && _arr.length === i) break;
|
@@ -212,9 +223,9 @@
|
|
212
223
|
}
|
213
224
|
|
214
225
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
215
|
-
var it;
|
226
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
216
227
|
|
217
|
-
if (
|
228
|
+
if (!it) {
|
218
229
|
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
219
230
|
if (it) o = it;
|
220
231
|
var i = 0;
|
@@ -247,7 +258,7 @@
|
|
247
258
|
err;
|
248
259
|
return {
|
249
260
|
s: function () {
|
250
|
-
it =
|
261
|
+
it = it.call(o);
|
251
262
|
},
|
252
263
|
n: function () {
|
253
264
|
var step = it.next();
|
@@ -280,7 +291,7 @@
|
|
280
291
|
|
281
292
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
282
293
|
var global_1 =
|
283
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
294
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
284
295
|
check(typeof globalThis == 'object' && globalThis) ||
|
285
296
|
check(typeof window == 'object' && window) ||
|
286
297
|
// eslint-disable-next-line no-restricted-globals -- safe
|
@@ -299,26 +310,39 @@
|
|
299
310
|
|
300
311
|
// Detect IE8's incomplete defineProperty implementation
|
301
312
|
var descriptors = !fails(function () {
|
302
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
313
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
303
314
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
304
315
|
});
|
305
316
|
|
306
|
-
var
|
307
|
-
|
317
|
+
var functionBindNative = !fails(function () {
|
318
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
319
|
+
var test = (function () { /* empty */ }).bind();
|
320
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
321
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
322
|
+
});
|
323
|
+
|
324
|
+
var call$1 = Function.prototype.call;
|
325
|
+
|
326
|
+
var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
|
327
|
+
return call$1.apply(call$1, arguments);
|
328
|
+
};
|
329
|
+
|
330
|
+
var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
|
331
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
308
332
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
309
333
|
|
310
334
|
// Nashorn ~ JDK8 bug
|
311
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
335
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
|
312
336
|
|
313
337
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
314
338
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
315
|
-
var f$
|
339
|
+
var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
316
340
|
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
317
341
|
return !!descriptor && descriptor.enumerable;
|
318
|
-
} : $propertyIsEnumerable;
|
342
|
+
} : $propertyIsEnumerable$1;
|
319
343
|
|
320
344
|
var objectPropertyIsEnumerable = {
|
321
|
-
f: f$
|
345
|
+
f: f$5
|
322
346
|
};
|
323
347
|
|
324
348
|
var createPropertyDescriptor = function (bitmap, value) {
|
@@ -330,27 +354,44 @@
|
|
330
354
|
};
|
331
355
|
};
|
332
356
|
|
333
|
-
var
|
357
|
+
var FunctionPrototype$1 = Function.prototype;
|
358
|
+
var bind$1 = FunctionPrototype$1.bind;
|
359
|
+
var call = FunctionPrototype$1.call;
|
360
|
+
var uncurryThis = functionBindNative && bind$1.bind(call, call);
|
361
|
+
|
362
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
363
|
+
return fn && uncurryThis(fn);
|
364
|
+
} : function (fn) {
|
365
|
+
return fn && function () {
|
366
|
+
return call.apply(fn, arguments);
|
367
|
+
};
|
368
|
+
};
|
369
|
+
|
370
|
+
var toString$1 = functionUncurryThis({}.toString);
|
371
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
334
372
|
|
335
373
|
var classofRaw = function (it) {
|
336
|
-
return toString
|
374
|
+
return stringSlice$1(toString$1(it), 8, -1);
|
337
375
|
};
|
338
376
|
|
339
|
-
var
|
377
|
+
var Object$4 = global_1.Object;
|
378
|
+
var split = functionUncurryThis(''.split);
|
340
379
|
|
341
380
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
342
381
|
var indexedObject = fails(function () {
|
343
382
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
344
383
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
345
|
-
return !Object('z').propertyIsEnumerable(0);
|
384
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
346
385
|
}) ? function (it) {
|
347
|
-
return classofRaw(it) == 'String' ? split
|
348
|
-
} : Object;
|
386
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
387
|
+
} : Object$4;
|
388
|
+
|
389
|
+
var TypeError$a = global_1.TypeError;
|
349
390
|
|
350
391
|
// `RequireObjectCoercible` abstract operation
|
351
392
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
352
393
|
var requireObjectCoercible = function (it) {
|
353
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
394
|
+
if (it == undefined) throw TypeError$a("Can't call method on " + it);
|
354
395
|
return it;
|
355
396
|
};
|
356
397
|
|
@@ -362,88 +403,310 @@
|
|
362
403
|
return indexedObject(requireObjectCoercible(it));
|
363
404
|
};
|
364
405
|
|
406
|
+
// `IsCallable` abstract operation
|
407
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
408
|
+
var isCallable = function (argument) {
|
409
|
+
return typeof argument == 'function';
|
410
|
+
};
|
411
|
+
|
365
412
|
var isObject = function (it) {
|
366
|
-
return typeof it
|
413
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
367
414
|
};
|
368
415
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
var
|
374
|
-
|
416
|
+
var aFunction = function (argument) {
|
417
|
+
return isCallable(argument) ? argument : undefined;
|
418
|
+
};
|
419
|
+
|
420
|
+
var getBuiltIn = function (namespace, method) {
|
421
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
422
|
+
};
|
423
|
+
|
424
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
425
|
+
|
426
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
427
|
+
|
428
|
+
var process = global_1.process;
|
429
|
+
var Deno = global_1.Deno;
|
430
|
+
var versions = process && process.versions || Deno && Deno.version;
|
431
|
+
var v8 = versions && versions.v8;
|
432
|
+
var match, version;
|
433
|
+
|
434
|
+
if (v8) {
|
435
|
+
match = v8.split('.');
|
436
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
437
|
+
// but their correct versions are not interesting for us
|
438
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
439
|
+
}
|
440
|
+
|
441
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
442
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
443
|
+
if (!version && engineUserAgent) {
|
444
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
445
|
+
if (!match || match[1] >= 74) {
|
446
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
447
|
+
if (match) version = +match[1];
|
448
|
+
}
|
449
|
+
}
|
450
|
+
|
451
|
+
var engineV8Version = version;
|
452
|
+
|
453
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
458
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
459
|
+
var symbol = Symbol();
|
460
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
461
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
462
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
463
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
464
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
465
|
+
});
|
466
|
+
|
467
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
468
|
+
|
469
|
+
|
470
|
+
var useSymbolAsUid = nativeSymbol
|
471
|
+
&& !Symbol.sham
|
472
|
+
&& typeof Symbol.iterator == 'symbol';
|
473
|
+
|
474
|
+
var Object$3 = global_1.Object;
|
475
|
+
|
476
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
477
|
+
return typeof it == 'symbol';
|
478
|
+
} : function (it) {
|
479
|
+
var $Symbol = getBuiltIn('Symbol');
|
480
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
481
|
+
};
|
482
|
+
|
483
|
+
var String$3 = global_1.String;
|
484
|
+
|
485
|
+
var tryToString = function (argument) {
|
486
|
+
try {
|
487
|
+
return String$3(argument);
|
488
|
+
} catch (error) {
|
489
|
+
return 'Object';
|
490
|
+
}
|
491
|
+
};
|
492
|
+
|
493
|
+
var TypeError$9 = global_1.TypeError;
|
494
|
+
|
495
|
+
// `Assert: IsCallable(argument) is true`
|
496
|
+
var aCallable = function (argument) {
|
497
|
+
if (isCallable(argument)) return argument;
|
498
|
+
throw TypeError$9(tryToString(argument) + ' is not a function');
|
499
|
+
};
|
500
|
+
|
501
|
+
// `GetMethod` abstract operation
|
502
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
503
|
+
var getMethod = function (V, P) {
|
504
|
+
var func = V[P];
|
505
|
+
return func == null ? undefined : aCallable(func);
|
506
|
+
};
|
507
|
+
|
508
|
+
var TypeError$8 = global_1.TypeError;
|
509
|
+
|
510
|
+
// `OrdinaryToPrimitive` abstract operation
|
511
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
512
|
+
var ordinaryToPrimitive = function (input, pref) {
|
375
513
|
var fn, val;
|
376
|
-
if (
|
377
|
-
if (
|
378
|
-
if (
|
379
|
-
throw TypeError("Can't convert object to primitive value");
|
514
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
515
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
516
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
517
|
+
throw TypeError$8("Can't convert object to primitive value");
|
518
|
+
};
|
519
|
+
|
520
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
521
|
+
var defineProperty$1 = Object.defineProperty;
|
522
|
+
|
523
|
+
var setGlobal = function (key, value) {
|
524
|
+
try {
|
525
|
+
defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
|
526
|
+
} catch (error) {
|
527
|
+
global_1[key] = value;
|
528
|
+
} return value;
|
529
|
+
};
|
530
|
+
|
531
|
+
var SHARED = '__core-js_shared__';
|
532
|
+
var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
|
533
|
+
|
534
|
+
var sharedStore = store$1;
|
535
|
+
|
536
|
+
var shared = createCommonjsModule(function (module) {
|
537
|
+
(module.exports = function (key, value) {
|
538
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
539
|
+
})('versions', []).push({
|
540
|
+
version: '3.22.4',
|
541
|
+
mode: 'global',
|
542
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
543
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
|
544
|
+
source: 'https://github.com/zloirock/core-js'
|
545
|
+
});
|
546
|
+
});
|
547
|
+
|
548
|
+
var Object$2 = global_1.Object;
|
549
|
+
|
550
|
+
// `ToObject` abstract operation
|
551
|
+
// https://tc39.es/ecma262/#sec-toobject
|
552
|
+
var toObject = function (argument) {
|
553
|
+
return Object$2(requireObjectCoercible(argument));
|
554
|
+
};
|
555
|
+
|
556
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
557
|
+
|
558
|
+
// `HasOwnProperty` abstract operation
|
559
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
560
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
561
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
562
|
+
return hasOwnProperty(toObject(it), key);
|
563
|
+
};
|
564
|
+
|
565
|
+
var id = 0;
|
566
|
+
var postfix = Math.random();
|
567
|
+
var toString = functionUncurryThis(1.0.toString);
|
568
|
+
|
569
|
+
var uid = function (key) {
|
570
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
571
|
+
};
|
572
|
+
|
573
|
+
var WellKnownSymbolsStore = shared('wks');
|
574
|
+
var Symbol$1 = global_1.Symbol;
|
575
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
576
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
577
|
+
|
578
|
+
var wellKnownSymbol = function (name) {
|
579
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
580
|
+
var description = 'Symbol.' + name;
|
581
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
582
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
583
|
+
} else if (useSymbolAsUid && symbolFor) {
|
584
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
585
|
+
} else {
|
586
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
587
|
+
}
|
588
|
+
} return WellKnownSymbolsStore[name];
|
380
589
|
};
|
381
590
|
|
382
|
-
var
|
591
|
+
var TypeError$7 = global_1.TypeError;
|
592
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
593
|
+
|
594
|
+
// `ToPrimitive` abstract operation
|
595
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
596
|
+
var toPrimitive = function (input, pref) {
|
597
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
598
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
599
|
+
var result;
|
600
|
+
if (exoticToPrim) {
|
601
|
+
if (pref === undefined) pref = 'default';
|
602
|
+
result = functionCall(exoticToPrim, input, pref);
|
603
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
604
|
+
throw TypeError$7("Can't convert object to primitive value");
|
605
|
+
}
|
606
|
+
if (pref === undefined) pref = 'number';
|
607
|
+
return ordinaryToPrimitive(input, pref);
|
608
|
+
};
|
383
609
|
|
384
|
-
|
385
|
-
|
610
|
+
// `ToPropertyKey` abstract operation
|
611
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
612
|
+
var toPropertyKey = function (argument) {
|
613
|
+
var key = toPrimitive(argument, 'string');
|
614
|
+
return isSymbol(key) ? key : key + '';
|
386
615
|
};
|
387
616
|
|
388
617
|
var document$1 = global_1.document;
|
389
618
|
// typeof document.createElement is 'object' in old IE
|
390
|
-
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
619
|
+
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
|
391
620
|
|
392
621
|
var documentCreateElement = function (it) {
|
393
|
-
return EXISTS ? document$1.createElement(it) : {};
|
622
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
394
623
|
};
|
395
624
|
|
396
|
-
//
|
625
|
+
// Thanks to IE8 for its funny defineProperty
|
397
626
|
var ie8DomDefine = !descriptors && !fails(function () {
|
398
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
627
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
399
628
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
400
629
|
get: function () { return 7; }
|
401
630
|
}).a != 7;
|
402
631
|
});
|
403
632
|
|
404
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
405
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
633
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
634
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
406
635
|
|
407
636
|
// `Object.getOwnPropertyDescriptor` method
|
408
637
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
409
|
-
var f$
|
638
|
+
var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
410
639
|
O = toIndexedObject(O);
|
411
|
-
P =
|
640
|
+
P = toPropertyKey(P);
|
412
641
|
if (ie8DomDefine) try {
|
413
|
-
return $getOwnPropertyDescriptor(O, P);
|
642
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
414
643
|
} catch (error) { /* empty */ }
|
415
|
-
if (
|
644
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
416
645
|
};
|
417
646
|
|
418
647
|
var objectGetOwnPropertyDescriptor = {
|
419
|
-
f: f$
|
648
|
+
f: f$4
|
420
649
|
};
|
421
650
|
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
651
|
+
// V8 ~ Chrome 36-
|
652
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
653
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
654
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
655
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
656
|
+
value: 42,
|
657
|
+
writable: false
|
658
|
+
}).prototype != 42;
|
659
|
+
});
|
660
|
+
|
661
|
+
var String$2 = global_1.String;
|
662
|
+
var TypeError$6 = global_1.TypeError;
|
663
|
+
|
664
|
+
// `Assert: Type(argument) is Object`
|
665
|
+
var anObject = function (argument) {
|
666
|
+
if (isObject(argument)) return argument;
|
667
|
+
throw TypeError$6(String$2(argument) + ' is not an object');
|
426
668
|
};
|
427
669
|
|
428
|
-
|
670
|
+
var TypeError$5 = global_1.TypeError;
|
671
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
429
672
|
var $defineProperty = Object.defineProperty;
|
673
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
674
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
675
|
+
var ENUMERABLE = 'enumerable';
|
676
|
+
var CONFIGURABLE$1 = 'configurable';
|
677
|
+
var WRITABLE = 'writable';
|
430
678
|
|
431
679
|
// `Object.defineProperty` method
|
432
680
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
433
|
-
var f$
|
681
|
+
var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
682
|
+
anObject(O);
|
683
|
+
P = toPropertyKey(P);
|
684
|
+
anObject(Attributes);
|
685
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
686
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
687
|
+
if (current && current[WRITABLE]) {
|
688
|
+
O[P] = Attributes.value;
|
689
|
+
Attributes = {
|
690
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
691
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
692
|
+
writable: false
|
693
|
+
};
|
694
|
+
}
|
695
|
+
} return $defineProperty(O, P, Attributes);
|
696
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
434
697
|
anObject(O);
|
435
|
-
P =
|
698
|
+
P = toPropertyKey(P);
|
436
699
|
anObject(Attributes);
|
437
700
|
if (ie8DomDefine) try {
|
438
701
|
return $defineProperty(O, P, Attributes);
|
439
702
|
} catch (error) { /* empty */ }
|
440
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
703
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
|
441
704
|
if ('value' in Attributes) O[P] = Attributes.value;
|
442
705
|
return O;
|
443
706
|
};
|
444
707
|
|
445
708
|
var objectDefineProperty = {
|
446
|
-
f: f$
|
709
|
+
f: f$3
|
447
710
|
};
|
448
711
|
|
449
712
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
@@ -453,25 +716,27 @@
|
|
453
716
|
return object;
|
454
717
|
};
|
455
718
|
|
456
|
-
var
|
457
|
-
|
458
|
-
|
459
|
-
} catch (error) {
|
460
|
-
global_1[key] = value;
|
461
|
-
} return value;
|
462
|
-
};
|
719
|
+
var FunctionPrototype = Function.prototype;
|
720
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
721
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
463
722
|
|
464
|
-
var
|
465
|
-
|
723
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
|
724
|
+
// additional protection from minified / mangled / dropped function names
|
725
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
726
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
|
466
727
|
|
467
|
-
var
|
728
|
+
var functionName = {
|
729
|
+
EXISTS: EXISTS,
|
730
|
+
PROPER: PROPER,
|
731
|
+
CONFIGURABLE: CONFIGURABLE
|
732
|
+
};
|
468
733
|
|
469
|
-
var functionToString = Function.toString;
|
734
|
+
var functionToString = functionUncurryThis(Function.toString);
|
470
735
|
|
471
|
-
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
472
|
-
if (
|
736
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
737
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
473
738
|
sharedStore.inspectSource = function (it) {
|
474
|
-
return functionToString
|
739
|
+
return functionToString(it);
|
475
740
|
};
|
476
741
|
}
|
477
742
|
|
@@ -479,24 +744,7 @@
|
|
479
744
|
|
480
745
|
var WeakMap$1 = global_1.WeakMap;
|
481
746
|
|
482
|
-
var nativeWeakMap =
|
483
|
-
|
484
|
-
var shared = createCommonjsModule(function (module) {
|
485
|
-
(module.exports = function (key, value) {
|
486
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
487
|
-
})('versions', []).push({
|
488
|
-
version: '3.10.1',
|
489
|
-
mode: 'global',
|
490
|
-
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
491
|
-
});
|
492
|
-
});
|
493
|
-
|
494
|
-
var id = 0;
|
495
|
-
var postfix = Math.random();
|
496
|
-
|
497
|
-
var uid = function (key) {
|
498
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
499
|
-
};
|
747
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
500
748
|
|
501
749
|
var keys = shared('keys');
|
502
750
|
|
@@ -506,6 +754,8 @@
|
|
506
754
|
|
507
755
|
var hiddenKeys$1 = {};
|
508
756
|
|
757
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
758
|
+
var TypeError$4 = global_1.TypeError;
|
509
759
|
var WeakMap = global_1.WeakMap;
|
510
760
|
var set, get, has;
|
511
761
|
|
@@ -517,40 +767,42 @@
|
|
517
767
|
return function (it) {
|
518
768
|
var state;
|
519
769
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
520
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
770
|
+
throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
|
521
771
|
} return state;
|
522
772
|
};
|
523
773
|
};
|
524
774
|
|
525
|
-
if (nativeWeakMap) {
|
775
|
+
if (nativeWeakMap || sharedStore.state) {
|
526
776
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
527
|
-
var wmget = store.get;
|
528
|
-
var wmhas = store.has;
|
529
|
-
var wmset = store.set;
|
777
|
+
var wmget = functionUncurryThis(store.get);
|
778
|
+
var wmhas = functionUncurryThis(store.has);
|
779
|
+
var wmset = functionUncurryThis(store.set);
|
530
780
|
set = function (it, metadata) {
|
781
|
+
if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
531
782
|
metadata.facade = it;
|
532
|
-
wmset
|
783
|
+
wmset(store, it, metadata);
|
533
784
|
return metadata;
|
534
785
|
};
|
535
786
|
get = function (it) {
|
536
|
-
return wmget
|
787
|
+
return wmget(store, it) || {};
|
537
788
|
};
|
538
789
|
has = function (it) {
|
539
|
-
return wmhas
|
790
|
+
return wmhas(store, it);
|
540
791
|
};
|
541
792
|
} else {
|
542
793
|
var STATE = sharedKey('state');
|
543
794
|
hiddenKeys$1[STATE] = true;
|
544
795
|
set = function (it, metadata) {
|
796
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
|
545
797
|
metadata.facade = it;
|
546
798
|
createNonEnumerableProperty(it, STATE, metadata);
|
547
799
|
return metadata;
|
548
800
|
};
|
549
801
|
get = function (it) {
|
550
|
-
return
|
802
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
551
803
|
};
|
552
804
|
has = function (it) {
|
553
|
-
return
|
805
|
+
return hasOwnProperty_1(it, STATE);
|
554
806
|
};
|
555
807
|
}
|
556
808
|
|
@@ -562,29 +814,56 @@
|
|
562
814
|
getterFor: getterFor
|
563
815
|
};
|
564
816
|
|
565
|
-
var
|
566
|
-
var
|
817
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
818
|
+
var defineProperty = objectDefineProperty.f;
|
819
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
820
|
+
|
821
|
+
|
822
|
+
|
567
823
|
var enforceInternalState = internalState.enforce;
|
824
|
+
var getInternalState = internalState.get;
|
825
|
+
|
826
|
+
var CONFIGURABLE_LENGTH = !fails(function () {
|
827
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
828
|
+
});
|
829
|
+
|
568
830
|
var TEMPLATE = String(String).split('String');
|
569
831
|
|
570
|
-
|
832
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
833
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
834
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
835
|
+
}
|
836
|
+
if (options && options.getter) name = 'get ' + name;
|
837
|
+
if (options && options.setter) name = 'set ' + name;
|
838
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
839
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
840
|
+
}
|
841
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
842
|
+
defineProperty(value, 'length', { value: options.arity });
|
843
|
+
}
|
844
|
+
var state = enforceInternalState(value);
|
845
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
846
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
847
|
+
} return value;
|
848
|
+
};
|
849
|
+
|
850
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
851
|
+
// eslint-disable-next-line no-extend-native -- required
|
852
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
853
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
854
|
+
}, 'toString');
|
855
|
+
});
|
856
|
+
|
857
|
+
var defineBuiltIn = function (O, key, value, options) {
|
571
858
|
var unsafe = options ? !!options.unsafe : false;
|
572
859
|
var simple = options ? !!options.enumerable : false;
|
573
860
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
574
|
-
var
|
575
|
-
if (
|
576
|
-
if (typeof key == 'string' && !has$1(value, 'name')) {
|
577
|
-
createNonEnumerableProperty(value, 'name', key);
|
578
|
-
}
|
579
|
-
state = enforceInternalState(value);
|
580
|
-
if (!state.source) {
|
581
|
-
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
582
|
-
}
|
583
|
-
}
|
861
|
+
var name = options && options.name !== undefined ? options.name : key;
|
862
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
584
863
|
if (O === global_1) {
|
585
864
|
if (simple) O[key] = value;
|
586
865
|
else setGlobal(key, value);
|
587
|
-
return;
|
866
|
+
return O;
|
588
867
|
} else if (!unsafe) {
|
589
868
|
delete O[key];
|
590
869
|
} else if (!noTargetGet && O[key]) {
|
@@ -592,56 +871,50 @@
|
|
592
871
|
}
|
593
872
|
if (simple) O[key] = value;
|
594
873
|
else createNonEnumerableProperty(O, key, value);
|
595
|
-
|
596
|
-
})(Function.prototype, 'toString', function toString() {
|
597
|
-
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
598
|
-
});
|
599
|
-
});
|
600
|
-
|
601
|
-
var path = global_1;
|
602
|
-
|
603
|
-
var aFunction$1 = function (variable) {
|
604
|
-
return typeof variable == 'function' ? variable : undefined;
|
605
|
-
};
|
606
|
-
|
607
|
-
var getBuiltIn = function (namespace, method) {
|
608
|
-
return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
|
609
|
-
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
874
|
+
return O;
|
610
875
|
};
|
611
876
|
|
612
877
|
var ceil = Math.ceil;
|
613
878
|
var floor = Math.floor;
|
614
879
|
|
615
|
-
// `
|
616
|
-
// https://tc39.es/ecma262/#sec-
|
617
|
-
var
|
618
|
-
|
880
|
+
// `ToIntegerOrInfinity` abstract operation
|
881
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
882
|
+
var toIntegerOrInfinity = function (argument) {
|
883
|
+
var number = +argument;
|
884
|
+
// eslint-disable-next-line no-self-compare -- safe
|
885
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
619
886
|
};
|
620
887
|
|
888
|
+
var max = Math.max;
|
621
889
|
var min$1 = Math.min;
|
622
890
|
|
891
|
+
// Helper for a popular repeating case of the spec:
|
892
|
+
// Let integer be ? ToInteger(index).
|
893
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
894
|
+
var toAbsoluteIndex = function (index, length) {
|
895
|
+
var integer = toIntegerOrInfinity(index);
|
896
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
897
|
+
};
|
898
|
+
|
899
|
+
var min = Math.min;
|
900
|
+
|
623
901
|
// `ToLength` abstract operation
|
624
902
|
// https://tc39.es/ecma262/#sec-tolength
|
625
903
|
var toLength = function (argument) {
|
626
|
-
return argument > 0 ? min
|
904
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
627
905
|
};
|
628
906
|
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
// Let integer be ? ToInteger(index).
|
634
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
635
|
-
var toAbsoluteIndex = function (index, length) {
|
636
|
-
var integer = toInteger(index);
|
637
|
-
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
907
|
+
// `LengthOfArrayLike` abstract operation
|
908
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
909
|
+
var lengthOfArrayLike = function (obj) {
|
910
|
+
return toLength(obj.length);
|
638
911
|
};
|
639
912
|
|
640
913
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
641
914
|
var createMethod$3 = function (IS_INCLUDES) {
|
642
915
|
return function ($this, el, fromIndex) {
|
643
916
|
var O = toIndexedObject($this);
|
644
|
-
var length =
|
917
|
+
var length = lengthOfArrayLike(O);
|
645
918
|
var index = toAbsoluteIndex(fromIndex, length);
|
646
919
|
var value;
|
647
920
|
// Array#includes uses SameValueZero equality algorithm
|
@@ -666,18 +939,20 @@
|
|
666
939
|
indexOf: createMethod$3(false)
|
667
940
|
};
|
668
941
|
|
669
|
-
var indexOf = arrayIncludes.indexOf;
|
942
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
670
943
|
|
671
944
|
|
945
|
+
var push$2 = functionUncurryThis([].push);
|
946
|
+
|
672
947
|
var objectKeysInternal = function (object, names) {
|
673
948
|
var O = toIndexedObject(object);
|
674
949
|
var i = 0;
|
675
950
|
var result = [];
|
676
951
|
var key;
|
677
|
-
for (key in O) !
|
952
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
|
678
953
|
// Don't enum bug & hidden keys
|
679
|
-
while (names.length > i) if (
|
680
|
-
~indexOf(result, key) ||
|
954
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
955
|
+
~indexOf$1(result, key) || push$2(result, key);
|
681
956
|
}
|
682
957
|
return result;
|
683
958
|
};
|
@@ -697,36 +972,40 @@
|
|
697
972
|
|
698
973
|
// `Object.getOwnPropertyNames` method
|
699
974
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
700
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
701
|
-
var f$
|
975
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
976
|
+
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
702
977
|
return objectKeysInternal(O, hiddenKeys);
|
703
978
|
};
|
704
979
|
|
705
980
|
var objectGetOwnPropertyNames = {
|
706
|
-
f: f$
|
981
|
+
f: f$2
|
707
982
|
};
|
708
983
|
|
709
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
710
|
-
var f = Object.getOwnPropertySymbols;
|
984
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
985
|
+
var f$1 = Object.getOwnPropertySymbols;
|
711
986
|
|
712
987
|
var objectGetOwnPropertySymbols = {
|
713
|
-
f: f
|
988
|
+
f: f$1
|
714
989
|
};
|
715
990
|
|
991
|
+
var concat$1 = functionUncurryThis([].concat);
|
992
|
+
|
716
993
|
// all object keys, includes non-enumerable and symbols
|
717
994
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
718
995
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
719
996
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
720
|
-
return getOwnPropertySymbols ?
|
997
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
721
998
|
};
|
722
999
|
|
723
|
-
var copyConstructorProperties = function (target, source) {
|
1000
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
724
1001
|
var keys = ownKeys(source);
|
725
1002
|
var defineProperty = objectDefineProperty.f;
|
726
1003
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
727
1004
|
for (var i = 0; i < keys.length; i++) {
|
728
1005
|
var key = keys[i];
|
729
|
-
if (!
|
1006
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
1007
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
1008
|
+
}
|
730
1009
|
}
|
731
1010
|
};
|
732
1011
|
|
@@ -736,7 +1015,7 @@
|
|
736
1015
|
var value = data[normalize(feature)];
|
737
1016
|
return value == POLYFILL ? true
|
738
1017
|
: value == NATIVE ? false
|
739
|
-
:
|
1018
|
+
: isCallable(detection) ? fails(detection)
|
740
1019
|
: !!detection;
|
741
1020
|
};
|
742
1021
|
|
@@ -770,6 +1049,7 @@
|
|
770
1049
|
options.sham - add a flag to not completely full polyfills
|
771
1050
|
options.enumerable - export as enumerable property
|
772
1051
|
options.noTargetGet - prevent calling a getter on target
|
1052
|
+
options.name - the .name of the function if it does not match the key
|
773
1053
|
*/
|
774
1054
|
var _export = function (options, source) {
|
775
1055
|
var TARGET = options.target;
|
@@ -792,23 +1072,62 @@
|
|
792
1072
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
793
1073
|
// contained in target
|
794
1074
|
if (!FORCED && targetProperty !== undefined) {
|
795
|
-
if (typeof sourceProperty
|
1075
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
796
1076
|
copyConstructorProperties(sourceProperty, targetProperty);
|
797
1077
|
}
|
798
1078
|
// add a flag to not completely full polyfills
|
799
1079
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
800
1080
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
801
1081
|
}
|
802
|
-
|
803
|
-
redefine(target, key, sourceProperty, options);
|
1082
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
804
1083
|
}
|
805
1084
|
};
|
806
1085
|
|
1086
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1087
|
+
var test = {};
|
1088
|
+
|
1089
|
+
test[TO_STRING_TAG$1] = 'z';
|
1090
|
+
|
1091
|
+
var toStringTagSupport = String(test) === '[object z]';
|
1092
|
+
|
1093
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1094
|
+
var Object$1 = global_1.Object;
|
1095
|
+
|
1096
|
+
// ES3 wrong here
|
1097
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1098
|
+
|
1099
|
+
// fallback for IE11 Script Access Denied error
|
1100
|
+
var tryGet = function (it, key) {
|
1101
|
+
try {
|
1102
|
+
return it[key];
|
1103
|
+
} catch (error) { /* empty */ }
|
1104
|
+
};
|
1105
|
+
|
1106
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
1107
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1108
|
+
var O, tag, result;
|
1109
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1110
|
+
// @@toStringTag case
|
1111
|
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
1112
|
+
// builtinTag case
|
1113
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1114
|
+
// ES3 arguments fallback
|
1115
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
1116
|
+
};
|
1117
|
+
|
1118
|
+
var String$1 = global_1.String;
|
1119
|
+
|
1120
|
+
var toString_1 = function (argument) {
|
1121
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
1122
|
+
return String$1(argument);
|
1123
|
+
};
|
1124
|
+
|
807
1125
|
// `RegExp.prototype.flags` getter implementation
|
808
1126
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
809
1127
|
var regexpFlags = function () {
|
810
1128
|
var that = anObject(this);
|
811
1129
|
var result = '';
|
1130
|
+
if (that.hasIndices) result += 'd';
|
812
1131
|
if (that.global) result += 'g';
|
813
1132
|
if (that.ignoreCase) result += 'i';
|
814
1133
|
if (that.multiline) result += 'm';
|
@@ -818,71 +1137,229 @@
|
|
818
1137
|
return result;
|
819
1138
|
};
|
820
1139
|
|
821
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
822
|
-
|
823
|
-
function RE(s, f) {
|
824
|
-
return RegExp(s, f);
|
825
|
-
}
|
1140
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1141
|
+
var $RegExp$2 = global_1.RegExp;
|
826
1142
|
|
827
1143
|
var UNSUPPORTED_Y$1 = fails(function () {
|
828
|
-
|
829
|
-
var re = RE('a', 'y');
|
1144
|
+
var re = $RegExp$2('a', 'y');
|
830
1145
|
re.lastIndex = 2;
|
831
1146
|
return re.exec('abcd') != null;
|
832
1147
|
});
|
833
1148
|
|
834
|
-
|
1149
|
+
// UC Browser bug
|
1150
|
+
// https://github.com/zloirock/core-js/issues/1008
|
1151
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
|
1152
|
+
return !$RegExp$2('a', 'y').sticky;
|
1153
|
+
});
|
1154
|
+
|
1155
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
|
835
1156
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
836
|
-
var re =
|
1157
|
+
var re = $RegExp$2('^r', 'gy');
|
837
1158
|
re.lastIndex = 2;
|
838
1159
|
return re.exec('str') != null;
|
839
1160
|
});
|
840
1161
|
|
841
1162
|
var regexpStickyHelpers = {
|
842
|
-
|
843
|
-
|
1163
|
+
BROKEN_CARET: BROKEN_CARET,
|
1164
|
+
MISSED_STICKY: MISSED_STICKY,
|
1165
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
844
1166
|
};
|
845
1167
|
|
846
|
-
|
847
|
-
|
1168
|
+
// `Object.keys` method
|
1169
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
1170
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
1171
|
+
var objectKeys = Object.keys || function keys(O) {
|
1172
|
+
return objectKeysInternal(O, enumBugKeys);
|
1173
|
+
};
|
848
1174
|
|
849
|
-
|
1175
|
+
// `Object.defineProperties` method
|
1176
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1177
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
1178
|
+
var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
1179
|
+
anObject(O);
|
1180
|
+
var props = toIndexedObject(Properties);
|
1181
|
+
var keys = objectKeys(Properties);
|
1182
|
+
var length = keys.length;
|
1183
|
+
var index = 0;
|
1184
|
+
var key;
|
1185
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
1186
|
+
return O;
|
1187
|
+
};
|
850
1188
|
|
851
|
-
var
|
852
|
-
|
853
|
-
|
854
|
-
nativeExec.call(re1, 'a');
|
855
|
-
nativeExec.call(re2, 'a');
|
856
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
857
|
-
})();
|
1189
|
+
var objectDefineProperties = {
|
1190
|
+
f: f
|
1191
|
+
};
|
858
1192
|
|
859
|
-
var
|
1193
|
+
var html = getBuiltIn('document', 'documentElement');
|
1194
|
+
|
1195
|
+
/* global ActiveXObject -- old IE, WSH */
|
1196
|
+
|
1197
|
+
|
1198
|
+
|
1199
|
+
|
1200
|
+
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
var GT = '>';
|
1205
|
+
var LT = '<';
|
1206
|
+
var PROTOTYPE = 'prototype';
|
1207
|
+
var SCRIPT = 'script';
|
1208
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
1209
|
+
|
1210
|
+
var EmptyConstructor = function () { /* empty */ };
|
1211
|
+
|
1212
|
+
var scriptTag = function (content) {
|
1213
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
1214
|
+
};
|
1215
|
+
|
1216
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
1217
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
1218
|
+
activeXDocument.write(scriptTag(''));
|
1219
|
+
activeXDocument.close();
|
1220
|
+
var temp = activeXDocument.parentWindow.Object;
|
1221
|
+
activeXDocument = null; // avoid memory leak
|
1222
|
+
return temp;
|
1223
|
+
};
|
1224
|
+
|
1225
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
1226
|
+
var NullProtoObjectViaIFrame = function () {
|
1227
|
+
// Thrash, waste and sodomy: IE GC bug
|
1228
|
+
var iframe = documentCreateElement('iframe');
|
1229
|
+
var JS = 'java' + SCRIPT + ':';
|
1230
|
+
var iframeDocument;
|
1231
|
+
iframe.style.display = 'none';
|
1232
|
+
html.appendChild(iframe);
|
1233
|
+
// https://github.com/zloirock/core-js/issues/475
|
1234
|
+
iframe.src = String(JS);
|
1235
|
+
iframeDocument = iframe.contentWindow.document;
|
1236
|
+
iframeDocument.open();
|
1237
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
1238
|
+
iframeDocument.close();
|
1239
|
+
return iframeDocument.F;
|
1240
|
+
};
|
1241
|
+
|
1242
|
+
// Check for document.domain and active x support
|
1243
|
+
// No need to use active x approach when document.domain is not set
|
1244
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
1245
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
1246
|
+
// avoid IE GC bug
|
1247
|
+
var activeXDocument;
|
1248
|
+
var NullProtoObject = function () {
|
1249
|
+
try {
|
1250
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
1251
|
+
} catch (error) { /* ignore */ }
|
1252
|
+
NullProtoObject = typeof document != 'undefined'
|
1253
|
+
? document.domain && activeXDocument
|
1254
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
1255
|
+
: NullProtoObjectViaIFrame()
|
1256
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
1257
|
+
var length = enumBugKeys.length;
|
1258
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1259
|
+
return NullProtoObject();
|
1260
|
+
};
|
1261
|
+
|
1262
|
+
hiddenKeys$1[IE_PROTO] = true;
|
1263
|
+
|
1264
|
+
// `Object.create` method
|
1265
|
+
// https://tc39.es/ecma262/#sec-object.create
|
1266
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
1267
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
1268
|
+
var result;
|
1269
|
+
if (O !== null) {
|
1270
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
1271
|
+
result = new EmptyConstructor();
|
1272
|
+
EmptyConstructor[PROTOTYPE] = null;
|
1273
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
1274
|
+
result[IE_PROTO] = O;
|
1275
|
+
} else result = NullProtoObject();
|
1276
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
1277
|
+
};
|
1278
|
+
|
1279
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
1280
|
+
var $RegExp$1 = global_1.RegExp;
|
1281
|
+
|
1282
|
+
var regexpUnsupportedDotAll = fails(function () {
|
1283
|
+
var re = $RegExp$1('.', 's');
|
1284
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
1285
|
+
});
|
1286
|
+
|
1287
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
1288
|
+
var $RegExp = global_1.RegExp;
|
1289
|
+
|
1290
|
+
var regexpUnsupportedNcg = fails(function () {
|
1291
|
+
var re = $RegExp('(?<a>b)', 'g');
|
1292
|
+
return re.exec('b').groups.a !== 'b' ||
|
1293
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
1294
|
+
});
|
1295
|
+
|
1296
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
1297
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
1298
|
+
|
1299
|
+
|
1300
|
+
|
1301
|
+
|
1302
|
+
|
1303
|
+
|
1304
|
+
|
1305
|
+
var getInternalState = internalState.get;
|
1306
|
+
|
1307
|
+
|
1308
|
+
|
1309
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
1310
|
+
var nativeExec = RegExp.prototype.exec;
|
1311
|
+
var patchedExec = nativeExec;
|
1312
|
+
var charAt = functionUncurryThis(''.charAt);
|
1313
|
+
var indexOf = functionUncurryThis(''.indexOf);
|
1314
|
+
var replace$1 = functionUncurryThis(''.replace);
|
1315
|
+
var stringSlice = functionUncurryThis(''.slice);
|
1316
|
+
|
1317
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
1318
|
+
var re1 = /a/;
|
1319
|
+
var re2 = /b*/g;
|
1320
|
+
functionCall(nativeExec, re1, 'a');
|
1321
|
+
functionCall(nativeExec, re2, 'a');
|
1322
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
1323
|
+
})();
|
1324
|
+
|
1325
|
+
var UNSUPPORTED_Y = regexpStickyHelpers.BROKEN_CARET;
|
860
1326
|
|
861
1327
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
862
|
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
863
1328
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
864
1329
|
|
865
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
|
1330
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexpUnsupportedDotAll || regexpUnsupportedNcg;
|
866
1331
|
|
867
1332
|
if (PATCH) {
|
868
|
-
patchedExec = function exec(
|
1333
|
+
patchedExec = function exec(string) {
|
869
1334
|
var re = this;
|
870
|
-
var
|
1335
|
+
var state = getInternalState(re);
|
1336
|
+
var str = toString_1(string);
|
1337
|
+
var raw = state.raw;
|
1338
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
1339
|
+
|
1340
|
+
if (raw) {
|
1341
|
+
raw.lastIndex = re.lastIndex;
|
1342
|
+
result = functionCall(patchedExec, raw, str);
|
1343
|
+
re.lastIndex = raw.lastIndex;
|
1344
|
+
return result;
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
var groups = state.groups;
|
871
1348
|
var sticky = UNSUPPORTED_Y && re.sticky;
|
872
|
-
var flags = regexpFlags
|
1349
|
+
var flags = functionCall(regexpFlags, re);
|
873
1350
|
var source = re.source;
|
874
1351
|
var charsAdded = 0;
|
875
1352
|
var strCopy = str;
|
876
1353
|
|
877
1354
|
if (sticky) {
|
878
|
-
flags =
|
879
|
-
if (
|
1355
|
+
flags = replace$1(flags, 'y', '');
|
1356
|
+
if (indexOf(flags, 'g') === -1) {
|
880
1357
|
flags += 'g';
|
881
1358
|
}
|
882
1359
|
|
883
|
-
strCopy =
|
1360
|
+
strCopy = stringSlice(str, re.lastIndex);
|
884
1361
|
// Support anchored sticky behavior.
|
885
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str
|
1362
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
886
1363
|
source = '(?: ' + source + ')';
|
887
1364
|
strCopy = ' ' + strCopy;
|
888
1365
|
charsAdded++;
|
@@ -897,12 +1374,12 @@
|
|
897
1374
|
}
|
898
1375
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
899
1376
|
|
900
|
-
match = nativeExec
|
1377
|
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
901
1378
|
|
902
1379
|
if (sticky) {
|
903
1380
|
if (match) {
|
904
|
-
match.input = match.input
|
905
|
-
match[0] = match[0]
|
1381
|
+
match.input = stringSlice(match.input, charsAdded);
|
1382
|
+
match[0] = stringSlice(match[0], charsAdded);
|
906
1383
|
match.index = re.lastIndex;
|
907
1384
|
re.lastIndex += match[0].length;
|
908
1385
|
} else re.lastIndex = 0;
|
@@ -912,13 +1389,21 @@
|
|
912
1389
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
913
1390
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
914
1391
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
915
|
-
nativeReplace
|
1392
|
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
916
1393
|
for (i = 1; i < arguments.length - 2; i++) {
|
917
1394
|
if (arguments[i] === undefined) match[i] = undefined;
|
918
1395
|
}
|
919
1396
|
});
|
920
1397
|
}
|
921
1398
|
|
1399
|
+
if (match && groups) {
|
1400
|
+
match.groups = object = objectCreate(null);
|
1401
|
+
for (i = 0; i < groups.length; i++) {
|
1402
|
+
group = groups[i];
|
1403
|
+
object[group[0]] = match[group[1]];
|
1404
|
+
}
|
1405
|
+
}
|
1406
|
+
|
922
1407
|
return match;
|
923
1408
|
};
|
924
1409
|
}
|
@@ -931,58 +1416,6 @@
|
|
931
1416
|
exec: regexpExec
|
932
1417
|
});
|
933
1418
|
|
934
|
-
var engineIsNode = classofRaw(global_1.process) == 'process';
|
935
|
-
|
936
|
-
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
937
|
-
|
938
|
-
var process = global_1.process;
|
939
|
-
var versions = process && process.versions;
|
940
|
-
var v8 = versions && versions.v8;
|
941
|
-
var match, version;
|
942
|
-
|
943
|
-
if (v8) {
|
944
|
-
match = v8.split('.');
|
945
|
-
version = match[0] + match[1];
|
946
|
-
} else if (engineUserAgent) {
|
947
|
-
match = engineUserAgent.match(/Edge\/(\d+)/);
|
948
|
-
if (!match || match[1] >= 74) {
|
949
|
-
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
950
|
-
if (match) version = match[1];
|
951
|
-
}
|
952
|
-
}
|
953
|
-
|
954
|
-
var engineV8Version = version && +version;
|
955
|
-
|
956
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
957
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
958
|
-
// eslint-disable-next-line es/no-symbol -- required for testing
|
959
|
-
return !Symbol.sham &&
|
960
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
961
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
962
|
-
(engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
|
963
|
-
});
|
964
|
-
|
965
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
966
|
-
|
967
|
-
|
968
|
-
var useSymbolAsUid = nativeSymbol
|
969
|
-
&& !Symbol.sham
|
970
|
-
&& typeof Symbol.iterator == 'symbol';
|
971
|
-
|
972
|
-
var WellKnownSymbolsStore = shared('wks');
|
973
|
-
var Symbol$1 = global_1.Symbol;
|
974
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
975
|
-
|
976
|
-
var wellKnownSymbol = function (name) {
|
977
|
-
if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
978
|
-
if (nativeSymbol && has$1(Symbol$1, name)) {
|
979
|
-
WellKnownSymbolsStore[name] = Symbol$1[name];
|
980
|
-
} else {
|
981
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
982
|
-
}
|
983
|
-
} return WellKnownSymbolsStore[name];
|
984
|
-
};
|
985
|
-
|
986
1419
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
987
1420
|
|
988
1421
|
|
@@ -990,49 +1423,12 @@
|
|
990
1423
|
|
991
1424
|
|
992
1425
|
|
993
|
-
var SPECIES$2 = wellKnownSymbol('species');
|
994
1426
|
|
995
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
996
|
-
// #replace needs built-in support for named groups.
|
997
|
-
// #match works fine because it just return the exec results, even if it has
|
998
|
-
// a "grops" property.
|
999
|
-
var re = /./;
|
1000
|
-
re.exec = function () {
|
1001
|
-
var result = [];
|
1002
|
-
result.groups = { a: '7' };
|
1003
|
-
return result;
|
1004
|
-
};
|
1005
|
-
return ''.replace(re, '$<a>') !== '7';
|
1006
|
-
});
|
1007
|
-
|
1008
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1009
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1010
|
-
var REPLACE_KEEPS_$0 = (function () {
|
1011
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
1012
|
-
return 'a'.replace(/./, '$0') === '$0';
|
1013
|
-
})();
|
1014
1427
|
|
1015
|
-
var
|
1016
|
-
|
1017
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
1018
|
-
if (/./[REPLACE]) {
|
1019
|
-
return /./[REPLACE]('a', '$0') === '';
|
1020
|
-
}
|
1021
|
-
return false;
|
1022
|
-
})();
|
1023
|
-
|
1024
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
1025
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
1026
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1027
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1028
|
-
var re = /(?:)/;
|
1029
|
-
var originalExec = re.exec;
|
1030
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1031
|
-
var result = 'ab'.split(re);
|
1032
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1033
|
-
});
|
1428
|
+
var SPECIES$2 = wellKnownSymbol('species');
|
1429
|
+
var RegExpPrototype = RegExp.prototype;
|
1034
1430
|
|
1035
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY,
|
1431
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
1036
1432
|
var SYMBOL = wellKnownSymbol(KEY);
|
1037
1433
|
|
1038
1434
|
var DELEGATES_TO_SYMBOL = !fails(function () {
|
@@ -1069,91 +1465,72 @@
|
|
1069
1465
|
if (
|
1070
1466
|
!DELEGATES_TO_SYMBOL ||
|
1071
1467
|
!DELEGATES_TO_EXEC ||
|
1072
|
-
|
1073
|
-
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
1074
|
-
REPLACE_KEEPS_$0 &&
|
1075
|
-
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1076
|
-
)) ||
|
1077
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1468
|
+
FORCED
|
1078
1469
|
) {
|
1079
|
-
var
|
1470
|
+
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
|
1080
1471
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1081
|
-
|
1472
|
+
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
|
1473
|
+
var $exec = regexp.exec;
|
1474
|
+
if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
|
1082
1475
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1083
1476
|
// The native String method already delegates to @@method (this
|
1084
1477
|
// polyfilled function), leasing to infinite recursion.
|
1085
1478
|
// We avoid it by directly calling the native @@method method.
|
1086
|
-
return { done: true, value:
|
1479
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
1087
1480
|
}
|
1088
|
-
return { done: true, value:
|
1481
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
1089
1482
|
}
|
1090
1483
|
return { done: false };
|
1091
|
-
}, {
|
1092
|
-
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
1093
|
-
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1094
1484
|
});
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
redefine(String.prototype, KEY, stringMethod);
|
1099
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1100
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1101
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1102
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1103
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1104
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1105
|
-
: function (string) { return regexMethod.call(string, this); }
|
1106
|
-
);
|
1485
|
+
|
1486
|
+
defineBuiltIn(String.prototype, KEY, methods[0]);
|
1487
|
+
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
1107
1488
|
}
|
1108
1489
|
|
1109
|
-
if (
|
1490
|
+
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
1110
1491
|
};
|
1111
1492
|
|
1112
1493
|
// `SameValue` abstract operation
|
1113
1494
|
// https://tc39.es/ecma262/#sec-samevalue
|
1114
|
-
// eslint-disable-next-line es/no-object-is -- safe
|
1495
|
+
// eslint-disable-next-line es-x/no-object-is -- safe
|
1115
1496
|
var sameValue = Object.is || function is(x, y) {
|
1116
1497
|
// eslint-disable-next-line no-self-compare -- NaN check
|
1117
1498
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
1118
1499
|
};
|
1119
1500
|
|
1501
|
+
var TypeError$3 = global_1.TypeError;
|
1502
|
+
|
1120
1503
|
// `RegExpExec` abstract operation
|
1121
1504
|
// https://tc39.es/ecma262/#sec-regexpexec
|
1122
1505
|
var regexpExecAbstract = function (R, S) {
|
1123
1506
|
var exec = R.exec;
|
1124
|
-
if (
|
1125
|
-
var result = exec
|
1126
|
-
if (
|
1127
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1128
|
-
}
|
1507
|
+
if (isCallable(exec)) {
|
1508
|
+
var result = functionCall(exec, R, S);
|
1509
|
+
if (result !== null) anObject(result);
|
1129
1510
|
return result;
|
1130
1511
|
}
|
1131
|
-
|
1132
|
-
|
1133
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1134
|
-
}
|
1135
|
-
|
1136
|
-
return regexpExec.call(R, S);
|
1512
|
+
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
1513
|
+
throw TypeError$3('RegExp#exec called on incompatible receiver');
|
1137
1514
|
};
|
1138
1515
|
|
1139
1516
|
// @@search logic
|
1140
|
-
fixRegexpWellKnownSymbolLogic('search',
|
1517
|
+
fixRegexpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
|
1141
1518
|
return [
|
1142
1519
|
// `String.prototype.search` method
|
1143
1520
|
// https://tc39.es/ecma262/#sec-string.prototype.search
|
1144
1521
|
function search(regexp) {
|
1145
1522
|
var O = requireObjectCoercible(this);
|
1146
|
-
var searcher = regexp == undefined ? undefined : regexp
|
1147
|
-
return searcher
|
1523
|
+
var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
|
1524
|
+
return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O));
|
1148
1525
|
},
|
1149
1526
|
// `RegExp.prototype[@@search]` method
|
1150
1527
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
1151
|
-
function (
|
1152
|
-
var
|
1153
|
-
|
1528
|
+
function (string) {
|
1529
|
+
var rx = anObject(this);
|
1530
|
+
var S = toString_1(string);
|
1531
|
+
var res = maybeCallNative(nativeSearch, rx, S);
|
1154
1532
|
|
1155
|
-
|
1156
|
-
var S = String(this);
|
1533
|
+
if (res.done) return res.value;
|
1157
1534
|
|
1158
1535
|
var previousLastIndex = rx.lastIndex;
|
1159
1536
|
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
@@ -1164,23 +1541,11 @@
|
|
1164
1541
|
];
|
1165
1542
|
});
|
1166
1543
|
|
1167
|
-
//
|
1168
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
1169
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
1170
|
-
var objectKeys = Object.keys || function keys(O) {
|
1171
|
-
return objectKeysInternal(O, enumBugKeys);
|
1172
|
-
};
|
1173
|
-
|
1174
|
-
// `ToObject` abstract operation
|
1175
|
-
// https://tc39.es/ecma262/#sec-toobject
|
1176
|
-
var toObject = function (argument) {
|
1177
|
-
return Object(requireObjectCoercible(argument));
|
1178
|
-
};
|
1179
|
-
|
1180
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
1544
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
1181
1545
|
var $assign = Object.assign;
|
1182
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
1546
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
1183
1547
|
var defineProperty = Object.defineProperty;
|
1548
|
+
var concat = functionUncurryThis([].concat);
|
1184
1549
|
|
1185
1550
|
// `Object.assign` method
|
1186
1551
|
// https://tc39.es/ecma262/#sec-object.assign
|
@@ -1198,7 +1563,7 @@
|
|
1198
1563
|
// should work with symbols and should have deterministic property order (V8 bug)
|
1199
1564
|
var A = {};
|
1200
1565
|
var B = {};
|
1201
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
1566
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
1202
1567
|
var symbol = Symbol();
|
1203
1568
|
var alphabet = 'abcdefghijklmnopqrst';
|
1204
1569
|
A[symbol] = 7;
|
@@ -1212,33 +1577,33 @@
|
|
1212
1577
|
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1213
1578
|
while (argumentsLength > index) {
|
1214
1579
|
var S = indexedObject(arguments[index++]);
|
1215
|
-
var keys = getOwnPropertySymbols ? objectKeys(S)
|
1580
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
1216
1581
|
var length = keys.length;
|
1217
1582
|
var j = 0;
|
1218
1583
|
var key;
|
1219
1584
|
while (length > j) {
|
1220
1585
|
key = keys[j++];
|
1221
|
-
if (!descriptors || propertyIsEnumerable
|
1586
|
+
if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
|
1222
1587
|
}
|
1223
1588
|
} return T;
|
1224
1589
|
} : $assign;
|
1225
1590
|
|
1226
1591
|
// `Object.assign` method
|
1227
1592
|
// https://tc39.es/ecma262/#sec-object.assign
|
1228
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
1229
|
-
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
1593
|
+
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
1594
|
+
_export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {
|
1230
1595
|
assign: objectAssign
|
1231
1596
|
});
|
1232
1597
|
|
1233
1598
|
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
1234
1599
|
var method = [][METHOD_NAME];
|
1235
1600
|
return !!method && fails(function () {
|
1236
|
-
// eslint-disable-next-line no-useless-call
|
1237
|
-
method.call(null, argument || function () {
|
1601
|
+
// eslint-disable-next-line no-useless-call -- required for testing
|
1602
|
+
method.call(null, argument || function () { return 1; }, 1);
|
1238
1603
|
});
|
1239
1604
|
};
|
1240
1605
|
|
1241
|
-
var
|
1606
|
+
var un$Join = functionUncurryThis([].join);
|
1242
1607
|
|
1243
1608
|
var ES3_STRINGS = indexedObject != Object;
|
1244
1609
|
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
@@ -1247,82 +1612,116 @@
|
|
1247
1612
|
// https://tc39.es/ecma262/#sec-array.prototype.join
|
1248
1613
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
1249
1614
|
join: function join(separator) {
|
1250
|
-
return
|
1615
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
1251
1616
|
}
|
1252
1617
|
});
|
1253
1618
|
|
1254
|
-
var
|
1255
|
-
if (typeof it != 'function') {
|
1256
|
-
throw TypeError(String(it) + ' is not a function');
|
1257
|
-
} return it;
|
1258
|
-
};
|
1619
|
+
var bind = functionUncurryThis(functionUncurryThis.bind);
|
1259
1620
|
|
1260
1621
|
// optional / simple context binding
|
1261
|
-
var functionBindContext = function (fn, that
|
1262
|
-
|
1263
|
-
|
1264
|
-
switch (length) {
|
1265
|
-
case 0: return function () {
|
1266
|
-
return fn.call(that);
|
1267
|
-
};
|
1268
|
-
case 1: return function (a) {
|
1269
|
-
return fn.call(that, a);
|
1270
|
-
};
|
1271
|
-
case 2: return function (a, b) {
|
1272
|
-
return fn.call(that, a, b);
|
1273
|
-
};
|
1274
|
-
case 3: return function (a, b, c) {
|
1275
|
-
return fn.call(that, a, b, c);
|
1276
|
-
};
|
1277
|
-
}
|
1278
|
-
return function (/* ...args */) {
|
1622
|
+
var functionBindContext = function (fn, that) {
|
1623
|
+
aCallable(fn);
|
1624
|
+
return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
|
1279
1625
|
return fn.apply(that, arguments);
|
1280
1626
|
};
|
1281
1627
|
};
|
1282
1628
|
|
1283
1629
|
// `IsArray` abstract operation
|
1284
1630
|
// https://tc39.es/ecma262/#sec-isarray
|
1285
|
-
// eslint-disable-next-line es/no-array-isarray -- safe
|
1286
|
-
var isArray = Array.isArray || function isArray(
|
1287
|
-
return classofRaw(
|
1631
|
+
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
1632
|
+
var isArray = Array.isArray || function isArray(argument) {
|
1633
|
+
return classofRaw(argument) == 'Array';
|
1634
|
+
};
|
1635
|
+
|
1636
|
+
var noop = function () { /* empty */ };
|
1637
|
+
var empty = [];
|
1638
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
1639
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
1640
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
1641
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
1642
|
+
|
1643
|
+
var isConstructorModern = function isConstructor(argument) {
|
1644
|
+
if (!isCallable(argument)) return false;
|
1645
|
+
try {
|
1646
|
+
construct(noop, empty, argument);
|
1647
|
+
return true;
|
1648
|
+
} catch (error) {
|
1649
|
+
return false;
|
1650
|
+
}
|
1651
|
+
};
|
1652
|
+
|
1653
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
1654
|
+
if (!isCallable(argument)) return false;
|
1655
|
+
switch (classof(argument)) {
|
1656
|
+
case 'AsyncFunction':
|
1657
|
+
case 'GeneratorFunction':
|
1658
|
+
case 'AsyncGeneratorFunction': return false;
|
1659
|
+
}
|
1660
|
+
try {
|
1661
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
1662
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
1663
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
1664
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
1665
|
+
} catch (error) {
|
1666
|
+
return true;
|
1667
|
+
}
|
1288
1668
|
};
|
1289
1669
|
|
1670
|
+
isConstructorLegacy.sham = true;
|
1671
|
+
|
1672
|
+
// `IsConstructor` abstract operation
|
1673
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
1674
|
+
var isConstructor = !construct || fails(function () {
|
1675
|
+
var called;
|
1676
|
+
return isConstructorModern(isConstructorModern.call)
|
1677
|
+
|| !isConstructorModern(Object)
|
1678
|
+
|| !isConstructorModern(function () { called = true; })
|
1679
|
+
|| called;
|
1680
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
1681
|
+
|
1290
1682
|
var SPECIES$1 = wellKnownSymbol('species');
|
1683
|
+
var Array$1 = global_1.Array;
|
1291
1684
|
|
1292
|
-
// `ArraySpeciesCreate` abstract operation
|
1685
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
1293
1686
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1294
|
-
var
|
1687
|
+
var arraySpeciesConstructor = function (originalArray) {
|
1295
1688
|
var C;
|
1296
1689
|
if (isArray(originalArray)) {
|
1297
1690
|
C = originalArray.constructor;
|
1298
1691
|
// cross-realm fallback
|
1299
|
-
if (
|
1692
|
+
if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
|
1300
1693
|
else if (isObject(C)) {
|
1301
1694
|
C = C[SPECIES$1];
|
1302
1695
|
if (C === null) C = undefined;
|
1303
1696
|
}
|
1304
|
-
} return
|
1697
|
+
} return C === undefined ? Array$1 : C;
|
1305
1698
|
};
|
1306
1699
|
|
1307
|
-
|
1700
|
+
// `ArraySpeciesCreate` abstract operation
|
1701
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1702
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
1703
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
1704
|
+
};
|
1308
1705
|
|
1309
|
-
|
1706
|
+
var push$1 = functionUncurryThis([].push);
|
1707
|
+
|
1708
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
1310
1709
|
var createMethod$2 = function (TYPE) {
|
1311
1710
|
var IS_MAP = TYPE == 1;
|
1312
1711
|
var IS_FILTER = TYPE == 2;
|
1313
1712
|
var IS_SOME = TYPE == 3;
|
1314
1713
|
var IS_EVERY = TYPE == 4;
|
1315
1714
|
var IS_FIND_INDEX = TYPE == 6;
|
1316
|
-
var
|
1715
|
+
var IS_FILTER_REJECT = TYPE == 7;
|
1317
1716
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
1318
1717
|
return function ($this, callbackfn, that, specificCreate) {
|
1319
1718
|
var O = toObject($this);
|
1320
1719
|
var self = indexedObject(O);
|
1321
|
-
var boundFunction = functionBindContext(callbackfn, that
|
1322
|
-
var length =
|
1720
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
1721
|
+
var length = lengthOfArrayLike(self);
|
1323
1722
|
var index = 0;
|
1324
1723
|
var create = specificCreate || arraySpeciesCreate;
|
1325
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ||
|
1724
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
1326
1725
|
var value, result;
|
1327
1726
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
1328
1727
|
value = self[index];
|
@@ -1333,10 +1732,10 @@
|
|
1333
1732
|
case 3: return true; // some
|
1334
1733
|
case 5: return value; // find
|
1335
1734
|
case 6: return index; // findIndex
|
1336
|
-
case 2: push
|
1735
|
+
case 2: push$1(target, value); // filter
|
1337
1736
|
} else switch (TYPE) {
|
1338
1737
|
case 4: return false; // every
|
1339
|
-
case 7: push
|
1738
|
+
case 7: push$1(target, value); // filterReject
|
1340
1739
|
}
|
1341
1740
|
}
|
1342
1741
|
}
|
@@ -1366,95 +1765,9 @@
|
|
1366
1765
|
// `Array.prototype.findIndex` method
|
1367
1766
|
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
1368
1767
|
findIndex: createMethod$2(6),
|
1369
|
-
// `Array.prototype.
|
1768
|
+
// `Array.prototype.filterReject` method
|
1370
1769
|
// https://github.com/tc39/proposal-array-filtering
|
1371
|
-
|
1372
|
-
};
|
1373
|
-
|
1374
|
-
// `Object.defineProperties` method
|
1375
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1376
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
1377
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
1378
|
-
anObject(O);
|
1379
|
-
var keys = objectKeys(Properties);
|
1380
|
-
var length = keys.length;
|
1381
|
-
var index = 0;
|
1382
|
-
var key;
|
1383
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
1384
|
-
return O;
|
1385
|
-
};
|
1386
|
-
|
1387
|
-
var html = getBuiltIn('document', 'documentElement');
|
1388
|
-
|
1389
|
-
var GT = '>';
|
1390
|
-
var LT = '<';
|
1391
|
-
var PROTOTYPE = 'prototype';
|
1392
|
-
var SCRIPT = 'script';
|
1393
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
1394
|
-
|
1395
|
-
var EmptyConstructor = function () { /* empty */ };
|
1396
|
-
|
1397
|
-
var scriptTag = function (content) {
|
1398
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
1399
|
-
};
|
1400
|
-
|
1401
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
1402
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
1403
|
-
activeXDocument.write(scriptTag(''));
|
1404
|
-
activeXDocument.close();
|
1405
|
-
var temp = activeXDocument.parentWindow.Object;
|
1406
|
-
activeXDocument = null; // avoid memory leak
|
1407
|
-
return temp;
|
1408
|
-
};
|
1409
|
-
|
1410
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
1411
|
-
var NullProtoObjectViaIFrame = function () {
|
1412
|
-
// Thrash, waste and sodomy: IE GC bug
|
1413
|
-
var iframe = documentCreateElement('iframe');
|
1414
|
-
var JS = 'java' + SCRIPT + ':';
|
1415
|
-
var iframeDocument;
|
1416
|
-
iframe.style.display = 'none';
|
1417
|
-
html.appendChild(iframe);
|
1418
|
-
// https://github.com/zloirock/core-js/issues/475
|
1419
|
-
iframe.src = String(JS);
|
1420
|
-
iframeDocument = iframe.contentWindow.document;
|
1421
|
-
iframeDocument.open();
|
1422
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
1423
|
-
iframeDocument.close();
|
1424
|
-
return iframeDocument.F;
|
1425
|
-
};
|
1426
|
-
|
1427
|
-
// Check for document.domain and active x support
|
1428
|
-
// No need to use active x approach when document.domain is not set
|
1429
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
1430
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
1431
|
-
// avoid IE GC bug
|
1432
|
-
var activeXDocument;
|
1433
|
-
var NullProtoObject = function () {
|
1434
|
-
try {
|
1435
|
-
/* global ActiveXObject -- old IE */
|
1436
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
1437
|
-
} catch (error) { /* ignore */ }
|
1438
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
1439
|
-
var length = enumBugKeys.length;
|
1440
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1441
|
-
return NullProtoObject();
|
1442
|
-
};
|
1443
|
-
|
1444
|
-
hiddenKeys$1[IE_PROTO] = true;
|
1445
|
-
|
1446
|
-
// `Object.create` method
|
1447
|
-
// https://tc39.es/ecma262/#sec-object.create
|
1448
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
1449
|
-
var result;
|
1450
|
-
if (O !== null) {
|
1451
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
1452
|
-
result = new EmptyConstructor();
|
1453
|
-
EmptyConstructor[PROTOTYPE] = null;
|
1454
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
1455
|
-
result[IE_PROTO] = O;
|
1456
|
-
} else result = NullProtoObject();
|
1457
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
1770
|
+
filterReject: createMethod$2(7)
|
1458
1771
|
};
|
1459
1772
|
|
1460
1773
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
@@ -1494,8 +1807,20 @@
|
|
1494
1807
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
1495
1808
|
addToUnscopables(FIND);
|
1496
1809
|
|
1810
|
+
// `Object.prototype.toString` method implementation
|
1811
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1812
|
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1813
|
+
return '[object ' + classof(this) + ']';
|
1814
|
+
};
|
1815
|
+
|
1816
|
+
// `Object.prototype.toString` method
|
1817
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1818
|
+
if (!toStringTagSupport) {
|
1819
|
+
defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1820
|
+
}
|
1821
|
+
|
1497
1822
|
var createProperty = function (object, key, value) {
|
1498
|
-
var propertyKey =
|
1823
|
+
var propertyKey = toPropertyKey(key);
|
1499
1824
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1500
1825
|
else object[propertyKey] = value;
|
1501
1826
|
};
|
@@ -1519,6 +1844,7 @@
|
|
1519
1844
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
1520
1845
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
1521
1846
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1847
|
+
var TypeError$2 = global_1.TypeError;
|
1522
1848
|
|
1523
1849
|
// We can't use this feature detection in V8 since it causes
|
1524
1850
|
// deoptimization and serious performance degradation
|
@@ -1542,7 +1868,7 @@
|
|
1542
1868
|
// `Array.prototype.concat` method
|
1543
1869
|
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
1544
1870
|
// with adding support of @@isConcatSpreadable and @@species
|
1545
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
1871
|
+
_export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
1546
1872
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
1547
1873
|
concat: function concat(arg) {
|
1548
1874
|
var O = toObject(this);
|
@@ -1552,11 +1878,11 @@
|
|
1552
1878
|
for (i = -1, length = arguments.length; i < length; i++) {
|
1553
1879
|
E = i === -1 ? O : arguments[i];
|
1554
1880
|
if (isConcatSpreadable(E)) {
|
1555
|
-
len =
|
1556
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1881
|
+
len = lengthOfArrayLike(E);
|
1882
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1557
1883
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
1558
1884
|
} else {
|
1559
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1885
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1560
1886
|
createProperty(A, n++, E);
|
1561
1887
|
}
|
1562
1888
|
}
|
@@ -1579,7 +1905,10 @@
|
|
1579
1905
|
}
|
1580
1906
|
});
|
1581
1907
|
|
1582
|
-
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1908
|
+
var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
1909
|
+
|
1910
|
+
var propertyIsEnumerable = functionUncurryThis($propertyIsEnumerable);
|
1911
|
+
var push = functionUncurryThis([].push);
|
1583
1912
|
|
1584
1913
|
// `Object.{ entries, values }` methods implementation
|
1585
1914
|
var createMethod$1 = function (TO_ENTRIES) {
|
@@ -1592,8 +1921,8 @@
|
|
1592
1921
|
var key;
|
1593
1922
|
while (length > i) {
|
1594
1923
|
key = keys[i++];
|
1595
|
-
if (!descriptors || propertyIsEnumerable
|
1596
|
-
|
1924
|
+
if (!descriptors || propertyIsEnumerable(O, key)) {
|
1925
|
+
push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
|
1597
1926
|
}
|
1598
1927
|
}
|
1599
1928
|
return result;
|
@@ -1619,33 +1948,41 @@
|
|
1619
1948
|
}
|
1620
1949
|
});
|
1621
1950
|
|
1622
|
-
/* eslint-disable es/no-array-prototype-indexof -- required for testing */
|
1951
|
+
/* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
|
1952
|
+
|
1623
1953
|
|
1624
|
-
var $
|
1954
|
+
var $IndexOf = arrayIncludes.indexOf;
|
1625
1955
|
|
1626
1956
|
|
1627
|
-
var
|
1957
|
+
var un$IndexOf = functionUncurryThis([].indexOf);
|
1628
1958
|
|
1629
|
-
var NEGATIVE_ZERO = !!
|
1959
|
+
var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
|
1630
1960
|
var STRICT_METHOD = arrayMethodIsStrict('indexOf');
|
1631
1961
|
|
1632
1962
|
// `Array.prototype.indexOf` method
|
1633
1963
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
1634
1964
|
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
|
1635
1965
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
1966
|
+
var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
|
1636
1967
|
return NEGATIVE_ZERO
|
1637
1968
|
// convert -0 to +0
|
1638
|
-
?
|
1639
|
-
: $
|
1969
|
+
? un$IndexOf(this, searchElement, fromIndex) || 0
|
1970
|
+
: $IndexOf(this, searchElement, fromIndex);
|
1640
1971
|
}
|
1641
1972
|
});
|
1642
1973
|
|
1643
1974
|
var $includes = arrayIncludes.includes;
|
1644
1975
|
|
1645
1976
|
|
1977
|
+
|
1978
|
+
// FF99+ bug
|
1979
|
+
var BROKEN_ON_SPARSE = fails(function () {
|
1980
|
+
return !Array(1).includes();
|
1981
|
+
});
|
1982
|
+
|
1646
1983
|
// `Array.prototype.includes` method
|
1647
1984
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
1648
|
-
_export({ target: 'Array', proto: true }, {
|
1985
|
+
_export({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
1649
1986
|
includes: function includes(el /* , fromIndex = 0 */) {
|
1650
1987
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
1651
1988
|
}
|
@@ -1663,9 +2000,11 @@
|
|
1663
2000
|
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1664
2001
|
};
|
1665
2002
|
|
2003
|
+
var TypeError$1 = global_1.TypeError;
|
2004
|
+
|
1666
2005
|
var notARegexp = function (it) {
|
1667
2006
|
if (isRegexp(it)) {
|
1668
|
-
throw TypeError("The method doesn't accept regular expressions");
|
2007
|
+
throw TypeError$1("The method doesn't accept regular expressions");
|
1669
2008
|
} return it;
|
1670
2009
|
};
|
1671
2010
|
|
@@ -1683,12 +2022,17 @@
|
|
1683
2022
|
} return false;
|
1684
2023
|
};
|
1685
2024
|
|
2025
|
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
2026
|
+
|
1686
2027
|
// `String.prototype.includes` method
|
1687
2028
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
1688
2029
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
1689
2030
|
includes: function includes(searchString /* , position = 0 */) {
|
1690
|
-
return !!~
|
1691
|
-
|
2031
|
+
return !!~stringIndexOf(
|
2032
|
+
toString_1(requireObjectCoercible(this)),
|
2033
|
+
toString_1(notARegexp(searchString)),
|
2034
|
+
arguments.length > 1 ? arguments[1] : undefined
|
2035
|
+
);
|
1692
2036
|
}
|
1693
2037
|
});
|
1694
2038
|
|
@@ -1696,6 +2040,7 @@
|
|
1696
2040
|
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
1697
2041
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
1698
2042
|
|
2043
|
+
var replace = functionUncurryThis(''.replace);
|
1699
2044
|
var whitespace = '[' + whitespaces + ']';
|
1700
2045
|
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
1701
2046
|
var rtrim = RegExp(whitespace + whitespace + '*$');
|
@@ -1703,9 +2048,9 @@
|
|
1703
2048
|
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
1704
2049
|
var createMethod = function (TYPE) {
|
1705
2050
|
return function ($this) {
|
1706
|
-
var string =
|
1707
|
-
if (TYPE & 1) string =
|
1708
|
-
if (TYPE & 2) string =
|
2051
|
+
var string = toString_1(requireObjectCoercible($this));
|
2052
|
+
if (TYPE & 1) string = replace(string, ltrim, '');
|
2053
|
+
if (TYPE & 2) string = replace(string, rtrim, '');
|
1709
2054
|
return string;
|
1710
2055
|
};
|
1711
2056
|
};
|
@@ -1722,13 +2067,19 @@
|
|
1722
2067
|
trim: createMethod(3)
|
1723
2068
|
};
|
1724
2069
|
|
2070
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
2071
|
+
|
2072
|
+
|
2073
|
+
|
1725
2074
|
var non = '\u200B\u0085\u180E';
|
1726
2075
|
|
1727
2076
|
// check that a method works with the correct list
|
1728
2077
|
// of whitespaces and has a correct name
|
1729
2078
|
var stringTrimForced = function (METHOD_NAME) {
|
1730
2079
|
return fails(function () {
|
1731
|
-
return !!whitespaces[METHOD_NAME]()
|
2080
|
+
return !!whitespaces[METHOD_NAME]()
|
2081
|
+
|| non[METHOD_NAME]() !== non
|
2082
|
+
|| (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
|
1732
2083
|
});
|
1733
2084
|
};
|
1734
2085
|
|
@@ -1751,20 +2102,22 @@
|
|
1751
2102
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
1752
2103
|
*/
|
1753
2104
|
|
1754
|
-
var Utils = $__default[
|
2105
|
+
var Utils = $__default["default"].fn.bootstrapTable.utils;
|
1755
2106
|
var theme = {
|
1756
2107
|
bootstrap3: {
|
1757
2108
|
icons: {
|
1758
2109
|
advancedSearchIcon: 'glyphicon-chevron-down'
|
1759
2110
|
},
|
2111
|
+
classes: {},
|
1760
2112
|
html: {
|
1761
|
-
modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <
|
2113
|
+
modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <h4 class=\"modal-title\">%s</h4>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0px; padding-left: 0px;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
|
1762
2114
|
}
|
1763
2115
|
},
|
1764
2116
|
bootstrap4: {
|
1765
2117
|
icons: {
|
1766
2118
|
advancedSearchIcon: 'fa-chevron-down'
|
1767
2119
|
},
|
2120
|
+
classes: {},
|
1768
2121
|
html: {
|
1769
2122
|
modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">%s</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0; padding-left: 0;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
|
1770
2123
|
}
|
@@ -1773,14 +2126,18 @@
|
|
1773
2126
|
icons: {
|
1774
2127
|
advancedSearchIcon: 'bi-chevron-down'
|
1775
2128
|
},
|
2129
|
+
classes: {
|
2130
|
+
formGroup: 'mb-3'
|
2131
|
+
},
|
1776
2132
|
html: {
|
1777
|
-
modal: "\n <div id=\"avdSearchModal_%s\"
|
2133
|
+
modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0; padding-left: 0;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
|
1778
2134
|
}
|
1779
2135
|
},
|
1780
2136
|
bulma: {
|
1781
2137
|
icons: {
|
1782
2138
|
advancedSearchIcon: 'fa-chevron-down'
|
1783
2139
|
},
|
2140
|
+
classes: {},
|
1784
2141
|
html: {
|
1785
2142
|
modal: "\n <div class=\"modal\" id=\"avdSearchModal_%s\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">%s</p>\n <button class=\"delete\" aria-label=\"close\"></button>\n </header>\n <section class=\"modal-card-body\" id=\"avdSearchModalContent_%s\"></section>\n <footer class=\"modal-card-foot\">\n <button class=\"button\" id=\"btnCloseAvd_%s\" data-close=\"btn btn-%s\">%s</button>\n </footer>\n </div>\n </div>\n "
|
1786
2143
|
}
|
@@ -1789,6 +2146,7 @@
|
|
1789
2146
|
icons: {
|
1790
2147
|
advancedSearchIcon: 'fa-chevron-down'
|
1791
2148
|
},
|
2149
|
+
classes: {},
|
1792
2150
|
html: {
|
1793
2151
|
modal: "\n <div class=\"reveal\" id=\"avdSearchModal_%s\" data-reveal>\n <h1>%s</h1>\n <div id=\"avdSearchModalContent_%s\">\n\n </div>\n <button class=\"close-button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">×</span>\n </button>\n\n <button id=\"btnCloseAvd_%s\" class=\"%s\" type=\"button\">%s</button>\n </div>\n "
|
1794
2152
|
}
|
@@ -1797,6 +2155,7 @@
|
|
1797
2155
|
icons: {
|
1798
2156
|
advancedSearchIcon: 'expand_more'
|
1799
2157
|
},
|
2158
|
+
classes: {},
|
1800
2159
|
html: {
|
1801
2160
|
modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal\">\n <div class=\"modal-content\">\n <h4>%s</h4>\n <div id=\"avdSearchModalContent_%s\">\n\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\"\" id=\"btnCloseAvd_%s\" class=\"modal-close waves-effect waves-green btn-flat %s\">%s</a>\n </div>\n </div>\n "
|
1802
2161
|
}
|
@@ -1805,12 +2164,13 @@
|
|
1805
2164
|
icons: {
|
1806
2165
|
advancedSearchIcon: 'fa-chevron-down'
|
1807
2166
|
},
|
2167
|
+
classes: {},
|
1808
2168
|
html: {
|
1809
2169
|
modal: "\n <div class=\"ui modal\" id=\"avdSearchModal_%s\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n %s\n </div>\n <div class=\"image content ui form\" id=\"avdSearchModalContent_%s\"></div>\n <div class=\"actions\">\n <div id=\"btnCloseAvd_%s\" class=\"ui black deny button %s\">%s</div>\n </div>\n </div>\n "
|
1810
2170
|
}
|
1811
2171
|
}
|
1812
|
-
}[$__default[
|
1813
|
-
$__default[
|
2172
|
+
}[$__default["default"].fn.bootstrapTable.theme];
|
2173
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
|
1814
2174
|
advancedSearch: false,
|
1815
2175
|
idForm: 'advancedSearch',
|
1816
2176
|
actionForm: '',
|
@@ -1820,13 +2180,13 @@
|
|
1820
2180
|
return false;
|
1821
2181
|
}
|
1822
2182
|
});
|
1823
|
-
$__default[
|
2183
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
|
1824
2184
|
advancedSearchIcon: theme.icons.advancedSearchIcon
|
1825
2185
|
});
|
1826
|
-
$__default[
|
2186
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
|
1827
2187
|
'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
|
1828
2188
|
});
|
1829
|
-
$__default[
|
2189
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
|
1830
2190
|
formatAdvancedSearch: function formatAdvancedSearch() {
|
1831
2191
|
return 'Advanced search';
|
1832
2192
|
},
|
@@ -1834,9 +2194,9 @@
|
|
1834
2194
|
return 'Close';
|
1835
2195
|
}
|
1836
2196
|
});
|
1837
|
-
$__default[
|
2197
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
|
1838
2198
|
|
1839
|
-
$__default[
|
2199
|
+
$__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
|
1840
2200
|
_inherits(_class, _$$BootstrapTable);
|
1841
2201
|
|
1842
2202
|
var _super = _createSuper(_class);
|
@@ -1877,11 +2237,11 @@
|
|
1877
2237
|
var o = this.options;
|
1878
2238
|
var modalSelector = "#avdSearchModal_".concat(o.idTable);
|
1879
2239
|
|
1880
|
-
if ($__default[
|
1881
|
-
$__default[
|
2240
|
+
if ($__default["default"](modalSelector).length <= 0) {
|
2241
|
+
$__default["default"]('body').append(Utils.sprintf(theme.html.modal, o.idTable, o.formatAdvancedSearch(), o.idTable, o.idTable, o.buttonsClass, o.formatAdvancedCloseButton()));
|
1882
2242
|
var timeoutId = 0;
|
1883
|
-
$__default[
|
1884
|
-
$__default[
|
2243
|
+
$__default["default"]("#avdSearchModalContent_".concat(o.idTable)).append(this.createFormAvd().join(''));
|
2244
|
+
$__default["default"]("#".concat(o.idForm)).off('keyup blur', 'input').on('keyup blur', 'input', function (e) {
|
1885
2245
|
if (o.sidePagination === 'server') {
|
1886
2246
|
_this.onColumnAdvancedSearch(e);
|
1887
2247
|
} else {
|
@@ -1891,12 +2251,12 @@
|
|
1891
2251
|
}, o.searchTimeOut);
|
1892
2252
|
}
|
1893
2253
|
});
|
1894
|
-
$__default[
|
2254
|
+
$__default["default"]("#btnCloseAvd_".concat(o.idTable)).click(function () {
|
1895
2255
|
return _this.hideModal();
|
1896
2256
|
});
|
1897
2257
|
|
1898
|
-
if ($__default[
|
1899
|
-
$__default[
|
2258
|
+
if ($__default["default"].fn.bootstrapTable.theme === 'bulma') {
|
2259
|
+
$__default["default"](modalSelector).find('.delete').off('click').on('click', function () {
|
1900
2260
|
return _this.hideModal();
|
1901
2261
|
});
|
1902
2262
|
}
|
@@ -1911,50 +2271,50 @@
|
|
1911
2271
|
value: function showModal() {
|
1912
2272
|
var modalSelector = "#avdSearchModal_".concat(this.options.idTable);
|
1913
2273
|
|
1914
|
-
if ($__default[
|
1915
|
-
$__default[
|
1916
|
-
} else if ($__default[
|
2274
|
+
if ($__default["default"].inArray($__default["default"].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
|
2275
|
+
$__default["default"](modalSelector).modal();
|
2276
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'bootstrap5') {
|
1917
2277
|
if (!this.toolbarModal) {
|
1918
2278
|
// eslint-disable-next-line no-undef
|
1919
2279
|
this.toolbarModal = new bootstrap.Modal(document.getElementById("avdSearchModal_".concat(this.options.idTable)), {});
|
1920
2280
|
}
|
1921
2281
|
|
1922
2282
|
this.toolbarModal.show();
|
1923
|
-
} else if ($__default[
|
1924
|
-
$__default[
|
1925
|
-
} else if ($__default[
|
2283
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'bulma') {
|
2284
|
+
$__default["default"](modalSelector).toggleClass('is-active');
|
2285
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'foundation') {
|
1926
2286
|
if (!this.toolbarModal) {
|
1927
2287
|
// eslint-disable-next-line no-undef
|
1928
|
-
this.toolbarModal = new Foundation.Reveal($__default[
|
2288
|
+
this.toolbarModal = new Foundation.Reveal($__default["default"](modalSelector));
|
1929
2289
|
}
|
1930
2290
|
|
1931
2291
|
this.toolbarModal.open();
|
1932
|
-
} else if ($__default[
|
1933
|
-
$__default[
|
1934
|
-
$__default[
|
1935
|
-
} else if ($__default[
|
1936
|
-
$__default[
|
2292
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'materialize') {
|
2293
|
+
$__default["default"](modalSelector).modal();
|
2294
|
+
$__default["default"](modalSelector).modal('open');
|
2295
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'semantic') {
|
2296
|
+
$__default["default"](modalSelector).modal('show');
|
1937
2297
|
}
|
1938
2298
|
}
|
1939
2299
|
}, {
|
1940
2300
|
key: "hideModal",
|
1941
2301
|
value: function hideModal() {
|
1942
|
-
var $closeModalButton = $__default[
|
2302
|
+
var $closeModalButton = $__default["default"]("#avdSearchModal_".concat(this.options.idTable));
|
1943
2303
|
var modalSelector = "#avdSearchModal_".concat(this.options.idTable);
|
1944
2304
|
|
1945
|
-
if ($__default[
|
2305
|
+
if ($__default["default"].inArray($__default["default"].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
|
1946
2306
|
$closeModalButton.modal('hide');
|
1947
|
-
} else if ($__default[
|
2307
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'bootstrap5') {
|
1948
2308
|
this.toolbarModal.hide();
|
1949
|
-
} else if ($__default[
|
1950
|
-
$__default[
|
1951
|
-
$__default[
|
1952
|
-
} else if ($__default[
|
2309
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'bulma') {
|
2310
|
+
$__default["default"]('html').toggleClass('is-clipped');
|
2311
|
+
$__default["default"](modalSelector).toggleClass('is-active');
|
2312
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'foundation') {
|
1953
2313
|
this.toolbarModal.close();
|
1954
|
-
} else if ($__default[
|
1955
|
-
$__default[
|
1956
|
-
} else if ($__default[
|
1957
|
-
$__default[
|
2314
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'materialize') {
|
2315
|
+
$__default["default"](modalSelector).modal('open');
|
2316
|
+
} else if ($__default["default"].fn.bootstrapTable.theme === 'semantic') {
|
2317
|
+
$__default["default"](modalSelector).modal('close');
|
1958
2318
|
}
|
1959
2319
|
|
1960
2320
|
if (this.options.sidePagination === 'server') {
|
@@ -1977,7 +2337,7 @@
|
|
1977
2337
|
var column = _step.value;
|
1978
2338
|
|
1979
2339
|
if (!column.checkbox && column.visible && column.searchable) {
|
1980
|
-
html.push("\n <div class=\"form-group row\">\n <label class=\"col-sm-4 control-label\">".concat(column.title, "</label>\n <div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control ").concat(this.constants.classes.input, "\" name=\"").concat(column.field, "\" placeholder=\"").concat(column.title, "\" id=\"").concat(column.field, "\">\n </div>\n </div>\n "));
|
2340
|
+
html.push("\n <div class=\"form-group row ".concat(theme.classes.formGroup || '', "\">\n <label class=\"col-sm-4 control-label\">").concat(column.title, "</label>\n <div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control ").concat(this.constants.classes.input, "\" name=\"").concat(column.field, "\" placeholder=\"").concat(column.title, "\" id=\"").concat(column.field, "\">\n </div>\n </div>\n "));
|
1981
2341
|
}
|
1982
2342
|
}
|
1983
2343
|
} catch (err) {
|
@@ -2000,7 +2360,7 @@
|
|
2000
2360
|
return;
|
2001
2361
|
}
|
2002
2362
|
|
2003
|
-
var fp = $__default[
|
2363
|
+
var fp = $__default["default"].isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
|
2004
2364
|
this.data = fp ? this.data.filter(function (item, i) {
|
2005
2365
|
for (var _i = 0, _Object$entries = Object.entries(fp); _i < _Object$entries.length; _i++) {
|
2006
2366
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
@@ -2026,10 +2386,10 @@
|
|
2026
2386
|
}, {
|
2027
2387
|
key: "onColumnAdvancedSearch",
|
2028
2388
|
value: function onColumnAdvancedSearch(e) {
|
2029
|
-
var text = $__default[
|
2030
|
-
var $field = $__default[
|
2389
|
+
var text = $__default["default"](e.currentTarget).val().trim();
|
2390
|
+
var $field = $__default["default"](e.currentTarget)[0].id;
|
2031
2391
|
|
2032
|
-
if ($__default[
|
2392
|
+
if ($__default["default"].isEmptyObject(this.filterColumnsPartial)) {
|
2033
2393
|
this.filterColumnsPartial = {};
|
2034
2394
|
}
|
2035
2395
|
|
@@ -2041,7 +2401,7 @@
|
|
2041
2401
|
|
2042
2402
|
if (this.options.sidePagination !== 'server') {
|
2043
2403
|
this.options.pageNumber = 1;
|
2044
|
-
this.
|
2404
|
+
this.initSearch();
|
2045
2405
|
this.updatePagination();
|
2046
2406
|
this.trigger('column-advanced-search', $field, text);
|
2047
2407
|
}
|
@@ -2049,6 +2409,6 @@
|
|
2049
2409
|
}]);
|
2050
2410
|
|
2051
2411
|
return _class;
|
2052
|
-
}($__default[
|
2412
|
+
}($__default["default"].BootstrapTable);
|
2053
2413
|
|
2054
|
-
}))
|
2414
|
+
}));
|