bootstrap-table-vue.esm.js 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375
  1. import { openBlock, createBlock } from 'vue';
  2. function _defineProperty(obj, key, value) {
  3. if (key in obj) {
  4. Object.defineProperty(obj, key, {
  5. value: value,
  6. enumerable: true,
  7. configurable: true,
  8. writable: true
  9. });
  10. } else {
  11. obj[key] = value;
  12. }
  13. return obj;
  14. }
  15. function ownKeys$1(object, enumerableOnly) {
  16. var keys = Object.keys(object);
  17. if (Object.getOwnPropertySymbols) {
  18. var symbols = Object.getOwnPropertySymbols(object);
  19. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  20. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  21. });
  22. keys.push.apply(keys, symbols);
  23. }
  24. return keys;
  25. }
  26. function _objectSpread2(target) {
  27. for (var i = 1; i < arguments.length; i++) {
  28. var source = arguments[i] != null ? arguments[i] : {};
  29. if (i % 2) {
  30. ownKeys$1(Object(source), true).forEach(function (key) {
  31. _defineProperty(target, key, source[key]);
  32. });
  33. } else if (Object.getOwnPropertyDescriptors) {
  34. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  35. } else {
  36. ownKeys$1(Object(source)).forEach(function (key) {
  37. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  38. });
  39. }
  40. }
  41. return target;
  42. }
  43. function _toConsumableArray(arr) {
  44. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  45. }
  46. function _arrayWithoutHoles(arr) {
  47. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  48. }
  49. function _iterableToArray(iter) {
  50. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  51. }
  52. function _unsupportedIterableToArray(o, minLen) {
  53. if (!o) return;
  54. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  55. var n = Object.prototype.toString.call(o).slice(8, -1);
  56. if (n === "Object" && o.constructor) n = o.constructor.name;
  57. if (n === "Map" || n === "Set") return Array.from(o);
  58. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  59. }
  60. function _arrayLikeToArray(arr, len) {
  61. if (len == null || len > arr.length) len = arr.length;
  62. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  63. return arr2;
  64. }
  65. function _nonIterableSpread() {
  66. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  67. }
  68. function _createForOfIteratorHelper(o, allowArrayLike) {
  69. var it;
  70. if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
  71. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  72. if (it) o = it;
  73. var i = 0;
  74. var F = function () {};
  75. return {
  76. s: F,
  77. n: function () {
  78. if (i >= o.length) return {
  79. done: true
  80. };
  81. return {
  82. done: false,
  83. value: o[i++]
  84. };
  85. },
  86. e: function (e) {
  87. throw e;
  88. },
  89. f: F
  90. };
  91. }
  92. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  93. }
  94. var normalCompletion = true,
  95. didErr = false,
  96. err;
  97. return {
  98. s: function () {
  99. it = o[Symbol.iterator]();
  100. },
  101. n: function () {
  102. var step = it.next();
  103. normalCompletion = step.done;
  104. return step;
  105. },
  106. e: function (e) {
  107. didErr = true;
  108. err = e;
  109. },
  110. f: function () {
  111. try {
  112. if (!normalCompletion && it.return != null) it.return();
  113. } finally {
  114. if (didErr) throw err;
  115. }
  116. }
  117. };
  118. }
  119. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  120. function createCommonjsModule(fn, module) {
  121. return module = { exports: {} }, fn(module, module.exports), module.exports;
  122. }
  123. var check = function (it) {
  124. return it && it.Math == Math && it;
  125. };
  126. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  127. var global_1 =
  128. /* global globalThis -- safe */
  129. check(typeof globalThis == 'object' && globalThis) ||
  130. check(typeof window == 'object' && window) ||
  131. check(typeof self == 'object' && self) ||
  132. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  133. // eslint-disable-next-line no-new-func -- fallback
  134. (function () { return this; })() || Function('return this')();
  135. var fails = function (exec) {
  136. try {
  137. return !!exec();
  138. } catch (error) {
  139. return true;
  140. }
  141. };
  142. // Detect IE8's incomplete defineProperty implementation
  143. var descriptors = !fails(function () {
  144. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  145. });
  146. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  147. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  148. // Nashorn ~ JDK8 bug
  149. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  150. // `Object.prototype.propertyIsEnumerable` method implementation
  151. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  152. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  153. var descriptor = getOwnPropertyDescriptor$1(this, V);
  154. return !!descriptor && descriptor.enumerable;
  155. } : nativePropertyIsEnumerable;
  156. var objectPropertyIsEnumerable = {
  157. f: f$4
  158. };
  159. var createPropertyDescriptor = function (bitmap, value) {
  160. return {
  161. enumerable: !(bitmap & 1),
  162. configurable: !(bitmap & 2),
  163. writable: !(bitmap & 4),
  164. value: value
  165. };
  166. };
  167. var toString = {}.toString;
  168. var classofRaw = function (it) {
  169. return toString.call(it).slice(8, -1);
  170. };
  171. var split = ''.split;
  172. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  173. var indexedObject = fails(function () {
  174. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  175. // eslint-disable-next-line no-prototype-builtins -- safe
  176. return !Object('z').propertyIsEnumerable(0);
  177. }) ? function (it) {
  178. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  179. } : Object;
  180. // `RequireObjectCoercible` abstract operation
  181. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  182. var requireObjectCoercible = function (it) {
  183. if (it == undefined) throw TypeError("Can't call method on " + it);
  184. return it;
  185. };
  186. // toObject with fallback for non-array-like ES3 strings
  187. var toIndexedObject = function (it) {
  188. return indexedObject(requireObjectCoercible(it));
  189. };
  190. var isObject = function (it) {
  191. return typeof it === 'object' ? it !== null : typeof it === 'function';
  192. };
  193. // `ToPrimitive` abstract operation
  194. // https://tc39.es/ecma262/#sec-toprimitive
  195. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  196. // and the second argument - flag - preferred type is a string
  197. var toPrimitive = function (input, PREFERRED_STRING) {
  198. if (!isObject(input)) return input;
  199. var fn, val;
  200. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  201. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  202. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  203. throw TypeError("Can't convert object to primitive value");
  204. };
  205. var hasOwnProperty = {}.hasOwnProperty;
  206. var has$1 = function (it, key) {
  207. return hasOwnProperty.call(it, key);
  208. };
  209. var document = global_1.document;
  210. // typeof document.createElement is 'object' in old IE
  211. var EXISTS = isObject(document) && isObject(document.createElement);
  212. var documentCreateElement = function (it) {
  213. return EXISTS ? document.createElement(it) : {};
  214. };
  215. // Thank's IE8 for his funny defineProperty
  216. var ie8DomDefine = !descriptors && !fails(function () {
  217. return Object.defineProperty(documentCreateElement('div'), 'a', {
  218. get: function () { return 7; }
  219. }).a != 7;
  220. });
  221. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  222. // `Object.getOwnPropertyDescriptor` method
  223. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  224. var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  225. O = toIndexedObject(O);
  226. P = toPrimitive(P, true);
  227. if (ie8DomDefine) try {
  228. return nativeGetOwnPropertyDescriptor(O, P);
  229. } catch (error) { /* empty */ }
  230. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  231. };
  232. var objectGetOwnPropertyDescriptor = {
  233. f: f$3
  234. };
  235. var anObject = function (it) {
  236. if (!isObject(it)) {
  237. throw TypeError(String(it) + ' is not an object');
  238. } return it;
  239. };
  240. var nativeDefineProperty = Object.defineProperty;
  241. // `Object.defineProperty` method
  242. // https://tc39.es/ecma262/#sec-object.defineproperty
  243. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  244. anObject(O);
  245. P = toPrimitive(P, true);
  246. anObject(Attributes);
  247. if (ie8DomDefine) try {
  248. return nativeDefineProperty(O, P, Attributes);
  249. } catch (error) { /* empty */ }
  250. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  251. if ('value' in Attributes) O[P] = Attributes.value;
  252. return O;
  253. };
  254. var objectDefineProperty = {
  255. f: f$2
  256. };
  257. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  258. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  259. } : function (object, key, value) {
  260. object[key] = value;
  261. return object;
  262. };
  263. var setGlobal = function (key, value) {
  264. try {
  265. createNonEnumerableProperty(global_1, key, value);
  266. } catch (error) {
  267. global_1[key] = value;
  268. } return value;
  269. };
  270. var SHARED = '__core-js_shared__';
  271. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  272. var sharedStore = store$1;
  273. var functionToString = Function.toString;
  274. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  275. if (typeof sharedStore.inspectSource != 'function') {
  276. sharedStore.inspectSource = function (it) {
  277. return functionToString.call(it);
  278. };
  279. }
  280. var inspectSource = sharedStore.inspectSource;
  281. var WeakMap$1 = global_1.WeakMap;
  282. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  283. var shared = createCommonjsModule(function (module) {
  284. (module.exports = function (key, value) {
  285. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  286. })('versions', []).push({
  287. version: '3.9.1',
  288. mode: 'global',
  289. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  290. });
  291. });
  292. var id = 0;
  293. var postfix = Math.random();
  294. var uid = function (key) {
  295. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  296. };
  297. var keys = shared('keys');
  298. var sharedKey = function (key) {
  299. return keys[key] || (keys[key] = uid(key));
  300. };
  301. var hiddenKeys$1 = {};
  302. var WeakMap = global_1.WeakMap;
  303. var set, get, has;
  304. var enforce = function (it) {
  305. return has(it) ? get(it) : set(it, {});
  306. };
  307. var getterFor = function (TYPE) {
  308. return function (it) {
  309. var state;
  310. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  311. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  312. } return state;
  313. };
  314. };
  315. if (nativeWeakMap) {
  316. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  317. var wmget = store.get;
  318. var wmhas = store.has;
  319. var wmset = store.set;
  320. set = function (it, metadata) {
  321. metadata.facade = it;
  322. wmset.call(store, it, metadata);
  323. return metadata;
  324. };
  325. get = function (it) {
  326. return wmget.call(store, it) || {};
  327. };
  328. has = function (it) {
  329. return wmhas.call(store, it);
  330. };
  331. } else {
  332. var STATE = sharedKey('state');
  333. hiddenKeys$1[STATE] = true;
  334. set = function (it, metadata) {
  335. metadata.facade = it;
  336. createNonEnumerableProperty(it, STATE, metadata);
  337. return metadata;
  338. };
  339. get = function (it) {
  340. return has$1(it, STATE) ? it[STATE] : {};
  341. };
  342. has = function (it) {
  343. return has$1(it, STATE);
  344. };
  345. }
  346. var internalState = {
  347. set: set,
  348. get: get,
  349. has: has,
  350. enforce: enforce,
  351. getterFor: getterFor
  352. };
  353. var redefine = createCommonjsModule(function (module) {
  354. var getInternalState = internalState.get;
  355. var enforceInternalState = internalState.enforce;
  356. var TEMPLATE = String(String).split('String');
  357. (module.exports = function (O, key, value, options) {
  358. var unsafe = options ? !!options.unsafe : false;
  359. var simple = options ? !!options.enumerable : false;
  360. var noTargetGet = options ? !!options.noTargetGet : false;
  361. var state;
  362. if (typeof value == 'function') {
  363. if (typeof key == 'string' && !has$1(value, 'name')) {
  364. createNonEnumerableProperty(value, 'name', key);
  365. }
  366. state = enforceInternalState(value);
  367. if (!state.source) {
  368. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  369. }
  370. }
  371. if (O === global_1) {
  372. if (simple) O[key] = value;
  373. else setGlobal(key, value);
  374. return;
  375. } else if (!unsafe) {
  376. delete O[key];
  377. } else if (!noTargetGet && O[key]) {
  378. simple = true;
  379. }
  380. if (simple) O[key] = value;
  381. else createNonEnumerableProperty(O, key, value);
  382. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  383. })(Function.prototype, 'toString', function toString() {
  384. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  385. });
  386. });
  387. var path = global_1;
  388. var aFunction = function (variable) {
  389. return typeof variable == 'function' ? variable : undefined;
  390. };
  391. var getBuiltIn = function (namespace, method) {
  392. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
  393. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  394. };
  395. var ceil = Math.ceil;
  396. var floor$1 = Math.floor;
  397. // `ToInteger` abstract operation
  398. // https://tc39.es/ecma262/#sec-tointeger
  399. var toInteger = function (argument) {
  400. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor$1 : ceil)(argument);
  401. };
  402. var min$2 = Math.min;
  403. // `ToLength` abstract operation
  404. // https://tc39.es/ecma262/#sec-tolength
  405. var toLength = function (argument) {
  406. return argument > 0 ? min$2(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  407. };
  408. var max$1 = Math.max;
  409. var min$1 = Math.min;
  410. // Helper for a popular repeating case of the spec:
  411. // Let integer be ? ToInteger(index).
  412. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  413. var toAbsoluteIndex = function (index, length) {
  414. var integer = toInteger(index);
  415. return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
  416. };
  417. // `Array.prototype.{ indexOf, includes }` methods implementation
  418. var createMethod$1 = function (IS_INCLUDES) {
  419. return function ($this, el, fromIndex) {
  420. var O = toIndexedObject($this);
  421. var length = toLength(O.length);
  422. var index = toAbsoluteIndex(fromIndex, length);
  423. var value;
  424. // Array#includes uses SameValueZero equality algorithm
  425. // eslint-disable-next-line no-self-compare -- NaN check
  426. if (IS_INCLUDES && el != el) while (length > index) {
  427. value = O[index++];
  428. // eslint-disable-next-line no-self-compare -- NaN check
  429. if (value != value) return true;
  430. // Array#indexOf ignores holes, Array#includes - not
  431. } else for (;length > index; index++) {
  432. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  433. } return !IS_INCLUDES && -1;
  434. };
  435. };
  436. var arrayIncludes = {
  437. // `Array.prototype.includes` method
  438. // https://tc39.es/ecma262/#sec-array.prototype.includes
  439. includes: createMethod$1(true),
  440. // `Array.prototype.indexOf` method
  441. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  442. indexOf: createMethod$1(false)
  443. };
  444. var indexOf = arrayIncludes.indexOf;
  445. var objectKeysInternal = function (object, names) {
  446. var O = toIndexedObject(object);
  447. var i = 0;
  448. var result = [];
  449. var key;
  450. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  451. // Don't enum bug & hidden keys
  452. while (names.length > i) if (has$1(O, key = names[i++])) {
  453. ~indexOf(result, key) || result.push(key);
  454. }
  455. return result;
  456. };
  457. // IE8- don't enum bug keys
  458. var enumBugKeys = [
  459. 'constructor',
  460. 'hasOwnProperty',
  461. 'isPrototypeOf',
  462. 'propertyIsEnumerable',
  463. 'toLocaleString',
  464. 'toString',
  465. 'valueOf'
  466. ];
  467. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  468. // `Object.getOwnPropertyNames` method
  469. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  470. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  471. return objectKeysInternal(O, hiddenKeys);
  472. };
  473. var objectGetOwnPropertyNames = {
  474. f: f$1
  475. };
  476. var f = Object.getOwnPropertySymbols;
  477. var objectGetOwnPropertySymbols = {
  478. f: f
  479. };
  480. // all object keys, includes non-enumerable and symbols
  481. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  482. var keys = objectGetOwnPropertyNames.f(anObject(it));
  483. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  484. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  485. };
  486. var copyConstructorProperties = function (target, source) {
  487. var keys = ownKeys(source);
  488. var defineProperty = objectDefineProperty.f;
  489. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  490. for (var i = 0; i < keys.length; i++) {
  491. var key = keys[i];
  492. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  493. }
  494. };
  495. var replacement = /#|\.prototype\./;
  496. var isForced = function (feature, detection) {
  497. var value = data[normalize(feature)];
  498. return value == POLYFILL ? true
  499. : value == NATIVE ? false
  500. : typeof detection == 'function' ? fails(detection)
  501. : !!detection;
  502. };
  503. var normalize = isForced.normalize = function (string) {
  504. return String(string).replace(replacement, '.').toLowerCase();
  505. };
  506. var data = isForced.data = {};
  507. var NATIVE = isForced.NATIVE = 'N';
  508. var POLYFILL = isForced.POLYFILL = 'P';
  509. var isForced_1 = isForced;
  510. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  511. /*
  512. options.target - name of the target object
  513. options.global - target is the global object
  514. options.stat - export as static methods of target
  515. options.proto - export as prototype methods of target
  516. options.real - real prototype method for the `pure` version
  517. options.forced - export even if the native feature is available
  518. options.bind - bind methods to the target, required for the `pure` version
  519. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  520. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  521. options.sham - add a flag to not completely full polyfills
  522. options.enumerable - export as enumerable property
  523. options.noTargetGet - prevent calling a getter on target
  524. */
  525. var _export = function (options, source) {
  526. var TARGET = options.target;
  527. var GLOBAL = options.global;
  528. var STATIC = options.stat;
  529. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  530. if (GLOBAL) {
  531. target = global_1;
  532. } else if (STATIC) {
  533. target = global_1[TARGET] || setGlobal(TARGET, {});
  534. } else {
  535. target = (global_1[TARGET] || {}).prototype;
  536. }
  537. if (target) for (key in source) {
  538. sourceProperty = source[key];
  539. if (options.noTargetGet) {
  540. descriptor = getOwnPropertyDescriptor(target, key);
  541. targetProperty = descriptor && descriptor.value;
  542. } else targetProperty = target[key];
  543. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  544. // contained in target
  545. if (!FORCED && targetProperty !== undefined) {
  546. if (typeof sourceProperty === typeof targetProperty) continue;
  547. copyConstructorProperties(sourceProperty, targetProperty);
  548. }
  549. // add a flag to not completely full polyfills
  550. if (options.sham || (targetProperty && targetProperty.sham)) {
  551. createNonEnumerableProperty(sourceProperty, 'sham', true);
  552. }
  553. // extend global
  554. redefine(target, key, sourceProperty, options);
  555. }
  556. };
  557. // `RegExp.prototype.flags` getter implementation
  558. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  559. var regexpFlags = function () {
  560. var that = anObject(this);
  561. var result = '';
  562. if (that.global) result += 'g';
  563. if (that.ignoreCase) result += 'i';
  564. if (that.multiline) result += 'm';
  565. if (that.dotAll) result += 's';
  566. if (that.unicode) result += 'u';
  567. if (that.sticky) result += 'y';
  568. return result;
  569. };
  570. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  571. // so we use an intermediate function.
  572. function RE(s, f) {
  573. return RegExp(s, f);
  574. }
  575. var UNSUPPORTED_Y$1 = fails(function () {
  576. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  577. var re = RE('a', 'y');
  578. re.lastIndex = 2;
  579. return re.exec('abcd') != null;
  580. });
  581. var BROKEN_CARET = fails(function () {
  582. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  583. var re = RE('^r', 'gy');
  584. re.lastIndex = 2;
  585. return re.exec('str') != null;
  586. });
  587. var regexpStickyHelpers = {
  588. UNSUPPORTED_Y: UNSUPPORTED_Y$1,
  589. BROKEN_CARET: BROKEN_CARET
  590. };
  591. var nativeExec = RegExp.prototype.exec;
  592. // This always refers to the native implementation, because the
  593. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  594. // which loads this file before patching the method.
  595. var nativeReplace = String.prototype.replace;
  596. var patchedExec = nativeExec;
  597. var UPDATES_LAST_INDEX_WRONG = (function () {
  598. var re1 = /a/;
  599. var re2 = /b*/g;
  600. nativeExec.call(re1, 'a');
  601. nativeExec.call(re2, 'a');
  602. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  603. })();
  604. var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
  605. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  606. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  607. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  608. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  609. if (PATCH) {
  610. patchedExec = function exec(str) {
  611. var re = this;
  612. var lastIndex, reCopy, match, i;
  613. var sticky = UNSUPPORTED_Y && re.sticky;
  614. var flags = regexpFlags.call(re);
  615. var source = re.source;
  616. var charsAdded = 0;
  617. var strCopy = str;
  618. if (sticky) {
  619. flags = flags.replace('y', '');
  620. if (flags.indexOf('g') === -1) {
  621. flags += 'g';
  622. }
  623. strCopy = String(str).slice(re.lastIndex);
  624. // Support anchored sticky behavior.
  625. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  626. source = '(?: ' + source + ')';
  627. strCopy = ' ' + strCopy;
  628. charsAdded++;
  629. }
  630. // ^(? + rx + ) is needed, in combination with some str slicing, to
  631. // simulate the 'y' flag.
  632. reCopy = new RegExp('^(?:' + source + ')', flags);
  633. }
  634. if (NPCG_INCLUDED) {
  635. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  636. }
  637. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  638. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  639. if (sticky) {
  640. if (match) {
  641. match.input = match.input.slice(charsAdded);
  642. match[0] = match[0].slice(charsAdded);
  643. match.index = re.lastIndex;
  644. re.lastIndex += match[0].length;
  645. } else re.lastIndex = 0;
  646. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  647. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  648. }
  649. if (NPCG_INCLUDED && match && match.length > 1) {
  650. // Fix browsers whose `exec` methods don't consistently return `undefined`
  651. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  652. nativeReplace.call(match[0], reCopy, function () {
  653. for (i = 1; i < arguments.length - 2; i++) {
  654. if (arguments[i] === undefined) match[i] = undefined;
  655. }
  656. });
  657. }
  658. return match;
  659. };
  660. }
  661. var regexpExec = patchedExec;
  662. // `RegExp.prototype.exec` method
  663. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  664. _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
  665. exec: regexpExec
  666. });
  667. var engineIsNode = classofRaw(global_1.process) == 'process';
  668. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  669. var process = global_1.process;
  670. var versions = process && process.versions;
  671. var v8 = versions && versions.v8;
  672. var match, version;
  673. if (v8) {
  674. match = v8.split('.');
  675. version = match[0] + match[1];
  676. } else if (engineUserAgent) {
  677. match = engineUserAgent.match(/Edge\/(\d+)/);
  678. if (!match || match[1] >= 74) {
  679. match = engineUserAgent.match(/Chrome\/(\d+)/);
  680. if (match) version = match[1];
  681. }
  682. }
  683. var engineV8Version = version && +version;
  684. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  685. /* global Symbol -- required for testing */
  686. return !Symbol.sham &&
  687. // Chrome 38 Symbol has incorrect toString conversion
  688. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  689. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  690. });
  691. var useSymbolAsUid = nativeSymbol
  692. /* global Symbol -- safe */
  693. && !Symbol.sham
  694. && typeof Symbol.iterator == 'symbol';
  695. var WellKnownSymbolsStore = shared('wks');
  696. var Symbol$1 = global_1.Symbol;
  697. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  698. var wellKnownSymbol = function (name) {
  699. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  700. if (nativeSymbol && has$1(Symbol$1, name)) {
  701. WellKnownSymbolsStore[name] = Symbol$1[name];
  702. } else {
  703. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  704. }
  705. } return WellKnownSymbolsStore[name];
  706. };
  707. // TODO: Remove from `core-js@4` since it's moved to entry points
  708. var SPECIES$2 = wellKnownSymbol('species');
  709. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  710. // #replace needs built-in support for named groups.
  711. // #match works fine because it just return the exec results, even if it has
  712. // a "grops" property.
  713. var re = /./;
  714. re.exec = function () {
  715. var result = [];
  716. result.groups = { a: '7' };
  717. return result;
  718. };
  719. return ''.replace(re, '$<a>') !== '7';
  720. });
  721. // IE <= 11 replaces $0 with the whole match, as if it was $&
  722. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  723. var REPLACE_KEEPS_$0 = (function () {
  724. return 'a'.replace(/./, '$0') === '$0';
  725. })();
  726. var REPLACE = wellKnownSymbol('replace');
  727. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  728. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  729. if (/./[REPLACE]) {
  730. return /./[REPLACE]('a', '$0') === '';
  731. }
  732. return false;
  733. })();
  734. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  735. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  736. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  737. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  738. var re = /(?:)/;
  739. var originalExec = re.exec;
  740. re.exec = function () { return originalExec.apply(this, arguments); };
  741. var result = 'ab'.split(re);
  742. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  743. });
  744. var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
  745. var SYMBOL = wellKnownSymbol(KEY);
  746. var DELEGATES_TO_SYMBOL = !fails(function () {
  747. // String methods call symbol-named RegEp methods
  748. var O = {};
  749. O[SYMBOL] = function () { return 7; };
  750. return ''[KEY](O) != 7;
  751. });
  752. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  753. // Symbol-named RegExp methods call .exec
  754. var execCalled = false;
  755. var re = /a/;
  756. if (KEY === 'split') {
  757. // We can't use real regex here since it causes deoptimization
  758. // and serious performance degradation in V8
  759. // https://github.com/zloirock/core-js/issues/306
  760. re = {};
  761. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  762. // a new one. We need to return the patched regex when creating the new one.
  763. re.constructor = {};
  764. re.constructor[SPECIES$2] = function () { return re; };
  765. re.flags = '';
  766. re[SYMBOL] = /./[SYMBOL];
  767. }
  768. re.exec = function () { execCalled = true; return null; };
  769. re[SYMBOL]('');
  770. return !execCalled;
  771. });
  772. if (
  773. !DELEGATES_TO_SYMBOL ||
  774. !DELEGATES_TO_EXEC ||
  775. (KEY === 'replace' && !(
  776. REPLACE_SUPPORTS_NAMED_GROUPS &&
  777. REPLACE_KEEPS_$0 &&
  778. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  779. )) ||
  780. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  781. ) {
  782. var nativeRegExpMethod = /./[SYMBOL];
  783. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  784. if (regexp.exec === regexpExec) {
  785. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  786. // The native String method already delegates to @@method (this
  787. // polyfilled function), leasing to infinite recursion.
  788. // We avoid it by directly calling the native @@method method.
  789. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  790. }
  791. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  792. }
  793. return { done: false };
  794. }, {
  795. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  796. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  797. });
  798. var stringMethod = methods[0];
  799. var regexMethod = methods[1];
  800. redefine(String.prototype, KEY, stringMethod);
  801. redefine(RegExp.prototype, SYMBOL, length == 2
  802. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  803. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  804. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  805. // 21.2.5.6 RegExp.prototype[@@match](string)
  806. // 21.2.5.9 RegExp.prototype[@@search](string)
  807. : function (string) { return regexMethod.call(string, this); }
  808. );
  809. }
  810. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  811. };
  812. // `String.prototype.{ codePointAt, at }` methods implementation
  813. var createMethod = function (CONVERT_TO_STRING) {
  814. return function ($this, pos) {
  815. var S = String(requireObjectCoercible($this));
  816. var position = toInteger(pos);
  817. var size = S.length;
  818. var first, second;
  819. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  820. first = S.charCodeAt(position);
  821. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  822. || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
  823. ? CONVERT_TO_STRING ? S.charAt(position) : first
  824. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  825. };
  826. };
  827. var stringMultibyte = {
  828. // `String.prototype.codePointAt` method
  829. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  830. codeAt: createMethod(false),
  831. // `String.prototype.at` method
  832. // https://github.com/mathiasbynens/String.prototype.at
  833. charAt: createMethod(true)
  834. };
  835. var charAt = stringMultibyte.charAt;
  836. // `AdvanceStringIndex` abstract operation
  837. // https://tc39.es/ecma262/#sec-advancestringindex
  838. var advanceStringIndex = function (S, index, unicode) {
  839. return index + (unicode ? charAt(S, index).length : 1);
  840. };
  841. // `ToObject` abstract operation
  842. // https://tc39.es/ecma262/#sec-toobject
  843. var toObject = function (argument) {
  844. return Object(requireObjectCoercible(argument));
  845. };
  846. var floor = Math.floor;
  847. var replace = ''.replace;
  848. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  849. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  850. // https://tc39.es/ecma262/#sec-getsubstitution
  851. var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  852. var tailPos = position + matched.length;
  853. var m = captures.length;
  854. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  855. if (namedCaptures !== undefined) {
  856. namedCaptures = toObject(namedCaptures);
  857. symbols = SUBSTITUTION_SYMBOLS;
  858. }
  859. return replace.call(replacement, symbols, function (match, ch) {
  860. var capture;
  861. switch (ch.charAt(0)) {
  862. case '$': return '$';
  863. case '&': return matched;
  864. case '`': return str.slice(0, position);
  865. case "'": return str.slice(tailPos);
  866. case '<':
  867. capture = namedCaptures[ch.slice(1, -1)];
  868. break;
  869. default: // \d\d?
  870. var n = +ch;
  871. if (n === 0) return match;
  872. if (n > m) {
  873. var f = floor(n / 10);
  874. if (f === 0) return match;
  875. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  876. return match;
  877. }
  878. capture = captures[n - 1];
  879. }
  880. return capture === undefined ? '' : capture;
  881. });
  882. };
  883. // `RegExpExec` abstract operation
  884. // https://tc39.es/ecma262/#sec-regexpexec
  885. var regexpExecAbstract = function (R, S) {
  886. var exec = R.exec;
  887. if (typeof exec === 'function') {
  888. var result = exec.call(R, S);
  889. if (typeof result !== 'object') {
  890. throw TypeError('RegExp exec method returned something other than an Object or null');
  891. }
  892. return result;
  893. }
  894. if (classofRaw(R) !== 'RegExp') {
  895. throw TypeError('RegExp#exec called on incompatible receiver');
  896. }
  897. return regexpExec.call(R, S);
  898. };
  899. var max = Math.max;
  900. var min = Math.min;
  901. var maybeToString = function (it) {
  902. return it === undefined ? it : String(it);
  903. };
  904. // @@replace logic
  905. fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
  906. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
  907. var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
  908. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  909. return [
  910. // `String.prototype.replace` method
  911. // https://tc39.es/ecma262/#sec-string.prototype.replace
  912. function replace(searchValue, replaceValue) {
  913. var O = requireObjectCoercible(this);
  914. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  915. return replacer !== undefined
  916. ? replacer.call(searchValue, O, replaceValue)
  917. : nativeReplace.call(String(O), searchValue, replaceValue);
  918. },
  919. // `RegExp.prototype[@@replace]` method
  920. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  921. function (regexp, replaceValue) {
  922. if (
  923. (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
  924. (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
  925. ) {
  926. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  927. if (res.done) return res.value;
  928. }
  929. var rx = anObject(regexp);
  930. var S = String(this);
  931. var functionalReplace = typeof replaceValue === 'function';
  932. if (!functionalReplace) replaceValue = String(replaceValue);
  933. var global = rx.global;
  934. if (global) {
  935. var fullUnicode = rx.unicode;
  936. rx.lastIndex = 0;
  937. }
  938. var results = [];
  939. while (true) {
  940. var result = regexpExecAbstract(rx, S);
  941. if (result === null) break;
  942. results.push(result);
  943. if (!global) break;
  944. var matchStr = String(result[0]);
  945. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  946. }
  947. var accumulatedResult = '';
  948. var nextSourcePosition = 0;
  949. for (var i = 0; i < results.length; i++) {
  950. result = results[i];
  951. var matched = String(result[0]);
  952. var position = max(min(toInteger(result.index), S.length), 0);
  953. var captures = [];
  954. // NOTE: This is equivalent to
  955. // captures = result.slice(1).map(maybeToString)
  956. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  957. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  958. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  959. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  960. var namedCaptures = result.groups;
  961. if (functionalReplace) {
  962. var replacerArgs = [matched].concat(captures, position, S);
  963. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  964. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  965. } else {
  966. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  967. }
  968. if (position >= nextSourcePosition) {
  969. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  970. nextSourcePosition = position + matched.length;
  971. }
  972. }
  973. return accumulatedResult + S.slice(nextSourcePosition);
  974. }
  975. ];
  976. });
  977. // `IsArray` abstract operation
  978. // https://tc39.es/ecma262/#sec-isarray
  979. var isArray = Array.isArray || function isArray(arg) {
  980. return classofRaw(arg) == 'Array';
  981. };
  982. var createProperty = function (object, key, value) {
  983. var propertyKey = toPrimitive(key);
  984. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  985. else object[propertyKey] = value;
  986. };
  987. var SPECIES$1 = wellKnownSymbol('species');
  988. // `ArraySpeciesCreate` abstract operation
  989. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  990. var arraySpeciesCreate = function (originalArray, length) {
  991. var C;
  992. if (isArray(originalArray)) {
  993. C = originalArray.constructor;
  994. // cross-realm fallback
  995. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  996. else if (isObject(C)) {
  997. C = C[SPECIES$1];
  998. if (C === null) C = undefined;
  999. }
  1000. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  1001. };
  1002. var SPECIES = wellKnownSymbol('species');
  1003. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1004. // We can't use this feature detection in V8 since it causes
  1005. // deoptimization and serious performance degradation
  1006. // https://github.com/zloirock/core-js/issues/677
  1007. return engineV8Version >= 51 || !fails(function () {
  1008. var array = [];
  1009. var constructor = array.constructor = {};
  1010. constructor[SPECIES] = function () {
  1011. return { foo: 1 };
  1012. };
  1013. return array[METHOD_NAME](Boolean).foo !== 1;
  1014. });
  1015. };
  1016. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1017. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1018. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1019. // We can't use this feature detection in V8 since it causes
  1020. // deoptimization and serious performance degradation
  1021. // https://github.com/zloirock/core-js/issues/679
  1022. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1023. var array = [];
  1024. array[IS_CONCAT_SPREADABLE] = false;
  1025. return array.concat()[0] !== array;
  1026. });
  1027. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1028. var isConcatSpreadable = function (O) {
  1029. if (!isObject(O)) return false;
  1030. var spreadable = O[IS_CONCAT_SPREADABLE];
  1031. return spreadable !== undefined ? !!spreadable : isArray(O);
  1032. };
  1033. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1034. // `Array.prototype.concat` method
  1035. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1036. // with adding support of @@isConcatSpreadable and @@species
  1037. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1038. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1039. concat: function concat(arg) {
  1040. var O = toObject(this);
  1041. var A = arraySpeciesCreate(O, 0);
  1042. var n = 0;
  1043. var i, k, length, len, E;
  1044. for (i = -1, length = arguments.length; i < length; i++) {
  1045. E = i === -1 ? O : arguments[i];
  1046. if (isConcatSpreadable(E)) {
  1047. len = toLength(E.length);
  1048. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1049. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1050. } else {
  1051. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1052. createProperty(A, n++, E);
  1053. }
  1054. }
  1055. A.length = n;
  1056. return A;
  1057. }
  1058. });
  1059. var $ = window.jQuery;
  1060. var deepCopy = function deepCopy(arg) {
  1061. if (arg === undefined) {
  1062. return arg;
  1063. }
  1064. return $.extend(true, Array.isArray(arg) ? [] : {}, arg);
  1065. };
  1066. var script = {
  1067. name: 'BootstrapTable',
  1068. props: {
  1069. columns: {
  1070. type: Array,
  1071. require: true
  1072. },
  1073. data: {
  1074. type: [Array, Object],
  1075. default: function _default() {
  1076. return undefined;
  1077. }
  1078. },
  1079. options: {
  1080. type: Object,
  1081. default: function _default() {
  1082. return {};
  1083. }
  1084. }
  1085. },
  1086. mounted: function mounted() {
  1087. var _this = this;
  1088. this.$table = $(this.$el);
  1089. this.$table.on('all.bs.table', function (e, name, args) {
  1090. var eventName = $.fn.bootstrapTable.events[name];
  1091. eventName = eventName.replace(/([A-Z])/g, '-$1').toLowerCase();
  1092. _this.$emit.apply(_this, ['on-all'].concat(_toConsumableArray(args)));
  1093. _this.$emit.apply(_this, [eventName].concat(_toConsumableArray(args)));
  1094. });
  1095. this._initTable();
  1096. },
  1097. methods: _objectSpread2({
  1098. _initTable: function _initTable() {
  1099. var options = _objectSpread2(_objectSpread2({}, deepCopy(this.options)), {}, {
  1100. columns: deepCopy(this.columns),
  1101. data: deepCopy(this.data)
  1102. });
  1103. if (!this._hasInit) {
  1104. this.$table.bootstrapTable(options);
  1105. this._hasInit = true;
  1106. } else {
  1107. this.refreshOptions(options);
  1108. }
  1109. }
  1110. }, function () {
  1111. var res = {};
  1112. var _iterator = _createForOfIteratorHelper($.fn.bootstrapTable.methods),
  1113. _step;
  1114. try {
  1115. var _loop = function _loop() {
  1116. var method = _step.value;
  1117. res[method] = function () {
  1118. var _this$$table;
  1119. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1120. args[_key] = arguments[_key];
  1121. }
  1122. return (_this$$table = this.$table).bootstrapTable.apply(_this$$table, [method].concat(args));
  1123. };
  1124. };
  1125. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1126. _loop();
  1127. }
  1128. } catch (err) {
  1129. _iterator.e(err);
  1130. } finally {
  1131. _iterator.f();
  1132. }
  1133. return res;
  1134. }()),
  1135. watch: {
  1136. options: {
  1137. handler: function handler() {
  1138. this._initTable();
  1139. },
  1140. deep: true
  1141. },
  1142. columns: {
  1143. handler: function handler() {
  1144. this._initTable();
  1145. },
  1146. deep: true
  1147. },
  1148. data: {
  1149. handler: function handler() {
  1150. this.load(deepCopy(this.data));
  1151. },
  1152. deep: true
  1153. }
  1154. }
  1155. };
  1156. function render(_ctx, _cache, $props, $setup, $data, $options) {
  1157. return openBlock(), createBlock("table");
  1158. }
  1159. script.render = render;
  1160. script.__file = "src/vue/BootstrapTable.vue";
  1161. export default script;