bootstrap-table-semantic.js 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = global || self, factory(global.jQuery));
  5. }(this, (function ($) { 'use strict';
  6. $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
  7. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  8. function createCommonjsModule(fn, module) {
  9. return module = { exports: {} }, fn(module, module.exports), module.exports;
  10. }
  11. var check = function (it) {
  12. return it && it.Math == Math && it;
  13. };
  14. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  15. var global_1 =
  16. // eslint-disable-next-line no-undef
  17. check(typeof globalThis == 'object' && globalThis) ||
  18. check(typeof window == 'object' && window) ||
  19. check(typeof self == 'object' && self) ||
  20. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  21. // eslint-disable-next-line no-new-func
  22. Function('return this')();
  23. var fails = function (exec) {
  24. try {
  25. return !!exec();
  26. } catch (error) {
  27. return true;
  28. }
  29. };
  30. // Thank's IE8 for his funny defineProperty
  31. var descriptors = !fails(function () {
  32. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  33. });
  34. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  35. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  36. // Nashorn ~ JDK8 bug
  37. var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  38. // `Object.prototype.propertyIsEnumerable` method implementation
  39. // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
  40. var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  41. var descriptor = getOwnPropertyDescriptor(this, V);
  42. return !!descriptor && descriptor.enumerable;
  43. } : nativePropertyIsEnumerable;
  44. var objectPropertyIsEnumerable = {
  45. f: f
  46. };
  47. var createPropertyDescriptor = function (bitmap, value) {
  48. return {
  49. enumerable: !(bitmap & 1),
  50. configurable: !(bitmap & 2),
  51. writable: !(bitmap & 4),
  52. value: value
  53. };
  54. };
  55. var toString = {}.toString;
  56. var classofRaw = function (it) {
  57. return toString.call(it).slice(8, -1);
  58. };
  59. var split = ''.split;
  60. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  61. var indexedObject = fails(function () {
  62. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  63. // eslint-disable-next-line no-prototype-builtins
  64. return !Object('z').propertyIsEnumerable(0);
  65. }) ? function (it) {
  66. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  67. } : Object;
  68. // `RequireObjectCoercible` abstract operation
  69. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  70. var requireObjectCoercible = function (it) {
  71. if (it == undefined) throw TypeError("Can't call method on " + it);
  72. return it;
  73. };
  74. // toObject with fallback for non-array-like ES3 strings
  75. var toIndexedObject = function (it) {
  76. return indexedObject(requireObjectCoercible(it));
  77. };
  78. var isObject = function (it) {
  79. return typeof it === 'object' ? it !== null : typeof it === 'function';
  80. };
  81. // `ToPrimitive` abstract operation
  82. // https://tc39.github.io/ecma262/#sec-toprimitive
  83. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  84. // and the second argument - flag - preferred type is a string
  85. var toPrimitive = function (input, PREFERRED_STRING) {
  86. if (!isObject(input)) return input;
  87. var fn, val;
  88. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  89. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  90. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  91. throw TypeError("Can't convert object to primitive value");
  92. };
  93. var hasOwnProperty = {}.hasOwnProperty;
  94. var has = function (it, key) {
  95. return hasOwnProperty.call(it, key);
  96. };
  97. var document$1 = global_1.document;
  98. // typeof document.createElement is 'object' in old IE
  99. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  100. var documentCreateElement = function (it) {
  101. return EXISTS ? document$1.createElement(it) : {};
  102. };
  103. // Thank's IE8 for his funny defineProperty
  104. var ie8DomDefine = !descriptors && !fails(function () {
  105. return Object.defineProperty(documentCreateElement('div'), 'a', {
  106. get: function () { return 7; }
  107. }).a != 7;
  108. });
  109. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  110. // `Object.getOwnPropertyDescriptor` method
  111. // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
  112. var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  113. O = toIndexedObject(O);
  114. P = toPrimitive(P, true);
  115. if (ie8DomDefine) try {
  116. return nativeGetOwnPropertyDescriptor(O, P);
  117. } catch (error) { /* empty */ }
  118. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  119. };
  120. var objectGetOwnPropertyDescriptor = {
  121. f: f$1
  122. };
  123. var anObject = function (it) {
  124. if (!isObject(it)) {
  125. throw TypeError(String(it) + ' is not an object');
  126. } return it;
  127. };
  128. var nativeDefineProperty = Object.defineProperty;
  129. // `Object.defineProperty` method
  130. // https://tc39.github.io/ecma262/#sec-object.defineproperty
  131. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  132. anObject(O);
  133. P = toPrimitive(P, true);
  134. anObject(Attributes);
  135. if (ie8DomDefine) try {
  136. return nativeDefineProperty(O, P, Attributes);
  137. } catch (error) { /* empty */ }
  138. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  139. if ('value' in Attributes) O[P] = Attributes.value;
  140. return O;
  141. };
  142. var objectDefineProperty = {
  143. f: f$2
  144. };
  145. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  146. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  147. } : function (object, key, value) {
  148. object[key] = value;
  149. return object;
  150. };
  151. var setGlobal = function (key, value) {
  152. try {
  153. createNonEnumerableProperty(global_1, key, value);
  154. } catch (error) {
  155. global_1[key] = value;
  156. } return value;
  157. };
  158. var SHARED = '__core-js_shared__';
  159. var store = global_1[SHARED] || setGlobal(SHARED, {});
  160. var sharedStore = store;
  161. var functionToString = Function.toString;
  162. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  163. if (typeof sharedStore.inspectSource != 'function') {
  164. sharedStore.inspectSource = function (it) {
  165. return functionToString.call(it);
  166. };
  167. }
  168. var inspectSource = sharedStore.inspectSource;
  169. var WeakMap = global_1.WeakMap;
  170. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
  171. var shared = createCommonjsModule(function (module) {
  172. (module.exports = function (key, value) {
  173. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  174. })('versions', []).push({
  175. version: '3.6.0',
  176. mode: 'global',
  177. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  178. });
  179. });
  180. var id = 0;
  181. var postfix = Math.random();
  182. var uid = function (key) {
  183. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  184. };
  185. var keys = shared('keys');
  186. var sharedKey = function (key) {
  187. return keys[key] || (keys[key] = uid(key));
  188. };
  189. var hiddenKeys = {};
  190. var WeakMap$1 = global_1.WeakMap;
  191. var set, get, has$1;
  192. var enforce = function (it) {
  193. return has$1(it) ? get(it) : set(it, {});
  194. };
  195. var getterFor = function (TYPE) {
  196. return function (it) {
  197. var state;
  198. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  199. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  200. } return state;
  201. };
  202. };
  203. if (nativeWeakMap) {
  204. var store$1 = new WeakMap$1();
  205. var wmget = store$1.get;
  206. var wmhas = store$1.has;
  207. var wmset = store$1.set;
  208. set = function (it, metadata) {
  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. createNonEnumerableProperty(it, STATE, metadata);
  223. return metadata;
  224. };
  225. get = function (it) {
  226. return has(it, STATE) ? it[STATE] : {};
  227. };
  228. has$1 = function (it) {
  229. return has(it, STATE);
  230. };
  231. }
  232. var internalState = {
  233. set: set,
  234. get: get,
  235. has: has$1,
  236. enforce: enforce,
  237. getterFor: getterFor
  238. };
  239. var redefine = createCommonjsModule(function (module) {
  240. var getInternalState = internalState.get;
  241. var enforceInternalState = internalState.enforce;
  242. var TEMPLATE = String(String).split('String');
  243. (module.exports = function (O, key, value, options) {
  244. var unsafe = options ? !!options.unsafe : false;
  245. var simple = options ? !!options.enumerable : false;
  246. var noTargetGet = options ? !!options.noTargetGet : false;
  247. if (typeof value == 'function') {
  248. if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
  249. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  250. }
  251. if (O === global_1) {
  252. if (simple) O[key] = value;
  253. else setGlobal(key, value);
  254. return;
  255. } else if (!unsafe) {
  256. delete O[key];
  257. } else if (!noTargetGet && O[key]) {
  258. simple = true;
  259. }
  260. if (simple) O[key] = value;
  261. else createNonEnumerableProperty(O, key, value);
  262. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  263. })(Function.prototype, 'toString', function toString() {
  264. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  265. });
  266. });
  267. var path = global_1;
  268. var aFunction = function (variable) {
  269. return typeof variable == 'function' ? variable : undefined;
  270. };
  271. var getBuiltIn = function (namespace, method) {
  272. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
  273. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  274. };
  275. var ceil = Math.ceil;
  276. var floor = Math.floor;
  277. // `ToInteger` abstract operation
  278. // https://tc39.github.io/ecma262/#sec-tointeger
  279. var toInteger = function (argument) {
  280. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  281. };
  282. var min = Math.min;
  283. // `ToLength` abstract operation
  284. // https://tc39.github.io/ecma262/#sec-tolength
  285. var toLength = function (argument) {
  286. return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  287. };
  288. var max = Math.max;
  289. var min$1 = Math.min;
  290. // Helper for a popular repeating case of the spec:
  291. // Let integer be ? ToInteger(index).
  292. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  293. var toAbsoluteIndex = function (index, length) {
  294. var integer = toInteger(index);
  295. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  296. };
  297. // `Array.prototype.{ indexOf, includes }` methods implementation
  298. var createMethod = function (IS_INCLUDES) {
  299. return function ($this, el, fromIndex) {
  300. var O = toIndexedObject($this);
  301. var length = toLength(O.length);
  302. var index = toAbsoluteIndex(fromIndex, length);
  303. var value;
  304. // Array#includes uses SameValueZero equality algorithm
  305. // eslint-disable-next-line no-self-compare
  306. if (IS_INCLUDES && el != el) while (length > index) {
  307. value = O[index++];
  308. // eslint-disable-next-line no-self-compare
  309. if (value != value) return true;
  310. // Array#indexOf ignores holes, Array#includes - not
  311. } else for (;length > index; index++) {
  312. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  313. } return !IS_INCLUDES && -1;
  314. };
  315. };
  316. var arrayIncludes = {
  317. // `Array.prototype.includes` method
  318. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  319. includes: createMethod(true),
  320. // `Array.prototype.indexOf` method
  321. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  322. indexOf: createMethod(false)
  323. };
  324. var indexOf = arrayIncludes.indexOf;
  325. var objectKeysInternal = function (object, names) {
  326. var O = toIndexedObject(object);
  327. var i = 0;
  328. var result = [];
  329. var key;
  330. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  331. // Don't enum bug & hidden keys
  332. while (names.length > i) if (has(O, key = names[i++])) {
  333. ~indexOf(result, key) || result.push(key);
  334. }
  335. return result;
  336. };
  337. // IE8- don't enum bug keys
  338. var enumBugKeys = [
  339. 'constructor',
  340. 'hasOwnProperty',
  341. 'isPrototypeOf',
  342. 'propertyIsEnumerable',
  343. 'toLocaleString',
  344. 'toString',
  345. 'valueOf'
  346. ];
  347. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  348. // `Object.getOwnPropertyNames` method
  349. // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
  350. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  351. return objectKeysInternal(O, hiddenKeys$1);
  352. };
  353. var objectGetOwnPropertyNames = {
  354. f: f$3
  355. };
  356. var f$4 = Object.getOwnPropertySymbols;
  357. var objectGetOwnPropertySymbols = {
  358. f: f$4
  359. };
  360. // all object keys, includes non-enumerable and symbols
  361. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  362. var keys = objectGetOwnPropertyNames.f(anObject(it));
  363. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  364. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  365. };
  366. var copyConstructorProperties = function (target, source) {
  367. var keys = ownKeys(source);
  368. var defineProperty = objectDefineProperty.f;
  369. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  370. for (var i = 0; i < keys.length; i++) {
  371. var key = keys[i];
  372. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  373. }
  374. };
  375. var replacement = /#|\.prototype\./;
  376. var isForced = function (feature, detection) {
  377. var value = data[normalize(feature)];
  378. return value == POLYFILL ? true
  379. : value == NATIVE ? false
  380. : typeof detection == 'function' ? fails(detection)
  381. : !!detection;
  382. };
  383. var normalize = isForced.normalize = function (string) {
  384. return String(string).replace(replacement, '.').toLowerCase();
  385. };
  386. var data = isForced.data = {};
  387. var NATIVE = isForced.NATIVE = 'N';
  388. var POLYFILL = isForced.POLYFILL = 'P';
  389. var isForced_1 = isForced;
  390. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  391. /*
  392. options.target - name of the target object
  393. options.global - target is the global object
  394. options.stat - export as static methods of target
  395. options.proto - export as prototype methods of target
  396. options.real - real prototype method for the `pure` version
  397. options.forced - export even if the native feature is available
  398. options.bind - bind methods to the target, required for the `pure` version
  399. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  400. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  401. options.sham - add a flag to not completely full polyfills
  402. options.enumerable - export as enumerable property
  403. options.noTargetGet - prevent calling a getter on target
  404. */
  405. var _export = function (options, source) {
  406. var TARGET = options.target;
  407. var GLOBAL = options.global;
  408. var STATIC = options.stat;
  409. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  410. if (GLOBAL) {
  411. target = global_1;
  412. } else if (STATIC) {
  413. target = global_1[TARGET] || setGlobal(TARGET, {});
  414. } else {
  415. target = (global_1[TARGET] || {}).prototype;
  416. }
  417. if (target) for (key in source) {
  418. sourceProperty = source[key];
  419. if (options.noTargetGet) {
  420. descriptor = getOwnPropertyDescriptor$1(target, key);
  421. targetProperty = descriptor && descriptor.value;
  422. } else targetProperty = target[key];
  423. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  424. // contained in target
  425. if (!FORCED && targetProperty !== undefined) {
  426. if (typeof sourceProperty === typeof targetProperty) continue;
  427. copyConstructorProperties(sourceProperty, targetProperty);
  428. }
  429. // add a flag to not completely full polyfills
  430. if (options.sham || (targetProperty && targetProperty.sham)) {
  431. createNonEnumerableProperty(sourceProperty, 'sham', true);
  432. }
  433. // extend global
  434. redefine(target, key, sourceProperty, options);
  435. }
  436. };
  437. var aFunction$1 = function (it) {
  438. if (typeof it != 'function') {
  439. throw TypeError(String(it) + ' is not a function');
  440. } return it;
  441. };
  442. // optional / simple context binding
  443. var bindContext = function (fn, that, length) {
  444. aFunction$1(fn);
  445. if (that === undefined) return fn;
  446. switch (length) {
  447. case 0: return function () {
  448. return fn.call(that);
  449. };
  450. case 1: return function (a) {
  451. return fn.call(that, a);
  452. };
  453. case 2: return function (a, b) {
  454. return fn.call(that, a, b);
  455. };
  456. case 3: return function (a, b, c) {
  457. return fn.call(that, a, b, c);
  458. };
  459. }
  460. return function (/* ...args */) {
  461. return fn.apply(that, arguments);
  462. };
  463. };
  464. // `ToObject` abstract operation
  465. // https://tc39.github.io/ecma262/#sec-toobject
  466. var toObject = function (argument) {
  467. return Object(requireObjectCoercible(argument));
  468. };
  469. // `IsArray` abstract operation
  470. // https://tc39.github.io/ecma262/#sec-isarray
  471. var isArray = Array.isArray || function isArray(arg) {
  472. return classofRaw(arg) == 'Array';
  473. };
  474. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  475. // Chrome 38 Symbol has incorrect toString conversion
  476. // eslint-disable-next-line no-undef
  477. return !String(Symbol());
  478. });
  479. var useSymbolAsUid = nativeSymbol
  480. // eslint-disable-next-line no-undef
  481. && !Symbol.sham
  482. // eslint-disable-next-line no-undef
  483. && typeof Symbol() == 'symbol';
  484. var WellKnownSymbolsStore = shared('wks');
  485. var Symbol$1 = global_1.Symbol;
  486. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : uid;
  487. var wellKnownSymbol = function (name) {
  488. if (!has(WellKnownSymbolsStore, name)) {
  489. if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
  490. else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  491. } return WellKnownSymbolsStore[name];
  492. };
  493. var SPECIES = wellKnownSymbol('species');
  494. // `ArraySpeciesCreate` abstract operation
  495. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  496. var arraySpeciesCreate = function (originalArray, length) {
  497. var C;
  498. if (isArray(originalArray)) {
  499. C = originalArray.constructor;
  500. // cross-realm fallback
  501. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  502. else if (isObject(C)) {
  503. C = C[SPECIES];
  504. if (C === null) C = undefined;
  505. }
  506. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  507. };
  508. var push = [].push;
  509. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  510. var createMethod$1 = function (TYPE) {
  511. var IS_MAP = TYPE == 1;
  512. var IS_FILTER = TYPE == 2;
  513. var IS_SOME = TYPE == 3;
  514. var IS_EVERY = TYPE == 4;
  515. var IS_FIND_INDEX = TYPE == 6;
  516. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  517. return function ($this, callbackfn, that, specificCreate) {
  518. var O = toObject($this);
  519. var self = indexedObject(O);
  520. var boundFunction = bindContext(callbackfn, that, 3);
  521. var length = toLength(self.length);
  522. var index = 0;
  523. var create = specificCreate || arraySpeciesCreate;
  524. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  525. var value, result;
  526. for (;length > index; index++) if (NO_HOLES || index in self) {
  527. value = self[index];
  528. result = boundFunction(value, index, O);
  529. if (TYPE) {
  530. if (IS_MAP) target[index] = result; // map
  531. else if (result) switch (TYPE) {
  532. case 3: return true; // some
  533. case 5: return value; // find
  534. case 6: return index; // findIndex
  535. case 2: push.call(target, value); // filter
  536. } else if (IS_EVERY) return false; // every
  537. }
  538. }
  539. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  540. };
  541. };
  542. var arrayIteration = {
  543. // `Array.prototype.forEach` method
  544. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  545. forEach: createMethod$1(0),
  546. // `Array.prototype.map` method
  547. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  548. map: createMethod$1(1),
  549. // `Array.prototype.filter` method
  550. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  551. filter: createMethod$1(2),
  552. // `Array.prototype.some` method
  553. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  554. some: createMethod$1(3),
  555. // `Array.prototype.every` method
  556. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  557. every: createMethod$1(4),
  558. // `Array.prototype.find` method
  559. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  560. find: createMethod$1(5),
  561. // `Array.prototype.findIndex` method
  562. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  563. findIndex: createMethod$1(6)
  564. };
  565. // `Object.keys` method
  566. // https://tc39.github.io/ecma262/#sec-object.keys
  567. var objectKeys = Object.keys || function keys(O) {
  568. return objectKeysInternal(O, enumBugKeys);
  569. };
  570. // `Object.defineProperties` method
  571. // https://tc39.github.io/ecma262/#sec-object.defineproperties
  572. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  573. anObject(O);
  574. var keys = objectKeys(Properties);
  575. var length = keys.length;
  576. var index = 0;
  577. var key;
  578. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  579. return O;
  580. };
  581. var html = getBuiltIn('document', 'documentElement');
  582. var GT = '>';
  583. var LT = '<';
  584. var PROTOTYPE = 'prototype';
  585. var SCRIPT = 'script';
  586. var IE_PROTO = sharedKey('IE_PROTO');
  587. var EmptyConstructor = function () { /* empty */ };
  588. var scriptTag = function (content) {
  589. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  590. };
  591. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  592. var NullProtoObjectViaActiveX = function (activeXDocument) {
  593. activeXDocument.write(scriptTag(''));
  594. activeXDocument.close();
  595. var temp = activeXDocument.parentWindow.Object;
  596. activeXDocument = null; // avoid memory leak
  597. return temp;
  598. };
  599. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  600. var NullProtoObjectViaIFrame = function () {
  601. // Thrash, waste and sodomy: IE GC bug
  602. var iframe = documentCreateElement('iframe');
  603. var JS = 'java' + SCRIPT + ':';
  604. var iframeDocument;
  605. iframe.style.display = 'none';
  606. html.appendChild(iframe);
  607. // https://github.com/zloirock/core-js/issues/475
  608. iframe.src = String(JS);
  609. iframeDocument = iframe.contentWindow.document;
  610. iframeDocument.open();
  611. iframeDocument.write(scriptTag('document.F=Object'));
  612. iframeDocument.close();
  613. return iframeDocument.F;
  614. };
  615. // Check for document.domain and active x support
  616. // No need to use active x approach when document.domain is not set
  617. // see https://github.com/es-shims/es5-shim/issues/150
  618. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  619. // avoid IE GC bug
  620. var activeXDocument;
  621. var NullProtoObject = function () {
  622. try {
  623. /* global ActiveXObject */
  624. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  625. } catch (error) { /* ignore */ }
  626. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  627. var length = enumBugKeys.length;
  628. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  629. return NullProtoObject();
  630. };
  631. hiddenKeys[IE_PROTO] = true;
  632. // `Object.create` method
  633. // https://tc39.github.io/ecma262/#sec-object.create
  634. var objectCreate = Object.create || function create(O, Properties) {
  635. var result;
  636. if (O !== null) {
  637. EmptyConstructor[PROTOTYPE] = anObject(O);
  638. result = new EmptyConstructor();
  639. EmptyConstructor[PROTOTYPE] = null;
  640. // add "__proto__" for Object.getPrototypeOf polyfill
  641. result[IE_PROTO] = O;
  642. } else result = NullProtoObject();
  643. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  644. };
  645. var UNSCOPABLES = wellKnownSymbol('unscopables');
  646. var ArrayPrototype = Array.prototype;
  647. // Array.prototype[@@unscopables]
  648. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  649. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  650. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  651. configurable: true,
  652. value: objectCreate(null)
  653. });
  654. }
  655. // add a key to Array.prototype[@@unscopables]
  656. var addToUnscopables = function (key) {
  657. ArrayPrototype[UNSCOPABLES][key] = true;
  658. };
  659. var $find = arrayIteration.find;
  660. var FIND = 'find';
  661. var SKIPS_HOLES = true;
  662. // Shouldn't skip holes
  663. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  664. // `Array.prototype.find` method
  665. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  666. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  667. find: function find(callbackfn /* , that = undefined */) {
  668. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  669. }
  670. });
  671. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  672. addToUnscopables(FIND);
  673. var $includes = arrayIncludes.includes;
  674. // `Array.prototype.includes` method
  675. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  676. _export({ target: 'Array', proto: true }, {
  677. includes: function includes(el /* , fromIndex = 0 */) {
  678. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  679. }
  680. });
  681. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  682. addToUnscopables('includes');
  683. var MATCH = wellKnownSymbol('match');
  684. // `IsRegExp` abstract operation
  685. // https://tc39.github.io/ecma262/#sec-isregexp
  686. var isRegexp = function (it) {
  687. var isRegExp;
  688. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  689. };
  690. var notARegexp = function (it) {
  691. if (isRegexp(it)) {
  692. throw TypeError("The method doesn't accept regular expressions");
  693. } return it;
  694. };
  695. var MATCH$1 = wellKnownSymbol('match');
  696. var correctIsRegexpLogic = function (METHOD_NAME) {
  697. var regexp = /./;
  698. try {
  699. '/./'[METHOD_NAME](regexp);
  700. } catch (e) {
  701. try {
  702. regexp[MATCH$1] = false;
  703. return '/./'[METHOD_NAME](regexp);
  704. } catch (f) { /* empty */ }
  705. } return false;
  706. };
  707. // `String.prototype.includes` method
  708. // https://tc39.github.io/ecma262/#sec-string.prototype.includes
  709. _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
  710. includes: function includes(searchString /* , position = 0 */) {
  711. return !!~String(requireObjectCoercible(this))
  712. .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  713. }
  714. });
  715. function _classCallCheck(instance, Constructor) {
  716. if (!(instance instanceof Constructor)) {
  717. throw new TypeError("Cannot call a class as a function");
  718. }
  719. }
  720. function _defineProperties(target, props) {
  721. for (var i = 0; i < props.length; i++) {
  722. var descriptor = props[i];
  723. descriptor.enumerable = descriptor.enumerable || false;
  724. descriptor.configurable = true;
  725. if ("value" in descriptor) descriptor.writable = true;
  726. Object.defineProperty(target, descriptor.key, descriptor);
  727. }
  728. }
  729. function _createClass(Constructor, protoProps, staticProps) {
  730. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  731. if (staticProps) _defineProperties(Constructor, staticProps);
  732. return Constructor;
  733. }
  734. function _inherits(subClass, superClass) {
  735. if (typeof superClass !== "function" && superClass !== null) {
  736. throw new TypeError("Super expression must either be null or a function");
  737. }
  738. subClass.prototype = Object.create(superClass && superClass.prototype, {
  739. constructor: {
  740. value: subClass,
  741. writable: true,
  742. configurable: true
  743. }
  744. });
  745. if (superClass) _setPrototypeOf(subClass, superClass);
  746. }
  747. function _getPrototypeOf(o) {
  748. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  749. return o.__proto__ || Object.getPrototypeOf(o);
  750. };
  751. return _getPrototypeOf(o);
  752. }
  753. function _setPrototypeOf(o, p) {
  754. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  755. o.__proto__ = p;
  756. return o;
  757. };
  758. return _setPrototypeOf(o, p);
  759. }
  760. function _assertThisInitialized(self) {
  761. if (self === void 0) {
  762. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  763. }
  764. return self;
  765. }
  766. function _possibleConstructorReturn(self, call) {
  767. if (call && (typeof call === "object" || typeof call === "function")) {
  768. return call;
  769. }
  770. return _assertThisInitialized(self);
  771. }
  772. function _superPropBase(object, property) {
  773. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  774. object = _getPrototypeOf(object);
  775. if (object === null) break;
  776. }
  777. return object;
  778. }
  779. function _get(target, property, receiver) {
  780. if (typeof Reflect !== "undefined" && Reflect.get) {
  781. _get = Reflect.get;
  782. } else {
  783. _get = function _get(target, property, receiver) {
  784. var base = _superPropBase(target, property);
  785. if (!base) return;
  786. var desc = Object.getOwnPropertyDescriptor(base, property);
  787. if (desc.get) {
  788. return desc.get.call(receiver);
  789. }
  790. return desc.value;
  791. };
  792. }
  793. return _get(target, property, receiver || target);
  794. }
  795. /**
  796. * @author zhixin wen <wenzhixin2010@gmail.com>
  797. * https://github.com/wenzhixin/bootstrap-table/
  798. * theme: https://github.com/Semantic-Org/Semantic-UI
  799. */
  800. $.extend($.fn.bootstrapTable.defaults, {
  801. classes: 'ui selectable celled table unstackable',
  802. buttonsPrefix: '',
  803. buttonsClass: 'ui button'
  804. });
  805. $.fn.bootstrapTable.theme = 'semantic';
  806. $.BootstrapTable =
  807. /*#__PURE__*/
  808. function (_$$BootstrapTable) {
  809. _inherits(_class, _$$BootstrapTable);
  810. function _class() {
  811. _classCallCheck(this, _class);
  812. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  813. }
  814. _createClass(_class, [{
  815. key: "initConstants",
  816. value: function initConstants() {
  817. _get(_getPrototypeOf(_class.prototype), "initConstants", this).call(this);
  818. this.constants.classes.buttonsGroup = 'ui buttons';
  819. this.constants.classes.buttonsDropdown = 'ui button dropdown';
  820. this.constants.classes.inputGroup = 'ui input';
  821. this.constants.classes.paginationDropdown = 'ui dropdown';
  822. this.constants.html.toolbarDropdown = ['<div class="menu">', '</div>'];
  823. this.constants.html.toolbarDropdownItem = '<label class="item dropdown-item-marker">%s</label>';
  824. this.constants.html.toolbarDropdownSeparator = '<div class="divider"></div>';
  825. this.constants.html.pageDropdown = ['<div class="menu">', '</div>'];
  826. this.constants.html.pageDropdownItem = '<a class="item %s" href="#">%s</a>';
  827. this.constants.html.dropdownCaret = '<i class="dropdown icon"></i>';
  828. this.constants.html.pagination = ['<div class="ui pagination menu%s">', '</div>'];
  829. this.constants.html.paginationItem = '<a class="page-item item%s" aria-label="%s" href="#">%s</a>';
  830. this.constants.html.inputGroup = '<div class="ui action input">%s%s</div>';
  831. }
  832. }, {
  833. key: "initToolbar",
  834. value: function initToolbar() {
  835. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  836. this.handleToolbar();
  837. }
  838. }, {
  839. key: "handleToolbar",
  840. value: function handleToolbar() {
  841. this.$toolbar.find('.button.dropdown').dropdown();
  842. }
  843. }, {
  844. key: "initPagination",
  845. value: function initPagination() {
  846. _get(_getPrototypeOf(_class.prototype), "initPagination", this).call(this);
  847. if (this.options.pagination && this.paginationParts.includes('pageSize')) {
  848. this.$pagination.find('.dropdown').dropdown();
  849. }
  850. }
  851. }]);
  852. return _class;
  853. }($.BootstrapTable);
  854. })));