bootstrap-table-group-by.js 80 KB

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