bootstrap-table-toolbar.js 84 KB

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