bootstrap-table-mobile.js 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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. $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  7. var toString = {}.toString;
  8. var classofRaw = function (it) {
  9. return toString.call(it).slice(8, -1);
  10. };
  11. // `IsArray` abstract operation
  12. // https://tc39.github.io/ecma262/#sec-isarray
  13. var isArray = Array.isArray || function isArray(arg) {
  14. return classofRaw(arg) == 'Array';
  15. };
  16. var isObject = function (it) {
  17. return typeof it === 'object' ? it !== null : typeof it === 'function';
  18. };
  19. // `RequireObjectCoercible` abstract operation
  20. // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
  21. var requireObjectCoercible = function (it) {
  22. if (it == undefined) throw TypeError("Can't call method on " + it);
  23. return it;
  24. };
  25. // `ToObject` abstract operation
  26. // https://tc39.github.io/ecma262/#sec-toobject
  27. var toObject = function (argument) {
  28. return Object(requireObjectCoercible(argument));
  29. };
  30. var ceil = Math.ceil;
  31. var floor = Math.floor;
  32. // `ToInteger` abstract operation
  33. // https://tc39.github.io/ecma262/#sec-tointeger
  34. var toInteger = function (argument) {
  35. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  36. };
  37. var min = Math.min;
  38. // `ToLength` abstract operation
  39. // https://tc39.github.io/ecma262/#sec-tolength
  40. var toLength = function (argument) {
  41. return argument > 0 ? min(toInteger(argument), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
  42. };
  43. // 7.1.1 ToPrimitive(input [, PreferredType])
  44. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  45. // and the second argument - flag - preferred type is a string
  46. var toPrimitive = function (it, S) {
  47. if (!isObject(it)) return it;
  48. var fn, val;
  49. if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  50. if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
  51. if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
  52. throw TypeError("Can't convert object to primitive value");
  53. };
  54. var fails = function (exec) {
  55. try {
  56. return !!exec();
  57. } catch (e) {
  58. return true;
  59. }
  60. };
  61. // Thank's IE8 for his funny defineProperty
  62. var descriptors = !fails(function () {
  63. return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
  64. });
  65. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  66. var global = typeof window == 'object' && window && window.Math == Math ? window
  67. : typeof self == 'object' && self && self.Math == Math ? self
  68. // eslint-disable-next-line no-new-func
  69. : Function('return this')();
  70. var document = global.document;
  71. // typeof document.createElement is 'object' in old IE
  72. var exist = isObject(document) && isObject(document.createElement);
  73. var documentCreateElement = function (it) {
  74. return exist ? document.createElement(it) : {};
  75. };
  76. // Thank's IE8 for his funny defineProperty
  77. var ie8DomDefine = !descriptors && !fails(function () {
  78. return Object.defineProperty(documentCreateElement('div'), 'a', {
  79. get: function () { return 7; }
  80. }).a != 7;
  81. });
  82. var anObject = function (it) {
  83. if (!isObject(it)) {
  84. throw TypeError(String(it) + ' is not an object');
  85. } return it;
  86. };
  87. var nativeDefineProperty = Object.defineProperty;
  88. var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  89. anObject(O);
  90. P = toPrimitive(P, true);
  91. anObject(Attributes);
  92. if (ie8DomDefine) try {
  93. return nativeDefineProperty(O, P, Attributes);
  94. } catch (e) { /* empty */ }
  95. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  96. if ('value' in Attributes) O[P] = Attributes.value;
  97. return O;
  98. };
  99. var objectDefineProperty = {
  100. f: f
  101. };
  102. var createPropertyDescriptor = function (bitmap, value) {
  103. return {
  104. enumerable: !(bitmap & 1),
  105. configurable: !(bitmap & 2),
  106. writable: !(bitmap & 4),
  107. value: value
  108. };
  109. };
  110. var createProperty = function (object, key, value) {
  111. var propertyKey = toPrimitive(key);
  112. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  113. else object[propertyKey] = value;
  114. };
  115. function createCommonjsModule(fn, module) {
  116. return module = { exports: {} }, fn(module, module.exports), module.exports;
  117. }
  118. var hide = descriptors ? function (object, key, value) {
  119. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  120. } : function (object, key, value) {
  121. object[key] = value;
  122. return object;
  123. };
  124. var setGlobal = function (key, value) {
  125. try {
  126. hide(global, key, value);
  127. } catch (e) {
  128. global[key] = value;
  129. } return value;
  130. };
  131. var shared = createCommonjsModule(function (module) {
  132. var SHARED = '__core-js_shared__';
  133. var store = global[SHARED] || setGlobal(SHARED, {});
  134. (module.exports = function (key, value) {
  135. return store[key] || (store[key] = value !== undefined ? value : {});
  136. })('versions', []).push({
  137. version: '3.0.0',
  138. mode: 'global',
  139. copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
  140. });
  141. });
  142. var id = 0;
  143. var postfix = Math.random();
  144. var uid = function (key) {
  145. return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + postfix).toString(36));
  146. };
  147. // Chrome 38 Symbol has incorrect toString conversion
  148. var nativeSymbol = !fails(function () {
  149. });
  150. var store = shared('wks');
  151. var Symbol = global.Symbol;
  152. var wellKnownSymbol = function (name) {
  153. return store[name] || (store[name] = nativeSymbol && Symbol[name]
  154. || (nativeSymbol ? Symbol : uid)('Symbol.' + name));
  155. };
  156. var SPECIES = wellKnownSymbol('species');
  157. // `ArraySpeciesCreate` abstract operation
  158. // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
  159. var arraySpeciesCreate = function (originalArray, length) {
  160. var C;
  161. if (isArray(originalArray)) {
  162. C = originalArray.constructor;
  163. // cross-realm fallback
  164. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  165. else if (isObject(C)) {
  166. C = C[SPECIES];
  167. if (C === null) C = undefined;
  168. }
  169. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  170. };
  171. var SPECIES$1 = wellKnownSymbol('species');
  172. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  173. return !fails(function () {
  174. var array = [];
  175. var constructor = array.constructor = {};
  176. constructor[SPECIES$1] = function () {
  177. return { foo: 1 };
  178. };
  179. return array[METHOD_NAME](Boolean).foo !== 1;
  180. });
  181. };
  182. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  183. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  184. // Nashorn ~ JDK8 bug
  185. var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  186. var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  187. var descriptor = nativeGetOwnPropertyDescriptor(this, V);
  188. return !!descriptor && descriptor.enumerable;
  189. } : nativePropertyIsEnumerable;
  190. var objectPropertyIsEnumerable = {
  191. f: f$1
  192. };
  193. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  194. var split = ''.split;
  195. var indexedObject = fails(function () {
  196. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  197. // eslint-disable-next-line no-prototype-builtins
  198. return !Object('z').propertyIsEnumerable(0);
  199. }) ? function (it) {
  200. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  201. } : Object;
  202. // toObject with fallback for non-array-like ES3 strings
  203. var toIndexedObject = function (it) {
  204. return indexedObject(requireObjectCoercible(it));
  205. };
  206. var hasOwnProperty = {}.hasOwnProperty;
  207. var has = function (it, key) {
  208. return hasOwnProperty.call(it, key);
  209. };
  210. var nativeGetOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  211. var f$2 = descriptors ? nativeGetOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  212. O = toIndexedObject(O);
  213. P = toPrimitive(P, true);
  214. if (ie8DomDefine) try {
  215. return nativeGetOwnPropertyDescriptor$1(O, P);
  216. } catch (e) { /* empty */ }
  217. if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  218. };
  219. var objectGetOwnPropertyDescriptor = {
  220. f: f$2
  221. };
  222. var functionToString = shared('native-function-to-string', Function.toString);
  223. var WeakMap = global.WeakMap;
  224. var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(functionToString.call(WeakMap));
  225. var shared$1 = shared('keys');
  226. var sharedKey = function (key) {
  227. return shared$1[key] || (shared$1[key] = uid(key));
  228. };
  229. var hiddenKeys = {};
  230. var WeakMap$1 = global.WeakMap;
  231. var set, get, has$1;
  232. var enforce = function (it) {
  233. return has$1(it) ? get(it) : set(it, {});
  234. };
  235. var getterFor = function (TYPE) {
  236. return function (it) {
  237. var state;
  238. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  239. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  240. } return state;
  241. };
  242. };
  243. if (nativeWeakMap) {
  244. var store$1 = new WeakMap$1();
  245. var wmget = store$1.get;
  246. var wmhas = store$1.has;
  247. var wmset = store$1.set;
  248. set = function (it, metadata) {
  249. wmset.call(store$1, it, metadata);
  250. return metadata;
  251. };
  252. get = function (it) {
  253. return wmget.call(store$1, it) || {};
  254. };
  255. has$1 = function (it) {
  256. return wmhas.call(store$1, it);
  257. };
  258. } else {
  259. var STATE = sharedKey('state');
  260. hiddenKeys[STATE] = true;
  261. set = function (it, metadata) {
  262. hide(it, STATE, metadata);
  263. return metadata;
  264. };
  265. get = function (it) {
  266. return has(it, STATE) ? it[STATE] : {};
  267. };
  268. has$1 = function (it) {
  269. return has(it, STATE);
  270. };
  271. }
  272. var internalState = {
  273. set: set,
  274. get: get,
  275. has: has$1,
  276. enforce: enforce,
  277. getterFor: getterFor
  278. };
  279. var redefine = createCommonjsModule(function (module) {
  280. var getInternalState = internalState.get;
  281. var enforceInternalState = internalState.enforce;
  282. var TEMPLATE = String(functionToString).split('toString');
  283. shared('inspectSource', function (it) {
  284. return functionToString.call(it);
  285. });
  286. (module.exports = function (O, key, value, options) {
  287. var unsafe = options ? !!options.unsafe : false;
  288. var simple = options ? !!options.enumerable : false;
  289. var noTargetGet = options ? !!options.noTargetGet : false;
  290. if (typeof value == 'function') {
  291. if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
  292. enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
  293. }
  294. if (O === global) {
  295. if (simple) O[key] = value;
  296. else setGlobal(key, value);
  297. return;
  298. } else if (!unsafe) {
  299. delete O[key];
  300. } else if (!noTargetGet && O[key]) {
  301. simple = true;
  302. }
  303. if (simple) O[key] = value;
  304. else hide(O, key, value);
  305. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  306. })(Function.prototype, 'toString', function toString() {
  307. return typeof this == 'function' && getInternalState(this).source || functionToString.call(this);
  308. });
  309. });
  310. var max = Math.max;
  311. var min$1 = Math.min;
  312. // Helper for a popular repeating case of the spec:
  313. // Let integer be ? ToInteger(index).
  314. // If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
  315. var toAbsoluteIndex = function (index, length) {
  316. var integer = toInteger(index);
  317. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  318. };
  319. // `Array.prototype.{ indexOf, includes }` methods implementation
  320. // false -> Array#indexOf
  321. // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
  322. // true -> Array#includes
  323. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  324. var arrayIncludes = function (IS_INCLUDES) {
  325. return function ($this, el, fromIndex) {
  326. var O = toIndexedObject($this);
  327. var length = toLength(O.length);
  328. var index = toAbsoluteIndex(fromIndex, length);
  329. var value;
  330. // Array#includes uses SameValueZero equality algorithm
  331. // eslint-disable-next-line no-self-compare
  332. if (IS_INCLUDES && el != el) while (length > index) {
  333. value = O[index++];
  334. // eslint-disable-next-line no-self-compare
  335. if (value != value) return true;
  336. // Array#indexOf ignores holes, Array#includes - not
  337. } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
  338. if (O[index] === el) return IS_INCLUDES || index || 0;
  339. } return !IS_INCLUDES && -1;
  340. };
  341. };
  342. var arrayIndexOf = arrayIncludes(false);
  343. var objectKeysInternal = function (object, names) {
  344. var O = toIndexedObject(object);
  345. var i = 0;
  346. var result = [];
  347. var key;
  348. for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
  349. // Don't enum bug & hidden keys
  350. while (names.length > i) if (has(O, key = names[i++])) {
  351. ~arrayIndexOf(result, key) || result.push(key);
  352. }
  353. return result;
  354. };
  355. // IE8- don't enum bug keys
  356. var enumBugKeys = [
  357. 'constructor',
  358. 'hasOwnProperty',
  359. 'isPrototypeOf',
  360. 'propertyIsEnumerable',
  361. 'toLocaleString',
  362. 'toString',
  363. 'valueOf'
  364. ];
  365. // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
  366. var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
  367. var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  368. return objectKeysInternal(O, hiddenKeys$1);
  369. };
  370. var objectGetOwnPropertyNames = {
  371. f: f$3
  372. };
  373. var f$4 = Object.getOwnPropertySymbols;
  374. var objectGetOwnPropertySymbols = {
  375. f: f$4
  376. };
  377. var Reflect$1 = global.Reflect;
  378. // all object keys, includes non-enumerable and symbols
  379. var ownKeys = Reflect$1 && Reflect$1.ownKeys || function ownKeys(it) {
  380. var keys = objectGetOwnPropertyNames.f(anObject(it));
  381. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  382. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  383. };
  384. var copyConstructorProperties = function (target, source) {
  385. var keys = ownKeys(source);
  386. var defineProperty = objectDefineProperty.f;
  387. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  388. for (var i = 0; i < keys.length; i++) {
  389. var key = keys[i];
  390. if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  391. }
  392. };
  393. var replacement = /#|\.prototype\./;
  394. var isForced = function (feature, detection) {
  395. var value = data[normalize(feature)];
  396. return value == POLYFILL ? true
  397. : value == NATIVE ? false
  398. : typeof detection == 'function' ? fails(detection)
  399. : !!detection;
  400. };
  401. var normalize = isForced.normalize = function (string) {
  402. return String(string).replace(replacement, '.').toLowerCase();
  403. };
  404. var data = isForced.data = {};
  405. var NATIVE = isForced.NATIVE = 'N';
  406. var POLYFILL = isForced.POLYFILL = 'P';
  407. var isForced_1 = isForced;
  408. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  409. /*
  410. options.target - name of the target object
  411. options.global - target is the global object
  412. options.stat - export as static methods of target
  413. options.proto - export as prototype methods of target
  414. options.real - real prototype method for the `pure` version
  415. options.forced - export even if the native feature is available
  416. options.bind - bind methods to the target, required for the `pure` version
  417. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  418. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  419. options.sham - add a flag to not completely full polyfills
  420. options.enumerable - export as enumerable property
  421. options.noTargetGet - prevent calling a getter on target
  422. */
  423. var _export = function (options, source) {
  424. var TARGET = options.target;
  425. var GLOBAL = options.global;
  426. var STATIC = options.stat;
  427. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  428. if (GLOBAL) {
  429. target = global;
  430. } else if (STATIC) {
  431. target = global[TARGET] || setGlobal(TARGET, {});
  432. } else {
  433. target = (global[TARGET] || {}).prototype;
  434. }
  435. if (target) for (key in source) {
  436. sourceProperty = source[key];
  437. if (options.noTargetGet) {
  438. descriptor = getOwnPropertyDescriptor(target, key);
  439. targetProperty = descriptor && descriptor.value;
  440. } else targetProperty = target[key];
  441. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  442. // contained in target
  443. if (!FORCED && targetProperty !== undefined) {
  444. if (typeof sourceProperty === typeof targetProperty) continue;
  445. copyConstructorProperties(sourceProperty, targetProperty);
  446. }
  447. // add a flag to not completely full polyfills
  448. if (options.sham || (targetProperty && targetProperty.sham)) {
  449. hide(sourceProperty, 'sham', true);
  450. }
  451. // extend global
  452. redefine(target, key, sourceProperty, options);
  453. }
  454. };
  455. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  456. var MAX_SAFE_INTEGER = 0x1fffffffffffff;
  457. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  458. var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
  459. var array = [];
  460. array[IS_CONCAT_SPREADABLE] = false;
  461. return array.concat()[0] !== array;
  462. });
  463. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  464. var isConcatSpreadable = function (O) {
  465. if (!isObject(O)) return false;
  466. var spreadable = O[IS_CONCAT_SPREADABLE];
  467. return spreadable !== undefined ? !!spreadable : isArray(O);
  468. };
  469. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  470. // `Array.prototype.concat` method
  471. // https://tc39.github.io/ecma262/#sec-array.prototype.concat
  472. // with adding support of @@isConcatSpreadable and @@species
  473. _export({ target: 'Array', proto: true, forced: FORCED }, {
  474. concat: function concat(arg) { // eslint-disable-line no-unused-vars
  475. var O = toObject(this);
  476. var A = arraySpeciesCreate(O, 0);
  477. var n = 0;
  478. var i, k, length, len, E;
  479. for (i = -1, length = arguments.length; i < length; i++) {
  480. E = i === -1 ? O : arguments[i];
  481. if (isConcatSpreadable(E)) {
  482. len = toLength(E.length);
  483. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  484. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  485. } else {
  486. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  487. createProperty(A, n++, E);
  488. }
  489. }
  490. A.length = n;
  491. return A;
  492. }
  493. });
  494. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  495. var objectKeys = Object.keys || function keys(O) {
  496. return objectKeysInternal(O, enumBugKeys);
  497. };
  498. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  499. anObject(O);
  500. var keys = objectKeys(Properties);
  501. var length = keys.length;
  502. var i = 0;
  503. var key;
  504. while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]);
  505. return O;
  506. };
  507. var document$1 = global.document;
  508. var html = document$1 && document$1.documentElement;
  509. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  510. var IE_PROTO = sharedKey('IE_PROTO');
  511. var PROTOTYPE = 'prototype';
  512. var Empty = function () { /* empty */ };
  513. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  514. var createDict = function () {
  515. // Thrash, waste and sodomy: IE GC bug
  516. var iframe = documentCreateElement('iframe');
  517. var length = enumBugKeys.length;
  518. var lt = '<';
  519. var script = 'script';
  520. var gt = '>';
  521. var js = 'java' + script + ':';
  522. var iframeDocument;
  523. iframe.style.display = 'none';
  524. html.appendChild(iframe);
  525. iframe.src = String(js);
  526. iframeDocument = iframe.contentWindow.document;
  527. iframeDocument.open();
  528. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  529. iframeDocument.close();
  530. createDict = iframeDocument.F;
  531. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  532. return createDict();
  533. };
  534. var objectCreate = Object.create || function create(O, Properties) {
  535. var result;
  536. if (O !== null) {
  537. Empty[PROTOTYPE] = anObject(O);
  538. result = new Empty();
  539. Empty[PROTOTYPE] = null;
  540. // add "__proto__" for Object.getPrototypeOf polyfill
  541. result[IE_PROTO] = O;
  542. } else result = createDict();
  543. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  544. };
  545. hiddenKeys[IE_PROTO] = true;
  546. var UNSCOPABLES = wellKnownSymbol('unscopables');
  547. var ArrayPrototype = Array.prototype;
  548. // Array.prototype[@@unscopables]
  549. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  550. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  551. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  552. }
  553. // add a key to Array.prototype[@@unscopables]
  554. var addToUnscopables = function (key) {
  555. ArrayPrototype[UNSCOPABLES][key] = true;
  556. };
  557. var internalIncludes = arrayIncludes(true);
  558. // `Array.prototype.includes` method
  559. // https://tc39.github.io/ecma262/#sec-array.prototype.includes
  560. _export({ target: 'Array', proto: true }, {
  561. includes: function includes(el /* , fromIndex = 0 */) {
  562. return internalIncludes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  563. }
  564. });
  565. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  566. addToUnscopables('includes');
  567. var MATCH = wellKnownSymbol('match');
  568. // `IsRegExp` abstract operation
  569. // https://tc39.github.io/ecma262/#sec-isregexp
  570. var isRegexp = function (it) {
  571. var isRegExp;
  572. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  573. };
  574. // helper for String#{startsWith, endsWith, includes}
  575. var validateStringMethodArguments = function (that, searchString, NAME) {
  576. if (isRegexp(searchString)) {
  577. throw TypeError('String.prototype.' + NAME + " doesn't accept regex");
  578. } return String(requireObjectCoercible(that));
  579. };
  580. var MATCH$1 = wellKnownSymbol('match');
  581. var correctIsRegexpLogic = function (METHOD_NAME) {
  582. var regexp = /./;
  583. try {
  584. '/./'[METHOD_NAME](regexp);
  585. } catch (e) {
  586. try {
  587. regexp[MATCH$1] = false;
  588. return '/./'[METHOD_NAME](regexp);
  589. } catch (f) { /* empty */ }
  590. } return false;
  591. };
  592. var INCLUDES = 'includes';
  593. var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic(INCLUDES);
  594. // `String.prototype.includes` method
  595. // https://tc39.github.io/ecma262/#sec-string.prototype.includes
  596. _export({ target: 'String', proto: true, forced: !CORRECT_IS_REGEXP_LOGIC }, {
  597. includes: function includes(searchString /* , position = 0 */) {
  598. return !!~validateStringMethodArguments(this, searchString, INCLUDES)
  599. .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
  600. }
  601. });
  602. // iterable DOM collections
  603. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  604. var domIterables = {
  605. CSSRuleList: 0,
  606. CSSStyleDeclaration: 0,
  607. CSSValueList: 0,
  608. ClientRectList: 0,
  609. DOMRectList: 0,
  610. DOMStringList: 0,
  611. DOMTokenList: 1,
  612. DataTransferItemList: 0,
  613. FileList: 0,
  614. HTMLAllCollection: 0,
  615. HTMLCollection: 0,
  616. HTMLFormElement: 0,
  617. HTMLSelectElement: 0,
  618. MediaList: 0,
  619. MimeTypeArray: 0,
  620. NamedNodeMap: 0,
  621. NodeList: 1,
  622. PaintRequestList: 0,
  623. Plugin: 0,
  624. PluginArray: 0,
  625. SVGLengthList: 0,
  626. SVGNumberList: 0,
  627. SVGPathSegList: 0,
  628. SVGPointList: 0,
  629. SVGStringList: 0,
  630. SVGTransformList: 0,
  631. SourceBufferList: 0,
  632. StyleSheetList: 0,
  633. TextTrackCueList: 0,
  634. TextTrackList: 0,
  635. TouchList: 0
  636. };
  637. var aFunction = function (it) {
  638. if (typeof it != 'function') {
  639. throw TypeError(String(it) + ' is not a function');
  640. } return it;
  641. };
  642. // optional / simple context binding
  643. var bindContext = function (fn, that, length) {
  644. aFunction(fn);
  645. if (that === undefined) return fn;
  646. switch (length) {
  647. case 0: return function () {
  648. return fn.call(that);
  649. };
  650. case 1: return function (a) {
  651. return fn.call(that, a);
  652. };
  653. case 2: return function (a, b) {
  654. return fn.call(that, a, b);
  655. };
  656. case 3: return function (a, b, c) {
  657. return fn.call(that, a, b, c);
  658. };
  659. }
  660. return function (/* ...args */) {
  661. return fn.apply(that, arguments);
  662. };
  663. };
  664. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  665. // 0 -> Array#forEach
  666. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  667. // 1 -> Array#map
  668. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  669. // 2 -> Array#filter
  670. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  671. // 3 -> Array#some
  672. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  673. // 4 -> Array#every
  674. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  675. // 5 -> Array#find
  676. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  677. // 6 -> Array#findIndex
  678. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  679. var arrayMethods = function (TYPE, specificCreate) {
  680. var IS_MAP = TYPE == 1;
  681. var IS_FILTER = TYPE == 2;
  682. var IS_SOME = TYPE == 3;
  683. var IS_EVERY = TYPE == 4;
  684. var IS_FIND_INDEX = TYPE == 6;
  685. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  686. var create = specificCreate || arraySpeciesCreate;
  687. return function ($this, callbackfn, that) {
  688. var O = toObject($this);
  689. var self = indexedObject(O);
  690. var boundFunction = bindContext(callbackfn, that, 3);
  691. var length = toLength(self.length);
  692. var index = 0;
  693. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  694. var value, result;
  695. for (;length > index; index++) if (NO_HOLES || index in self) {
  696. value = self[index];
  697. result = boundFunction(value, index, O);
  698. if (TYPE) {
  699. if (IS_MAP) target[index] = result; // map
  700. else if (result) switch (TYPE) {
  701. case 3: return true; // some
  702. case 5: return value; // find
  703. case 6: return index; // findIndex
  704. case 2: target.push(value); // filter
  705. } else if (IS_EVERY) return false; // every
  706. }
  707. }
  708. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  709. };
  710. };
  711. var sloppyArrayMethod = function (METHOD_NAME, argument) {
  712. var method = [][METHOD_NAME];
  713. return !method || !fails(function () {
  714. // eslint-disable-next-line no-useless-call
  715. method.call(null, argument || function () { throw Error(); }, 1);
  716. });
  717. };
  718. var nativeForEach = [].forEach;
  719. var internalForEach = arrayMethods(0);
  720. var SLOPPY_METHOD = sloppyArrayMethod('forEach');
  721. // `Array.prototype.forEach` method implementation
  722. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  723. var arrayForEach = SLOPPY_METHOD ? function forEach(callbackfn /* , thisArg */) {
  724. return internalForEach(this, callbackfn, arguments[1]);
  725. } : nativeForEach;
  726. for (var COLLECTION_NAME in domIterables) {
  727. var Collection = global[COLLECTION_NAME];
  728. var CollectionPrototype = Collection && Collection.prototype;
  729. // some Chrome versions have non-configurable methods on DOMTokenList
  730. if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
  731. hide(CollectionPrototype, 'forEach', arrayForEach);
  732. } catch (e) {
  733. CollectionPrototype.forEach = arrayForEach;
  734. }
  735. }
  736. function _classCallCheck(instance, Constructor) {
  737. if (!(instance instanceof Constructor)) {
  738. throw new TypeError("Cannot call a class as a function");
  739. }
  740. }
  741. function _defineProperties(target, props) {
  742. for (var i = 0; i < props.length; i++) {
  743. var descriptor = props[i];
  744. descriptor.enumerable = descriptor.enumerable || false;
  745. descriptor.configurable = true;
  746. if ("value" in descriptor) descriptor.writable = true;
  747. Object.defineProperty(target, descriptor.key, descriptor);
  748. }
  749. }
  750. function _createClass(Constructor, protoProps, staticProps) {
  751. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  752. if (staticProps) _defineProperties(Constructor, staticProps);
  753. return Constructor;
  754. }
  755. function _inherits(subClass, superClass) {
  756. if (typeof superClass !== "function" && superClass !== null) {
  757. throw new TypeError("Super expression must either be null or a function");
  758. }
  759. subClass.prototype = Object.create(superClass && superClass.prototype, {
  760. constructor: {
  761. value: subClass,
  762. writable: true,
  763. configurable: true
  764. }
  765. });
  766. if (superClass) _setPrototypeOf(subClass, superClass);
  767. }
  768. function _getPrototypeOf(o) {
  769. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  770. return o.__proto__ || Object.getPrototypeOf(o);
  771. };
  772. return _getPrototypeOf(o);
  773. }
  774. function _setPrototypeOf(o, p) {
  775. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  776. o.__proto__ = p;
  777. return o;
  778. };
  779. return _setPrototypeOf(o, p);
  780. }
  781. function _assertThisInitialized(self) {
  782. if (self === void 0) {
  783. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  784. }
  785. return self;
  786. }
  787. function _possibleConstructorReturn(self, call) {
  788. if (call && (typeof call === "object" || typeof call === "function")) {
  789. return call;
  790. }
  791. return _assertThisInitialized(self);
  792. }
  793. function _superPropBase(object, property) {
  794. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  795. object = _getPrototypeOf(object);
  796. if (object === null) break;
  797. }
  798. return object;
  799. }
  800. function _get(target, property, receiver) {
  801. if (typeof Reflect !== "undefined" && Reflect.get) {
  802. _get = Reflect.get;
  803. } else {
  804. _get = function _get(target, property, receiver) {
  805. var base = _superPropBase(target, property);
  806. if (!base) return;
  807. var desc = Object.getOwnPropertyDescriptor(base, property);
  808. if (desc.get) {
  809. return desc.get.call(receiver);
  810. }
  811. return desc.value;
  812. };
  813. }
  814. return _get(target, property, receiver || target);
  815. }
  816. /**
  817. * @author: Dennis Hernández
  818. * @webSite: http://djhvscf.github.io/Blog
  819. * @update zhixin wen <wenzhixin2010@gmail.com>
  820. */
  821. var debounce = function debounce(func, wait) {
  822. var timeout = 0;
  823. return function () {
  824. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  825. args[_key] = arguments[_key];
  826. }
  827. var later = function later() {
  828. timeout = 0;
  829. func.apply(void 0, args);
  830. };
  831. clearTimeout(timeout);
  832. timeout = setTimeout(later, wait);
  833. };
  834. };
  835. $.extend($.fn.bootstrapTable.defaults, {
  836. mobileResponsive: false,
  837. minWidth: 562,
  838. minHeight: undefined,
  839. heightThreshold: 100,
  840. // just slightly larger than mobile chrome's auto-hiding toolbar
  841. checkOnInit: true,
  842. columnsHidden: []
  843. });
  844. $.BootstrapTable =
  845. /*#__PURE__*/
  846. function (_$$BootstrapTable) {
  847. _inherits(_class, _$$BootstrapTable);
  848. function _class() {
  849. _classCallCheck(this, _class);
  850. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  851. }
  852. _createClass(_class, [{
  853. key: "init",
  854. value: function init() {
  855. var _get2,
  856. _this = this;
  857. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  858. args[_key2] = arguments[_key2];
  859. }
  860. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  861. if (!this.options.mobileResponsive || !this.options.minWidth) {
  862. return;
  863. }
  864. if (this.options.minWidth < 100 && this.options.resizable) {
  865. console.info('The minWidth when the resizable extension is active should be greater or equal than 100');
  866. this.options.minWidth = 100;
  867. }
  868. var old = {
  869. width: $(window).width(),
  870. height: $(window).height()
  871. };
  872. $(window).on('resize orientationchange', debounce(function () {
  873. // reset view if height has only changed by at least the threshold.
  874. var width = $(window).width();
  875. var height = $(window).height();
  876. if (Math.abs(old.height - height) > _this.options.heightThreshold || old.width !== width) {
  877. _this.changeView(width, height);
  878. old = {
  879. width: width,
  880. height: height
  881. };
  882. }
  883. }, 200));
  884. if (this.options.checkOnInit) {
  885. var width = $(window).width();
  886. var height = $(window).height();
  887. this.changeView(width, height);
  888. old = {
  889. width: width,
  890. height: height
  891. };
  892. }
  893. }
  894. }, {
  895. key: "conditionCardView",
  896. value: function conditionCardView() {
  897. this.changeTableView(false);
  898. this.showHideColumns(false);
  899. }
  900. }, {
  901. key: "conditionFullView",
  902. value: function conditionFullView() {
  903. this.changeTableView(true);
  904. this.showHideColumns(true);
  905. }
  906. }, {
  907. key: "changeTableView",
  908. value: function changeTableView(cardViewState) {
  909. this.options.cardView = cardViewState;
  910. this.toggleView();
  911. }
  912. }, {
  913. key: "showHideColumns",
  914. value: function showHideColumns(checked) {
  915. var _this2 = this;
  916. if (this.options.columnsHidden.length > 0) {
  917. this.columns.forEach(function (column) {
  918. if (_this2.options.columnsHidden.includes(column.field)) {
  919. if (column.visible !== checked) {
  920. _this2.toggleColumn(_this2.fieldsColumnsIndex[column.field], checked, true);
  921. }
  922. }
  923. });
  924. }
  925. }
  926. }, {
  927. key: "changeView",
  928. value: function changeView(width, height) {
  929. if (this.options.minHeight) {
  930. if (width <= this.options.minWidth && height <= this.options.minHeight) {
  931. this.conditionCardView();
  932. } else if (width > this.options.minWidth && height > this.options.minHeight) {
  933. this.conditionFullView();
  934. }
  935. } else {
  936. if (width <= this.options.minWidth) {
  937. this.conditionCardView();
  938. } else if (width > this.options.minWidth) {
  939. this.conditionFullView();
  940. }
  941. }
  942. this.resetView();
  943. }
  944. }]);
  945. return _class;
  946. }($.BootstrapTable);
  947. }));