bootstrap-table-vue.js 47 KB

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