bootstrap-table-vue.esm.js 46 KB

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