bootstrap-table-fixed-columns.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334
  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. var aFunction = function (it) {
  495. if (typeof it != 'function') {
  496. throw TypeError(String(it) + ' is not a function');
  497. } return it;
  498. };
  499. // optional / simple context binding
  500. var bindContext = function (fn, that, length) {
  501. aFunction(fn);
  502. if (that === undefined) return fn;
  503. switch (length) {
  504. case 0: return function () {
  505. return fn.call(that);
  506. };
  507. case 1: return function (a) {
  508. return fn.call(that, a);
  509. };
  510. case 2: return function (a, b) {
  511. return fn.call(that, a, b);
  512. };
  513. case 3: return function (a, b, c) {
  514. return fn.call(that, a, b, c);
  515. };
  516. }
  517. return function (/* ...args */) {
  518. return fn.apply(that, arguments);
  519. };
  520. };
  521. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
  522. // 0 -> Array#forEach
  523. // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
  524. // 1 -> Array#map
  525. // https://tc39.github.io/ecma262/#sec-array.prototype.map
  526. // 2 -> Array#filter
  527. // https://tc39.github.io/ecma262/#sec-array.prototype.filter
  528. // 3 -> Array#some
  529. // https://tc39.github.io/ecma262/#sec-array.prototype.some
  530. // 4 -> Array#every
  531. // https://tc39.github.io/ecma262/#sec-array.prototype.every
  532. // 5 -> Array#find
  533. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  534. // 6 -> Array#findIndex
  535. // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
  536. var arrayMethods = function (TYPE, specificCreate) {
  537. var IS_MAP = TYPE == 1;
  538. var IS_FILTER = TYPE == 2;
  539. var IS_SOME = TYPE == 3;
  540. var IS_EVERY = TYPE == 4;
  541. var IS_FIND_INDEX = TYPE == 6;
  542. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  543. var create = specificCreate || arraySpeciesCreate;
  544. return function ($this, callbackfn, that) {
  545. var O = toObject($this);
  546. var self = indexedObject(O);
  547. var boundFunction = bindContext(callbackfn, that, 3);
  548. var length = toLength(self.length);
  549. var index = 0;
  550. var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
  551. var value, result;
  552. for (;length > index; index++) if (NO_HOLES || index in self) {
  553. value = self[index];
  554. result = boundFunction(value, index, O);
  555. if (TYPE) {
  556. if (IS_MAP) target[index] = result; // map
  557. else if (result) switch (TYPE) {
  558. case 3: return true; // some
  559. case 5: return value; // find
  560. case 6: return index; // findIndex
  561. case 2: target.push(value); // filter
  562. } else if (IS_EVERY) return false; // every
  563. }
  564. }
  565. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  566. };
  567. };
  568. // 19.1.2.14 / 15.2.3.14 Object.keys(O)
  569. var objectKeys = Object.keys || function keys(O) {
  570. return objectKeysInternal(O, enumBugKeys);
  571. };
  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 i = 0;
  577. var key;
  578. while (length > i) objectDefineProperty.f(O, key = keys[i++], Properties[key]);
  579. return O;
  580. };
  581. var document$1 = global.document;
  582. var html = document$1 && document$1.documentElement;
  583. // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
  584. var IE_PROTO = sharedKey('IE_PROTO');
  585. var PROTOTYPE = 'prototype';
  586. var Empty = function () { /* empty */ };
  587. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  588. var createDict = function () {
  589. // Thrash, waste and sodomy: IE GC bug
  590. var iframe = documentCreateElement('iframe');
  591. var length = enumBugKeys.length;
  592. var lt = '<';
  593. var script = 'script';
  594. var gt = '>';
  595. var js = 'java' + script + ':';
  596. var iframeDocument;
  597. iframe.style.display = 'none';
  598. html.appendChild(iframe);
  599. iframe.src = String(js);
  600. iframeDocument = iframe.contentWindow.document;
  601. iframeDocument.open();
  602. iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
  603. iframeDocument.close();
  604. createDict = iframeDocument.F;
  605. while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
  606. return createDict();
  607. };
  608. var objectCreate = Object.create || function create(O, Properties) {
  609. var result;
  610. if (O !== null) {
  611. Empty[PROTOTYPE] = anObject(O);
  612. result = new Empty();
  613. Empty[PROTOTYPE] = null;
  614. // add "__proto__" for Object.getPrototypeOf polyfill
  615. result[IE_PROTO] = O;
  616. } else result = createDict();
  617. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  618. };
  619. hiddenKeys[IE_PROTO] = true;
  620. var UNSCOPABLES = wellKnownSymbol('unscopables');
  621. var ArrayPrototype = Array.prototype;
  622. // Array.prototype[@@unscopables]
  623. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  624. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  625. hide(ArrayPrototype, UNSCOPABLES, objectCreate(null));
  626. }
  627. // add a key to Array.prototype[@@unscopables]
  628. var addToUnscopables = function (key) {
  629. ArrayPrototype[UNSCOPABLES][key] = true;
  630. };
  631. var internalFind = arrayMethods(5);
  632. var FIND = 'find';
  633. var SKIPS_HOLES = true;
  634. // Shouldn't skip holes
  635. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  636. // `Array.prototype.find` method
  637. // https://tc39.github.io/ecma262/#sec-array.prototype.find
  638. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  639. find: function find(callbackfn /* , that = undefined */) {
  640. return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  641. }
  642. });
  643. // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
  644. addToUnscopables(FIND);
  645. // CONVERT_TO_STRING: true -> String#at
  646. // CONVERT_TO_STRING: false -> String#codePointAt
  647. var stringAt = function (that, pos, CONVERT_TO_STRING) {
  648. var S = String(requireObjectCoercible(that));
  649. var position = toInteger(pos);
  650. var size = S.length;
  651. var first, second;
  652. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  653. first = S.charCodeAt(position);
  654. return first < 0xd800 || first > 0xdbff || position + 1 === size
  655. || (second = S.charCodeAt(position + 1)) < 0xdc00 || second > 0xdfff
  656. ? CONVERT_TO_STRING ? S.charAt(position) : first
  657. : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xd800 << 10) + (second - 0xdc00) + 0x10000;
  658. };
  659. // `AdvanceStringIndex` abstract operation
  660. // https://tc39.github.io/ecma262/#sec-advancestringindex
  661. var advanceStringIndex = function (S, index, unicode) {
  662. return index + (unicode ? stringAt(S, index, true).length : 1);
  663. };
  664. // `RegExp.prototype.flags` getter implementation
  665. // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
  666. var regexpFlags = function () {
  667. var that = anObject(this);
  668. var result = '';
  669. if (that.global) result += 'g';
  670. if (that.ignoreCase) result += 'i';
  671. if (that.multiline) result += 'm';
  672. if (that.unicode) result += 'u';
  673. if (that.sticky) result += 'y';
  674. return result;
  675. };
  676. var nativeExec = RegExp.prototype.exec;
  677. // This always refers to the native implementation, because the
  678. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  679. // which loads this file before patching the method.
  680. var nativeReplace = String.prototype.replace;
  681. var patchedExec = nativeExec;
  682. var UPDATES_LAST_INDEX_WRONG = (function () {
  683. var re1 = /a/;
  684. var re2 = /b*/g;
  685. nativeExec.call(re1, 'a');
  686. nativeExec.call(re2, 'a');
  687. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  688. })();
  689. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  690. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  691. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
  692. if (PATCH) {
  693. patchedExec = function exec(str) {
  694. var re = this;
  695. var lastIndex, reCopy, match, i;
  696. if (NPCG_INCLUDED) {
  697. reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
  698. }
  699. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  700. match = nativeExec.call(re, str);
  701. if (UPDATES_LAST_INDEX_WRONG && match) {
  702. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  703. }
  704. if (NPCG_INCLUDED && match && match.length > 1) {
  705. // Fix browsers whose `exec` methods don't consistently return `undefined`
  706. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  707. nativeReplace.call(match[0], reCopy, function () {
  708. for (i = 1; i < arguments.length - 2; i++) {
  709. if (arguments[i] === undefined) match[i] = undefined;
  710. }
  711. });
  712. }
  713. return match;
  714. };
  715. }
  716. var regexpExec = patchedExec;
  717. // `RegExpExec` abstract operation
  718. // https://tc39.github.io/ecma262/#sec-regexpexec
  719. var regexpExecAbstract = function (R, S) {
  720. var exec = R.exec;
  721. if (typeof exec === 'function') {
  722. var result = exec.call(R, S);
  723. if (typeof result !== 'object') {
  724. throw TypeError('RegExp exec method returned something other than an Object or null');
  725. }
  726. return result;
  727. }
  728. if (classofRaw(R) !== 'RegExp') {
  729. throw TypeError('RegExp#exec called on incompatible receiver');
  730. }
  731. return regexpExec.call(R, S);
  732. };
  733. var SPECIES$2 = wellKnownSymbol('species');
  734. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  735. // #replace needs built-in support for named groups.
  736. // #match works fine because it just return the exec results, even if it has
  737. // a "grops" property.
  738. var re = /./;
  739. re.exec = function () {
  740. var result = [];
  741. result.groups = { a: '7' };
  742. return result;
  743. };
  744. return ''.replace(re, '$<a>') !== '7';
  745. });
  746. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  747. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  748. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  749. var re = /(?:)/;
  750. var originalExec = re.exec;
  751. re.exec = function () { return originalExec.apply(this, arguments); };
  752. var result = 'ab'.split(re);
  753. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  754. });
  755. var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
  756. var SYMBOL = wellKnownSymbol(KEY);
  757. var DELEGATES_TO_SYMBOL = !fails(function () {
  758. // String methods call symbol-named RegEp methods
  759. var O = {};
  760. O[SYMBOL] = function () { return 7; };
  761. return ''[KEY](O) != 7;
  762. });
  763. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  764. // Symbol-named RegExp methods call .exec
  765. var execCalled = false;
  766. var re = /a/;
  767. re.exec = function () { execCalled = true; return null; };
  768. if (KEY === 'split') {
  769. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  770. // a new one. We need to return the patched regex when creating the new one.
  771. re.constructor = {};
  772. re.constructor[SPECIES$2] = function () { return re; };
  773. }
  774. re[SYMBOL]('');
  775. return !execCalled;
  776. });
  777. if (
  778. !DELEGATES_TO_SYMBOL ||
  779. !DELEGATES_TO_EXEC ||
  780. (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
  781. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  782. ) {
  783. var nativeRegExpMethod = /./[SYMBOL];
  784. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  785. if (regexp.exec === regexpExec) {
  786. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  787. // The native String method already delegates to @@method (this
  788. // polyfilled function), leasing to infinite recursion.
  789. // We avoid it by directly calling the native @@method method.
  790. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  791. }
  792. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  793. }
  794. return { done: false };
  795. });
  796. var stringMethod = methods[0];
  797. var regexMethod = methods[1];
  798. redefine(String.prototype, KEY, stringMethod);
  799. redefine(RegExp.prototype, SYMBOL, length == 2
  800. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  801. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  802. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  803. // 21.2.5.6 RegExp.prototype[@@match](string)
  804. // 21.2.5.9 RegExp.prototype[@@search](string)
  805. : function (string) { return regexMethod.call(string, this); }
  806. );
  807. if (sham) hide(RegExp.prototype[SYMBOL], 'sham', true);
  808. }
  809. };
  810. var max$1 = Math.max;
  811. var min$2 = Math.min;
  812. var floor$1 = Math.floor;
  813. var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
  814. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
  815. var maybeToString = function (it) {
  816. return it === undefined ? it : String(it);
  817. };
  818. // @@replace logic
  819. fixRegexpWellKnownSymbolLogic(
  820. 'replace',
  821. 2,
  822. function (REPLACE, nativeReplace, maybeCallNative) {
  823. return [
  824. // `String.prototype.replace` method
  825. // https://tc39.github.io/ecma262/#sec-string.prototype.replace
  826. function replace(searchValue, replaceValue) {
  827. var O = requireObjectCoercible(this);
  828. var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
  829. return replacer !== undefined
  830. ? replacer.call(searchValue, O, replaceValue)
  831. : nativeReplace.call(String(O), searchValue, replaceValue);
  832. },
  833. // `RegExp.prototype[@@replace]` method
  834. // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
  835. function (regexp, replaceValue) {
  836. var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
  837. if (res.done) return res.value;
  838. var rx = anObject(regexp);
  839. var S = String(this);
  840. var functionalReplace = typeof replaceValue === 'function';
  841. if (!functionalReplace) replaceValue = String(replaceValue);
  842. var global = rx.global;
  843. if (global) {
  844. var fullUnicode = rx.unicode;
  845. rx.lastIndex = 0;
  846. }
  847. var results = [];
  848. while (true) {
  849. var result = regexpExecAbstract(rx, S);
  850. if (result === null) break;
  851. results.push(result);
  852. if (!global) break;
  853. var matchStr = String(result[0]);
  854. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  855. }
  856. var accumulatedResult = '';
  857. var nextSourcePosition = 0;
  858. for (var i = 0; i < results.length; i++) {
  859. result = results[i];
  860. var matched = String(result[0]);
  861. var position = max$1(min$2(toInteger(result.index), S.length), 0);
  862. var captures = [];
  863. // NOTE: This is equivalent to
  864. // captures = result.slice(1).map(maybeToString)
  865. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  866. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  867. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  868. for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
  869. var namedCaptures = result.groups;
  870. if (functionalReplace) {
  871. var replacerArgs = [matched].concat(captures, position, S);
  872. if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
  873. var replacement = String(replaceValue.apply(undefined, replacerArgs));
  874. } else {
  875. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  876. }
  877. if (position >= nextSourcePosition) {
  878. accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
  879. nextSourcePosition = position + matched.length;
  880. }
  881. }
  882. return accumulatedResult + S.slice(nextSourcePosition);
  883. }
  884. ];
  885. // https://tc39.github.io/ecma262/#sec-getsubstitution
  886. function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
  887. var tailPos = position + matched.length;
  888. var m = captures.length;
  889. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  890. if (namedCaptures !== undefined) {
  891. namedCaptures = toObject(namedCaptures);
  892. symbols = SUBSTITUTION_SYMBOLS;
  893. }
  894. return nativeReplace.call(replacement, symbols, function (match, ch) {
  895. var capture;
  896. switch (ch.charAt(0)) {
  897. case '$': return '$';
  898. case '&': return matched;
  899. case '`': return str.slice(0, position);
  900. case "'": return str.slice(tailPos);
  901. case '<':
  902. capture = namedCaptures[ch.slice(1, -1)];
  903. break;
  904. default: // \d\d?
  905. var n = +ch;
  906. if (n === 0) return match;
  907. if (n > m) {
  908. var f = floor$1(n / 10);
  909. if (f === 0) return match;
  910. if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
  911. return match;
  912. }
  913. capture = captures[n - 1];
  914. }
  915. return capture === undefined ? '' : capture;
  916. });
  917. }
  918. }
  919. );
  920. function _classCallCheck(instance, Constructor) {
  921. if (!(instance instanceof Constructor)) {
  922. throw new TypeError("Cannot call a class as a function");
  923. }
  924. }
  925. function _defineProperties(target, props) {
  926. for (var i = 0; i < props.length; i++) {
  927. var descriptor = props[i];
  928. descriptor.enumerable = descriptor.enumerable || false;
  929. descriptor.configurable = true;
  930. if ("value" in descriptor) descriptor.writable = true;
  931. Object.defineProperty(target, descriptor.key, descriptor);
  932. }
  933. }
  934. function _createClass(Constructor, protoProps, staticProps) {
  935. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  936. if (staticProps) _defineProperties(Constructor, staticProps);
  937. return Constructor;
  938. }
  939. function _inherits(subClass, superClass) {
  940. if (typeof superClass !== "function" && superClass !== null) {
  941. throw new TypeError("Super expression must either be null or a function");
  942. }
  943. subClass.prototype = Object.create(superClass && superClass.prototype, {
  944. constructor: {
  945. value: subClass,
  946. writable: true,
  947. configurable: true
  948. }
  949. });
  950. if (superClass) _setPrototypeOf(subClass, superClass);
  951. }
  952. function _getPrototypeOf(o) {
  953. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  954. return o.__proto__ || Object.getPrototypeOf(o);
  955. };
  956. return _getPrototypeOf(o);
  957. }
  958. function _setPrototypeOf(o, p) {
  959. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  960. o.__proto__ = p;
  961. return o;
  962. };
  963. return _setPrototypeOf(o, p);
  964. }
  965. function _assertThisInitialized(self) {
  966. if (self === void 0) {
  967. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  968. }
  969. return self;
  970. }
  971. function _possibleConstructorReturn(self, call) {
  972. if (call && (typeof call === "object" || typeof call === "function")) {
  973. return call;
  974. }
  975. return _assertThisInitialized(self);
  976. }
  977. function _superPropBase(object, property) {
  978. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  979. object = _getPrototypeOf(object);
  980. if (object === null) break;
  981. }
  982. return object;
  983. }
  984. function _get(target, property, receiver) {
  985. if (typeof Reflect !== "undefined" && Reflect.get) {
  986. _get = Reflect.get;
  987. } else {
  988. _get = function _get(target, property, receiver) {
  989. var base = _superPropBase(target, property);
  990. if (!base) return;
  991. var desc = Object.getOwnPropertyDescriptor(base, property);
  992. if (desc.get) {
  993. return desc.get.call(receiver);
  994. }
  995. return desc.value;
  996. };
  997. }
  998. return _get(target, property, receiver || target);
  999. }
  1000. /**
  1001. * @author zhixin wen <wenzhixin2010@gmail.com>
  1002. */
  1003. $.extend($.fn.bootstrapTable.defaults, {
  1004. fixedColumns: false,
  1005. fixedNumber: 1
  1006. });
  1007. $.BootstrapTable =
  1008. /*#__PURE__*/
  1009. function (_$$BootstrapTable) {
  1010. _inherits(_class, _$$BootstrapTable);
  1011. function _class() {
  1012. _classCallCheck(this, _class);
  1013. return _possibleConstructorReturn(this, _getPrototypeOf(_class).apply(this, arguments));
  1014. }
  1015. _createClass(_class, [{
  1016. key: "fitHeader",
  1017. value: function fitHeader() {
  1018. var _get2;
  1019. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1020. args[_key] = arguments[_key];
  1021. }
  1022. (_get2 = _get(_getPrototypeOf(_class.prototype), "fitHeader", this)).call.apply(_get2, [this].concat(args));
  1023. if (!this.options.fixedColumns) {
  1024. return;
  1025. }
  1026. if (this.$el.is(':hidden')) {
  1027. return;
  1028. }
  1029. this.$container.find('.fixed-table-header-columns').remove();
  1030. this.$fixedHeader = $('<div class="fixed-table-header-columns"></div>');
  1031. this.$fixedHeader.append(this.$tableHeader.find('>table').clone(true));
  1032. this.$tableHeader.after(this.$fixedHeader);
  1033. var width = this.getFixedColumnsWidth();
  1034. this.$fixedHeader.css({
  1035. top: 0,
  1036. width: width,
  1037. height: this.$tableHeader.outerHeight(true)
  1038. });
  1039. this.initFixedColumnsBody();
  1040. this.$fixedBody.css({
  1041. top: this.$tableHeader.outerHeight(true),
  1042. width: width,
  1043. height: this.$tableBody.outerHeight(true) - 1
  1044. });
  1045. this.initFixedColumnsEvents();
  1046. }
  1047. }, {
  1048. key: "initBody",
  1049. value: function initBody() {
  1050. var _get3;
  1051. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1052. args[_key2] = arguments[_key2];
  1053. }
  1054. (_get3 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get3, [this].concat(args));
  1055. if (!this.options.fixedColumns) {
  1056. return;
  1057. }
  1058. if (this.options.showHeader && this.options.height) {
  1059. return;
  1060. }
  1061. this.initFixedColumnsBody();
  1062. this.$fixedBody.css({
  1063. top: 0,
  1064. width: this.getFixedColumnsWidth(),
  1065. height: this.$tableHeader.outerHeight(true) + this.$tableBody.outerHeight(true)
  1066. });
  1067. this.initFixedColumnsEvents();
  1068. }
  1069. }, {
  1070. key: "initFixedColumnsBody",
  1071. value: function initFixedColumnsBody() {
  1072. this.$container.find('.fixed-table-body-columns').remove();
  1073. this.$fixedBody = $('<div class="fixed-table-body-columns"></div>');
  1074. this.$fixedBody.append(this.$tableBody.find('>table').clone(true));
  1075. this.$tableBody.after(this.$fixedBody);
  1076. }
  1077. }, {
  1078. key: "getFixedColumnsWidth",
  1079. value: function getFixedColumnsWidth() {
  1080. var visibleFields = this.getVisibleFields();
  1081. var width = 0;
  1082. for (var i = 0; i < this.options.fixedNumber; i++) {
  1083. width += this.$header.find("th[data-field=\"".concat(visibleFields[i], "\"]")).outerWidth(true);
  1084. }
  1085. return width + 1;
  1086. }
  1087. }, {
  1088. key: "initFixedColumnsEvents",
  1089. value: function initFixedColumnsEvents() {
  1090. var _this = this;
  1091. // events
  1092. this.$tableBody.off('scroll.fixed-columns').on('scroll.fixed-columns', function (e) {
  1093. _this.$fixedBody.find('table').css('top', -$(e.currentTarget).scrollTop());
  1094. });
  1095. this.$body.find('> tr[data-index]').off('hover').hover(function (e) {
  1096. var index = $(e.currentTarget).data('index');
  1097. _this.$fixedBody.find("tr[data-index=\"".concat(index, "\"]")).css('background-color', $(e.currentTarget).css('background-color'));
  1098. }, function (e) {
  1099. var index = $(e.currentTarget).data('index');
  1100. var $tr = _this.$fixedBody.find("tr[data-index=\"".concat(index, "\"]"));
  1101. $tr.attr('style', $tr.attr('style').replace(/background-color:.*;/, ''));
  1102. });
  1103. this.$fixedBody.find('tr[data-index]').off('hover').hover(function (e) {
  1104. var index = $(e.currentTarget).data('index');
  1105. _this.$body.find("tr[data-index=\"".concat(index, "\"]")).css('background-color', $(e.currentTarget).css('background-color'));
  1106. }, function (e) {
  1107. var index = $(e.currentTarget).data('index');
  1108. var $tr = _this.$body.find("> tr[data-index=\"".concat(index, "\"]"));
  1109. $tr.attr('style', $tr.attr('style').replace(/background-color:.*;/, ''));
  1110. });
  1111. }
  1112. }]);
  1113. return _class;
  1114. }($.BootstrapTable);
  1115. }));