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
@@ -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 _unsupportedIterableToArray(o, minLen) {
|
@@ -157,9 +165,9 @@
|
|
157
165
|
}
|
158
166
|
|
159
167
|
function _createForOfIteratorHelper(o, allowArrayLike) {
|
160
|
-
var it;
|
168
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
161
169
|
|
162
|
-
if (
|
170
|
+
if (!it) {
|
163
171
|
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
164
172
|
if (it) o = it;
|
165
173
|
var i = 0;
|
@@ -192,7 +200,7 @@
|
|
192
200
|
err;
|
193
201
|
return {
|
194
202
|
s: function () {
|
195
|
-
it =
|
203
|
+
it = it.call(o);
|
196
204
|
},
|
197
205
|
n: function () {
|
198
206
|
var step = it.next();
|
@@ -225,7 +233,7 @@
|
|
225
233
|
|
226
234
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
227
235
|
var global_1 =
|
228
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
236
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
229
237
|
check(typeof globalThis == 'object' && globalThis) ||
|
230
238
|
check(typeof window == 'object' && window) ||
|
231
239
|
// eslint-disable-next-line no-restricted-globals -- safe
|
@@ -244,12 +252,25 @@
|
|
244
252
|
|
245
253
|
// Detect IE8's incomplete defineProperty implementation
|
246
254
|
var descriptors = !fails(function () {
|
247
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
255
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
248
256
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
249
257
|
});
|
250
258
|
|
259
|
+
var functionBindNative = !fails(function () {
|
260
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
261
|
+
var test = (function () { /* empty */ }).bind();
|
262
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
263
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
264
|
+
});
|
265
|
+
|
266
|
+
var call$2 = Function.prototype.call;
|
267
|
+
|
268
|
+
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
|
269
|
+
return call$2.apply(call$2, arguments);
|
270
|
+
};
|
271
|
+
|
251
272
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
252
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
273
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
253
274
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
254
275
|
|
255
276
|
// Nashorn ~ JDK8 bug
|
@@ -257,13 +278,13 @@
|
|
257
278
|
|
258
279
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
259
280
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
260
|
-
var f$
|
281
|
+
var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
261
282
|
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
262
283
|
return !!descriptor && descriptor.enumerable;
|
263
284
|
} : $propertyIsEnumerable;
|
264
285
|
|
265
286
|
var objectPropertyIsEnumerable = {
|
266
|
-
f: f$
|
287
|
+
f: f$5
|
267
288
|
};
|
268
289
|
|
269
290
|
var createPropertyDescriptor = function (bitmap, value) {
|
@@ -275,27 +296,44 @@
|
|
275
296
|
};
|
276
297
|
};
|
277
298
|
|
278
|
-
var
|
299
|
+
var FunctionPrototype$2 = Function.prototype;
|
300
|
+
var bind$1 = FunctionPrototype$2.bind;
|
301
|
+
var call$1 = FunctionPrototype$2.call;
|
302
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
303
|
+
|
304
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
305
|
+
return fn && uncurryThis(fn);
|
306
|
+
} : function (fn) {
|
307
|
+
return fn && function () {
|
308
|
+
return call$1.apply(fn, arguments);
|
309
|
+
};
|
310
|
+
};
|
311
|
+
|
312
|
+
var toString$1 = functionUncurryThis({}.toString);
|
313
|
+
var stringSlice$5 = functionUncurryThis(''.slice);
|
279
314
|
|
280
315
|
var classofRaw = function (it) {
|
281
|
-
return toString
|
316
|
+
return stringSlice$5(toString$1(it), 8, -1);
|
282
317
|
};
|
283
318
|
|
284
|
-
var
|
319
|
+
var Object$4 = global_1.Object;
|
320
|
+
var split = functionUncurryThis(''.split);
|
285
321
|
|
286
322
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
287
323
|
var indexedObject = fails(function () {
|
288
324
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
289
325
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
290
|
-
return !Object('z').propertyIsEnumerable(0);
|
326
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
291
327
|
}) ? function (it) {
|
292
|
-
return classofRaw(it) == 'String' ? split
|
293
|
-
} : Object;
|
328
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
329
|
+
} : Object$4;
|
330
|
+
|
331
|
+
var TypeError$b = global_1.TypeError;
|
294
332
|
|
295
333
|
// `RequireObjectCoercible` abstract operation
|
296
334
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
297
335
|
var requireObjectCoercible = function (it) {
|
298
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
336
|
+
if (it == undefined) throw TypeError$b("Can't call method on " + it);
|
299
337
|
return it;
|
300
338
|
};
|
301
339
|
|
@@ -307,88 +345,310 @@
|
|
307
345
|
return indexedObject(requireObjectCoercible(it));
|
308
346
|
};
|
309
347
|
|
348
|
+
// `IsCallable` abstract operation
|
349
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
350
|
+
var isCallable = function (argument) {
|
351
|
+
return typeof argument == 'function';
|
352
|
+
};
|
353
|
+
|
310
354
|
var isObject = function (it) {
|
311
|
-
return typeof it
|
355
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
312
356
|
};
|
313
357
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
var
|
319
|
-
|
358
|
+
var aFunction = function (argument) {
|
359
|
+
return isCallable(argument) ? argument : undefined;
|
360
|
+
};
|
361
|
+
|
362
|
+
var getBuiltIn = function (namespace, method) {
|
363
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
364
|
+
};
|
365
|
+
|
366
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
367
|
+
|
368
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
369
|
+
|
370
|
+
var process = global_1.process;
|
371
|
+
var Deno = global_1.Deno;
|
372
|
+
var versions = process && process.versions || Deno && Deno.version;
|
373
|
+
var v8 = versions && versions.v8;
|
374
|
+
var match, version;
|
375
|
+
|
376
|
+
if (v8) {
|
377
|
+
match = v8.split('.');
|
378
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
379
|
+
// but their correct versions are not interesting for us
|
380
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
381
|
+
}
|
382
|
+
|
383
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
384
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
385
|
+
if (!version && engineUserAgent) {
|
386
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
387
|
+
if (!match || match[1] >= 74) {
|
388
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
389
|
+
if (match) version = +match[1];
|
390
|
+
}
|
391
|
+
}
|
392
|
+
|
393
|
+
var engineV8Version = version;
|
394
|
+
|
395
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
400
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
401
|
+
var symbol = Symbol();
|
402
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
403
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
404
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
405
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
406
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
407
|
+
});
|
408
|
+
|
409
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
410
|
+
|
411
|
+
|
412
|
+
var useSymbolAsUid = nativeSymbol
|
413
|
+
&& !Symbol.sham
|
414
|
+
&& typeof Symbol.iterator == 'symbol';
|
415
|
+
|
416
|
+
var Object$3 = global_1.Object;
|
417
|
+
|
418
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
419
|
+
return typeof it == 'symbol';
|
420
|
+
} : function (it) {
|
421
|
+
var $Symbol = getBuiltIn('Symbol');
|
422
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
423
|
+
};
|
424
|
+
|
425
|
+
var String$3 = global_1.String;
|
426
|
+
|
427
|
+
var tryToString = function (argument) {
|
428
|
+
try {
|
429
|
+
return String$3(argument);
|
430
|
+
} catch (error) {
|
431
|
+
return 'Object';
|
432
|
+
}
|
433
|
+
};
|
434
|
+
|
435
|
+
var TypeError$a = global_1.TypeError;
|
436
|
+
|
437
|
+
// `Assert: IsCallable(argument) is true`
|
438
|
+
var aCallable = function (argument) {
|
439
|
+
if (isCallable(argument)) return argument;
|
440
|
+
throw TypeError$a(tryToString(argument) + ' is not a function');
|
441
|
+
};
|
442
|
+
|
443
|
+
// `GetMethod` abstract operation
|
444
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
445
|
+
var getMethod = function (V, P) {
|
446
|
+
var func = V[P];
|
447
|
+
return func == null ? undefined : aCallable(func);
|
448
|
+
};
|
449
|
+
|
450
|
+
var TypeError$9 = global_1.TypeError;
|
451
|
+
|
452
|
+
// `OrdinaryToPrimitive` abstract operation
|
453
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
454
|
+
var ordinaryToPrimitive = function (input, pref) {
|
320
455
|
var fn, val;
|
321
|
-
if (
|
322
|
-
if (
|
323
|
-
if (
|
324
|
-
throw TypeError("Can't convert object to primitive value");
|
456
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
457
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
458
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
459
|
+
throw TypeError$9("Can't convert object to primitive value");
|
460
|
+
};
|
461
|
+
|
462
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
463
|
+
var defineProperty = Object.defineProperty;
|
464
|
+
|
465
|
+
var setGlobal = function (key, value) {
|
466
|
+
try {
|
467
|
+
defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
468
|
+
} catch (error) {
|
469
|
+
global_1[key] = value;
|
470
|
+
} return value;
|
471
|
+
};
|
472
|
+
|
473
|
+
var SHARED = '__core-js_shared__';
|
474
|
+
var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
|
475
|
+
|
476
|
+
var sharedStore = store$1;
|
477
|
+
|
478
|
+
var shared = createCommonjsModule(function (module) {
|
479
|
+
(module.exports = function (key, value) {
|
480
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
481
|
+
})('versions', []).push({
|
482
|
+
version: '3.22.4',
|
483
|
+
mode: 'global',
|
484
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
485
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
|
486
|
+
source: 'https://github.com/zloirock/core-js'
|
487
|
+
});
|
488
|
+
});
|
489
|
+
|
490
|
+
var Object$2 = global_1.Object;
|
491
|
+
|
492
|
+
// `ToObject` abstract operation
|
493
|
+
// https://tc39.es/ecma262/#sec-toobject
|
494
|
+
var toObject = function (argument) {
|
495
|
+
return Object$2(requireObjectCoercible(argument));
|
325
496
|
};
|
326
497
|
|
327
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
498
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
328
499
|
|
329
|
-
|
330
|
-
|
500
|
+
// `HasOwnProperty` abstract operation
|
501
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
502
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
503
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
504
|
+
return hasOwnProperty(toObject(it), key);
|
505
|
+
};
|
506
|
+
|
507
|
+
var id = 0;
|
508
|
+
var postfix = Math.random();
|
509
|
+
var toString = functionUncurryThis(1.0.toString);
|
510
|
+
|
511
|
+
var uid = function (key) {
|
512
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
513
|
+
};
|
514
|
+
|
515
|
+
var WellKnownSymbolsStore = shared('wks');
|
516
|
+
var Symbol$1 = global_1.Symbol;
|
517
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
518
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
519
|
+
|
520
|
+
var wellKnownSymbol = function (name) {
|
521
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
522
|
+
var description = 'Symbol.' + name;
|
523
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
524
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
525
|
+
} else if (useSymbolAsUid && symbolFor) {
|
526
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
527
|
+
} else {
|
528
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
529
|
+
}
|
530
|
+
} return WellKnownSymbolsStore[name];
|
531
|
+
};
|
532
|
+
|
533
|
+
var TypeError$8 = global_1.TypeError;
|
534
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
535
|
+
|
536
|
+
// `ToPrimitive` abstract operation
|
537
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
538
|
+
var toPrimitive = function (input, pref) {
|
539
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
540
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
541
|
+
var result;
|
542
|
+
if (exoticToPrim) {
|
543
|
+
if (pref === undefined) pref = 'default';
|
544
|
+
result = functionCall(exoticToPrim, input, pref);
|
545
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
546
|
+
throw TypeError$8("Can't convert object to primitive value");
|
547
|
+
}
|
548
|
+
if (pref === undefined) pref = 'number';
|
549
|
+
return ordinaryToPrimitive(input, pref);
|
550
|
+
};
|
551
|
+
|
552
|
+
// `ToPropertyKey` abstract operation
|
553
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
554
|
+
var toPropertyKey = function (argument) {
|
555
|
+
var key = toPrimitive(argument, 'string');
|
556
|
+
return isSymbol(key) ? key : key + '';
|
331
557
|
};
|
332
558
|
|
333
559
|
var document$1 = global_1.document;
|
334
560
|
// typeof document.createElement is 'object' in old IE
|
335
|
-
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
561
|
+
var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
|
336
562
|
|
337
563
|
var documentCreateElement = function (it) {
|
338
|
-
return EXISTS ? document$1.createElement(it) : {};
|
564
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
339
565
|
};
|
340
566
|
|
341
|
-
//
|
567
|
+
// Thanks to IE8 for its funny defineProperty
|
342
568
|
var ie8DomDefine = !descriptors && !fails(function () {
|
343
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
569
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
344
570
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
345
571
|
get: function () { return 7; }
|
346
572
|
}).a != 7;
|
347
573
|
});
|
348
574
|
|
349
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
350
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
575
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
576
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
351
577
|
|
352
578
|
// `Object.getOwnPropertyDescriptor` method
|
353
579
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
354
|
-
var f$
|
580
|
+
var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
355
581
|
O = toIndexedObject(O);
|
356
|
-
P =
|
582
|
+
P = toPropertyKey(P);
|
357
583
|
if (ie8DomDefine) try {
|
358
|
-
return $getOwnPropertyDescriptor(O, P);
|
584
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
359
585
|
} catch (error) { /* empty */ }
|
360
|
-
if (
|
586
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
361
587
|
};
|
362
588
|
|
363
589
|
var objectGetOwnPropertyDescriptor = {
|
364
|
-
f: f$
|
590
|
+
f: f$4
|
365
591
|
};
|
366
592
|
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
593
|
+
// V8 ~ Chrome 36-
|
594
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
595
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
596
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
597
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
598
|
+
value: 42,
|
599
|
+
writable: false
|
600
|
+
}).prototype != 42;
|
601
|
+
});
|
602
|
+
|
603
|
+
var String$2 = global_1.String;
|
604
|
+
var TypeError$7 = global_1.TypeError;
|
605
|
+
|
606
|
+
// `Assert: Type(argument) is Object`
|
607
|
+
var anObject = function (argument) {
|
608
|
+
if (isObject(argument)) return argument;
|
609
|
+
throw TypeError$7(String$2(argument) + ' is not an object');
|
371
610
|
};
|
372
611
|
|
373
|
-
|
612
|
+
var TypeError$6 = global_1.TypeError;
|
613
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
374
614
|
var $defineProperty = Object.defineProperty;
|
615
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
616
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
617
|
+
var ENUMERABLE = 'enumerable';
|
618
|
+
var CONFIGURABLE$1 = 'configurable';
|
619
|
+
var WRITABLE = 'writable';
|
375
620
|
|
376
621
|
// `Object.defineProperty` method
|
377
622
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
378
|
-
var f$
|
623
|
+
var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
624
|
+
anObject(O);
|
625
|
+
P = toPropertyKey(P);
|
626
|
+
anObject(Attributes);
|
627
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
628
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
629
|
+
if (current && current[WRITABLE]) {
|
630
|
+
O[P] = Attributes.value;
|
631
|
+
Attributes = {
|
632
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
633
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
634
|
+
writable: false
|
635
|
+
};
|
636
|
+
}
|
637
|
+
} return $defineProperty(O, P, Attributes);
|
638
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
379
639
|
anObject(O);
|
380
|
-
P =
|
640
|
+
P = toPropertyKey(P);
|
381
641
|
anObject(Attributes);
|
382
642
|
if (ie8DomDefine) try {
|
383
643
|
return $defineProperty(O, P, Attributes);
|
384
644
|
} catch (error) { /* empty */ }
|
385
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
645
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
386
646
|
if ('value' in Attributes) O[P] = Attributes.value;
|
387
647
|
return O;
|
388
648
|
};
|
389
649
|
|
390
650
|
var objectDefineProperty = {
|
391
|
-
f: f$
|
651
|
+
f: f$3
|
392
652
|
};
|
393
653
|
|
394
654
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
@@ -398,25 +658,27 @@
|
|
398
658
|
return object;
|
399
659
|
};
|
400
660
|
|
401
|
-
var
|
402
|
-
|
403
|
-
|
404
|
-
} catch (error) {
|
405
|
-
global_1[key] = value;
|
406
|
-
} return value;
|
407
|
-
};
|
661
|
+
var FunctionPrototype$1 = Function.prototype;
|
662
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
663
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
408
664
|
|
409
|
-
var
|
410
|
-
|
665
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
666
|
+
// additional protection from minified / mangled / dropped function names
|
667
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
668
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
411
669
|
|
412
|
-
var
|
670
|
+
var functionName = {
|
671
|
+
EXISTS: EXISTS,
|
672
|
+
PROPER: PROPER,
|
673
|
+
CONFIGURABLE: CONFIGURABLE
|
674
|
+
};
|
413
675
|
|
414
|
-
var functionToString = Function.toString;
|
676
|
+
var functionToString = functionUncurryThis(Function.toString);
|
415
677
|
|
416
|
-
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
417
|
-
if (
|
678
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
679
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
418
680
|
sharedStore.inspectSource = function (it) {
|
419
|
-
return functionToString
|
681
|
+
return functionToString(it);
|
420
682
|
};
|
421
683
|
}
|
422
684
|
|
@@ -424,24 +686,7 @@
|
|
424
686
|
|
425
687
|
var WeakMap$1 = global_1.WeakMap;
|
426
688
|
|
427
|
-
var nativeWeakMap =
|
428
|
-
|
429
|
-
var shared = createCommonjsModule(function (module) {
|
430
|
-
(module.exports = function (key, value) {
|
431
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
432
|
-
})('versions', []).push({
|
433
|
-
version: '3.10.1',
|
434
|
-
mode: 'global',
|
435
|
-
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
436
|
-
});
|
437
|
-
});
|
438
|
-
|
439
|
-
var id = 0;
|
440
|
-
var postfix = Math.random();
|
441
|
-
|
442
|
-
var uid = function (key) {
|
443
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
444
|
-
};
|
689
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
445
690
|
|
446
691
|
var keys = shared('keys');
|
447
692
|
|
@@ -451,6 +696,8 @@
|
|
451
696
|
|
452
697
|
var hiddenKeys$1 = {};
|
453
698
|
|
699
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
700
|
+
var TypeError$5 = global_1.TypeError;
|
454
701
|
var WeakMap = global_1.WeakMap;
|
455
702
|
var set, get, has;
|
456
703
|
|
@@ -462,40 +709,42 @@
|
|
462
709
|
return function (it) {
|
463
710
|
var state;
|
464
711
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
465
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
712
|
+
throw TypeError$5('Incompatible receiver, ' + TYPE + ' required');
|
466
713
|
} return state;
|
467
714
|
};
|
468
715
|
};
|
469
716
|
|
470
|
-
if (nativeWeakMap) {
|
717
|
+
if (nativeWeakMap || sharedStore.state) {
|
471
718
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
472
|
-
var wmget = store.get;
|
473
|
-
var wmhas = store.has;
|
474
|
-
var wmset = store.set;
|
719
|
+
var wmget = functionUncurryThis(store.get);
|
720
|
+
var wmhas = functionUncurryThis(store.has);
|
721
|
+
var wmset = functionUncurryThis(store.set);
|
475
722
|
set = function (it, metadata) {
|
723
|
+
if (wmhas(store, it)) throw new TypeError$5(OBJECT_ALREADY_INITIALIZED);
|
476
724
|
metadata.facade = it;
|
477
|
-
wmset
|
725
|
+
wmset(store, it, metadata);
|
478
726
|
return metadata;
|
479
727
|
};
|
480
728
|
get = function (it) {
|
481
|
-
return wmget
|
729
|
+
return wmget(store, it) || {};
|
482
730
|
};
|
483
731
|
has = function (it) {
|
484
|
-
return wmhas
|
732
|
+
return wmhas(store, it);
|
485
733
|
};
|
486
734
|
} else {
|
487
735
|
var STATE = sharedKey('state');
|
488
736
|
hiddenKeys$1[STATE] = true;
|
489
737
|
set = function (it, metadata) {
|
738
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$5(OBJECT_ALREADY_INITIALIZED);
|
490
739
|
metadata.facade = it;
|
491
740
|
createNonEnumerableProperty(it, STATE, metadata);
|
492
741
|
return metadata;
|
493
742
|
};
|
494
743
|
get = function (it) {
|
495
|
-
return
|
744
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
496
745
|
};
|
497
746
|
has = function (it) {
|
498
|
-
return
|
747
|
+
return hasOwnProperty_1(it, STATE);
|
499
748
|
};
|
500
749
|
}
|
501
750
|
|
@@ -507,29 +756,56 @@
|
|
507
756
|
getterFor: getterFor
|
508
757
|
};
|
509
758
|
|
510
|
-
var
|
511
|
-
var
|
759
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
760
|
+
var defineProperty = objectDefineProperty.f;
|
761
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
762
|
+
|
763
|
+
|
764
|
+
|
512
765
|
var enforceInternalState = internalState.enforce;
|
766
|
+
var getInternalState = internalState.get;
|
767
|
+
|
768
|
+
var CONFIGURABLE_LENGTH = !fails(function () {
|
769
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
770
|
+
});
|
771
|
+
|
513
772
|
var TEMPLATE = String(String).split('String');
|
514
773
|
|
515
|
-
|
774
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
775
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
776
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
777
|
+
}
|
778
|
+
if (options && options.getter) name = 'get ' + name;
|
779
|
+
if (options && options.setter) name = 'set ' + name;
|
780
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
781
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
782
|
+
}
|
783
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
784
|
+
defineProperty(value, 'length', { value: options.arity });
|
785
|
+
}
|
786
|
+
var state = enforceInternalState(value);
|
787
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
788
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
789
|
+
} return value;
|
790
|
+
};
|
791
|
+
|
792
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
793
|
+
// eslint-disable-next-line no-extend-native -- required
|
794
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
795
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
796
|
+
}, 'toString');
|
797
|
+
});
|
798
|
+
|
799
|
+
var defineBuiltIn = function (O, key, value, options) {
|
516
800
|
var unsafe = options ? !!options.unsafe : false;
|
517
801
|
var simple = options ? !!options.enumerable : false;
|
518
802
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
519
|
-
var
|
520
|
-
if (
|
521
|
-
if (typeof key == 'string' && !has$1(value, 'name')) {
|
522
|
-
createNonEnumerableProperty(value, 'name', key);
|
523
|
-
}
|
524
|
-
state = enforceInternalState(value);
|
525
|
-
if (!state.source) {
|
526
|
-
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
527
|
-
}
|
528
|
-
}
|
803
|
+
var name = options && options.name !== undefined ? options.name : key;
|
804
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
529
805
|
if (O === global_1) {
|
530
806
|
if (simple) O[key] = value;
|
531
807
|
else setGlobal(key, value);
|
532
|
-
return;
|
808
|
+
return O;
|
533
809
|
} else if (!unsafe) {
|
534
810
|
delete O[key];
|
535
811
|
} else if (!noTargetGet && O[key]) {
|
@@ -537,56 +813,50 @@
|
|
537
813
|
}
|
538
814
|
if (simple) O[key] = value;
|
539
815
|
else createNonEnumerableProperty(O, key, value);
|
540
|
-
|
541
|
-
})(Function.prototype, 'toString', function toString() {
|
542
|
-
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
|
543
|
-
});
|
544
|
-
});
|
545
|
-
|
546
|
-
var path = global_1;
|
547
|
-
|
548
|
-
var aFunction$1 = function (variable) {
|
549
|
-
return typeof variable == 'function' ? variable : undefined;
|
550
|
-
};
|
551
|
-
|
552
|
-
var getBuiltIn = function (namespace, method) {
|
553
|
-
return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
|
554
|
-
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
816
|
+
return O;
|
555
817
|
};
|
556
818
|
|
557
819
|
var ceil = Math.ceil;
|
558
820
|
var floor$1 = Math.floor;
|
559
821
|
|
560
|
-
// `
|
561
|
-
// https://tc39.es/ecma262/#sec-
|
562
|
-
var
|
563
|
-
|
822
|
+
// `ToIntegerOrInfinity` abstract operation
|
823
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
824
|
+
var toIntegerOrInfinity = function (argument) {
|
825
|
+
var number = +argument;
|
826
|
+
// eslint-disable-next-line no-self-compare -- safe
|
827
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
|
564
828
|
};
|
565
829
|
|
830
|
+
var max$2 = Math.max;
|
566
831
|
var min$3 = Math.min;
|
567
832
|
|
833
|
+
// Helper for a popular repeating case of the spec:
|
834
|
+
// Let integer be ? ToInteger(index).
|
835
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
836
|
+
var toAbsoluteIndex = function (index, length) {
|
837
|
+
var integer = toIntegerOrInfinity(index);
|
838
|
+
return integer < 0 ? max$2(integer + length, 0) : min$3(integer, length);
|
839
|
+
};
|
840
|
+
|
841
|
+
var min$2 = Math.min;
|
842
|
+
|
568
843
|
// `ToLength` abstract operation
|
569
844
|
// https://tc39.es/ecma262/#sec-tolength
|
570
845
|
var toLength = function (argument) {
|
571
|
-
return argument > 0 ? min$
|
846
|
+
return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
572
847
|
};
|
573
848
|
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
// Let integer be ? ToInteger(index).
|
579
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
580
|
-
var toAbsoluteIndex = function (index, length) {
|
581
|
-
var integer = toInteger(index);
|
582
|
-
return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
|
849
|
+
// `LengthOfArrayLike` abstract operation
|
850
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
851
|
+
var lengthOfArrayLike = function (obj) {
|
852
|
+
return toLength(obj.length);
|
583
853
|
};
|
584
854
|
|
585
855
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
586
856
|
var createMethod$2 = function (IS_INCLUDES) {
|
587
857
|
return function ($this, el, fromIndex) {
|
588
858
|
var O = toIndexedObject($this);
|
589
|
-
var length =
|
859
|
+
var length = lengthOfArrayLike(O);
|
590
860
|
var index = toAbsoluteIndex(fromIndex, length);
|
591
861
|
var value;
|
592
862
|
// Array#includes uses SameValueZero equality algorithm
|
@@ -611,18 +881,20 @@
|
|
611
881
|
indexOf: createMethod$2(false)
|
612
882
|
};
|
613
883
|
|
614
|
-
var indexOf = arrayIncludes.indexOf;
|
884
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
615
885
|
|
616
886
|
|
887
|
+
var push$3 = functionUncurryThis([].push);
|
888
|
+
|
617
889
|
var objectKeysInternal = function (object, names) {
|
618
890
|
var O = toIndexedObject(object);
|
619
891
|
var i = 0;
|
620
892
|
var result = [];
|
621
893
|
var key;
|
622
|
-
for (key in O) !
|
894
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$3(result, key);
|
623
895
|
// Don't enum bug & hidden keys
|
624
|
-
while (names.length > i) if (
|
625
|
-
~indexOf(result, key) ||
|
896
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
897
|
+
~indexOf$1(result, key) || push$3(result, key);
|
626
898
|
}
|
627
899
|
return result;
|
628
900
|
};
|
@@ -642,36 +914,40 @@
|
|
642
914
|
|
643
915
|
// `Object.getOwnPropertyNames` method
|
644
916
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
645
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
646
|
-
var f$
|
917
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
918
|
+
var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
647
919
|
return objectKeysInternal(O, hiddenKeys);
|
648
920
|
};
|
649
921
|
|
650
922
|
var objectGetOwnPropertyNames = {
|
651
|
-
f: f$
|
923
|
+
f: f$2
|
652
924
|
};
|
653
925
|
|
654
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
655
|
-
var f = Object.getOwnPropertySymbols;
|
926
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
927
|
+
var f$1 = Object.getOwnPropertySymbols;
|
656
928
|
|
657
929
|
var objectGetOwnPropertySymbols = {
|
658
|
-
f: f
|
930
|
+
f: f$1
|
659
931
|
};
|
660
932
|
|
933
|
+
var concat$1 = functionUncurryThis([].concat);
|
934
|
+
|
661
935
|
// all object keys, includes non-enumerable and symbols
|
662
936
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
663
937
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
664
938
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
665
|
-
return getOwnPropertySymbols ?
|
939
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
666
940
|
};
|
667
941
|
|
668
|
-
var copyConstructorProperties = function (target, source) {
|
942
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
669
943
|
var keys = ownKeys(source);
|
670
944
|
var defineProperty = objectDefineProperty.f;
|
671
945
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
672
946
|
for (var i = 0; i < keys.length; i++) {
|
673
947
|
var key = keys[i];
|
674
|
-
if (!
|
948
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
949
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
950
|
+
}
|
675
951
|
}
|
676
952
|
};
|
677
953
|
|
@@ -681,7 +957,7 @@
|
|
681
957
|
var value = data[normalize(feature)];
|
682
958
|
return value == POLYFILL ? true
|
683
959
|
: value == NATIVE ? false
|
684
|
-
:
|
960
|
+
: isCallable(detection) ? fails(detection)
|
685
961
|
: !!detection;
|
686
962
|
};
|
687
963
|
|
@@ -715,6 +991,7 @@
|
|
715
991
|
options.sham - add a flag to not completely full polyfills
|
716
992
|
options.enumerable - export as enumerable property
|
717
993
|
options.noTargetGet - prevent calling a getter on target
|
994
|
+
options.name - the .name of the function if it does not match the key
|
718
995
|
*/
|
719
996
|
var _export = function (options, source) {
|
720
997
|
var TARGET = options.target;
|
@@ -737,104 +1014,330 @@
|
|
737
1014
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
738
1015
|
// contained in target
|
739
1016
|
if (!FORCED && targetProperty !== undefined) {
|
740
|
-
if (typeof sourceProperty
|
1017
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
741
1018
|
copyConstructorProperties(sourceProperty, targetProperty);
|
742
1019
|
}
|
743
1020
|
// add a flag to not completely full polyfills
|
744
1021
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
745
1022
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
746
1023
|
}
|
747
|
-
|
748
|
-
redefine(target, key, sourceProperty, options);
|
1024
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
749
1025
|
}
|
750
1026
|
};
|
751
1027
|
|
752
|
-
// `
|
753
|
-
// https://tc39.es/ecma262/#sec-
|
754
|
-
// eslint-disable-next-line es/no-
|
755
|
-
var
|
756
|
-
return
|
1028
|
+
// `Object.keys` method
|
1029
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
1030
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
1031
|
+
var objectKeys = Object.keys || function keys(O) {
|
1032
|
+
return objectKeysInternal(O, enumBugKeys);
|
757
1033
|
};
|
758
1034
|
|
759
|
-
// `
|
760
|
-
// https://tc39.es/ecma262/#sec-
|
761
|
-
|
762
|
-
|
1035
|
+
// `Object.defineProperties` method
|
1036
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1037
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
1038
|
+
var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
1039
|
+
anObject(O);
|
1040
|
+
var props = toIndexedObject(Properties);
|
1041
|
+
var keys = objectKeys(Properties);
|
1042
|
+
var length = keys.length;
|
1043
|
+
var index = 0;
|
1044
|
+
var key;
|
1045
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
1046
|
+
return O;
|
763
1047
|
};
|
764
1048
|
|
765
|
-
var
|
766
|
-
|
767
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
768
|
-
else object[propertyKey] = value;
|
1049
|
+
var objectDefineProperties = {
|
1050
|
+
f: f
|
769
1051
|
};
|
770
1052
|
|
771
|
-
var
|
772
|
-
|
773
|
-
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
1053
|
+
var html = getBuiltIn('document', 'documentElement');
|
774
1054
|
|
775
|
-
|
776
|
-
var versions = process && process.versions;
|
777
|
-
var v8 = versions && versions.v8;
|
778
|
-
var match, version;
|
1055
|
+
/* global ActiveXObject -- old IE, WSH */
|
779
1056
|
|
780
|
-
if (v8) {
|
781
|
-
match = v8.split('.');
|
782
|
-
version = match[0] + match[1];
|
783
|
-
} else if (engineUserAgent) {
|
784
|
-
match = engineUserAgent.match(/Edge\/(\d+)/);
|
785
|
-
if (!match || match[1] >= 74) {
|
786
|
-
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
787
|
-
if (match) version = match[1];
|
788
|
-
}
|
789
|
-
}
|
790
1057
|
|
791
|
-
var engineV8Version = version && +version;
|
792
1058
|
|
793
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
794
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
795
|
-
// eslint-disable-next-line es/no-symbol -- required for testing
|
796
|
-
return !Symbol.sham &&
|
797
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
798
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
799
|
-
(engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
|
800
|
-
});
|
801
1059
|
|
802
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
803
1060
|
|
804
1061
|
|
805
|
-
var useSymbolAsUid = nativeSymbol
|
806
|
-
&& !Symbol.sham
|
807
|
-
&& typeof Symbol.iterator == 'symbol';
|
808
1062
|
|
809
|
-
var WellKnownSymbolsStore = shared('wks');
|
810
|
-
var Symbol$1 = global_1.Symbol;
|
811
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
812
1063
|
|
813
|
-
var
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
1064
|
+
var GT = '>';
|
1065
|
+
var LT = '<';
|
1066
|
+
var PROTOTYPE = 'prototype';
|
1067
|
+
var SCRIPT = 'script';
|
1068
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
1069
|
+
|
1070
|
+
var EmptyConstructor = function () { /* empty */ };
|
1071
|
+
|
1072
|
+
var scriptTag = function (content) {
|
1073
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
1074
|
+
};
|
1075
|
+
|
1076
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
1077
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
1078
|
+
activeXDocument.write(scriptTag(''));
|
1079
|
+
activeXDocument.close();
|
1080
|
+
var temp = activeXDocument.parentWindow.Object;
|
1081
|
+
activeXDocument = null; // avoid memory leak
|
1082
|
+
return temp;
|
1083
|
+
};
|
1084
|
+
|
1085
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
1086
|
+
var NullProtoObjectViaIFrame = function () {
|
1087
|
+
// Thrash, waste and sodomy: IE GC bug
|
1088
|
+
var iframe = documentCreateElement('iframe');
|
1089
|
+
var JS = 'java' + SCRIPT + ':';
|
1090
|
+
var iframeDocument;
|
1091
|
+
iframe.style.display = 'none';
|
1092
|
+
html.appendChild(iframe);
|
1093
|
+
// https://github.com/zloirock/core-js/issues/475
|
1094
|
+
iframe.src = String(JS);
|
1095
|
+
iframeDocument = iframe.contentWindow.document;
|
1096
|
+
iframeDocument.open();
|
1097
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
1098
|
+
iframeDocument.close();
|
1099
|
+
return iframeDocument.F;
|
1100
|
+
};
|
1101
|
+
|
1102
|
+
// Check for document.domain and active x support
|
1103
|
+
// No need to use active x approach when document.domain is not set
|
1104
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
1105
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
1106
|
+
// avoid IE GC bug
|
1107
|
+
var activeXDocument;
|
1108
|
+
var NullProtoObject = function () {
|
1109
|
+
try {
|
1110
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
1111
|
+
} catch (error) { /* ignore */ }
|
1112
|
+
NullProtoObject = typeof document != 'undefined'
|
1113
|
+
? document.domain && activeXDocument
|
1114
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
1115
|
+
: NullProtoObjectViaIFrame()
|
1116
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
1117
|
+
var length = enumBugKeys.length;
|
1118
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1119
|
+
return NullProtoObject();
|
1120
|
+
};
|
1121
|
+
|
1122
|
+
hiddenKeys$1[IE_PROTO] = true;
|
1123
|
+
|
1124
|
+
// `Object.create` method
|
1125
|
+
// https://tc39.es/ecma262/#sec-object.create
|
1126
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
1127
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
1128
|
+
var result;
|
1129
|
+
if (O !== null) {
|
1130
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
1131
|
+
result = new EmptyConstructor();
|
1132
|
+
EmptyConstructor[PROTOTYPE] = null;
|
1133
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
1134
|
+
result[IE_PROTO] = O;
|
1135
|
+
} else result = NullProtoObject();
|
1136
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
1137
|
+
};
|
1138
|
+
|
1139
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
1140
|
+
var ArrayPrototype = Array.prototype;
|
1141
|
+
|
1142
|
+
// Array.prototype[@@unscopables]
|
1143
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
1144
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
1145
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
1146
|
+
configurable: true,
|
1147
|
+
value: objectCreate(null)
|
1148
|
+
});
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
// add a key to Array.prototype[@@unscopables]
|
1152
|
+
var addToUnscopables = function (key) {
|
1153
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
1154
|
+
};
|
1155
|
+
|
1156
|
+
var $includes = arrayIncludes.includes;
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
// FF99+ bug
|
1161
|
+
var BROKEN_ON_SPARSE = fails(function () {
|
1162
|
+
return !Array(1).includes();
|
1163
|
+
});
|
1164
|
+
|
1165
|
+
// `Array.prototype.includes` method
|
1166
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
1167
|
+
_export({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
1168
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
1169
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
1170
|
+
}
|
1171
|
+
});
|
1172
|
+
|
1173
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
1174
|
+
addToUnscopables('includes');
|
1175
|
+
|
1176
|
+
var MATCH$1 = wellKnownSymbol('match');
|
1177
|
+
|
1178
|
+
// `IsRegExp` abstract operation
|
1179
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
1180
|
+
var isRegexp = function (it) {
|
1181
|
+
var isRegExp;
|
1182
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1183
|
+
};
|
1184
|
+
|
1185
|
+
var TypeError$4 = global_1.TypeError;
|
1186
|
+
|
1187
|
+
var notARegexp = function (it) {
|
1188
|
+
if (isRegexp(it)) {
|
1189
|
+
throw TypeError$4("The method doesn't accept regular expressions");
|
1190
|
+
} return it;
|
1191
|
+
};
|
1192
|
+
|
1193
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
1194
|
+
var test = {};
|
1195
|
+
|
1196
|
+
test[TO_STRING_TAG$1] = 'z';
|
1197
|
+
|
1198
|
+
var toStringTagSupport = String(test) === '[object z]';
|
1199
|
+
|
1200
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1201
|
+
var Object$1 = global_1.Object;
|
1202
|
+
|
1203
|
+
// ES3 wrong here
|
1204
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1205
|
+
|
1206
|
+
// fallback for IE11 Script Access Denied error
|
1207
|
+
var tryGet = function (it, key) {
|
1208
|
+
try {
|
1209
|
+
return it[key];
|
1210
|
+
} catch (error) { /* empty */ }
|
1211
|
+
};
|
1212
|
+
|
1213
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
1214
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1215
|
+
var O, tag, result;
|
1216
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1217
|
+
// @@toStringTag case
|
1218
|
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
1219
|
+
// builtinTag case
|
1220
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1221
|
+
// ES3 arguments fallback
|
1222
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
1223
|
+
};
|
1224
|
+
|
1225
|
+
var String$1 = global_1.String;
|
1226
|
+
|
1227
|
+
var toString_1 = function (argument) {
|
1228
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
1229
|
+
return String$1(argument);
|
1230
|
+
};
|
1231
|
+
|
1232
|
+
var MATCH = wellKnownSymbol('match');
|
1233
|
+
|
1234
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
1235
|
+
var regexp = /./;
|
1236
|
+
try {
|
1237
|
+
'/./'[METHOD_NAME](regexp);
|
1238
|
+
} catch (error1) {
|
1239
|
+
try {
|
1240
|
+
regexp[MATCH] = false;
|
1241
|
+
return '/./'[METHOD_NAME](regexp);
|
1242
|
+
} catch (error2) { /* empty */ }
|
1243
|
+
} return false;
|
1244
|
+
};
|
1245
|
+
|
1246
|
+
var stringIndexOf$1 = functionUncurryThis(''.indexOf);
|
1247
|
+
|
1248
|
+
// `String.prototype.includes` method
|
1249
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
1250
|
+
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
1251
|
+
includes: function includes(searchString /* , position = 0 */) {
|
1252
|
+
return !!~stringIndexOf$1(
|
1253
|
+
toString_1(requireObjectCoercible(this)),
|
1254
|
+
toString_1(notARegexp(searchString)),
|
1255
|
+
arguments.length > 1 ? arguments[1] : undefined
|
1256
|
+
);
|
1257
|
+
}
|
1258
|
+
});
|
1259
|
+
|
1260
|
+
// `IsArray` abstract operation
|
1261
|
+
// https://tc39.es/ecma262/#sec-isarray
|
1262
|
+
// eslint-disable-next-line es-x/no-array-isarray -- safe
|
1263
|
+
var isArray = Array.isArray || function isArray(argument) {
|
1264
|
+
return classofRaw(argument) == 'Array';
|
1265
|
+
};
|
1266
|
+
|
1267
|
+
var createProperty = function (object, key, value) {
|
1268
|
+
var propertyKey = toPropertyKey(key);
|
1269
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
1270
|
+
else object[propertyKey] = value;
|
821
1271
|
};
|
822
1272
|
|
1273
|
+
var noop = function () { /* empty */ };
|
1274
|
+
var empty = [];
|
1275
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
1276
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
1277
|
+
var exec$1 = functionUncurryThis(constructorRegExp.exec);
|
1278
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
1279
|
+
|
1280
|
+
var isConstructorModern = function isConstructor(argument) {
|
1281
|
+
if (!isCallable(argument)) return false;
|
1282
|
+
try {
|
1283
|
+
construct(noop, empty, argument);
|
1284
|
+
return true;
|
1285
|
+
} catch (error) {
|
1286
|
+
return false;
|
1287
|
+
}
|
1288
|
+
};
|
1289
|
+
|
1290
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
1291
|
+
if (!isCallable(argument)) return false;
|
1292
|
+
switch (classof(argument)) {
|
1293
|
+
case 'AsyncFunction':
|
1294
|
+
case 'GeneratorFunction':
|
1295
|
+
case 'AsyncGeneratorFunction': return false;
|
1296
|
+
}
|
1297
|
+
try {
|
1298
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
1299
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
1300
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
1301
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
|
1302
|
+
} catch (error) {
|
1303
|
+
return true;
|
1304
|
+
}
|
1305
|
+
};
|
1306
|
+
|
1307
|
+
isConstructorLegacy.sham = true;
|
1308
|
+
|
1309
|
+
// `IsConstructor` abstract operation
|
1310
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
1311
|
+
var isConstructor = !construct || fails(function () {
|
1312
|
+
var called;
|
1313
|
+
return isConstructorModern(isConstructorModern.call)
|
1314
|
+
|| !isConstructorModern(Object)
|
1315
|
+
|| !isConstructorModern(function () { called = true; })
|
1316
|
+
|| called;
|
1317
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
1318
|
+
|
823
1319
|
var SPECIES$3 = wellKnownSymbol('species');
|
1320
|
+
var Array$2 = global_1.Array;
|
824
1321
|
|
825
|
-
// `ArraySpeciesCreate` abstract operation
|
1322
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
826
1323
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
827
|
-
var
|
1324
|
+
var arraySpeciesConstructor = function (originalArray) {
|
828
1325
|
var C;
|
829
1326
|
if (isArray(originalArray)) {
|
830
1327
|
C = originalArray.constructor;
|
831
1328
|
// cross-realm fallback
|
832
|
-
if (
|
1329
|
+
if (isConstructor(C) && (C === Array$2 || isArray(C.prototype))) C = undefined;
|
833
1330
|
else if (isObject(C)) {
|
834
1331
|
C = C[SPECIES$3];
|
835
1332
|
if (C === null) C = undefined;
|
836
1333
|
}
|
837
|
-
} return
|
1334
|
+
} return C === undefined ? Array$2 : C;
|
1335
|
+
};
|
1336
|
+
|
1337
|
+
// `ArraySpeciesCreate` abstract operation
|
1338
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
1339
|
+
var arraySpeciesCreate = function (originalArray, length) {
|
1340
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
838
1341
|
};
|
839
1342
|
|
840
1343
|
var SPECIES$2 = wellKnownSymbol('species');
|
@@ -856,6 +1359,7 @@
|
|
856
1359
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
857
1360
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
858
1361
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
1362
|
+
var TypeError$3 = global_1.TypeError;
|
859
1363
|
|
860
1364
|
// We can't use this feature detection in V8 since it causes
|
861
1365
|
// deoptimization and serious performance degradation
|
@@ -879,7 +1383,7 @@
|
|
879
1383
|
// `Array.prototype.concat` method
|
880
1384
|
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
881
1385
|
// with adding support of @@isConcatSpreadable and @@species
|
882
|
-
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
1386
|
+
_export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
883
1387
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
884
1388
|
concat: function concat(arg) {
|
885
1389
|
var O = toObject(this);
|
@@ -889,11 +1393,11 @@
|
|
889
1393
|
for (i = -1, length = arguments.length; i < length; i++) {
|
890
1394
|
E = i === -1 ? O : arguments[i];
|
891
1395
|
if (isConcatSpreadable(E)) {
|
892
|
-
len =
|
893
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1396
|
+
len = lengthOfArrayLike(E);
|
1397
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
894
1398
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
895
1399
|
} else {
|
896
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
1400
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$3(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
897
1401
|
createProperty(A, n++, E);
|
898
1402
|
}
|
899
1403
|
}
|
@@ -902,32 +1406,12 @@
|
|
902
1406
|
}
|
903
1407
|
});
|
904
1408
|
|
905
|
-
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
906
|
-
var method = [][METHOD_NAME];
|
907
|
-
return !!method && fails(function () {
|
908
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
|
909
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
910
|
-
});
|
911
|
-
};
|
912
|
-
|
913
|
-
var nativeJoin = [].join;
|
914
|
-
|
915
|
-
var ES3_STRINGS = indexedObject != Object;
|
916
|
-
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
917
|
-
|
918
|
-
// `Array.prototype.join` method
|
919
|
-
// https://tc39.es/ecma262/#sec-array.prototype.join
|
920
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
921
|
-
join: function join(separator) {
|
922
|
-
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
923
|
-
}
|
924
|
-
});
|
925
|
-
|
926
1409
|
// `RegExp.prototype.flags` getter implementation
|
927
1410
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
928
1411
|
var regexpFlags = function () {
|
929
1412
|
var that = anObject(this);
|
930
1413
|
var result = '';
|
1414
|
+
if (that.hasIndices) result += 'd';
|
931
1415
|
if (that.global) result += 'g';
|
932
1416
|
if (that.ignoreCase) result += 'i';
|
933
1417
|
if (that.multiline) result += 'm';
|
@@ -937,71 +1421,118 @@
|
|
937
1421
|
return result;
|
938
1422
|
};
|
939
1423
|
|
940
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
941
|
-
|
942
|
-
function RE(s, f) {
|
943
|
-
return RegExp(s, f);
|
944
|
-
}
|
1424
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
1425
|
+
var $RegExp$2 = global_1.RegExp;
|
945
1426
|
|
946
1427
|
var UNSUPPORTED_Y$2 = fails(function () {
|
947
|
-
|
948
|
-
var re = RE('a', 'y');
|
1428
|
+
var re = $RegExp$2('a', 'y');
|
949
1429
|
re.lastIndex = 2;
|
950
1430
|
return re.exec('abcd') != null;
|
951
1431
|
});
|
952
1432
|
|
953
|
-
|
1433
|
+
// UC Browser bug
|
1434
|
+
// https://github.com/zloirock/core-js/issues/1008
|
1435
|
+
var MISSED_STICKY = UNSUPPORTED_Y$2 || fails(function () {
|
1436
|
+
return !$RegExp$2('a', 'y').sticky;
|
1437
|
+
});
|
1438
|
+
|
1439
|
+
var BROKEN_CARET = UNSUPPORTED_Y$2 || fails(function () {
|
954
1440
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
955
|
-
var re =
|
1441
|
+
var re = $RegExp$2('^r', 'gy');
|
956
1442
|
re.lastIndex = 2;
|
957
1443
|
return re.exec('str') != null;
|
958
1444
|
});
|
959
1445
|
|
960
1446
|
var regexpStickyHelpers = {
|
961
|
-
|
962
|
-
|
1447
|
+
BROKEN_CARET: BROKEN_CARET,
|
1448
|
+
MISSED_STICKY: MISSED_STICKY,
|
1449
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$2
|
963
1450
|
};
|
964
1451
|
|
965
|
-
|
966
|
-
var
|
1452
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
1453
|
+
var $RegExp$1 = global_1.RegExp;
|
1454
|
+
|
1455
|
+
var regexpUnsupportedDotAll = fails(function () {
|
1456
|
+
var re = $RegExp$1('.', 's');
|
1457
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
1458
|
+
});
|
1459
|
+
|
1460
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
1461
|
+
var $RegExp = global_1.RegExp;
|
1462
|
+
|
1463
|
+
var regexpUnsupportedNcg = fails(function () {
|
1464
|
+
var re = $RegExp('(?<a>b)', 'g');
|
1465
|
+
return re.exec('b').groups.a !== 'b' ||
|
1466
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
1467
|
+
});
|
1468
|
+
|
1469
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
1470
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
1471
|
+
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
|
967
1476
|
|
1477
|
+
|
1478
|
+
var getInternalState = internalState.get;
|
1479
|
+
|
1480
|
+
|
1481
|
+
|
1482
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
1483
|
+
var nativeExec = RegExp.prototype.exec;
|
968
1484
|
var patchedExec = nativeExec;
|
1485
|
+
var charAt$3 = functionUncurryThis(''.charAt);
|
1486
|
+
var indexOf = functionUncurryThis(''.indexOf);
|
1487
|
+
var replace$1 = functionUncurryThis(''.replace);
|
1488
|
+
var stringSlice$4 = functionUncurryThis(''.slice);
|
969
1489
|
|
970
1490
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
971
1491
|
var re1 = /a/;
|
972
1492
|
var re2 = /b*/g;
|
973
|
-
nativeExec
|
974
|
-
nativeExec
|
1493
|
+
functionCall(nativeExec, re1, 'a');
|
1494
|
+
functionCall(nativeExec, re2, 'a');
|
975
1495
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
976
1496
|
})();
|
977
1497
|
|
978
|
-
var UNSUPPORTED_Y$1 = regexpStickyHelpers.
|
1498
|
+
var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET;
|
979
1499
|
|
980
1500
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
981
|
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
982
1501
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
983
1502
|
|
984
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
|
1503
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
|
985
1504
|
|
986
1505
|
if (PATCH) {
|
987
|
-
patchedExec = function exec(
|
1506
|
+
patchedExec = function exec(string) {
|
988
1507
|
var re = this;
|
989
|
-
var
|
1508
|
+
var state = getInternalState(re);
|
1509
|
+
var str = toString_1(string);
|
1510
|
+
var raw = state.raw;
|
1511
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
1512
|
+
|
1513
|
+
if (raw) {
|
1514
|
+
raw.lastIndex = re.lastIndex;
|
1515
|
+
result = functionCall(patchedExec, raw, str);
|
1516
|
+
re.lastIndex = raw.lastIndex;
|
1517
|
+
return result;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
var groups = state.groups;
|
990
1521
|
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
991
|
-
var flags = regexpFlags
|
1522
|
+
var flags = functionCall(regexpFlags, re);
|
992
1523
|
var source = re.source;
|
993
1524
|
var charsAdded = 0;
|
994
1525
|
var strCopy = str;
|
995
1526
|
|
996
1527
|
if (sticky) {
|
997
|
-
flags =
|
998
|
-
if (
|
1528
|
+
flags = replace$1(flags, 'y', '');
|
1529
|
+
if (indexOf(flags, 'g') === -1) {
|
999
1530
|
flags += 'g';
|
1000
1531
|
}
|
1001
1532
|
|
1002
|
-
strCopy =
|
1533
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
1003
1534
|
// Support anchored sticky behavior.
|
1004
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str
|
1535
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
1005
1536
|
source = '(?: ' + source + ')';
|
1006
1537
|
strCopy = ' ' + strCopy;
|
1007
1538
|
charsAdded++;
|
@@ -1016,12 +1547,12 @@
|
|
1016
1547
|
}
|
1017
1548
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
1018
1549
|
|
1019
|
-
match = nativeExec
|
1550
|
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
1020
1551
|
|
1021
1552
|
if (sticky) {
|
1022
1553
|
if (match) {
|
1023
|
-
match.input = match.input
|
1024
|
-
match[0] = match[0]
|
1554
|
+
match.input = stringSlice$4(match.input, charsAdded);
|
1555
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
1025
1556
|
match.index = re.lastIndex;
|
1026
1557
|
re.lastIndex += match[0].length;
|
1027
1558
|
} else re.lastIndex = 0;
|
@@ -1031,13 +1562,21 @@
|
|
1031
1562
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
1032
1563
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
1033
1564
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
1034
|
-
nativeReplace
|
1565
|
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
1035
1566
|
for (i = 1; i < arguments.length - 2; i++) {
|
1036
1567
|
if (arguments[i] === undefined) match[i] = undefined;
|
1037
1568
|
}
|
1038
1569
|
});
|
1039
1570
|
}
|
1040
1571
|
|
1572
|
+
if (match && groups) {
|
1573
|
+
match.groups = object = objectCreate(null);
|
1574
|
+
for (i = 0; i < groups.length; i++) {
|
1575
|
+
group = groups[i];
|
1576
|
+
object[group[0]] = match[group[1]];
|
1577
|
+
}
|
1578
|
+
}
|
1579
|
+
|
1041
1580
|
return match;
|
1042
1581
|
};
|
1043
1582
|
}
|
@@ -1050,56 +1589,28 @@
|
|
1050
1589
|
exec: regexpExec
|
1051
1590
|
});
|
1052
1591
|
|
1053
|
-
|
1592
|
+
var FunctionPrototype = Function.prototype;
|
1593
|
+
var apply = FunctionPrototype.apply;
|
1594
|
+
var call = FunctionPrototype.call;
|
1054
1595
|
|
1596
|
+
// eslint-disable-next-line es-x/no-reflect -- safe
|
1597
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
|
1598
|
+
return call.apply(apply, arguments);
|
1599
|
+
});
|
1055
1600
|
|
1601
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
1056
1602
|
|
1057
1603
|
|
1058
1604
|
|
1059
1605
|
|
1060
|
-
var SPECIES$1 = wellKnownSymbol('species');
|
1061
1606
|
|
1062
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1063
|
-
// #replace needs built-in support for named groups.
|
1064
|
-
// #match works fine because it just return the exec results, even if it has
|
1065
|
-
// a "grops" property.
|
1066
|
-
var re = /./;
|
1067
|
-
re.exec = function () {
|
1068
|
-
var result = [];
|
1069
|
-
result.groups = { a: '7' };
|
1070
|
-
return result;
|
1071
|
-
};
|
1072
|
-
return ''.replace(re, '$<a>') !== '7';
|
1073
|
-
});
|
1074
1607
|
|
1075
|
-
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1076
|
-
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1077
|
-
var REPLACE_KEEPS_$0 = (function () {
|
1078
|
-
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
1079
|
-
return 'a'.replace(/./, '$0') === '$0';
|
1080
|
-
})();
|
1081
1608
|
|
1082
|
-
var REPLACE = wellKnownSymbol('replace');
|
1083
|
-
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
1084
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
1085
|
-
if (/./[REPLACE]) {
|
1086
|
-
return /./[REPLACE]('a', '$0') === '';
|
1087
|
-
}
|
1088
|
-
return false;
|
1089
|
-
})();
|
1090
1609
|
|
1091
|
-
|
1092
|
-
|
1093
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
1094
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1095
|
-
var re = /(?:)/;
|
1096
|
-
var originalExec = re.exec;
|
1097
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
1098
|
-
var result = 'ab'.split(re);
|
1099
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1100
|
-
});
|
1610
|
+
var SPECIES$1 = wellKnownSymbol('species');
|
1611
|
+
var RegExpPrototype$2 = RegExp.prototype;
|
1101
1612
|
|
1102
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY,
|
1613
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
1103
1614
|
var SYMBOL = wellKnownSymbol(KEY);
|
1104
1615
|
|
1105
1616
|
var DELEGATES_TO_SYMBOL = !fails(function () {
|
@@ -1136,84 +1647,51 @@
|
|
1136
1647
|
if (
|
1137
1648
|
!DELEGATES_TO_SYMBOL ||
|
1138
1649
|
!DELEGATES_TO_EXEC ||
|
1139
|
-
|
1140
|
-
REPLACE_SUPPORTS_NAMED_GROUPS &&
|
1141
|
-
REPLACE_KEEPS_$0 &&
|
1142
|
-
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1143
|
-
)) ||
|
1144
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
1650
|
+
FORCED
|
1145
1651
|
) {
|
1146
|
-
var
|
1652
|
+
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
|
1147
1653
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
1148
|
-
|
1654
|
+
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
|
1655
|
+
var $exec = regexp.exec;
|
1656
|
+
if ($exec === regexpExec || $exec === RegExpPrototype$2.exec) {
|
1149
1657
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
1150
1658
|
// The native String method already delegates to @@method (this
|
1151
1659
|
// polyfilled function), leasing to infinite recursion.
|
1152
1660
|
// We avoid it by directly calling the native @@method method.
|
1153
|
-
return { done: true, value:
|
1661
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
1154
1662
|
}
|
1155
|
-
return { done: true, value:
|
1663
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
1156
1664
|
}
|
1157
1665
|
return { done: false };
|
1158
|
-
}, {
|
1159
|
-
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
|
1160
|
-
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
|
1161
1666
|
});
|
1162
|
-
var stringMethod = methods[0];
|
1163
|
-
var regexMethod = methods[1];
|
1164
|
-
|
1165
|
-
redefine(String.prototype, KEY, stringMethod);
|
1166
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1167
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1168
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1169
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1170
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1171
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1172
|
-
: function (string) { return regexMethod.call(string, this); }
|
1173
|
-
);
|
1174
|
-
}
|
1175
|
-
|
1176
|
-
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
|
1177
|
-
};
|
1178
|
-
|
1179
|
-
var MATCH = wellKnownSymbol('match');
|
1180
1667
|
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
var isRegExp;
|
1185
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
1186
|
-
};
|
1668
|
+
defineBuiltIn(String.prototype, KEY, methods[0]);
|
1669
|
+
defineBuiltIn(RegExpPrototype$2, SYMBOL, methods[1]);
|
1670
|
+
}
|
1187
1671
|
|
1188
|
-
|
1189
|
-
if (typeof it != 'function') {
|
1190
|
-
throw TypeError(String(it) + ' is not a function');
|
1191
|
-
} return it;
|
1672
|
+
if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
|
1192
1673
|
};
|
1193
1674
|
|
1194
|
-
var
|
1195
|
-
|
1196
|
-
|
1197
|
-
// https://tc39.es/ecma262/#sec-speciesconstructor
|
1198
|
-
var speciesConstructor = function (O, defaultConstructor) {
|
1199
|
-
var C = anObject(O).constructor;
|
1200
|
-
var S;
|
1201
|
-
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
|
1202
|
-
};
|
1675
|
+
var charAt$2 = functionUncurryThis(''.charAt);
|
1676
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
1677
|
+
var stringSlice$3 = functionUncurryThis(''.slice);
|
1203
1678
|
|
1204
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1205
1679
|
var createMethod$1 = function (CONVERT_TO_STRING) {
|
1206
1680
|
return function ($this, pos) {
|
1207
|
-
var S =
|
1208
|
-
var position =
|
1681
|
+
var S = toString_1(requireObjectCoercible($this));
|
1682
|
+
var position = toIntegerOrInfinity(pos);
|
1209
1683
|
var size = S.length;
|
1210
1684
|
var first, second;
|
1211
1685
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1212
|
-
first =
|
1686
|
+
first = charCodeAt(S, position);
|
1213
1687
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1214
|
-
|| (second =
|
1215
|
-
? CONVERT_TO_STRING
|
1216
|
-
|
1688
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
1689
|
+
? CONVERT_TO_STRING
|
1690
|
+
? charAt$2(S, position)
|
1691
|
+
: first
|
1692
|
+
: CONVERT_TO_STRING
|
1693
|
+
? stringSlice$3(S, position, position + 2)
|
1694
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1217
1695
|
};
|
1218
1696
|
};
|
1219
1697
|
|
@@ -1226,161 +1704,22 @@
|
|
1226
1704
|
charAt: createMethod$1(true)
|
1227
1705
|
};
|
1228
1706
|
|
1229
|
-
var charAt = stringMultibyte.charAt;
|
1707
|
+
var charAt$1 = stringMultibyte.charAt;
|
1230
1708
|
|
1231
1709
|
// `AdvanceStringIndex` abstract operation
|
1232
1710
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
1233
1711
|
var advanceStringIndex = function (S, index, unicode) {
|
1234
|
-
return index + (unicode ? charAt(S, index).length : 1);
|
1235
|
-
};
|
1236
|
-
|
1237
|
-
// `RegExpExec` abstract operation
|
1238
|
-
// https://tc39.es/ecma262/#sec-regexpexec
|
1239
|
-
var regexpExecAbstract = function (R, S) {
|
1240
|
-
var exec = R.exec;
|
1241
|
-
if (typeof exec === 'function') {
|
1242
|
-
var result = exec.call(R, S);
|
1243
|
-
if (typeof result !== 'object') {
|
1244
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1245
|
-
}
|
1246
|
-
return result;
|
1247
|
-
}
|
1248
|
-
|
1249
|
-
if (classofRaw(R) !== 'RegExp') {
|
1250
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1251
|
-
}
|
1252
|
-
|
1253
|
-
return regexpExec.call(R, S);
|
1712
|
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
1254
1713
|
};
|
1255
1714
|
|
1256
|
-
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
1257
|
-
var arrayPush = [].push;
|
1258
|
-
var min$1 = Math.min;
|
1259
|
-
var MAX_UINT32 = 0xFFFFFFFF;
|
1260
|
-
|
1261
|
-
// @@split logic
|
1262
|
-
fixRegexpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
|
1263
|
-
var internalSplit;
|
1264
|
-
if (
|
1265
|
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
1266
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
1267
|
-
'test'.split(/(?:)/, -1).length != 4 ||
|
1268
|
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
1269
|
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
1270
|
-
// eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
|
1271
|
-
'.'.split(/()()/).length > 1 ||
|
1272
|
-
''.split(/.?/).length
|
1273
|
-
) {
|
1274
|
-
// based on es5-shim implementation, need to rework it
|
1275
|
-
internalSplit = function (separator, limit) {
|
1276
|
-
var string = String(requireObjectCoercible(this));
|
1277
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1278
|
-
if (lim === 0) return [];
|
1279
|
-
if (separator === undefined) return [string];
|
1280
|
-
// If `separator` is not a regex, use native split
|
1281
|
-
if (!isRegexp(separator)) {
|
1282
|
-
return nativeSplit.call(string, separator, lim);
|
1283
|
-
}
|
1284
|
-
var output = [];
|
1285
|
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
1286
|
-
(separator.multiline ? 'm' : '') +
|
1287
|
-
(separator.unicode ? 'u' : '') +
|
1288
|
-
(separator.sticky ? 'y' : '');
|
1289
|
-
var lastLastIndex = 0;
|
1290
|
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
1291
|
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
1292
|
-
var match, lastIndex, lastLength;
|
1293
|
-
while (match = regexpExec.call(separatorCopy, string)) {
|
1294
|
-
lastIndex = separatorCopy.lastIndex;
|
1295
|
-
if (lastIndex > lastLastIndex) {
|
1296
|
-
output.push(string.slice(lastLastIndex, match.index));
|
1297
|
-
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
1298
|
-
lastLength = match[0].length;
|
1299
|
-
lastLastIndex = lastIndex;
|
1300
|
-
if (output.length >= lim) break;
|
1301
|
-
}
|
1302
|
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
1303
|
-
}
|
1304
|
-
if (lastLastIndex === string.length) {
|
1305
|
-
if (lastLength || !separatorCopy.test('')) output.push('');
|
1306
|
-
} else output.push(string.slice(lastLastIndex));
|
1307
|
-
return output.length > lim ? output.slice(0, lim) : output;
|
1308
|
-
};
|
1309
|
-
// Chakra, V8
|
1310
|
-
} else if ('0'.split(undefined, 0).length) {
|
1311
|
-
internalSplit = function (separator, limit) {
|
1312
|
-
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
1313
|
-
};
|
1314
|
-
} else internalSplit = nativeSplit;
|
1315
|
-
|
1316
|
-
return [
|
1317
|
-
// `String.prototype.split` method
|
1318
|
-
// https://tc39.es/ecma262/#sec-string.prototype.split
|
1319
|
-
function split(separator, limit) {
|
1320
|
-
var O = requireObjectCoercible(this);
|
1321
|
-
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
1322
|
-
return splitter !== undefined
|
1323
|
-
? splitter.call(separator, O, limit)
|
1324
|
-
: internalSplit.call(String(O), separator, limit);
|
1325
|
-
},
|
1326
|
-
// `RegExp.prototype[@@split]` method
|
1327
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
1328
|
-
//
|
1329
|
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
1330
|
-
// the 'y' flag.
|
1331
|
-
function (regexp, limit) {
|
1332
|
-
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
|
1333
|
-
if (res.done) return res.value;
|
1334
|
-
|
1335
|
-
var rx = anObject(regexp);
|
1336
|
-
var S = String(this);
|
1337
|
-
var C = speciesConstructor(rx, RegExp);
|
1338
|
-
|
1339
|
-
var unicodeMatching = rx.unicode;
|
1340
|
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
1341
|
-
(rx.multiline ? 'm' : '') +
|
1342
|
-
(rx.unicode ? 'u' : '') +
|
1343
|
-
(UNSUPPORTED_Y ? 'g' : 'y');
|
1344
|
-
|
1345
|
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
1346
|
-
// simulate the 'y' flag.
|
1347
|
-
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
1348
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
1349
|
-
if (lim === 0) return [];
|
1350
|
-
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
1351
|
-
var p = 0;
|
1352
|
-
var q = 0;
|
1353
|
-
var A = [];
|
1354
|
-
while (q < S.length) {
|
1355
|
-
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
1356
|
-
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? S.slice(q) : S);
|
1357
|
-
var e;
|
1358
|
-
if (
|
1359
|
-
z === null ||
|
1360
|
-
(e = min$1(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
1361
|
-
) {
|
1362
|
-
q = advanceStringIndex(S, q, unicodeMatching);
|
1363
|
-
} else {
|
1364
|
-
A.push(S.slice(p, q));
|
1365
|
-
if (A.length === lim) return A;
|
1366
|
-
for (var i = 1; i <= z.length - 1; i++) {
|
1367
|
-
A.push(z[i]);
|
1368
|
-
if (A.length === lim) return A;
|
1369
|
-
}
|
1370
|
-
q = p = e;
|
1371
|
-
}
|
1372
|
-
}
|
1373
|
-
A.push(S.slice(p));
|
1374
|
-
return A;
|
1375
|
-
}
|
1376
|
-
];
|
1377
|
-
}, UNSUPPORTED_Y);
|
1378
|
-
|
1379
1715
|
var floor = Math.floor;
|
1380
|
-
var
|
1716
|
+
var charAt = functionUncurryThis(''.charAt);
|
1717
|
+
var replace = functionUncurryThis(''.replace);
|
1718
|
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
1381
1719
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
1382
1720
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
1383
1721
|
|
1722
|
+
// `GetSubstitution` abstract operation
|
1384
1723
|
// https://tc39.es/ecma262/#sec-getsubstitution
|
1385
1724
|
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
1386
1725
|
var tailPos = position + matched.length;
|
@@ -1390,15 +1729,15 @@
|
|
1390
1729
|
namedCaptures = toObject(namedCaptures);
|
1391
1730
|
symbols = SUBSTITUTION_SYMBOLS;
|
1392
1731
|
}
|
1393
|
-
return replace
|
1732
|
+
return replace(replacement, symbols, function (match, ch) {
|
1394
1733
|
var capture;
|
1395
|
-
switch (
|
1734
|
+
switch (charAt(ch, 0)) {
|
1396
1735
|
case '$': return '$';
|
1397
1736
|
case '&': return matched;
|
1398
|
-
case '`': return str
|
1399
|
-
case "'": return str
|
1737
|
+
case '`': return stringSlice$2(str, 0, position);
|
1738
|
+
case "'": return stringSlice$2(str, tailPos);
|
1400
1739
|
case '<':
|
1401
|
-
capture = namedCaptures[ch
|
1740
|
+
capture = namedCaptures[stringSlice$2(ch, 1, -1)];
|
1402
1741
|
break;
|
1403
1742
|
default: // \d\d?
|
1404
1743
|
var n = +ch;
|
@@ -1406,7 +1745,7 @@
|
|
1406
1745
|
if (n > m) {
|
1407
1746
|
var f = floor(n / 10);
|
1408
1747
|
if (f === 0) return match;
|
1409
|
-
if (f <= m) return captures[f - 1] === undefined ?
|
1748
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
1410
1749
|
return match;
|
1411
1750
|
}
|
1412
1751
|
capture = captures[n - 1];
|
@@ -1415,17 +1754,61 @@
|
|
1415
1754
|
});
|
1416
1755
|
};
|
1417
1756
|
|
1418
|
-
var
|
1419
|
-
|
1757
|
+
var TypeError$2 = global_1.TypeError;
|
1758
|
+
|
1759
|
+
// `RegExpExec` abstract operation
|
1760
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
1761
|
+
var regexpExecAbstract = function (R, S) {
|
1762
|
+
var exec = R.exec;
|
1763
|
+
if (isCallable(exec)) {
|
1764
|
+
var result = functionCall(exec, R, S);
|
1765
|
+
if (result !== null) anObject(result);
|
1766
|
+
return result;
|
1767
|
+
}
|
1768
|
+
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
1769
|
+
throw TypeError$2('RegExp#exec called on incompatible receiver');
|
1770
|
+
};
|
1771
|
+
|
1772
|
+
var REPLACE = wellKnownSymbol('replace');
|
1773
|
+
var max$1 = Math.max;
|
1774
|
+
var min$1 = Math.min;
|
1775
|
+
var concat = functionUncurryThis([].concat);
|
1776
|
+
var push$2 = functionUncurryThis([].push);
|
1777
|
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
1778
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
1420
1779
|
|
1421
1780
|
var maybeToString = function (it) {
|
1422
1781
|
return it === undefined ? it : String(it);
|
1423
1782
|
};
|
1424
1783
|
|
1784
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
1785
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
1786
|
+
var REPLACE_KEEPS_$0 = (function () {
|
1787
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
1788
|
+
return 'a'.replace(/./, '$0') === '$0';
|
1789
|
+
})();
|
1790
|
+
|
1791
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
1792
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
1793
|
+
if (/./[REPLACE]) {
|
1794
|
+
return /./[REPLACE]('a', '$0') === '';
|
1795
|
+
}
|
1796
|
+
return false;
|
1797
|
+
})();
|
1798
|
+
|
1799
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
1800
|
+
var re = /./;
|
1801
|
+
re.exec = function () {
|
1802
|
+
var result = [];
|
1803
|
+
result.groups = { a: '7' };
|
1804
|
+
return result;
|
1805
|
+
};
|
1806
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
1807
|
+
return ''.replace(re, '$<a>') !== '7';
|
1808
|
+
});
|
1809
|
+
|
1425
1810
|
// @@replace logic
|
1426
|
-
fixRegexpWellKnownSymbolLogic('replace',
|
1427
|
-
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
|
1428
|
-
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
|
1811
|
+
fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
1429
1812
|
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
1430
1813
|
|
1431
1814
|
return [
|
@@ -1433,27 +1816,28 @@
|
|
1433
1816
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
1434
1817
|
function replace(searchValue, replaceValue) {
|
1435
1818
|
var O = requireObjectCoercible(this);
|
1436
|
-
var replacer = searchValue == undefined ? undefined : searchValue
|
1437
|
-
return replacer
|
1438
|
-
? replacer
|
1439
|
-
: nativeReplace
|
1819
|
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
1820
|
+
return replacer
|
1821
|
+
? functionCall(replacer, searchValue, O, replaceValue)
|
1822
|
+
: functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
|
1440
1823
|
},
|
1441
1824
|
// `RegExp.prototype[@@replace]` method
|
1442
1825
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
1443
|
-
function (
|
1826
|
+
function (string, replaceValue) {
|
1827
|
+
var rx = anObject(this);
|
1828
|
+
var S = toString_1(string);
|
1829
|
+
|
1444
1830
|
if (
|
1445
|
-
|
1446
|
-
(
|
1831
|
+
typeof replaceValue == 'string' &&
|
1832
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
1833
|
+
stringIndexOf(replaceValue, '$<') === -1
|
1447
1834
|
) {
|
1448
|
-
var res = maybeCallNative(nativeReplace,
|
1835
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
1449
1836
|
if (res.done) return res.value;
|
1450
1837
|
}
|
1451
1838
|
|
1452
|
-
var
|
1453
|
-
|
1454
|
-
|
1455
|
-
var functionalReplace = typeof replaceValue === 'function';
|
1456
|
-
if (!functionalReplace) replaceValue = String(replaceValue);
|
1839
|
+
var functionalReplace = isCallable(replaceValue);
|
1840
|
+
if (!functionalReplace) replaceValue = toString_1(replaceValue);
|
1457
1841
|
|
1458
1842
|
var global = rx.global;
|
1459
1843
|
if (global) {
|
@@ -1465,10 +1849,10 @@
|
|
1465
1849
|
var result = regexpExecAbstract(rx, S);
|
1466
1850
|
if (result === null) break;
|
1467
1851
|
|
1468
|
-
|
1852
|
+
push$2(results, result);
|
1469
1853
|
if (!global) break;
|
1470
1854
|
|
1471
|
-
var matchStr =
|
1855
|
+
var matchStr = toString_1(result[0]);
|
1472
1856
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1473
1857
|
}
|
1474
1858
|
|
@@ -1477,32 +1861,44 @@
|
|
1477
1861
|
for (var i = 0; i < results.length; i++) {
|
1478
1862
|
result = results[i];
|
1479
1863
|
|
1480
|
-
var matched =
|
1481
|
-
var position = max(min(
|
1864
|
+
var matched = toString_1(result[0]);
|
1865
|
+
var position = max$1(min$1(toIntegerOrInfinity(result.index), S.length), 0);
|
1482
1866
|
var captures = [];
|
1483
1867
|
// NOTE: This is equivalent to
|
1484
1868
|
// captures = result.slice(1).map(maybeToString)
|
1485
1869
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1486
1870
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1487
1871
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1488
|
-
for (var j = 1; j < result.length; j++)
|
1872
|
+
for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
|
1489
1873
|
var namedCaptures = result.groups;
|
1490
1874
|
if (functionalReplace) {
|
1491
|
-
var replacerArgs = [matched]
|
1492
|
-
if (namedCaptures !== undefined)
|
1493
|
-
var replacement =
|
1875
|
+
var replacerArgs = concat([matched], captures, position, S);
|
1876
|
+
if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
|
1877
|
+
var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
|
1494
1878
|
} else {
|
1495
1879
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1496
1880
|
}
|
1497
1881
|
if (position >= nextSourcePosition) {
|
1498
|
-
accumulatedResult += S
|
1882
|
+
accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
|
1499
1883
|
nextSourcePosition = position + matched.length;
|
1500
1884
|
}
|
1501
1885
|
}
|
1502
|
-
return accumulatedResult + S
|
1886
|
+
return accumulatedResult + stringSlice$1(S, nextSourcePosition);
|
1503
1887
|
}
|
1504
1888
|
];
|
1505
|
-
});
|
1889
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
1890
|
+
|
1891
|
+
// `Object.prototype.toString` method implementation
|
1892
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1893
|
+
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1894
|
+
return '[object ' + classof(this) + ']';
|
1895
|
+
};
|
1896
|
+
|
1897
|
+
// `Object.prototype.toString` method
|
1898
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1899
|
+
if (!toStringTagSupport) {
|
1900
|
+
defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1901
|
+
}
|
1506
1902
|
|
1507
1903
|
// iterable DOM collections
|
1508
1904
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
@@ -1540,48 +1936,43 @@
|
|
1540
1936
|
TouchList: 0
|
1541
1937
|
};
|
1542
1938
|
|
1939
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
1940
|
+
|
1941
|
+
|
1942
|
+
var classList = documentCreateElement('span').classList;
|
1943
|
+
var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
|
1944
|
+
|
1945
|
+
var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
|
1946
|
+
|
1947
|
+
var bind = functionUncurryThis(functionUncurryThis.bind);
|
1948
|
+
|
1543
1949
|
// optional / simple context binding
|
1544
|
-
var functionBindContext = function (fn, that
|
1545
|
-
|
1546
|
-
|
1547
|
-
switch (length) {
|
1548
|
-
case 0: return function () {
|
1549
|
-
return fn.call(that);
|
1550
|
-
};
|
1551
|
-
case 1: return function (a) {
|
1552
|
-
return fn.call(that, a);
|
1553
|
-
};
|
1554
|
-
case 2: return function (a, b) {
|
1555
|
-
return fn.call(that, a, b);
|
1556
|
-
};
|
1557
|
-
case 3: return function (a, b, c) {
|
1558
|
-
return fn.call(that, a, b, c);
|
1559
|
-
};
|
1560
|
-
}
|
1561
|
-
return function (/* ...args */) {
|
1950
|
+
var functionBindContext = function (fn, that) {
|
1951
|
+
aCallable(fn);
|
1952
|
+
return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
|
1562
1953
|
return fn.apply(that, arguments);
|
1563
1954
|
};
|
1564
1955
|
};
|
1565
1956
|
|
1566
|
-
var push = [].push;
|
1957
|
+
var push$1 = functionUncurryThis([].push);
|
1567
1958
|
|
1568
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex,
|
1959
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
1569
1960
|
var createMethod = function (TYPE) {
|
1570
1961
|
var IS_MAP = TYPE == 1;
|
1571
1962
|
var IS_FILTER = TYPE == 2;
|
1572
1963
|
var IS_SOME = TYPE == 3;
|
1573
1964
|
var IS_EVERY = TYPE == 4;
|
1574
1965
|
var IS_FIND_INDEX = TYPE == 6;
|
1575
|
-
var
|
1966
|
+
var IS_FILTER_REJECT = TYPE == 7;
|
1576
1967
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
1577
1968
|
return function ($this, callbackfn, that, specificCreate) {
|
1578
1969
|
var O = toObject($this);
|
1579
1970
|
var self = indexedObject(O);
|
1580
|
-
var boundFunction = functionBindContext(callbackfn, that
|
1581
|
-
var length =
|
1971
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
1972
|
+
var length = lengthOfArrayLike(self);
|
1582
1973
|
var index = 0;
|
1583
1974
|
var create = specificCreate || arraySpeciesCreate;
|
1584
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ||
|
1975
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
1585
1976
|
var value, result;
|
1586
1977
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
1587
1978
|
value = self[index];
|
@@ -1592,10 +1983,10 @@
|
|
1592
1983
|
case 3: return true; // some
|
1593
1984
|
case 5: return value; // find
|
1594
1985
|
case 6: return index; // findIndex
|
1595
|
-
case 2: push
|
1986
|
+
case 2: push$1(target, value); // filter
|
1596
1987
|
} else switch (TYPE) {
|
1597
1988
|
case 4: return false; // every
|
1598
|
-
case 7: push
|
1989
|
+
case 7: push$1(target, value); // filterReject
|
1599
1990
|
}
|
1600
1991
|
}
|
1601
1992
|
}
|
@@ -1625,239 +2016,284 @@
|
|
1625
2016
|
// `Array.prototype.findIndex` method
|
1626
2017
|
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
1627
2018
|
findIndex: createMethod(6),
|
1628
|
-
// `Array.prototype.
|
2019
|
+
// `Array.prototype.filterReject` method
|
1629
2020
|
// https://github.com/tc39/proposal-array-filtering
|
1630
|
-
|
2021
|
+
filterReject: createMethod(7)
|
2022
|
+
};
|
2023
|
+
|
2024
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
2025
|
+
var method = [][METHOD_NAME];
|
2026
|
+
return !!method && fails(function () {
|
2027
|
+
// eslint-disable-next-line no-useless-call -- required for testing
|
2028
|
+
method.call(null, argument || function () { return 1; }, 1);
|
2029
|
+
});
|
1631
2030
|
};
|
1632
2031
|
|
1633
2032
|
var $forEach = arrayIteration.forEach;
|
1634
2033
|
|
1635
2034
|
|
1636
|
-
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
2035
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('forEach');
|
1637
2036
|
|
1638
2037
|
// `Array.prototype.forEach` method implementation
|
1639
2038
|
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
1640
|
-
var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
2039
|
+
var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
|
1641
2040
|
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
1642
|
-
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
2041
|
+
// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
|
1643
2042
|
} : [].forEach;
|
1644
2043
|
|
1645
|
-
|
1646
|
-
var Collection = global_1[COLLECTION_NAME];
|
1647
|
-
var CollectionPrototype = Collection && Collection.prototype;
|
2044
|
+
var handlePrototype = function (CollectionPrototype) {
|
1648
2045
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
1649
2046
|
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
1650
2047
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
|
1651
2048
|
} catch (error) {
|
1652
2049
|
CollectionPrototype.forEach = arrayForEach;
|
1653
2050
|
}
|
2051
|
+
};
|
2052
|
+
|
2053
|
+
for (var COLLECTION_NAME in domIterables) {
|
2054
|
+
if (domIterables[COLLECTION_NAME]) {
|
2055
|
+
handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
|
2056
|
+
}
|
1654
2057
|
}
|
1655
2058
|
|
1656
|
-
|
1657
|
-
var test = {};
|
2059
|
+
handlePrototype(domTokenListPrototype);
|
1658
2060
|
|
1659
|
-
|
2061
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
1660
2062
|
|
1661
|
-
var
|
2063
|
+
var regexpGetFlags = function (R) {
|
2064
|
+
var flags = R.flags;
|
2065
|
+
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwnProperty_1(R, 'flags') && objectIsPrototypeOf(RegExpPrototype$1, R)
|
2066
|
+
? functionCall(regexpFlags, R) : flags;
|
2067
|
+
};
|
2068
|
+
|
2069
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
1662
2070
|
|
1663
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
1664
|
-
// ES3 wrong here
|
1665
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
1666
2071
|
|
1667
|
-
// fallback for IE11 Script Access Denied error
|
1668
|
-
var tryGet = function (it, key) {
|
1669
|
-
try {
|
1670
|
-
return it[key];
|
1671
|
-
} catch (error) { /* empty */ }
|
1672
|
-
};
|
1673
2072
|
|
1674
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
1675
|
-
var classof = toStringTagSupport ? classofRaw : function (it) {
|
1676
|
-
var O, tag, result;
|
1677
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
1678
|
-
// @@toStringTag case
|
1679
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
|
1680
|
-
// builtinTag case
|
1681
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
1682
|
-
// ES3 arguments fallback
|
1683
|
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
1684
|
-
};
|
1685
2073
|
|
1686
|
-
// `Object.prototype.toString` method implementation
|
1687
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1688
|
-
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
1689
|
-
return '[object ' + classof(this) + ']';
|
1690
|
-
};
|
1691
2074
|
|
1692
|
-
// `Object.prototype.toString` method
|
1693
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
1694
|
-
if (!toStringTagSupport) {
|
1695
|
-
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
1696
|
-
}
|
1697
2075
|
|
1698
2076
|
var TO_STRING = 'toString';
|
1699
2077
|
var RegExpPrototype = RegExp.prototype;
|
1700
|
-
var
|
2078
|
+
var n$ToString = RegExpPrototype[TO_STRING];
|
1701
2079
|
|
1702
|
-
var NOT_GENERIC = fails(function () { return
|
2080
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
1703
2081
|
// FF44- RegExp#toString has a wrong name
|
1704
|
-
var INCORRECT_NAME =
|
2082
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
1705
2083
|
|
1706
2084
|
// `RegExp.prototype.toString` method
|
1707
2085
|
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
1708
2086
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
1709
|
-
|
2087
|
+
defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
|
1710
2088
|
var R = anObject(this);
|
1711
|
-
var
|
1712
|
-
var
|
1713
|
-
|
1714
|
-
return '/' + p + '/' + f;
|
2089
|
+
var pattern = toString_1(R.source);
|
2090
|
+
var flags = toString_1(regexpGetFlags(R));
|
2091
|
+
return '/' + pattern + '/' + flags;
|
1715
2092
|
}, { unsafe: true });
|
1716
2093
|
}
|
1717
2094
|
|
1718
|
-
|
1719
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
1720
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
1721
|
-
var objectKeys = Object.keys || function keys(O) {
|
1722
|
-
return objectKeysInternal(O, enumBugKeys);
|
1723
|
-
};
|
2095
|
+
var $find = arrayIteration.find;
|
1724
2096
|
|
1725
|
-
// `Object.defineProperties` method
|
1726
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
1727
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
1728
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
1729
|
-
anObject(O);
|
1730
|
-
var keys = objectKeys(Properties);
|
1731
|
-
var length = keys.length;
|
1732
|
-
var index = 0;
|
1733
|
-
var key;
|
1734
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
1735
|
-
return O;
|
1736
|
-
};
|
1737
2097
|
|
1738
|
-
var
|
2098
|
+
var FIND = 'find';
|
2099
|
+
var SKIPS_HOLES = true;
|
1739
2100
|
|
1740
|
-
|
1741
|
-
|
1742
|
-
var PROTOTYPE = 'prototype';
|
1743
|
-
var SCRIPT = 'script';
|
1744
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
2101
|
+
// Shouldn't skip holes
|
2102
|
+
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
1745
2103
|
|
1746
|
-
|
2104
|
+
// `Array.prototype.find` method
|
2105
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
2106
|
+
_export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
2107
|
+
find: function find(callbackfn /* , that = undefined */) {
|
2108
|
+
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2109
|
+
}
|
2110
|
+
});
|
1747
2111
|
|
1748
|
-
|
1749
|
-
|
1750
|
-
};
|
2112
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
2113
|
+
addToUnscopables(FIND);
|
1751
2114
|
|
1752
|
-
|
1753
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
1754
|
-
activeXDocument.write(scriptTag(''));
|
1755
|
-
activeXDocument.close();
|
1756
|
-
var temp = activeXDocument.parentWindow.Object;
|
1757
|
-
activeXDocument = null; // avoid memory leak
|
1758
|
-
return temp;
|
1759
|
-
};
|
2115
|
+
var $filter = arrayIteration.filter;
|
1760
2116
|
|
1761
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
1762
|
-
var NullProtoObjectViaIFrame = function () {
|
1763
|
-
// Thrash, waste and sodomy: IE GC bug
|
1764
|
-
var iframe = documentCreateElement('iframe');
|
1765
|
-
var JS = 'java' + SCRIPT + ':';
|
1766
|
-
var iframeDocument;
|
1767
|
-
iframe.style.display = 'none';
|
1768
|
-
html.appendChild(iframe);
|
1769
|
-
// https://github.com/zloirock/core-js/issues/475
|
1770
|
-
iframe.src = String(JS);
|
1771
|
-
iframeDocument = iframe.contentWindow.document;
|
1772
|
-
iframeDocument.open();
|
1773
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
1774
|
-
iframeDocument.close();
|
1775
|
-
return iframeDocument.F;
|
1776
|
-
};
|
1777
2117
|
|
1778
|
-
|
1779
|
-
// No need to use active x approach when document.domain is not set
|
1780
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
1781
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
1782
|
-
// avoid IE GC bug
|
1783
|
-
var activeXDocument;
|
1784
|
-
var NullProtoObject = function () {
|
1785
|
-
try {
|
1786
|
-
/* global ActiveXObject -- old IE */
|
1787
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
1788
|
-
} catch (error) { /* ignore */ }
|
1789
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
|
1790
|
-
var length = enumBugKeys.length;
|
1791
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
1792
|
-
return NullProtoObject();
|
1793
|
-
};
|
2118
|
+
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter');
|
1794
2119
|
|
1795
|
-
|
2120
|
+
// `Array.prototype.filter` method
|
2121
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
2122
|
+
// with adding support of @@species
|
2123
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
|
2124
|
+
filter: function filter(callbackfn /* , thisArg */) {
|
2125
|
+
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
2126
|
+
}
|
2127
|
+
});
|
1796
2128
|
|
1797
|
-
|
1798
|
-
// https://tc39.es/ecma262/#sec-object.create
|
1799
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
1800
|
-
var result;
|
1801
|
-
if (O !== null) {
|
1802
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
1803
|
-
result = new EmptyConstructor();
|
1804
|
-
EmptyConstructor[PROTOTYPE] = null;
|
1805
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
1806
|
-
result[IE_PROTO] = O;
|
1807
|
-
} else result = NullProtoObject();
|
1808
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
1809
|
-
};
|
2129
|
+
var TypeError$1 = global_1.TypeError;
|
1810
2130
|
|
1811
|
-
|
1812
|
-
var
|
2131
|
+
// `Assert: IsConstructor(argument) is true`
|
2132
|
+
var aConstructor = function (argument) {
|
2133
|
+
if (isConstructor(argument)) return argument;
|
2134
|
+
throw TypeError$1(tryToString(argument) + ' is not a constructor');
|
2135
|
+
};
|
1813
2136
|
|
1814
|
-
|
1815
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
1816
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
1817
|
-
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
1818
|
-
configurable: true,
|
1819
|
-
value: objectCreate(null)
|
1820
|
-
});
|
1821
|
-
}
|
2137
|
+
var SPECIES = wellKnownSymbol('species');
|
1822
2138
|
|
1823
|
-
//
|
1824
|
-
|
1825
|
-
|
2139
|
+
// `SpeciesConstructor` abstract operation
|
2140
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
2141
|
+
var speciesConstructor = function (O, defaultConstructor) {
|
2142
|
+
var C = anObject(O).constructor;
|
2143
|
+
var S;
|
2144
|
+
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
|
1826
2145
|
};
|
1827
2146
|
|
1828
|
-
var $
|
1829
|
-
|
2147
|
+
var Array$1 = global_1.Array;
|
2148
|
+
var max = Math.max;
|
1830
2149
|
|
1831
|
-
var
|
1832
|
-
|
2150
|
+
var arraySliceSimple = function (O, start, end) {
|
2151
|
+
var length = lengthOfArrayLike(O);
|
2152
|
+
var k = toAbsoluteIndex(start, length);
|
2153
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
2154
|
+
var result = Array$1(max(fin - k, 0));
|
2155
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
2156
|
+
result.length = n;
|
2157
|
+
return result;
|
2158
|
+
};
|
1833
2159
|
|
1834
|
-
|
1835
|
-
|
2160
|
+
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
2161
|
+
var MAX_UINT32 = 0xFFFFFFFF;
|
2162
|
+
var min = Math.min;
|
2163
|
+
var $push = [].push;
|
2164
|
+
var exec = functionUncurryThis(/./.exec);
|
2165
|
+
var push = functionUncurryThis($push);
|
2166
|
+
var stringSlice = functionUncurryThis(''.slice);
|
1836
2167
|
|
1837
|
-
//
|
1838
|
-
//
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
2168
|
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
2169
|
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
2170
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
2171
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
2172
|
+
var re = /(?:)/;
|
2173
|
+
var originalExec = re.exec;
|
2174
|
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
2175
|
+
var result = 'ab'.split(re);
|
2176
|
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
1843
2177
|
});
|
1844
2178
|
|
1845
|
-
//
|
1846
|
-
|
2179
|
+
// @@split logic
|
2180
|
+
fixRegexpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
2181
|
+
var internalSplit;
|
2182
|
+
if (
|
2183
|
+
'abbc'.split(/(b)*/)[1] == 'c' ||
|
2184
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
2185
|
+
'test'.split(/(?:)/, -1).length != 4 ||
|
2186
|
+
'ab'.split(/(?:ab)*/).length != 2 ||
|
2187
|
+
'.'.split(/(.?)(.?)/).length != 4 ||
|
2188
|
+
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
2189
|
+
'.'.split(/()()/).length > 1 ||
|
2190
|
+
''.split(/.?/).length
|
2191
|
+
) {
|
2192
|
+
// based on es5-shim implementation, need to rework it
|
2193
|
+
internalSplit = function (separator, limit) {
|
2194
|
+
var string = toString_1(requireObjectCoercible(this));
|
2195
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
2196
|
+
if (lim === 0) return [];
|
2197
|
+
if (separator === undefined) return [string];
|
2198
|
+
// If `separator` is not a regex, use native split
|
2199
|
+
if (!isRegexp(separator)) {
|
2200
|
+
return functionCall(nativeSplit, string, separator, lim);
|
2201
|
+
}
|
2202
|
+
var output = [];
|
2203
|
+
var flags = (separator.ignoreCase ? 'i' : '') +
|
2204
|
+
(separator.multiline ? 'm' : '') +
|
2205
|
+
(separator.unicode ? 'u' : '') +
|
2206
|
+
(separator.sticky ? 'y' : '');
|
2207
|
+
var lastLastIndex = 0;
|
2208
|
+
// Make `global` and avoid `lastIndex` issues by working with a copy
|
2209
|
+
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
2210
|
+
var match, lastIndex, lastLength;
|
2211
|
+
while (match = functionCall(regexpExec, separatorCopy, string)) {
|
2212
|
+
lastIndex = separatorCopy.lastIndex;
|
2213
|
+
if (lastIndex > lastLastIndex) {
|
2214
|
+
push(output, stringSlice(string, lastLastIndex, match.index));
|
2215
|
+
if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1));
|
2216
|
+
lastLength = match[0].length;
|
2217
|
+
lastLastIndex = lastIndex;
|
2218
|
+
if (output.length >= lim) break;
|
2219
|
+
}
|
2220
|
+
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
2221
|
+
}
|
2222
|
+
if (lastLastIndex === string.length) {
|
2223
|
+
if (lastLength || !exec(separatorCopy, '')) push(output, '');
|
2224
|
+
} else push(output, stringSlice(string, lastLastIndex));
|
2225
|
+
return output.length > lim ? arraySliceSimple(output, 0, lim) : output;
|
2226
|
+
};
|
2227
|
+
// Chakra, V8
|
2228
|
+
} else if ('0'.split(undefined, 0).length) {
|
2229
|
+
internalSplit = function (separator, limit) {
|
2230
|
+
return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit);
|
2231
|
+
};
|
2232
|
+
} else internalSplit = nativeSplit;
|
2233
|
+
|
2234
|
+
return [
|
2235
|
+
// `String.prototype.split` method
|
2236
|
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
2237
|
+
function split(separator, limit) {
|
2238
|
+
var O = requireObjectCoercible(this);
|
2239
|
+
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
2240
|
+
return splitter
|
2241
|
+
? functionCall(splitter, separator, O, limit)
|
2242
|
+
: functionCall(internalSplit, toString_1(O), separator, limit);
|
2243
|
+
},
|
2244
|
+
// `RegExp.prototype[@@split]` method
|
2245
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
2246
|
+
//
|
2247
|
+
// NOTE: This cannot be properly polyfilled in engines that don't support
|
2248
|
+
// the 'y' flag.
|
2249
|
+
function (string, limit) {
|
2250
|
+
var rx = anObject(this);
|
2251
|
+
var S = toString_1(string);
|
2252
|
+
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
1847
2253
|
|
1848
|
-
|
2254
|
+
if (res.done) return res.value;
|
1849
2255
|
|
2256
|
+
var C = speciesConstructor(rx, RegExp);
|
1850
2257
|
|
1851
|
-
|
2258
|
+
var unicodeMatching = rx.unicode;
|
2259
|
+
var flags = (rx.ignoreCase ? 'i' : '') +
|
2260
|
+
(rx.multiline ? 'm' : '') +
|
2261
|
+
(rx.unicode ? 'u' : '') +
|
2262
|
+
(UNSUPPORTED_Y ? 'g' : 'y');
|
1852
2263
|
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
2264
|
+
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
2265
|
+
// simulate the 'y' flag.
|
2266
|
+
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
2267
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
2268
|
+
if (lim === 0) return [];
|
2269
|
+
if (S.length === 0) return regexpExecAbstract(splitter, S) === null ? [S] : [];
|
2270
|
+
var p = 0;
|
2271
|
+
var q = 0;
|
2272
|
+
var A = [];
|
2273
|
+
while (q < S.length) {
|
2274
|
+
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
2275
|
+
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
|
2276
|
+
var e;
|
2277
|
+
if (
|
2278
|
+
z === null ||
|
2279
|
+
(e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
2280
|
+
) {
|
2281
|
+
q = advanceStringIndex(S, q, unicodeMatching);
|
2282
|
+
} else {
|
2283
|
+
push(A, stringSlice(S, p, q));
|
2284
|
+
if (A.length === lim) return A;
|
2285
|
+
for (var i = 1; i <= z.length - 1; i++) {
|
2286
|
+
push(A, z[i]);
|
2287
|
+
if (A.length === lim) return A;
|
2288
|
+
}
|
2289
|
+
q = p = e;
|
2290
|
+
}
|
2291
|
+
}
|
2292
|
+
push(A, stringSlice(S, p));
|
2293
|
+
return A;
|
2294
|
+
}
|
2295
|
+
];
|
2296
|
+
}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
1861
2297
|
|
1862
2298
|
var $map = arrayIteration.map;
|
1863
2299
|
|
@@ -1875,30 +2311,30 @@
|
|
1875
2311
|
|
1876
2312
|
// `SameValue` abstract operation
|
1877
2313
|
// https://tc39.es/ecma262/#sec-samevalue
|
1878
|
-
// eslint-disable-next-line es/no-object-is -- safe
|
2314
|
+
// eslint-disable-next-line es-x/no-object-is -- safe
|
1879
2315
|
var sameValue = Object.is || function is(x, y) {
|
1880
2316
|
// eslint-disable-next-line no-self-compare -- NaN check
|
1881
2317
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
1882
2318
|
};
|
1883
2319
|
|
1884
2320
|
// @@search logic
|
1885
|
-
fixRegexpWellKnownSymbolLogic('search',
|
2321
|
+
fixRegexpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
|
1886
2322
|
return [
|
1887
2323
|
// `String.prototype.search` method
|
1888
2324
|
// https://tc39.es/ecma262/#sec-string.prototype.search
|
1889
2325
|
function search(regexp) {
|
1890
2326
|
var O = requireObjectCoercible(this);
|
1891
|
-
var searcher = regexp == undefined ? undefined : regexp
|
1892
|
-
return searcher
|
2327
|
+
var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
|
2328
|
+
return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O));
|
1893
2329
|
},
|
1894
2330
|
// `RegExp.prototype[@@search]` method
|
1895
2331
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
1896
|
-
function (
|
1897
|
-
var
|
1898
|
-
|
2332
|
+
function (string) {
|
2333
|
+
var rx = anObject(this);
|
2334
|
+
var S = toString_1(string);
|
2335
|
+
var res = maybeCallNative(nativeSearch, rx, S);
|
1899
2336
|
|
1900
|
-
|
1901
|
-
var S = String(this);
|
2337
|
+
if (res.done) return res.value;
|
1902
2338
|
|
1903
2339
|
var previousLastIndex = rx.lastIndex;
|
1904
2340
|
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
@@ -1909,13 +2345,26 @@
|
|
1909
2345
|
];
|
1910
2346
|
});
|
1911
2347
|
|
2348
|
+
var un$Join = functionUncurryThis([].join);
|
2349
|
+
|
2350
|
+
var ES3_STRINGS = indexedObject != Object;
|
2351
|
+
var STRICT_METHOD = arrayMethodIsStrict('join', ',');
|
2352
|
+
|
2353
|
+
// `Array.prototype.join` method
|
2354
|
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
2355
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
|
2356
|
+
join: function join(separator) {
|
2357
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
2358
|
+
}
|
2359
|
+
});
|
2360
|
+
|
1912
2361
|
/**
|
1913
2362
|
* @author: Dennis Hernández
|
1914
2363
|
* @webSite: http://djhvscf.github.io/Blog
|
1915
2364
|
* @update zhixin wen <wenzhixin2010@gmail.com>
|
1916
2365
|
*/
|
1917
2366
|
|
1918
|
-
var Utils = $__default[
|
2367
|
+
var Utils = $__default["default"].fn.bootstrapTable.utils;
|
1919
2368
|
var UtilsCookie = {
|
1920
2369
|
cookieIds: {
|
1921
2370
|
sortOrder: 'bs.table.sortOrder',
|
@@ -1931,139 +2380,33 @@
|
|
1931
2380
|
filterBy: 'bs.table.filterBy'
|
1932
2381
|
},
|
1933
2382
|
getCurrentHeader: function getCurrentHeader(that) {
|
1934
|
-
|
1935
|
-
|
1936
|
-
if (that.options.height) {
|
1937
|
-
header = that.$tableHeader;
|
1938
|
-
}
|
1939
|
-
|
1940
|
-
return header;
|
2383
|
+
return that.options.height ? that.$tableHeader : that.$header;
|
1941
2384
|
},
|
1942
2385
|
getCurrentSearchControls: function getCurrentSearchControls(that) {
|
1943
|
-
|
1944
|
-
|
1945
|
-
if (that.options.height) {
|
1946
|
-
searchControls = 'table select, table input';
|
1947
|
-
}
|
1948
|
-
|
1949
|
-
return searchControls;
|
2386
|
+
return that.options.height ? 'table select, table input' : 'select, input';
|
1950
2387
|
},
|
1951
|
-
|
1952
|
-
return
|
2388
|
+
isCookieSupportedByBrowser: function isCookieSupportedByBrowser() {
|
2389
|
+
return navigator.cookieEnabled;
|
1953
2390
|
},
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
for (var i = 0; i < cookiesEnabled.length; i++) {
|
1958
|
-
if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) {
|
1959
|
-
index = i;
|
1960
|
-
break;
|
1961
|
-
}
|
1962
|
-
}
|
1963
|
-
|
1964
|
-
return index;
|
2391
|
+
isCookieEnabled: function isCookieEnabled(that, cookieName) {
|
2392
|
+
return that.options.cookiesEnabled.includes(cookieName);
|
1965
2393
|
},
|
1966
2394
|
setCookie: function setCookie(that, cookieName, cookieValue) {
|
1967
|
-
if (!that.options.cookie || !UtilsCookie.
|
1968
|
-
return;
|
1969
|
-
}
|
1970
|
-
|
1971
|
-
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
|
2395
|
+
if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) {
|
1972
2396
|
return;
|
1973
2397
|
}
|
1974
2398
|
|
1975
|
-
|
1976
|
-
|
1977
|
-
switch (that.options.cookieStorage) {
|
1978
|
-
case 'cookieStorage':
|
1979
|
-
document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
|
1980
|
-
break;
|
1981
|
-
|
1982
|
-
case 'localStorage':
|
1983
|
-
localStorage.setItem(cookieName, cookieValue);
|
1984
|
-
break;
|
1985
|
-
|
1986
|
-
case 'sessionStorage':
|
1987
|
-
sessionStorage.setItem(cookieName, cookieValue);
|
1988
|
-
break;
|
1989
|
-
|
1990
|
-
case 'customStorage':
|
1991
|
-
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
1992
|
-
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
1993
|
-
}
|
1994
|
-
|
1995
|
-
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
|
1996
|
-
break;
|
1997
|
-
|
1998
|
-
default:
|
1999
|
-
return false;
|
2000
|
-
}
|
2001
|
-
|
2002
|
-
return true;
|
2399
|
+
return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue);
|
2003
2400
|
},
|
2004
|
-
getCookie: function getCookie(that,
|
2005
|
-
if (!cookieName) {
|
2006
|
-
return null;
|
2007
|
-
}
|
2008
|
-
|
2009
|
-
if (UtilsCookie.inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) {
|
2401
|
+
getCookie: function getCookie(that, cookieName) {
|
2402
|
+
if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) {
|
2010
2403
|
return null;
|
2011
2404
|
}
|
2012
2405
|
|
2013
|
-
|
2014
|
-
|
2015
|
-
switch (that.options.cookieStorage) {
|
2016
|
-
case 'cookieStorage':
|
2017
|
-
var value = "; ".concat(document.cookie);
|
2018
|
-
var parts = value.split("; ".concat(cookieName, "="));
|
2019
|
-
return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
|
2020
|
-
|
2021
|
-
case 'localStorage':
|
2022
|
-
return localStorage.getItem(cookieName);
|
2023
|
-
|
2024
|
-
case 'sessionStorage':
|
2025
|
-
return sessionStorage.getItem(cookieName);
|
2026
|
-
|
2027
|
-
case 'customStorage':
|
2028
|
-
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
2029
|
-
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
2030
|
-
}
|
2031
|
-
|
2032
|
-
return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
|
2033
|
-
|
2034
|
-
default:
|
2035
|
-
return null;
|
2036
|
-
}
|
2406
|
+
return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
|
2037
2407
|
},
|
2038
|
-
deleteCookie: function deleteCookie(that,
|
2039
|
-
|
2040
|
-
|
2041
|
-
switch (that.options.cookieStorage) {
|
2042
|
-
case 'cookieStorage':
|
2043
|
-
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
|
2044
|
-
break;
|
2045
|
-
|
2046
|
-
case 'localStorage':
|
2047
|
-
localStorage.removeItem(cookieName);
|
2048
|
-
break;
|
2049
|
-
|
2050
|
-
case 'sessionStorage':
|
2051
|
-
sessionStorage.removeItem(cookieName);
|
2052
|
-
break;
|
2053
|
-
|
2054
|
-
case 'customStorage':
|
2055
|
-
if (!that.options.cookieCustomStorageSet || !that.options.cookieCustomStorageGet || !that.options.cookieCustomStorageDelete) {
|
2056
|
-
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
2057
|
-
}
|
2058
|
-
|
2059
|
-
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
|
2060
|
-
break;
|
2061
|
-
|
2062
|
-
default:
|
2063
|
-
return false;
|
2064
|
-
}
|
2065
|
-
|
2066
|
-
return true;
|
2408
|
+
deleteCookie: function deleteCookie(that, cookieName) {
|
2409
|
+
return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
|
2067
2410
|
},
|
2068
2411
|
calculateExpiration: function calculateExpiration(cookieExpire) {
|
2069
2412
|
var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
|
@@ -2110,44 +2453,57 @@
|
|
2110
2453
|
},
|
2111
2454
|
initCookieFilters: function initCookieFilters(bootstrapTable) {
|
2112
2455
|
setTimeout(function () {
|
2113
|
-
var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable,
|
2456
|
+
var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(bootstrapTable, UtilsCookie.cookieIds.filterControl));
|
2114
2457
|
|
2115
|
-
if (!bootstrapTable.
|
2458
|
+
if (!bootstrapTable._filterControlValuesLoaded && parsedCookieFilters) {
|
2116
2459
|
var cachedFilters = {};
|
2117
2460
|
var header = UtilsCookie.getCurrentHeader(bootstrapTable);
|
2118
2461
|
var searchControls = UtilsCookie.getCurrentSearchControls(bootstrapTable);
|
2119
2462
|
|
2120
2463
|
var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
|
2121
2464
|
filteredCookies.forEach(function (cookie) {
|
2122
|
-
|
2465
|
+
var value = element.value.toString();
|
2466
|
+
var text = cookie.text;
|
2467
|
+
|
2468
|
+
if (text === '' || element.type === 'radio' && value !== text) {
|
2123
2469
|
return;
|
2124
2470
|
}
|
2125
2471
|
|
2126
|
-
if (element.tagName === 'INPUT' && element.type === 'radio' &&
|
2472
|
+
if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) {
|
2127
2473
|
element.checked = true;
|
2128
|
-
cachedFilters[cookie.field] =
|
2474
|
+
cachedFilters[cookie.field] = text;
|
2129
2475
|
} else if (element.tagName === 'INPUT') {
|
2130
|
-
element.value =
|
2131
|
-
cachedFilters[cookie.field] =
|
2476
|
+
element.value = text;
|
2477
|
+
cachedFilters[cookie.field] = text;
|
2132
2478
|
} else if (element.tagName === 'SELECT' && bootstrapTable.options.filterControlContainer) {
|
2133
|
-
element.value =
|
2134
|
-
cachedFilters[cookie.field] =
|
2135
|
-
} else if (
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2479
|
+
element.value = text;
|
2480
|
+
cachedFilters[cookie.field] = text;
|
2481
|
+
} else if (text !== '' && element.tagName === 'SELECT') {
|
2482
|
+
cachedFilters[cookie.field] = text;
|
2483
|
+
|
2484
|
+
var _iterator = _createForOfIteratorHelper(element),
|
2485
|
+
_step;
|
2486
|
+
|
2487
|
+
try {
|
2488
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
2489
|
+
var currentElement = _step.value;
|
2490
|
+
|
2491
|
+
if (currentElement.value === text) {
|
2492
|
+
currentElement.selected = true;
|
2493
|
+
return;
|
2494
|
+
}
|
2142
2495
|
}
|
2496
|
+
} catch (err) {
|
2497
|
+
_iterator.e(err);
|
2498
|
+
} finally {
|
2499
|
+
_iterator.f();
|
2143
2500
|
}
|
2144
2501
|
|
2145
2502
|
var option = document.createElement('option');
|
2146
|
-
option.value =
|
2147
|
-
option.text =
|
2503
|
+
option.value = text;
|
2504
|
+
option.text = text;
|
2148
2505
|
element.add(option, element[1]);
|
2149
2506
|
element.selectedIndex = 1;
|
2150
|
-
cachedFilters[cookie.field] = cookie.text;
|
2151
2507
|
}
|
2152
2508
|
});
|
2153
2509
|
};
|
@@ -2155,24 +2511,24 @@
|
|
2155
2511
|
var filterContainer = header;
|
2156
2512
|
|
2157
2513
|
if (bootstrapTable.options.filterControlContainer) {
|
2158
|
-
filterContainer = $__default[
|
2514
|
+
filterContainer = $__default["default"]("".concat(bootstrapTable.options.filterControlContainer));
|
2159
2515
|
}
|
2160
2516
|
|
2161
2517
|
filterContainer.find(searchControls).each(function () {
|
2162
|
-
var field = $__default[
|
2518
|
+
var field = $__default["default"](this).closest('[data-field]').data('field');
|
2163
2519
|
var filteredCookies = parsedCookieFilters.filter(function (cookie) {
|
2164
2520
|
return cookie.field === field;
|
2165
2521
|
});
|
2166
2522
|
applyCookieFilters(this, filteredCookies);
|
2167
2523
|
});
|
2168
2524
|
bootstrapTable.initColumnSearch(cachedFilters);
|
2169
|
-
bootstrapTable.
|
2525
|
+
bootstrapTable._filterControlValuesLoaded = true;
|
2170
2526
|
bootstrapTable.initServer();
|
2171
2527
|
}
|
2172
2528
|
}, 250);
|
2173
2529
|
}
|
2174
2530
|
};
|
2175
|
-
$__default[
|
2531
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
|
2176
2532
|
cookie: false,
|
2177
2533
|
cookieExpire: '2h',
|
2178
2534
|
cookiePath: null,
|
@@ -2187,17 +2543,22 @@
|
|
2187
2543
|
cookieCustomStorageSet: null,
|
2188
2544
|
cookieCustomStorageDelete: null,
|
2189
2545
|
// internal variable
|
2190
|
-
|
2191
|
-
|
2546
|
+
_filterControls: [],
|
2547
|
+
_filterControlValuesLoaded: false,
|
2548
|
+
_storage: {
|
2549
|
+
setItem: undefined,
|
2550
|
+
getItem: undefined,
|
2551
|
+
removeItem: undefined
|
2552
|
+
}
|
2192
2553
|
});
|
2193
|
-
$__default[
|
2194
|
-
$__default[
|
2195
|
-
$__default[
|
2554
|
+
$__default["default"].fn.bootstrapTable.methods.push('getCookies');
|
2555
|
+
$__default["default"].fn.bootstrapTable.methods.push('deleteCookie');
|
2556
|
+
$__default["default"].extend($__default["default"].fn.bootstrapTable.utils, {
|
2196
2557
|
setCookie: UtilsCookie.setCookie,
|
2197
2558
|
getCookie: UtilsCookie.getCookie
|
2198
2559
|
});
|
2199
2560
|
|
2200
|
-
$__default[
|
2561
|
+
$__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
|
2201
2562
|
_inherits(_class, _$$BootstrapTable);
|
2202
2563
|
|
2203
2564
|
var _super = _createSuper(_class);
|
@@ -2212,8 +2573,13 @@
|
|
2212
2573
|
key: "init",
|
2213
2574
|
value: function init() {
|
2214
2575
|
if (this.options.cookie) {
|
2215
|
-
|
2216
|
-
|
2576
|
+
if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) {
|
2577
|
+
throw new Error('Cookies are not enabled in this browser.');
|
2578
|
+
}
|
2579
|
+
|
2580
|
+
this.configureStorage(); // FilterBy logic
|
2581
|
+
|
2582
|
+
var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy);
|
2217
2583
|
|
2218
2584
|
if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
|
2219
2585
|
throw new Error('The cookie value of filterBy must be a json!');
|
@@ -2229,8 +2595,8 @@
|
|
2229
2595
|
|
2230
2596
|
this.filterColumns = filterByCookie ? filterByCookie : {}; // FilterControl logic
|
2231
2597
|
|
2232
|
-
this.
|
2233
|
-
this.
|
2598
|
+
this._filterControls = [];
|
2599
|
+
this._filterControlValuesLoaded = false;
|
2234
2600
|
this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').toLowerCase().split(',') : this.options.cookiesEnabled;
|
2235
2601
|
|
2236
2602
|
if (this.options.filterControl) {
|
@@ -2238,22 +2604,22 @@
|
|
2238
2604
|
this.$el.on('column-search.bs.table', function (e, field, text) {
|
2239
2605
|
var isNewField = true;
|
2240
2606
|
|
2241
|
-
for (var i = 0; i < that.
|
2242
|
-
if (that.
|
2243
|
-
that.
|
2607
|
+
for (var i = 0; i < that._filterControls.length; i++) {
|
2608
|
+
if (that._filterControls[i].field === field) {
|
2609
|
+
that._filterControls[i].text = text;
|
2244
2610
|
isNewField = false;
|
2245
2611
|
break;
|
2246
2612
|
}
|
2247
2613
|
}
|
2248
2614
|
|
2249
2615
|
if (isNewField) {
|
2250
|
-
that.
|
2616
|
+
that._filterControls.push({
|
2251
2617
|
field: field,
|
2252
2618
|
text: text
|
2253
2619
|
});
|
2254
2620
|
}
|
2255
2621
|
|
2256
|
-
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that.
|
2622
|
+
UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls));
|
2257
2623
|
}).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
|
2258
2624
|
}
|
2259
2625
|
}
|
@@ -2265,8 +2631,8 @@
|
|
2265
2631
|
value: function initServer() {
|
2266
2632
|
var _get2;
|
2267
2633
|
|
2268
|
-
if (this.options.cookie && this.options.filterControl && !this.
|
2269
|
-
var cookie = JSON.parse(UtilsCookie.getCookie(this,
|
2634
|
+
if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) {
|
2635
|
+
var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl));
|
2270
2636
|
|
2271
2637
|
if (cookie) {
|
2272
2638
|
return;
|
@@ -2303,12 +2669,16 @@
|
|
2303
2669
|
|
2304
2670
|
(_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
|
2305
2671
|
|
2672
|
+
if (!this.options.cookie) {
|
2673
|
+
return;
|
2674
|
+
}
|
2675
|
+
|
2306
2676
|
if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
|
2307
|
-
UtilsCookie.deleteCookie(this,
|
2308
|
-
UtilsCookie.deleteCookie(this,
|
2677
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
|
2678
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
|
2309
2679
|
} else {
|
2310
2680
|
this.options.sortPriority = null;
|
2311
|
-
UtilsCookie.deleteCookie(this,
|
2681
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
|
2312
2682
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
|
2313
2683
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
|
2314
2684
|
}
|
@@ -2324,13 +2694,17 @@
|
|
2324
2694
|
|
2325
2695
|
(_get5 = _get(_getPrototypeOf(_class.prototype), "onMultipleSort", this)).call.apply(_get5, [this].concat(args));
|
2326
2696
|
|
2697
|
+
if (!this.options.cookie) {
|
2698
|
+
return;
|
2699
|
+
}
|
2700
|
+
|
2327
2701
|
if (this.options.sortPriority === undefined) {
|
2328
|
-
UtilsCookie.deleteCookie(this,
|
2702
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
|
2329
2703
|
} else {
|
2330
2704
|
this.options.sortName = undefined;
|
2331
2705
|
this.options.sortOrder = undefined;
|
2332
|
-
UtilsCookie.deleteCookie(this,
|
2333
|
-
UtilsCookie.deleteCookie(this,
|
2706
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
|
2707
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
|
2334
2708
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority));
|
2335
2709
|
}
|
2336
2710
|
}
|
@@ -2345,6 +2719,10 @@
|
|
2345
2719
|
|
2346
2720
|
(_get6 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get6, [this].concat(args));
|
2347
2721
|
|
2722
|
+
if (!this.options.cookie) {
|
2723
|
+
return;
|
2724
|
+
}
|
2725
|
+
|
2348
2726
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
|
2349
2727
|
}
|
2350
2728
|
}, {
|
@@ -2358,6 +2736,10 @@
|
|
2358
2736
|
|
2359
2737
|
(_get7 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get7, [this].concat(args));
|
2360
2738
|
|
2739
|
+
if (!this.options.cookie) {
|
2740
|
+
return;
|
2741
|
+
}
|
2742
|
+
|
2361
2743
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize);
|
2362
2744
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
|
2363
2745
|
}
|
@@ -2372,6 +2754,10 @@
|
|
2372
2754
|
|
2373
2755
|
(_get8 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get8, [this].concat(args));
|
2374
2756
|
|
2757
|
+
if (!this.options.cookie) {
|
2758
|
+
return;
|
2759
|
+
}
|
2760
|
+
|
2375
2761
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
|
2376
2762
|
}
|
2377
2763
|
}, {
|
@@ -2385,6 +2771,10 @@
|
|
2385
2771
|
|
2386
2772
|
(_get9 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get9, [this].concat(args));
|
2387
2773
|
|
2774
|
+
if (!this.options.cookie) {
|
2775
|
+
return;
|
2776
|
+
}
|
2777
|
+
|
2388
2778
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
|
2389
2779
|
}
|
2390
2780
|
}, {
|
@@ -2398,6 +2788,10 @@
|
|
2398
2788
|
|
2399
2789
|
(_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get10, [this].concat(args));
|
2400
2790
|
|
2791
|
+
if (!this.options.cookie) {
|
2792
|
+
return;
|
2793
|
+
}
|
2794
|
+
|
2401
2795
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) {
|
2402
2796
|
return column.field;
|
2403
2797
|
})));
|
@@ -2413,6 +2807,10 @@
|
|
2413
2807
|
|
2414
2808
|
(_get11 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get11, [this].concat(args));
|
2415
2809
|
|
2810
|
+
if (!this.options.cookie) {
|
2811
|
+
return;
|
2812
|
+
}
|
2813
|
+
|
2416
2814
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.columns, JSON.stringify(this.getVisibleColumns().map(function (column) {
|
2417
2815
|
return column.field;
|
2418
2816
|
})));
|
@@ -2429,12 +2827,20 @@
|
|
2429
2827
|
value: function selectPage(page) {
|
2430
2828
|
_get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page);
|
2431
2829
|
|
2830
|
+
if (!this.options.cookie) {
|
2831
|
+
return;
|
2832
|
+
}
|
2833
|
+
|
2432
2834
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
|
2433
2835
|
}
|
2434
2836
|
}, {
|
2435
2837
|
key: "onSearch",
|
2436
2838
|
value: function onSearch(event) {
|
2437
|
-
_get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event);
|
2839
|
+
_get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event, arguments.length > 1 ? arguments[1] : true);
|
2840
|
+
|
2841
|
+
if (!this.options.cookie) {
|
2842
|
+
return;
|
2843
|
+
}
|
2438
2844
|
|
2439
2845
|
if (this.options.search) {
|
2440
2846
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
|
@@ -2447,8 +2853,8 @@
|
|
2447
2853
|
value: function initHeader() {
|
2448
2854
|
var _get12;
|
2449
2855
|
|
2450
|
-
if (this.options.reorderableColumns) {
|
2451
|
-
this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this,
|
2856
|
+
if (this.options.reorderableColumns && this.options.cookie) {
|
2857
|
+
this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns));
|
2452
2858
|
}
|
2453
2859
|
|
2454
2860
|
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
@@ -2473,6 +2879,10 @@
|
|
2473
2879
|
|
2474
2880
|
(_get13 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get13, [this].concat(args));
|
2475
2881
|
|
2882
|
+
if (!this.options.cookie) {
|
2883
|
+
return;
|
2884
|
+
}
|
2885
|
+
|
2476
2886
|
UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
|
2477
2887
|
}
|
2478
2888
|
}, {
|
@@ -2484,21 +2894,21 @@
|
|
2484
2894
|
return;
|
2485
2895
|
}
|
2486
2896
|
|
2487
|
-
if (this.options.cookieIdTable === '' || this.options.cookieExpire === ''
|
2897
|
+
if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') {
|
2488
2898
|
console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
|
2489
2899
|
this.options.cookie = false; // Make sure that the cookie extension is disabled
|
2490
2900
|
|
2491
2901
|
return;
|
2492
2902
|
}
|
2493
2903
|
|
2494
|
-
var sortOrderCookie = UtilsCookie.getCookie(this,
|
2495
|
-
var sortOrderNameCookie = UtilsCookie.getCookie(this,
|
2496
|
-
var sortPriorityCookie = UtilsCookie.getCookie(this,
|
2497
|
-
var pageNumberCookie = UtilsCookie.getCookie(this,
|
2498
|
-
var pageListCookie = UtilsCookie.getCookie(this,
|
2499
|
-
var searchTextCookie = UtilsCookie.getCookie(this,
|
2500
|
-
var cardViewCookie = UtilsCookie.getCookie(this,
|
2501
|
-
var columnsCookieValue = UtilsCookie.getCookie(this,
|
2904
|
+
var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder);
|
2905
|
+
var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName);
|
2906
|
+
var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority);
|
2907
|
+
var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber);
|
2908
|
+
var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList);
|
2909
|
+
var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText);
|
2910
|
+
var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView);
|
2911
|
+
var columnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.columns);
|
2502
2912
|
|
2503
2913
|
if (typeof columnsCookieValue === 'boolean' && !columnsCookieValue) {
|
2504
2914
|
throw new Error('The cookie value of filterBy must be a json!');
|
@@ -2516,18 +2926,16 @@
|
|
2516
2926
|
sortPriorityCookie = JSON.parse(sortPriorityCookie);
|
2517
2927
|
} catch (e) {
|
2518
2928
|
throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie);
|
2519
|
-
}
|
2520
|
-
|
2521
|
-
|
2522
|
-
this.options.sortOrder = undefined; // sortName
|
2523
|
-
|
2524
|
-
this.options.sortName = undefined;
|
2929
|
+
}
|
2525
2930
|
|
2526
2931
|
if (!sortPriorityCookie) {
|
2527
2932
|
// sortOrder
|
2528
2933
|
this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; // sortName
|
2529
2934
|
|
2530
2935
|
this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
|
2936
|
+
} else {
|
2937
|
+
this.options.sortOrder = undefined;
|
2938
|
+
this.options.sortName = undefined;
|
2531
2939
|
} // sortPriority
|
2532
2940
|
|
2533
2941
|
|
@@ -2543,18 +2951,26 @@
|
|
2543
2951
|
|
2544
2952
|
this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; // searchText
|
2545
2953
|
|
2546
|
-
this.
|
2954
|
+
if (UtilsCookie.isCookieEnabled(this, 'bs.table.searchText') && this.options.searchText === '') {
|
2955
|
+
this.options.searchText = searchTextCookie ? searchTextCookie : '';
|
2956
|
+
} // cardView
|
2957
|
+
|
2547
2958
|
|
2548
2959
|
this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false;
|
2549
2960
|
|
2550
2961
|
if (columnsCookie) {
|
2551
|
-
var
|
2552
|
-
|
2962
|
+
var _iterator2 = _createForOfIteratorHelper(this.columns),
|
2963
|
+
_step2;
|
2553
2964
|
|
2554
2965
|
try {
|
2555
2966
|
var _loop = function _loop() {
|
2556
|
-
var column =
|
2557
|
-
|
2967
|
+
var column = _step2.value;
|
2968
|
+
|
2969
|
+
if (!column.switchable) {
|
2970
|
+
return "continue";
|
2971
|
+
}
|
2972
|
+
|
2973
|
+
column.visible = columnsCookie.filter(function (columnField) {
|
2558
2974
|
if (_this.isSelectionColumn(column)) {
|
2559
2975
|
return true;
|
2560
2976
|
}
|
@@ -2570,17 +2986,18 @@
|
|
2570
2986
|
}
|
2571
2987
|
|
2572
2988
|
return columnField === column.field;
|
2573
|
-
});
|
2574
|
-
column.visible = (filteredColumns.length > 0 || !column.switchable) && column.visible;
|
2989
|
+
}).length > 0;
|
2575
2990
|
};
|
2576
2991
|
|
2577
|
-
for (
|
2578
|
-
_loop();
|
2992
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
2993
|
+
var _ret = _loop();
|
2994
|
+
|
2995
|
+
if (_ret === "continue") continue;
|
2579
2996
|
}
|
2580
2997
|
} catch (err) {
|
2581
|
-
|
2998
|
+
_iterator2.e(err);
|
2582
2999
|
} finally {
|
2583
|
-
|
3000
|
+
_iterator2.f();
|
2584
3001
|
}
|
2585
3002
|
}
|
2586
3003
|
}
|
@@ -2589,8 +3006,8 @@
|
|
2589
3006
|
value: function getCookies() {
|
2590
3007
|
var bootstrapTable = this;
|
2591
3008
|
var cookies = {};
|
2592
|
-
$__default[
|
2593
|
-
cookies[key] = UtilsCookie.getCookie(bootstrapTable,
|
3009
|
+
$__default["default"].each(UtilsCookie.cookieIds, function (key, value) {
|
3010
|
+
cookies[key] = UtilsCookie.getCookie(bootstrapTable, value);
|
2594
3011
|
|
2595
3012
|
if (key === 'columns') {
|
2596
3013
|
cookies[key] = JSON.parse(cookies[key]);
|
@@ -2601,15 +3018,92 @@
|
|
2601
3018
|
}, {
|
2602
3019
|
key: "deleteCookie",
|
2603
3020
|
value: function deleteCookie(cookieName) {
|
2604
|
-
if (cookieName
|
3021
|
+
if (!cookieName) {
|
2605
3022
|
return;
|
2606
3023
|
}
|
2607
3024
|
|
2608
|
-
UtilsCookie.deleteCookie(this,
|
3025
|
+
UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]);
|
3026
|
+
}
|
3027
|
+
}, {
|
3028
|
+
key: "configureStorage",
|
3029
|
+
value: function configureStorage() {
|
3030
|
+
var that = this;
|
3031
|
+
this._storage = {};
|
3032
|
+
|
3033
|
+
switch (this.options.cookieStorage) {
|
3034
|
+
case 'cookieStorage':
|
3035
|
+
this._storage.setItem = function (cookieName, cookieValue) {
|
3036
|
+
document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
|
3037
|
+
};
|
3038
|
+
|
3039
|
+
this._storage.getItem = function (cookieName) {
|
3040
|
+
var value = "; ".concat(document.cookie);
|
3041
|
+
var parts = value.split("; ".concat(cookieName, "="));
|
3042
|
+
return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
|
3043
|
+
};
|
3044
|
+
|
3045
|
+
this._storage.removeItem = function (cookieName) {
|
3046
|
+
document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
|
3047
|
+
};
|
3048
|
+
|
3049
|
+
break;
|
3050
|
+
|
3051
|
+
case 'localStorage':
|
3052
|
+
this._storage.setItem = function (cookieName, cookieValue) {
|
3053
|
+
localStorage.setItem(cookieName, cookieValue);
|
3054
|
+
};
|
3055
|
+
|
3056
|
+
this._storage.getItem = function (cookieName) {
|
3057
|
+
return localStorage.getItem(cookieName);
|
3058
|
+
};
|
3059
|
+
|
3060
|
+
this._storage.removeItem = function (cookieName) {
|
3061
|
+
localStorage.removeItem(cookieName);
|
3062
|
+
};
|
3063
|
+
|
3064
|
+
break;
|
3065
|
+
|
3066
|
+
case 'sessionStorage':
|
3067
|
+
this._storage.setItem = function (cookieName, cookieValue) {
|
3068
|
+
sessionStorage.setItem(cookieName, cookieValue);
|
3069
|
+
};
|
3070
|
+
|
3071
|
+
this._storage.getItem = function (cookieName) {
|
3072
|
+
return sessionStorage.getItem(cookieName);
|
3073
|
+
};
|
3074
|
+
|
3075
|
+
this._storage.removeItem = function (cookieName) {
|
3076
|
+
sessionStorage.removeItem(cookieName);
|
3077
|
+
};
|
3078
|
+
|
3079
|
+
break;
|
3080
|
+
|
3081
|
+
case 'customStorage':
|
3082
|
+
if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) {
|
3083
|
+
throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
|
3084
|
+
}
|
3085
|
+
|
3086
|
+
this._storage.setItem = function (cookieName, cookieValue) {
|
3087
|
+
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
|
3088
|
+
};
|
3089
|
+
|
3090
|
+
this._storage.getItem = function (cookieName) {
|
3091
|
+
return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
|
3092
|
+
};
|
3093
|
+
|
3094
|
+
this._storage.removeItem = function (cookieName) {
|
3095
|
+
Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
|
3096
|
+
};
|
3097
|
+
|
3098
|
+
break;
|
3099
|
+
|
3100
|
+
default:
|
3101
|
+
throw new Error('Storage method not supported.');
|
3102
|
+
}
|
2609
3103
|
}
|
2610
3104
|
}]);
|
2611
3105
|
|
2612
3106
|
return _class;
|
2613
|
-
}($__default[
|
3107
|
+
}($__default["default"].BootstrapTable);
|
2614
3108
|
|
2615
|
-
}))
|
3109
|
+
}));
|