bootstrap-table-reorder-columns.js 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825
  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 = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _inherits(subClass, superClass) {
  31. if (typeof superClass !== "function" && superClass !== null) {
  32. throw new TypeError("Super expression must either be null or a function");
  33. }
  34. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35. constructor: {
  36. value: subClass,
  37. writable: true,
  38. configurable: true
  39. }
  40. });
  41. Object.defineProperty(subClass, "prototype", {
  42. writable: false
  43. });
  44. if (superClass) _setPrototypeOf(subClass, superClass);
  45. }
  46. function _getPrototypeOf(o) {
  47. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  48. return o.__proto__ || Object.getPrototypeOf(o);
  49. };
  50. return _getPrototypeOf(o);
  51. }
  52. function _setPrototypeOf(o, p) {
  53. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  54. o.__proto__ = p;
  55. return o;
  56. };
  57. return _setPrototypeOf(o, p);
  58. }
  59. function _isNativeReflectConstruct() {
  60. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  61. if (Reflect.construct.sham) return false;
  62. if (typeof Proxy === "function") return true;
  63. try {
  64. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  65. return true;
  66. } catch (e) {
  67. return false;
  68. }
  69. }
  70. function _assertThisInitialized(self) {
  71. if (self === void 0) {
  72. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  73. }
  74. return self;
  75. }
  76. function _possibleConstructorReturn(self, call) {
  77. if (call && (typeof call === "object" || typeof call === "function")) {
  78. return call;
  79. } else if (call !== void 0) {
  80. throw new TypeError("Derived constructors may only return object or undefined");
  81. }
  82. return _assertThisInitialized(self);
  83. }
  84. function _createSuper(Derived) {
  85. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  86. return function _createSuperInternal() {
  87. var Super = _getPrototypeOf(Derived),
  88. result;
  89. if (hasNativeReflectConstruct) {
  90. var NewTarget = _getPrototypeOf(this).constructor;
  91. result = Reflect.construct(Super, arguments, NewTarget);
  92. } else {
  93. result = Super.apply(this, arguments);
  94. }
  95. return _possibleConstructorReturn(this, result);
  96. };
  97. }
  98. function _superPropBase(object, property) {
  99. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  100. object = _getPrototypeOf(object);
  101. if (object === null) break;
  102. }
  103. return object;
  104. }
  105. function _get() {
  106. if (typeof Reflect !== "undefined" && Reflect.get) {
  107. _get = Reflect.get;
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. function _slicedToArray(arr, i) {
  122. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  123. }
  124. function _arrayWithHoles(arr) {
  125. if (Array.isArray(arr)) return arr;
  126. }
  127. function _iterableToArrayLimit(arr, i) {
  128. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  129. if (_i == null) return;
  130. var _arr = [];
  131. var _n = true;
  132. var _d = false;
  133. var _s, _e;
  134. try {
  135. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  136. _arr.push(_s.value);
  137. if (i && _arr.length === i) break;
  138. }
  139. } catch (err) {
  140. _d = true;
  141. _e = err;
  142. } finally {
  143. try {
  144. if (!_n && _i["return"] != null) _i["return"]();
  145. } finally {
  146. if (_d) throw _e;
  147. }
  148. }
  149. return _arr;
  150. }
  151. function _unsupportedIterableToArray(o, minLen) {
  152. if (!o) return;
  153. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  154. var n = Object.prototype.toString.call(o).slice(8, -1);
  155. if (n === "Object" && o.constructor) n = o.constructor.name;
  156. if (n === "Map" || n === "Set") return Array.from(o);
  157. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  158. }
  159. function _arrayLikeToArray(arr, len) {
  160. if (len == null || len > arr.length) len = arr.length;
  161. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  162. return arr2;
  163. }
  164. function _nonIterableRest() {
  165. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  166. }
  167. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  168. function createCommonjsModule(fn, module) {
  169. return module = { exports: {} }, fn(module, module.exports), module.exports;
  170. }
  171. var check = function (it) {
  172. return it && it.Math == Math && it;
  173. };
  174. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  175. var global_1 =
  176. // eslint-disable-next-line es-x/no-global-this -- safe
  177. check(typeof globalThis == 'object' && globalThis) ||
  178. check(typeof window == 'object' && window) ||
  179. // eslint-disable-next-line no-restricted-globals -- safe
  180. check(typeof self == 'object' && self) ||
  181. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  182. // eslint-disable-next-line no-new-func -- fallback
  183. (function () { return this; })() || Function('return this')();
  184. var fails = function (exec) {
  185. try {
  186. return !!exec();
  187. } catch (error) {
  188. return true;
  189. }
  190. };
  191. // Detect IE8's incomplete defineProperty implementation
  192. var descriptors = !fails(function () {
  193. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  194. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  195. });
  196. var functionBindNative = !fails(function () {
  197. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  198. var test = (function () { /* empty */ }).bind();
  199. // eslint-disable-next-line no-prototype-builtins -- safe
  200. return typeof test != 'function' || test.hasOwnProperty('prototype');
  201. });
  202. var call$1 = Function.prototype.call;
  203. var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
  204. return call$1.apply(call$1, arguments);
  205. };
  206. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  207. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  208. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  209. // Nashorn ~ JDK8 bug
  210. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  211. // `Object.prototype.propertyIsEnumerable` method implementation
  212. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  213. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  214. var descriptor = getOwnPropertyDescriptor$1(this, V);
  215. return !!descriptor && descriptor.enumerable;
  216. } : $propertyIsEnumerable$1;
  217. var objectPropertyIsEnumerable = {
  218. f: f$5
  219. };
  220. var createPropertyDescriptor = function (bitmap, value) {
  221. return {
  222. enumerable: !(bitmap & 1),
  223. configurable: !(bitmap & 2),
  224. writable: !(bitmap & 4),
  225. value: value
  226. };
  227. };
  228. var FunctionPrototype$1 = Function.prototype;
  229. var bind$1 = FunctionPrototype$1.bind;
  230. var call = FunctionPrototype$1.call;
  231. var uncurryThis = functionBindNative && bind$1.bind(call, call);
  232. var functionUncurryThis = functionBindNative ? function (fn) {
  233. return fn && uncurryThis(fn);
  234. } : function (fn) {
  235. return fn && function () {
  236. return call.apply(fn, arguments);
  237. };
  238. };
  239. var toString$1 = functionUncurryThis({}.toString);
  240. var stringSlice = functionUncurryThis(''.slice);
  241. var classofRaw = function (it) {
  242. return stringSlice(toString$1(it), 8, -1);
  243. };
  244. var Object$4 = global_1.Object;
  245. var split = functionUncurryThis(''.split);
  246. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  247. var indexedObject = fails(function () {
  248. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  249. // eslint-disable-next-line no-prototype-builtins -- safe
  250. return !Object$4('z').propertyIsEnumerable(0);
  251. }) ? function (it) {
  252. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  253. } : Object$4;
  254. var TypeError$8 = global_1.TypeError;
  255. // `RequireObjectCoercible` abstract operation
  256. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  257. var requireObjectCoercible = function (it) {
  258. if (it == undefined) throw TypeError$8("Can't call method on " + it);
  259. return it;
  260. };
  261. // toObject with fallback for non-array-like ES3 strings
  262. var toIndexedObject = function (it) {
  263. return indexedObject(requireObjectCoercible(it));
  264. };
  265. // `IsCallable` abstract operation
  266. // https://tc39.es/ecma262/#sec-iscallable
  267. var isCallable = function (argument) {
  268. return typeof argument == 'function';
  269. };
  270. var isObject = function (it) {
  271. return typeof it == 'object' ? it !== null : isCallable(it);
  272. };
  273. var aFunction = function (argument) {
  274. return isCallable(argument) ? argument : undefined;
  275. };
  276. var getBuiltIn = function (namespace, method) {
  277. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  278. };
  279. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  280. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  281. var process = global_1.process;
  282. var Deno = global_1.Deno;
  283. var versions = process && process.versions || Deno && Deno.version;
  284. var v8 = versions && versions.v8;
  285. var match, version;
  286. if (v8) {
  287. match = v8.split('.');
  288. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  289. // but their correct versions are not interesting for us
  290. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  291. }
  292. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  293. // so check `userAgent` even if `.v8` exists, but 0
  294. if (!version && engineUserAgent) {
  295. match = engineUserAgent.match(/Edge\/(\d+)/);
  296. if (!match || match[1] >= 74) {
  297. match = engineUserAgent.match(/Chrome\/(\d+)/);
  298. if (match) version = +match[1];
  299. }
  300. }
  301. var engineV8Version = version;
  302. /* eslint-disable es-x/no-symbol -- required for testing */
  303. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  304. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  305. var symbol = Symbol();
  306. // Chrome 38 Symbol has incorrect toString conversion
  307. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  308. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  309. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  310. !Symbol.sham && engineV8Version && engineV8Version < 41;
  311. });
  312. /* eslint-disable es-x/no-symbol -- required for testing */
  313. var useSymbolAsUid = nativeSymbol
  314. && !Symbol.sham
  315. && typeof Symbol.iterator == 'symbol';
  316. var Object$3 = global_1.Object;
  317. var isSymbol = useSymbolAsUid ? function (it) {
  318. return typeof it == 'symbol';
  319. } : function (it) {
  320. var $Symbol = getBuiltIn('Symbol');
  321. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  322. };
  323. var String$3 = global_1.String;
  324. var tryToString = function (argument) {
  325. try {
  326. return String$3(argument);
  327. } catch (error) {
  328. return 'Object';
  329. }
  330. };
  331. var TypeError$7 = global_1.TypeError;
  332. // `Assert: IsCallable(argument) is true`
  333. var aCallable = function (argument) {
  334. if (isCallable(argument)) return argument;
  335. throw TypeError$7(tryToString(argument) + ' is not a function');
  336. };
  337. // `GetMethod` abstract operation
  338. // https://tc39.es/ecma262/#sec-getmethod
  339. var getMethod = function (V, P) {
  340. var func = V[P];
  341. return func == null ? undefined : aCallable(func);
  342. };
  343. var TypeError$6 = global_1.TypeError;
  344. // `OrdinaryToPrimitive` abstract operation
  345. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  346. var ordinaryToPrimitive = function (input, pref) {
  347. var fn, val;
  348. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  349. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  350. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  351. throw TypeError$6("Can't convert object to primitive value");
  352. };
  353. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  354. var defineProperty = Object.defineProperty;
  355. var setGlobal = function (key, value) {
  356. try {
  357. defineProperty(global_1, key, { value: value, configurable: true, writable: true });
  358. } catch (error) {
  359. global_1[key] = value;
  360. } return value;
  361. };
  362. var SHARED = '__core-js_shared__';
  363. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  364. var sharedStore = store$1;
  365. var shared = createCommonjsModule(function (module) {
  366. (module.exports = function (key, value) {
  367. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  368. })('versions', []).push({
  369. version: '3.22.4',
  370. mode: 'global',
  371. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  372. license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
  373. source: 'https://github.com/zloirock/core-js'
  374. });
  375. });
  376. var Object$2 = global_1.Object;
  377. // `ToObject` abstract operation
  378. // https://tc39.es/ecma262/#sec-toobject
  379. var toObject = function (argument) {
  380. return Object$2(requireObjectCoercible(argument));
  381. };
  382. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  383. // `HasOwnProperty` abstract operation
  384. // https://tc39.es/ecma262/#sec-hasownproperty
  385. // eslint-disable-next-line es-x/no-object-hasown -- safe
  386. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  387. return hasOwnProperty(toObject(it), key);
  388. };
  389. var id = 0;
  390. var postfix = Math.random();
  391. var toString = functionUncurryThis(1.0.toString);
  392. var uid = function (key) {
  393. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  394. };
  395. var WellKnownSymbolsStore = shared('wks');
  396. var Symbol$2 = global_1.Symbol;
  397. var symbolFor = Symbol$2 && Symbol$2['for'];
  398. var createWellKnownSymbol = useSymbolAsUid ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid;
  399. var wellKnownSymbol = function (name) {
  400. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  401. var description = 'Symbol.' + name;
  402. if (nativeSymbol && hasOwnProperty_1(Symbol$2, name)) {
  403. WellKnownSymbolsStore[name] = Symbol$2[name];
  404. } else if (useSymbolAsUid && symbolFor) {
  405. WellKnownSymbolsStore[name] = symbolFor(description);
  406. } else {
  407. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  408. }
  409. } return WellKnownSymbolsStore[name];
  410. };
  411. var TypeError$5 = global_1.TypeError;
  412. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  413. // `ToPrimitive` abstract operation
  414. // https://tc39.es/ecma262/#sec-toprimitive
  415. var toPrimitive = function (input, pref) {
  416. if (!isObject(input) || isSymbol(input)) return input;
  417. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  418. var result;
  419. if (exoticToPrim) {
  420. if (pref === undefined) pref = 'default';
  421. result = functionCall(exoticToPrim, input, pref);
  422. if (!isObject(result) || isSymbol(result)) return result;
  423. throw TypeError$5("Can't convert object to primitive value");
  424. }
  425. if (pref === undefined) pref = 'number';
  426. return ordinaryToPrimitive(input, pref);
  427. };
  428. // `ToPropertyKey` abstract operation
  429. // https://tc39.es/ecma262/#sec-topropertykey
  430. var toPropertyKey = function (argument) {
  431. var key = toPrimitive(argument, 'string');
  432. return isSymbol(key) ? key : key + '';
  433. };
  434. var document$1 = global_1.document;
  435. // typeof document.createElement is 'object' in old IE
  436. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  437. var documentCreateElement = function (it) {
  438. return EXISTS$1 ? document$1.createElement(it) : {};
  439. };
  440. // Thanks to IE8 for its funny defineProperty
  441. var ie8DomDefine = !descriptors && !fails(function () {
  442. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  443. return Object.defineProperty(documentCreateElement('div'), 'a', {
  444. get: function () { return 7; }
  445. }).a != 7;
  446. });
  447. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  448. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  449. // `Object.getOwnPropertyDescriptor` method
  450. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  451. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  452. O = toIndexedObject(O);
  453. P = toPropertyKey(P);
  454. if (ie8DomDefine) try {
  455. return $getOwnPropertyDescriptor$1(O, P);
  456. } catch (error) { /* empty */ }
  457. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  458. };
  459. var objectGetOwnPropertyDescriptor = {
  460. f: f$4
  461. };
  462. // V8 ~ Chrome 36-
  463. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  464. var v8PrototypeDefineBug = descriptors && fails(function () {
  465. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  466. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  467. value: 42,
  468. writable: false
  469. }).prototype != 42;
  470. });
  471. var String$2 = global_1.String;
  472. var TypeError$4 = global_1.TypeError;
  473. // `Assert: Type(argument) is Object`
  474. var anObject = function (argument) {
  475. if (isObject(argument)) return argument;
  476. throw TypeError$4(String$2(argument) + ' is not an object');
  477. };
  478. var TypeError$3 = global_1.TypeError;
  479. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  480. var $defineProperty = Object.defineProperty;
  481. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  482. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  483. var ENUMERABLE = 'enumerable';
  484. var CONFIGURABLE$1 = 'configurable';
  485. var WRITABLE = 'writable';
  486. // `Object.defineProperty` method
  487. // https://tc39.es/ecma262/#sec-object.defineproperty
  488. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  489. anObject(O);
  490. P = toPropertyKey(P);
  491. anObject(Attributes);
  492. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  493. var current = $getOwnPropertyDescriptor(O, P);
  494. if (current && current[WRITABLE]) {
  495. O[P] = Attributes.value;
  496. Attributes = {
  497. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  498. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  499. writable: false
  500. };
  501. }
  502. } return $defineProperty(O, P, Attributes);
  503. } : $defineProperty : function defineProperty(O, P, Attributes) {
  504. anObject(O);
  505. P = toPropertyKey(P);
  506. anObject(Attributes);
  507. if (ie8DomDefine) try {
  508. return $defineProperty(O, P, Attributes);
  509. } catch (error) { /* empty */ }
  510. if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
  511. if ('value' in Attributes) O[P] = Attributes.value;
  512. return O;
  513. };
  514. var objectDefineProperty = {
  515. f: f$3
  516. };
  517. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  518. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  519. } : function (object, key, value) {
  520. object[key] = value;
  521. return object;
  522. };
  523. var FunctionPrototype = Function.prototype;
  524. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  525. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  526. var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
  527. // additional protection from minified / mangled / dropped function names
  528. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  529. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
  530. var functionName = {
  531. EXISTS: EXISTS,
  532. PROPER: PROPER,
  533. CONFIGURABLE: CONFIGURABLE
  534. };
  535. var functionToString = functionUncurryThis(Function.toString);
  536. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  537. if (!isCallable(sharedStore.inspectSource)) {
  538. sharedStore.inspectSource = function (it) {
  539. return functionToString(it);
  540. };
  541. }
  542. var inspectSource = sharedStore.inspectSource;
  543. var WeakMap$1 = global_1.WeakMap;
  544. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  545. var keys = shared('keys');
  546. var sharedKey = function (key) {
  547. return keys[key] || (keys[key] = uid(key));
  548. };
  549. var hiddenKeys$1 = {};
  550. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  551. var TypeError$2 = global_1.TypeError;
  552. var WeakMap = global_1.WeakMap;
  553. var set, get, has;
  554. var enforce = function (it) {
  555. return has(it) ? get(it) : set(it, {});
  556. };
  557. var getterFor = function (TYPE) {
  558. return function (it) {
  559. var state;
  560. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  561. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  562. } return state;
  563. };
  564. };
  565. if (nativeWeakMap || sharedStore.state) {
  566. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  567. var wmget = functionUncurryThis(store.get);
  568. var wmhas = functionUncurryThis(store.has);
  569. var wmset = functionUncurryThis(store.set);
  570. set = function (it, metadata) {
  571. if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  572. metadata.facade = it;
  573. wmset(store, it, metadata);
  574. return metadata;
  575. };
  576. get = function (it) {
  577. return wmget(store, it) || {};
  578. };
  579. has = function (it) {
  580. return wmhas(store, it);
  581. };
  582. } else {
  583. var STATE = sharedKey('state');
  584. hiddenKeys$1[STATE] = true;
  585. set = function (it, metadata) {
  586. if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  587. metadata.facade = it;
  588. createNonEnumerableProperty(it, STATE, metadata);
  589. return metadata;
  590. };
  591. get = function (it) {
  592. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  593. };
  594. has = function (it) {
  595. return hasOwnProperty_1(it, STATE);
  596. };
  597. }
  598. var internalState = {
  599. set: set,
  600. get: get,
  601. has: has,
  602. enforce: enforce,
  603. getterFor: getterFor
  604. };
  605. var makeBuiltIn_1 = createCommonjsModule(function (module) {
  606. var defineProperty = objectDefineProperty.f;
  607. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  608. var enforceInternalState = internalState.enforce;
  609. var getInternalState = internalState.get;
  610. var CONFIGURABLE_LENGTH = !fails(function () {
  611. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  612. });
  613. var TEMPLATE = String(String).split('String');
  614. var makeBuiltIn = module.exports = function (value, name, options) {
  615. if (String(name).slice(0, 7) === 'Symbol(') {
  616. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  617. }
  618. if (options && options.getter) name = 'get ' + name;
  619. if (options && options.setter) name = 'set ' + name;
  620. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  621. defineProperty(value, 'name', { value: name, configurable: true });
  622. }
  623. if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
  624. defineProperty(value, 'length', { value: options.arity });
  625. }
  626. var state = enforceInternalState(value);
  627. if (!hasOwnProperty_1(state, 'source')) {
  628. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  629. } return value;
  630. };
  631. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  632. // eslint-disable-next-line no-extend-native -- required
  633. Function.prototype.toString = makeBuiltIn(function toString() {
  634. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  635. }, 'toString');
  636. });
  637. var defineBuiltIn = function (O, key, value, options) {
  638. var unsafe = options ? !!options.unsafe : false;
  639. var simple = options ? !!options.enumerable : false;
  640. var noTargetGet = options ? !!options.noTargetGet : false;
  641. var name = options && options.name !== undefined ? options.name : key;
  642. if (isCallable(value)) makeBuiltIn_1(value, name, options);
  643. if (O === global_1) {
  644. if (simple) O[key] = value;
  645. else setGlobal(key, value);
  646. return O;
  647. } else if (!unsafe) {
  648. delete O[key];
  649. } else if (!noTargetGet && O[key]) {
  650. simple = true;
  651. }
  652. if (simple) O[key] = value;
  653. else createNonEnumerableProperty(O, key, value);
  654. return O;
  655. };
  656. var ceil = Math.ceil;
  657. var floor = Math.floor;
  658. // `ToIntegerOrInfinity` abstract operation
  659. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  660. var toIntegerOrInfinity = function (argument) {
  661. var number = +argument;
  662. // eslint-disable-next-line no-self-compare -- safe
  663. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  664. };
  665. var max = Math.max;
  666. var min$1 = Math.min;
  667. // Helper for a popular repeating case of the spec:
  668. // Let integer be ? ToInteger(index).
  669. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  670. var toAbsoluteIndex = function (index, length) {
  671. var integer = toIntegerOrInfinity(index);
  672. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  673. };
  674. var min = Math.min;
  675. // `ToLength` abstract operation
  676. // https://tc39.es/ecma262/#sec-tolength
  677. var toLength = function (argument) {
  678. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  679. };
  680. // `LengthOfArrayLike` abstract operation
  681. // https://tc39.es/ecma262/#sec-lengthofarraylike
  682. var lengthOfArrayLike = function (obj) {
  683. return toLength(obj.length);
  684. };
  685. // `Array.prototype.{ indexOf, includes }` methods implementation
  686. var createMethod$3 = function (IS_INCLUDES) {
  687. return function ($this, el, fromIndex) {
  688. var O = toIndexedObject($this);
  689. var length = lengthOfArrayLike(O);
  690. var index = toAbsoluteIndex(fromIndex, length);
  691. var value;
  692. // Array#includes uses SameValueZero equality algorithm
  693. // eslint-disable-next-line no-self-compare -- NaN check
  694. if (IS_INCLUDES && el != el) while (length > index) {
  695. value = O[index++];
  696. // eslint-disable-next-line no-self-compare -- NaN check
  697. if (value != value) return true;
  698. // Array#indexOf ignores holes, Array#includes - not
  699. } else for (;length > index; index++) {
  700. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  701. } return !IS_INCLUDES && -1;
  702. };
  703. };
  704. var arrayIncludes = {
  705. // `Array.prototype.includes` method
  706. // https://tc39.es/ecma262/#sec-array.prototype.includes
  707. includes: createMethod$3(true),
  708. // `Array.prototype.indexOf` method
  709. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  710. indexOf: createMethod$3(false)
  711. };
  712. var indexOf = arrayIncludes.indexOf;
  713. var push$2 = functionUncurryThis([].push);
  714. var objectKeysInternal = function (object, names) {
  715. var O = toIndexedObject(object);
  716. var i = 0;
  717. var result = [];
  718. var key;
  719. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
  720. // Don't enum bug & hidden keys
  721. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  722. ~indexOf(result, key) || push$2(result, key);
  723. }
  724. return result;
  725. };
  726. // IE8- don't enum bug keys
  727. var enumBugKeys = [
  728. 'constructor',
  729. 'hasOwnProperty',
  730. 'isPrototypeOf',
  731. 'propertyIsEnumerable',
  732. 'toLocaleString',
  733. 'toString',
  734. 'valueOf'
  735. ];
  736. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  737. // `Object.getOwnPropertyNames` method
  738. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  739. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  740. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  741. return objectKeysInternal(O, hiddenKeys);
  742. };
  743. var objectGetOwnPropertyNames = {
  744. f: f$2
  745. };
  746. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  747. var f$1 = Object.getOwnPropertySymbols;
  748. var objectGetOwnPropertySymbols = {
  749. f: f$1
  750. };
  751. var concat = functionUncurryThis([].concat);
  752. // all object keys, includes non-enumerable and symbols
  753. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  754. var keys = objectGetOwnPropertyNames.f(anObject(it));
  755. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  756. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  757. };
  758. var copyConstructorProperties = function (target, source, exceptions) {
  759. var keys = ownKeys(source);
  760. var defineProperty = objectDefineProperty.f;
  761. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  762. for (var i = 0; i < keys.length; i++) {
  763. var key = keys[i];
  764. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  765. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  766. }
  767. }
  768. };
  769. var replacement = /#|\.prototype\./;
  770. var isForced = function (feature, detection) {
  771. var value = data[normalize(feature)];
  772. return value == POLYFILL ? true
  773. : value == NATIVE ? false
  774. : isCallable(detection) ? fails(detection)
  775. : !!detection;
  776. };
  777. var normalize = isForced.normalize = function (string) {
  778. return String(string).replace(replacement, '.').toLowerCase();
  779. };
  780. var data = isForced.data = {};
  781. var NATIVE = isForced.NATIVE = 'N';
  782. var POLYFILL = isForced.POLYFILL = 'P';
  783. var isForced_1 = isForced;
  784. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  785. /*
  786. options.target - name of the target object
  787. options.global - target is the global object
  788. options.stat - export as static methods of target
  789. options.proto - export as prototype methods of target
  790. options.real - real prototype method for the `pure` version
  791. options.forced - export even if the native feature is available
  792. options.bind - bind methods to the target, required for the `pure` version
  793. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  794. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  795. options.sham - add a flag to not completely full polyfills
  796. options.enumerable - export as enumerable property
  797. options.noTargetGet - prevent calling a getter on target
  798. options.name - the .name of the function if it does not match the key
  799. */
  800. var _export = function (options, source) {
  801. var TARGET = options.target;
  802. var GLOBAL = options.global;
  803. var STATIC = options.stat;
  804. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  805. if (GLOBAL) {
  806. target = global_1;
  807. } else if (STATIC) {
  808. target = global_1[TARGET] || setGlobal(TARGET, {});
  809. } else {
  810. target = (global_1[TARGET] || {}).prototype;
  811. }
  812. if (target) for (key in source) {
  813. sourceProperty = source[key];
  814. if (options.noTargetGet) {
  815. descriptor = getOwnPropertyDescriptor(target, key);
  816. targetProperty = descriptor && descriptor.value;
  817. } else targetProperty = target[key];
  818. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  819. // contained in target
  820. if (!FORCED && targetProperty !== undefined) {
  821. if (typeof sourceProperty == typeof targetProperty) continue;
  822. copyConstructorProperties(sourceProperty, targetProperty);
  823. }
  824. // add a flag to not completely full polyfills
  825. if (options.sham || (targetProperty && targetProperty.sham)) {
  826. createNonEnumerableProperty(sourceProperty, 'sham', true);
  827. }
  828. defineBuiltIn(target, key, sourceProperty, options);
  829. }
  830. };
  831. // `Object.keys` method
  832. // https://tc39.es/ecma262/#sec-object.keys
  833. // eslint-disable-next-line es-x/no-object-keys -- safe
  834. var objectKeys = Object.keys || function keys(O) {
  835. return objectKeysInternal(O, enumBugKeys);
  836. };
  837. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  838. var propertyIsEnumerable = functionUncurryThis($propertyIsEnumerable);
  839. var push$1 = functionUncurryThis([].push);
  840. // `Object.{ entries, values }` methods implementation
  841. var createMethod$2 = function (TO_ENTRIES) {
  842. return function (it) {
  843. var O = toIndexedObject(it);
  844. var keys = objectKeys(O);
  845. var length = keys.length;
  846. var i = 0;
  847. var result = [];
  848. var key;
  849. while (length > i) {
  850. key = keys[i++];
  851. if (!descriptors || propertyIsEnumerable(O, key)) {
  852. push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  853. }
  854. }
  855. return result;
  856. };
  857. };
  858. var objectToArray = {
  859. // `Object.entries` method
  860. // https://tc39.es/ecma262/#sec-object.entries
  861. entries: createMethod$2(true),
  862. // `Object.values` method
  863. // https://tc39.es/ecma262/#sec-object.values
  864. values: createMethod$2(false)
  865. };
  866. var $entries = objectToArray.entries;
  867. // `Object.entries` method
  868. // https://tc39.es/ecma262/#sec-object.entries
  869. _export({ target: 'Object', stat: true }, {
  870. entries: function entries(O) {
  871. return $entries(O);
  872. }
  873. });
  874. var bind = functionUncurryThis(functionUncurryThis.bind);
  875. // optional / simple context binding
  876. var functionBindContext = function (fn, that) {
  877. aCallable(fn);
  878. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  879. return fn.apply(that, arguments);
  880. };
  881. };
  882. // `IsArray` abstract operation
  883. // https://tc39.es/ecma262/#sec-isarray
  884. // eslint-disable-next-line es-x/no-array-isarray -- safe
  885. var isArray = Array.isArray || function isArray(argument) {
  886. return classofRaw(argument) == 'Array';
  887. };
  888. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  889. var test = {};
  890. test[TO_STRING_TAG$1] = 'z';
  891. var toStringTagSupport = String(test) === '[object z]';
  892. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  893. var Object$1 = global_1.Object;
  894. // ES3 wrong here
  895. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  896. // fallback for IE11 Script Access Denied error
  897. var tryGet = function (it, key) {
  898. try {
  899. return it[key];
  900. } catch (error) { /* empty */ }
  901. };
  902. // getting tag from ES6+ `Object.prototype.toString`
  903. var classof = toStringTagSupport ? classofRaw : function (it) {
  904. var O, tag, result;
  905. return it === undefined ? 'Undefined' : it === null ? 'Null'
  906. // @@toStringTag case
  907. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  908. // builtinTag case
  909. : CORRECT_ARGUMENTS ? classofRaw(O)
  910. // ES3 arguments fallback
  911. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  912. };
  913. var noop = function () { /* empty */ };
  914. var empty = [];
  915. var construct = getBuiltIn('Reflect', 'construct');
  916. var constructorRegExp = /^\s*(?:class|function)\b/;
  917. var exec$1 = functionUncurryThis(constructorRegExp.exec);
  918. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  919. var isConstructorModern = function isConstructor(argument) {
  920. if (!isCallable(argument)) return false;
  921. try {
  922. construct(noop, empty, argument);
  923. return true;
  924. } catch (error) {
  925. return false;
  926. }
  927. };
  928. var isConstructorLegacy = function isConstructor(argument) {
  929. if (!isCallable(argument)) return false;
  930. switch (classof(argument)) {
  931. case 'AsyncFunction':
  932. case 'GeneratorFunction':
  933. case 'AsyncGeneratorFunction': return false;
  934. }
  935. try {
  936. // we can't check .prototype since constructors produced by .bind haven't it
  937. // `Function#toString` throws on some built-it function in some legacy engines
  938. // (for example, `DOMQuad` and similar in FF41-)
  939. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  940. } catch (error) {
  941. return true;
  942. }
  943. };
  944. isConstructorLegacy.sham = true;
  945. // `IsConstructor` abstract operation
  946. // https://tc39.es/ecma262/#sec-isconstructor
  947. var isConstructor = !construct || fails(function () {
  948. var called;
  949. return isConstructorModern(isConstructorModern.call)
  950. || !isConstructorModern(Object)
  951. || !isConstructorModern(function () { called = true; })
  952. || called;
  953. }) ? isConstructorLegacy : isConstructorModern;
  954. var SPECIES$1 = wellKnownSymbol('species');
  955. var Array$1 = global_1.Array;
  956. // a part of `ArraySpeciesCreate` abstract operation
  957. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  958. var arraySpeciesConstructor = function (originalArray) {
  959. var C;
  960. if (isArray(originalArray)) {
  961. C = originalArray.constructor;
  962. // cross-realm fallback
  963. if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
  964. else if (isObject(C)) {
  965. C = C[SPECIES$1];
  966. if (C === null) C = undefined;
  967. }
  968. } return C === undefined ? Array$1 : C;
  969. };
  970. // `ArraySpeciesCreate` abstract operation
  971. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  972. var arraySpeciesCreate = function (originalArray, length) {
  973. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  974. };
  975. var push = functionUncurryThis([].push);
  976. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  977. var createMethod$1 = function (TYPE) {
  978. var IS_MAP = TYPE == 1;
  979. var IS_FILTER = TYPE == 2;
  980. var IS_SOME = TYPE == 3;
  981. var IS_EVERY = TYPE == 4;
  982. var IS_FIND_INDEX = TYPE == 6;
  983. var IS_FILTER_REJECT = TYPE == 7;
  984. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  985. return function ($this, callbackfn, that, specificCreate) {
  986. var O = toObject($this);
  987. var self = indexedObject(O);
  988. var boundFunction = functionBindContext(callbackfn, that);
  989. var length = lengthOfArrayLike(self);
  990. var index = 0;
  991. var create = specificCreate || arraySpeciesCreate;
  992. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  993. var value, result;
  994. for (;length > index; index++) if (NO_HOLES || index in self) {
  995. value = self[index];
  996. result = boundFunction(value, index, O);
  997. if (TYPE) {
  998. if (IS_MAP) target[index] = result; // map
  999. else if (result) switch (TYPE) {
  1000. case 3: return true; // some
  1001. case 5: return value; // find
  1002. case 6: return index; // findIndex
  1003. case 2: push(target, value); // filter
  1004. } else switch (TYPE) {
  1005. case 4: return false; // every
  1006. case 7: push(target, value); // filterReject
  1007. }
  1008. }
  1009. }
  1010. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1011. };
  1012. };
  1013. var arrayIteration = {
  1014. // `Array.prototype.forEach` method
  1015. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1016. forEach: createMethod$1(0),
  1017. // `Array.prototype.map` method
  1018. // https://tc39.es/ecma262/#sec-array.prototype.map
  1019. map: createMethod$1(1),
  1020. // `Array.prototype.filter` method
  1021. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1022. filter: createMethod$1(2),
  1023. // `Array.prototype.some` method
  1024. // https://tc39.es/ecma262/#sec-array.prototype.some
  1025. some: createMethod$1(3),
  1026. // `Array.prototype.every` method
  1027. // https://tc39.es/ecma262/#sec-array.prototype.every
  1028. every: createMethod$1(4),
  1029. // `Array.prototype.find` method
  1030. // https://tc39.es/ecma262/#sec-array.prototype.find
  1031. find: createMethod$1(5),
  1032. // `Array.prototype.findIndex` method
  1033. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1034. findIndex: createMethod$1(6),
  1035. // `Array.prototype.filterReject` method
  1036. // https://github.com/tc39/proposal-array-filtering
  1037. filterReject: createMethod$1(7)
  1038. };
  1039. // `Object.defineProperties` method
  1040. // https://tc39.es/ecma262/#sec-object.defineproperties
  1041. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  1042. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  1043. anObject(O);
  1044. var props = toIndexedObject(Properties);
  1045. var keys = objectKeys(Properties);
  1046. var length = keys.length;
  1047. var index = 0;
  1048. var key;
  1049. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  1050. return O;
  1051. };
  1052. var objectDefineProperties = {
  1053. f: f
  1054. };
  1055. var html = getBuiltIn('document', 'documentElement');
  1056. /* global ActiveXObject -- old IE, WSH */
  1057. var GT = '>';
  1058. var LT = '<';
  1059. var PROTOTYPE = 'prototype';
  1060. var SCRIPT = 'script';
  1061. var IE_PROTO = sharedKey('IE_PROTO');
  1062. var EmptyConstructor = function () { /* empty */ };
  1063. var scriptTag = function (content) {
  1064. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1065. };
  1066. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1067. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1068. activeXDocument.write(scriptTag(''));
  1069. activeXDocument.close();
  1070. var temp = activeXDocument.parentWindow.Object;
  1071. activeXDocument = null; // avoid memory leak
  1072. return temp;
  1073. };
  1074. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1075. var NullProtoObjectViaIFrame = function () {
  1076. // Thrash, waste and sodomy: IE GC bug
  1077. var iframe = documentCreateElement('iframe');
  1078. var JS = 'java' + SCRIPT + ':';
  1079. var iframeDocument;
  1080. iframe.style.display = 'none';
  1081. html.appendChild(iframe);
  1082. // https://github.com/zloirock/core-js/issues/475
  1083. iframe.src = String(JS);
  1084. iframeDocument = iframe.contentWindow.document;
  1085. iframeDocument.open();
  1086. iframeDocument.write(scriptTag('document.F=Object'));
  1087. iframeDocument.close();
  1088. return iframeDocument.F;
  1089. };
  1090. // Check for document.domain and active x support
  1091. // No need to use active x approach when document.domain is not set
  1092. // see https://github.com/es-shims/es5-shim/issues/150
  1093. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1094. // avoid IE GC bug
  1095. var activeXDocument;
  1096. var NullProtoObject = function () {
  1097. try {
  1098. activeXDocument = new ActiveXObject('htmlfile');
  1099. } catch (error) { /* ignore */ }
  1100. NullProtoObject = typeof document != 'undefined'
  1101. ? document.domain && activeXDocument
  1102. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1103. : NullProtoObjectViaIFrame()
  1104. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1105. var length = enumBugKeys.length;
  1106. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1107. return NullProtoObject();
  1108. };
  1109. hiddenKeys$1[IE_PROTO] = true;
  1110. // `Object.create` method
  1111. // https://tc39.es/ecma262/#sec-object.create
  1112. // eslint-disable-next-line es-x/no-object-create -- safe
  1113. var objectCreate = Object.create || function create(O, Properties) {
  1114. var result;
  1115. if (O !== null) {
  1116. EmptyConstructor[PROTOTYPE] = anObject(O);
  1117. result = new EmptyConstructor();
  1118. EmptyConstructor[PROTOTYPE] = null;
  1119. // add "__proto__" for Object.getPrototypeOf polyfill
  1120. result[IE_PROTO] = O;
  1121. } else result = NullProtoObject();
  1122. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  1123. };
  1124. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1125. var ArrayPrototype = Array.prototype;
  1126. // Array.prototype[@@unscopables]
  1127. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1128. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1129. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1130. configurable: true,
  1131. value: objectCreate(null)
  1132. });
  1133. }
  1134. // add a key to Array.prototype[@@unscopables]
  1135. var addToUnscopables = function (key) {
  1136. ArrayPrototype[UNSCOPABLES][key] = true;
  1137. };
  1138. var $find = arrayIteration.find;
  1139. var FIND = 'find';
  1140. var SKIPS_HOLES = true;
  1141. // Shouldn't skip holes
  1142. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1143. // `Array.prototype.find` method
  1144. // https://tc39.es/ecma262/#sec-array.prototype.find
  1145. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1146. find: function find(callbackfn /* , that = undefined */) {
  1147. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1148. }
  1149. });
  1150. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1151. addToUnscopables(FIND);
  1152. // `Object.prototype.toString` method implementation
  1153. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1154. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  1155. return '[object ' + classof(this) + ']';
  1156. };
  1157. // `Object.prototype.toString` method
  1158. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1159. if (!toStringTagSupport) {
  1160. defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
  1161. }
  1162. var String$1 = global_1.String;
  1163. var toString_1 = function (argument) {
  1164. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1165. return String$1(argument);
  1166. };
  1167. // a string of all valid unicode whitespaces
  1168. var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1169. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1170. var replace = functionUncurryThis(''.replace);
  1171. var whitespace = '[' + whitespaces + ']';
  1172. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1173. var rtrim = RegExp(whitespace + whitespace + '*$');
  1174. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1175. var createMethod = function (TYPE) {
  1176. return function ($this) {
  1177. var string = toString_1(requireObjectCoercible($this));
  1178. if (TYPE & 1) string = replace(string, ltrim, '');
  1179. if (TYPE & 2) string = replace(string, rtrim, '');
  1180. return string;
  1181. };
  1182. };
  1183. var stringTrim = {
  1184. // `String.prototype.{ trimLeft, trimStart }` methods
  1185. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1186. start: createMethod(1),
  1187. // `String.prototype.{ trimRight, trimEnd }` methods
  1188. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1189. end: createMethod(2),
  1190. // `String.prototype.trim` method
  1191. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1192. trim: createMethod(3)
  1193. };
  1194. var trim = stringTrim.trim;
  1195. var $parseInt = global_1.parseInt;
  1196. var Symbol$1 = global_1.Symbol;
  1197. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1198. var hex = /^[+-]?0x/i;
  1199. var exec = functionUncurryThis(hex.exec);
  1200. var FORCED$1 = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22
  1201. // MS Edge 18- broken with boxed symbols
  1202. || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));
  1203. // `parseInt` method
  1204. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1205. var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
  1206. var S = trim(toString_1(string));
  1207. return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  1208. } : $parseInt;
  1209. // `parseInt` method
  1210. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1211. _export({ global: true, forced: parseInt != numberParseInt }, {
  1212. parseInt: numberParseInt
  1213. });
  1214. var SPECIES = wellKnownSymbol('species');
  1215. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1216. // We can't use this feature detection in V8 since it causes
  1217. // deoptimization and serious performance degradation
  1218. // https://github.com/zloirock/core-js/issues/677
  1219. return engineV8Version >= 51 || !fails(function () {
  1220. var array = [];
  1221. var constructor = array.constructor = {};
  1222. constructor[SPECIES] = function () {
  1223. return { foo: 1 };
  1224. };
  1225. return array[METHOD_NAME](Boolean).foo !== 1;
  1226. });
  1227. };
  1228. var $filter = arrayIteration.filter;
  1229. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1230. // `Array.prototype.filter` method
  1231. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1232. // with adding support of @@species
  1233. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1234. filter: function filter(callbackfn /* , thisArg */) {
  1235. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1236. }
  1237. });
  1238. var createProperty = function (object, key, value) {
  1239. var propertyKey = toPropertyKey(key);
  1240. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1241. else object[propertyKey] = value;
  1242. };
  1243. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1244. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1245. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1246. var TypeError$1 = global_1.TypeError;
  1247. // We can't use this feature detection in V8 since it causes
  1248. // deoptimization and serious performance degradation
  1249. // https://github.com/zloirock/core-js/issues/679
  1250. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1251. var array = [];
  1252. array[IS_CONCAT_SPREADABLE] = false;
  1253. return array.concat()[0] !== array;
  1254. });
  1255. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1256. var isConcatSpreadable = function (O) {
  1257. if (!isObject(O)) return false;
  1258. var spreadable = O[IS_CONCAT_SPREADABLE];
  1259. return spreadable !== undefined ? !!spreadable : isArray(O);
  1260. };
  1261. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1262. // `Array.prototype.concat` method
  1263. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1264. // with adding support of @@isConcatSpreadable and @@species
  1265. _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1266. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1267. concat: function concat(arg) {
  1268. var O = toObject(this);
  1269. var A = arraySpeciesCreate(O, 0);
  1270. var n = 0;
  1271. var i, k, length, len, E;
  1272. for (i = -1, length = arguments.length; i < length; i++) {
  1273. E = i === -1 ? O : arguments[i];
  1274. if (isConcatSpreadable(E)) {
  1275. len = lengthOfArrayLike(E);
  1276. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1277. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1278. } else {
  1279. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1280. createProperty(A, n++, E);
  1281. }
  1282. }
  1283. A.length = n;
  1284. return A;
  1285. }
  1286. });
  1287. /**
  1288. * @author: Dennis Hernández
  1289. * @webSite: http://djhvscf.github.io/Blog
  1290. * @update: https://github.com/wenzhixin
  1291. * @version: v1.2.0
  1292. */
  1293. $__default["default"].akottr.dragtable.prototype._restoreState = function (persistObj) {
  1294. var i = 0;
  1295. for (var _i = 0, _Object$entries = Object.entries(persistObj); _i < _Object$entries.length; _i++) {
  1296. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  1297. field = _Object$entries$_i[0],
  1298. value = _Object$entries$_i[1];
  1299. var $th = this.originalTable.el.find("th[data-field=\"".concat(field, "\"]"));
  1300. if (!$th.length) {
  1301. i++;
  1302. continue;
  1303. }
  1304. this.originalTable.startIndex = $th.prevAll().length + 1;
  1305. this.originalTable.endIndex = parseInt(value, 10) + 1 - i;
  1306. this._bubbleCols();
  1307. }
  1308. }; // From MDN site, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
  1309. var filterFn = function filterFn() {
  1310. if (!Array.prototype.filter) {
  1311. Array.prototype.filter = function (fun
  1312. /* , thisArg*/
  1313. ) {
  1314. if (this === undefined || this === null) {
  1315. throw new TypeError();
  1316. }
  1317. var t = Object(this);
  1318. var len = t.length >>> 0;
  1319. if (typeof fun !== 'function') {
  1320. throw new TypeError();
  1321. }
  1322. var res = [];
  1323. var thisArg = arguments.length >= 2 ? arguments[1] : undefined;
  1324. for (var i = 0; i < len; i++) {
  1325. if (i in t) {
  1326. var val = t[i]; // NOTE: Technically this should Object.defineProperty at
  1327. // the next index, as push can be affected by
  1328. // properties on Object.prototype and Array.prototype.
  1329. // But this method's new, and collisions should be
  1330. // rare, so use the more-compatible alternative.
  1331. if (fun.call(thisArg, val, i, t)) {
  1332. res.push(val);
  1333. }
  1334. }
  1335. }
  1336. return res;
  1337. };
  1338. }
  1339. };
  1340. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1341. reorderableColumns: false,
  1342. maxMovingRows: 10,
  1343. // eslint-disable-next-line no-unused-vars
  1344. onReorderColumn: function onReorderColumn(headerFields) {
  1345. return false;
  1346. },
  1347. dragaccept: null
  1348. });
  1349. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  1350. 'reorder-column.bs.table': 'onReorderColumn'
  1351. });
  1352. $__default["default"].fn.bootstrapTable.methods.push('orderColumns');
  1353. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1354. _inherits(_class, _$$BootstrapTable);
  1355. var _super = _createSuper(_class);
  1356. function _class() {
  1357. _classCallCheck(this, _class);
  1358. return _super.apply(this, arguments);
  1359. }
  1360. _createClass(_class, [{
  1361. key: "initHeader",
  1362. value: function initHeader() {
  1363. var _get2;
  1364. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1365. args[_key] = arguments[_key];
  1366. }
  1367. (_get2 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get2, [this].concat(args));
  1368. if (!this.options.reorderableColumns) {
  1369. return;
  1370. }
  1371. this.makeRowsReorderable();
  1372. }
  1373. }, {
  1374. key: "_toggleColumn",
  1375. value: function _toggleColumn() {
  1376. var _get3;
  1377. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1378. args[_key2] = arguments[_key2];
  1379. }
  1380. (_get3 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get3, [this].concat(args));
  1381. if (!this.options.reorderableColumns) {
  1382. return;
  1383. }
  1384. this.makeRowsReorderable();
  1385. }
  1386. }, {
  1387. key: "toggleView",
  1388. value: function toggleView() {
  1389. var _get4;
  1390. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1391. args[_key3] = arguments[_key3];
  1392. }
  1393. (_get4 = _get(_getPrototypeOf(_class.prototype), "toggleView", this)).call.apply(_get4, [this].concat(args));
  1394. if (!this.options.reorderableColumns) {
  1395. return;
  1396. }
  1397. if (this.options.cardView) {
  1398. return;
  1399. }
  1400. this.makeRowsReorderable();
  1401. }
  1402. }, {
  1403. key: "resetView",
  1404. value: function resetView() {
  1405. var _get5;
  1406. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1407. args[_key4] = arguments[_key4];
  1408. }
  1409. (_get5 = _get(_getPrototypeOf(_class.prototype), "resetView", this)).call.apply(_get5, [this].concat(args));
  1410. if (!this.options.reorderableColumns) {
  1411. return;
  1412. }
  1413. this.makeRowsReorderable();
  1414. }
  1415. }, {
  1416. key: "makeRowsReorderable",
  1417. value: function makeRowsReorderable() {
  1418. var _this = this;
  1419. var order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  1420. try {
  1421. $__default["default"](this.$el).dragtable('destroy');
  1422. } catch (e) {// do nothing
  1423. }
  1424. $__default["default"](this.$el).dragtable({
  1425. maxMovingRows: this.options.maxMovingRows,
  1426. dragaccept: this.options.dragaccept,
  1427. clickDelay: 200,
  1428. dragHandle: '.th-inner',
  1429. restoreState: order ? order : this.columnsSortOrder,
  1430. beforeStop: function beforeStop(table) {
  1431. var sortOrder = {};
  1432. table.el.find('th').each(function (i, el) {
  1433. sortOrder[$__default["default"](el).data('field')] = i;
  1434. });
  1435. _this.columnsSortOrder = sortOrder;
  1436. if (_this.options.cookie) {
  1437. _this.persistReorderColumnsState(_this);
  1438. }
  1439. var ths = [];
  1440. var formatters = [];
  1441. var columns = [];
  1442. var columnsHidden = [];
  1443. var columnIndex = -1;
  1444. var optionsColumns = [];
  1445. _this.$header.find('th:not(.detail)').each(function (i, el) {
  1446. ths.push($__default["default"](el).data('field'));
  1447. formatters.push($__default["default"](el).data('formatter'));
  1448. }); // Exist columns not shown
  1449. if (ths.length < _this.columns.length) {
  1450. columnsHidden = _this.columns.filter(function (column) {
  1451. return !column.visible;
  1452. });
  1453. for (var i = 0; i < columnsHidden.length; i++) {
  1454. ths.push(columnsHidden[i].field);
  1455. formatters.push(columnsHidden[i].formatter);
  1456. }
  1457. }
  1458. for (var _i2 = 0; _i2 < ths.length; _i2++) {
  1459. columnIndex = _this.fieldsColumnsIndex[ths[_i2]];
  1460. if (columnIndex !== -1) {
  1461. _this.fieldsColumnsIndex[ths[_i2]] = _i2;
  1462. _this.columns[columnIndex].fieldIndex = _i2;
  1463. columns.push(_this.columns[columnIndex]);
  1464. }
  1465. }
  1466. _this.columns = columns;
  1467. filterFn(); // Support <IE9
  1468. $__default["default"].each(_this.columns, function (i, column) {
  1469. var found = false;
  1470. var field = column.field;
  1471. _this.options.columns[0].filter(function (item) {
  1472. if (!found && item['field'] === field) {
  1473. optionsColumns.push(item);
  1474. found = true;
  1475. return false;
  1476. }
  1477. return true;
  1478. });
  1479. });
  1480. _this.options.columns[0] = optionsColumns;
  1481. _this.header.fields = ths;
  1482. _this.header.formatters = formatters;
  1483. _this.initHeader();
  1484. _this.initToolbar();
  1485. _this.initSearchText();
  1486. _this.initBody();
  1487. _this.resetView();
  1488. _this.trigger('reorder-column', ths);
  1489. }
  1490. });
  1491. }
  1492. }, {
  1493. key: "orderColumns",
  1494. value: function orderColumns(order) {
  1495. this.columnsSortOrder = order;
  1496. this.makeRowsReorderable();
  1497. }
  1498. }]);
  1499. return _class;
  1500. }($__default["default"].BootstrapTable);
  1501. }));