bootstrap-table-multiple-sort.js 104 KB

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