bootstrap-table-toolbar.js 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. }(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. return Constructor;
  26. }
  27. function _inherits(subClass, superClass) {
  28. if (typeof superClass !== "function" && superClass !== null) {
  29. throw new TypeError("Super expression must either be null or a function");
  30. }
  31. subClass.prototype = Object.create(superClass && superClass.prototype, {
  32. constructor: {
  33. value: subClass,
  34. writable: true,
  35. configurable: true
  36. }
  37. });
  38. if (superClass) _setPrototypeOf(subClass, superClass);
  39. }
  40. function _getPrototypeOf(o) {
  41. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  42. return o.__proto__ || Object.getPrototypeOf(o);
  43. };
  44. return _getPrototypeOf(o);
  45. }
  46. function _setPrototypeOf(o, p) {
  47. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  48. o.__proto__ = p;
  49. return o;
  50. };
  51. return _setPrototypeOf(o, p);
  52. }
  53. function _isNativeReflectConstruct() {
  54. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  55. if (Reflect.construct.sham) return false;
  56. if (typeof Proxy === "function") return true;
  57. try {
  58. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  59. return true;
  60. } catch (e) {
  61. return false;
  62. }
  63. }
  64. function _assertThisInitialized(self) {
  65. if (self === void 0) {
  66. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  67. }
  68. return self;
  69. }
  70. function _possibleConstructorReturn(self, call) {
  71. if (call && (typeof call === "object" || typeof call === "function")) {
  72. return call;
  73. }
  74. return _assertThisInitialized(self);
  75. }
  76. function _createSuper(Derived) {
  77. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  78. return function _createSuperInternal() {
  79. var Super = _getPrototypeOf(Derived),
  80. result;
  81. if (hasNativeReflectConstruct) {
  82. var NewTarget = _getPrototypeOf(this).constructor;
  83. result = Reflect.construct(Super, arguments, NewTarget);
  84. } else {
  85. result = Super.apply(this, arguments);
  86. }
  87. return _possibleConstructorReturn(this, result);
  88. };
  89. }
  90. function _superPropBase(object, property) {
  91. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  92. object = _getPrototypeOf(object);
  93. if (object === null) break;
  94. }
  95. return object;
  96. }
  97. function _get(target, property, receiver) {
  98. if (typeof Reflect !== "undefined" && Reflect.get) {
  99. _get = Reflect.get;
  100. } else {
  101. _get = function _get(target, property, receiver) {
  102. var base = _superPropBase(target, property);
  103. if (!base) return;
  104. var desc = Object.getOwnPropertyDescriptor(base, property);
  105. if (desc.get) {
  106. return desc.get.call(receiver);
  107. }
  108. return desc.value;
  109. };
  110. }
  111. return _get(target, property, receiver || target);
  112. }
  113. function _slicedToArray(arr, i) {
  114. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  115. }
  116. function _toConsumableArray(arr) {
  117. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  118. }
  119. function _arrayWithoutHoles(arr) {
  120. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  121. }
  122. function _arrayWithHoles(arr) {
  123. if (Array.isArray(arr)) return arr;
  124. }
  125. function _iterableToArray(iter) {
  126. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  127. }
  128. function _iterableToArrayLimit(arr, i) {
  129. if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  130. var _arr = [];
  131. var _n = true;
  132. var _d = false;
  133. var _e = undefined;
  134. try {
  135. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  136. _arr.push(_s.value);
  137. if (i && _arr.length === i) break;
  138. }
  139. } catch (err) {
  140. _d = true;
  141. _e = err;
  142. } finally {
  143. try {
  144. if (!_n && _i["return"] != null) _i["return"]();
  145. } finally {
  146. if (_d) throw _e;
  147. }
  148. }
  149. return _arr;
  150. }
  151. function _unsupportedIterableToArray(o, minLen) {
  152. if (!o) return;
  153. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  154. var n = Object.prototype.toString.call(o).slice(8, -1);
  155. if (n === "Object" && o.constructor) n = o.constructor.name;
  156. if (n === "Map" || n === "Set") return Array.from(o);
  157. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  158. }
  159. function _arrayLikeToArray(arr, len) {
  160. if (len == null || len > arr.length) len = arr.length;
  161. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  162. return arr2;
  163. }
  164. function _nonIterableSpread() {
  165. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  166. }
  167. function _nonIterableRest() {
  168. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  169. }
  170. function _createForOfIteratorHelper(o, allowArrayLike) {
  171. var it;
  172. if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
  173. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  174. if (it) o = it;
  175. var i = 0;
  176. var F = function () {};
  177. return {
  178. s: F,
  179. n: function () {
  180. if (i >= o.length) return {
  181. done: true
  182. };
  183. return {
  184. done: false,
  185. value: o[i++]
  186. };
  187. },
  188. e: function (e) {
  189. throw e;
  190. },
  191. f: F
  192. };
  193. }
  194. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  195. }
  196. var normalCompletion = true,
  197. didErr = false,
  198. err;
  199. return {
  200. s: function () {
  201. it = o[Symbol.iterator]();
  202. },
  203. n: function () {
  204. var step = it.next();
  205. normalCompletion = step.done;
  206. return step;
  207. },
  208. e: function (e) {
  209. didErr = true;
  210. err = e;
  211. },
  212. f: function () {
  213. try {
  214. if (!normalCompletion && it.return != null) it.return();
  215. } finally {
  216. if (didErr) throw err;
  217. }
  218. }
  219. };
  220. }
  221. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  222. function createCommonjsModule(fn, module) {
  223. return module = { exports: {} }, fn(module, module.exports), module.exports;
  224. }
  225. var check = function (it) {
  226. return it && it.Math == Math && it;
  227. };
  228. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  229. var global_1 =
  230. /* global globalThis -- safe */
  231. check(typeof globalThis == 'object' && globalThis) ||
  232. check(typeof window == 'object' && window) ||
  233. check(typeof self == 'object' && self) ||
  234. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  235. // eslint-disable-next-line no-new-func -- fallback
  236. (function () { return this; })() || Function('return this')();
  237. var fails = function (exec) {
  238. try {
  239. return !!exec();
  240. } catch (error) {
  241. return true;
  242. }
  243. };
  244. // Detect IE8's incomplete defineProperty implementation
  245. var descriptors = !fails(function () {
  246. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  247. });
  248. var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
  249. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  250. // Nashorn ~ JDK8 bug
  251. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
  252. // `Object.prototype.propertyIsEnumerable` method implementation
  253. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  254. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  255. var descriptor = getOwnPropertyDescriptor$1(this, V);
  256. return !!descriptor && descriptor.enumerable;
  257. } : nativePropertyIsEnumerable;
  258. var objectPropertyIsEnumerable = {
  259. f: f$4
  260. };
  261. var createPropertyDescriptor = function (bitmap, value) {
  262. return {
  263. enumerable: !(bitmap & 1),
  264. configurable: !(bitmap & 2),
  265. writable: !(bitmap & 4),
  266. value: value
  267. };
  268. };
  269. var toString = {}.toString;
  270. var classofRaw = function (it) {
  271. return toString.call(it).slice(8, -1);
  272. };
  273. var split = ''.split;
  274. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  275. var indexedObject = fails(function () {
  276. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  277. // eslint-disable-next-line no-prototype-builtins -- safe
  278. return !Object('z').propertyIsEnumerable(0);
  279. }) ? function (it) {
  280. return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
  281. } : Object;
  282. // `RequireObjectCoercible` abstract operation
  283. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  284. var requireObjectCoercible = function (it) {
  285. if (it == undefined) throw TypeError("Can't call method on " + it);
  286. return it;
  287. };
  288. // toObject with fallback for non-array-like ES3 strings
  289. var toIndexedObject = function (it) {
  290. return indexedObject(requireObjectCoercible(it));
  291. };
  292. var isObject = function (it) {
  293. return typeof it === 'object' ? it !== null : typeof it === 'function';
  294. };
  295. // `ToPrimitive` abstract operation
  296. // https://tc39.es/ecma262/#sec-toprimitive
  297. // instead of the ES6 spec version, we didn't implement @@toPrimitive case
  298. // and the second argument - flag - preferred type is a string
  299. var toPrimitive = function (input, PREFERRED_STRING) {
  300. if (!isObject(input)) return input;
  301. var fn, val;
  302. if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  303. if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
  304. if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
  305. throw TypeError("Can't convert object to primitive value");
  306. };
  307. var hasOwnProperty = {}.hasOwnProperty;
  308. var has$1 = function (it, key) {
  309. return hasOwnProperty.call(it, key);
  310. };
  311. var document$1 = global_1.document;
  312. // typeof document.createElement is 'object' in old IE
  313. var EXISTS = isObject(document$1) && isObject(document$1.createElement);
  314. var documentCreateElement = function (it) {
  315. return EXISTS ? document$1.createElement(it) : {};
  316. };
  317. // Thank's IE8 for his funny defineProperty
  318. var ie8DomDefine = !descriptors && !fails(function () {
  319. return Object.defineProperty(documentCreateElement('div'), 'a', {
  320. get: function () { return 7; }
  321. }).a != 7;
  322. });
  323. var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  324. // `Object.getOwnPropertyDescriptor` method
  325. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  326. var f$3 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  327. O = toIndexedObject(O);
  328. P = toPrimitive(P, true);
  329. if (ie8DomDefine) try {
  330. return nativeGetOwnPropertyDescriptor(O, P);
  331. } catch (error) { /* empty */ }
  332. if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
  333. };
  334. var objectGetOwnPropertyDescriptor = {
  335. f: f$3
  336. };
  337. var anObject = function (it) {
  338. if (!isObject(it)) {
  339. throw TypeError(String(it) + ' is not an object');
  340. } return it;
  341. };
  342. var nativeDefineProperty = Object.defineProperty;
  343. // `Object.defineProperty` method
  344. // https://tc39.es/ecma262/#sec-object.defineproperty
  345. var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
  346. anObject(O);
  347. P = toPrimitive(P, true);
  348. anObject(Attributes);
  349. if (ie8DomDefine) try {
  350. return nativeDefineProperty(O, P, Attributes);
  351. } catch (error) { /* empty */ }
  352. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  353. if ('value' in Attributes) O[P] = Attributes.value;
  354. return O;
  355. };
  356. var objectDefineProperty = {
  357. f: f$2
  358. };
  359. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  360. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  361. } : function (object, key, value) {
  362. object[key] = value;
  363. return object;
  364. };
  365. var setGlobal = function (key, value) {
  366. try {
  367. createNonEnumerableProperty(global_1, key, value);
  368. } catch (error) {
  369. global_1[key] = value;
  370. } return value;
  371. };
  372. var SHARED = '__core-js_shared__';
  373. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  374. var sharedStore = store$1;
  375. var functionToString = Function.toString;
  376. // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
  377. if (typeof sharedStore.inspectSource != 'function') {
  378. sharedStore.inspectSource = function (it) {
  379. return functionToString.call(it);
  380. };
  381. }
  382. var inspectSource = sharedStore.inspectSource;
  383. var WeakMap$1 = global_1.WeakMap;
  384. var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
  385. var shared = createCommonjsModule(function (module) {
  386. (module.exports = function (key, value) {
  387. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  388. })('versions', []).push({
  389. version: '3.9.1',
  390. mode: 'global',
  391. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  392. });
  393. });
  394. var id = 0;
  395. var postfix = Math.random();
  396. var uid = function (key) {
  397. return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
  398. };
  399. var keys = shared('keys');
  400. var sharedKey = function (key) {
  401. return keys[key] || (keys[key] = uid(key));
  402. };
  403. var hiddenKeys$1 = {};
  404. var WeakMap = global_1.WeakMap;
  405. var set, get, has;
  406. var enforce = function (it) {
  407. return has(it) ? get(it) : set(it, {});
  408. };
  409. var getterFor = function (TYPE) {
  410. return function (it) {
  411. var state;
  412. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  413. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  414. } return state;
  415. };
  416. };
  417. if (nativeWeakMap) {
  418. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  419. var wmget = store.get;
  420. var wmhas = store.has;
  421. var wmset = store.set;
  422. set = function (it, metadata) {
  423. metadata.facade = it;
  424. wmset.call(store, it, metadata);
  425. return metadata;
  426. };
  427. get = function (it) {
  428. return wmget.call(store, it) || {};
  429. };
  430. has = function (it) {
  431. return wmhas.call(store, it);
  432. };
  433. } else {
  434. var STATE = sharedKey('state');
  435. hiddenKeys$1[STATE] = true;
  436. set = function (it, metadata) {
  437. metadata.facade = it;
  438. createNonEnumerableProperty(it, STATE, metadata);
  439. return metadata;
  440. };
  441. get = function (it) {
  442. return has$1(it, STATE) ? it[STATE] : {};
  443. };
  444. has = function (it) {
  445. return has$1(it, STATE);
  446. };
  447. }
  448. var internalState = {
  449. set: set,
  450. get: get,
  451. has: has,
  452. enforce: enforce,
  453. getterFor: getterFor
  454. };
  455. var redefine = createCommonjsModule(function (module) {
  456. var getInternalState = internalState.get;
  457. var enforceInternalState = internalState.enforce;
  458. var TEMPLATE = String(String).split('String');
  459. (module.exports = function (O, key, value, options) {
  460. var unsafe = options ? !!options.unsafe : false;
  461. var simple = options ? !!options.enumerable : false;
  462. var noTargetGet = options ? !!options.noTargetGet : false;
  463. var state;
  464. if (typeof value == 'function') {
  465. if (typeof key == 'string' && !has$1(value, 'name')) {
  466. createNonEnumerableProperty(value, 'name', key);
  467. }
  468. state = enforceInternalState(value);
  469. if (!state.source) {
  470. state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
  471. }
  472. }
  473. if (O === global_1) {
  474. if (simple) O[key] = value;
  475. else setGlobal(key, value);
  476. return;
  477. } else if (!unsafe) {
  478. delete O[key];
  479. } else if (!noTargetGet && O[key]) {
  480. simple = true;
  481. }
  482. if (simple) O[key] = value;
  483. else createNonEnumerableProperty(O, key, value);
  484. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  485. })(Function.prototype, 'toString', function toString() {
  486. return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
  487. });
  488. });
  489. var path = global_1;
  490. var aFunction$1 = function (variable) {
  491. return typeof variable == 'function' ? variable : undefined;
  492. };
  493. var getBuiltIn = function (namespace, method) {
  494. return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
  495. : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
  496. };
  497. var ceil = Math.ceil;
  498. var floor = Math.floor;
  499. // `ToInteger` abstract operation
  500. // https://tc39.es/ecma262/#sec-tointeger
  501. var toInteger = function (argument) {
  502. return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
  503. };
  504. var min$1 = Math.min;
  505. // `ToLength` abstract operation
  506. // https://tc39.es/ecma262/#sec-tolength
  507. var toLength = function (argument) {
  508. return argument > 0 ? min$1(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  509. };
  510. var max = Math.max;
  511. var min = Math.min;
  512. // Helper for a popular repeating case of the spec:
  513. // Let integer be ? ToInteger(index).
  514. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  515. var toAbsoluteIndex = function (index, length) {
  516. var integer = toInteger(index);
  517. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  518. };
  519. // `Array.prototype.{ indexOf, includes }` methods implementation
  520. var createMethod$3 = function (IS_INCLUDES) {
  521. return function ($this, el, fromIndex) {
  522. var O = toIndexedObject($this);
  523. var length = toLength(O.length);
  524. var index = toAbsoluteIndex(fromIndex, length);
  525. var value;
  526. // Array#includes uses SameValueZero equality algorithm
  527. // eslint-disable-next-line no-self-compare -- NaN check
  528. if (IS_INCLUDES && el != el) while (length > index) {
  529. value = O[index++];
  530. // eslint-disable-next-line no-self-compare -- NaN check
  531. if (value != value) return true;
  532. // Array#indexOf ignores holes, Array#includes - not
  533. } else for (;length > index; index++) {
  534. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  535. } return !IS_INCLUDES && -1;
  536. };
  537. };
  538. var arrayIncludes = {
  539. // `Array.prototype.includes` method
  540. // https://tc39.es/ecma262/#sec-array.prototype.includes
  541. includes: createMethod$3(true),
  542. // `Array.prototype.indexOf` method
  543. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  544. indexOf: createMethod$3(false)
  545. };
  546. var indexOf = arrayIncludes.indexOf;
  547. var objectKeysInternal = function (object, names) {
  548. var O = toIndexedObject(object);
  549. var i = 0;
  550. var result = [];
  551. var key;
  552. for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
  553. // Don't enum bug & hidden keys
  554. while (names.length > i) if (has$1(O, key = names[i++])) {
  555. ~indexOf(result, key) || result.push(key);
  556. }
  557. return result;
  558. };
  559. // IE8- don't enum bug keys
  560. var enumBugKeys = [
  561. 'constructor',
  562. 'hasOwnProperty',
  563. 'isPrototypeOf',
  564. 'propertyIsEnumerable',
  565. 'toLocaleString',
  566. 'toString',
  567. 'valueOf'
  568. ];
  569. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  570. // `Object.getOwnPropertyNames` method
  571. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  572. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  573. return objectKeysInternal(O, hiddenKeys);
  574. };
  575. var objectGetOwnPropertyNames = {
  576. f: f$1
  577. };
  578. var f = Object.getOwnPropertySymbols;
  579. var objectGetOwnPropertySymbols = {
  580. f: f
  581. };
  582. // all object keys, includes non-enumerable and symbols
  583. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  584. var keys = objectGetOwnPropertyNames.f(anObject(it));
  585. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  586. return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
  587. };
  588. var copyConstructorProperties = function (target, source) {
  589. var keys = ownKeys(source);
  590. var defineProperty = objectDefineProperty.f;
  591. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  592. for (var i = 0; i < keys.length; i++) {
  593. var key = keys[i];
  594. if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  595. }
  596. };
  597. var replacement = /#|\.prototype\./;
  598. var isForced = function (feature, detection) {
  599. var value = data[normalize(feature)];
  600. return value == POLYFILL ? true
  601. : value == NATIVE ? false
  602. : typeof detection == 'function' ? fails(detection)
  603. : !!detection;
  604. };
  605. var normalize = isForced.normalize = function (string) {
  606. return String(string).replace(replacement, '.').toLowerCase();
  607. };
  608. var data = isForced.data = {};
  609. var NATIVE = isForced.NATIVE = 'N';
  610. var POLYFILL = isForced.POLYFILL = 'P';
  611. var isForced_1 = isForced;
  612. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  613. /*
  614. options.target - name of the target object
  615. options.global - target is the global object
  616. options.stat - export as static methods of target
  617. options.proto - export as prototype methods of target
  618. options.real - real prototype method for the `pure` version
  619. options.forced - export even if the native feature is available
  620. options.bind - bind methods to the target, required for the `pure` version
  621. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  622. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  623. options.sham - add a flag to not completely full polyfills
  624. options.enumerable - export as enumerable property
  625. options.noTargetGet - prevent calling a getter on target
  626. */
  627. var _export = function (options, source) {
  628. var TARGET = options.target;
  629. var GLOBAL = options.global;
  630. var STATIC = options.stat;
  631. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  632. if (GLOBAL) {
  633. target = global_1;
  634. } else if (STATIC) {
  635. target = global_1[TARGET] || setGlobal(TARGET, {});
  636. } else {
  637. target = (global_1[TARGET] || {}).prototype;
  638. }
  639. if (target) for (key in source) {
  640. sourceProperty = source[key];
  641. if (options.noTargetGet) {
  642. descriptor = getOwnPropertyDescriptor(target, key);
  643. targetProperty = descriptor && descriptor.value;
  644. } else targetProperty = target[key];
  645. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  646. // contained in target
  647. if (!FORCED && targetProperty !== undefined) {
  648. if (typeof sourceProperty === typeof targetProperty) continue;
  649. copyConstructorProperties(sourceProperty, targetProperty);
  650. }
  651. // add a flag to not completely full polyfills
  652. if (options.sham || (targetProperty && targetProperty.sham)) {
  653. createNonEnumerableProperty(sourceProperty, 'sham', true);
  654. }
  655. // extend global
  656. redefine(target, key, sourceProperty, options);
  657. }
  658. };
  659. // `RegExp.prototype.flags` getter implementation
  660. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  661. var regexpFlags = function () {
  662. var that = anObject(this);
  663. var result = '';
  664. if (that.global) result += 'g';
  665. if (that.ignoreCase) result += 'i';
  666. if (that.multiline) result += 'm';
  667. if (that.dotAll) result += 's';
  668. if (that.unicode) result += 'u';
  669. if (that.sticky) result += 'y';
  670. return result;
  671. };
  672. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
  673. // so we use an intermediate function.
  674. function RE(s, f) {
  675. return RegExp(s, f);
  676. }
  677. var UNSUPPORTED_Y$1 = fails(function () {
  678. // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  679. var re = RE('a', 'y');
  680. re.lastIndex = 2;
  681. return re.exec('abcd') != null;
  682. });
  683. var BROKEN_CARET = fails(function () {
  684. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  685. var re = RE('^r', 'gy');
  686. re.lastIndex = 2;
  687. return re.exec('str') != null;
  688. });
  689. var regexpStickyHelpers = {
  690. UNSUPPORTED_Y: UNSUPPORTED_Y$1,
  691. BROKEN_CARET: BROKEN_CARET
  692. };
  693. var nativeExec = RegExp.prototype.exec;
  694. // This always refers to the native implementation, because the
  695. // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
  696. // which loads this file before patching the method.
  697. var nativeReplace = String.prototype.replace;
  698. var patchedExec = nativeExec;
  699. var UPDATES_LAST_INDEX_WRONG = (function () {
  700. var re1 = /a/;
  701. var re2 = /b*/g;
  702. nativeExec.call(re1, 'a');
  703. nativeExec.call(re2, 'a');
  704. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  705. })();
  706. var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
  707. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  708. // eslint-disable-next-line regexp/no-assertion-capturing-group, regexp/no-empty-group -- required for testing
  709. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  710. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
  711. if (PATCH) {
  712. patchedExec = function exec(str) {
  713. var re = this;
  714. var lastIndex, reCopy, match, i;
  715. var sticky = UNSUPPORTED_Y && re.sticky;
  716. var flags = regexpFlags.call(re);
  717. var source = re.source;
  718. var charsAdded = 0;
  719. var strCopy = str;
  720. if (sticky) {
  721. flags = flags.replace('y', '');
  722. if (flags.indexOf('g') === -1) {
  723. flags += 'g';
  724. }
  725. strCopy = String(str).slice(re.lastIndex);
  726. // Support anchored sticky behavior.
  727. if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
  728. source = '(?: ' + source + ')';
  729. strCopy = ' ' + strCopy;
  730. charsAdded++;
  731. }
  732. // ^(? + rx + ) is needed, in combination with some str slicing, to
  733. // simulate the 'y' flag.
  734. reCopy = new RegExp('^(?:' + source + ')', flags);
  735. }
  736. if (NPCG_INCLUDED) {
  737. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  738. }
  739. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  740. match = nativeExec.call(sticky ? reCopy : re, strCopy);
  741. if (sticky) {
  742. if (match) {
  743. match.input = match.input.slice(charsAdded);
  744. match[0] = match[0].slice(charsAdded);
  745. match.index = re.lastIndex;
  746. re.lastIndex += match[0].length;
  747. } else re.lastIndex = 0;
  748. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  749. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  750. }
  751. if (NPCG_INCLUDED && match && match.length > 1) {
  752. // Fix browsers whose `exec` methods don't consistently return `undefined`
  753. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  754. nativeReplace.call(match[0], reCopy, function () {
  755. for (i = 1; i < arguments.length - 2; i++) {
  756. if (arguments[i] === undefined) match[i] = undefined;
  757. }
  758. });
  759. }
  760. return match;
  761. };
  762. }
  763. var regexpExec = patchedExec;
  764. // `RegExp.prototype.exec` method
  765. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  766. _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
  767. exec: regexpExec
  768. });
  769. var engineIsNode = classofRaw(global_1.process) == 'process';
  770. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  771. var process = global_1.process;
  772. var versions = process && process.versions;
  773. var v8 = versions && versions.v8;
  774. var match, version;
  775. if (v8) {
  776. match = v8.split('.');
  777. version = match[0] + match[1];
  778. } else if (engineUserAgent) {
  779. match = engineUserAgent.match(/Edge\/(\d+)/);
  780. if (!match || match[1] >= 74) {
  781. match = engineUserAgent.match(/Chrome\/(\d+)/);
  782. if (match) version = match[1];
  783. }
  784. }
  785. var engineV8Version = version && +version;
  786. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  787. /* global Symbol -- required for testing */
  788. return !Symbol.sham &&
  789. // Chrome 38 Symbol has incorrect toString conversion
  790. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  791. (engineIsNode ? engineV8Version === 38 : engineV8Version > 37 && engineV8Version < 41);
  792. });
  793. var useSymbolAsUid = nativeSymbol
  794. /* global Symbol -- safe */
  795. && !Symbol.sham
  796. && typeof Symbol.iterator == 'symbol';
  797. var WellKnownSymbolsStore = shared('wks');
  798. var Symbol$1 = global_1.Symbol;
  799. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  800. var wellKnownSymbol = function (name) {
  801. if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  802. if (nativeSymbol && has$1(Symbol$1, name)) {
  803. WellKnownSymbolsStore[name] = Symbol$1[name];
  804. } else {
  805. WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
  806. }
  807. } return WellKnownSymbolsStore[name];
  808. };
  809. // TODO: Remove from `core-js@4` since it's moved to entry points
  810. var SPECIES$2 = wellKnownSymbol('species');
  811. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  812. // #replace needs built-in support for named groups.
  813. // #match works fine because it just return the exec results, even if it has
  814. // a "grops" property.
  815. var re = /./;
  816. re.exec = function () {
  817. var result = [];
  818. result.groups = { a: '7' };
  819. return result;
  820. };
  821. return ''.replace(re, '$<a>') !== '7';
  822. });
  823. // IE <= 11 replaces $0 with the whole match, as if it was $&
  824. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  825. var REPLACE_KEEPS_$0 = (function () {
  826. return 'a'.replace(/./, '$0') === '$0';
  827. })();
  828. var REPLACE = wellKnownSymbol('replace');
  829. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  830. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  831. if (/./[REPLACE]) {
  832. return /./[REPLACE]('a', '$0') === '';
  833. }
  834. return false;
  835. })();
  836. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  837. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  838. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  839. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  840. var re = /(?:)/;
  841. var originalExec = re.exec;
  842. re.exec = function () { return originalExec.apply(this, arguments); };
  843. var result = 'ab'.split(re);
  844. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  845. });
  846. var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
  847. var SYMBOL = wellKnownSymbol(KEY);
  848. var DELEGATES_TO_SYMBOL = !fails(function () {
  849. // String methods call symbol-named RegEp methods
  850. var O = {};
  851. O[SYMBOL] = function () { return 7; };
  852. return ''[KEY](O) != 7;
  853. });
  854. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  855. // Symbol-named RegExp methods call .exec
  856. var execCalled = false;
  857. var re = /a/;
  858. if (KEY === 'split') {
  859. // We can't use real regex here since it causes deoptimization
  860. // and serious performance degradation in V8
  861. // https://github.com/zloirock/core-js/issues/306
  862. re = {};
  863. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  864. // a new one. We need to return the patched regex when creating the new one.
  865. re.constructor = {};
  866. re.constructor[SPECIES$2] = function () { return re; };
  867. re.flags = '';
  868. re[SYMBOL] = /./[SYMBOL];
  869. }
  870. re.exec = function () { execCalled = true; return null; };
  871. re[SYMBOL]('');
  872. return !execCalled;
  873. });
  874. if (
  875. !DELEGATES_TO_SYMBOL ||
  876. !DELEGATES_TO_EXEC ||
  877. (KEY === 'replace' && !(
  878. REPLACE_SUPPORTS_NAMED_GROUPS &&
  879. REPLACE_KEEPS_$0 &&
  880. !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  881. )) ||
  882. (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
  883. ) {
  884. var nativeRegExpMethod = /./[SYMBOL];
  885. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  886. if (regexp.exec === regexpExec) {
  887. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  888. // The native String method already delegates to @@method (this
  889. // polyfilled function), leasing to infinite recursion.
  890. // We avoid it by directly calling the native @@method method.
  891. return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
  892. }
  893. return { done: true, value: nativeMethod.call(str, regexp, arg2) };
  894. }
  895. return { done: false };
  896. }, {
  897. REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
  898. REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
  899. });
  900. var stringMethod = methods[0];
  901. var regexMethod = methods[1];
  902. redefine(String.prototype, KEY, stringMethod);
  903. redefine(RegExp.prototype, SYMBOL, length == 2
  904. // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
  905. // 21.2.5.11 RegExp.prototype[@@split](string, limit)
  906. ? function (string, arg) { return regexMethod.call(string, this, arg); }
  907. // 21.2.5.6 RegExp.prototype[@@match](string)
  908. // 21.2.5.9 RegExp.prototype[@@search](string)
  909. : function (string) { return regexMethod.call(string, this); }
  910. );
  911. }
  912. if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
  913. };
  914. // `SameValue` abstract operation
  915. // https://tc39.es/ecma262/#sec-samevalue
  916. var sameValue = Object.is || function is(x, y) {
  917. // eslint-disable-next-line no-self-compare -- NaN check
  918. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  919. };
  920. // `RegExpExec` abstract operation
  921. // https://tc39.es/ecma262/#sec-regexpexec
  922. var regexpExecAbstract = function (R, S) {
  923. var exec = R.exec;
  924. if (typeof exec === 'function') {
  925. var result = exec.call(R, S);
  926. if (typeof result !== 'object') {
  927. throw TypeError('RegExp exec method returned something other than an Object or null');
  928. }
  929. return result;
  930. }
  931. if (classofRaw(R) !== 'RegExp') {
  932. throw TypeError('RegExp#exec called on incompatible receiver');
  933. }
  934. return regexpExec.call(R, S);
  935. };
  936. // @@search logic
  937. fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
  938. return [
  939. // `String.prototype.search` method
  940. // https://tc39.es/ecma262/#sec-string.prototype.search
  941. function search(regexp) {
  942. var O = requireObjectCoercible(this);
  943. var searcher = regexp == undefined ? undefined : regexp[SEARCH];
  944. return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
  945. },
  946. // `RegExp.prototype[@@search]` method
  947. // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
  948. function (regexp) {
  949. var res = maybeCallNative(nativeSearch, regexp, this);
  950. if (res.done) return res.value;
  951. var rx = anObject(regexp);
  952. var S = String(this);
  953. var previousLastIndex = rx.lastIndex;
  954. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  955. var result = regexpExecAbstract(rx, S);
  956. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  957. return result === null ? -1 : result.index;
  958. }
  959. ];
  960. });
  961. // `Object.keys` method
  962. // https://tc39.es/ecma262/#sec-object.keys
  963. var objectKeys = Object.keys || function keys(O) {
  964. return objectKeysInternal(O, enumBugKeys);
  965. };
  966. // `ToObject` abstract operation
  967. // https://tc39.es/ecma262/#sec-toobject
  968. var toObject = function (argument) {
  969. return Object(requireObjectCoercible(argument));
  970. };
  971. var nativeAssign = Object.assign;
  972. var defineProperty = Object.defineProperty;
  973. // `Object.assign` method
  974. // https://tc39.es/ecma262/#sec-object.assign
  975. var objectAssign = !nativeAssign || fails(function () {
  976. // should have correct order of operations (Edge bug)
  977. if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
  978. enumerable: true,
  979. get: function () {
  980. defineProperty(this, 'b', {
  981. value: 3,
  982. enumerable: false
  983. });
  984. }
  985. }), { b: 2 })).b !== 1) return true;
  986. // should work with symbols and should have deterministic property order (V8 bug)
  987. var A = {};
  988. var B = {};
  989. /* global Symbol -- required for testing */
  990. var symbol = Symbol();
  991. var alphabet = 'abcdefghijklmnopqrst';
  992. A[symbol] = 7;
  993. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  994. return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
  995. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  996. var T = toObject(target);
  997. var argumentsLength = arguments.length;
  998. var index = 1;
  999. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  1000. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1001. while (argumentsLength > index) {
  1002. var S = indexedObject(arguments[index++]);
  1003. var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
  1004. var length = keys.length;
  1005. var j = 0;
  1006. var key;
  1007. while (length > j) {
  1008. key = keys[j++];
  1009. if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
  1010. }
  1011. } return T;
  1012. } : nativeAssign;
  1013. // `Object.assign` method
  1014. // https://tc39.es/ecma262/#sec-object.assign
  1015. _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
  1016. assign: objectAssign
  1017. });
  1018. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1019. var method = [][METHOD_NAME];
  1020. return !!method && fails(function () {
  1021. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  1022. method.call(null, argument || function () { throw 1; }, 1);
  1023. });
  1024. };
  1025. var nativeJoin = [].join;
  1026. var ES3_STRINGS = indexedObject != Object;
  1027. var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
  1028. // `Array.prototype.join` method
  1029. // https://tc39.es/ecma262/#sec-array.prototype.join
  1030. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
  1031. join: function join(separator) {
  1032. return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
  1033. }
  1034. });
  1035. var aFunction = function (it) {
  1036. if (typeof it != 'function') {
  1037. throw TypeError(String(it) + ' is not a function');
  1038. } return it;
  1039. };
  1040. // optional / simple context binding
  1041. var functionBindContext = function (fn, that, length) {
  1042. aFunction(fn);
  1043. if (that === undefined) return fn;
  1044. switch (length) {
  1045. case 0: return function () {
  1046. return fn.call(that);
  1047. };
  1048. case 1: return function (a) {
  1049. return fn.call(that, a);
  1050. };
  1051. case 2: return function (a, b) {
  1052. return fn.call(that, a, b);
  1053. };
  1054. case 3: return function (a, b, c) {
  1055. return fn.call(that, a, b, c);
  1056. };
  1057. }
  1058. return function (/* ...args */) {
  1059. return fn.apply(that, arguments);
  1060. };
  1061. };
  1062. // `IsArray` abstract operation
  1063. // https://tc39.es/ecma262/#sec-isarray
  1064. var isArray = Array.isArray || function isArray(arg) {
  1065. return classofRaw(arg) == 'Array';
  1066. };
  1067. var SPECIES$1 = wellKnownSymbol('species');
  1068. // `ArraySpeciesCreate` abstract operation
  1069. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1070. var arraySpeciesCreate = function (originalArray, length) {
  1071. var C;
  1072. if (isArray(originalArray)) {
  1073. C = originalArray.constructor;
  1074. // cross-realm fallback
  1075. if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
  1076. else if (isObject(C)) {
  1077. C = C[SPECIES$1];
  1078. if (C === null) C = undefined;
  1079. }
  1080. } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
  1081. };
  1082. var push = [].push;
  1083. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
  1084. var createMethod$2 = function (TYPE) {
  1085. var IS_MAP = TYPE == 1;
  1086. var IS_FILTER = TYPE == 2;
  1087. var IS_SOME = TYPE == 3;
  1088. var IS_EVERY = TYPE == 4;
  1089. var IS_FIND_INDEX = TYPE == 6;
  1090. var IS_FILTER_OUT = TYPE == 7;
  1091. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1092. return function ($this, callbackfn, that, specificCreate) {
  1093. var O = toObject($this);
  1094. var self = indexedObject(O);
  1095. var boundFunction = functionBindContext(callbackfn, that, 3);
  1096. var length = toLength(self.length);
  1097. var index = 0;
  1098. var create = specificCreate || arraySpeciesCreate;
  1099. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
  1100. var value, result;
  1101. for (;length > index; index++) if (NO_HOLES || index in self) {
  1102. value = self[index];
  1103. result = boundFunction(value, index, O);
  1104. if (TYPE) {
  1105. if (IS_MAP) target[index] = result; // map
  1106. else if (result) switch (TYPE) {
  1107. case 3: return true; // some
  1108. case 5: return value; // find
  1109. case 6: return index; // findIndex
  1110. case 2: push.call(target, value); // filter
  1111. } else switch (TYPE) {
  1112. case 4: return false; // every
  1113. case 7: push.call(target, value); // filterOut
  1114. }
  1115. }
  1116. }
  1117. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1118. };
  1119. };
  1120. var arrayIteration = {
  1121. // `Array.prototype.forEach` method
  1122. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1123. forEach: createMethod$2(0),
  1124. // `Array.prototype.map` method
  1125. // https://tc39.es/ecma262/#sec-array.prototype.map
  1126. map: createMethod$2(1),
  1127. // `Array.prototype.filter` method
  1128. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1129. filter: createMethod$2(2),
  1130. // `Array.prototype.some` method
  1131. // https://tc39.es/ecma262/#sec-array.prototype.some
  1132. some: createMethod$2(3),
  1133. // `Array.prototype.every` method
  1134. // https://tc39.es/ecma262/#sec-array.prototype.every
  1135. every: createMethod$2(4),
  1136. // `Array.prototype.find` method
  1137. // https://tc39.es/ecma262/#sec-array.prototype.find
  1138. find: createMethod$2(5),
  1139. // `Array.prototype.findIndex` method
  1140. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1141. findIndex: createMethod$2(6),
  1142. // `Array.prototype.filterOut` method
  1143. // https://github.com/tc39/proposal-array-filtering
  1144. filterOut: createMethod$2(7)
  1145. };
  1146. // `Object.defineProperties` method
  1147. // https://tc39.es/ecma262/#sec-object.defineproperties
  1148. var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
  1149. anObject(O);
  1150. var keys = objectKeys(Properties);
  1151. var length = keys.length;
  1152. var index = 0;
  1153. var key;
  1154. while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
  1155. return O;
  1156. };
  1157. var html = getBuiltIn('document', 'documentElement');
  1158. var GT = '>';
  1159. var LT = '<';
  1160. var PROTOTYPE = 'prototype';
  1161. var SCRIPT = 'script';
  1162. var IE_PROTO = sharedKey('IE_PROTO');
  1163. var EmptyConstructor = function () { /* empty */ };
  1164. var scriptTag = function (content) {
  1165. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1166. };
  1167. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1168. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1169. activeXDocument.write(scriptTag(''));
  1170. activeXDocument.close();
  1171. var temp = activeXDocument.parentWindow.Object;
  1172. activeXDocument = null; // avoid memory leak
  1173. return temp;
  1174. };
  1175. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1176. var NullProtoObjectViaIFrame = function () {
  1177. // Thrash, waste and sodomy: IE GC bug
  1178. var iframe = documentCreateElement('iframe');
  1179. var JS = 'java' + SCRIPT + ':';
  1180. var iframeDocument;
  1181. iframe.style.display = 'none';
  1182. html.appendChild(iframe);
  1183. // https://github.com/zloirock/core-js/issues/475
  1184. iframe.src = String(JS);
  1185. iframeDocument = iframe.contentWindow.document;
  1186. iframeDocument.open();
  1187. iframeDocument.write(scriptTag('document.F=Object'));
  1188. iframeDocument.close();
  1189. return iframeDocument.F;
  1190. };
  1191. // Check for document.domain and active x support
  1192. // No need to use active x approach when document.domain is not set
  1193. // see https://github.com/es-shims/es5-shim/issues/150
  1194. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1195. // avoid IE GC bug
  1196. var activeXDocument;
  1197. var NullProtoObject = function () {
  1198. try {
  1199. /* global ActiveXObject -- old IE */
  1200. activeXDocument = document.domain && new ActiveXObject('htmlfile');
  1201. } catch (error) { /* ignore */ }
  1202. NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
  1203. var length = enumBugKeys.length;
  1204. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1205. return NullProtoObject();
  1206. };
  1207. hiddenKeys$1[IE_PROTO] = true;
  1208. // `Object.create` method
  1209. // https://tc39.es/ecma262/#sec-object.create
  1210. var objectCreate = Object.create || function create(O, Properties) {
  1211. var result;
  1212. if (O !== null) {
  1213. EmptyConstructor[PROTOTYPE] = anObject(O);
  1214. result = new EmptyConstructor();
  1215. EmptyConstructor[PROTOTYPE] = null;
  1216. // add "__proto__" for Object.getPrototypeOf polyfill
  1217. result[IE_PROTO] = O;
  1218. } else result = NullProtoObject();
  1219. return Properties === undefined ? result : objectDefineProperties(result, Properties);
  1220. };
  1221. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1222. var ArrayPrototype = Array.prototype;
  1223. // Array.prototype[@@unscopables]
  1224. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1225. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1226. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1227. configurable: true,
  1228. value: objectCreate(null)
  1229. });
  1230. }
  1231. // add a key to Array.prototype[@@unscopables]
  1232. var addToUnscopables = function (key) {
  1233. ArrayPrototype[UNSCOPABLES][key] = true;
  1234. };
  1235. var $find = arrayIteration.find;
  1236. var FIND = 'find';
  1237. var SKIPS_HOLES = true;
  1238. // Shouldn't skip holes
  1239. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1240. // `Array.prototype.find` method
  1241. // https://tc39.es/ecma262/#sec-array.prototype.find
  1242. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1243. find: function find(callbackfn /* , that = undefined */) {
  1244. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1245. }
  1246. });
  1247. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1248. addToUnscopables(FIND);
  1249. var createProperty = function (object, key, value) {
  1250. var propertyKey = toPrimitive(key);
  1251. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1252. else object[propertyKey] = value;
  1253. };
  1254. var SPECIES = wellKnownSymbol('species');
  1255. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1256. // We can't use this feature detection in V8 since it causes
  1257. // deoptimization and serious performance degradation
  1258. // https://github.com/zloirock/core-js/issues/677
  1259. return engineV8Version >= 51 || !fails(function () {
  1260. var array = [];
  1261. var constructor = array.constructor = {};
  1262. constructor[SPECIES] = function () {
  1263. return { foo: 1 };
  1264. };
  1265. return array[METHOD_NAME](Boolean).foo !== 1;
  1266. });
  1267. };
  1268. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1269. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1270. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1271. // We can't use this feature detection in V8 since it causes
  1272. // deoptimization and serious performance degradation
  1273. // https://github.com/zloirock/core-js/issues/679
  1274. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1275. var array = [];
  1276. array[IS_CONCAT_SPREADABLE] = false;
  1277. return array.concat()[0] !== array;
  1278. });
  1279. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1280. var isConcatSpreadable = function (O) {
  1281. if (!isObject(O)) return false;
  1282. var spreadable = O[IS_CONCAT_SPREADABLE];
  1283. return spreadable !== undefined ? !!spreadable : isArray(O);
  1284. };
  1285. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1286. // `Array.prototype.concat` method
  1287. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1288. // with adding support of @@isConcatSpreadable and @@species
  1289. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1290. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1291. concat: function concat(arg) {
  1292. var O = toObject(this);
  1293. var A = arraySpeciesCreate(O, 0);
  1294. var n = 0;
  1295. var i, k, length, len, E;
  1296. for (i = -1, length = arguments.length; i < length; i++) {
  1297. E = i === -1 ? O : arguments[i];
  1298. if (isConcatSpreadable(E)) {
  1299. len = toLength(E.length);
  1300. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1301. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1302. } else {
  1303. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1304. createProperty(A, n++, E);
  1305. }
  1306. }
  1307. A.length = n;
  1308. return A;
  1309. }
  1310. });
  1311. var $filter = arrayIteration.filter;
  1312. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1313. // `Array.prototype.filter` method
  1314. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1315. // with adding support of @@species
  1316. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1317. filter: function filter(callbackfn /* , thisArg */) {
  1318. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1319. }
  1320. });
  1321. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1322. // `Object.{ entries, values }` methods implementation
  1323. var createMethod$1 = function (TO_ENTRIES) {
  1324. return function (it) {
  1325. var O = toIndexedObject(it);
  1326. var keys = objectKeys(O);
  1327. var length = keys.length;
  1328. var i = 0;
  1329. var result = [];
  1330. var key;
  1331. while (length > i) {
  1332. key = keys[i++];
  1333. if (!descriptors || propertyIsEnumerable.call(O, key)) {
  1334. result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
  1335. }
  1336. }
  1337. return result;
  1338. };
  1339. };
  1340. var objectToArray = {
  1341. // `Object.entries` method
  1342. // https://tc39.es/ecma262/#sec-object.entries
  1343. entries: createMethod$1(true),
  1344. // `Object.values` method
  1345. // https://tc39.es/ecma262/#sec-object.values
  1346. values: createMethod$1(false)
  1347. };
  1348. var $entries = objectToArray.entries;
  1349. // `Object.entries` method
  1350. // https://tc39.es/ecma262/#sec-object.entries
  1351. _export({ target: 'Object', stat: true }, {
  1352. entries: function entries(O) {
  1353. return $entries(O);
  1354. }
  1355. });
  1356. var $indexOf = arrayIncludes.indexOf;
  1357. var nativeIndexOf = [].indexOf;
  1358. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
  1359. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  1360. // `Array.prototype.indexOf` method
  1361. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1362. _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  1363. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1364. return NEGATIVE_ZERO
  1365. // convert -0 to +0
  1366. ? nativeIndexOf.apply(this, arguments) || 0
  1367. : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
  1368. }
  1369. });
  1370. var $includes = arrayIncludes.includes;
  1371. // `Array.prototype.includes` method
  1372. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1373. _export({ target: 'Array', proto: true }, {
  1374. includes: function includes(el /* , fromIndex = 0 */) {
  1375. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1376. }
  1377. });
  1378. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1379. addToUnscopables('includes');
  1380. var MATCH$1 = wellKnownSymbol('match');
  1381. // `IsRegExp` abstract operation
  1382. // https://tc39.es/ecma262/#sec-isregexp
  1383. var isRegexp = function (it) {
  1384. var isRegExp;
  1385. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  1386. };
  1387. var notARegexp = function (it) {
  1388. if (isRegexp(it)) {
  1389. throw TypeError("The method doesn't accept regular expressions");
  1390. } return it;
  1391. };
  1392. var MATCH = wellKnownSymbol('match');
  1393. var correctIsRegexpLogic = function (METHOD_NAME) {
  1394. var regexp = /./;
  1395. try {
  1396. '/./'[METHOD_NAME](regexp);
  1397. } catch (error1) {
  1398. try {
  1399. regexp[MATCH] = false;
  1400. return '/./'[METHOD_NAME](regexp);
  1401. } catch (error2) { /* empty */ }
  1402. } return false;
  1403. };
  1404. // `String.prototype.includes` method
  1405. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1406. _export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
  1407. includes: function includes(searchString /* , position = 0 */) {
  1408. return !!~String(requireObjectCoercible(this))
  1409. .indexOf(notARegexp(searchString), arguments.length > 1 ? arguments[1] : undefined);
  1410. }
  1411. });
  1412. // a string of all valid unicode whitespaces
  1413. var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1414. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1415. var whitespace = '[' + whitespaces + ']';
  1416. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1417. var rtrim = RegExp(whitespace + whitespace + '*$');
  1418. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1419. var createMethod = function (TYPE) {
  1420. return function ($this) {
  1421. var string = String(requireObjectCoercible($this));
  1422. if (TYPE & 1) string = string.replace(ltrim, '');
  1423. if (TYPE & 2) string = string.replace(rtrim, '');
  1424. return string;
  1425. };
  1426. };
  1427. var stringTrim = {
  1428. // `String.prototype.{ trimLeft, trimStart }` methods
  1429. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1430. start: createMethod(1),
  1431. // `String.prototype.{ trimRight, trimEnd }` methods
  1432. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1433. end: createMethod(2),
  1434. // `String.prototype.trim` method
  1435. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1436. trim: createMethod(3)
  1437. };
  1438. var non = '\u200B\u0085\u180E';
  1439. // check that a method works with the correct list
  1440. // of whitespaces and has a correct name
  1441. var stringTrimForced = function (METHOD_NAME) {
  1442. return fails(function () {
  1443. return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
  1444. });
  1445. };
  1446. var $trim = stringTrim.trim;
  1447. // `String.prototype.trim` method
  1448. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1449. _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
  1450. trim: function trim() {
  1451. return $trim(this);
  1452. }
  1453. });
  1454. /**
  1455. * @author: aperez <aperez@datadec.es>
  1456. * @version: v2.0.0
  1457. *
  1458. * @update Dennis Hernández <http://djhvscf.github.io/Blog>
  1459. * @update zhixin wen <wenzhixin2010@gmail.com>
  1460. */
  1461. var Utils = $__default['default'].fn.bootstrapTable.utils;
  1462. var theme = {
  1463. bootstrap3: {
  1464. icons: {
  1465. advancedSearchIcon: 'glyphicon-chevron-down'
  1466. },
  1467. html: {
  1468. modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">%s</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0px; padding-left: 0px;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
  1469. }
  1470. },
  1471. bootstrap4: {
  1472. icons: {
  1473. advancedSearchIcon: 'fa-chevron-down'
  1474. },
  1475. html: {
  1476. modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">%s</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0; padding-left: 0;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
  1477. }
  1478. },
  1479. bootstrap5: {
  1480. icons: {
  1481. advancedSearchIcon: 'fa-chevron-down'
  1482. },
  1483. html: {
  1484. modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xs\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">%s</h4>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body modal-body-custom\">\n <div class=\"container-fluid\" id=\"avdSearchModalContent_%s\"\n style=\"padding-right: 0; padding-left: 0;\" >\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" id=\"btnCloseAvd_%s\" class=\"btn btn-%s\">%s</button>\n </div>\n </div>\n </div>\n </div>\n "
  1485. }
  1486. },
  1487. bulma: {
  1488. icons: {
  1489. advancedSearchIcon: 'fa-chevron-down'
  1490. },
  1491. html: {
  1492. modal: "\n <div class=\"modal\" id=\"avdSearchModal_%s\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-card\">\n <header class=\"modal-card-head\">\n <p class=\"modal-card-title\">%s</p>\n <button class=\"delete\" aria-label=\"close\"></button>\n </header>\n <section class=\"modal-card-body\" id=\"avdSearchModalContent_%s\"></section>\n <footer class=\"modal-card-foot\">\n <button class=\"button\" id=\"btnCloseAvd_%s\" data-close=\"btn btn-%s\">%s</button>\n </footer>\n </div>\n </div>\n "
  1493. }
  1494. },
  1495. foundation: {
  1496. icons: {
  1497. advancedSearchIcon: 'fa-chevron-down'
  1498. },
  1499. html: {
  1500. modal: "\n <div class=\"reveal\" id=\"avdSearchModal_%s\" data-reveal>\n <h1>%s</h1>\n <div id=\"avdSearchModalContent_%s\">\n\n </div>\n <button class=\"close-button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n\n <button id=\"btnCloseAvd_%s\" class=\"%s\" type=\"button\">%s</button>\n </div>\n "
  1501. }
  1502. },
  1503. materialize: {
  1504. icons: {
  1505. advancedSearchIcon: 'expand_more'
  1506. },
  1507. html: {
  1508. modal: "\n <div id=\"avdSearchModal_%s\" class=\"modal\">\n <div class=\"modal-content\">\n <h4>%s</h4>\n <div id=\"avdSearchModalContent_%s\">\n\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\"\" id=\"btnCloseAvd_%s\" class=\"modal-close waves-effect waves-green btn-flat %s\">%s</a>\n </div>\n </div>\n "
  1509. }
  1510. },
  1511. semantic: {
  1512. icons: {
  1513. advancedSearchIcon: 'fa-chevron-down'
  1514. },
  1515. html: {
  1516. modal: "\n <div class=\"ui modal\" id=\"avdSearchModal_%s\">\n <i class=\"close icon\"></i>\n <div class=\"header\">\n %s\n </div>\n <div class=\"image content ui form\" id=\"avdSearchModalContent_%s\"></div>\n <div class=\"actions\">\n <div id=\"btnCloseAvd_%s\" class=\"ui black deny button %s\">%s</div>\n </div>\n </div>\n "
  1517. }
  1518. }
  1519. }[$__default['default'].fn.bootstrapTable.theme];
  1520. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, {
  1521. advancedSearch: false,
  1522. idForm: 'advancedSearch',
  1523. actionForm: '',
  1524. idTable: undefined,
  1525. // eslint-disable-next-line no-unused-vars
  1526. onColumnAdvancedSearch: function onColumnAdvancedSearch(field, text) {
  1527. return false;
  1528. }
  1529. });
  1530. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults.icons, {
  1531. advancedSearchIcon: theme.icons.advancedSearchIcon
  1532. });
  1533. $__default['default'].extend($__default['default'].fn.bootstrapTable.Constructor.EVENTS, {
  1534. 'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
  1535. });
  1536. $__default['default'].extend($__default['default'].fn.bootstrapTable.locales, {
  1537. formatAdvancedSearch: function formatAdvancedSearch() {
  1538. return 'Advanced search';
  1539. },
  1540. formatAdvancedCloseButton: function formatAdvancedCloseButton() {
  1541. return 'Close';
  1542. }
  1543. });
  1544. $__default['default'].extend($__default['default'].fn.bootstrapTable.defaults, $__default['default'].fn.bootstrapTable.locales);
  1545. $__default['default'].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1546. _inherits(_class, _$$BootstrapTable);
  1547. var _super = _createSuper(_class);
  1548. function _class() {
  1549. _classCallCheck(this, _class);
  1550. return _super.apply(this, arguments);
  1551. }
  1552. _createClass(_class, [{
  1553. key: "initToolbar",
  1554. value: function initToolbar() {
  1555. var o = this.options;
  1556. this.showToolbar = this.showToolbar || o.search && o.advancedSearch && o.idTable;
  1557. if (o.search && o.advancedSearch && o.idTable) {
  1558. this.buttons = Object.assign(this.buttons, {
  1559. advancedSearch: {
  1560. text: this.options.formatAdvancedSearch(),
  1561. icon: this.options.icons.advancedSearchIcon,
  1562. event: this.showAvdSearch,
  1563. attributes: {
  1564. 'aria-label': this.options.formatAdvancedSearch(),
  1565. title: this.options.formatAdvancedSearch()
  1566. }
  1567. }
  1568. });
  1569. }
  1570. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  1571. }
  1572. }, {
  1573. key: "showAvdSearch",
  1574. value: function showAvdSearch() {
  1575. var _this = this;
  1576. var o = this.options;
  1577. var modalSelector = "#avdSearchModal_".concat(o.idTable);
  1578. if ($__default['default'](modalSelector).length <= 0) {
  1579. $__default['default']('body').append(Utils.sprintf(theme.html.modal, o.idTable, o.formatAdvancedSearch(), o.idTable, o.idTable, o.buttonsClass, o.formatAdvancedCloseButton()));
  1580. var timeoutId = 0;
  1581. $__default['default']("#avdSearchModalContent_".concat(o.idTable)).append(this.createFormAvd().join(''));
  1582. $__default['default']("#".concat(o.idForm)).off('keyup blur', 'input').on('keyup blur', 'input', function (e) {
  1583. if (o.sidePagination === 'server') {
  1584. _this.onColumnAdvancedSearch(e);
  1585. } else {
  1586. clearTimeout(timeoutId);
  1587. timeoutId = setTimeout(function () {
  1588. _this.onColumnAdvancedSearch(e);
  1589. }, o.searchTimeOut);
  1590. }
  1591. });
  1592. $__default['default']("#btnCloseAvd_".concat(o.idTable)).click(function () {
  1593. return _this.hideModal();
  1594. });
  1595. if ($__default['default'].fn.bootstrapTable.theme === 'bulma') {
  1596. $__default['default'](modalSelector).find('.delete').off('click').on('click', function () {
  1597. return _this.hideModal();
  1598. });
  1599. }
  1600. this.showModal();
  1601. } else {
  1602. this.showModal();
  1603. }
  1604. }
  1605. }, {
  1606. key: "showModal",
  1607. value: function showModal() {
  1608. var modalSelector = "#avdSearchModal_".concat(this.options.idTable);
  1609. if ($__default['default'].inArray($__default['default'].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
  1610. $__default['default'](modalSelector).modal();
  1611. } else if ($__default['default'].fn.bootstrapTable.theme === 'bootstrap5') {
  1612. if (!this.toolbarModal) {
  1613. // eslint-disable-next-line no-undef
  1614. this.toolbarModal = new bootstrap.Modal(document.getElementById("avdSearchModal_".concat(this.options.idTable)), {});
  1615. }
  1616. this.toolbarModal.show();
  1617. } else if ($__default['default'].fn.bootstrapTable.theme === 'bulma') {
  1618. $__default['default'](modalSelector).toggleClass('is-active');
  1619. } else if ($__default['default'].fn.bootstrapTable.theme === 'foundation') {
  1620. if (!this.toolbarModal) {
  1621. // eslint-disable-next-line no-undef
  1622. this.toolbarModal = new Foundation.Reveal($__default['default'](modalSelector));
  1623. }
  1624. this.toolbarModal.open();
  1625. } else if ($__default['default'].fn.bootstrapTable.theme === 'materialize') {
  1626. $__default['default'](modalSelector).modal();
  1627. $__default['default'](modalSelector).modal('open');
  1628. } else if ($__default['default'].fn.bootstrapTable.theme === 'semantic') {
  1629. $__default['default'](modalSelector).modal('show');
  1630. }
  1631. }
  1632. }, {
  1633. key: "hideModal",
  1634. value: function hideModal() {
  1635. var $closeModalButton = $__default['default']("#avdSearchModal_".concat(this.options.idTable));
  1636. var modalSelector = "#avdSearchModal_".concat(this.options.idTable);
  1637. if ($__default['default'].inArray($__default['default'].fn.bootstrapTable.theme, ['bootstrap3', 'bootstrap4']) !== -1) {
  1638. $closeModalButton.modal('hide');
  1639. } else if ($__default['default'].fn.bootstrapTable.theme === 'bootstrap5') {
  1640. this.toolbarModal.hide();
  1641. } else if ($__default['default'].fn.bootstrapTable.theme === 'bulma') {
  1642. $__default['default']('html').toggleClass('is-clipped');
  1643. $__default['default'](modalSelector).toggleClass('is-active');
  1644. } else if ($__default['default'].fn.bootstrapTable.theme === 'foundation') {
  1645. this.toolbarModal.close();
  1646. } else if ($__default['default'].fn.bootstrapTable.theme === 'materialize') {
  1647. $__default['default'](modalSelector).modal('open');
  1648. } else if ($__default['default'].fn.bootstrapTable.theme === 'semantic') {
  1649. $__default['default'](modalSelector).modal('close');
  1650. }
  1651. if (this.options.sidePagination === 'server') {
  1652. this.options.pageNumber = 1;
  1653. this.updatePagination();
  1654. this.trigger('column-advanced-search', this.filterColumnsPartial);
  1655. }
  1656. }
  1657. }, {
  1658. key: "createFormAvd",
  1659. value: function createFormAvd() {
  1660. var o = this.options;
  1661. var html = ["<form class=\"form-horizontal\" id=\"".concat(o.idForm, "\" action=\"").concat(o.actionForm, "\">")];
  1662. var _iterator = _createForOfIteratorHelper(this.columns),
  1663. _step;
  1664. try {
  1665. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1666. var column = _step.value;
  1667. if (!column.checkbox && column.visible && column.searchable) {
  1668. html.push("\n <div class=\"form-group row\">\n <label class=\"col-sm-4 control-label\">".concat(column.title, "</label>\n <div class=\"col-sm-6\">\n <input type=\"text\" class=\"form-control ").concat(this.constants.classes.input, "\" name=\"").concat(column.field, "\" placeholder=\"").concat(column.title, "\" id=\"").concat(column.field, "\">\n </div>\n </div>\n "));
  1669. }
  1670. }
  1671. } catch (err) {
  1672. _iterator.e(err);
  1673. } finally {
  1674. _iterator.f();
  1675. }
  1676. html.push('</form>');
  1677. return html;
  1678. }
  1679. }, {
  1680. key: "initSearch",
  1681. value: function initSearch() {
  1682. var _this2 = this;
  1683. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  1684. if (!this.options.advancedSearch || this.options.sidePagination === 'server') {
  1685. return;
  1686. }
  1687. var fp = $__default['default'].isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
  1688. this.data = fp ? this.data.filter(function (item, i) {
  1689. for (var _i = 0, _Object$entries = Object.entries(fp); _i < _Object$entries.length; _i++) {
  1690. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  1691. key = _Object$entries$_i[0],
  1692. v = _Object$entries$_i[1];
  1693. var fval = v.toLowerCase();
  1694. var value = item[key];
  1695. var index = _this2.header.fields.indexOf(key);
  1696. value = Utils.calculateObjectValue(_this2.header, _this2.header.formatters[index], [value, item, i], value);
  1697. if (!(index !== -1 && (typeof value === 'string' || typeof value === 'number') && "".concat(value).toLowerCase().includes(fval))) {
  1698. return false;
  1699. }
  1700. }
  1701. return true;
  1702. }) : this.data;
  1703. this.unsortedData = _toConsumableArray(this.data);
  1704. }
  1705. }, {
  1706. key: "onColumnAdvancedSearch",
  1707. value: function onColumnAdvancedSearch(e) {
  1708. var text = $__default['default'].trim($__default['default'](e.currentTarget).val());
  1709. var $field = $__default['default'](e.currentTarget)[0].id;
  1710. if ($__default['default'].isEmptyObject(this.filterColumnsPartial)) {
  1711. this.filterColumnsPartial = {};
  1712. }
  1713. if (text) {
  1714. this.filterColumnsPartial[$field] = text;
  1715. } else {
  1716. delete this.filterColumnsPartial[$field];
  1717. }
  1718. if (this.options.sidePagination !== 'server') {
  1719. this.options.pageNumber = 1;
  1720. this.onSearch(e);
  1721. this.updatePagination();
  1722. this.trigger('column-advanced-search', $field, text);
  1723. }
  1724. }
  1725. }]);
  1726. return _class;
  1727. }($__default['default'].BootstrapTable);
  1728. })));