bootstrap-table-rails 1.15.5 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +143 -36
- data/lib/bootstrap-table-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-locale-all.js +1012 -83
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.esm.js +684 -208
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table-vue.js +686 -210
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.css +75 -12
- data/vendor/assets/javascripts/bootstrap-table/bootstrap-table.js +1617 -763
- data/vendor/assets/javascripts/bootstrap-table/extensions/addrbar/bootstrap-table-addrbar.js +280 -93
- data/vendor/assets/javascripts/bootstrap-table/extensions/auto-refresh/bootstrap-table-auto-refresh.js +200 -78
- data/vendor/assets/javascripts/bootstrap-table/extensions/cookie/bootstrap-table-cookie.js +1349 -258
- data/vendor/assets/javascripts/bootstrap-table/extensions/copy-rows/bootstrap-table-copy-rows.js +216 -77
- data/vendor/assets/javascripts/bootstrap-table/extensions/custom-view/bootstrap-table-custom-view.js +1198 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/defer-url/bootstrap-table-defer-url.js +83 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/editable/bootstrap-table-editable.js +1219 -208
- data/vendor/assets/javascripts/bootstrap-table/extensions/export/bootstrap-table-export.js +458 -204
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.css +1 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/bootstrap-table-filter-control.js +1420 -901
- data/vendor/assets/javascripts/bootstrap-table/extensions/filter-control/utils.js +2361 -0
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.css +12 -14
- data/vendor/assets/javascripts/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js +589 -423
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.css +3 -2
- data/vendor/assets/javascripts/bootstrap-table/extensions/group-by-v2/bootstrap-table-group-by.js +552 -487
- data/vendor/assets/javascripts/bootstrap-table/extensions/i18n-enhance/bootstrap-table-i18n-enhance.js +3 -3
- data/vendor/assets/javascripts/bootstrap-table/extensions/key-events/bootstrap-table-key-events.js +219 -74
- data/vendor/assets/javascripts/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js +143 -66
- data/vendor/assets/javascripts/bootstrap-table/extensions/multiple-sort/bootstrap-table-multiple-sort.js +326 -462
- data/vendor/assets/javascripts/bootstrap-table/extensions/page-jump-to/bootstrap-table-page-jump-to.js +137 -65
- data/vendor/assets/javascripts/bootstrap-table/extensions/pipeline/bootstrap-table-pipeline.js +87 -42
- data/vendor/assets/javascripts/bootstrap-table/extensions/print/bootstrap-table-print.js +452 -155
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-columns/bootstrap-table-reorder-columns.js +643 -255
- data/vendor/assets/javascripts/bootstrap-table/extensions/reorder-rows/bootstrap-table-reorder-rows.js +348 -136
- data/vendor/assets/javascripts/bootstrap-table/extensions/resizable/bootstrap-table-resizable.js +84 -44
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.css +0 -1
- data/vendor/assets/javascripts/bootstrap-table/extensions/sticky-header/bootstrap-table-sticky-header.js +218 -76
- data/vendor/assets/javascripts/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.js +558 -217
- data/vendor/assets/javascripts/bootstrap-table/extensions/treegrid/bootstrap-table-treegrid.js +221 -115
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-af-ZA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ar-SA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-bg-BG.js +777 -0
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ca-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-cs-CZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-da-DK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-de-DE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-el-GR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-en-US.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-AR.js +120 -63
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-CR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-ES.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-MX.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-NI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-es-SP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-et-EE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-eu-EU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fa-IR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fi-FI.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-BE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-CH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-FR.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-fr-LU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-he-IL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hr-HR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-hu-HU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-id-ID.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-it-IT.js +113 -57
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ja-JP.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ka-GE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ko-KR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ms-MY.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nb-NO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-BE.js +99 -43
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-nl-NL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pl-PL.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-BR.js +102 -45
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-pt-PT.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ro-RO.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ru-RU.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sk-SK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Cyrl-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sr-Latn-RS.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-sv-SE.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-th-TH.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-tr-TR.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uk-UA.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-ur-PK.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-uz-Latn-UZ.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-vi-VN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-CN.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/locale/bootstrap-table-zh-TW.js +98 -42
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.css +776 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/bootstrap-table.js +1049 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.eot +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.svg +28 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.ttf +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bootstrap-table/fonts/bootstrap-table.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.css +89 -13
- data/vendor/assets/javascripts/bootstrap-table/themes/bulma/bootstrap-table-bulma.js +161 -63
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.css +88 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/foundation/bootstrap-table-foundation.js +166 -65
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.css +83 -11
- data/vendor/assets/javascripts/bootstrap-table/themes/materialize/bootstrap-table-materialize.js +164 -66
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.css +89 -15
- data/vendor/assets/javascripts/bootstrap-table/themes/semantic/bootstrap-table-semantic.js +164 -66
- metadata +10 -5
- data/vendor/assets/javascripts/bootstrap-table/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +0 -1757
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.css +0 -12
- data/vendor/assets/javascripts/bootstrap-table/extensions/cell-input/bootstrap-table-cell-input.js +0 -2087
- data/vendor/assets/javascripts/bootstrap-table/extensions/natural-sorting/bootstrap-table-natural-sorting.js +0 -1265
@@ -1,1265 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
3
|
-
typeof define === 'function' && define.amd ? define(factory) :
|
4
|
-
(global = global || self, global.BootstrapTable = factory());
|
5
|
-
}(this, function () { 'use strict';
|
6
|
-
|
7
|
-
var fails = function (exec) {
|
8
|
-
try {
|
9
|
-
return !!exec();
|
10
|
-
} catch (error) {
|
11
|
-
return true;
|
12
|
-
}
|
13
|
-
};
|
14
|
-
|
15
|
-
// Thank's IE8 for his funny defineProperty
|
16
|
-
var descriptors = !fails(function () {
|
17
|
-
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
18
|
-
});
|
19
|
-
|
20
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
21
|
-
|
22
|
-
function createCommonjsModule(fn, module) {
|
23
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
24
|
-
}
|
25
|
-
|
26
|
-
var O = 'object';
|
27
|
-
var check = function (it) {
|
28
|
-
return it && it.Math == Math && it;
|
29
|
-
};
|
30
|
-
|
31
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
32
|
-
var global_1 =
|
33
|
-
// eslint-disable-next-line no-undef
|
34
|
-
check(typeof globalThis == O && globalThis) ||
|
35
|
-
check(typeof window == O && window) ||
|
36
|
-
check(typeof self == O && self) ||
|
37
|
-
check(typeof commonjsGlobal == O && commonjsGlobal) ||
|
38
|
-
// eslint-disable-next-line no-new-func
|
39
|
-
Function('return this')();
|
40
|
-
|
41
|
-
var replacement = /#|\.prototype\./;
|
42
|
-
|
43
|
-
var isForced = function (feature, detection) {
|
44
|
-
var value = data[normalize(feature)];
|
45
|
-
return value == POLYFILL ? true
|
46
|
-
: value == NATIVE ? false
|
47
|
-
: typeof detection == 'function' ? fails(detection)
|
48
|
-
: !!detection;
|
49
|
-
};
|
50
|
-
|
51
|
-
var normalize = isForced.normalize = function (string) {
|
52
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
53
|
-
};
|
54
|
-
|
55
|
-
var data = isForced.data = {};
|
56
|
-
var NATIVE = isForced.NATIVE = 'N';
|
57
|
-
var POLYFILL = isForced.POLYFILL = 'P';
|
58
|
-
|
59
|
-
var isForced_1 = isForced;
|
60
|
-
|
61
|
-
var isObject = function (it) {
|
62
|
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
63
|
-
};
|
64
|
-
|
65
|
-
var document = global_1.document;
|
66
|
-
// typeof document.createElement is 'object' in old IE
|
67
|
-
var EXISTS = isObject(document) && isObject(document.createElement);
|
68
|
-
|
69
|
-
var documentCreateElement = function (it) {
|
70
|
-
return EXISTS ? document.createElement(it) : {};
|
71
|
-
};
|
72
|
-
|
73
|
-
// Thank's IE8 for his funny defineProperty
|
74
|
-
var ie8DomDefine = !descriptors && !fails(function () {
|
75
|
-
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
76
|
-
get: function () { return 7; }
|
77
|
-
}).a != 7;
|
78
|
-
});
|
79
|
-
|
80
|
-
var anObject = function (it) {
|
81
|
-
if (!isObject(it)) {
|
82
|
-
throw TypeError(String(it) + ' is not an object');
|
83
|
-
} return it;
|
84
|
-
};
|
85
|
-
|
86
|
-
// `ToPrimitive` abstract operation
|
87
|
-
// https://tc39.github.io/ecma262/#sec-toprimitive
|
88
|
-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
89
|
-
// and the second argument - flag - preferred type is a string
|
90
|
-
var toPrimitive = function (input, PREFERRED_STRING) {
|
91
|
-
if (!isObject(input)) return input;
|
92
|
-
var fn, val;
|
93
|
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
94
|
-
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
95
|
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
96
|
-
throw TypeError("Can't convert object to primitive value");
|
97
|
-
};
|
98
|
-
|
99
|
-
var nativeDefineProperty = Object.defineProperty;
|
100
|
-
|
101
|
-
// `Object.defineProperty` method
|
102
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
103
|
-
var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
104
|
-
anObject(O);
|
105
|
-
P = toPrimitive(P, true);
|
106
|
-
anObject(Attributes);
|
107
|
-
if (ie8DomDefine) try {
|
108
|
-
return nativeDefineProperty(O, P, Attributes);
|
109
|
-
} catch (error) { /* empty */ }
|
110
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
111
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
112
|
-
return O;
|
113
|
-
};
|
114
|
-
|
115
|
-
var objectDefineProperty = {
|
116
|
-
f: f
|
117
|
-
};
|
118
|
-
|
119
|
-
var createPropertyDescriptor = function (bitmap, value) {
|
120
|
-
return {
|
121
|
-
enumerable: !(bitmap & 1),
|
122
|
-
configurable: !(bitmap & 2),
|
123
|
-
writable: !(bitmap & 4),
|
124
|
-
value: value
|
125
|
-
};
|
126
|
-
};
|
127
|
-
|
128
|
-
var hide = descriptors ? function (object, key, value) {
|
129
|
-
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
130
|
-
} : function (object, key, value) {
|
131
|
-
object[key] = value;
|
132
|
-
return object;
|
133
|
-
};
|
134
|
-
|
135
|
-
var setGlobal = function (key, value) {
|
136
|
-
try {
|
137
|
-
hide(global_1, key, value);
|
138
|
-
} catch (error) {
|
139
|
-
global_1[key] = value;
|
140
|
-
} return value;
|
141
|
-
};
|
142
|
-
|
143
|
-
var shared = createCommonjsModule(function (module) {
|
144
|
-
var SHARED = '__core-js_shared__';
|
145
|
-
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
146
|
-
|
147
|
-
(module.exports = function (key, value) {
|
148
|
-
return store[key] || (store[key] = value !== undefined ? value : {});
|
149
|
-
})('versions', []).push({
|
150
|
-
version: '3.1.3',
|
151
|
-
mode: 'global',
|
152
|
-
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
153
|
-
});
|
154
|
-
});
|
155
|
-
|
156
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
157
|
-
|
158
|
-
var has = function (it, key) {
|
159
|
-
return hasOwnProperty.call(it, key);
|
160
|
-
};
|
161
|
-
|
162
|
-
var functionToString = shared('native-function-to-string', Function.toString);
|
163
|
-
|
164
|
-
var WeakMap = global_1.WeakMap;
|
165
|
-
|
166
|
-
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
|
167
|
-
|
168
|
-
var id = 0;
|
169
|
-
var postfix = Math.random();
|
170
|
-
|
171
|
-
var uid = function (key) {
|
172
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
173
|
-
};
|
174
|
-
|
175
|
-
var keys = shared('keys');
|
176
|
-
|
177
|
-
var sharedKey = function (key) {
|
178
|
-
return keys[key] || (keys[key] = uid(key));
|
179
|
-
};
|
180
|
-
|
181
|
-
var hiddenKeys = {};
|
182
|
-
|
183
|
-
var WeakMap$1 = global_1.WeakMap;
|
184
|
-
var set, get, has$1;
|
185
|
-
|
186
|
-
var enforce = function (it) {
|
187
|
-
return has$1(it) ? get(it) : set(it, {});
|
188
|
-
};
|
189
|
-
|
190
|
-
var getterFor = function (TYPE) {
|
191
|
-
return function (it) {
|
192
|
-
var state;
|
193
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
194
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
195
|
-
} return state;
|
196
|
-
};
|
197
|
-
};
|
198
|
-
|
199
|
-
if (nativeWeakMap) {
|
200
|
-
var store = new WeakMap$1();
|
201
|
-
var wmget = store.get;
|
202
|
-
var wmhas = store.has;
|
203
|
-
var wmset = store.set;
|
204
|
-
set = function (it, metadata) {
|
205
|
-
wmset.call(store, it, metadata);
|
206
|
-
return metadata;
|
207
|
-
};
|
208
|
-
get = function (it) {
|
209
|
-
return wmget.call(store, it) || {};
|
210
|
-
};
|
211
|
-
has$1 = function (it) {
|
212
|
-
return wmhas.call(store, it);
|
213
|
-
};
|
214
|
-
} else {
|
215
|
-
var STATE = sharedKey('state');
|
216
|
-
hiddenKeys[STATE] = true;
|
217
|
-
set = function (it, metadata) {
|
218
|
-
hide(it, STATE, metadata);
|
219
|
-
return metadata;
|
220
|
-
};
|
221
|
-
get = function (it) {
|
222
|
-
return has(it, STATE) ? it[STATE] : {};
|
223
|
-
};
|
224
|
-
has$1 = function (it) {
|
225
|
-
return has(it, STATE);
|
226
|
-
};
|
227
|
-
}
|
228
|
-
|
229
|
-
var internalState = {
|
230
|
-
set: set,
|
231
|
-
get: get,
|
232
|
-
has: has$1,
|
233
|
-
enforce: enforce,
|
234
|
-
getterFor: getterFor
|
235
|
-
};
|
236
|
-
|
237
|
-
var redefine = createCommonjsModule(function (module) {
|
238
|
-
var getInternalState = internalState.get;
|
239
|
-
var enforceInternalState = internalState.enforce;
|
240
|
-
var TEMPLATE = String(functionToString).split('toString');
|
241
|
-
|
242
|
-
shared('inspectSource', function (it) {
|
243
|
-
return functionToString.call(it);
|
244
|
-
});
|
245
|
-
|
246
|
-
(module.exports = function (O, key, value, options) {
|
247
|
-
var unsafe = options ? !!options.unsafe : false;
|
248
|
-
var simple = options ? !!options.enumerable : false;
|
249
|
-
var noTargetGet = options ? !!options.noTargetGet : false;
|
250
|
-
if (typeof value == 'function') {
|
251
|
-
if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
|
252
|
-
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
253
|
-
}
|
254
|
-
if (O === global_1) {
|
255
|
-
if (simple) O[key] = value;
|
256
|
-
else setGlobal(key, value);
|
257
|
-
return;
|
258
|
-
} else if (!unsafe) {
|
259
|
-
delete O[key];
|
260
|
-
} else if (!noTargetGet && O[key]) {
|
261
|
-
simple = true;
|
262
|
-
}
|
263
|
-
if (simple) O[key] = value;
|
264
|
-
else hide(O, key, value);
|
265
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
266
|
-
})(Function.prototype, 'toString', function toString() {
|
267
|
-
return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
|
268
|
-
});
|
269
|
-
});
|
270
|
-
|
271
|
-
var toString = {}.toString;
|
272
|
-
|
273
|
-
var classofRaw = function (it) {
|
274
|
-
return toString.call(it).slice(8, -1);
|
275
|
-
};
|
276
|
-
|
277
|
-
var aPossiblePrototype = function (it) {
|
278
|
-
if (!isObject(it) && it !== null) {
|
279
|
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
280
|
-
} return it;
|
281
|
-
};
|
282
|
-
|
283
|
-
// `Object.setPrototypeOf` method
|
284
|
-
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
285
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
286
|
-
/* eslint-disable no-proto */
|
287
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
288
|
-
var CORRECT_SETTER = false;
|
289
|
-
var test = {};
|
290
|
-
var setter;
|
291
|
-
try {
|
292
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
293
|
-
setter.call(test, []);
|
294
|
-
CORRECT_SETTER = test instanceof Array;
|
295
|
-
} catch (error) { /* empty */ }
|
296
|
-
return function setPrototypeOf(O, proto) {
|
297
|
-
anObject(O);
|
298
|
-
aPossiblePrototype(proto);
|
299
|
-
if (CORRECT_SETTER) setter.call(O, proto);
|
300
|
-
else O.__proto__ = proto;
|
301
|
-
return O;
|
302
|
-
};
|
303
|
-
}() : undefined);
|
304
|
-
|
305
|
-
// makes subclassing work correct for wrapped built-ins
|
306
|
-
var inheritIfRequired = function ($this, dummy, Wrapper) {
|
307
|
-
var NewTarget, NewTargetPrototype;
|
308
|
-
if (
|
309
|
-
// it can work only with native `setPrototypeOf`
|
310
|
-
objectSetPrototypeOf &&
|
311
|
-
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
312
|
-
typeof (NewTarget = dummy.constructor) == 'function' &&
|
313
|
-
NewTarget !== Wrapper &&
|
314
|
-
isObject(NewTargetPrototype = NewTarget.prototype) &&
|
315
|
-
NewTargetPrototype !== Wrapper.prototype
|
316
|
-
) objectSetPrototypeOf($this, NewTargetPrototype);
|
317
|
-
return $this;
|
318
|
-
};
|
319
|
-
|
320
|
-
var split = ''.split;
|
321
|
-
|
322
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
323
|
-
var indexedObject = fails(function () {
|
324
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
325
|
-
// eslint-disable-next-line no-prototype-builtins
|
326
|
-
return !Object('z').propertyIsEnumerable(0);
|
327
|
-
}) ? function (it) {
|
328
|
-
return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
329
|
-
} : Object;
|
330
|
-
|
331
|
-
// `RequireObjectCoercible` abstract operation
|
332
|
-
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
333
|
-
var requireObjectCoercible = function (it) {
|
334
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
335
|
-
return it;
|
336
|
-
};
|
337
|
-
|
338
|
-
// toObject with fallback for non-array-like ES3 strings
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
var toIndexedObject = function (it) {
|
343
|
-
return indexedObject(requireObjectCoercible(it));
|
344
|
-
};
|
345
|
-
|
346
|
-
var ceil = Math.ceil;
|
347
|
-
var floor = Math.floor;
|
348
|
-
|
349
|
-
// `ToInteger` abstract operation
|
350
|
-
// https://tc39.github.io/ecma262/#sec-tointeger
|
351
|
-
var toInteger = function (argument) {
|
352
|
-
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
353
|
-
};
|
354
|
-
|
355
|
-
var min = Math.min;
|
356
|
-
|
357
|
-
// `ToLength` abstract operation
|
358
|
-
// https://tc39.github.io/ecma262/#sec-tolength
|
359
|
-
var toLength = function (argument) {
|
360
|
-
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
361
|
-
};
|
362
|
-
|
363
|
-
var max = Math.max;
|
364
|
-
var min$1 = Math.min;
|
365
|
-
|
366
|
-
// Helper for a popular repeating case of the spec:
|
367
|
-
// Let integer be ? ToInteger(index).
|
368
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
|
369
|
-
var toAbsoluteIndex = function (index, length) {
|
370
|
-
var integer = toInteger(index);
|
371
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
372
|
-
};
|
373
|
-
|
374
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
375
|
-
var createMethod = function (IS_INCLUDES) {
|
376
|
-
return function ($this, el, fromIndex) {
|
377
|
-
var O = toIndexedObject($this);
|
378
|
-
var length = toLength(O.length);
|
379
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
380
|
-
var value;
|
381
|
-
// Array#includes uses SameValueZero equality algorithm
|
382
|
-
// eslint-disable-next-line no-self-compare
|
383
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
384
|
-
value = O[index++];
|
385
|
-
// eslint-disable-next-line no-self-compare
|
386
|
-
if (value != value) return true;
|
387
|
-
// Array#indexOf ignores holes, Array#includes - not
|
388
|
-
} else for (;length > index; index++) {
|
389
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
390
|
-
} return !IS_INCLUDES && -1;
|
391
|
-
};
|
392
|
-
};
|
393
|
-
|
394
|
-
var arrayIncludes = {
|
395
|
-
// `Array.prototype.includes` method
|
396
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
|
397
|
-
includes: createMethod(true),
|
398
|
-
// `Array.prototype.indexOf` method
|
399
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
400
|
-
indexOf: createMethod(false)
|
401
|
-
};
|
402
|
-
|
403
|
-
var indexOf = arrayIncludes.indexOf;
|
404
|
-
|
405
|
-
|
406
|
-
var objectKeysInternal = function (object, names) {
|
407
|
-
var O = toIndexedObject(object);
|
408
|
-
var i = 0;
|
409
|
-
var result = [];
|
410
|
-
var key;
|
411
|
-
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
412
|
-
// Don't enum bug & hidden keys
|
413
|
-
while (names.length > i) if (has(O, key = names[i++])) {
|
414
|
-
~indexOf(result, key) || result.push(key);
|
415
|
-
}
|
416
|
-
return result;
|
417
|
-
};
|
418
|
-
|
419
|
-
// IE8- don't enum bug keys
|
420
|
-
var enumBugKeys = [
|
421
|
-
'constructor',
|
422
|
-
'hasOwnProperty',
|
423
|
-
'isPrototypeOf',
|
424
|
-
'propertyIsEnumerable',
|
425
|
-
'toLocaleString',
|
426
|
-
'toString',
|
427
|
-
'valueOf'
|
428
|
-
];
|
429
|
-
|
430
|
-
// `Object.keys` method
|
431
|
-
// https://tc39.github.io/ecma262/#sec-object.keys
|
432
|
-
var objectKeys = Object.keys || function keys(O) {
|
433
|
-
return objectKeysInternal(O, enumBugKeys);
|
434
|
-
};
|
435
|
-
|
436
|
-
// `Object.defineProperties` method
|
437
|
-
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
438
|
-
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
439
|
-
anObject(O);
|
440
|
-
var keys = objectKeys(Properties);
|
441
|
-
var length = keys.length;
|
442
|
-
var index = 0;
|
443
|
-
var key;
|
444
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
|
445
|
-
return O;
|
446
|
-
};
|
447
|
-
|
448
|
-
var path = global_1;
|
449
|
-
|
450
|
-
var aFunction = function (variable) {
|
451
|
-
return typeof variable == 'function' ? variable : undefined;
|
452
|
-
};
|
453
|
-
|
454
|
-
var getBuiltIn = function (namespace, method) {
|
455
|
-
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
456
|
-
: path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
457
|
-
};
|
458
|
-
|
459
|
-
var html = getBuiltIn('document', 'documentElement');
|
460
|
-
|
461
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
462
|
-
|
463
|
-
var PROTOTYPE = 'prototype';
|
464
|
-
var Empty = function () { /* empty */ };
|
465
|
-
|
466
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
467
|
-
var createDict = function () {
|
468
|
-
// Thrash, waste and sodomy: IE GC bug
|
469
|
-
var iframe = documentCreateElement('iframe');
|
470
|
-
var length = enumBugKeys.length;
|
471
|
-
var lt = '<';
|
472
|
-
var script = 'script';
|
473
|
-
var gt = '>';
|
474
|
-
var js = 'java' + script + ':';
|
475
|
-
var iframeDocument;
|
476
|
-
iframe.style.display = 'none';
|
477
|
-
html.appendChild(iframe);
|
478
|
-
iframe.src = String(js);
|
479
|
-
iframeDocument = iframe.contentWindow.document;
|
480
|
-
iframeDocument.open();
|
481
|
-
iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
|
482
|
-
iframeDocument.close();
|
483
|
-
createDict = iframeDocument.F;
|
484
|
-
while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
|
485
|
-
return createDict();
|
486
|
-
};
|
487
|
-
|
488
|
-
// `Object.create` method
|
489
|
-
// https://tc39.github.io/ecma262/#sec-object.create
|
490
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
491
|
-
var result;
|
492
|
-
if (O !== null) {
|
493
|
-
Empty[PROTOTYPE] = anObject(O);
|
494
|
-
result = new Empty();
|
495
|
-
Empty[PROTOTYPE] = null;
|
496
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
497
|
-
result[IE_PROTO] = O;
|
498
|
-
} else result = createDict();
|
499
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
500
|
-
};
|
501
|
-
|
502
|
-
hiddenKeys[IE_PROTO] = true;
|
503
|
-
|
504
|
-
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
505
|
-
|
506
|
-
// `Object.getOwnPropertyNames` method
|
507
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
508
|
-
var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
509
|
-
return objectKeysInternal(O, hiddenKeys$1);
|
510
|
-
};
|
511
|
-
|
512
|
-
var objectGetOwnPropertyNames = {
|
513
|
-
f: f$1
|
514
|
-
};
|
515
|
-
|
516
|
-
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
517
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
518
|
-
|
519
|
-
// Nashorn ~ JDK8 bug
|
520
|
-
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
521
|
-
|
522
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
523
|
-
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
524
|
-
var f$2 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
525
|
-
var descriptor = getOwnPropertyDescriptor(this, V);
|
526
|
-
return !!descriptor && descriptor.enumerable;
|
527
|
-
} : nativePropertyIsEnumerable;
|
528
|
-
|
529
|
-
var objectPropertyIsEnumerable = {
|
530
|
-
f: f$2
|
531
|
-
};
|
532
|
-
|
533
|
-
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
534
|
-
|
535
|
-
// `Object.getOwnPropertyDescriptor` method
|
536
|
-
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
537
|
-
var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
538
|
-
O = toIndexedObject(O);
|
539
|
-
P = toPrimitive(P, true);
|
540
|
-
if (ie8DomDefine) try {
|
541
|
-
return nativeGetOwnPropertyDescriptor(O, P);
|
542
|
-
} catch (error) { /* empty */ }
|
543
|
-
if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
544
|
-
};
|
545
|
-
|
546
|
-
var objectGetOwnPropertyDescriptor = {
|
547
|
-
f: f$3
|
548
|
-
};
|
549
|
-
|
550
|
-
// a string of all valid unicode whitespaces
|
551
|
-
// eslint-disable-next-line max-len
|
552
|
-
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
553
|
-
|
554
|
-
var whitespace = '[' + whitespaces + ']';
|
555
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
556
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
557
|
-
|
558
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
559
|
-
var createMethod$1 = function (TYPE) {
|
560
|
-
return function ($this) {
|
561
|
-
var string = String(requireObjectCoercible($this));
|
562
|
-
if (TYPE & 1) string = string.replace(ltrim, '');
|
563
|
-
if (TYPE & 2) string = string.replace(rtrim, '');
|
564
|
-
return string;
|
565
|
-
};
|
566
|
-
};
|
567
|
-
|
568
|
-
var stringTrim = {
|
569
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
570
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
571
|
-
start: createMethod$1(1),
|
572
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
573
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
574
|
-
end: createMethod$1(2),
|
575
|
-
// `String.prototype.trim` method
|
576
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
577
|
-
trim: createMethod$1(3)
|
578
|
-
};
|
579
|
-
|
580
|
-
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
581
|
-
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
582
|
-
var defineProperty = objectDefineProperty.f;
|
583
|
-
var trim = stringTrim.trim;
|
584
|
-
|
585
|
-
var NUMBER = 'Number';
|
586
|
-
var NativeNumber = global_1[NUMBER];
|
587
|
-
var NumberPrototype = NativeNumber.prototype;
|
588
|
-
|
589
|
-
// Opera ~12 has broken Object#toString
|
590
|
-
var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
|
591
|
-
|
592
|
-
// `ToNumber` abstract operation
|
593
|
-
// https://tc39.github.io/ecma262/#sec-tonumber
|
594
|
-
var toNumber = function (argument) {
|
595
|
-
var it = toPrimitive(argument, false);
|
596
|
-
var first, third, radix, maxCode, digits, length, index, code;
|
597
|
-
if (typeof it == 'string' && it.length > 2) {
|
598
|
-
it = trim(it);
|
599
|
-
first = it.charCodeAt(0);
|
600
|
-
if (first === 43 || first === 45) {
|
601
|
-
third = it.charCodeAt(2);
|
602
|
-
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
603
|
-
} else if (first === 48) {
|
604
|
-
switch (it.charCodeAt(1)) {
|
605
|
-
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
|
606
|
-
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
|
607
|
-
default: return +it;
|
608
|
-
}
|
609
|
-
digits = it.slice(2);
|
610
|
-
length = digits.length;
|
611
|
-
for (index = 0; index < length; index++) {
|
612
|
-
code = digits.charCodeAt(index);
|
613
|
-
// parseInt parses a string to a first unavailable symbol
|
614
|
-
// but ToNumber should return NaN if a string contains unavailable symbols
|
615
|
-
if (code < 48 || code > maxCode) return NaN;
|
616
|
-
} return parseInt(digits, radix);
|
617
|
-
}
|
618
|
-
} return +it;
|
619
|
-
};
|
620
|
-
|
621
|
-
// `Number` constructor
|
622
|
-
// https://tc39.github.io/ecma262/#sec-number-constructor
|
623
|
-
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
624
|
-
var NumberWrapper = function Number(value) {
|
625
|
-
var it = arguments.length < 1 ? 0 : value;
|
626
|
-
var dummy = this;
|
627
|
-
return dummy instanceof NumberWrapper
|
628
|
-
// check on 1..constructor(foo) case
|
629
|
-
&& (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classofRaw(dummy) != NUMBER)
|
630
|
-
? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
|
631
|
-
};
|
632
|
-
for (var keys$1 = descriptors ? getOwnPropertyNames(NativeNumber) : (
|
633
|
-
// ES3:
|
634
|
-
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
635
|
-
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
636
|
-
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
637
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
638
|
-
).split(','), j = 0, key; keys$1.length > j; j++) {
|
639
|
-
if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
|
640
|
-
defineProperty(NumberWrapper, key, getOwnPropertyDescriptor$1(NativeNumber, key));
|
641
|
-
}
|
642
|
-
}
|
643
|
-
NumberWrapper.prototype = NumberPrototype;
|
644
|
-
NumberPrototype.constructor = NumberWrapper;
|
645
|
-
redefine(global_1, NUMBER, NumberWrapper);
|
646
|
-
}
|
647
|
-
|
648
|
-
var f$4 = Object.getOwnPropertySymbols;
|
649
|
-
|
650
|
-
var objectGetOwnPropertySymbols = {
|
651
|
-
f: f$4
|
652
|
-
};
|
653
|
-
|
654
|
-
// all object keys, includes non-enumerable and symbols
|
655
|
-
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
656
|
-
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
657
|
-
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
658
|
-
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
659
|
-
};
|
660
|
-
|
661
|
-
var copyConstructorProperties = function (target, source) {
|
662
|
-
var keys = ownKeys(source);
|
663
|
-
var defineProperty = objectDefineProperty.f;
|
664
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
665
|
-
for (var i = 0; i < keys.length; i++) {
|
666
|
-
var key = keys[i];
|
667
|
-
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
668
|
-
}
|
669
|
-
};
|
670
|
-
|
671
|
-
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
/*
|
679
|
-
options.target - name of the target object
|
680
|
-
options.global - target is the global object
|
681
|
-
options.stat - export as static methods of target
|
682
|
-
options.proto - export as prototype methods of target
|
683
|
-
options.real - real prototype method for the `pure` version
|
684
|
-
options.forced - export even if the native feature is available
|
685
|
-
options.bind - bind methods to the target, required for the `pure` version
|
686
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
687
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
688
|
-
options.sham - add a flag to not completely full polyfills
|
689
|
-
options.enumerable - export as enumerable property
|
690
|
-
options.noTargetGet - prevent calling a getter on target
|
691
|
-
*/
|
692
|
-
var _export = function (options, source) {
|
693
|
-
var TARGET = options.target;
|
694
|
-
var GLOBAL = options.global;
|
695
|
-
var STATIC = options.stat;
|
696
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
697
|
-
if (GLOBAL) {
|
698
|
-
target = global_1;
|
699
|
-
} else if (STATIC) {
|
700
|
-
target = global_1[TARGET] || setGlobal(TARGET, {});
|
701
|
-
} else {
|
702
|
-
target = (global_1[TARGET] || {}).prototype;
|
703
|
-
}
|
704
|
-
if (target) for (key in source) {
|
705
|
-
sourceProperty = source[key];
|
706
|
-
if (options.noTargetGet) {
|
707
|
-
descriptor = getOwnPropertyDescriptor$2(target, key);
|
708
|
-
targetProperty = descriptor && descriptor.value;
|
709
|
-
} else targetProperty = target[key];
|
710
|
-
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
711
|
-
// contained in target
|
712
|
-
if (!FORCED && targetProperty !== undefined) {
|
713
|
-
if (typeof sourceProperty === typeof targetProperty) continue;
|
714
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
715
|
-
}
|
716
|
-
// add a flag to not completely full polyfills
|
717
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
718
|
-
hide(sourceProperty, 'sham', true);
|
719
|
-
}
|
720
|
-
// extend global
|
721
|
-
redefine(target, key, sourceProperty, options);
|
722
|
-
}
|
723
|
-
};
|
724
|
-
|
725
|
-
var trim$1 = stringTrim.trim;
|
726
|
-
|
727
|
-
|
728
|
-
var nativeParseInt = global_1.parseInt;
|
729
|
-
var hex = /^[+-]?0[Xx]/;
|
730
|
-
var FORCED = nativeParseInt(whitespaces + '08') !== 8 || nativeParseInt(whitespaces + '0x16') !== 22;
|
731
|
-
|
732
|
-
// `parseInt` method
|
733
|
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
734
|
-
var _parseInt = FORCED ? function parseInt(string, radix) {
|
735
|
-
var S = trim$1(String(string));
|
736
|
-
return nativeParseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
|
737
|
-
} : nativeParseInt;
|
738
|
-
|
739
|
-
// `parseInt` method
|
740
|
-
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
741
|
-
_export({ global: true, forced: parseInt != _parseInt }, {
|
742
|
-
parseInt: _parseInt
|
743
|
-
});
|
744
|
-
|
745
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
746
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
747
|
-
// eslint-disable-next-line no-undef
|
748
|
-
return !String(Symbol());
|
749
|
-
});
|
750
|
-
|
751
|
-
var Symbol$1 = global_1.Symbol;
|
752
|
-
var store$1 = shared('wks');
|
753
|
-
|
754
|
-
var wellKnownSymbol = function (name) {
|
755
|
-
return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
|
756
|
-
|| (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
|
757
|
-
};
|
758
|
-
|
759
|
-
var MATCH = wellKnownSymbol('match');
|
760
|
-
|
761
|
-
// `IsRegExp` abstract operation
|
762
|
-
// https://tc39.github.io/ecma262/#sec-isregexp
|
763
|
-
var isRegexp = function (it) {
|
764
|
-
var isRegExp;
|
765
|
-
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
766
|
-
};
|
767
|
-
|
768
|
-
// `RegExp.prototype.flags` getter implementation
|
769
|
-
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
770
|
-
var regexpFlags = function () {
|
771
|
-
var that = anObject(this);
|
772
|
-
var result = '';
|
773
|
-
if (that.global) result += 'g';
|
774
|
-
if (that.ignoreCase) result += 'i';
|
775
|
-
if (that.multiline) result += 'm';
|
776
|
-
if (that.dotAll) result += 's';
|
777
|
-
if (that.unicode) result += 'u';
|
778
|
-
if (that.sticky) result += 'y';
|
779
|
-
return result;
|
780
|
-
};
|
781
|
-
|
782
|
-
var SPECIES = wellKnownSymbol('species');
|
783
|
-
|
784
|
-
var setSpecies = function (CONSTRUCTOR_NAME) {
|
785
|
-
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
786
|
-
var defineProperty = objectDefineProperty.f;
|
787
|
-
|
788
|
-
if (descriptors && Constructor && !Constructor[SPECIES]) {
|
789
|
-
defineProperty(Constructor, SPECIES, {
|
790
|
-
configurable: true,
|
791
|
-
get: function () { return this; }
|
792
|
-
});
|
793
|
-
}
|
794
|
-
};
|
795
|
-
|
796
|
-
var defineProperty$1 = objectDefineProperty.f;
|
797
|
-
var getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
var MATCH$1 = wellKnownSymbol('match');
|
806
|
-
var NativeRegExp = global_1.RegExp;
|
807
|
-
var RegExpPrototype = NativeRegExp.prototype;
|
808
|
-
var re1 = /a/g;
|
809
|
-
var re2 = /a/g;
|
810
|
-
|
811
|
-
// "new" should create a new object, old webkit bug
|
812
|
-
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
813
|
-
|
814
|
-
var FORCED$1 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || fails(function () {
|
815
|
-
re2[MATCH$1] = false;
|
816
|
-
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
817
|
-
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
818
|
-
})));
|
819
|
-
|
820
|
-
// `RegExp` constructor
|
821
|
-
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
822
|
-
if (FORCED$1) {
|
823
|
-
var RegExpWrapper = function RegExp(pattern, flags) {
|
824
|
-
var thisIsRegExp = this instanceof RegExpWrapper;
|
825
|
-
var patternIsRegExp = isRegexp(pattern);
|
826
|
-
var flagsAreUndefined = flags === undefined;
|
827
|
-
return !thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined ? pattern
|
828
|
-
: inheritIfRequired(CORRECT_NEW
|
829
|
-
? new NativeRegExp(patternIsRegExp && !flagsAreUndefined ? pattern.source : pattern, flags)
|
830
|
-
: NativeRegExp((patternIsRegExp = pattern instanceof RegExpWrapper)
|
831
|
-
? pattern.source
|
832
|
-
: pattern, patternIsRegExp && flagsAreUndefined ? regexpFlags.call(pattern) : flags)
|
833
|
-
, thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);
|
834
|
-
};
|
835
|
-
var proxy = function (key) {
|
836
|
-
key in RegExpWrapper || defineProperty$1(RegExpWrapper, key, {
|
837
|
-
configurable: true,
|
838
|
-
get: function () { return NativeRegExp[key]; },
|
839
|
-
set: function (it) { NativeRegExp[key] = it; }
|
840
|
-
});
|
841
|
-
};
|
842
|
-
var keys$2 = getOwnPropertyNames$1(NativeRegExp);
|
843
|
-
var index = 0;
|
844
|
-
while (keys$2.length > index) proxy(keys$2[index++]);
|
845
|
-
RegExpPrototype.constructor = RegExpWrapper;
|
846
|
-
RegExpWrapper.prototype = RegExpPrototype;
|
847
|
-
redefine(global_1, 'RegExp', RegExpWrapper);
|
848
|
-
}
|
849
|
-
|
850
|
-
// https://tc39.github.io/ecma262/#sec-get-regexp-@@species
|
851
|
-
setSpecies('RegExp');
|
852
|
-
|
853
|
-
var TO_STRING = 'toString';
|
854
|
-
var RegExpPrototype$1 = RegExp.prototype;
|
855
|
-
var nativeToString = RegExpPrototype$1[TO_STRING];
|
856
|
-
|
857
|
-
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
858
|
-
// FF44- RegExp#toString has a wrong name
|
859
|
-
var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
860
|
-
|
861
|
-
// `RegExp.prototype.toString` method
|
862
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
|
863
|
-
if (NOT_GENERIC || INCORRECT_NAME) {
|
864
|
-
redefine(RegExp.prototype, TO_STRING, function toString() {
|
865
|
-
var R = anObject(this);
|
866
|
-
var p = String(R.source);
|
867
|
-
var rf = R.flags;
|
868
|
-
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$1) ? regexpFlags.call(R) : rf);
|
869
|
-
return '/' + p + '/' + f;
|
870
|
-
}, { unsafe: true });
|
871
|
-
}
|
872
|
-
|
873
|
-
var nativeExec = RegExp.prototype.exec;
|
874
|
-
// This always refers to the native implementation, because the
|
875
|
-
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
876
|
-
// which loads this file before patching the method.
|
877
|
-
var nativeReplace = String.prototype.replace;
|
878
|
-
|
879
|
-
var patchedExec = nativeExec;
|
880
|
-
|
881
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
882
|
-
var re1 = /a/;
|
883
|
-
var re2 = /b*/g;
|
884
|
-
nativeExec.call(re1, 'a');
|
885
|
-
nativeExec.call(re2, 'a');
|
886
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
887
|
-
})();
|
888
|
-
|
889
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
890
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
891
|
-
|
892
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
893
|
-
|
894
|
-
if (PATCH) {
|
895
|
-
patchedExec = function exec(str) {
|
896
|
-
var re = this;
|
897
|
-
var lastIndex, reCopy, match, i;
|
898
|
-
|
899
|
-
if (NPCG_INCLUDED) {
|
900
|
-
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
901
|
-
}
|
902
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
903
|
-
|
904
|
-
match = nativeExec.call(re, str);
|
905
|
-
|
906
|
-
if (UPDATES_LAST_INDEX_WRONG && match) {
|
907
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
908
|
-
}
|
909
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
910
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
911
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
912
|
-
nativeReplace.call(match[0], reCopy, function () {
|
913
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
914
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
915
|
-
}
|
916
|
-
});
|
917
|
-
}
|
918
|
-
|
919
|
-
return match;
|
920
|
-
};
|
921
|
-
}
|
922
|
-
|
923
|
-
var regexpExec = patchedExec;
|
924
|
-
|
925
|
-
var SPECIES$1 = wellKnownSymbol('species');
|
926
|
-
|
927
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
928
|
-
// #replace needs built-in support for named groups.
|
929
|
-
// #match works fine because it just return the exec results, even if it has
|
930
|
-
// a "grops" property.
|
931
|
-
var re = /./;
|
932
|
-
re.exec = function () {
|
933
|
-
var result = [];
|
934
|
-
result.groups = { a: '7' };
|
935
|
-
return result;
|
936
|
-
};
|
937
|
-
return ''.replace(re, '$<a>') !== '7';
|
938
|
-
});
|
939
|
-
|
940
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
941
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
942
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
943
|
-
var re = /(?:)/;
|
944
|
-
var originalExec = re.exec;
|
945
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
946
|
-
var result = 'ab'.split(re);
|
947
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
948
|
-
});
|
949
|
-
|
950
|
-
var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
951
|
-
var SYMBOL = wellKnownSymbol(KEY);
|
952
|
-
|
953
|
-
var DELEGATES_TO_SYMBOL = !fails(function () {
|
954
|
-
// String methods call symbol-named RegEp methods
|
955
|
-
var O = {};
|
956
|
-
O[SYMBOL] = function () { return 7; };
|
957
|
-
return ''[KEY](O) != 7;
|
958
|
-
});
|
959
|
-
|
960
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
961
|
-
// Symbol-named RegExp methods call .exec
|
962
|
-
var execCalled = false;
|
963
|
-
var re = /a/;
|
964
|
-
re.exec = function () { execCalled = true; return null; };
|
965
|
-
|
966
|
-
if (KEY === 'split') {
|
967
|
-
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
968
|
-
// a new one. We need to return the patched regex when creating the new one.
|
969
|
-
re.constructor = {};
|
970
|
-
re.constructor[SPECIES$1] = function () { return re; };
|
971
|
-
}
|
972
|
-
|
973
|
-
re[SYMBOL]('');
|
974
|
-
return !execCalled;
|
975
|
-
});
|
976
|
-
|
977
|
-
if (
|
978
|
-
!DELEGATES_TO_SYMBOL ||
|
979
|
-
!DELEGATES_TO_EXEC ||
|
980
|
-
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
981
|
-
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
982
|
-
) {
|
983
|
-
var nativeRegExpMethod = /./[SYMBOL];
|
984
|
-
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
985
|
-
if (regexp.exec === regexpExec) {
|
986
|
-
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
987
|
-
// The native String method already delegates to @@method (this
|
988
|
-
// polyfilled function), leasing to infinite recursion.
|
989
|
-
// We avoid it by directly calling the native @@method method.
|
990
|
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
991
|
-
}
|
992
|
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
993
|
-
}
|
994
|
-
return { done: false };
|
995
|
-
});
|
996
|
-
var stringMethod = methods[0];
|
997
|
-
var regexMethod = methods[1];
|
998
|
-
|
999
|
-
redefine(String.prototype, KEY, stringMethod);
|
1000
|
-
redefine(RegExp.prototype, SYMBOL, length == 2
|
1001
|
-
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
1002
|
-
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
1003
|
-
? function (string, arg) { return regexMethod.call(string, this, arg); }
|
1004
|
-
// 21.2.5.6 RegExp.prototype[@@match](string)
|
1005
|
-
// 21.2.5.9 RegExp.prototype[@@search](string)
|
1006
|
-
: function (string) { return regexMethod.call(string, this); }
|
1007
|
-
);
|
1008
|
-
if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
1009
|
-
}
|
1010
|
-
};
|
1011
|
-
|
1012
|
-
// `ToObject` abstract operation
|
1013
|
-
// https://tc39.github.io/ecma262/#sec-toobject
|
1014
|
-
var toObject = function (argument) {
|
1015
|
-
return Object(requireObjectCoercible(argument));
|
1016
|
-
};
|
1017
|
-
|
1018
|
-
// `String.prototype.{ codePointAt, at }` methods implementation
|
1019
|
-
var createMethod$2 = function (CONVERT_TO_STRING) {
|
1020
|
-
return function ($this, pos) {
|
1021
|
-
var S = String(requireObjectCoercible($this));
|
1022
|
-
var position = toInteger(pos);
|
1023
|
-
var size = S.length;
|
1024
|
-
var first, second;
|
1025
|
-
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
1026
|
-
first = S.charCodeAt(position);
|
1027
|
-
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
1028
|
-
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
1029
|
-
? CONVERT_TO_STRING ? S.charAt(position) : first
|
1030
|
-
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
1031
|
-
};
|
1032
|
-
};
|
1033
|
-
|
1034
|
-
var stringMultibyte = {
|
1035
|
-
// `String.prototype.codePointAt` method
|
1036
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
1037
|
-
codeAt: createMethod$2(false),
|
1038
|
-
// `String.prototype.at` method
|
1039
|
-
// https://github.com/mathiasbynens/String.prototype.at
|
1040
|
-
charAt: createMethod$2(true)
|
1041
|
-
};
|
1042
|
-
|
1043
|
-
var charAt = stringMultibyte.charAt;
|
1044
|
-
|
1045
|
-
// `AdvanceStringIndex` abstract operation
|
1046
|
-
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
1047
|
-
var advanceStringIndex = function (S, index, unicode) {
|
1048
|
-
return index + (unicode ? charAt(S, index).length : 1);
|
1049
|
-
};
|
1050
|
-
|
1051
|
-
// `RegExpExec` abstract operation
|
1052
|
-
// https://tc39.github.io/ecma262/#sec-regexpexec
|
1053
|
-
var regexpExecAbstract = function (R, S) {
|
1054
|
-
var exec = R.exec;
|
1055
|
-
if (typeof exec === 'function') {
|
1056
|
-
var result = exec.call(R, S);
|
1057
|
-
if (typeof result !== 'object') {
|
1058
|
-
throw TypeError('RegExp exec method returned something other than an Object or null');
|
1059
|
-
}
|
1060
|
-
return result;
|
1061
|
-
}
|
1062
|
-
|
1063
|
-
if (classofRaw(R) !== 'RegExp') {
|
1064
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
1065
|
-
}
|
1066
|
-
|
1067
|
-
return regexpExec.call(R, S);
|
1068
|
-
};
|
1069
|
-
|
1070
|
-
var max$1 = Math.max;
|
1071
|
-
var min$2 = Math.min;
|
1072
|
-
var floor$1 = Math.floor;
|
1073
|
-
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
1074
|
-
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
1075
|
-
|
1076
|
-
var maybeToString = function (it) {
|
1077
|
-
return it === undefined ? it : String(it);
|
1078
|
-
};
|
1079
|
-
|
1080
|
-
// @@replace logic
|
1081
|
-
fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1082
|
-
return [
|
1083
|
-
// `String.prototype.replace` method
|
1084
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
1085
|
-
function replace(searchValue, replaceValue) {
|
1086
|
-
var O = requireObjectCoercible(this);
|
1087
|
-
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
1088
|
-
return replacer !== undefined
|
1089
|
-
? replacer.call(searchValue, O, replaceValue)
|
1090
|
-
: nativeReplace.call(String(O), searchValue, replaceValue);
|
1091
|
-
},
|
1092
|
-
// `RegExp.prototype[@@replace]` method
|
1093
|
-
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
1094
|
-
function (regexp, replaceValue) {
|
1095
|
-
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1096
|
-
if (res.done) return res.value;
|
1097
|
-
|
1098
|
-
var rx = anObject(regexp);
|
1099
|
-
var S = String(this);
|
1100
|
-
|
1101
|
-
var functionalReplace = typeof replaceValue === 'function';
|
1102
|
-
if (!functionalReplace) replaceValue = String(replaceValue);
|
1103
|
-
|
1104
|
-
var global = rx.global;
|
1105
|
-
if (global) {
|
1106
|
-
var fullUnicode = rx.unicode;
|
1107
|
-
rx.lastIndex = 0;
|
1108
|
-
}
|
1109
|
-
var results = [];
|
1110
|
-
while (true) {
|
1111
|
-
var result = regexpExecAbstract(rx, S);
|
1112
|
-
if (result === null) break;
|
1113
|
-
|
1114
|
-
results.push(result);
|
1115
|
-
if (!global) break;
|
1116
|
-
|
1117
|
-
var matchStr = String(result[0]);
|
1118
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
var accumulatedResult = '';
|
1122
|
-
var nextSourcePosition = 0;
|
1123
|
-
for (var i = 0; i < results.length; i++) {
|
1124
|
-
result = results[i];
|
1125
|
-
|
1126
|
-
var matched = String(result[0]);
|
1127
|
-
var position = max$1(min$2(toInteger(result.index), S.length), 0);
|
1128
|
-
var captures = [];
|
1129
|
-
// NOTE: This is equivalent to
|
1130
|
-
// captures = result.slice(1).map(maybeToString)
|
1131
|
-
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
1132
|
-
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
1133
|
-
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
1134
|
-
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1135
|
-
var namedCaptures = result.groups;
|
1136
|
-
if (functionalReplace) {
|
1137
|
-
var replacerArgs = [matched].concat(captures, position, S);
|
1138
|
-
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1139
|
-
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1140
|
-
} else {
|
1141
|
-
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1142
|
-
}
|
1143
|
-
if (position >= nextSourcePosition) {
|
1144
|
-
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
1145
|
-
nextSourcePosition = position + matched.length;
|
1146
|
-
}
|
1147
|
-
}
|
1148
|
-
return accumulatedResult + S.slice(nextSourcePosition);
|
1149
|
-
}
|
1150
|
-
];
|
1151
|
-
|
1152
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
1153
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1154
|
-
var tailPos = position + matched.length;
|
1155
|
-
var m = captures.length;
|
1156
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1157
|
-
if (namedCaptures !== undefined) {
|
1158
|
-
namedCaptures = toObject(namedCaptures);
|
1159
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
1160
|
-
}
|
1161
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1162
|
-
var capture;
|
1163
|
-
switch (ch.charAt(0)) {
|
1164
|
-
case '$': return '$';
|
1165
|
-
case '&': return matched;
|
1166
|
-
case '`': return str.slice(0, position);
|
1167
|
-
case "'": return str.slice(tailPos);
|
1168
|
-
case '<':
|
1169
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
1170
|
-
break;
|
1171
|
-
default: // \d\d?
|
1172
|
-
var n = +ch;
|
1173
|
-
if (n === 0) return match;
|
1174
|
-
if (n > m) {
|
1175
|
-
var f = floor$1(n / 10);
|
1176
|
-
if (f === 0) return match;
|
1177
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1178
|
-
return match;
|
1179
|
-
}
|
1180
|
-
capture = captures[n - 1];
|
1181
|
-
}
|
1182
|
-
return capture === undefined ? '' : capture;
|
1183
|
-
});
|
1184
|
-
}
|
1185
|
-
});
|
1186
|
-
|
1187
|
-
/**
|
1188
|
-
* @author: Brian Huisman
|
1189
|
-
* @webSite: http://www.greywyvern.com
|
1190
|
-
* JS functions to allow natural sorting on bootstrap-table columns
|
1191
|
-
* add data-sorter="alphanum" or data-sorter="numericOnly" to any th
|
1192
|
-
*
|
1193
|
-
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
|
1194
|
-
* @update Duane May
|
1195
|
-
*/
|
1196
|
-
function alphanum(a, b) {
|
1197
|
-
function chunkify(t) {
|
1198
|
-
var tz = [];
|
1199
|
-
var y = -1;
|
1200
|
-
var n = 0;
|
1201
|
-
|
1202
|
-
for (var i = 0; i <= t.length; i++) {
|
1203
|
-
var char = t.charAt(i);
|
1204
|
-
var charCode = char.charCodeAt(0);
|
1205
|
-
var m = charCode === 46 || charCode >= 48 && charCode <= 57;
|
1206
|
-
|
1207
|
-
if (m !== n) {
|
1208
|
-
tz[++y] = '';
|
1209
|
-
n = m;
|
1210
|
-
}
|
1211
|
-
|
1212
|
-
tz[y] += char;
|
1213
|
-
}
|
1214
|
-
|
1215
|
-
return tz;
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
function stringfy(v) {
|
1219
|
-
if (typeof v === 'number') {
|
1220
|
-
v = "".concat(v);
|
1221
|
-
}
|
1222
|
-
|
1223
|
-
if (!v) {
|
1224
|
-
v = '';
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
return v;
|
1228
|
-
}
|
1229
|
-
|
1230
|
-
var aa = chunkify(stringfy(a));
|
1231
|
-
var bb = chunkify(stringfy(b));
|
1232
|
-
|
1233
|
-
for (var x = 0; aa[x] && bb[x]; x++) {
|
1234
|
-
if (aa[x] !== bb[x]) {
|
1235
|
-
var c = Number(aa[x]);
|
1236
|
-
var d = Number(bb[x]);
|
1237
|
-
|
1238
|
-
if (c === aa[x] && d === bb[x]) {
|
1239
|
-
return c - d;
|
1240
|
-
}
|
1241
|
-
|
1242
|
-
return aa[x] > bb[x] ? 1 : -1;
|
1243
|
-
}
|
1244
|
-
}
|
1245
|
-
|
1246
|
-
return aa.length - bb.length;
|
1247
|
-
}
|
1248
|
-
|
1249
|
-
function numericOnly(a, b) {
|
1250
|
-
function stripNonNumber(s) {
|
1251
|
-
s = s.replace(new RegExp(/[^0-9]/g), '');
|
1252
|
-
return parseInt(s, 10);
|
1253
|
-
}
|
1254
|
-
|
1255
|
-
return stripNonNumber(a) - stripNonNumber(b);
|
1256
|
-
}
|
1257
|
-
|
1258
|
-
var bootstrapTableNaturalSorting = {
|
1259
|
-
alphanum: alphanum,
|
1260
|
-
numericOnly: numericOnly
|
1261
|
-
};
|
1262
|
-
|
1263
|
-
return bootstrapTableNaturalSorting;
|
1264
|
-
|
1265
|
-
}));
|