1 | (function (global, factory) {
|
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
|
3 | typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
4 | (global = global || self, factory(global.jQuery));
|
5 | }(this, function ($) { 'use strict';
|
6 |
|
7 | $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
8 |
|
9 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
10 |
|
11 | function createCommonjsModule(fn, module) {
|
12 | return module = { exports: {} }, fn(module, module.exports), module.exports;
|
13 | }
|
14 |
|
15 | var O = 'object';
|
16 | var check = function (it) {
|
17 | return it && it.Math == Math && it;
|
18 | };
|
19 |
|
20 |
|
21 | var global_1 =
|
22 |
|
23 | check(typeof globalThis == O && globalThis) ||
|
24 | check(typeof window == O && window) ||
|
25 | check(typeof self == O && self) ||
|
26 | check(typeof commonjsGlobal == O && commonjsGlobal) ||
|
27 |
|
28 | Function('return this')();
|
29 |
|
30 | var fails = function (exec) {
|
31 | try {
|
32 | return !!exec();
|
33 | } catch (error) {
|
34 | return true;
|
35 | }
|
36 | };
|
37 |
|
38 |
|
39 | var descriptors = !fails(function () {
|
40 | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
41 | });
|
42 |
|
43 | var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
44 | var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
45 |
|
46 |
|
47 | var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
48 |
|
49 |
|
50 |
|
51 | var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
52 | var descriptor = getOwnPropertyDescriptor(this, V);
|
53 | return !!descriptor && descriptor.enumerable;
|
54 | } : nativePropertyIsEnumerable;
|
55 |
|
56 | var objectPropertyIsEnumerable = {
|
57 | f: f
|
58 | };
|
59 |
|
60 | var createPropertyDescriptor = function (bitmap, value) {
|
61 | return {
|
62 | enumerable: !(bitmap & 1),
|
63 | configurable: !(bitmap & 2),
|
64 | writable: !(bitmap & 4),
|
65 | value: value
|
66 | };
|
67 | };
|
68 |
|
69 | var toString = {}.toString;
|
70 |
|
71 | var classofRaw = function (it) {
|
72 | return toString.call(it).slice(8, -1);
|
73 | };
|
74 |
|
75 | var split = ''.split;
|
76 |
|
77 |
|
78 | var indexedObject = fails(function () {
|
79 |
|
80 |
|
81 | return !Object('z').propertyIsEnumerable(0);
|
82 | }) ? function (it) {
|
83 | return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
|
84 | } : Object;
|
85 |
|
86 |
|
87 |
|
88 | var requireObjectCoercible = function (it) {
|
89 | if (it == undefined) throw TypeError("Can't call method on " + it);
|
90 | return it;
|
91 | };
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 | var toIndexedObject = function (it) {
|
98 | return indexedObject(requireObjectCoercible(it));
|
99 | };
|
100 |
|
101 | var isObject = function (it) {
|
102 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
103 | };
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | var toPrimitive = function (input, PREFERRED_STRING) {
|
110 | if (!isObject(input)) return input;
|
111 | var fn, val;
|
112 | if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
113 | if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
114 | if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
115 | throw TypeError("Can't convert object to primitive value");
|
116 | };
|
117 |
|
118 | var hasOwnProperty = {}.hasOwnProperty;
|
119 |
|
120 | var has = function (it, key) {
|
121 | return hasOwnProperty.call(it, key);
|
122 | };
|
123 |
|
124 | var document = global_1.document;
|
125 |
|
126 | var EXISTS = isObject(document) && isObject(document.createElement);
|
127 |
|
128 | var documentCreateElement = function (it) {
|
129 | return EXISTS ? document.createElement(it) : {};
|
130 | };
|
131 |
|
132 |
|
133 | var ie8DomDefine = !descriptors && !fails(function () {
|
134 | return Object.defineProperty(documentCreateElement('div'), 'a', {
|
135 | get: function () { return 7; }
|
136 | }).a != 7;
|
137 | });
|
138 |
|
139 | var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
140 |
|
141 |
|
142 |
|
143 | var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
144 | O = toIndexedObject(O);
|
145 | P = toPrimitive(P, true);
|
146 | if (ie8DomDefine) try {
|
147 | return nativeGetOwnPropertyDescriptor(O, P);
|
148 | } catch (error) { }
|
149 | if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
|
150 | };
|
151 |
|
152 | var objectGetOwnPropertyDescriptor = {
|
153 | f: f$1
|
154 | };
|
155 |
|
156 | var anObject = function (it) {
|
157 | if (!isObject(it)) {
|
158 | throw TypeError(String(it) + ' is not an object');
|
159 | } return it;
|
160 | };
|
161 |
|
162 | var nativeDefineProperty = Object.defineProperty;
|
163 |
|
164 |
|
165 |
|
166 | var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
167 | anObject(O);
|
168 | P = toPrimitive(P, true);
|
169 | anObject(Attributes);
|
170 | if (ie8DomDefine) try {
|
171 | return nativeDefineProperty(O, P, Attributes);
|
172 | } catch (error) { }
|
173 | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
174 | if ('value' in Attributes) O[P] = Attributes.value;
|
175 | return O;
|
176 | };
|
177 |
|
178 | var objectDefineProperty = {
|
179 | f: f$2
|
180 | };
|
181 |
|
182 | var hide = descriptors ? function (object, key, value) {
|
183 | return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
184 | } : function (object, key, value) {
|
185 | object[key] = value;
|
186 | return object;
|
187 | };
|
188 |
|
189 | var setGlobal = function (key, value) {
|
190 | try {
|
191 | hide(global_1, key, value);
|
192 | } catch (error) {
|
193 | global_1[key] = value;
|
194 | } return value;
|
195 | };
|
196 |
|
197 | var shared = createCommonjsModule(function (module) {
|
198 | var SHARED = '__core-js_shared__';
|
199 | var store = global_1[SHARED] || setGlobal(SHARED, {});
|
200 |
|
201 | (module.exports = function (key, value) {
|
202 | return store[key] || (store[key] = value !== undefined ? value : {});
|
203 | })('versions', []).push({
|
204 | version: '3.1.3',
|
205 | mode: 'global',
|
206 | copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
207 | });
|
208 | });
|
209 |
|
210 | var functionToString = shared('native-function-to-string', Function.toString);
|
211 |
|
212 | var WeakMap = global_1.WeakMap;
|
213 |
|
214 | var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
|
215 |
|
216 | var id = 0;
|
217 | var postfix = Math.random();
|
218 |
|
219 | var uid = function (key) {
|
220 | return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
221 | };
|
222 |
|
223 | var keys = shared('keys');
|
224 |
|
225 | var sharedKey = function (key) {
|
226 | return keys[key] || (keys[key] = uid(key));
|
227 | };
|
228 |
|
229 | var hiddenKeys = {};
|
230 |
|
231 | var WeakMap$1 = global_1.WeakMap;
|
232 | var set, get, has$1;
|
233 |
|
234 | var enforce = function (it) {
|
235 | return has$1(it) ? get(it) : set(it, {});
|
236 | };
|
237 |
|
238 | var getterFor = function (TYPE) {
|
239 | return function (it) {
|
240 | var state;
|
241 | if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
242 | throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
243 | } return state;
|
244 | };
|
245 | };
|
246 |
|
247 | if (nativeWeakMap) {
|
248 | var store = new WeakMap$1();
|
249 | var wmget = store.get;
|
250 | var wmhas = store.has;
|
251 | var wmset = store.set;
|
252 | set = function (it, metadata) {
|
253 | wmset.call(store, it, metadata);
|
254 | return metadata;
|
255 | };
|
256 | get = function (it) {
|
257 | return wmget.call(store, it) || {};
|
258 | };
|
259 | has$1 = function (it) {
|
260 | return wmhas.call(store, it);
|
261 | };
|
262 | } else {
|
263 | var STATE = sharedKey('state');
|
264 | hiddenKeys[STATE] = true;
|
265 | set = function (it, metadata) {
|
266 | hide(it, STATE, metadata);
|
267 | return metadata;
|
268 | };
|
269 | get = function (it) {
|
270 | return has(it, STATE) ? it[STATE] : {};
|
271 | };
|
272 | has$1 = function (it) {
|
273 | return has(it, STATE);
|
274 | };
|
275 | }
|
276 |
|
277 | var internalState = {
|
278 | set: set,
|
279 | get: get,
|
280 | has: has$1,
|
281 | enforce: enforce,
|
282 | getterFor: getterFor
|
283 | };
|
284 |
|
285 | var redefine = createCommonjsModule(function (module) {
|
286 | var getInternalState = internalState.get;
|
287 | var enforceInternalState = internalState.enforce;
|
288 | var TEMPLATE = String(functionToString).split('toString');
|
289 |
|
290 | shared('inspectSource', function (it) {
|
291 | return functionToString.call(it);
|
292 | });
|
293 |
|
294 | (module.exports = function (O, key, value, options) {
|
295 | var unsafe = options ? !!options.unsafe : false;
|
296 | var simple = options ? !!options.enumerable : false;
|
297 | var noTargetGet = options ? !!options.noTargetGet : false;
|
298 | if (typeof value == 'function') {
|
299 | if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
|
300 | enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
301 | }
|
302 | if (O === global_1) {
|
303 | if (simple) O[key] = value;
|
304 | else setGlobal(key, value);
|
305 | return;
|
306 | } else if (!unsafe) {
|
307 | delete O[key];
|
308 | } else if (!noTargetGet && O[key]) {
|
309 | simple = true;
|
310 | }
|
311 | if (simple) O[key] = value;
|
312 | else hide(O, key, value);
|
313 |
|
314 | })(Function.prototype, 'toString', function toString() {
|
315 | return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
|
316 | });
|
317 | });
|
318 |
|
319 | var path = global_1;
|
320 |
|
321 | var aFunction = function (variable) {
|
322 | return typeof variable == 'function' ? variable : undefined;
|
323 | };
|
324 |
|
325 | var getBuiltIn = function (namespace, method) {
|
326 | return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
|
327 | : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
|
328 | };
|
329 |
|
330 | var ceil = Math.ceil;
|
331 | var floor = Math.floor;
|
332 |
|
333 |
|
334 |
|
335 | var toInteger = function (argument) {
|
336 | return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
337 | };
|
338 |
|
339 | var min = Math.min;
|
340 |
|
341 |
|
342 |
|
343 | var toLength = function (argument) {
|
344 | return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0;
|
345 | };
|
346 |
|
347 | var max = Math.max;
|
348 | var min$1 = Math.min;
|
349 |
|
350 |
|
351 |
|
352 |
|
353 | var toAbsoluteIndex = function (index, length) {
|
354 | var integer = toInteger(index);
|
355 | return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
356 | };
|
357 |
|
358 |
|
359 | var createMethod = function (IS_INCLUDES) {
|
360 | return function ($this, el, fromIndex) {
|
361 | var O = toIndexedObject($this);
|
362 | var length = toLength(O.length);
|
363 | var index = toAbsoluteIndex(fromIndex, length);
|
364 | var value;
|
365 |
|
366 |
|
367 | if (IS_INCLUDES && el != el) while (length > index) {
|
368 | value = O[index++];
|
369 |
|
370 | if (value != value) return true;
|
371 |
|
372 | } else for (;length > index; index++) {
|
373 | if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
374 | } return !IS_INCLUDES && -1;
|
375 | };
|
376 | };
|
377 |
|
378 | var arrayIncludes = {
|
379 |
|
380 |
|
381 | includes: createMethod(true),
|
382 |
|
383 |
|
384 | indexOf: createMethod(false)
|
385 | };
|
386 |
|
387 | var indexOf = arrayIncludes.indexOf;
|
388 |
|
389 |
|
390 | var objectKeysInternal = function (object, names) {
|
391 | var O = toIndexedObject(object);
|
392 | var i = 0;
|
393 | var result = [];
|
394 | var key;
|
395 | for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
|
396 |
|
397 | while (names.length > i) if (has(O, key = names[i++])) {
|
398 | ~indexOf(result, key) || result.push(key);
|
399 | }
|
400 | return result;
|
401 | };
|
402 |
|
403 |
|
404 | var enumBugKeys = [
|
405 | 'constructor',
|
406 | 'hasOwnProperty',
|
407 | 'isPrototypeOf',
|
408 | 'propertyIsEnumerable',
|
409 | 'toLocaleString',
|
410 | 'toString',
|
411 | 'valueOf'
|
412 | ];
|
413 |
|
414 | var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
415 |
|
416 |
|
417 |
|
418 | var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
419 | return objectKeysInternal(O, hiddenKeys$1);
|
420 | };
|
421 |
|
422 | var objectGetOwnPropertyNames = {
|
423 | f: f$3
|
424 | };
|
425 |
|
426 | var f$4 = Object.getOwnPropertySymbols;
|
427 |
|
428 | var objectGetOwnPropertySymbols = {
|
429 | f: f$4
|
430 | };
|
431 |
|
432 |
|
433 | var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
434 | var keys = objectGetOwnPropertyNames.f(anObject(it));
|
435 | var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
436 | return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
|
437 | };
|
438 |
|
439 | var copyConstructorProperties = function (target, source) {
|
440 | var keys = ownKeys(source);
|
441 | var defineProperty = objectDefineProperty.f;
|
442 | var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
443 | for (var i = 0; i < keys.length; i++) {
|
444 | var key = keys[i];
|
445 | if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
446 | }
|
447 | };
|
448 |
|
449 | var replacement = /#|\.prototype\./;
|
450 |
|
451 | var isForced = function (feature, detection) {
|
452 | var value = data[normalize(feature)];
|
453 | return value == POLYFILL ? true
|
454 | : value == NATIVE ? false
|
455 | : typeof detection == 'function' ? fails(detection)
|
456 | : !!detection;
|
457 | };
|
458 |
|
459 | var normalize = isForced.normalize = function (string) {
|
460 | return String(string).replace(replacement, '.').toLowerCase();
|
461 | };
|
462 |
|
463 | var data = isForced.data = {};
|
464 | var NATIVE = isForced.NATIVE = 'N';
|
465 | var POLYFILL = isForced.POLYFILL = 'P';
|
466 |
|
467 | var isForced_1 = isForced;
|
468 |
|
469 | var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 | |
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 | var _export = function (options, source) {
|
491 | var TARGET = options.target;
|
492 | var GLOBAL = options.global;
|
493 | var STATIC = options.stat;
|
494 | var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
495 | if (GLOBAL) {
|
496 | target = global_1;
|
497 | } else if (STATIC) {
|
498 | target = global_1[TARGET] || setGlobal(TARGET, {});
|
499 | } else {
|
500 | target = (global_1[TARGET] || {}).prototype;
|
501 | }
|
502 | if (target) for (key in source) {
|
503 | sourceProperty = source[key];
|
504 | if (options.noTargetGet) {
|
505 | descriptor = getOwnPropertyDescriptor$1(target, key);
|
506 | targetProperty = descriptor && descriptor.value;
|
507 | } else targetProperty = target[key];
|
508 | FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
509 |
|
510 | if (!FORCED && targetProperty !== undefined) {
|
511 | if (typeof sourceProperty === typeof targetProperty) continue;
|
512 | copyConstructorProperties(sourceProperty, targetProperty);
|
513 | }
|
514 |
|
515 | if (options.sham || (targetProperty && targetProperty.sham)) {
|
516 | hide(sourceProperty, 'sham', true);
|
517 | }
|
518 |
|
519 | redefine(target, key, sourceProperty, options);
|
520 | }
|
521 | };
|
522 |
|
523 |
|
524 |
|
525 | var isArray = Array.isArray || function isArray(arg) {
|
526 | return classofRaw(arg) == 'Array';
|
527 | };
|
528 |
|
529 |
|
530 |
|
531 | var toObject = function (argument) {
|
532 | return Object(requireObjectCoercible(argument));
|
533 | };
|
534 |
|
535 | var createProperty = function (object, key, value) {
|
536 | var propertyKey = toPrimitive(key);
|
537 | if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
538 | else object[propertyKey] = value;
|
539 | };
|
540 |
|
541 | var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
542 |
|
543 |
|
544 | return !String(Symbol());
|
545 | });
|
546 |
|
547 | var Symbol$1 = global_1.Symbol;
|
548 | var store$1 = shared('wks');
|
549 |
|
550 | var wellKnownSymbol = function (name) {
|
551 | return store$1[name] || (store$1[name] = nativeSymbol && Symbol$1[name]
|
552 | || (nativeSymbol ? Symbol$1 : uid)('Symbol.' + name));
|
553 | };
|
554 |
|
555 | var SPECIES = wellKnownSymbol('species');
|
556 |
|
557 |
|
558 |
|
559 | var arraySpeciesCreate = function (originalArray, length) {
|
560 | var C;
|
561 | if (isArray(originalArray)) {
|
562 | C = originalArray.constructor;
|
563 |
|
564 | if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
565 | else if (isObject(C)) {
|
566 | C = C[SPECIES];
|
567 | if (C === null) C = undefined;
|
568 | }
|
569 | } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
570 | };
|
571 |
|
572 | var SPECIES$1 = wellKnownSymbol('species');
|
573 |
|
574 | var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
575 | return !fails(function () {
|
576 | var array = [];
|
577 | var constructor = array.constructor = {};
|
578 | constructor[SPECIES$1] = function () {
|
579 | return { foo: 1 };
|
580 | };
|
581 | return array[METHOD_NAME](Boolean).foo !== 1;
|
582 | });
|
583 | };
|
584 |
|
585 | var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
586 | var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
587 | var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
588 |
|
589 | var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
|
590 | var array = [];
|
591 | array[IS_CONCAT_SPREADABLE] = false;
|
592 | return array.concat()[0] !== array;
|
593 | });
|
594 |
|
595 | var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
|
596 |
|
597 | var isConcatSpreadable = function (O) {
|
598 | if (!isObject(O)) return false;
|
599 | var spreadable = O[IS_CONCAT_SPREADABLE];
|
600 | return spreadable !== undefined ? !!spreadable : isArray(O);
|
601 | };
|
602 |
|
603 | var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
604 |
|
605 |
|
606 |
|
607 |
|
608 | _export({ target: 'Array', proto: true, forced: FORCED }, {
|
609 | concat: function concat(arg) {
|
610 | var O = toObject(this);
|
611 | var A = arraySpeciesCreate(O, 0);
|
612 | var n = 0;
|
613 | var i, k, length, len, E;
|
614 | for (i = -1, length = arguments.length; i < length; i++) {
|
615 | E = i === -1 ? O : arguments[i];
|
616 | if (isConcatSpreadable(E)) {
|
617 | len = toLength(E.length);
|
618 | if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
619 | for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
620 | } else {
|
621 | if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
622 | createProperty(A, n++, E);
|
623 | }
|
624 | }
|
625 | A.length = n;
|
626 | return A;
|
627 | }
|
628 | });
|
629 |
|
630 |
|
631 |
|
632 | var objectKeys = Object.keys || function keys(O) {
|
633 | return objectKeysInternal(O, enumBugKeys);
|
634 | };
|
635 |
|
636 | var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
637 |
|
638 |
|
639 | var createMethod$1 = function (TO_ENTRIES) {
|
640 | return function (it) {
|
641 | var O = toIndexedObject(it);
|
642 | var keys = objectKeys(O);
|
643 | var length = keys.length;
|
644 | var i = 0;
|
645 | var result = [];
|
646 | var key;
|
647 | while (length > i) {
|
648 | key = keys[i++];
|
649 | if (!descriptors || propertyIsEnumerable.call(O, key)) {
|
650 | result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
651 | }
|
652 | }
|
653 | return result;
|
654 | };
|
655 | };
|
656 |
|
657 | var objectToArray = {
|
658 |
|
659 |
|
660 | entries: createMethod$1(true),
|
661 |
|
662 |
|
663 | values: createMethod$1(false)
|
664 | };
|
665 |
|
666 | var $entries = objectToArray.entries;
|
667 |
|
668 |
|
669 |
|
670 | _export({ target: 'Object', stat: true }, {
|
671 | entries: function entries(O) {
|
672 | return $entries(O);
|
673 | }
|
674 | });
|
675 |
|
676 | var aPossiblePrototype = function (it) {
|
677 | if (!isObject(it) && it !== null) {
|
678 | throw TypeError("Can't set " + String(it) + ' as a prototype');
|
679 | } return it;
|
680 | };
|
681 |
|
682 |
|
683 |
|
684 |
|
685 |
|
686 | var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
687 | var CORRECT_SETTER = false;
|
688 | var test = {};
|
689 | var setter;
|
690 | try {
|
691 | setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
692 | setter.call(test, []);
|
693 | CORRECT_SETTER = test instanceof Array;
|
694 | } catch (error) { }
|
695 | return function setPrototypeOf(O, proto) {
|
696 | anObject(O);
|
697 | aPossiblePrototype(proto);
|
698 | if (CORRECT_SETTER) setter.call(O, proto);
|
699 | else O.__proto__ = proto;
|
700 | return O;
|
701 | };
|
702 | }() : undefined);
|
703 |
|
704 |
|
705 | var inheritIfRequired = function ($this, dummy, Wrapper) {
|
706 | var NewTarget, NewTargetPrototype;
|
707 | if (
|
708 |
|
709 | objectSetPrototypeOf &&
|
710 |
|
711 | typeof (NewTarget = dummy.constructor) == 'function' &&
|
712 | NewTarget !== Wrapper &&
|
713 | isObject(NewTargetPrototype = NewTarget.prototype) &&
|
714 | NewTargetPrototype !== Wrapper.prototype
|
715 | ) objectSetPrototypeOf($this, NewTargetPrototype);
|
716 | return $this;
|
717 | };
|
718 |
|
719 | var MATCH = wellKnownSymbol('match');
|
720 |
|
721 |
|
722 |
|
723 | var isRegexp = function (it) {
|
724 | var isRegExp;
|
725 | return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
726 | };
|
727 |
|
728 |
|
729 |
|
730 | var regexpFlags = function () {
|
731 | var that = anObject(this);
|
732 | var result = '';
|
733 | if (that.global) result += 'g';
|
734 | if (that.ignoreCase) result += 'i';
|
735 | if (that.multiline) result += 'm';
|
736 | if (that.dotAll) result += 's';
|
737 | if (that.unicode) result += 'u';
|
738 | if (that.sticky) result += 'y';
|
739 | return result;
|
740 | };
|
741 |
|
742 | var SPECIES$2 = wellKnownSymbol('species');
|
743 |
|
744 | var setSpecies = function (CONSTRUCTOR_NAME) {
|
745 | var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
|
746 | var defineProperty = objectDefineProperty.f;
|
747 |
|
748 | if (descriptors && Constructor && !Constructor[SPECIES$2]) {
|
749 | defineProperty(Constructor, SPECIES$2, {
|
750 | configurable: true,
|
751 | get: function () { return this; }
|
752 | });
|
753 | }
|
754 | };
|
755 |
|
756 | var defineProperty = objectDefineProperty.f;
|
757 | var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 | var MATCH$1 = wellKnownSymbol('match');
|
766 | var NativeRegExp = global_1.RegExp;
|
767 | var RegExpPrototype = NativeRegExp.prototype;
|
768 | var re1 = /a/g;
|
769 | var re2 = /a/g;
|
770 |
|
771 |
|
772 | var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
773 |
|
774 | var FORCED$1 = descriptors && isForced_1('RegExp', (!CORRECT_NEW || fails(function () {
|
775 | re2[MATCH$1] = false;
|
776 |
|
777 | return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
778 | })));
|
779 |
|
780 |
|
781 |
|
782 | if (FORCED$1) {
|
783 | var RegExpWrapper = function RegExp(pattern, flags) {
|
784 | var thisIsRegExp = this instanceof RegExpWrapper;
|
785 | var patternIsRegExp = isRegexp(pattern);
|
786 | var flagsAreUndefined = flags === undefined;
|
787 | return !thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined ? pattern
|
788 | : inheritIfRequired(CORRECT_NEW
|
789 | ? new NativeRegExp(patternIsRegExp && !flagsAreUndefined ? pattern.source : pattern, flags)
|
790 | : NativeRegExp((patternIsRegExp = pattern instanceof RegExpWrapper)
|
791 | ? pattern.source
|
792 | : pattern, patternIsRegExp && flagsAreUndefined ? regexpFlags.call(pattern) : flags)
|
793 | , thisIsRegExp ? this : RegExpPrototype, RegExpWrapper);
|
794 | };
|
795 | var proxy = function (key) {
|
796 | key in RegExpWrapper || defineProperty(RegExpWrapper, key, {
|
797 | configurable: true,
|
798 | get: function () { return NativeRegExp[key]; },
|
799 | set: function (it) { NativeRegExp[key] = it; }
|
800 | });
|
801 | };
|
802 | var keys$1 = getOwnPropertyNames(NativeRegExp);
|
803 | var index = 0;
|
804 | while (keys$1.length > index) proxy(keys$1[index++]);
|
805 | RegExpPrototype.constructor = RegExpWrapper;
|
806 | RegExpWrapper.prototype = RegExpPrototype;
|
807 | redefine(global_1, 'RegExp', RegExpWrapper);
|
808 | }
|
809 |
|
810 |
|
811 | setSpecies('RegExp');
|
812 |
|
813 | var TO_STRING = 'toString';
|
814 | var RegExpPrototype$1 = RegExp.prototype;
|
815 | var nativeToString = RegExpPrototype$1[TO_STRING];
|
816 |
|
817 | var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
818 |
|
819 | var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
820 |
|
821 |
|
822 |
|
823 | if (NOT_GENERIC || INCORRECT_NAME) {
|
824 | redefine(RegExp.prototype, TO_STRING, function toString() {
|
825 | var R = anObject(this);
|
826 | var p = String(R.source);
|
827 | var rf = R.flags;
|
828 | var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype$1) ? regexpFlags.call(R) : rf);
|
829 | return '/' + p + '/' + f;
|
830 | }, { unsafe: true });
|
831 | }
|
832 |
|
833 | var nativeExec = RegExp.prototype.exec;
|
834 |
|
835 |
|
836 |
|
837 | var nativeReplace = String.prototype.replace;
|
838 |
|
839 | var patchedExec = nativeExec;
|
840 |
|
841 | var UPDATES_LAST_INDEX_WRONG = (function () {
|
842 | var re1 = /a/;
|
843 | var re2 = /b*/g;
|
844 | nativeExec.call(re1, 'a');
|
845 | nativeExec.call(re2, 'a');
|
846 | return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
847 | })();
|
848 |
|
849 |
|
850 | var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
851 |
|
852 | var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
853 |
|
854 | if (PATCH) {
|
855 | patchedExec = function exec(str) {
|
856 | var re = this;
|
857 | var lastIndex, reCopy, match, i;
|
858 |
|
859 | if (NPCG_INCLUDED) {
|
860 | reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
861 | }
|
862 | if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
863 |
|
864 | match = nativeExec.call(re, str);
|
865 |
|
866 | if (UPDATES_LAST_INDEX_WRONG && match) {
|
867 | re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
868 | }
|
869 | if (NPCG_INCLUDED && match && match.length > 1) {
|
870 |
|
871 |
|
872 | nativeReplace.call(match[0], reCopy, function () {
|
873 | for (i = 1; i < arguments.length - 2; i++) {
|
874 | if (arguments[i] === undefined) match[i] = undefined;
|
875 | }
|
876 | });
|
877 | }
|
878 |
|
879 | return match;
|
880 | };
|
881 | }
|
882 |
|
883 | var regexpExec = patchedExec;
|
884 |
|
885 | var SPECIES$3 = wellKnownSymbol('species');
|
886 |
|
887 | var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
888 |
|
889 |
|
890 |
|
891 | var re = /./;
|
892 | re.exec = function () {
|
893 | var result = [];
|
894 | result.groups = { a: '7' };
|
895 | return result;
|
896 | };
|
897 | return ''.replace(re, '$<a>') !== '7';
|
898 | });
|
899 |
|
900 |
|
901 |
|
902 | var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
903 | var re = /(?:)/;
|
904 | var originalExec = re.exec;
|
905 | re.exec = function () { return originalExec.apply(this, arguments); };
|
906 | var result = 'ab'.split(re);
|
907 | return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
908 | });
|
909 |
|
910 | var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
|
911 | var SYMBOL = wellKnownSymbol(KEY);
|
912 |
|
913 | var DELEGATES_TO_SYMBOL = !fails(function () {
|
914 |
|
915 | var O = {};
|
916 | O[SYMBOL] = function () { return 7; };
|
917 | return ''[KEY](O) != 7;
|
918 | });
|
919 |
|
920 | var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
921 |
|
922 | var execCalled = false;
|
923 | var re = /a/;
|
924 | re.exec = function () { execCalled = true; return null; };
|
925 |
|
926 | if (KEY === 'split') {
|
927 |
|
928 |
|
929 | re.constructor = {};
|
930 | re.constructor[SPECIES$3] = function () { return re; };
|
931 | }
|
932 |
|
933 | re[SYMBOL]('');
|
934 | return !execCalled;
|
935 | });
|
936 |
|
937 | if (
|
938 | !DELEGATES_TO_SYMBOL ||
|
939 | !DELEGATES_TO_EXEC ||
|
940 | (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
941 | (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
942 | ) {
|
943 | var nativeRegExpMethod = /./[SYMBOL];
|
944 | var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
945 | if (regexp.exec === regexpExec) {
|
946 | if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
947 |
|
948 |
|
949 |
|
950 | return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
951 | }
|
952 | return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
953 | }
|
954 | return { done: false };
|
955 | });
|
956 | var stringMethod = methods[0];
|
957 | var regexMethod = methods[1];
|
958 |
|
959 | redefine(String.prototype, KEY, stringMethod);
|
960 | redefine(RegExp.prototype, SYMBOL, length == 2
|
961 |
|
962 |
|
963 | ? function (string, arg) { return regexMethod.call(string, this, arg); }
|
964 |
|
965 |
|
966 | : function (string) { return regexMethod.call(string, this); }
|
967 | );
|
968 | if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
|
969 | }
|
970 | };
|
971 |
|
972 |
|
973 | var createMethod$2 = function (CONVERT_TO_STRING) {
|
974 | return function ($this, pos) {
|
975 | var S = String(requireObjectCoercible($this));
|
976 | var position = toInteger(pos);
|
977 | var size = S.length;
|
978 | var first, second;
|
979 | if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
980 | first = S.charCodeAt(position);
|
981 | return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
982 | || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
|
983 | ? CONVERT_TO_STRING ? S.charAt(position) : first
|
984 | : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
985 | };
|
986 | };
|
987 |
|
988 | var stringMultibyte = {
|
989 |
|
990 |
|
991 | codeAt: createMethod$2(false),
|
992 |
|
993 |
|
994 | charAt: createMethod$2(true)
|
995 | };
|
996 |
|
997 | var charAt = stringMultibyte.charAt;
|
998 |
|
999 |
|
1000 |
|
1001 | var advanceStringIndex = function (S, index, unicode) {
|
1002 | return index + (unicode ? charAt(S, index).length : 1);
|
1003 | };
|
1004 |
|
1005 |
|
1006 |
|
1007 | var regexpExecAbstract = function (R, S) {
|
1008 | var exec = R.exec;
|
1009 | if (typeof exec === 'function') {
|
1010 | var result = exec.call(R, S);
|
1011 | if (typeof result !== 'object') {
|
1012 | throw TypeError('RegExp exec method returned something other than an Object or null');
|
1013 | }
|
1014 | return result;
|
1015 | }
|
1016 |
|
1017 | if (classofRaw(R) !== 'RegExp') {
|
1018 | throw TypeError('RegExp#exec called on incompatible receiver');
|
1019 | }
|
1020 |
|
1021 | return regexpExec.call(R, S);
|
1022 | };
|
1023 |
|
1024 |
|
1025 | fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
1026 | return [
|
1027 |
|
1028 |
|
1029 | function match(regexp) {
|
1030 | var O = requireObjectCoercible(this);
|
1031 | var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
1032 | return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
1033 | },
|
1034 |
|
1035 |
|
1036 | function (regexp) {
|
1037 | var res = maybeCallNative(nativeMatch, regexp, this);
|
1038 | if (res.done) return res.value;
|
1039 |
|
1040 | var rx = anObject(regexp);
|
1041 | var S = String(this);
|
1042 |
|
1043 | if (!rx.global) return regexpExecAbstract(rx, S);
|
1044 |
|
1045 | var fullUnicode = rx.unicode;
|
1046 | rx.lastIndex = 0;
|
1047 | var A = [];
|
1048 | var n = 0;
|
1049 | var result;
|
1050 | while ((result = regexpExecAbstract(rx, S)) !== null) {
|
1051 | var matchStr = String(result[0]);
|
1052 | A[n] = matchStr;
|
1053 | if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1054 | n++;
|
1055 | }
|
1056 | return n === 0 ? null : A;
|
1057 | }
|
1058 | ];
|
1059 | });
|
1060 |
|
1061 | var max$1 = Math.max;
|
1062 | var min$2 = Math.min;
|
1063 | var floor$1 = Math.floor;
|
1064 | var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
1065 | var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
1066 |
|
1067 | var maybeToString = function (it) {
|
1068 | return it === undefined ? it : String(it);
|
1069 | };
|
1070 |
|
1071 |
|
1072 | fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative) {
|
1073 | return [
|
1074 |
|
1075 |
|
1076 | function replace(searchValue, replaceValue) {
|
1077 | var O = requireObjectCoercible(this);
|
1078 | var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
1079 | return replacer !== undefined
|
1080 | ? replacer.call(searchValue, O, replaceValue)
|
1081 | : nativeReplace.call(String(O), searchValue, replaceValue);
|
1082 | },
|
1083 |
|
1084 |
|
1085 | function (regexp, replaceValue) {
|
1086 | var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
|
1087 | if (res.done) return res.value;
|
1088 |
|
1089 | var rx = anObject(regexp);
|
1090 | var S = String(this);
|
1091 |
|
1092 | var functionalReplace = typeof replaceValue === 'function';
|
1093 | if (!functionalReplace) replaceValue = String(replaceValue);
|
1094 |
|
1095 | var global = rx.global;
|
1096 | if (global) {
|
1097 | var fullUnicode = rx.unicode;
|
1098 | rx.lastIndex = 0;
|
1099 | }
|
1100 | var results = [];
|
1101 | while (true) {
|
1102 | var result = regexpExecAbstract(rx, S);
|
1103 | if (result === null) break;
|
1104 |
|
1105 | results.push(result);
|
1106 | if (!global) break;
|
1107 |
|
1108 | var matchStr = String(result[0]);
|
1109 | if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
1110 | }
|
1111 |
|
1112 | var accumulatedResult = '';
|
1113 | var nextSourcePosition = 0;
|
1114 | for (var i = 0; i < results.length; i++) {
|
1115 | result = results[i];
|
1116 |
|
1117 | var matched = String(result[0]);
|
1118 | var position = max$1(min$2(toInteger(result.index), S.length), 0);
|
1119 | var captures = [];
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 | for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
1126 | var namedCaptures = result.groups;
|
1127 | if (functionalReplace) {
|
1128 | var replacerArgs = [matched].concat(captures, position, S);
|
1129 | if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
1130 | var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
1131 | } else {
|
1132 | replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
1133 | }
|
1134 | if (position >= nextSourcePosition) {
|
1135 | accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
1136 | nextSourcePosition = position + matched.length;
|
1137 | }
|
1138 | }
|
1139 | return accumulatedResult + S.slice(nextSourcePosition);
|
1140 | }
|
1141 | ];
|
1142 |
|
1143 |
|
1144 | function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
1145 | var tailPos = position + matched.length;
|
1146 | var m = captures.length;
|
1147 | var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
1148 | if (namedCaptures !== undefined) {
|
1149 | namedCaptures = toObject(namedCaptures);
|
1150 | symbols = SUBSTITUTION_SYMBOLS;
|
1151 | }
|
1152 | return nativeReplace.call(replacement, symbols, function (match, ch) {
|
1153 | var capture;
|
1154 | switch (ch.charAt(0)) {
|
1155 | case '$': return '$';
|
1156 | case '&': return matched;
|
1157 | case '`': return str.slice(0, position);
|
1158 | case "'": return str.slice(tailPos);
|
1159 | case '<':
|
1160 | capture = namedCaptures[ch.slice(1, -1)];
|
1161 | break;
|
1162 | default:
|
1163 | var n = +ch;
|
1164 | if (n === 0) return match;
|
1165 | if (n > m) {
|
1166 | var f = floor$1(n / 10);
|
1167 | if (f === 0) return match;
|
1168 | if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
1169 | return match;
|
1170 | }
|
1171 | capture = captures[n - 1];
|
1172 | }
|
1173 | return capture === undefined ? '' : capture;
|
1174 | });
|
1175 | }
|
1176 | });
|
1177 |
|
1178 |
|
1179 |
|
1180 | var sameValue = Object.is || function is(x, y) {
|
1181 |
|
1182 | return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
1183 | };
|
1184 |
|
1185 |
|
1186 | fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
1187 | return [
|
1188 |
|
1189 |
|
1190 | function search(regexp) {
|
1191 | var O = requireObjectCoercible(this);
|
1192 | var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
1193 | return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
1194 | },
|
1195 |
|
1196 |
|
1197 | function (regexp) {
|
1198 | var res = maybeCallNative(nativeSearch, regexp, this);
|
1199 | if (res.done) return res.value;
|
1200 |
|
1201 | var rx = anObject(regexp);
|
1202 | var S = String(this);
|
1203 |
|
1204 | var previousLastIndex = rx.lastIndex;
|
1205 | if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
1206 | var result = regexpExecAbstract(rx, S);
|
1207 | if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
1208 | return result === null ? -1 : result.index;
|
1209 | }
|
1210 | ];
|
1211 | });
|
1212 |
|
1213 | function _classCallCheck(instance, Constructor) {
|
1214 | if (!(instance instanceof Constructor)) {
|
1215 | throw new TypeError("Cannot call a class as a function");
|
1216 | }
|
1217 | }
|
1218 |
|
1219 | function _defineProperties(target, props) {
|
1220 | for (var i = 0; i < props.length; i++) {
|
1221 | var descriptor = props[i];
|
1222 | descriptor.enumerable = descriptor.enumerable || false;
|
1223 | descriptor.configurable = true;
|
1224 | if ("value" in descriptor) descriptor.writable = true;
|
1225 | Object.defineProperty(target, descriptor.key, descriptor);
|
1226 | }
|
1227 | }
|
1228 |
|
1229 | function _createClass(Constructor, protoProps, staticProps) {
|
1230 | if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
1231 | if (staticProps) _defineProperties(Constructor, staticProps);
|
1232 | return Constructor;
|
1233 | }
|
1234 |
|
1235 | function _inherits(subClass, superClass) {
|
1236 | if (typeof superClass !== "function" && superClass !== null) {
|
1237 | throw new TypeError("Super expression must either be null or a function");
|
1238 | }
|
1239 |
|
1240 | subClass.prototype = Object.create(superClass && superClass.prototype, {
|
1241 | constructor: {
|
1242 | value: subClass,
|
1243 | writable: true,
|
1244 | configurable: true
|
1245 | }
|
1246 | });
|
1247 | if (superClass) _setPrototypeOf(subClass, superClass);
|
1248 | }
|
1249 |
|
1250 | function _getPrototypeOf(o) {
|
1251 | _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
1252 | return o.__proto__ || Object.getPrototypeOf(o);
|
1253 | };
|
1254 | return _getPrototypeOf(o);
|
1255 | }
|
1256 |
|
1257 | function _setPrototypeOf(o, p) {
|
1258 | _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
1259 | o.__proto__ = p;
|
1260 | return o;
|
1261 | };
|
1262 |
|
1263 | return _setPrototypeOf(o, p);
|
1264 | }
|
1265 |
|
1266 | function _assertThisInitialized(self) {
|
1267 | if (self === void 0) {
|
1268 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
1269 | }
|
1270 |
|
1271 | return self;
|
1272 | }
|
1273 |
|
1274 | function _possibleConstructorReturn(self, call) {
|
1275 | if (call && (typeof call === "object" || typeof call === "function")) {
|
1276 | return call;
|
1277 | }
|
1278 |
|
1279 | return _assertThisInitialized(self);
|
1280 | }
|
1281 |
|
1282 | function _superPropBase(object, property) {
|
1283 | while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
1284 | object = _getPrototypeOf(object);
|
1285 | if (object === null) break;
|
1286 | }
|
1287 |
|
1288 | return object;
|
1289 | }
|
1290 |
|
1291 | function _get(target, property, receiver) {
|
1292 | if (typeof Reflect !== "undefined" && Reflect.get) {
|
1293 | _get = Reflect.get;
|
1294 | } else {
|
1295 | _get = function _get(target, property, receiver) {
|
1296 | var base = _superPropBase(target, property);
|
1297 |
|
1298 | if (!base) return;
|
1299 | var desc = Object.getOwnPropertyDescriptor(base, property);
|
1300 |
|
1301 | if (desc.get) {
|
1302 | return desc.get.call(receiver);
|
1303 | }
|
1304 |
|
1305 | return desc.value;
|
1306 | };
|
1307 | }
|
1308 |
|
1309 | return _get(target, property, receiver || target);
|
1310 | }
|
1311 |
|
1312 | function _slicedToArray(arr, i) {
|
1313 | return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
1314 | }
|
1315 |
|
1316 | function _arrayWithHoles(arr) {
|
1317 | if (Array.isArray(arr)) return arr;
|
1318 | }
|
1319 |
|
1320 | function _iterableToArrayLimit(arr, i) {
|
1321 | var _arr = [];
|
1322 | var _n = true;
|
1323 | var _d = false;
|
1324 | var _e = undefined;
|
1325 |
|
1326 | try {
|
1327 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
1328 | _arr.push(_s.value);
|
1329 |
|
1330 | if (i && _arr.length === i) break;
|
1331 | }
|
1332 | } catch (err) {
|
1333 | _d = true;
|
1334 | _e = err;
|
1335 | } finally {
|
1336 | try {
|
1337 | if (!_n && _i["return"] != null) _i["return"]();
|
1338 | } finally {
|
1339 | if (_d) throw _e;
|
1340 | }
|
1341 | }
|
1342 |
|
1343 | return _arr;
|
1344 | }
|
1345 |
|
1346 | function _nonIterableRest() {
|
1347 | throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
1348 | }
|
1349 |
|
1350 | |
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 | |
1359 |
|
1360 |
|
1361 |
|
1362 |
|
1363 |
|
1364 | function _GET(key) {
|
1365 | var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search;
|
1366 |
|
1367 | |
1368 |
|
1369 |
|
1370 |
|
1371 |
|
1372 |
|
1373 | var reg = new RegExp("(^|&)".concat(key, "=([^&]*)(&|$)"));
|
1374 | var result = url.substr(1).match(reg);
|
1375 |
|
1376 | if (result) {
|
1377 | return decodeURIComponent(result[2]);
|
1378 | }
|
1379 |
|
1380 | return null;
|
1381 | }
|
1382 | |
1383 |
|
1384 |
|
1385 |
|
1386 |
|
1387 |
|
1388 |
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 |
|
1395 | function _buildUrl(dict) {
|
1396 | var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search;
|
1397 |
|
1398 | for (var _i = 0, _Object$entries = Object.entries(dict); _i < _Object$entries.length; _i++) {
|
1399 | var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
1400 | key = _Object$entries$_i[0],
|
1401 | val = _Object$entries$_i[1];
|
1402 |
|
1403 |
|
1404 | var pattern = "".concat(key, "=([^&]*)");
|
1405 | var targetStr = "".concat(key, "=").concat(val);
|
1406 | |
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 | if (url.match(pattern)) {
|
1412 | var tmp = new RegExp("(".concat(key, "=)([^&]*)"), 'gi');
|
1413 | url = url.replace(tmp, targetStr);
|
1414 | } else {
|
1415 | var seperator = url.match('[?]') ? '&' : '?';
|
1416 | url = url + seperator + targetStr;
|
1417 | }
|
1418 | }
|
1419 |
|
1420 | if (location.hash) {
|
1421 | url += location.hash;
|
1422 | }
|
1423 |
|
1424 | return url;
|
1425 | }
|
1426 |
|
1427 | $.BootstrapTable =
|
1428 |
|
1429 | function (_$$BootstrapTable) {
|
1430 | _inherits(_class, _$$BootstrapTable);
|
1431 |
|
1432 | function _class() {
|
1433 | _classCallCheck(this, _class);
|
1434 |
|
1435 | return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
|
1436 | }
|
1437 |
|
1438 | _createClass(_class, [{
|
1439 | key: "init",
|
1440 | value: function init() {
|
1441 | var _this = this,
|
1442 | _get2;
|
1443 |
|
1444 | if (this.options.pagination && this.options.sidePagination === 'server' && this.options.addrbar) {
|
1445 |
|
1446 | this.addrbarInit = true;
|
1447 |
|
1448 | var _prefix = this.options.addrPrefix || '';
|
1449 |
|
1450 |
|
1451 | this.options.pageNumber = +_GET("".concat(_prefix, "page")) || $.BootstrapTable.DEFAULTS.pageNumber;
|
1452 | this.options.pageSize = +_GET("".concat(_prefix, "size")) || $.BootstrapTable.DEFAULTS.pageSize;
|
1453 | this.options.sortOrder = _GET("".concat(_prefix, "order")) || $.BootstrapTable.DEFAULTS.sortOrder;
|
1454 | this.options.sortName = _GET("".concat(_prefix, "sort")) || $.BootstrapTable.DEFAULTS.sortName;
|
1455 | this.options.searchText = _GET("".concat(_prefix, "search")) || $.BootstrapTable.DEFAULTS.searchText;
|
1456 | var _onLoadSuccess = this.options.onLoadSuccess;
|
1457 |
|
1458 | this.options.onLoadSuccess = function (data) {
|
1459 | if (_this.addrbarInit) {
|
1460 | _this.addrbarInit = false;
|
1461 | } else {
|
1462 | var params = {};
|
1463 | params["".concat(_prefix, "page")] = _this.options.pageNumber, params["".concat(_prefix, "size")] = _this.options.pageSize, params["".concat(_prefix, "order")] = _this.options.sortOrder, params["".concat(_prefix, "sort")] = _this.options.sortName, params["".concat(_prefix, "search")] = _this.options.searchText;
|
1464 |
|
1465 | window.history.pushState({}, '', _buildUrl(params));
|
1466 | }
|
1467 |
|
1468 | if (_onLoadSuccess) {
|
1469 | _onLoadSuccess.call(_this, data);
|
1470 | }
|
1471 | };
|
1472 | }
|
1473 |
|
1474 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1475 | args[_key] = arguments[_key];
|
1476 | }
|
1477 |
|
1478 | (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
|
1479 | }
|
1480 | }]);
|
1481 |
|
1482 | return _class;
|
1483 | }($.BootstrapTable);
|
1484 |
|
1485 | }));
|