bootstrap-table-multiple-sort.js 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602
  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 ($$a) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$a);
  8. function _typeof(obj) {
  9. "@babel/helpers - typeof";
  10. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  11. return typeof obj;
  12. } : function (obj) {
  13. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  14. }, _typeof(obj);
  15. }
  16. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  17. var check = function (it) {
  18. return it && it.Math == Math && it;
  19. };
  20. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  21. var global$t =
  22. // eslint-disable-next-line es-x/no-global-this -- safe
  23. check(typeof globalThis == 'object' && globalThis) ||
  24. check(typeof window == 'object' && window) ||
  25. // eslint-disable-next-line no-restricted-globals -- safe
  26. check(typeof self == 'object' && self) ||
  27. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  28. // eslint-disable-next-line no-new-func -- fallback
  29. (function () { return this; })() || Function('return this')();
  30. var objectGetOwnPropertyDescriptor = {};
  31. var fails$h = function (exec) {
  32. try {
  33. return !!exec();
  34. } catch (error) {
  35. return true;
  36. }
  37. };
  38. var fails$g = fails$h;
  39. // Detect IE8's incomplete defineProperty implementation
  40. var descriptors = !fails$g(function () {
  41. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  42. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  43. });
  44. var fails$f = fails$h;
  45. var functionBindNative = !fails$f(function () {
  46. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  47. var test = (function () { /* empty */ }).bind();
  48. // eslint-disable-next-line no-prototype-builtins -- safe
  49. return typeof test != 'function' || test.hasOwnProperty('prototype');
  50. });
  51. var NATIVE_BIND$2 = functionBindNative;
  52. var call$6 = Function.prototype.call;
  53. var functionCall = NATIVE_BIND$2 ? call$6.bind(call$6) : function () {
  54. return call$6.apply(call$6, arguments);
  55. };
  56. var objectPropertyIsEnumerable = {};
  57. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  58. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  59. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  60. // Nashorn ~ JDK8 bug
  61. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  62. // `Object.prototype.propertyIsEnumerable` method implementation
  63. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  64. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  65. var descriptor = getOwnPropertyDescriptor$1(this, V);
  66. return !!descriptor && descriptor.enumerable;
  67. } : $propertyIsEnumerable;
  68. var createPropertyDescriptor$3 = function (bitmap, value) {
  69. return {
  70. enumerable: !(bitmap & 1),
  71. configurable: !(bitmap & 2),
  72. writable: !(bitmap & 4),
  73. value: value
  74. };
  75. };
  76. var NATIVE_BIND$1 = functionBindNative;
  77. var FunctionPrototype$1 = Function.prototype;
  78. var bind$2 = FunctionPrototype$1.bind;
  79. var call$5 = FunctionPrototype$1.call;
  80. var uncurryThis$i = NATIVE_BIND$1 && bind$2.bind(call$5, call$5);
  81. var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
  82. return fn && uncurryThis$i(fn);
  83. } : function (fn) {
  84. return fn && function () {
  85. return call$5.apply(fn, arguments);
  86. };
  87. };
  88. var uncurryThis$h = functionUncurryThis;
  89. var toString$6 = uncurryThis$h({}.toString);
  90. var stringSlice = uncurryThis$h(''.slice);
  91. var classofRaw$1 = function (it) {
  92. return stringSlice(toString$6(it), 8, -1);
  93. };
  94. var global$s = global$t;
  95. var uncurryThis$g = functionUncurryThis;
  96. var fails$e = fails$h;
  97. var classof$5 = classofRaw$1;
  98. var Object$4 = global$s.Object;
  99. var split = uncurryThis$g(''.split);
  100. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  101. var indexedObject = fails$e(function () {
  102. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  103. // eslint-disable-next-line no-prototype-builtins -- safe
  104. return !Object$4('z').propertyIsEnumerable(0);
  105. }) ? function (it) {
  106. return classof$5(it) == 'String' ? split(it, '') : Object$4(it);
  107. } : Object$4;
  108. var global$r = global$t;
  109. var TypeError$9 = global$r.TypeError;
  110. // `RequireObjectCoercible` abstract operation
  111. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  112. var requireObjectCoercible$3 = function (it) {
  113. if (it == undefined) throw TypeError$9("Can't call method on " + it);
  114. return it;
  115. };
  116. // toObject with fallback for non-array-like ES3 strings
  117. var IndexedObject$2 = indexedObject;
  118. var requireObjectCoercible$2 = requireObjectCoercible$3;
  119. var toIndexedObject$5 = function (it) {
  120. return IndexedObject$2(requireObjectCoercible$2(it));
  121. };
  122. // `IsCallable` abstract operation
  123. // https://tc39.es/ecma262/#sec-iscallable
  124. var isCallable$c = function (argument) {
  125. return typeof argument == 'function';
  126. };
  127. var isCallable$b = isCallable$c;
  128. var isObject$8 = function (it) {
  129. return typeof it == 'object' ? it !== null : isCallable$b(it);
  130. };
  131. var global$q = global$t;
  132. var isCallable$a = isCallable$c;
  133. var aFunction = function (argument) {
  134. return isCallable$a(argument) ? argument : undefined;
  135. };
  136. var getBuiltIn$5 = function (namespace, method) {
  137. return arguments.length < 2 ? aFunction(global$q[namespace]) : global$q[namespace] && global$q[namespace][method];
  138. };
  139. var uncurryThis$f = functionUncurryThis;
  140. var objectIsPrototypeOf = uncurryThis$f({}.isPrototypeOf);
  141. var getBuiltIn$4 = getBuiltIn$5;
  142. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  143. var global$p = global$t;
  144. var userAgent$2 = engineUserAgent;
  145. var process = global$p.process;
  146. var Deno = global$p.Deno;
  147. var versions = process && process.versions || Deno && Deno.version;
  148. var v8 = versions && versions.v8;
  149. var match, version;
  150. if (v8) {
  151. match = v8.split('.');
  152. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  153. // but their correct versions are not interesting for us
  154. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  155. }
  156. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  157. // so check `userAgent` even if `.v8` exists, but 0
  158. if (!version && userAgent$2) {
  159. match = userAgent$2.match(/Edge\/(\d+)/);
  160. if (!match || match[1] >= 74) {
  161. match = userAgent$2.match(/Chrome\/(\d+)/);
  162. if (match) version = +match[1];
  163. }
  164. }
  165. var engineV8Version = version;
  166. /* eslint-disable es-x/no-symbol -- required for testing */
  167. var V8_VERSION$2 = engineV8Version;
  168. var fails$d = fails$h;
  169. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  170. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
  171. var symbol = Symbol();
  172. // Chrome 38 Symbol has incorrect toString conversion
  173. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  174. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  175. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  176. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  177. });
  178. /* eslint-disable es-x/no-symbol -- required for testing */
  179. var NATIVE_SYMBOL$1 = nativeSymbol;
  180. var useSymbolAsUid = NATIVE_SYMBOL$1
  181. && !Symbol.sham
  182. && typeof Symbol.iterator == 'symbol';
  183. var global$o = global$t;
  184. var getBuiltIn$3 = getBuiltIn$5;
  185. var isCallable$9 = isCallable$c;
  186. var isPrototypeOf$1 = objectIsPrototypeOf;
  187. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  188. var Object$3 = global$o.Object;
  189. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  190. return typeof it == 'symbol';
  191. } : function (it) {
  192. var $Symbol = getBuiltIn$3('Symbol');
  193. return isCallable$9($Symbol) && isPrototypeOf$1($Symbol.prototype, Object$3(it));
  194. };
  195. var global$n = global$t;
  196. var String$3 = global$n.String;
  197. var tryToString$1 = function (argument) {
  198. try {
  199. return String$3(argument);
  200. } catch (error) {
  201. return 'Object';
  202. }
  203. };
  204. var global$m = global$t;
  205. var isCallable$8 = isCallable$c;
  206. var tryToString = tryToString$1;
  207. var TypeError$8 = global$m.TypeError;
  208. // `Assert: IsCallable(argument) is true`
  209. var aCallable$3 = function (argument) {
  210. if (isCallable$8(argument)) return argument;
  211. throw TypeError$8(tryToString(argument) + ' is not a function');
  212. };
  213. var aCallable$2 = aCallable$3;
  214. // `GetMethod` abstract operation
  215. // https://tc39.es/ecma262/#sec-getmethod
  216. var getMethod$1 = function (V, P) {
  217. var func = V[P];
  218. return func == null ? undefined : aCallable$2(func);
  219. };
  220. var global$l = global$t;
  221. var call$4 = functionCall;
  222. var isCallable$7 = isCallable$c;
  223. var isObject$7 = isObject$8;
  224. var TypeError$7 = global$l.TypeError;
  225. // `OrdinaryToPrimitive` abstract operation
  226. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  227. var ordinaryToPrimitive$1 = function (input, pref) {
  228. var fn, val;
  229. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  230. if (isCallable$7(fn = input.valueOf) && !isObject$7(val = call$4(fn, input))) return val;
  231. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  232. throw TypeError$7("Can't convert object to primitive value");
  233. };
  234. var shared$3 = {exports: {}};
  235. var global$k = global$t;
  236. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  237. var defineProperty$2 = Object.defineProperty;
  238. var setGlobal$3 = function (key, value) {
  239. try {
  240. defineProperty$2(global$k, key, { value: value, configurable: true, writable: true });
  241. } catch (error) {
  242. global$k[key] = value;
  243. } return value;
  244. };
  245. var global$j = global$t;
  246. var setGlobal$2 = setGlobal$3;
  247. var SHARED = '__core-js_shared__';
  248. var store$3 = global$j[SHARED] || setGlobal$2(SHARED, {});
  249. var sharedStore = store$3;
  250. var store$2 = sharedStore;
  251. (shared$3.exports = function (key, value) {
  252. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  253. })('versions', []).push({
  254. version: '3.22.5',
  255. mode: 'global',
  256. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  257. license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
  258. source: 'https://github.com/zloirock/core-js'
  259. });
  260. var global$i = global$t;
  261. var requireObjectCoercible$1 = requireObjectCoercible$3;
  262. var Object$2 = global$i.Object;
  263. // `ToObject` abstract operation
  264. // https://tc39.es/ecma262/#sec-toobject
  265. var toObject$6 = function (argument) {
  266. return Object$2(requireObjectCoercible$1(argument));
  267. };
  268. var uncurryThis$e = functionUncurryThis;
  269. var toObject$5 = toObject$6;
  270. var hasOwnProperty = uncurryThis$e({}.hasOwnProperty);
  271. // `HasOwnProperty` abstract operation
  272. // https://tc39.es/ecma262/#sec-hasownproperty
  273. // eslint-disable-next-line es-x/no-object-hasown -- safe
  274. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  275. return hasOwnProperty(toObject$5(it), key);
  276. };
  277. var uncurryThis$d = functionUncurryThis;
  278. var id = 0;
  279. var postfix = Math.random();
  280. var toString$5 = uncurryThis$d(1.0.toString);
  281. var uid$2 = function (key) {
  282. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
  283. };
  284. var global$h = global$t;
  285. var shared$2 = shared$3.exports;
  286. var hasOwn$7 = hasOwnProperty_1;
  287. var uid$1 = uid$2;
  288. var NATIVE_SYMBOL = nativeSymbol;
  289. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  290. var WellKnownSymbolsStore = shared$2('wks');
  291. var Symbol$2 = global$h.Symbol;
  292. var symbolFor = Symbol$2 && Symbol$2['for'];
  293. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  294. var wellKnownSymbol$8 = function (name) {
  295. if (!hasOwn$7(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  296. var description = 'Symbol.' + name;
  297. if (NATIVE_SYMBOL && hasOwn$7(Symbol$2, name)) {
  298. WellKnownSymbolsStore[name] = Symbol$2[name];
  299. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  300. WellKnownSymbolsStore[name] = symbolFor(description);
  301. } else {
  302. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  303. }
  304. } return WellKnownSymbolsStore[name];
  305. };
  306. var global$g = global$t;
  307. var call$3 = functionCall;
  308. var isObject$6 = isObject$8;
  309. var isSymbol$1 = isSymbol$2;
  310. var getMethod = getMethod$1;
  311. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  312. var wellKnownSymbol$7 = wellKnownSymbol$8;
  313. var TypeError$6 = global$g.TypeError;
  314. var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
  315. // `ToPrimitive` abstract operation
  316. // https://tc39.es/ecma262/#sec-toprimitive
  317. var toPrimitive$1 = function (input, pref) {
  318. if (!isObject$6(input) || isSymbol$1(input)) return input;
  319. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  320. var result;
  321. if (exoticToPrim) {
  322. if (pref === undefined) pref = 'default';
  323. result = call$3(exoticToPrim, input, pref);
  324. if (!isObject$6(result) || isSymbol$1(result)) return result;
  325. throw TypeError$6("Can't convert object to primitive value");
  326. }
  327. if (pref === undefined) pref = 'number';
  328. return ordinaryToPrimitive(input, pref);
  329. };
  330. var toPrimitive = toPrimitive$1;
  331. var isSymbol = isSymbol$2;
  332. // `ToPropertyKey` abstract operation
  333. // https://tc39.es/ecma262/#sec-topropertykey
  334. var toPropertyKey$3 = function (argument) {
  335. var key = toPrimitive(argument, 'string');
  336. return isSymbol(key) ? key : key + '';
  337. };
  338. var global$f = global$t;
  339. var isObject$5 = isObject$8;
  340. var document$1 = global$f.document;
  341. // typeof document.createElement is 'object' in old IE
  342. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  343. var documentCreateElement$1 = function (it) {
  344. return EXISTS$1 ? document$1.createElement(it) : {};
  345. };
  346. var DESCRIPTORS$8 = descriptors;
  347. var fails$c = fails$h;
  348. var createElement = documentCreateElement$1;
  349. // Thanks to IE8 for its funny defineProperty
  350. var ie8DomDefine = !DESCRIPTORS$8 && !fails$c(function () {
  351. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  352. return Object.defineProperty(createElement('div'), 'a', {
  353. get: function () { return 7; }
  354. }).a != 7;
  355. });
  356. var DESCRIPTORS$7 = descriptors;
  357. var call$2 = functionCall;
  358. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  359. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  360. var toIndexedObject$4 = toIndexedObject$5;
  361. var toPropertyKey$2 = toPropertyKey$3;
  362. var hasOwn$6 = hasOwnProperty_1;
  363. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  364. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  365. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  366. // `Object.getOwnPropertyDescriptor` method
  367. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  368. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  369. O = toIndexedObject$4(O);
  370. P = toPropertyKey$2(P);
  371. if (IE8_DOM_DEFINE$1) try {
  372. return $getOwnPropertyDescriptor$1(O, P);
  373. } catch (error) { /* empty */ }
  374. if (hasOwn$6(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
  375. };
  376. var objectDefineProperty = {};
  377. var DESCRIPTORS$6 = descriptors;
  378. var fails$b = fails$h;
  379. // V8 ~ Chrome 36-
  380. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  381. var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$b(function () {
  382. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  383. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  384. value: 42,
  385. writable: false
  386. }).prototype != 42;
  387. });
  388. var global$e = global$t;
  389. var isObject$4 = isObject$8;
  390. var String$2 = global$e.String;
  391. var TypeError$5 = global$e.TypeError;
  392. // `Assert: Type(argument) is Object`
  393. var anObject$6 = function (argument) {
  394. if (isObject$4(argument)) return argument;
  395. throw TypeError$5(String$2(argument) + ' is not an object');
  396. };
  397. var global$d = global$t;
  398. var DESCRIPTORS$5 = descriptors;
  399. var IE8_DOM_DEFINE = ie8DomDefine;
  400. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  401. var anObject$5 = anObject$6;
  402. var toPropertyKey$1 = toPropertyKey$3;
  403. var TypeError$4 = global$d.TypeError;
  404. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  405. var $defineProperty = Object.defineProperty;
  406. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  407. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  408. var ENUMERABLE = 'enumerable';
  409. var CONFIGURABLE$1 = 'configurable';
  410. var WRITABLE = 'writable';
  411. // `Object.defineProperty` method
  412. // https://tc39.es/ecma262/#sec-object.defineproperty
  413. objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  414. anObject$5(O);
  415. P = toPropertyKey$1(P);
  416. anObject$5(Attributes);
  417. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  418. var current = $getOwnPropertyDescriptor(O, P);
  419. if (current && current[WRITABLE]) {
  420. O[P] = Attributes.value;
  421. Attributes = {
  422. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  423. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  424. writable: false
  425. };
  426. }
  427. } return $defineProperty(O, P, Attributes);
  428. } : $defineProperty : function defineProperty(O, P, Attributes) {
  429. anObject$5(O);
  430. P = toPropertyKey$1(P);
  431. anObject$5(Attributes);
  432. if (IE8_DOM_DEFINE) try {
  433. return $defineProperty(O, P, Attributes);
  434. } catch (error) { /* empty */ }
  435. if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
  436. if ('value' in Attributes) O[P] = Attributes.value;
  437. return O;
  438. };
  439. var DESCRIPTORS$4 = descriptors;
  440. var definePropertyModule$4 = objectDefineProperty;
  441. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  442. var createNonEnumerableProperty$3 = DESCRIPTORS$4 ? function (object, key, value) {
  443. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  444. } : function (object, key, value) {
  445. object[key] = value;
  446. return object;
  447. };
  448. var makeBuiltIn$2 = {exports: {}};
  449. var DESCRIPTORS$3 = descriptors;
  450. var hasOwn$5 = hasOwnProperty_1;
  451. var FunctionPrototype = Function.prototype;
  452. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  453. var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
  454. var EXISTS = hasOwn$5(FunctionPrototype, 'name');
  455. // additional protection from minified / mangled / dropped function names
  456. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  457. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
  458. var functionName = {
  459. EXISTS: EXISTS,
  460. PROPER: PROPER,
  461. CONFIGURABLE: CONFIGURABLE
  462. };
  463. var uncurryThis$c = functionUncurryThis;
  464. var isCallable$6 = isCallable$c;
  465. var store$1 = sharedStore;
  466. var functionToString = uncurryThis$c(Function.toString);
  467. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  468. if (!isCallable$6(store$1.inspectSource)) {
  469. store$1.inspectSource = function (it) {
  470. return functionToString(it);
  471. };
  472. }
  473. var inspectSource$3 = store$1.inspectSource;
  474. var global$c = global$t;
  475. var isCallable$5 = isCallable$c;
  476. var inspectSource$2 = inspectSource$3;
  477. var WeakMap$1 = global$c.WeakMap;
  478. var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
  479. var shared$1 = shared$3.exports;
  480. var uid = uid$2;
  481. var keys = shared$1('keys');
  482. var sharedKey$2 = function (key) {
  483. return keys[key] || (keys[key] = uid(key));
  484. };
  485. var hiddenKeys$4 = {};
  486. var NATIVE_WEAK_MAP = nativeWeakMap;
  487. var global$b = global$t;
  488. var uncurryThis$b = functionUncurryThis;
  489. var isObject$3 = isObject$8;
  490. var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
  491. var hasOwn$4 = hasOwnProperty_1;
  492. var shared = sharedStore;
  493. var sharedKey$1 = sharedKey$2;
  494. var hiddenKeys$3 = hiddenKeys$4;
  495. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  496. var TypeError$3 = global$b.TypeError;
  497. var WeakMap = global$b.WeakMap;
  498. var set, get, has;
  499. var enforce = function (it) {
  500. return has(it) ? get(it) : set(it, {});
  501. };
  502. var getterFor = function (TYPE) {
  503. return function (it) {
  504. var state;
  505. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  506. throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
  507. } return state;
  508. };
  509. };
  510. if (NATIVE_WEAK_MAP || shared.state) {
  511. var store = shared.state || (shared.state = new WeakMap());
  512. var wmget = uncurryThis$b(store.get);
  513. var wmhas = uncurryThis$b(store.has);
  514. var wmset = uncurryThis$b(store.set);
  515. set = function (it, metadata) {
  516. if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  517. metadata.facade = it;
  518. wmset(store, it, metadata);
  519. return metadata;
  520. };
  521. get = function (it) {
  522. return wmget(store, it) || {};
  523. };
  524. has = function (it) {
  525. return wmhas(store, it);
  526. };
  527. } else {
  528. var STATE = sharedKey$1('state');
  529. hiddenKeys$3[STATE] = true;
  530. set = function (it, metadata) {
  531. if (hasOwn$4(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  532. metadata.facade = it;
  533. createNonEnumerableProperty$2(it, STATE, metadata);
  534. return metadata;
  535. };
  536. get = function (it) {
  537. return hasOwn$4(it, STATE) ? it[STATE] : {};
  538. };
  539. has = function (it) {
  540. return hasOwn$4(it, STATE);
  541. };
  542. }
  543. var internalState = {
  544. set: set,
  545. get: get,
  546. has: has,
  547. enforce: enforce,
  548. getterFor: getterFor
  549. };
  550. var fails$a = fails$h;
  551. var isCallable$4 = isCallable$c;
  552. var hasOwn$3 = hasOwnProperty_1;
  553. var DESCRIPTORS$2 = descriptors;
  554. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  555. var inspectSource$1 = inspectSource$3;
  556. var InternalStateModule = internalState;
  557. var enforceInternalState = InternalStateModule.enforce;
  558. var getInternalState = InternalStateModule.get;
  559. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  560. var defineProperty$1 = Object.defineProperty;
  561. var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$a(function () {
  562. return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  563. });
  564. var TEMPLATE = String(String).split('String');
  565. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  566. if (String(name).slice(0, 7) === 'Symbol(') {
  567. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  568. }
  569. if (options && options.getter) name = 'get ' + name;
  570. if (options && options.setter) name = 'set ' + name;
  571. if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  572. defineProperty$1(value, 'name', { value: name, configurable: true });
  573. }
  574. if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
  575. defineProperty$1(value, 'length', { value: options.arity });
  576. }
  577. if (options && hasOwn$3(options, 'constructor') && options.constructor) {
  578. if (DESCRIPTORS$2) try {
  579. defineProperty$1(value, 'prototype', { writable: false });
  580. } catch (error) { /* empty */ }
  581. } else value.prototype = undefined;
  582. var state = enforceInternalState(value);
  583. if (!hasOwn$3(state, 'source')) {
  584. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  585. } return value;
  586. };
  587. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  588. // eslint-disable-next-line no-extend-native -- required
  589. Function.prototype.toString = makeBuiltIn$1(function toString() {
  590. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  591. }, 'toString');
  592. var global$a = global$t;
  593. var isCallable$3 = isCallable$c;
  594. var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
  595. var makeBuiltIn = makeBuiltIn$2.exports;
  596. var setGlobal$1 = setGlobal$3;
  597. var defineBuiltIn$3 = function (O, key, value, options) {
  598. var unsafe = options ? !!options.unsafe : false;
  599. var simple = options ? !!options.enumerable : false;
  600. var noTargetGet = options ? !!options.noTargetGet : false;
  601. var name = options && options.name !== undefined ? options.name : key;
  602. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  603. if (O === global$a) {
  604. if (simple) O[key] = value;
  605. else setGlobal$1(key, value);
  606. return O;
  607. } else if (!unsafe) {
  608. delete O[key];
  609. } else if (!noTargetGet && O[key]) {
  610. simple = true;
  611. }
  612. if (simple) O[key] = value;
  613. else createNonEnumerableProperty$1(O, key, value);
  614. return O;
  615. };
  616. var objectGetOwnPropertyNames = {};
  617. var ceil = Math.ceil;
  618. var floor$1 = Math.floor;
  619. // `ToIntegerOrInfinity` abstract operation
  620. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  621. var toIntegerOrInfinity$3 = function (argument) {
  622. var number = +argument;
  623. // eslint-disable-next-line no-self-compare -- safe
  624. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  625. };
  626. var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
  627. var max$3 = Math.max;
  628. var min$2 = Math.min;
  629. // Helper for a popular repeating case of the spec:
  630. // Let integer be ? ToInteger(index).
  631. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  632. var toAbsoluteIndex$4 = function (index, length) {
  633. var integer = toIntegerOrInfinity$2(index);
  634. return integer < 0 ? max$3(integer + length, 0) : min$2(integer, length);
  635. };
  636. var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
  637. var min$1 = Math.min;
  638. // `ToLength` abstract operation
  639. // https://tc39.es/ecma262/#sec-tolength
  640. var toLength$1 = function (argument) {
  641. return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  642. };
  643. var toLength = toLength$1;
  644. // `LengthOfArrayLike` abstract operation
  645. // https://tc39.es/ecma262/#sec-lengthofarraylike
  646. var lengthOfArrayLike$7 = function (obj) {
  647. return toLength(obj.length);
  648. };
  649. var toIndexedObject$3 = toIndexedObject$5;
  650. var toAbsoluteIndex$3 = toAbsoluteIndex$4;
  651. var lengthOfArrayLike$6 = lengthOfArrayLike$7;
  652. // `Array.prototype.{ indexOf, includes }` methods implementation
  653. var createMethod$2 = function (IS_INCLUDES) {
  654. return function ($this, el, fromIndex) {
  655. var O = toIndexedObject$3($this);
  656. var length = lengthOfArrayLike$6(O);
  657. var index = toAbsoluteIndex$3(fromIndex, length);
  658. var value;
  659. // Array#includes uses SameValueZero equality algorithm
  660. // eslint-disable-next-line no-self-compare -- NaN check
  661. if (IS_INCLUDES && el != el) while (length > index) {
  662. value = O[index++];
  663. // eslint-disable-next-line no-self-compare -- NaN check
  664. if (value != value) return true;
  665. // Array#indexOf ignores holes, Array#includes - not
  666. } else for (;length > index; index++) {
  667. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  668. } return !IS_INCLUDES && -1;
  669. };
  670. };
  671. var arrayIncludes = {
  672. // `Array.prototype.includes` method
  673. // https://tc39.es/ecma262/#sec-array.prototype.includes
  674. includes: createMethod$2(true),
  675. // `Array.prototype.indexOf` method
  676. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  677. indexOf: createMethod$2(false)
  678. };
  679. var uncurryThis$a = functionUncurryThis;
  680. var hasOwn$2 = hasOwnProperty_1;
  681. var toIndexedObject$2 = toIndexedObject$5;
  682. var indexOf = arrayIncludes.indexOf;
  683. var hiddenKeys$2 = hiddenKeys$4;
  684. var push$2 = uncurryThis$a([].push);
  685. var objectKeysInternal = function (object, names) {
  686. var O = toIndexedObject$2(object);
  687. var i = 0;
  688. var result = [];
  689. var key;
  690. for (key in O) !hasOwn$2(hiddenKeys$2, key) && hasOwn$2(O, key) && push$2(result, key);
  691. // Don't enum bug & hidden keys
  692. while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
  693. ~indexOf(result, key) || push$2(result, key);
  694. }
  695. return result;
  696. };
  697. // IE8- don't enum bug keys
  698. var enumBugKeys$3 = [
  699. 'constructor',
  700. 'hasOwnProperty',
  701. 'isPrototypeOf',
  702. 'propertyIsEnumerable',
  703. 'toLocaleString',
  704. 'toString',
  705. 'valueOf'
  706. ];
  707. var internalObjectKeys$1 = objectKeysInternal;
  708. var enumBugKeys$2 = enumBugKeys$3;
  709. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  710. // `Object.getOwnPropertyNames` method
  711. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  712. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  713. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  714. return internalObjectKeys$1(O, hiddenKeys$1);
  715. };
  716. var objectGetOwnPropertySymbols = {};
  717. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  718. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  719. var getBuiltIn$2 = getBuiltIn$5;
  720. var uncurryThis$9 = functionUncurryThis;
  721. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  722. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  723. var anObject$4 = anObject$6;
  724. var concat$1 = uncurryThis$9([].concat);
  725. // all object keys, includes non-enumerable and symbols
  726. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  727. var keys = getOwnPropertyNamesModule.f(anObject$4(it));
  728. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  729. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  730. };
  731. var hasOwn$1 = hasOwnProperty_1;
  732. var ownKeys = ownKeys$1;
  733. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  734. var definePropertyModule$3 = objectDefineProperty;
  735. var copyConstructorProperties$1 = function (target, source, exceptions) {
  736. var keys = ownKeys(source);
  737. var defineProperty = definePropertyModule$3.f;
  738. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  739. for (var i = 0; i < keys.length; i++) {
  740. var key = keys[i];
  741. if (!hasOwn$1(target, key) && !(exceptions && hasOwn$1(exceptions, key))) {
  742. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  743. }
  744. }
  745. };
  746. var fails$9 = fails$h;
  747. var isCallable$2 = isCallable$c;
  748. var replacement = /#|\.prototype\./;
  749. var isForced$1 = function (feature, detection) {
  750. var value = data[normalize(feature)];
  751. return value == POLYFILL ? true
  752. : value == NATIVE ? false
  753. : isCallable$2(detection) ? fails$9(detection)
  754. : !!detection;
  755. };
  756. var normalize = isForced$1.normalize = function (string) {
  757. return String(string).replace(replacement, '.').toLowerCase();
  758. };
  759. var data = isForced$1.data = {};
  760. var NATIVE = isForced$1.NATIVE = 'N';
  761. var POLYFILL = isForced$1.POLYFILL = 'P';
  762. var isForced_1 = isForced$1;
  763. var global$9 = global$t;
  764. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  765. var createNonEnumerableProperty = createNonEnumerableProperty$3;
  766. var defineBuiltIn$2 = defineBuiltIn$3;
  767. var setGlobal = setGlobal$3;
  768. var copyConstructorProperties = copyConstructorProperties$1;
  769. var isForced = isForced_1;
  770. /*
  771. options.target - name of the target object
  772. options.global - target is the global object
  773. options.stat - export as static methods of target
  774. options.proto - export as prototype methods of target
  775. options.real - real prototype method for the `pure` version
  776. options.forced - export even if the native feature is available
  777. options.bind - bind methods to the target, required for the `pure` version
  778. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  779. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  780. options.sham - add a flag to not completely full polyfills
  781. options.enumerable - export as enumerable property
  782. options.noTargetGet - prevent calling a getter on target
  783. options.name - the .name of the function if it does not match the key
  784. */
  785. var _export = function (options, source) {
  786. var TARGET = options.target;
  787. var GLOBAL = options.global;
  788. var STATIC = options.stat;
  789. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  790. if (GLOBAL) {
  791. target = global$9;
  792. } else if (STATIC) {
  793. target = global$9[TARGET] || setGlobal(TARGET, {});
  794. } else {
  795. target = (global$9[TARGET] || {}).prototype;
  796. }
  797. if (target) for (key in source) {
  798. sourceProperty = source[key];
  799. if (options.noTargetGet) {
  800. descriptor = getOwnPropertyDescriptor(target, key);
  801. targetProperty = descriptor && descriptor.value;
  802. } else targetProperty = target[key];
  803. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  804. // contained in target
  805. if (!FORCED && targetProperty !== undefined) {
  806. if (typeof sourceProperty == typeof targetProperty) continue;
  807. copyConstructorProperties(sourceProperty, targetProperty);
  808. }
  809. // add a flag to not completely full polyfills
  810. if (options.sham || (targetProperty && targetProperty.sham)) {
  811. createNonEnumerableProperty(sourceProperty, 'sham', true);
  812. }
  813. defineBuiltIn$2(target, key, sourceProperty, options);
  814. }
  815. };
  816. var uncurryThis$8 = functionUncurryThis;
  817. var aCallable$1 = aCallable$3;
  818. var NATIVE_BIND = functionBindNative;
  819. var bind$1 = uncurryThis$8(uncurryThis$8.bind);
  820. // optional / simple context binding
  821. var functionBindContext = function (fn, that) {
  822. aCallable$1(fn);
  823. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  824. return fn.apply(that, arguments);
  825. };
  826. };
  827. var classof$4 = classofRaw$1;
  828. // `IsArray` abstract operation
  829. // https://tc39.es/ecma262/#sec-isarray
  830. // eslint-disable-next-line es-x/no-array-isarray -- safe
  831. var isArray$3 = Array.isArray || function isArray(argument) {
  832. return classof$4(argument) == 'Array';
  833. };
  834. var wellKnownSymbol$6 = wellKnownSymbol$8;
  835. var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
  836. var test$1 = {};
  837. test$1[TO_STRING_TAG$1] = 'z';
  838. var toStringTagSupport = String(test$1) === '[object z]';
  839. var global$8 = global$t;
  840. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  841. var isCallable$1 = isCallable$c;
  842. var classofRaw = classofRaw$1;
  843. var wellKnownSymbol$5 = wellKnownSymbol$8;
  844. var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
  845. var Object$1 = global$8.Object;
  846. // ES3 wrong here
  847. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  848. // fallback for IE11 Script Access Denied error
  849. var tryGet = function (it, key) {
  850. try {
  851. return it[key];
  852. } catch (error) { /* empty */ }
  853. };
  854. // getting tag from ES6+ `Object.prototype.toString`
  855. var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  856. var O, tag, result;
  857. return it === undefined ? 'Undefined' : it === null ? 'Null'
  858. // @@toStringTag case
  859. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  860. // builtinTag case
  861. : CORRECT_ARGUMENTS ? classofRaw(O)
  862. // ES3 arguments fallback
  863. : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  864. };
  865. var uncurryThis$7 = functionUncurryThis;
  866. var fails$8 = fails$h;
  867. var isCallable = isCallable$c;
  868. var classof$2 = classof$3;
  869. var getBuiltIn$1 = getBuiltIn$5;
  870. var inspectSource = inspectSource$3;
  871. var noop = function () { /* empty */ };
  872. var empty = [];
  873. var construct = getBuiltIn$1('Reflect', 'construct');
  874. var constructorRegExp = /^\s*(?:class|function)\b/;
  875. var exec = uncurryThis$7(constructorRegExp.exec);
  876. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  877. var isConstructorModern = function isConstructor(argument) {
  878. if (!isCallable(argument)) return false;
  879. try {
  880. construct(noop, empty, argument);
  881. return true;
  882. } catch (error) {
  883. return false;
  884. }
  885. };
  886. var isConstructorLegacy = function isConstructor(argument) {
  887. if (!isCallable(argument)) return false;
  888. switch (classof$2(argument)) {
  889. case 'AsyncFunction':
  890. case 'GeneratorFunction':
  891. case 'AsyncGeneratorFunction': return false;
  892. }
  893. try {
  894. // we can't check .prototype since constructors produced by .bind haven't it
  895. // `Function#toString` throws on some built-it function in some legacy engines
  896. // (for example, `DOMQuad` and similar in FF41-)
  897. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  898. } catch (error) {
  899. return true;
  900. }
  901. };
  902. isConstructorLegacy.sham = true;
  903. // `IsConstructor` abstract operation
  904. // https://tc39.es/ecma262/#sec-isconstructor
  905. var isConstructor$2 = !construct || fails$8(function () {
  906. var called;
  907. return isConstructorModern(isConstructorModern.call)
  908. || !isConstructorModern(Object)
  909. || !isConstructorModern(function () { called = true; })
  910. || called;
  911. }) ? isConstructorLegacy : isConstructorModern;
  912. var global$7 = global$t;
  913. var isArray$2 = isArray$3;
  914. var isConstructor$1 = isConstructor$2;
  915. var isObject$2 = isObject$8;
  916. var wellKnownSymbol$4 = wellKnownSymbol$8;
  917. var SPECIES$2 = wellKnownSymbol$4('species');
  918. var Array$3 = global$7.Array;
  919. // a part of `ArraySpeciesCreate` abstract operation
  920. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  921. var arraySpeciesConstructor$1 = function (originalArray) {
  922. var C;
  923. if (isArray$2(originalArray)) {
  924. C = originalArray.constructor;
  925. // cross-realm fallback
  926. if (isConstructor$1(C) && (C === Array$3 || isArray$2(C.prototype))) C = undefined;
  927. else if (isObject$2(C)) {
  928. C = C[SPECIES$2];
  929. if (C === null) C = undefined;
  930. }
  931. } return C === undefined ? Array$3 : C;
  932. };
  933. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  934. // `ArraySpeciesCreate` abstract operation
  935. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  936. var arraySpeciesCreate$3 = function (originalArray, length) {
  937. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  938. };
  939. var bind = functionBindContext;
  940. var uncurryThis$6 = functionUncurryThis;
  941. var IndexedObject$1 = indexedObject;
  942. var toObject$4 = toObject$6;
  943. var lengthOfArrayLike$5 = lengthOfArrayLike$7;
  944. var arraySpeciesCreate$2 = arraySpeciesCreate$3;
  945. var push$1 = uncurryThis$6([].push);
  946. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  947. var createMethod$1 = function (TYPE) {
  948. var IS_MAP = TYPE == 1;
  949. var IS_FILTER = TYPE == 2;
  950. var IS_SOME = TYPE == 3;
  951. var IS_EVERY = TYPE == 4;
  952. var IS_FIND_INDEX = TYPE == 6;
  953. var IS_FILTER_REJECT = TYPE == 7;
  954. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  955. return function ($this, callbackfn, that, specificCreate) {
  956. var O = toObject$4($this);
  957. var self = IndexedObject$1(O);
  958. var boundFunction = bind(callbackfn, that);
  959. var length = lengthOfArrayLike$5(self);
  960. var index = 0;
  961. var create = specificCreate || arraySpeciesCreate$2;
  962. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  963. var value, result;
  964. for (;length > index; index++) if (NO_HOLES || index in self) {
  965. value = self[index];
  966. result = boundFunction(value, index, O);
  967. if (TYPE) {
  968. if (IS_MAP) target[index] = result; // map
  969. else if (result) switch (TYPE) {
  970. case 3: return true; // some
  971. case 5: return value; // find
  972. case 6: return index; // findIndex
  973. case 2: push$1(target, value); // filter
  974. } else switch (TYPE) {
  975. case 4: return false; // every
  976. case 7: push$1(target, value); // filterReject
  977. }
  978. }
  979. }
  980. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  981. };
  982. };
  983. var arrayIteration = {
  984. // `Array.prototype.forEach` method
  985. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  986. forEach: createMethod$1(0),
  987. // `Array.prototype.map` method
  988. // https://tc39.es/ecma262/#sec-array.prototype.map
  989. map: createMethod$1(1),
  990. // `Array.prototype.filter` method
  991. // https://tc39.es/ecma262/#sec-array.prototype.filter
  992. filter: createMethod$1(2),
  993. // `Array.prototype.some` method
  994. // https://tc39.es/ecma262/#sec-array.prototype.some
  995. some: createMethod$1(3),
  996. // `Array.prototype.every` method
  997. // https://tc39.es/ecma262/#sec-array.prototype.every
  998. every: createMethod$1(4),
  999. // `Array.prototype.find` method
  1000. // https://tc39.es/ecma262/#sec-array.prototype.find
  1001. find: createMethod$1(5),
  1002. // `Array.prototype.findIndex` method
  1003. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1004. findIndex: createMethod$1(6),
  1005. // `Array.prototype.filterReject` method
  1006. // https://github.com/tc39/proposal-array-filtering
  1007. filterReject: createMethod$1(7)
  1008. };
  1009. var objectDefineProperties = {};
  1010. var internalObjectKeys = objectKeysInternal;
  1011. var enumBugKeys$1 = enumBugKeys$3;
  1012. // `Object.keys` method
  1013. // https://tc39.es/ecma262/#sec-object.keys
  1014. // eslint-disable-next-line es-x/no-object-keys -- safe
  1015. var objectKeys$2 = Object.keys || function keys(O) {
  1016. return internalObjectKeys(O, enumBugKeys$1);
  1017. };
  1018. var DESCRIPTORS$1 = descriptors;
  1019. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1020. var definePropertyModule$2 = objectDefineProperty;
  1021. var anObject$3 = anObject$6;
  1022. var toIndexedObject$1 = toIndexedObject$5;
  1023. var objectKeys$1 = objectKeys$2;
  1024. // `Object.defineProperties` method
  1025. // https://tc39.es/ecma262/#sec-object.defineproperties
  1026. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  1027. objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1028. anObject$3(O);
  1029. var props = toIndexedObject$1(Properties);
  1030. var keys = objectKeys$1(Properties);
  1031. var length = keys.length;
  1032. var index = 0;
  1033. var key;
  1034. while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
  1035. return O;
  1036. };
  1037. var getBuiltIn = getBuiltIn$5;
  1038. var html$1 = getBuiltIn('document', 'documentElement');
  1039. /* global ActiveXObject -- old IE, WSH */
  1040. var anObject$2 = anObject$6;
  1041. var definePropertiesModule = objectDefineProperties;
  1042. var enumBugKeys = enumBugKeys$3;
  1043. var hiddenKeys = hiddenKeys$4;
  1044. var html = html$1;
  1045. var documentCreateElement = documentCreateElement$1;
  1046. var sharedKey = sharedKey$2;
  1047. var GT = '>';
  1048. var LT = '<';
  1049. var PROTOTYPE = 'prototype';
  1050. var SCRIPT = 'script';
  1051. var IE_PROTO = sharedKey('IE_PROTO');
  1052. var EmptyConstructor = function () { /* empty */ };
  1053. var scriptTag = function (content) {
  1054. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1055. };
  1056. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1057. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1058. activeXDocument.write(scriptTag(''));
  1059. activeXDocument.close();
  1060. var temp = activeXDocument.parentWindow.Object;
  1061. activeXDocument = null; // avoid memory leak
  1062. return temp;
  1063. };
  1064. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1065. var NullProtoObjectViaIFrame = function () {
  1066. // Thrash, waste and sodomy: IE GC bug
  1067. var iframe = documentCreateElement('iframe');
  1068. var JS = 'java' + SCRIPT + ':';
  1069. var iframeDocument;
  1070. iframe.style.display = 'none';
  1071. html.appendChild(iframe);
  1072. // https://github.com/zloirock/core-js/issues/475
  1073. iframe.src = String(JS);
  1074. iframeDocument = iframe.contentWindow.document;
  1075. iframeDocument.open();
  1076. iframeDocument.write(scriptTag('document.F=Object'));
  1077. iframeDocument.close();
  1078. return iframeDocument.F;
  1079. };
  1080. // Check for document.domain and active x support
  1081. // No need to use active x approach when document.domain is not set
  1082. // see https://github.com/es-shims/es5-shim/issues/150
  1083. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1084. // avoid IE GC bug
  1085. var activeXDocument;
  1086. var NullProtoObject = function () {
  1087. try {
  1088. activeXDocument = new ActiveXObject('htmlfile');
  1089. } catch (error) { /* ignore */ }
  1090. NullProtoObject = typeof document != 'undefined'
  1091. ? document.domain && activeXDocument
  1092. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1093. : NullProtoObjectViaIFrame()
  1094. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1095. var length = enumBugKeys.length;
  1096. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1097. return NullProtoObject();
  1098. };
  1099. hiddenKeys[IE_PROTO] = true;
  1100. // `Object.create` method
  1101. // https://tc39.es/ecma262/#sec-object.create
  1102. // eslint-disable-next-line es-x/no-object-create -- safe
  1103. var objectCreate = Object.create || function create(O, Properties) {
  1104. var result;
  1105. if (O !== null) {
  1106. EmptyConstructor[PROTOTYPE] = anObject$2(O);
  1107. result = new EmptyConstructor();
  1108. EmptyConstructor[PROTOTYPE] = null;
  1109. // add "__proto__" for Object.getPrototypeOf polyfill
  1110. result[IE_PROTO] = O;
  1111. } else result = NullProtoObject();
  1112. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1113. };
  1114. var wellKnownSymbol$3 = wellKnownSymbol$8;
  1115. var create = objectCreate;
  1116. var definePropertyModule$1 = objectDefineProperty;
  1117. var UNSCOPABLES = wellKnownSymbol$3('unscopables');
  1118. var ArrayPrototype = Array.prototype;
  1119. // Array.prototype[@@unscopables]
  1120. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1121. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1122. definePropertyModule$1.f(ArrayPrototype, UNSCOPABLES, {
  1123. configurable: true,
  1124. value: create(null)
  1125. });
  1126. }
  1127. // add a key to Array.prototype[@@unscopables]
  1128. var addToUnscopables$2 = function (key) {
  1129. ArrayPrototype[UNSCOPABLES][key] = true;
  1130. };
  1131. var $$9 = _export;
  1132. var $find = arrayIteration.find;
  1133. var addToUnscopables$1 = addToUnscopables$2;
  1134. var FIND = 'find';
  1135. var SKIPS_HOLES = true;
  1136. // Shouldn't skip holes
  1137. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1138. // `Array.prototype.find` method
  1139. // https://tc39.es/ecma262/#sec-array.prototype.find
  1140. $$9({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1141. find: function find(callbackfn /* , that = undefined */) {
  1142. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1143. }
  1144. });
  1145. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1146. addToUnscopables$1(FIND);
  1147. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1148. var classof$1 = classof$3;
  1149. // `Object.prototype.toString` method implementation
  1150. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1151. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1152. return '[object ' + classof$1(this) + ']';
  1153. };
  1154. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1155. var defineBuiltIn$1 = defineBuiltIn$3;
  1156. var toString$4 = objectToString;
  1157. // `Object.prototype.toString` method
  1158. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1159. if (!TO_STRING_TAG_SUPPORT) {
  1160. defineBuiltIn$1(Object.prototype, 'toString', toString$4, { unsafe: true });
  1161. }
  1162. var fails$7 = fails$h;
  1163. var wellKnownSymbol$2 = wellKnownSymbol$8;
  1164. var V8_VERSION$1 = engineV8Version;
  1165. var SPECIES$1 = wellKnownSymbol$2('species');
  1166. var arrayMethodHasSpeciesSupport$4 = function (METHOD_NAME) {
  1167. // We can't use this feature detection in V8 since it causes
  1168. // deoptimization and serious performance degradation
  1169. // https://github.com/zloirock/core-js/issues/677
  1170. return V8_VERSION$1 >= 51 || !fails$7(function () {
  1171. var array = [];
  1172. var constructor = array.constructor = {};
  1173. constructor[SPECIES$1] = function () {
  1174. return { foo: 1 };
  1175. };
  1176. return array[METHOD_NAME](Boolean).foo !== 1;
  1177. });
  1178. };
  1179. var $$8 = _export;
  1180. var $map = arrayIteration.map;
  1181. var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$4;
  1182. var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$3('map');
  1183. // `Array.prototype.map` method
  1184. // https://tc39.es/ecma262/#sec-array.prototype.map
  1185. // with adding support of @@species
  1186. $$8({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
  1187. map: function map(callbackfn /* , thisArg */) {
  1188. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1189. }
  1190. });
  1191. var global$6 = global$t;
  1192. var classof = classof$3;
  1193. var String$1 = global$6.String;
  1194. var toString$3 = function (argument) {
  1195. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1196. return String$1(argument);
  1197. };
  1198. var toPropertyKey = toPropertyKey$3;
  1199. var definePropertyModule = objectDefineProperty;
  1200. var createPropertyDescriptor = createPropertyDescriptor$3;
  1201. var createProperty$4 = function (object, key, value) {
  1202. var propertyKey = toPropertyKey(key);
  1203. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1204. else object[propertyKey] = value;
  1205. };
  1206. var global$5 = global$t;
  1207. var toAbsoluteIndex$2 = toAbsoluteIndex$4;
  1208. var lengthOfArrayLike$4 = lengthOfArrayLike$7;
  1209. var createProperty$3 = createProperty$4;
  1210. var Array$2 = global$5.Array;
  1211. var max$2 = Math.max;
  1212. var arraySliceSimple = function (O, start, end) {
  1213. var length = lengthOfArrayLike$4(O);
  1214. var k = toAbsoluteIndex$2(start, length);
  1215. var fin = toAbsoluteIndex$2(end === undefined ? length : end, length);
  1216. var result = Array$2(max$2(fin - k, 0));
  1217. for (var n = 0; k < fin; k++, n++) createProperty$3(result, n, O[k]);
  1218. result.length = n;
  1219. return result;
  1220. };
  1221. var arraySlice$1 = arraySliceSimple;
  1222. var floor = Math.floor;
  1223. var mergeSort = function (array, comparefn) {
  1224. var length = array.length;
  1225. var middle = floor(length / 2);
  1226. return length < 8 ? insertionSort(array, comparefn) : merge(
  1227. array,
  1228. mergeSort(arraySlice$1(array, 0, middle), comparefn),
  1229. mergeSort(arraySlice$1(array, middle), comparefn),
  1230. comparefn
  1231. );
  1232. };
  1233. var insertionSort = function (array, comparefn) {
  1234. var length = array.length;
  1235. var i = 1;
  1236. var element, j;
  1237. while (i < length) {
  1238. j = i;
  1239. element = array[i];
  1240. while (j && comparefn(array[j - 1], element) > 0) {
  1241. array[j] = array[--j];
  1242. }
  1243. if (j !== i++) array[j] = element;
  1244. } return array;
  1245. };
  1246. var merge = function (array, left, right, comparefn) {
  1247. var llength = left.length;
  1248. var rlength = right.length;
  1249. var lindex = 0;
  1250. var rindex = 0;
  1251. while (lindex < llength || rindex < rlength) {
  1252. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1253. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1254. : lindex < llength ? left[lindex++] : right[rindex++];
  1255. } return array;
  1256. };
  1257. var arraySort = mergeSort;
  1258. var fails$6 = fails$h;
  1259. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1260. var method = [][METHOD_NAME];
  1261. return !!method && fails$6(function () {
  1262. // eslint-disable-next-line no-useless-call -- required for testing
  1263. method.call(null, argument || function () { return 1; }, 1);
  1264. });
  1265. };
  1266. var userAgent$1 = engineUserAgent;
  1267. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  1268. var engineFfVersion = !!firefox && +firefox[1];
  1269. var UA = engineUserAgent;
  1270. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  1271. var userAgent = engineUserAgent;
  1272. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  1273. var engineWebkitVersion = !!webkit && +webkit[1];
  1274. var $$7 = _export;
  1275. var uncurryThis$5 = functionUncurryThis;
  1276. var aCallable = aCallable$3;
  1277. var toObject$3 = toObject$6;
  1278. var lengthOfArrayLike$3 = lengthOfArrayLike$7;
  1279. var toString$2 = toString$3;
  1280. var fails$5 = fails$h;
  1281. var internalSort = arraySort;
  1282. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1283. var FF = engineFfVersion;
  1284. var IE_OR_EDGE = engineIsIeOrEdge;
  1285. var V8 = engineV8Version;
  1286. var WEBKIT = engineWebkitVersion;
  1287. var test = [];
  1288. var un$Sort = uncurryThis$5(test.sort);
  1289. var push = uncurryThis$5(test.push);
  1290. // IE8-
  1291. var FAILS_ON_UNDEFINED = fails$5(function () {
  1292. test.sort(undefined);
  1293. });
  1294. // V8 bug
  1295. var FAILS_ON_NULL = fails$5(function () {
  1296. test.sort(null);
  1297. });
  1298. // Old WebKit
  1299. var STRICT_METHOD$1 = arrayMethodIsStrict$1('sort');
  1300. var STABLE_SORT = !fails$5(function () {
  1301. // feature detection can be too slow, so check engines versions
  1302. if (V8) return V8 < 70;
  1303. if (FF && FF > 3) return;
  1304. if (IE_OR_EDGE) return true;
  1305. if (WEBKIT) return WEBKIT < 603;
  1306. var result = '';
  1307. var code, chr, value, index;
  1308. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1309. for (code = 65; code < 76; code++) {
  1310. chr = String.fromCharCode(code);
  1311. switch (code) {
  1312. case 66: case 69: case 70: case 72: value = 3; break;
  1313. case 68: case 71: value = 4; break;
  1314. default: value = 2;
  1315. }
  1316. for (index = 0; index < 47; index++) {
  1317. test.push({ k: chr + index, v: value });
  1318. }
  1319. }
  1320. test.sort(function (a, b) { return b.v - a.v; });
  1321. for (index = 0; index < test.length; index++) {
  1322. chr = test[index].k.charAt(0);
  1323. if (result.charAt(result.length - 1) !== chr) result += chr;
  1324. }
  1325. return result !== 'DGBEFHACIJK';
  1326. });
  1327. var FORCED$2 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1328. var getSortCompare = function (comparefn) {
  1329. return function (x, y) {
  1330. if (y === undefined) return -1;
  1331. if (x === undefined) return 1;
  1332. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1333. return toString$2(x) > toString$2(y) ? 1 : -1;
  1334. };
  1335. };
  1336. // `Array.prototype.sort` method
  1337. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1338. $$7({ target: 'Array', proto: true, forced: FORCED$2 }, {
  1339. sort: function sort(comparefn) {
  1340. if (comparefn !== undefined) aCallable(comparefn);
  1341. var array = toObject$3(this);
  1342. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  1343. var items = [];
  1344. var arrayLength = lengthOfArrayLike$3(array);
  1345. var itemsLength, index;
  1346. for (index = 0; index < arrayLength; index++) {
  1347. if (index in array) push(items, array[index]);
  1348. }
  1349. internalSort(items, getSortCompare(comparefn));
  1350. itemsLength = items.length;
  1351. index = 0;
  1352. while (index < itemsLength) array[index] = items[index++];
  1353. while (index < arrayLength) delete array[index++];
  1354. return array;
  1355. }
  1356. });
  1357. var $$6 = _export;
  1358. var global$4 = global$t;
  1359. var fails$4 = fails$h;
  1360. var isArray$1 = isArray$3;
  1361. var isObject$1 = isObject$8;
  1362. var toObject$2 = toObject$6;
  1363. var lengthOfArrayLike$2 = lengthOfArrayLike$7;
  1364. var createProperty$2 = createProperty$4;
  1365. var arraySpeciesCreate$1 = arraySpeciesCreate$3;
  1366. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$4;
  1367. var wellKnownSymbol$1 = wellKnownSymbol$8;
  1368. var V8_VERSION = engineV8Version;
  1369. var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable');
  1370. var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
  1371. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1372. var TypeError$2 = global$4.TypeError;
  1373. // We can't use this feature detection in V8 since it causes
  1374. // deoptimization and serious performance degradation
  1375. // https://github.com/zloirock/core-js/issues/679
  1376. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$4(function () {
  1377. var array = [];
  1378. array[IS_CONCAT_SPREADABLE] = false;
  1379. return array.concat()[0] !== array;
  1380. });
  1381. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$2('concat');
  1382. var isConcatSpreadable = function (O) {
  1383. if (!isObject$1(O)) return false;
  1384. var spreadable = O[IS_CONCAT_SPREADABLE];
  1385. return spreadable !== undefined ? !!spreadable : isArray$1(O);
  1386. };
  1387. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1388. // `Array.prototype.concat` method
  1389. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1390. // with adding support of @@isConcatSpreadable and @@species
  1391. $$6({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  1392. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1393. concat: function concat(arg) {
  1394. var O = toObject$2(this);
  1395. var A = arraySpeciesCreate$1(O, 0);
  1396. var n = 0;
  1397. var i, k, length, len, E;
  1398. for (i = -1, length = arguments.length; i < length; i++) {
  1399. E = i === -1 ? O : arguments[i];
  1400. if (isConcatSpreadable(E)) {
  1401. len = lengthOfArrayLike$2(E);
  1402. if (n + len > MAX_SAFE_INTEGER$1) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1403. for (k = 0; k < len; k++, n++) if (k in E) createProperty$2(A, n, E[k]);
  1404. } else {
  1405. if (n >= MAX_SAFE_INTEGER$1) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1406. createProperty$2(A, n++, E);
  1407. }
  1408. }
  1409. A.length = n;
  1410. return A;
  1411. }
  1412. });
  1413. var $$5 = _export;
  1414. var $includes = arrayIncludes.includes;
  1415. var fails$3 = fails$h;
  1416. var addToUnscopables = addToUnscopables$2;
  1417. // FF99+ bug
  1418. var BROKEN_ON_SPARSE = fails$3(function () {
  1419. return !Array(1).includes();
  1420. });
  1421. // `Array.prototype.includes` method
  1422. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1423. $$5({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1424. includes: function includes(el /* , fromIndex = 0 */) {
  1425. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1426. }
  1427. });
  1428. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1429. addToUnscopables('includes');
  1430. var DESCRIPTORS = descriptors;
  1431. var uncurryThis$4 = functionUncurryThis;
  1432. var call$1 = functionCall;
  1433. var fails$2 = fails$h;
  1434. var objectKeys = objectKeys$2;
  1435. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1436. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1437. var toObject$1 = toObject$6;
  1438. var IndexedObject = indexedObject;
  1439. // eslint-disable-next-line es-x/no-object-assign -- safe
  1440. var $assign = Object.assign;
  1441. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  1442. var defineProperty = Object.defineProperty;
  1443. var concat = uncurryThis$4([].concat);
  1444. // `Object.assign` method
  1445. // https://tc39.es/ecma262/#sec-object.assign
  1446. var objectAssign = !$assign || fails$2(function () {
  1447. // should have correct order of operations (Edge bug)
  1448. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1449. enumerable: true,
  1450. get: function () {
  1451. defineProperty(this, 'b', {
  1452. value: 3,
  1453. enumerable: false
  1454. });
  1455. }
  1456. }), { b: 2 })).b !== 1) return true;
  1457. // should work with symbols and should have deterministic property order (V8 bug)
  1458. var A = {};
  1459. var B = {};
  1460. // eslint-disable-next-line es-x/no-symbol -- safe
  1461. var symbol = Symbol();
  1462. var alphabet = 'abcdefghijklmnopqrst';
  1463. A[symbol] = 7;
  1464. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1465. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1466. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1467. var T = toObject$1(target);
  1468. var argumentsLength = arguments.length;
  1469. var index = 1;
  1470. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1471. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1472. while (argumentsLength > index) {
  1473. var S = IndexedObject(arguments[index++]);
  1474. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1475. var length = keys.length;
  1476. var j = 0;
  1477. var key;
  1478. while (length > j) {
  1479. key = keys[j++];
  1480. if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
  1481. }
  1482. } return T;
  1483. } : $assign;
  1484. var $$4 = _export;
  1485. var assign = objectAssign;
  1486. // `Object.assign` method
  1487. // https://tc39.es/ecma262/#sec-object.assign
  1488. // eslint-disable-next-line es-x/no-object-assign -- required for testing
  1489. $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1490. assign: assign
  1491. });
  1492. var uncurryThis$3 = functionUncurryThis;
  1493. var arraySlice = uncurryThis$3([].slice);
  1494. var $$3 = _export;
  1495. var global$3 = global$t;
  1496. var isArray = isArray$3;
  1497. var isConstructor = isConstructor$2;
  1498. var isObject = isObject$8;
  1499. var toAbsoluteIndex$1 = toAbsoluteIndex$4;
  1500. var lengthOfArrayLike$1 = lengthOfArrayLike$7;
  1501. var toIndexedObject = toIndexedObject$5;
  1502. var createProperty$1 = createProperty$4;
  1503. var wellKnownSymbol = wellKnownSymbol$8;
  1504. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$4;
  1505. var un$Slice = arraySlice;
  1506. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
  1507. var SPECIES = wellKnownSymbol('species');
  1508. var Array$1 = global$3.Array;
  1509. var max$1 = Math.max;
  1510. // `Array.prototype.slice` method
  1511. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1512. // fallback for not array-like ES3 strings and DOM objects
  1513. $$3({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1514. slice: function slice(start, end) {
  1515. var O = toIndexedObject(this);
  1516. var length = lengthOfArrayLike$1(O);
  1517. var k = toAbsoluteIndex$1(start, length);
  1518. var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
  1519. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1520. var Constructor, result, n;
  1521. if (isArray(O)) {
  1522. Constructor = O.constructor;
  1523. // cross-realm fallback
  1524. if (isConstructor(Constructor) && (Constructor === Array$1 || isArray(Constructor.prototype))) {
  1525. Constructor = undefined;
  1526. } else if (isObject(Constructor)) {
  1527. Constructor = Constructor[SPECIES];
  1528. if (Constructor === null) Constructor = undefined;
  1529. }
  1530. if (Constructor === Array$1 || Constructor === undefined) {
  1531. return un$Slice(O, k, fin);
  1532. }
  1533. }
  1534. result = new (Constructor === undefined ? Array$1 : Constructor)(max$1(fin - k, 0));
  1535. for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]);
  1536. result.length = n;
  1537. return result;
  1538. }
  1539. });
  1540. var $$2 = _export;
  1541. var global$2 = global$t;
  1542. var toAbsoluteIndex = toAbsoluteIndex$4;
  1543. var toIntegerOrInfinity = toIntegerOrInfinity$3;
  1544. var lengthOfArrayLike = lengthOfArrayLike$7;
  1545. var toObject = toObject$6;
  1546. var arraySpeciesCreate = arraySpeciesCreate$3;
  1547. var createProperty = createProperty$4;
  1548. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$4;
  1549. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  1550. var TypeError$1 = global$2.TypeError;
  1551. var max = Math.max;
  1552. var min = Math.min;
  1553. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1554. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  1555. // `Array.prototype.splice` method
  1556. // https://tc39.es/ecma262/#sec-array.prototype.splice
  1557. // with adding support of @@species
  1558. $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1559. splice: function splice(start, deleteCount /* , ...items */) {
  1560. var O = toObject(this);
  1561. var len = lengthOfArrayLike(O);
  1562. var actualStart = toAbsoluteIndex(start, len);
  1563. var argumentsLength = arguments.length;
  1564. var insertCount, actualDeleteCount, A, k, from, to;
  1565. if (argumentsLength === 0) {
  1566. insertCount = actualDeleteCount = 0;
  1567. } else if (argumentsLength === 1) {
  1568. insertCount = 0;
  1569. actualDeleteCount = len - actualStart;
  1570. } else {
  1571. insertCount = argumentsLength - 2;
  1572. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  1573. }
  1574. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  1575. throw TypeError$1(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  1576. }
  1577. A = arraySpeciesCreate(O, actualDeleteCount);
  1578. for (k = 0; k < actualDeleteCount; k++) {
  1579. from = actualStart + k;
  1580. if (from in O) createProperty(A, k, O[from]);
  1581. }
  1582. A.length = actualDeleteCount;
  1583. if (insertCount < actualDeleteCount) {
  1584. for (k = actualStart; k < len - actualDeleteCount; k++) {
  1585. from = k + actualDeleteCount;
  1586. to = k + insertCount;
  1587. if (from in O) O[to] = O[from];
  1588. else delete O[to];
  1589. }
  1590. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  1591. } else if (insertCount > actualDeleteCount) {
  1592. for (k = len - actualDeleteCount; k > actualStart; k--) {
  1593. from = k + actualDeleteCount - 1;
  1594. to = k + insertCount - 1;
  1595. if (from in O) O[to] = O[from];
  1596. else delete O[to];
  1597. }
  1598. }
  1599. for (k = 0; k < insertCount; k++) {
  1600. O[k + actualStart] = arguments[k + 2];
  1601. }
  1602. O.length = len - actualDeleteCount + insertCount;
  1603. return A;
  1604. }
  1605. });
  1606. /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
  1607. var $$1 = _export;
  1608. var uncurryThis$2 = functionUncurryThis;
  1609. var $IndexOf = arrayIncludes.indexOf;
  1610. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  1611. var un$IndexOf = uncurryThis$2([].indexOf);
  1612. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1613. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  1614. // `Array.prototype.indexOf` method
  1615. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1616. $$1({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  1617. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1618. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1619. return NEGATIVE_ZERO
  1620. // convert -0 to +0
  1621. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1622. : $IndexOf(this, searchElement, fromIndex);
  1623. }
  1624. });
  1625. // a string of all valid unicode whitespaces
  1626. var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1627. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1628. var uncurryThis$1 = functionUncurryThis;
  1629. var requireObjectCoercible = requireObjectCoercible$3;
  1630. var toString$1 = toString$3;
  1631. var whitespaces$1 = whitespaces$2;
  1632. var replace = uncurryThis$1(''.replace);
  1633. var whitespace = '[' + whitespaces$1 + ']';
  1634. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1635. var rtrim = RegExp(whitespace + whitespace + '*$');
  1636. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1637. var createMethod = function (TYPE) {
  1638. return function ($this) {
  1639. var string = toString$1(requireObjectCoercible($this));
  1640. if (TYPE & 1) string = replace(string, ltrim, '');
  1641. if (TYPE & 2) string = replace(string, rtrim, '');
  1642. return string;
  1643. };
  1644. };
  1645. var stringTrim = {
  1646. // `String.prototype.{ trimLeft, trimStart }` methods
  1647. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1648. start: createMethod(1),
  1649. // `String.prototype.{ trimRight, trimEnd }` methods
  1650. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1651. end: createMethod(2),
  1652. // `String.prototype.trim` method
  1653. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1654. trim: createMethod(3)
  1655. };
  1656. var global$1 = global$t;
  1657. var fails$1 = fails$h;
  1658. var uncurryThis = functionUncurryThis;
  1659. var toString = toString$3;
  1660. var trim = stringTrim.trim;
  1661. var whitespaces = whitespaces$2;
  1662. var charAt = uncurryThis(''.charAt);
  1663. var n$ParseFloat = global$1.parseFloat;
  1664. var Symbol$1 = global$1.Symbol;
  1665. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1666. var FORCED = 1 / n$ParseFloat(whitespaces + '-0') !== -Infinity
  1667. // MS Edge 18- broken with boxed symbols
  1668. || (ITERATOR && !fails$1(function () { n$ParseFloat(Object(ITERATOR)); }));
  1669. // `parseFloat` method
  1670. // https://tc39.es/ecma262/#sec-parsefloat-string
  1671. var numberParseFloat = FORCED ? function parseFloat(string) {
  1672. var trimmedString = trim(toString(string));
  1673. var result = n$ParseFloat(trimmedString);
  1674. return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;
  1675. } : n$ParseFloat;
  1676. var $ = _export;
  1677. var $parseFloat = numberParseFloat;
  1678. // `parseFloat` method
  1679. // https://tc39.es/ecma262/#sec-parsefloat-string
  1680. $({ global: true, forced: parseFloat != $parseFloat }, {
  1681. parseFloat: $parseFloat
  1682. });
  1683. var anObject$1 = anObject$6;
  1684. // `RegExp.prototype.flags` getter implementation
  1685. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1686. var regexpFlags = function () {
  1687. var that = anObject$1(this);
  1688. var result = '';
  1689. if (that.hasIndices) result += 'd';
  1690. if (that.global) result += 'g';
  1691. if (that.ignoreCase) result += 'i';
  1692. if (that.multiline) result += 'm';
  1693. if (that.dotAll) result += 's';
  1694. if (that.unicode) result += 'u';
  1695. if (that.sticky) result += 'y';
  1696. return result;
  1697. };
  1698. var call = functionCall;
  1699. var hasOwn = hasOwnProperty_1;
  1700. var isPrototypeOf = objectIsPrototypeOf;
  1701. var regExpFlags = regexpFlags;
  1702. var RegExpPrototype$1 = RegExp.prototype;
  1703. var regexpGetFlags = function (R) {
  1704. var flags = R.flags;
  1705. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
  1706. ? call(regExpFlags, R) : flags;
  1707. };
  1708. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1709. var defineBuiltIn = defineBuiltIn$3;
  1710. var anObject = anObject$6;
  1711. var $toString = toString$3;
  1712. var fails = fails$h;
  1713. var getRegExpFlags = regexpGetFlags;
  1714. var TO_STRING = 'toString';
  1715. var RegExpPrototype = RegExp.prototype;
  1716. var n$ToString = RegExpPrototype[TO_STRING];
  1717. var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  1718. // FF44- RegExp#toString has a wrong name
  1719. var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
  1720. // `RegExp.prototype.toString` method
  1721. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1722. if (NOT_GENERIC || INCORRECT_NAME) {
  1723. defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
  1724. var R = anObject(this);
  1725. var pattern = $toString(R.source);
  1726. var flags = $toString(getRegExpFlags(R));
  1727. return '/' + pattern + '/' + flags;
  1728. }, { unsafe: true });
  1729. }
  1730. /**
  1731. * @author Nadim Basalamah <dimbslmh@gmail.com>
  1732. * @version: v1.1.0
  1733. * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js
  1734. * Modification: ErwannNevou <https://github.com/ErwannNevou>
  1735. */
  1736. var isSingleSort = false;
  1737. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1738. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1739. plus: {
  1740. bootstrap3: 'glyphicon-plus',
  1741. bootstrap4: 'fa-plus',
  1742. bootstrap5: 'bi-plus',
  1743. semantic: 'fa-plus',
  1744. materialize: 'plus',
  1745. foundation: 'fa-plus',
  1746. bulma: 'fa-plus',
  1747. 'bootstrap-table': 'icon-plus'
  1748. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock',
  1749. minus: {
  1750. bootstrap3: 'glyphicon-minus',
  1751. bootstrap4: 'fa-minus',
  1752. bootstrap5: 'bi-dash',
  1753. semantic: 'fa-minus',
  1754. materialize: 'minus',
  1755. foundation: 'fa-minus',
  1756. bulma: 'fa-minus',
  1757. 'bootstrap-table': 'icon-minus'
  1758. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock',
  1759. sort: {
  1760. bootstrap3: 'glyphicon-sort',
  1761. bootstrap4: 'fa-sort',
  1762. bootstrap5: 'bi-arrow-down-up',
  1763. semantic: 'fa-sort',
  1764. materialize: 'sort',
  1765. foundation: 'fa-sort',
  1766. bulma: 'fa-sort',
  1767. 'bootstrap-table': 'icon-sort-amount-asc'
  1768. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-clock'
  1769. });
  1770. var theme = {
  1771. bootstrap3: {
  1772. html: {
  1773. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1774. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1775. multipleSortSelect: '<select class="%s %s form-control">'
  1776. }
  1777. },
  1778. bootstrap4: {
  1779. html: {
  1780. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1781. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1782. multipleSortSelect: '<select class="%s %s form-control">'
  1783. }
  1784. },
  1785. bootstrap5: {
  1786. html: {
  1787. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1788. multipleSortButton: '<button class="multi-sort %s" type="button" data-bs-toggle="modal" data-bs-target="#%s" title="%s">%s</button>',
  1789. multipleSortSelect: '<select class="%s %s form-control">'
  1790. }
  1791. },
  1792. semantic: {
  1793. html: {
  1794. multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
  1795. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1796. multipleSortSelect: '<select class="%s %s">'
  1797. }
  1798. },
  1799. materialize: {
  1800. html: {
  1801. multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
  1802. multipleSortButton: '<a class="multi-sort %s modal-trigger" href="#%s" type="button" data-toggle="modal" title="%s">%s</a>',
  1803. multipleSortSelect: '<select class="%s %s browser-default">'
  1804. }
  1805. },
  1806. foundation: {
  1807. html: {
  1808. multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
  1809. multipleSortButton: '<button class="multi-sort %s" data-open="%s" title="%s">%s</button>',
  1810. multipleSortSelect: '<select class="%s %s browser-default">'
  1811. }
  1812. },
  1813. bulma: {
  1814. html: {
  1815. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
  1816. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1817. multipleSortSelect: '<select class="%s %s browser-default">'
  1818. }
  1819. },
  1820. 'bootstrap-table': {
  1821. html: {
  1822. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1823. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1824. multipleSortSelect: '<select class="%s %s browser-default">'
  1825. }
  1826. }
  1827. }[$__default["default"].fn.bootstrapTable.theme];
  1828. var showSortModal = function showSortModal(that) {
  1829. var _selector = that.sortModalSelector;
  1830. var _id = "#".concat(_selector);
  1831. var o = that.options;
  1832. if (!$__default["default"](_id).hasClass('modal')) {
  1833. var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
  1834. $__default["default"]('body').append($__default["default"](sModal));
  1835. that.$sortModal = $__default["default"](_id);
  1836. var $rows = that.$sortModal.find('tbody > tr');
  1837. that.$sortModal.off('click', '#add').on('click', '#add', function () {
  1838. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1839. var current = that.$sortModal.find('tbody tr').length;
  1840. if (current < total) {
  1841. current++;
  1842. that.addLevel();
  1843. that.setButtonStates();
  1844. }
  1845. });
  1846. that.$sortModal.off('click', '#delete').on('click', '#delete', function () {
  1847. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1848. var current = that.$sortModal.find('tbody tr').length;
  1849. if (current > 1 && current <= total) {
  1850. current--;
  1851. that.$sortModal.find('tbody tr:last').remove();
  1852. that.setButtonStates();
  1853. }
  1854. });
  1855. that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
  1856. var $rows = that.$sortModal.find('tbody > tr');
  1857. var $alert = that.$sortModal.find('div.alert');
  1858. var fields = [];
  1859. var results = [];
  1860. var sortPriority = $__default["default"].map($rows, function (row) {
  1861. var $row = $__default["default"](row);
  1862. var name = $row.find('.multi-sort-name').val();
  1863. var order = $row.find('.multi-sort-order').val();
  1864. fields.push(name);
  1865. return {
  1866. sortName: name,
  1867. sortOrder: order
  1868. };
  1869. });
  1870. var sorted_fields = fields.sort();
  1871. for (var i = 0; i < fields.length - 1; i++) {
  1872. if (sorted_fields[i + 1] === sorted_fields[i]) {
  1873. results.push(sorted_fields[i]);
  1874. }
  1875. }
  1876. if (results.length > 0) {
  1877. if ($alert.length === 0) {
  1878. $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
  1879. $__default["default"]($alert).insertBefore(that.$sortModal.find('.bars'));
  1880. }
  1881. } else {
  1882. if ($alert.length === 1) {
  1883. $__default["default"]($alert).remove();
  1884. }
  1885. if (['bootstrap3', 'bootstrap4', 'bootstrap5'].includes($__default["default"].fn.bootstrapTable.theme)) {
  1886. that.$sortModal.modal('hide');
  1887. }
  1888. that.multiSort(sortPriority);
  1889. }
  1890. });
  1891. if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
  1892. if (that.options.sortName) {
  1893. that.options.sortPriority = [{
  1894. sortName: that.options.sortName,
  1895. sortOrder: that.options.sortOrder
  1896. }];
  1897. }
  1898. }
  1899. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  1900. if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
  1901. for (var i = 0; i < that.options.sortPriority.length; i++) {
  1902. that.addLevel(i, that.options.sortPriority[i]);
  1903. }
  1904. }
  1905. } else {
  1906. that.addLevel(0);
  1907. }
  1908. that.setButtonStates();
  1909. }
  1910. };
  1911. $__default["default"].fn.bootstrapTable.methods.push('multipleSort');
  1912. $__default["default"].fn.bootstrapTable.methods.push('multiSort');
  1913. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1914. showMultiSort: false,
  1915. showMultiSortButton: true,
  1916. multiSortStrictSort: false,
  1917. sortPriority: null,
  1918. onMultipleSort: function onMultipleSort() {
  1919. return false;
  1920. }
  1921. });
  1922. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  1923. 'multiple-sort.bs.table': 'onMultipleSort'
  1924. });
  1925. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  1926. formatMultipleSort: function formatMultipleSort() {
  1927. return 'Multiple Sort';
  1928. },
  1929. formatAddLevel: function formatAddLevel() {
  1930. return 'Add Level';
  1931. },
  1932. formatDeleteLevel: function formatDeleteLevel() {
  1933. return 'Delete Level';
  1934. },
  1935. formatColumn: function formatColumn() {
  1936. return 'Column';
  1937. },
  1938. formatOrder: function formatOrder() {
  1939. return 'Order';
  1940. },
  1941. formatSortBy: function formatSortBy() {
  1942. return 'Sort by';
  1943. },
  1944. formatThenBy: function formatThenBy() {
  1945. return 'Then by';
  1946. },
  1947. formatSort: function formatSort() {
  1948. return 'Sort';
  1949. },
  1950. formatCancel: function formatCancel() {
  1951. return 'Cancel';
  1952. },
  1953. formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
  1954. return 'Duplicate(s) detected!';
  1955. },
  1956. formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
  1957. return 'Please remove or change any duplicate column.';
  1958. },
  1959. formatSortOrders: function formatSortOrders() {
  1960. return {
  1961. asc: 'Ascending',
  1962. desc: 'Descending'
  1963. };
  1964. }
  1965. });
  1966. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  1967. var BootstrapTable = $__default["default"].fn.bootstrapTable.Constructor;
  1968. var _initToolbar = BootstrapTable.prototype.initToolbar;
  1969. var _destroy = BootstrapTable.prototype.destroy;
  1970. BootstrapTable.prototype.initToolbar = function () {
  1971. var _this = this;
  1972. this.showToolbar = this.showToolbar || this.options.showMultiSort;
  1973. var that = this;
  1974. var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
  1975. var sortModalId = "#".concat(sortModalSelector);
  1976. var $multiSortBtn = this.$toolbar.find('div.multi-sort');
  1977. var o = this.options;
  1978. this.$sortModal = $__default["default"](sortModalId);
  1979. this.sortModalSelector = sortModalSelector;
  1980. if (that.options.sortPriority !== null) {
  1981. that.onMultipleSort();
  1982. }
  1983. if (this.options.showMultiSortButton) {
  1984. this.buttons = Object.assign(this.buttons, {
  1985. multipleSort: {
  1986. html: Utils.sprintf(theme.html.multipleSortButton, that.constants.buttonsClass, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
  1987. }
  1988. });
  1989. }
  1990. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1991. args[_key] = arguments[_key];
  1992. }
  1993. _initToolbar.apply(this, Array.prototype.slice.apply(args));
  1994. if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
  1995. var t = that.options.queryParams;
  1996. that.options.queryParams = function (params) {
  1997. params.multiSort = that.options.sortPriority;
  1998. return t(params);
  1999. };
  2000. }
  2001. if (this.options.showMultiSort) {
  2002. if (!$multiSortBtn.length && this.options.showMultiSortButton) {
  2003. if ($__default["default"].fn.bootstrapTable.theme === 'semantic') {
  2004. this.$toolbar.find('.multi-sort').on('click', function () {
  2005. $__default["default"](sortModalId).modal('show');
  2006. });
  2007. } else if ($__default["default"].fn.bootstrapTable.theme === 'materialize') {
  2008. this.$toolbar.find('.multi-sort').on('click', function () {
  2009. $__default["default"](sortModalId).modal();
  2010. });
  2011. } else if ($__default["default"].fn.bootstrapTable.theme === 'bootstrap-table') {
  2012. this.$toolbar.find('.multi-sort').on('click', function () {
  2013. $__default["default"](sortModalId).addClass('show');
  2014. });
  2015. } else if ($__default["default"].fn.bootstrapTable.theme === 'foundation') {
  2016. this.$toolbar.find('.multi-sort').on('click', function () {
  2017. if (!_this.foundationModal) {
  2018. // eslint-disable-next-line no-undef
  2019. _this.foundationModal = new Foundation.Reveal($__default["default"](sortModalId));
  2020. }
  2021. _this.foundationModal.open();
  2022. });
  2023. } else if ($__default["default"].fn.bootstrapTable.theme === 'bulma') {
  2024. this.$toolbar.find('.multi-sort').on('click', function () {
  2025. $__default["default"]('html').toggleClass('is-clipped');
  2026. $__default["default"](sortModalId).toggleClass('is-active');
  2027. $__default["default"]('button[data-close]').one('click', function () {
  2028. $__default["default"]('html').toggleClass('is-clipped');
  2029. $__default["default"](sortModalId).toggleClass('is-active');
  2030. });
  2031. });
  2032. }
  2033. showSortModal(that);
  2034. }
  2035. this.$el.on('sort.bs.table', function () {
  2036. isSingleSort = true;
  2037. });
  2038. this.$el.on('multiple-sort.bs.table', function () {
  2039. isSingleSort = false;
  2040. });
  2041. this.$el.on('load-success.bs.table', function () {
  2042. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2043. that.onMultipleSort();
  2044. }
  2045. });
  2046. this.$el.on('column-switch.bs.table', function (field, checked) {
  2047. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  2048. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2049. if (that.options.sortPriority[i].sortName === checked) {
  2050. that.options.sortPriority.splice(i, 1);
  2051. }
  2052. }
  2053. that.assignSortableArrows();
  2054. }
  2055. that.$sortModal.remove();
  2056. showSortModal(that);
  2057. });
  2058. this.$el.on('reset-view.bs.table', function () {
  2059. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
  2060. that.assignSortableArrows();
  2061. }
  2062. });
  2063. }
  2064. };
  2065. BootstrapTable.prototype.destroy = function () {
  2066. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2067. args[_key2] = arguments[_key2];
  2068. }
  2069. _destroy.apply(this, Array.prototype.slice.apply(args));
  2070. if (this.options.showMultiSort) {
  2071. this.enableCustomSort = false;
  2072. this.$sortModal.remove();
  2073. }
  2074. };
  2075. BootstrapTable.prototype.multipleSort = function () {
  2076. var that = this;
  2077. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2078. that.onMultipleSort();
  2079. }
  2080. };
  2081. BootstrapTable.prototype.onMultipleSort = function () {
  2082. var that = this;
  2083. var cmp = function cmp(x, y) {
  2084. return x > y ? 1 : x < y ? -1 : 0;
  2085. };
  2086. var arrayCmp = function arrayCmp(a, b) {
  2087. var arr1 = [];
  2088. var arr2 = [];
  2089. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2090. var fieldName = that.options.sortPriority[i].sortName;
  2091. var fieldIndex = that.header.fields.indexOf(fieldName);
  2092. var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
  2093. if (that.header.sortNames[fieldIndex]) {
  2094. fieldName = that.header.sortNames[fieldIndex];
  2095. }
  2096. var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
  2097. var aa = Utils.getItemField(a, fieldName);
  2098. var bb = Utils.getItemField(b, fieldName);
  2099. var value1 = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
  2100. var value2 = $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
  2101. if (value1 !== undefined && value2 !== undefined) {
  2102. arr1.push(order * value1);
  2103. arr2.push(order * value2);
  2104. continue;
  2105. }
  2106. if (aa === undefined || aa === null) aa = '';
  2107. if (bb === undefined || bb === null) bb = '';
  2108. if ($__default["default"].isNumeric(aa) && $__default["default"].isNumeric(bb)) {
  2109. aa = parseFloat(aa);
  2110. bb = parseFloat(bb);
  2111. } else {
  2112. aa = aa.toString();
  2113. bb = bb.toString();
  2114. if (that.options.multiSortStrictSort) {
  2115. aa = aa.toLowerCase();
  2116. bb = bb.toLowerCase();
  2117. }
  2118. }
  2119. arr1.push(order * cmp(aa, bb));
  2120. arr2.push(order * cmp(bb, aa));
  2121. }
  2122. return cmp(arr1, arr2);
  2123. };
  2124. this.enableCustomSort = true;
  2125. this.data.sort(function (a, b) {
  2126. return arrayCmp(a, b);
  2127. });
  2128. this.initBody();
  2129. this.assignSortableArrows();
  2130. this.trigger('multiple-sort');
  2131. };
  2132. BootstrapTable.prototype.addLevel = function (index, sortPriority) {
  2133. var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
  2134. this.$sortModal.find('tbody').append($__default["default"]('<tr>').append($__default["default"]('<td>').text(text)).append($__default["default"]('<td>').append($__default["default"](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($__default["default"]('<td>').append($__default["default"](Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
  2135. var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
  2136. var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
  2137. $__default["default"].each(this.columns, function (i, column) {
  2138. if (column.sortable === false || column.visible === false) {
  2139. return true;
  2140. }
  2141. $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
  2142. });
  2143. $__default["default"].each(this.options.formatSortOrders(), function (value, order) {
  2144. $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
  2145. });
  2146. if (sortPriority !== undefined) {
  2147. $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
  2148. $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
  2149. }
  2150. };
  2151. BootstrapTable.prototype.assignSortableArrows = function () {
  2152. var that = this;
  2153. var headers = that.$header.find('th');
  2154. for (var i = 0; i < headers.length; i++) {
  2155. for (var c = 0; c < that.options.sortPriority.length; c++) {
  2156. if ($__default["default"](headers[i]).data('field') === that.options.sortPriority[c].sortName) {
  2157. $__default["default"](headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
  2158. }
  2159. }
  2160. }
  2161. };
  2162. BootstrapTable.prototype.setButtonStates = function () {
  2163. var total = this.$sortModal.find('.multi-sort-name:first option').length;
  2164. var current = this.$sortModal.find('tbody tr').length;
  2165. if (current === total) {
  2166. this.$sortModal.find('#add').attr('disabled', 'disabled');
  2167. }
  2168. if (current > 1) {
  2169. this.$sortModal.find('#delete').removeAttr('disabled');
  2170. }
  2171. if (current < total) {
  2172. this.$sortModal.find('#add').removeAttr('disabled');
  2173. }
  2174. if (current === 1) {
  2175. this.$sortModal.find('#delete').attr('disabled', 'disabled');
  2176. }
  2177. };
  2178. BootstrapTable.prototype.multiSort = function (sortPriority) {
  2179. var _this2 = this;
  2180. this.options.sortPriority = sortPriority;
  2181. this.options.sortName = undefined;
  2182. if (this.options.sidePagination === 'server') {
  2183. var queryParams = this.options.queryParams;
  2184. this.options.queryParams = function (params) {
  2185. params.multiSort = _this2.options.sortPriority;
  2186. return $__default["default"].fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
  2187. };
  2188. isSingleSort = false;
  2189. this.initServer(this.options.silentSort);
  2190. return;
  2191. }
  2192. this.onMultipleSort();
  2193. };
  2194. }));