UNPKG

54.9 kBJavaScriptView Raw
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 = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
5})(this, (function ($) { 'use strict';
6
7 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
9 var $__default = /*#__PURE__*/_interopDefaultLegacy($);
10
11 function _classCallCheck(instance, Constructor) {
12 if (!(instance instanceof Constructor)) {
13 throw new TypeError("Cannot call a class as a function");
14 }
15 }
16
17 function _defineProperties(target, props) {
18 for (var i = 0; i < props.length; i++) {
19 var descriptor = props[i];
20 descriptor.enumerable = descriptor.enumerable || false;
21 descriptor.configurable = true;
22 if ("value" in descriptor) descriptor.writable = true;
23 Object.defineProperty(target, descriptor.key, descriptor);
24 }
25 }
26
27 function _createClass(Constructor, protoProps, staticProps) {
28 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
29 if (staticProps) _defineProperties(Constructor, staticProps);
30 Object.defineProperty(Constructor, "prototype", {
31 writable: false
32 });
33 return Constructor;
34 }
35
36 function _inherits(subClass, superClass) {
37 if (typeof superClass !== "function" && superClass !== null) {
38 throw new TypeError("Super expression must either be null or a function");
39 }
40
41 subClass.prototype = Object.create(superClass && superClass.prototype, {
42 constructor: {
43 value: subClass,
44 writable: true,
45 configurable: true
46 }
47 });
48 Object.defineProperty(subClass, "prototype", {
49 writable: false
50 });
51 if (superClass) _setPrototypeOf(subClass, superClass);
52 }
53
54 function _getPrototypeOf(o) {
55 _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
56 return o.__proto__ || Object.getPrototypeOf(o);
57 };
58 return _getPrototypeOf(o);
59 }
60
61 function _setPrototypeOf(o, p) {
62 _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
63 o.__proto__ = p;
64 return o;
65 };
66
67 return _setPrototypeOf(o, p);
68 }
69
70 function _isNativeReflectConstruct() {
71 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
72 if (Reflect.construct.sham) return false;
73 if (typeof Proxy === "function") return true;
74
75 try {
76 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
77 return true;
78 } catch (e) {
79 return false;
80 }
81 }
82
83 function _assertThisInitialized(self) {
84 if (self === void 0) {
85 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
86 }
87
88 return self;
89 }
90
91 function _possibleConstructorReturn(self, call) {
92 if (call && (typeof call === "object" || typeof call === "function")) {
93 return call;
94 } else if (call !== void 0) {
95 throw new TypeError("Derived constructors may only return object or undefined");
96 }
97
98 return _assertThisInitialized(self);
99 }
100
101 function _createSuper(Derived) {
102 var hasNativeReflectConstruct = _isNativeReflectConstruct();
103
104 return function _createSuperInternal() {
105 var Super = _getPrototypeOf(Derived),
106 result;
107
108 if (hasNativeReflectConstruct) {
109 var NewTarget = _getPrototypeOf(this).constructor;
110
111 result = Reflect.construct(Super, arguments, NewTarget);
112 } else {
113 result = Super.apply(this, arguments);
114 }
115
116 return _possibleConstructorReturn(this, result);
117 };
118 }
119
120 function _superPropBase(object, property) {
121 while (!Object.prototype.hasOwnProperty.call(object, property)) {
122 object = _getPrototypeOf(object);
123 if (object === null) break;
124 }
125
126 return object;
127 }
128
129 function _get() {
130 if (typeof Reflect !== "undefined" && Reflect.get) {
131 _get = Reflect.get;
132 } else {
133 _get = function _get(target, property, receiver) {
134 var base = _superPropBase(target, property);
135
136 if (!base) return;
137 var desc = Object.getOwnPropertyDescriptor(base, property);
138
139 if (desc.get) {
140 return desc.get.call(arguments.length < 3 ? target : receiver);
141 }
142
143 return desc.value;
144 };
145 }
146
147 return _get.apply(this, arguments);
148 }
149
150 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
151
152 function createCommonjsModule(fn, module) {
153 return module = { exports: {} }, fn(module, module.exports), module.exports;
154 }
155
156 var check = function (it) {
157 return it && it.Math == Math && it;
158 };
159
160 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
161 var global_1 =
162 // eslint-disable-next-line es-x/no-global-this -- safe
163 check(typeof globalThis == 'object' && globalThis) ||
164 check(typeof window == 'object' && window) ||
165 // eslint-disable-next-line no-restricted-globals -- safe
166 check(typeof self == 'object' && self) ||
167 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
168 // eslint-disable-next-line no-new-func -- fallback
169 (function () { return this; })() || Function('return this')();
170
171 var fails = function (exec) {
172 try {
173 return !!exec();
174 } catch (error) {
175 return true;
176 }
177 };
178
179 // Detect IE8's incomplete defineProperty implementation
180 var descriptors = !fails(function () {
181 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
182 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
183 });
184
185 var functionBindNative = !fails(function () {
186 // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
187 var test = (function () { /* empty */ }).bind();
188 // eslint-disable-next-line no-prototype-builtins -- safe
189 return typeof test != 'function' || test.hasOwnProperty('prototype');
190 });
191
192 var call$1 = Function.prototype.call;
193
194 var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
195 return call$1.apply(call$1, arguments);
196 };
197
198 var $propertyIsEnumerable = {}.propertyIsEnumerable;
199 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
200 var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
201
202 // Nashorn ~ JDK8 bug
203 var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
204
205 // `Object.prototype.propertyIsEnumerable` method implementation
206 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
207 var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
208 var descriptor = getOwnPropertyDescriptor$1(this, V);
209 return !!descriptor && descriptor.enumerable;
210 } : $propertyIsEnumerable;
211
212 var objectPropertyIsEnumerable = {
213 f: f$5
214 };
215
216 var createPropertyDescriptor = function (bitmap, value) {
217 return {
218 enumerable: !(bitmap & 1),
219 configurable: !(bitmap & 2),
220 writable: !(bitmap & 4),
221 value: value
222 };
223 };
224
225 var FunctionPrototype$1 = Function.prototype;
226 var bind$1 = FunctionPrototype$1.bind;
227 var call = FunctionPrototype$1.call;
228 var uncurryThis = functionBindNative && bind$1.bind(call, call);
229
230 var functionUncurryThis = functionBindNative ? function (fn) {
231 return fn && uncurryThis(fn);
232 } : function (fn) {
233 return fn && function () {
234 return call.apply(fn, arguments);
235 };
236 };
237
238 var toString$1 = functionUncurryThis({}.toString);
239 var stringSlice = functionUncurryThis(''.slice);
240
241 var classofRaw = function (it) {
242 return stringSlice(toString$1(it), 8, -1);
243 };
244
245 var Object$4 = global_1.Object;
246 var split = functionUncurryThis(''.split);
247
248 // fallback for non-array-like ES3 and non-enumerable old V8 strings
249 var indexedObject = fails(function () {
250 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
251 // eslint-disable-next-line no-prototype-builtins -- safe
252 return !Object$4('z').propertyIsEnumerable(0);
253 }) ? function (it) {
254 return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
255 } : Object$4;
256
257 var TypeError$8 = global_1.TypeError;
258
259 // `RequireObjectCoercible` abstract operation
260 // https://tc39.es/ecma262/#sec-requireobjectcoercible
261 var requireObjectCoercible = function (it) {
262 if (it == undefined) throw TypeError$8("Can't call method on " + it);
263 return it;
264 };
265
266 // toObject with fallback for non-array-like ES3 strings
267
268
269
270 var toIndexedObject = function (it) {
271 return indexedObject(requireObjectCoercible(it));
272 };
273
274 // `IsCallable` abstract operation
275 // https://tc39.es/ecma262/#sec-iscallable
276 var isCallable = function (argument) {
277 return typeof argument == 'function';
278 };
279
280 var isObject = function (it) {
281 return typeof it == 'object' ? it !== null : isCallable(it);
282 };
283
284 var aFunction = function (argument) {
285 return isCallable(argument) ? argument : undefined;
286 };
287
288 var getBuiltIn = function (namespace, method) {
289 return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
290 };
291
292 var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
293
294 var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
295
296 var process = global_1.process;
297 var Deno = global_1.Deno;
298 var versions = process && process.versions || Deno && Deno.version;
299 var v8 = versions && versions.v8;
300 var match, version;
301
302 if (v8) {
303 match = v8.split('.');
304 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
305 // but their correct versions are not interesting for us
306 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
307 }
308
309 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
310 // so check `userAgent` even if `.v8` exists, but 0
311 if (!version && engineUserAgent) {
312 match = engineUserAgent.match(/Edge\/(\d+)/);
313 if (!match || match[1] >= 74) {
314 match = engineUserAgent.match(/Chrome\/(\d+)/);
315 if (match) version = +match[1];
316 }
317 }
318
319 var engineV8Version = version;
320
321 /* eslint-disable es-x/no-symbol -- required for testing */
322
323
324
325 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
326 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
327 var symbol = Symbol();
328 // Chrome 38 Symbol has incorrect toString conversion
329 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
330 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
331 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
332 !Symbol.sham && engineV8Version && engineV8Version < 41;
333 });
334
335 /* eslint-disable es-x/no-symbol -- required for testing */
336
337
338 var useSymbolAsUid = nativeSymbol
339 && !Symbol.sham
340 && typeof Symbol.iterator == 'symbol';
341
342 var Object$3 = global_1.Object;
343
344 var isSymbol = useSymbolAsUid ? function (it) {
345 return typeof it == 'symbol';
346 } : function (it) {
347 var $Symbol = getBuiltIn('Symbol');
348 return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
349 };
350
351 var String$2 = global_1.String;
352
353 var tryToString = function (argument) {
354 try {
355 return String$2(argument);
356 } catch (error) {
357 return 'Object';
358 }
359 };
360
361 var TypeError$7 = global_1.TypeError;
362
363 // `Assert: IsCallable(argument) is true`
364 var aCallable = function (argument) {
365 if (isCallable(argument)) return argument;
366 throw TypeError$7(tryToString(argument) + ' is not a function');
367 };
368
369 // `GetMethod` abstract operation
370 // https://tc39.es/ecma262/#sec-getmethod
371 var getMethod = function (V, P) {
372 var func = V[P];
373 return func == null ? undefined : aCallable(func);
374 };
375
376 var TypeError$6 = global_1.TypeError;
377
378 // `OrdinaryToPrimitive` abstract operation
379 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
380 var ordinaryToPrimitive = function (input, pref) {
381 var fn, val;
382 if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
383 if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
384 if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
385 throw TypeError$6("Can't convert object to primitive value");
386 };
387
388 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
389 var defineProperty$1 = Object.defineProperty;
390
391 var setGlobal = function (key, value) {
392 try {
393 defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
394 } catch (error) {
395 global_1[key] = value;
396 } return value;
397 };
398
399 var SHARED = '__core-js_shared__';
400 var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
401
402 var sharedStore = store$1;
403
404 var shared = createCommonjsModule(function (module) {
405 (module.exports = function (key, value) {
406 return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
407 })('versions', []).push({
408 version: '3.22.4',
409 mode: 'global',
410 copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
411 license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
412 source: 'https://github.com/zloirock/core-js'
413 });
414 });
415
416 var Object$2 = global_1.Object;
417
418 // `ToObject` abstract operation
419 // https://tc39.es/ecma262/#sec-toobject
420 var toObject = function (argument) {
421 return Object$2(requireObjectCoercible(argument));
422 };
423
424 var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
425
426 // `HasOwnProperty` abstract operation
427 // https://tc39.es/ecma262/#sec-hasownproperty
428 // eslint-disable-next-line es-x/no-object-hasown -- safe
429 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
430 return hasOwnProperty(toObject(it), key);
431 };
432
433 var id = 0;
434 var postfix = Math.random();
435 var toString = functionUncurryThis(1.0.toString);
436
437 var uid = function (key) {
438 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
439 };
440
441 var WellKnownSymbolsStore = shared('wks');
442 var Symbol$1 = global_1.Symbol;
443 var symbolFor = Symbol$1 && Symbol$1['for'];
444 var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
445
446 var wellKnownSymbol = function (name) {
447 if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
448 var description = 'Symbol.' + name;
449 if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
450 WellKnownSymbolsStore[name] = Symbol$1[name];
451 } else if (useSymbolAsUid && symbolFor) {
452 WellKnownSymbolsStore[name] = symbolFor(description);
453 } else {
454 WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
455 }
456 } return WellKnownSymbolsStore[name];
457 };
458
459 var TypeError$5 = global_1.TypeError;
460 var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
461
462 // `ToPrimitive` abstract operation
463 // https://tc39.es/ecma262/#sec-toprimitive
464 var toPrimitive = function (input, pref) {
465 if (!isObject(input) || isSymbol(input)) return input;
466 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
467 var result;
468 if (exoticToPrim) {
469 if (pref === undefined) pref = 'default';
470 result = functionCall(exoticToPrim, input, pref);
471 if (!isObject(result) || isSymbol(result)) return result;
472 throw TypeError$5("Can't convert object to primitive value");
473 }
474 if (pref === undefined) pref = 'number';
475 return ordinaryToPrimitive(input, pref);
476 };
477
478 // `ToPropertyKey` abstract operation
479 // https://tc39.es/ecma262/#sec-topropertykey
480 var toPropertyKey = function (argument) {
481 var key = toPrimitive(argument, 'string');
482 return isSymbol(key) ? key : key + '';
483 };
484
485 var document$1 = global_1.document;
486 // typeof document.createElement is 'object' in old IE
487 var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
488
489 var documentCreateElement = function (it) {
490 return EXISTS$1 ? document$1.createElement(it) : {};
491 };
492
493 // Thanks to IE8 for its funny defineProperty
494 var ie8DomDefine = !descriptors && !fails(function () {
495 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
496 return Object.defineProperty(documentCreateElement('div'), 'a', {
497 get: function () { return 7; }
498 }).a != 7;
499 });
500
501 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
502 var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
503
504 // `Object.getOwnPropertyDescriptor` method
505 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
506 var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
507 O = toIndexedObject(O);
508 P = toPropertyKey(P);
509 if (ie8DomDefine) try {
510 return $getOwnPropertyDescriptor$1(O, P);
511 } catch (error) { /* empty */ }
512 if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
513 };
514
515 var objectGetOwnPropertyDescriptor = {
516 f: f$4
517 };
518
519 // V8 ~ Chrome 36-
520 // https://bugs.chromium.org/p/v8/issues/detail?id=3334
521 var v8PrototypeDefineBug = descriptors && fails(function () {
522 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
523 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
524 value: 42,
525 writable: false
526 }).prototype != 42;
527 });
528
529 var String$1 = global_1.String;
530 var TypeError$4 = global_1.TypeError;
531
532 // `Assert: Type(argument) is Object`
533 var anObject = function (argument) {
534 if (isObject(argument)) return argument;
535 throw TypeError$4(String$1(argument) + ' is not an object');
536 };
537
538 var TypeError$3 = global_1.TypeError;
539 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
540 var $defineProperty = Object.defineProperty;
541 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
542 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
543 var ENUMERABLE = 'enumerable';
544 var CONFIGURABLE$1 = 'configurable';
545 var WRITABLE = 'writable';
546
547 // `Object.defineProperty` method
548 // https://tc39.es/ecma262/#sec-object.defineproperty
549 var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
550 anObject(O);
551 P = toPropertyKey(P);
552 anObject(Attributes);
553 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
554 var current = $getOwnPropertyDescriptor(O, P);
555 if (current && current[WRITABLE]) {
556 O[P] = Attributes.value;
557 Attributes = {
558 configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
559 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
560 writable: false
561 };
562 }
563 } return $defineProperty(O, P, Attributes);
564 } : $defineProperty : function defineProperty(O, P, Attributes) {
565 anObject(O);
566 P = toPropertyKey(P);
567 anObject(Attributes);
568 if (ie8DomDefine) try {
569 return $defineProperty(O, P, Attributes);
570 } catch (error) { /* empty */ }
571 if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
572 if ('value' in Attributes) O[P] = Attributes.value;
573 return O;
574 };
575
576 var objectDefineProperty = {
577 f: f$3
578 };
579
580 var createNonEnumerableProperty = descriptors ? function (object, key, value) {
581 return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
582 } : function (object, key, value) {
583 object[key] = value;
584 return object;
585 };
586
587 var FunctionPrototype = Function.prototype;
588 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
589 var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
590
591 var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
592 // additional protection from minified / mangled / dropped function names
593 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
594 var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
595
596 var functionName = {
597 EXISTS: EXISTS,
598 PROPER: PROPER,
599 CONFIGURABLE: CONFIGURABLE
600 };
601
602 var functionToString = functionUncurryThis(Function.toString);
603
604 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
605 if (!isCallable(sharedStore.inspectSource)) {
606 sharedStore.inspectSource = function (it) {
607 return functionToString(it);
608 };
609 }
610
611 var inspectSource = sharedStore.inspectSource;
612
613 var WeakMap$1 = global_1.WeakMap;
614
615 var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
616
617 var keys = shared('keys');
618
619 var sharedKey = function (key) {
620 return keys[key] || (keys[key] = uid(key));
621 };
622
623 var hiddenKeys$1 = {};
624
625 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
626 var TypeError$2 = global_1.TypeError;
627 var WeakMap = global_1.WeakMap;
628 var set, get, has;
629
630 var enforce = function (it) {
631 return has(it) ? get(it) : set(it, {});
632 };
633
634 var getterFor = function (TYPE) {
635 return function (it) {
636 var state;
637 if (!isObject(it) || (state = get(it)).type !== TYPE) {
638 throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
639 } return state;
640 };
641 };
642
643 if (nativeWeakMap || sharedStore.state) {
644 var store = sharedStore.state || (sharedStore.state = new WeakMap());
645 var wmget = functionUncurryThis(store.get);
646 var wmhas = functionUncurryThis(store.has);
647 var wmset = functionUncurryThis(store.set);
648 set = function (it, metadata) {
649 if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
650 metadata.facade = it;
651 wmset(store, it, metadata);
652 return metadata;
653 };
654 get = function (it) {
655 return wmget(store, it) || {};
656 };
657 has = function (it) {
658 return wmhas(store, it);
659 };
660 } else {
661 var STATE = sharedKey('state');
662 hiddenKeys$1[STATE] = true;
663 set = function (it, metadata) {
664 if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
665 metadata.facade = it;
666 createNonEnumerableProperty(it, STATE, metadata);
667 return metadata;
668 };
669 get = function (it) {
670 return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
671 };
672 has = function (it) {
673 return hasOwnProperty_1(it, STATE);
674 };
675 }
676
677 var internalState = {
678 set: set,
679 get: get,
680 has: has,
681 enforce: enforce,
682 getterFor: getterFor
683 };
684
685 var makeBuiltIn_1 = createCommonjsModule(function (module) {
686 var defineProperty = objectDefineProperty.f;
687 var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
688
689
690
691 var enforceInternalState = internalState.enforce;
692 var getInternalState = internalState.get;
693
694 var CONFIGURABLE_LENGTH = !fails(function () {
695 return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
696 });
697
698 var TEMPLATE = String(String).split('String');
699
700 var makeBuiltIn = module.exports = function (value, name, options) {
701 if (String(name).slice(0, 7) === 'Symbol(') {
702 name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
703 }
704 if (options && options.getter) name = 'get ' + name;
705 if (options && options.setter) name = 'set ' + name;
706 if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
707 defineProperty(value, 'name', { value: name, configurable: true });
708 }
709 if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
710 defineProperty(value, 'length', { value: options.arity });
711 }
712 var state = enforceInternalState(value);
713 if (!hasOwnProperty_1(state, 'source')) {
714 state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
715 } return value;
716 };
717
718 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
719 // eslint-disable-next-line no-extend-native -- required
720 Function.prototype.toString = makeBuiltIn(function toString() {
721 return isCallable(this) && getInternalState(this).source || inspectSource(this);
722 }, 'toString');
723 });
724
725 var defineBuiltIn = function (O, key, value, options) {
726 var unsafe = options ? !!options.unsafe : false;
727 var simple = options ? !!options.enumerable : false;
728 var noTargetGet = options ? !!options.noTargetGet : false;
729 var name = options && options.name !== undefined ? options.name : key;
730 if (isCallable(value)) makeBuiltIn_1(value, name, options);
731 if (O === global_1) {
732 if (simple) O[key] = value;
733 else setGlobal(key, value);
734 return O;
735 } else if (!unsafe) {
736 delete O[key];
737 } else if (!noTargetGet && O[key]) {
738 simple = true;
739 }
740 if (simple) O[key] = value;
741 else createNonEnumerableProperty(O, key, value);
742 return O;
743 };
744
745 var ceil = Math.ceil;
746 var floor = Math.floor;
747
748 // `ToIntegerOrInfinity` abstract operation
749 // https://tc39.es/ecma262/#sec-tointegerorinfinity
750 var toIntegerOrInfinity = function (argument) {
751 var number = +argument;
752 // eslint-disable-next-line no-self-compare -- safe
753 return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
754 };
755
756 var max = Math.max;
757 var min$1 = Math.min;
758
759 // Helper for a popular repeating case of the spec:
760 // Let integer be ? ToInteger(index).
761 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
762 var toAbsoluteIndex = function (index, length) {
763 var integer = toIntegerOrInfinity(index);
764 return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
765 };
766
767 var min = Math.min;
768
769 // `ToLength` abstract operation
770 // https://tc39.es/ecma262/#sec-tolength
771 var toLength = function (argument) {
772 return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
773 };
774
775 // `LengthOfArrayLike` abstract operation
776 // https://tc39.es/ecma262/#sec-lengthofarraylike
777 var lengthOfArrayLike = function (obj) {
778 return toLength(obj.length);
779 };
780
781 // `Array.prototype.{ indexOf, includes }` methods implementation
782 var createMethod$1 = function (IS_INCLUDES) {
783 return function ($this, el, fromIndex) {
784 var O = toIndexedObject($this);
785 var length = lengthOfArrayLike(O);
786 var index = toAbsoluteIndex(fromIndex, length);
787 var value;
788 // Array#includes uses SameValueZero equality algorithm
789 // eslint-disable-next-line no-self-compare -- NaN check
790 if (IS_INCLUDES && el != el) while (length > index) {
791 value = O[index++];
792 // eslint-disable-next-line no-self-compare -- NaN check
793 if (value != value) return true;
794 // Array#indexOf ignores holes, Array#includes - not
795 } else for (;length > index; index++) {
796 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
797 } return !IS_INCLUDES && -1;
798 };
799 };
800
801 var arrayIncludes = {
802 // `Array.prototype.includes` method
803 // https://tc39.es/ecma262/#sec-array.prototype.includes
804 includes: createMethod$1(true),
805 // `Array.prototype.indexOf` method
806 // https://tc39.es/ecma262/#sec-array.prototype.indexof
807 indexOf: createMethod$1(false)
808 };
809
810 var indexOf = arrayIncludes.indexOf;
811
812
813 var push$1 = functionUncurryThis([].push);
814
815 var objectKeysInternal = function (object, names) {
816 var O = toIndexedObject(object);
817 var i = 0;
818 var result = [];
819 var key;
820 for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
821 // Don't enum bug & hidden keys
822 while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
823 ~indexOf(result, key) || push$1(result, key);
824 }
825 return result;
826 };
827
828 // IE8- don't enum bug keys
829 var enumBugKeys = [
830 'constructor',
831 'hasOwnProperty',
832 'isPrototypeOf',
833 'propertyIsEnumerable',
834 'toLocaleString',
835 'toString',
836 'valueOf'
837 ];
838
839 var hiddenKeys = enumBugKeys.concat('length', 'prototype');
840
841 // `Object.getOwnPropertyNames` method
842 // https://tc39.es/ecma262/#sec-object.getownpropertynames
843 // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
844 var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
845 return objectKeysInternal(O, hiddenKeys);
846 };
847
848 var objectGetOwnPropertyNames = {
849 f: f$2
850 };
851
852 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
853 var f$1 = Object.getOwnPropertySymbols;
854
855 var objectGetOwnPropertySymbols = {
856 f: f$1
857 };
858
859 var concat$1 = functionUncurryThis([].concat);
860
861 // all object keys, includes non-enumerable and symbols
862 var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
863 var keys = objectGetOwnPropertyNames.f(anObject(it));
864 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
865 return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
866 };
867
868 var copyConstructorProperties = function (target, source, exceptions) {
869 var keys = ownKeys(source);
870 var defineProperty = objectDefineProperty.f;
871 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
872 for (var i = 0; i < keys.length; i++) {
873 var key = keys[i];
874 if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
875 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
876 }
877 }
878 };
879
880 var replacement = /#|\.prototype\./;
881
882 var isForced = function (feature, detection) {
883 var value = data[normalize(feature)];
884 return value == POLYFILL ? true
885 : value == NATIVE ? false
886 : isCallable(detection) ? fails(detection)
887 : !!detection;
888 };
889
890 var normalize = isForced.normalize = function (string) {
891 return String(string).replace(replacement, '.').toLowerCase();
892 };
893
894 var data = isForced.data = {};
895 var NATIVE = isForced.NATIVE = 'N';
896 var POLYFILL = isForced.POLYFILL = 'P';
897
898 var isForced_1 = isForced;
899
900 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
901
902
903
904
905
906
907 /*
908 options.target - name of the target object
909 options.global - target is the global object
910 options.stat - export as static methods of target
911 options.proto - export as prototype methods of target
912 options.real - real prototype method for the `pure` version
913 options.forced - export even if the native feature is available
914 options.bind - bind methods to the target, required for the `pure` version
915 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
916 options.unsafe - use the simple assignment of property instead of delete + defineProperty
917 options.sham - add a flag to not completely full polyfills
918 options.enumerable - export as enumerable property
919 options.noTargetGet - prevent calling a getter on target
920 options.name - the .name of the function if it does not match the key
921 */
922 var _export = function (options, source) {
923 var TARGET = options.target;
924 var GLOBAL = options.global;
925 var STATIC = options.stat;
926 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
927 if (GLOBAL) {
928 target = global_1;
929 } else if (STATIC) {
930 target = global_1[TARGET] || setGlobal(TARGET, {});
931 } else {
932 target = (global_1[TARGET] || {}).prototype;
933 }
934 if (target) for (key in source) {
935 sourceProperty = source[key];
936 if (options.noTargetGet) {
937 descriptor = getOwnPropertyDescriptor(target, key);
938 targetProperty = descriptor && descriptor.value;
939 } else targetProperty = target[key];
940 FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
941 // contained in target
942 if (!FORCED && targetProperty !== undefined) {
943 if (typeof sourceProperty == typeof targetProperty) continue;
944 copyConstructorProperties(sourceProperty, targetProperty);
945 }
946 // add a flag to not completely full polyfills
947 if (options.sham || (targetProperty && targetProperty.sham)) {
948 createNonEnumerableProperty(sourceProperty, 'sham', true);
949 }
950 defineBuiltIn(target, key, sourceProperty, options);
951 }
952 };
953
954 // `Object.keys` method
955 // https://tc39.es/ecma262/#sec-object.keys
956 // eslint-disable-next-line es-x/no-object-keys -- safe
957 var objectKeys = Object.keys || function keys(O) {
958 return objectKeysInternal(O, enumBugKeys);
959 };
960
961 // eslint-disable-next-line es-x/no-object-assign -- safe
962 var $assign = Object.assign;
963 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
964 var defineProperty = Object.defineProperty;
965 var concat = functionUncurryThis([].concat);
966
967 // `Object.assign` method
968 // https://tc39.es/ecma262/#sec-object.assign
969 var objectAssign = !$assign || fails(function () {
970 // should have correct order of operations (Edge bug)
971 if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
972 enumerable: true,
973 get: function () {
974 defineProperty(this, 'b', {
975 value: 3,
976 enumerable: false
977 });
978 }
979 }), { b: 2 })).b !== 1) return true;
980 // should work with symbols and should have deterministic property order (V8 bug)
981 var A = {};
982 var B = {};
983 // eslint-disable-next-line es-x/no-symbol -- safe
984 var symbol = Symbol();
985 var alphabet = 'abcdefghijklmnopqrst';
986 A[symbol] = 7;
987 alphabet.split('').forEach(function (chr) { B[chr] = chr; });
988 return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
989 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
990 var T = toObject(target);
991 var argumentsLength = arguments.length;
992 var index = 1;
993 var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
994 var propertyIsEnumerable = objectPropertyIsEnumerable.f;
995 while (argumentsLength > index) {
996 var S = indexedObject(arguments[index++]);
997 var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
998 var length = keys.length;
999 var j = 0;
1000 var key;
1001 while (length > j) {
1002 key = keys[j++];
1003 if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
1004 }
1005 } return T;
1006 } : $assign;
1007
1008 // `Object.assign` method
1009 // https://tc39.es/ecma262/#sec-object.assign
1010 // eslint-disable-next-line es-x/no-object-assign -- required for testing
1011 _export({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== objectAssign }, {
1012 assign: objectAssign
1013 });
1014
1015 // `IsArray` abstract operation
1016 // https://tc39.es/ecma262/#sec-isarray
1017 // eslint-disable-next-line es-x/no-array-isarray -- safe
1018 var isArray = Array.isArray || function isArray(argument) {
1019 return classofRaw(argument) == 'Array';
1020 };
1021
1022 var createProperty = function (object, key, value) {
1023 var propertyKey = toPropertyKey(key);
1024 if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1025 else object[propertyKey] = value;
1026 };
1027
1028 var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1029 var test = {};
1030
1031 test[TO_STRING_TAG$1] = 'z';
1032
1033 var toStringTagSupport = String(test) === '[object z]';
1034
1035 var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1036 var Object$1 = global_1.Object;
1037
1038 // ES3 wrong here
1039 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1040
1041 // fallback for IE11 Script Access Denied error
1042 var tryGet = function (it, key) {
1043 try {
1044 return it[key];
1045 } catch (error) { /* empty */ }
1046 };
1047
1048 // getting tag from ES6+ `Object.prototype.toString`
1049 var classof = toStringTagSupport ? classofRaw : function (it) {
1050 var O, tag, result;
1051 return it === undefined ? 'Undefined' : it === null ? 'Null'
1052 // @@toStringTag case
1053 : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1054 // builtinTag case
1055 : CORRECT_ARGUMENTS ? classofRaw(O)
1056 // ES3 arguments fallback
1057 : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1058 };
1059
1060 var noop = function () { /* empty */ };
1061 var empty = [];
1062 var construct = getBuiltIn('Reflect', 'construct');
1063 var constructorRegExp = /^\s*(?:class|function)\b/;
1064 var exec = functionUncurryThis(constructorRegExp.exec);
1065 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1066
1067 var isConstructorModern = function isConstructor(argument) {
1068 if (!isCallable(argument)) return false;
1069 try {
1070 construct(noop, empty, argument);
1071 return true;
1072 } catch (error) {
1073 return false;
1074 }
1075 };
1076
1077 var isConstructorLegacy = function isConstructor(argument) {
1078 if (!isCallable(argument)) return false;
1079 switch (classof(argument)) {
1080 case 'AsyncFunction':
1081 case 'GeneratorFunction':
1082 case 'AsyncGeneratorFunction': return false;
1083 }
1084 try {
1085 // we can't check .prototype since constructors produced by .bind haven't it
1086 // `Function#toString` throws on some built-it function in some legacy engines
1087 // (for example, `DOMQuad` and similar in FF41-)
1088 return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
1089 } catch (error) {
1090 return true;
1091 }
1092 };
1093
1094 isConstructorLegacy.sham = true;
1095
1096 // `IsConstructor` abstract operation
1097 // https://tc39.es/ecma262/#sec-isconstructor
1098 var isConstructor = !construct || fails(function () {
1099 var called;
1100 return isConstructorModern(isConstructorModern.call)
1101 || !isConstructorModern(Object)
1102 || !isConstructorModern(function () { called = true; })
1103 || called;
1104 }) ? isConstructorLegacy : isConstructorModern;
1105
1106 var SPECIES$1 = wellKnownSymbol('species');
1107 var Array$1 = global_1.Array;
1108
1109 // a part of `ArraySpeciesCreate` abstract operation
1110 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1111 var arraySpeciesConstructor = function (originalArray) {
1112 var C;
1113 if (isArray(originalArray)) {
1114 C = originalArray.constructor;
1115 // cross-realm fallback
1116 if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
1117 else if (isObject(C)) {
1118 C = C[SPECIES$1];
1119 if (C === null) C = undefined;
1120 }
1121 } return C === undefined ? Array$1 : C;
1122 };
1123
1124 // `ArraySpeciesCreate` abstract operation
1125 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1126 var arraySpeciesCreate = function (originalArray, length) {
1127 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1128 };
1129
1130 var SPECIES = wellKnownSymbol('species');
1131
1132 var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1133 // We can't use this feature detection in V8 since it causes
1134 // deoptimization and serious performance degradation
1135 // https://github.com/zloirock/core-js/issues/677
1136 return engineV8Version >= 51 || !fails(function () {
1137 var array = [];
1138 var constructor = array.constructor = {};
1139 constructor[SPECIES] = function () {
1140 return { foo: 1 };
1141 };
1142 return array[METHOD_NAME](Boolean).foo !== 1;
1143 });
1144 };
1145
1146 var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1147 var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1148 var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1149 var TypeError$1 = global_1.TypeError;
1150
1151 // We can't use this feature detection in V8 since it causes
1152 // deoptimization and serious performance degradation
1153 // https://github.com/zloirock/core-js/issues/679
1154 var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
1155 var array = [];
1156 array[IS_CONCAT_SPREADABLE] = false;
1157 return array.concat()[0] !== array;
1158 });
1159
1160 var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
1161
1162 var isConcatSpreadable = function (O) {
1163 if (!isObject(O)) return false;
1164 var spreadable = O[IS_CONCAT_SPREADABLE];
1165 return spreadable !== undefined ? !!spreadable : isArray(O);
1166 };
1167
1168 var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1169
1170 // `Array.prototype.concat` method
1171 // https://tc39.es/ecma262/#sec-array.prototype.concat
1172 // with adding support of @@isConcatSpreadable and @@species
1173 _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
1174 // eslint-disable-next-line no-unused-vars -- required for `.length`
1175 concat: function concat(arg) {
1176 var O = toObject(this);
1177 var A = arraySpeciesCreate(O, 0);
1178 var n = 0;
1179 var i, k, length, len, E;
1180 for (i = -1, length = arguments.length; i < length; i++) {
1181 E = i === -1 ? O : arguments[i];
1182 if (isConcatSpreadable(E)) {
1183 len = lengthOfArrayLike(E);
1184 if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1185 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1186 } else {
1187 if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1188 createProperty(A, n++, E);
1189 }
1190 }
1191 A.length = n;
1192 return A;
1193 }
1194 });
1195
1196 var bind = functionUncurryThis(functionUncurryThis.bind);
1197
1198 // optional / simple context binding
1199 var functionBindContext = function (fn, that) {
1200 aCallable(fn);
1201 return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
1202 return fn.apply(that, arguments);
1203 };
1204 };
1205
1206 var push = functionUncurryThis([].push);
1207
1208 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1209 var createMethod = function (TYPE) {
1210 var IS_MAP = TYPE == 1;
1211 var IS_FILTER = TYPE == 2;
1212 var IS_SOME = TYPE == 3;
1213 var IS_EVERY = TYPE == 4;
1214 var IS_FIND_INDEX = TYPE == 6;
1215 var IS_FILTER_REJECT = TYPE == 7;
1216 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1217 return function ($this, callbackfn, that, specificCreate) {
1218 var O = toObject($this);
1219 var self = indexedObject(O);
1220 var boundFunction = functionBindContext(callbackfn, that);
1221 var length = lengthOfArrayLike(self);
1222 var index = 0;
1223 var create = specificCreate || arraySpeciesCreate;
1224 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1225 var value, result;
1226 for (;length > index; index++) if (NO_HOLES || index in self) {
1227 value = self[index];
1228 result = boundFunction(value, index, O);
1229 if (TYPE) {
1230 if (IS_MAP) target[index] = result; // map
1231 else if (result) switch (TYPE) {
1232 case 3: return true; // some
1233 case 5: return value; // find
1234 case 6: return index; // findIndex
1235 case 2: push(target, value); // filter
1236 } else switch (TYPE) {
1237 case 4: return false; // every
1238 case 7: push(target, value); // filterReject
1239 }
1240 }
1241 }
1242 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
1243 };
1244 };
1245
1246 var arrayIteration = {
1247 // `Array.prototype.forEach` method
1248 // https://tc39.es/ecma262/#sec-array.prototype.foreach
1249 forEach: createMethod(0),
1250 // `Array.prototype.map` method
1251 // https://tc39.es/ecma262/#sec-array.prototype.map
1252 map: createMethod(1),
1253 // `Array.prototype.filter` method
1254 // https://tc39.es/ecma262/#sec-array.prototype.filter
1255 filter: createMethod(2),
1256 // `Array.prototype.some` method
1257 // https://tc39.es/ecma262/#sec-array.prototype.some
1258 some: createMethod(3),
1259 // `Array.prototype.every` method
1260 // https://tc39.es/ecma262/#sec-array.prototype.every
1261 every: createMethod(4),
1262 // `Array.prototype.find` method
1263 // https://tc39.es/ecma262/#sec-array.prototype.find
1264 find: createMethod(5),
1265 // `Array.prototype.findIndex` method
1266 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
1267 findIndex: createMethod(6),
1268 // `Array.prototype.filterReject` method
1269 // https://github.com/tc39/proposal-array-filtering
1270 filterReject: createMethod(7)
1271 };
1272
1273 // `Object.defineProperties` method
1274 // https://tc39.es/ecma262/#sec-object.defineproperties
1275 // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1276 var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
1277 anObject(O);
1278 var props = toIndexedObject(Properties);
1279 var keys = objectKeys(Properties);
1280 var length = keys.length;
1281 var index = 0;
1282 var key;
1283 while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
1284 return O;
1285 };
1286
1287 var objectDefineProperties = {
1288 f: f
1289 };
1290
1291 var html = getBuiltIn('document', 'documentElement');
1292
1293 /* global ActiveXObject -- old IE, WSH */
1294
1295
1296
1297
1298
1299
1300
1301
1302 var GT = '>';
1303 var LT = '<';
1304 var PROTOTYPE = 'prototype';
1305 var SCRIPT = 'script';
1306 var IE_PROTO = sharedKey('IE_PROTO');
1307
1308 var EmptyConstructor = function () { /* empty */ };
1309
1310 var scriptTag = function (content) {
1311 return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1312 };
1313
1314 // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1315 var NullProtoObjectViaActiveX = function (activeXDocument) {
1316 activeXDocument.write(scriptTag(''));
1317 activeXDocument.close();
1318 var temp = activeXDocument.parentWindow.Object;
1319 activeXDocument = null; // avoid memory leak
1320 return temp;
1321 };
1322
1323 // Create object with fake `null` prototype: use iframe Object with cleared prototype
1324 var NullProtoObjectViaIFrame = function () {
1325 // Thrash, waste and sodomy: IE GC bug
1326 var iframe = documentCreateElement('iframe');
1327 var JS = 'java' + SCRIPT + ':';
1328 var iframeDocument;
1329 iframe.style.display = 'none';
1330 html.appendChild(iframe);
1331 // https://github.com/zloirock/core-js/issues/475
1332 iframe.src = String(JS);
1333 iframeDocument = iframe.contentWindow.document;
1334 iframeDocument.open();
1335 iframeDocument.write(scriptTag('document.F=Object'));
1336 iframeDocument.close();
1337 return iframeDocument.F;
1338 };
1339
1340 // Check for document.domain and active x support
1341 // No need to use active x approach when document.domain is not set
1342 // see https://github.com/es-shims/es5-shim/issues/150
1343 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1344 // avoid IE GC bug
1345 var activeXDocument;
1346 var NullProtoObject = function () {
1347 try {
1348 activeXDocument = new ActiveXObject('htmlfile');
1349 } catch (error) { /* ignore */ }
1350 NullProtoObject = typeof document != 'undefined'
1351 ? document.domain && activeXDocument
1352 ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1353 : NullProtoObjectViaIFrame()
1354 : NullProtoObjectViaActiveX(activeXDocument); // WSH
1355 var length = enumBugKeys.length;
1356 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1357 return NullProtoObject();
1358 };
1359
1360 hiddenKeys$1[IE_PROTO] = true;
1361
1362 // `Object.create` method
1363 // https://tc39.es/ecma262/#sec-object.create
1364 // eslint-disable-next-line es-x/no-object-create -- safe
1365 var objectCreate = Object.create || function create(O, Properties) {
1366 var result;
1367 if (O !== null) {
1368 EmptyConstructor[PROTOTYPE] = anObject(O);
1369 result = new EmptyConstructor();
1370 EmptyConstructor[PROTOTYPE] = null;
1371 // add "__proto__" for Object.getPrototypeOf polyfill
1372 result[IE_PROTO] = O;
1373 } else result = NullProtoObject();
1374 return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
1375 };
1376
1377 var UNSCOPABLES = wellKnownSymbol('unscopables');
1378 var ArrayPrototype = Array.prototype;
1379
1380 // Array.prototype[@@unscopables]
1381 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1382 if (ArrayPrototype[UNSCOPABLES] == undefined) {
1383 objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
1384 configurable: true,
1385 value: objectCreate(null)
1386 });
1387 }
1388
1389 // add a key to Array.prototype[@@unscopables]
1390 var addToUnscopables = function (key) {
1391 ArrayPrototype[UNSCOPABLES][key] = true;
1392 };
1393
1394 var $find = arrayIteration.find;
1395
1396
1397 var FIND = 'find';
1398 var SKIPS_HOLES = true;
1399
1400 // Shouldn't skip holes
1401 if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
1402
1403 // `Array.prototype.find` method
1404 // https://tc39.es/ecma262/#sec-array.prototype.find
1405 _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
1406 find: function find(callbackfn /* , that = undefined */) {
1407 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1408 }
1409 });
1410
1411 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1412 addToUnscopables(FIND);
1413
1414 // `Object.prototype.toString` method implementation
1415 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1416 var objectToString = toStringTagSupport ? {}.toString : function toString() {
1417 return '[object ' + classof(this) + ']';
1418 };
1419
1420 // `Object.prototype.toString` method
1421 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1422 if (!toStringTagSupport) {
1423 defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
1424 }
1425
1426 var arrayMethodIsStrict = function (METHOD_NAME, argument) {
1427 var method = [][METHOD_NAME];
1428 return !!method && fails(function () {
1429 // eslint-disable-next-line no-useless-call -- required for testing
1430 method.call(null, argument || function () { return 1; }, 1);
1431 });
1432 };
1433
1434 var un$Join = functionUncurryThis([].join);
1435
1436 var ES3_STRINGS = indexedObject != Object;
1437 var STRICT_METHOD = arrayMethodIsStrict('join', ',');
1438
1439 // `Array.prototype.join` method
1440 // https://tc39.es/ecma262/#sec-array.prototype.join
1441 _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
1442 join: function join(separator) {
1443 return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
1444 }
1445 });
1446
1447 /**
1448 * @author Homer Glascock <HopGlascock@gmail.com>
1449 * @update zhixin wen <wenzhixin2010@gmail.com>
1450 */
1451
1452 var Utils = $__default["default"].fn.bootstrapTable.utils;
1453 $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
1454 formatCopyRows: function formatCopyRows() {
1455 return 'Copy Rows';
1456 }
1457 });
1458 $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
1459 $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
1460 copy: {
1461 bootstrap3: 'glyphicon-copy icon-pencil',
1462 bootstrap5: 'bi-clipboard',
1463 materialize: 'content_copy',
1464 'bootstrap-table': 'icon-copy'
1465 }[$__default["default"].fn.bootstrapTable.theme] || 'fa-copy'
1466 });
1467
1468 var copyText = function copyText(text) {
1469 var textField = document.createElement('textarea');
1470 $__default["default"](textField).html(text);
1471 document.body.appendChild(textField);
1472 textField.select();
1473
1474 try {
1475 document.execCommand('copy');
1476 } catch (e) {
1477 console.warn('Oops, unable to copy');
1478 }
1479
1480 $__default["default"](textField).remove();
1481 };
1482
1483 $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
1484 showCopyRows: false,
1485 copyWithHidden: false,
1486 copyDelimiter: ', ',
1487 copyNewline: '\n'
1488 });
1489 $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
1490 ignoreCopy: false,
1491 rawCopy: false
1492 });
1493 $__default["default"].fn.bootstrapTable.methods.push('copyColumnsToClipboard');
1494
1495 $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
1496 _inherits(_class, _$$BootstrapTable);
1497
1498 var _super = _createSuper(_class);
1499
1500 function _class() {
1501 _classCallCheck(this, _class);
1502
1503 return _super.apply(this, arguments);
1504 }
1505
1506 _createClass(_class, [{
1507 key: "initToolbar",
1508 value: function initToolbar() {
1509 var _get2;
1510
1511 if (this.options.showCopyRows && this.header.stateField) {
1512 this.buttons = Object.assign(this.buttons, {
1513 copyRows: {
1514 text: this.options.formatCopyRows(),
1515 icon: this.options.icons.copy,
1516 event: this.copyColumnsToClipboard,
1517 attributes: {
1518 'aria-label': this.options.formatCopyRows(),
1519 title: this.options.formatCopyRows()
1520 }
1521 }
1522 });
1523 }
1524
1525 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1526 args[_key] = arguments[_key];
1527 }
1528
1529 (_get2 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get2, [this].concat(args));
1530
1531 this.$copyButton = this.$toolbar.find('>.columns [name="copyRows"]');
1532
1533 if (this.options.showCopyRows && this.header.stateField) {
1534 this.updateCopyButton();
1535 }
1536 }
1537 }, {
1538 key: "copyColumnsToClipboard",
1539 value: function copyColumnsToClipboard() {
1540 var _this = this;
1541
1542 var rows = [];
1543 $__default["default"].each(this.getSelections(), function (index, row) {
1544 var cols = [];
1545 $__default["default"].each(_this.options.columns[0], function (indy, column) {
1546 if (column.field !== _this.header.stateField && (!_this.options.copyWithHidden || _this.options.copyWithHidden && column.visible) && !column.ignoreCopy) {
1547 if (row[column.field] !== null) {
1548 var columnValue = column.rawCopy ? row[column.field] : Utils.calculateObjectValue(column, _this.header.formatters[indy], [row[column.field], row, index], row[column.field]);
1549 cols.push(columnValue);
1550 }
1551 }
1552 });
1553 rows.push(cols.join(_this.options.copyDelimiter));
1554 });
1555 copyText(rows.join(this.options.copyNewline));
1556 }
1557 }, {
1558 key: "updateSelected",
1559 value: function updateSelected() {
1560 _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
1561
1562 this.updateCopyButton();
1563 }
1564 }, {
1565 key: "updateCopyButton",
1566 value: function updateCopyButton() {
1567 if (this.options.showCopyRows && this.header.stateField && this.$copyButton) {
1568 this.$copyButton.prop('disabled', !this.getSelections().length);
1569 }
1570 }
1571 }]);
1572
1573 return _class;
1574 }($__default["default"].BootstrapTable);
1575
1576}));