bootstrap-table-toolbar.js 79 KB

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