bootstrap-table-treegrid.js 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _inherits(subClass, superClass) {
  31. if (typeof superClass !== "function" && superClass !== null) {
  32. throw new TypeError("Super expression must either be null or a function");
  33. }
  34. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35. constructor: {
  36. value: subClass,
  37. writable: true,
  38. configurable: true
  39. }
  40. });
  41. Object.defineProperty(subClass, "prototype", {
  42. writable: false
  43. });
  44. if (superClass) _setPrototypeOf(subClass, superClass);
  45. }
  46. function _getPrototypeOf(o) {
  47. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  48. return o.__proto__ || Object.getPrototypeOf(o);
  49. };
  50. return _getPrototypeOf(o);
  51. }
  52. function _setPrototypeOf(o, p) {
  53. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  54. o.__proto__ = p;
  55. return o;
  56. };
  57. return _setPrototypeOf(o, p);
  58. }
  59. function _isNativeReflectConstruct() {
  60. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  61. if (Reflect.construct.sham) return false;
  62. if (typeof Proxy === "function") return true;
  63. try {
  64. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  65. return true;
  66. } catch (e) {
  67. return false;
  68. }
  69. }
  70. function _assertThisInitialized(self) {
  71. if (self === void 0) {
  72. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  73. }
  74. return self;
  75. }
  76. function _possibleConstructorReturn(self, call) {
  77. if (call && (typeof call === "object" || typeof call === "function")) {
  78. return call;
  79. } else if (call !== void 0) {
  80. throw new TypeError("Derived constructors may only return object or undefined");
  81. }
  82. return _assertThisInitialized(self);
  83. }
  84. function _createSuper(Derived) {
  85. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  86. return function _createSuperInternal() {
  87. var Super = _getPrototypeOf(Derived),
  88. result;
  89. if (hasNativeReflectConstruct) {
  90. var NewTarget = _getPrototypeOf(this).constructor;
  91. result = Reflect.construct(Super, arguments, NewTarget);
  92. } else {
  93. result = Super.apply(this, arguments);
  94. }
  95. return _possibleConstructorReturn(this, result);
  96. };
  97. }
  98. function _superPropBase(object, property) {
  99. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  100. object = _getPrototypeOf(object);
  101. if (object === null) break;
  102. }
  103. return object;
  104. }
  105. function _get() {
  106. if (typeof Reflect !== "undefined" && Reflect.get) {
  107. _get = Reflect.get;
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. function _unsupportedIterableToArray(o, minLen) {
  122. if (!o) return;
  123. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  124. var n = Object.prototype.toString.call(o).slice(8, -1);
  125. if (n === "Object" && o.constructor) n = o.constructor.name;
  126. if (n === "Map" || n === "Set") return Array.from(o);
  127. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  128. }
  129. function _arrayLikeToArray(arr, len) {
  130. if (len == null || len > arr.length) len = arr.length;
  131. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  132. return arr2;
  133. }
  134. function _createForOfIteratorHelper(o, allowArrayLike) {
  135. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  136. if (!it) {
  137. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  138. if (it) o = it;
  139. var i = 0;
  140. var F = function () {};
  141. return {
  142. s: F,
  143. n: function () {
  144. if (i >= o.length) return {
  145. done: true
  146. };
  147. return {
  148. done: false,
  149. value: o[i++]
  150. };
  151. },
  152. e: function (e) {
  153. throw e;
  154. },
  155. f: F
  156. };
  157. }
  158. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  159. }
  160. var normalCompletion = true,
  161. didErr = false,
  162. err;
  163. return {
  164. s: function () {
  165. it = it.call(o);
  166. },
  167. n: function () {
  168. var step = it.next();
  169. normalCompletion = step.done;
  170. return step;
  171. },
  172. e: function (e) {
  173. didErr = true;
  174. err = e;
  175. },
  176. f: function () {
  177. try {
  178. if (!normalCompletion && it.return != null) it.return();
  179. } finally {
  180. if (didErr) throw err;
  181. }
  182. }
  183. };
  184. }
  185. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  186. function createCommonjsModule(fn, module) {
  187. return module = { exports: {} }, fn(module, module.exports), module.exports;
  188. }
  189. var check = function (it) {
  190. return it && it.Math == Math && it;
  191. };
  192. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  193. var global_1 =
  194. // eslint-disable-next-line es-x/no-global-this -- safe
  195. check(typeof globalThis == 'object' && globalThis) ||
  196. check(typeof window == 'object' && window) ||
  197. // eslint-disable-next-line no-restricted-globals -- safe
  198. check(typeof self == 'object' && self) ||
  199. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  200. // eslint-disable-next-line no-new-func -- fallback
  201. (function () { return this; })() || Function('return this')();
  202. var fails = function (exec) {
  203. try {
  204. return !!exec();
  205. } catch (error) {
  206. return true;
  207. }
  208. };
  209. // Detect IE8's incomplete defineProperty implementation
  210. var descriptors = !fails(function () {
  211. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  212. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  213. });
  214. var functionBindNative = !fails(function () {
  215. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  216. var test = (function () { /* empty */ }).bind();
  217. // eslint-disable-next-line no-prototype-builtins -- safe
  218. return typeof test != 'function' || test.hasOwnProperty('prototype');
  219. });
  220. var call$1 = Function.prototype.call;
  221. var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
  222. return call$1.apply(call$1, arguments);
  223. };
  224. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  225. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  226. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  227. // Nashorn ~ JDK8 bug
  228. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  229. // `Object.prototype.propertyIsEnumerable` method implementation
  230. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  231. var f$4 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  232. var descriptor = getOwnPropertyDescriptor$1(this, V);
  233. return !!descriptor && descriptor.enumerable;
  234. } : $propertyIsEnumerable;
  235. var objectPropertyIsEnumerable = {
  236. f: f$4
  237. };
  238. var createPropertyDescriptor = function (bitmap, value) {
  239. return {
  240. enumerable: !(bitmap & 1),
  241. configurable: !(bitmap & 2),
  242. writable: !(bitmap & 4),
  243. value: value
  244. };
  245. };
  246. var FunctionPrototype$1 = Function.prototype;
  247. var bind$1 = FunctionPrototype$1.bind;
  248. var call = FunctionPrototype$1.call;
  249. var uncurryThis = functionBindNative && bind$1.bind(call, call);
  250. var functionUncurryThis = functionBindNative ? function (fn) {
  251. return fn && uncurryThis(fn);
  252. } : function (fn) {
  253. return fn && function () {
  254. return call.apply(fn, arguments);
  255. };
  256. };
  257. var toString$1 = functionUncurryThis({}.toString);
  258. var stringSlice = functionUncurryThis(''.slice);
  259. var classofRaw = function (it) {
  260. return stringSlice(toString$1(it), 8, -1);
  261. };
  262. var Object$4 = global_1.Object;
  263. var split = functionUncurryThis(''.split);
  264. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  265. var indexedObject = fails(function () {
  266. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  267. // eslint-disable-next-line no-prototype-builtins -- safe
  268. return !Object$4('z').propertyIsEnumerable(0);
  269. }) ? function (it) {
  270. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  271. } : Object$4;
  272. var TypeError$8 = global_1.TypeError;
  273. // `RequireObjectCoercible` abstract operation
  274. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  275. var requireObjectCoercible = function (it) {
  276. if (it == undefined) throw TypeError$8("Can't call method on " + it);
  277. return it;
  278. };
  279. // toObject with fallback for non-array-like ES3 strings
  280. var toIndexedObject = function (it) {
  281. return indexedObject(requireObjectCoercible(it));
  282. };
  283. // `IsCallable` abstract operation
  284. // https://tc39.es/ecma262/#sec-iscallable
  285. var isCallable = function (argument) {
  286. return typeof argument == 'function';
  287. };
  288. var isObject = function (it) {
  289. return typeof it == 'object' ? it !== null : isCallable(it);
  290. };
  291. var aFunction = function (argument) {
  292. return isCallable(argument) ? argument : undefined;
  293. };
  294. var getBuiltIn = function (namespace, method) {
  295. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  296. };
  297. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  298. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  299. var process = global_1.process;
  300. var Deno = global_1.Deno;
  301. var versions = process && process.versions || Deno && Deno.version;
  302. var v8 = versions && versions.v8;
  303. var match, version;
  304. if (v8) {
  305. match = v8.split('.');
  306. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  307. // but their correct versions are not interesting for us
  308. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  309. }
  310. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  311. // so check `userAgent` even if `.v8` exists, but 0
  312. if (!version && engineUserAgent) {
  313. match = engineUserAgent.match(/Edge\/(\d+)/);
  314. if (!match || match[1] >= 74) {
  315. match = engineUserAgent.match(/Chrome\/(\d+)/);
  316. if (match) version = +match[1];
  317. }
  318. }
  319. var engineV8Version = version;
  320. /* eslint-disable es-x/no-symbol -- required for testing */
  321. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  322. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  323. var symbol = Symbol();
  324. // Chrome 38 Symbol has incorrect toString conversion
  325. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  326. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  327. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  328. !Symbol.sham && engineV8Version && engineV8Version < 41;
  329. });
  330. /* eslint-disable es-x/no-symbol -- required for testing */
  331. var useSymbolAsUid = nativeSymbol
  332. && !Symbol.sham
  333. && typeof Symbol.iterator == 'symbol';
  334. var Object$3 = global_1.Object;
  335. var isSymbol = useSymbolAsUid ? function (it) {
  336. return typeof it == 'symbol';
  337. } : function (it) {
  338. var $Symbol = getBuiltIn('Symbol');
  339. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  340. };
  341. var String$3 = global_1.String;
  342. var tryToString = function (argument) {
  343. try {
  344. return String$3(argument);
  345. } catch (error) {
  346. return 'Object';
  347. }
  348. };
  349. var TypeError$7 = global_1.TypeError;
  350. // `Assert: IsCallable(argument) is true`
  351. var aCallable = function (argument) {
  352. if (isCallable(argument)) return argument;
  353. throw TypeError$7(tryToString(argument) + ' is not a function');
  354. };
  355. // `GetMethod` abstract operation
  356. // https://tc39.es/ecma262/#sec-getmethod
  357. var getMethod = function (V, P) {
  358. var func = V[P];
  359. return func == null ? undefined : aCallable(func);
  360. };
  361. var TypeError$6 = global_1.TypeError;
  362. // `OrdinaryToPrimitive` abstract operation
  363. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  364. var ordinaryToPrimitive = function (input, pref) {
  365. var fn, val;
  366. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  367. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  368. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  369. throw TypeError$6("Can't convert object to primitive value");
  370. };
  371. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  372. var defineProperty = Object.defineProperty;
  373. var setGlobal = function (key, value) {
  374. try {
  375. defineProperty(global_1, key, { value: value, configurable: true, writable: true });
  376. } catch (error) {
  377. global_1[key] = value;
  378. } return value;
  379. };
  380. var SHARED = '__core-js_shared__';
  381. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  382. var sharedStore = store$1;
  383. var shared = createCommonjsModule(function (module) {
  384. (module.exports = function (key, value) {
  385. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  386. })('versions', []).push({
  387. version: '3.22.4',
  388. mode: 'global',
  389. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  390. license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
  391. source: 'https://github.com/zloirock/core-js'
  392. });
  393. });
  394. var Object$2 = global_1.Object;
  395. // `ToObject` abstract operation
  396. // https://tc39.es/ecma262/#sec-toobject
  397. var toObject = function (argument) {
  398. return Object$2(requireObjectCoercible(argument));
  399. };
  400. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  401. // `HasOwnProperty` abstract operation
  402. // https://tc39.es/ecma262/#sec-hasownproperty
  403. // eslint-disable-next-line es-x/no-object-hasown -- safe
  404. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  405. return hasOwnProperty(toObject(it), key);
  406. };
  407. var id = 0;
  408. var postfix = Math.random();
  409. var toString = functionUncurryThis(1.0.toString);
  410. var uid = function (key) {
  411. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  412. };
  413. var WellKnownSymbolsStore = shared('wks');
  414. var Symbol$2 = global_1.Symbol;
  415. var symbolFor = Symbol$2 && Symbol$2['for'];
  416. var createWellKnownSymbol = useSymbolAsUid ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid;
  417. var wellKnownSymbol = function (name) {
  418. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  419. var description = 'Symbol.' + name;
  420. if (nativeSymbol && hasOwnProperty_1(Symbol$2, name)) {
  421. WellKnownSymbolsStore[name] = Symbol$2[name];
  422. } else if (useSymbolAsUid && symbolFor) {
  423. WellKnownSymbolsStore[name] = symbolFor(description);
  424. } else {
  425. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  426. }
  427. } return WellKnownSymbolsStore[name];
  428. };
  429. var TypeError$5 = global_1.TypeError;
  430. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  431. // `ToPrimitive` abstract operation
  432. // https://tc39.es/ecma262/#sec-toprimitive
  433. var toPrimitive = function (input, pref) {
  434. if (!isObject(input) || isSymbol(input)) return input;
  435. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  436. var result;
  437. if (exoticToPrim) {
  438. if (pref === undefined) pref = 'default';
  439. result = functionCall(exoticToPrim, input, pref);
  440. if (!isObject(result) || isSymbol(result)) return result;
  441. throw TypeError$5("Can't convert object to primitive value");
  442. }
  443. if (pref === undefined) pref = 'number';
  444. return ordinaryToPrimitive(input, pref);
  445. };
  446. // `ToPropertyKey` abstract operation
  447. // https://tc39.es/ecma262/#sec-topropertykey
  448. var toPropertyKey = function (argument) {
  449. var key = toPrimitive(argument, 'string');
  450. return isSymbol(key) ? key : key + '';
  451. };
  452. var document = global_1.document;
  453. // typeof document.createElement is 'object' in old IE
  454. var EXISTS$1 = isObject(document) && isObject(document.createElement);
  455. var documentCreateElement = function (it) {
  456. return EXISTS$1 ? document.createElement(it) : {};
  457. };
  458. // Thanks to IE8 for its funny defineProperty
  459. var ie8DomDefine = !descriptors && !fails(function () {
  460. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  461. return Object.defineProperty(documentCreateElement('div'), 'a', {
  462. get: function () { return 7; }
  463. }).a != 7;
  464. });
  465. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  466. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  467. // `Object.getOwnPropertyDescriptor` method
  468. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  469. var f$3 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  470. O = toIndexedObject(O);
  471. P = toPropertyKey(P);
  472. if (ie8DomDefine) try {
  473. return $getOwnPropertyDescriptor$1(O, P);
  474. } catch (error) { /* empty */ }
  475. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  476. };
  477. var objectGetOwnPropertyDescriptor = {
  478. f: f$3
  479. };
  480. // V8 ~ Chrome 36-
  481. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  482. var v8PrototypeDefineBug = descriptors && fails(function () {
  483. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  484. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  485. value: 42,
  486. writable: false
  487. }).prototype != 42;
  488. });
  489. var String$2 = global_1.String;
  490. var TypeError$4 = global_1.TypeError;
  491. // `Assert: Type(argument) is Object`
  492. var anObject = function (argument) {
  493. if (isObject(argument)) return argument;
  494. throw TypeError$4(String$2(argument) + ' is not an object');
  495. };
  496. var TypeError$3 = global_1.TypeError;
  497. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  498. var $defineProperty = Object.defineProperty;
  499. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  500. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  501. var ENUMERABLE = 'enumerable';
  502. var CONFIGURABLE$1 = 'configurable';
  503. var WRITABLE = 'writable';
  504. // `Object.defineProperty` method
  505. // https://tc39.es/ecma262/#sec-object.defineproperty
  506. var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  507. anObject(O);
  508. P = toPropertyKey(P);
  509. anObject(Attributes);
  510. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  511. var current = $getOwnPropertyDescriptor(O, P);
  512. if (current && current[WRITABLE]) {
  513. O[P] = Attributes.value;
  514. Attributes = {
  515. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  516. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  517. writable: false
  518. };
  519. }
  520. } return $defineProperty(O, P, Attributes);
  521. } : $defineProperty : function defineProperty(O, P, Attributes) {
  522. anObject(O);
  523. P = toPropertyKey(P);
  524. anObject(Attributes);
  525. if (ie8DomDefine) try {
  526. return $defineProperty(O, P, Attributes);
  527. } catch (error) { /* empty */ }
  528. if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
  529. if ('value' in Attributes) O[P] = Attributes.value;
  530. return O;
  531. };
  532. var objectDefineProperty = {
  533. f: f$2
  534. };
  535. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  536. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  537. } : function (object, key, value) {
  538. object[key] = value;
  539. return object;
  540. };
  541. var FunctionPrototype = Function.prototype;
  542. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  543. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  544. var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
  545. // additional protection from minified / mangled / dropped function names
  546. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  547. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
  548. var functionName = {
  549. EXISTS: EXISTS,
  550. PROPER: PROPER,
  551. CONFIGURABLE: CONFIGURABLE
  552. };
  553. var functionToString = functionUncurryThis(Function.toString);
  554. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  555. if (!isCallable(sharedStore.inspectSource)) {
  556. sharedStore.inspectSource = function (it) {
  557. return functionToString(it);
  558. };
  559. }
  560. var inspectSource = sharedStore.inspectSource;
  561. var WeakMap$1 = global_1.WeakMap;
  562. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  563. var keys = shared('keys');
  564. var sharedKey = function (key) {
  565. return keys[key] || (keys[key] = uid(key));
  566. };
  567. var hiddenKeys$1 = {};
  568. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  569. var TypeError$2 = global_1.TypeError;
  570. var WeakMap = global_1.WeakMap;
  571. var set, get, has;
  572. var enforce = function (it) {
  573. return has(it) ? get(it) : set(it, {});
  574. };
  575. var getterFor = function (TYPE) {
  576. return function (it) {
  577. var state;
  578. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  579. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  580. } return state;
  581. };
  582. };
  583. if (nativeWeakMap || sharedStore.state) {
  584. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  585. var wmget = functionUncurryThis(store.get);
  586. var wmhas = functionUncurryThis(store.has);
  587. var wmset = functionUncurryThis(store.set);
  588. set = function (it, metadata) {
  589. if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  590. metadata.facade = it;
  591. wmset(store, it, metadata);
  592. return metadata;
  593. };
  594. get = function (it) {
  595. return wmget(store, it) || {};
  596. };
  597. has = function (it) {
  598. return wmhas(store, it);
  599. };
  600. } else {
  601. var STATE = sharedKey('state');
  602. hiddenKeys$1[STATE] = true;
  603. set = function (it, metadata) {
  604. if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  605. metadata.facade = it;
  606. createNonEnumerableProperty(it, STATE, metadata);
  607. return metadata;
  608. };
  609. get = function (it) {
  610. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  611. };
  612. has = function (it) {
  613. return hasOwnProperty_1(it, STATE);
  614. };
  615. }
  616. var internalState = {
  617. set: set,
  618. get: get,
  619. has: has,
  620. enforce: enforce,
  621. getterFor: getterFor
  622. };
  623. var makeBuiltIn_1 = createCommonjsModule(function (module) {
  624. var defineProperty = objectDefineProperty.f;
  625. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  626. var enforceInternalState = internalState.enforce;
  627. var getInternalState = internalState.get;
  628. var CONFIGURABLE_LENGTH = !fails(function () {
  629. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  630. });
  631. var TEMPLATE = String(String).split('String');
  632. var makeBuiltIn = module.exports = function (value, name, options) {
  633. if (String(name).slice(0, 7) === 'Symbol(') {
  634. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  635. }
  636. if (options && options.getter) name = 'get ' + name;
  637. if (options && options.setter) name = 'set ' + name;
  638. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  639. defineProperty(value, 'name', { value: name, configurable: true });
  640. }
  641. if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
  642. defineProperty(value, 'length', { value: options.arity });
  643. }
  644. var state = enforceInternalState(value);
  645. if (!hasOwnProperty_1(state, 'source')) {
  646. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  647. } return value;
  648. };
  649. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  650. // eslint-disable-next-line no-extend-native -- required
  651. Function.prototype.toString = makeBuiltIn(function toString() {
  652. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  653. }, 'toString');
  654. });
  655. var defineBuiltIn = function (O, key, value, options) {
  656. var unsafe = options ? !!options.unsafe : false;
  657. var simple = options ? !!options.enumerable : false;
  658. var noTargetGet = options ? !!options.noTargetGet : false;
  659. var name = options && options.name !== undefined ? options.name : key;
  660. if (isCallable(value)) makeBuiltIn_1(value, name, options);
  661. if (O === global_1) {
  662. if (simple) O[key] = value;
  663. else setGlobal(key, value);
  664. return O;
  665. } else if (!unsafe) {
  666. delete O[key];
  667. } else if (!noTargetGet && O[key]) {
  668. simple = true;
  669. }
  670. if (simple) O[key] = value;
  671. else createNonEnumerableProperty(O, key, value);
  672. return O;
  673. };
  674. var ceil = Math.ceil;
  675. var floor = Math.floor;
  676. // `ToIntegerOrInfinity` abstract operation
  677. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  678. var toIntegerOrInfinity = function (argument) {
  679. var number = +argument;
  680. // eslint-disable-next-line no-self-compare -- safe
  681. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  682. };
  683. var max = Math.max;
  684. var min$1 = Math.min;
  685. // Helper for a popular repeating case of the spec:
  686. // Let integer be ? ToInteger(index).
  687. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  688. var toAbsoluteIndex = function (index, length) {
  689. var integer = toIntegerOrInfinity(index);
  690. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  691. };
  692. var min = Math.min;
  693. // `ToLength` abstract operation
  694. // https://tc39.es/ecma262/#sec-tolength
  695. var toLength = function (argument) {
  696. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  697. };
  698. // `LengthOfArrayLike` abstract operation
  699. // https://tc39.es/ecma262/#sec-lengthofarraylike
  700. var lengthOfArrayLike = function (obj) {
  701. return toLength(obj.length);
  702. };
  703. // `Array.prototype.{ indexOf, includes }` methods implementation
  704. var createMethod$2 = function (IS_INCLUDES) {
  705. return function ($this, el, fromIndex) {
  706. var O = toIndexedObject($this);
  707. var length = lengthOfArrayLike(O);
  708. var index = toAbsoluteIndex(fromIndex, length);
  709. var value;
  710. // Array#includes uses SameValueZero equality algorithm
  711. // eslint-disable-next-line no-self-compare -- NaN check
  712. if (IS_INCLUDES && el != el) while (length > index) {
  713. value = O[index++];
  714. // eslint-disable-next-line no-self-compare -- NaN check
  715. if (value != value) return true;
  716. // Array#indexOf ignores holes, Array#includes - not
  717. } else for (;length > index; index++) {
  718. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  719. } return !IS_INCLUDES && -1;
  720. };
  721. };
  722. var arrayIncludes = {
  723. // `Array.prototype.includes` method
  724. // https://tc39.es/ecma262/#sec-array.prototype.includes
  725. includes: createMethod$2(true),
  726. // `Array.prototype.indexOf` method
  727. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  728. indexOf: createMethod$2(false)
  729. };
  730. var indexOf = arrayIncludes.indexOf;
  731. var push$1 = functionUncurryThis([].push);
  732. var objectKeysInternal = function (object, names) {
  733. var O = toIndexedObject(object);
  734. var i = 0;
  735. var result = [];
  736. var key;
  737. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
  738. // Don't enum bug & hidden keys
  739. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  740. ~indexOf(result, key) || push$1(result, key);
  741. }
  742. return result;
  743. };
  744. // IE8- don't enum bug keys
  745. var enumBugKeys = [
  746. 'constructor',
  747. 'hasOwnProperty',
  748. 'isPrototypeOf',
  749. 'propertyIsEnumerable',
  750. 'toLocaleString',
  751. 'toString',
  752. 'valueOf'
  753. ];
  754. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  755. // `Object.getOwnPropertyNames` method
  756. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  757. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  758. var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  759. return objectKeysInternal(O, hiddenKeys);
  760. };
  761. var objectGetOwnPropertyNames = {
  762. f: f$1
  763. };
  764. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  765. var f = Object.getOwnPropertySymbols;
  766. var objectGetOwnPropertySymbols = {
  767. f: f
  768. };
  769. var concat = functionUncurryThis([].concat);
  770. // all object keys, includes non-enumerable and symbols
  771. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  772. var keys = objectGetOwnPropertyNames.f(anObject(it));
  773. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  774. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  775. };
  776. var copyConstructorProperties = function (target, source, exceptions) {
  777. var keys = ownKeys(source);
  778. var defineProperty = objectDefineProperty.f;
  779. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  780. for (var i = 0; i < keys.length; i++) {
  781. var key = keys[i];
  782. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  783. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  784. }
  785. }
  786. };
  787. var replacement = /#|\.prototype\./;
  788. var isForced = function (feature, detection) {
  789. var value = data[normalize(feature)];
  790. return value == POLYFILL ? true
  791. : value == NATIVE ? false
  792. : isCallable(detection) ? fails(detection)
  793. : !!detection;
  794. };
  795. var normalize = isForced.normalize = function (string) {
  796. return String(string).replace(replacement, '.').toLowerCase();
  797. };
  798. var data = isForced.data = {};
  799. var NATIVE = isForced.NATIVE = 'N';
  800. var POLYFILL = isForced.POLYFILL = 'P';
  801. var isForced_1 = isForced;
  802. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  803. /*
  804. options.target - name of the target object
  805. options.global - target is the global object
  806. options.stat - export as static methods of target
  807. options.proto - export as prototype methods of target
  808. options.real - real prototype method for the `pure` version
  809. options.forced - export even if the native feature is available
  810. options.bind - bind methods to the target, required for the `pure` version
  811. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  812. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  813. options.sham - add a flag to not completely full polyfills
  814. options.enumerable - export as enumerable property
  815. options.noTargetGet - prevent calling a getter on target
  816. options.name - the .name of the function if it does not match the key
  817. */
  818. var _export = function (options, source) {
  819. var TARGET = options.target;
  820. var GLOBAL = options.global;
  821. var STATIC = options.stat;
  822. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  823. if (GLOBAL) {
  824. target = global_1;
  825. } else if (STATIC) {
  826. target = global_1[TARGET] || setGlobal(TARGET, {});
  827. } else {
  828. target = (global_1[TARGET] || {}).prototype;
  829. }
  830. if (target) for (key in source) {
  831. sourceProperty = source[key];
  832. if (options.noTargetGet) {
  833. descriptor = getOwnPropertyDescriptor(target, key);
  834. targetProperty = descriptor && descriptor.value;
  835. } else targetProperty = target[key];
  836. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  837. // contained in target
  838. if (!FORCED && targetProperty !== undefined) {
  839. if (typeof sourceProperty == typeof targetProperty) continue;
  840. copyConstructorProperties(sourceProperty, targetProperty);
  841. }
  842. // add a flag to not completely full polyfills
  843. if (options.sham || (targetProperty && targetProperty.sham)) {
  844. createNonEnumerableProperty(sourceProperty, 'sham', true);
  845. }
  846. defineBuiltIn(target, key, sourceProperty, options);
  847. }
  848. };
  849. // `IsArray` abstract operation
  850. // https://tc39.es/ecma262/#sec-isarray
  851. // eslint-disable-next-line es-x/no-array-isarray -- safe
  852. var isArray = Array.isArray || function isArray(argument) {
  853. return classofRaw(argument) == 'Array';
  854. };
  855. var createProperty = function (object, key, value) {
  856. var propertyKey = toPropertyKey(key);
  857. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  858. else object[propertyKey] = value;
  859. };
  860. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  861. var test = {};
  862. test[TO_STRING_TAG$1] = 'z';
  863. var toStringTagSupport = String(test) === '[object z]';
  864. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  865. var Object$1 = global_1.Object;
  866. // ES3 wrong here
  867. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  868. // fallback for IE11 Script Access Denied error
  869. var tryGet = function (it, key) {
  870. try {
  871. return it[key];
  872. } catch (error) { /* empty */ }
  873. };
  874. // getting tag from ES6+ `Object.prototype.toString`
  875. var classof = toStringTagSupport ? classofRaw : function (it) {
  876. var O, tag, result;
  877. return it === undefined ? 'Undefined' : it === null ? 'Null'
  878. // @@toStringTag case
  879. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  880. // builtinTag case
  881. : CORRECT_ARGUMENTS ? classofRaw(O)
  882. // ES3 arguments fallback
  883. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  884. };
  885. var noop = function () { /* empty */ };
  886. var empty = [];
  887. var construct = getBuiltIn('Reflect', 'construct');
  888. var constructorRegExp = /^\s*(?:class|function)\b/;
  889. var exec$1 = functionUncurryThis(constructorRegExp.exec);
  890. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  891. var isConstructorModern = function isConstructor(argument) {
  892. if (!isCallable(argument)) return false;
  893. try {
  894. construct(noop, empty, argument);
  895. return true;
  896. } catch (error) {
  897. return false;
  898. }
  899. };
  900. var isConstructorLegacy = function isConstructor(argument) {
  901. if (!isCallable(argument)) return false;
  902. switch (classof(argument)) {
  903. case 'AsyncFunction':
  904. case 'GeneratorFunction':
  905. case 'AsyncGeneratorFunction': return false;
  906. }
  907. try {
  908. // we can't check .prototype since constructors produced by .bind haven't it
  909. // `Function#toString` throws on some built-it function in some legacy engines
  910. // (for example, `DOMQuad` and similar in FF41-)
  911. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  912. } catch (error) {
  913. return true;
  914. }
  915. };
  916. isConstructorLegacy.sham = true;
  917. // `IsConstructor` abstract operation
  918. // https://tc39.es/ecma262/#sec-isconstructor
  919. var isConstructor = !construct || fails(function () {
  920. var called;
  921. return isConstructorModern(isConstructorModern.call)
  922. || !isConstructorModern(Object)
  923. || !isConstructorModern(function () { called = true; })
  924. || called;
  925. }) ? isConstructorLegacy : isConstructorModern;
  926. var SPECIES$1 = wellKnownSymbol('species');
  927. var Array$1 = global_1.Array;
  928. // a part of `ArraySpeciesCreate` abstract operation
  929. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  930. var arraySpeciesConstructor = function (originalArray) {
  931. var C;
  932. if (isArray(originalArray)) {
  933. C = originalArray.constructor;
  934. // cross-realm fallback
  935. if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
  936. else if (isObject(C)) {
  937. C = C[SPECIES$1];
  938. if (C === null) C = undefined;
  939. }
  940. } return C === undefined ? Array$1 : C;
  941. };
  942. // `ArraySpeciesCreate` abstract operation
  943. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  944. var arraySpeciesCreate = function (originalArray, length) {
  945. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  946. };
  947. var SPECIES = wellKnownSymbol('species');
  948. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  949. // We can't use this feature detection in V8 since it causes
  950. // deoptimization and serious performance degradation
  951. // https://github.com/zloirock/core-js/issues/677
  952. return engineV8Version >= 51 || !fails(function () {
  953. var array = [];
  954. var constructor = array.constructor = {};
  955. constructor[SPECIES] = function () {
  956. return { foo: 1 };
  957. };
  958. return array[METHOD_NAME](Boolean).foo !== 1;
  959. });
  960. };
  961. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  962. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  963. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  964. var TypeError$1 = global_1.TypeError;
  965. // We can't use this feature detection in V8 since it causes
  966. // deoptimization and serious performance degradation
  967. // https://github.com/zloirock/core-js/issues/679
  968. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  969. var array = [];
  970. array[IS_CONCAT_SPREADABLE] = false;
  971. return array.concat()[0] !== array;
  972. });
  973. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  974. var isConcatSpreadable = function (O) {
  975. if (!isObject(O)) return false;
  976. var spreadable = O[IS_CONCAT_SPREADABLE];
  977. return spreadable !== undefined ? !!spreadable : isArray(O);
  978. };
  979. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  980. // `Array.prototype.concat` method
  981. // https://tc39.es/ecma262/#sec-array.prototype.concat
  982. // with adding support of @@isConcatSpreadable and @@species
  983. _export({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
  984. // eslint-disable-next-line no-unused-vars -- required for `.length`
  985. concat: function concat(arg) {
  986. var O = toObject(this);
  987. var A = arraySpeciesCreate(O, 0);
  988. var n = 0;
  989. var i, k, length, len, E;
  990. for (i = -1, length = arguments.length; i < length; i++) {
  991. E = i === -1 ? O : arguments[i];
  992. if (isConcatSpreadable(E)) {
  993. len = lengthOfArrayLike(E);
  994. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  995. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  996. } else {
  997. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  998. createProperty(A, n++, E);
  999. }
  1000. }
  1001. A.length = n;
  1002. return A;
  1003. }
  1004. });
  1005. var bind = functionUncurryThis(functionUncurryThis.bind);
  1006. // optional / simple context binding
  1007. var functionBindContext = function (fn, that) {
  1008. aCallable(fn);
  1009. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  1010. return fn.apply(that, arguments);
  1011. };
  1012. };
  1013. var push = functionUncurryThis([].push);
  1014. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1015. var createMethod$1 = function (TYPE) {
  1016. var IS_MAP = TYPE == 1;
  1017. var IS_FILTER = TYPE == 2;
  1018. var IS_SOME = TYPE == 3;
  1019. var IS_EVERY = TYPE == 4;
  1020. var IS_FIND_INDEX = TYPE == 6;
  1021. var IS_FILTER_REJECT = TYPE == 7;
  1022. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1023. return function ($this, callbackfn, that, specificCreate) {
  1024. var O = toObject($this);
  1025. var self = indexedObject(O);
  1026. var boundFunction = functionBindContext(callbackfn, that);
  1027. var length = lengthOfArrayLike(self);
  1028. var index = 0;
  1029. var create = specificCreate || arraySpeciesCreate;
  1030. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1031. var value, result;
  1032. for (;length > index; index++) if (NO_HOLES || index in self) {
  1033. value = self[index];
  1034. result = boundFunction(value, index, O);
  1035. if (TYPE) {
  1036. if (IS_MAP) target[index] = result; // map
  1037. else if (result) switch (TYPE) {
  1038. case 3: return true; // some
  1039. case 5: return value; // find
  1040. case 6: return index; // findIndex
  1041. case 2: push(target, value); // filter
  1042. } else switch (TYPE) {
  1043. case 4: return false; // every
  1044. case 7: push(target, value); // filterReject
  1045. }
  1046. }
  1047. }
  1048. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1049. };
  1050. };
  1051. var arrayIteration = {
  1052. // `Array.prototype.forEach` method
  1053. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1054. forEach: createMethod$1(0),
  1055. // `Array.prototype.map` method
  1056. // https://tc39.es/ecma262/#sec-array.prototype.map
  1057. map: createMethod$1(1),
  1058. // `Array.prototype.filter` method
  1059. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1060. filter: createMethod$1(2),
  1061. // `Array.prototype.some` method
  1062. // https://tc39.es/ecma262/#sec-array.prototype.some
  1063. some: createMethod$1(3),
  1064. // `Array.prototype.every` method
  1065. // https://tc39.es/ecma262/#sec-array.prototype.every
  1066. every: createMethod$1(4),
  1067. // `Array.prototype.find` method
  1068. // https://tc39.es/ecma262/#sec-array.prototype.find
  1069. find: createMethod$1(5),
  1070. // `Array.prototype.findIndex` method
  1071. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1072. findIndex: createMethod$1(6),
  1073. // `Array.prototype.filterReject` method
  1074. // https://github.com/tc39/proposal-array-filtering
  1075. filterReject: createMethod$1(7)
  1076. };
  1077. var $filter = arrayIteration.filter;
  1078. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1079. // `Array.prototype.filter` method
  1080. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1081. // with adding support of @@species
  1082. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1083. filter: function filter(callbackfn /* , thisArg */) {
  1084. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1085. }
  1086. });
  1087. // `Object.prototype.toString` method implementation
  1088. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1089. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  1090. return '[object ' + classof(this) + ']';
  1091. };
  1092. // `Object.prototype.toString` method
  1093. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1094. if (!toStringTagSupport) {
  1095. defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
  1096. }
  1097. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1098. var method = [][METHOD_NAME];
  1099. return !!method && fails(function () {
  1100. // eslint-disable-next-line no-useless-call -- required for testing
  1101. method.call(null, argument || function () { return 1; }, 1);
  1102. });
  1103. };
  1104. var un$Join = functionUncurryThis([].join);
  1105. var ES3_STRINGS = indexedObject != Object;
  1106. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1107. // `Array.prototype.join` method
  1108. // https://tc39.es/ecma262/#sec-array.prototype.join
  1109. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1110. join: function join(separator) {
  1111. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  1112. }
  1113. });
  1114. var String$1 = global_1.String;
  1115. var toString_1 = function (argument) {
  1116. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1117. return String$1(argument);
  1118. };
  1119. // a string of all valid unicode whitespaces
  1120. var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1121. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1122. var replace = functionUncurryThis(''.replace);
  1123. var whitespace = '[' + whitespaces + ']';
  1124. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1125. var rtrim = RegExp(whitespace + whitespace + '*$');
  1126. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1127. var createMethod = function (TYPE) {
  1128. return function ($this) {
  1129. var string = toString_1(requireObjectCoercible($this));
  1130. if (TYPE & 1) string = replace(string, ltrim, '');
  1131. if (TYPE & 2) string = replace(string, rtrim, '');
  1132. return string;
  1133. };
  1134. };
  1135. var stringTrim = {
  1136. // `String.prototype.{ trimLeft, trimStart }` methods
  1137. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1138. start: createMethod(1),
  1139. // `String.prototype.{ trimRight, trimEnd }` methods
  1140. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1141. end: createMethod(2),
  1142. // `String.prototype.trim` method
  1143. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1144. trim: createMethod(3)
  1145. };
  1146. var trim = stringTrim.trim;
  1147. var $parseInt = global_1.parseInt;
  1148. var Symbol$1 = global_1.Symbol;
  1149. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1150. var hex = /^[+-]?0x/i;
  1151. var exec = functionUncurryThis(hex.exec);
  1152. var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22
  1153. // MS Edge 18- broken with boxed symbols
  1154. || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));
  1155. // `parseInt` method
  1156. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1157. var numberParseInt = FORCED ? function parseInt(string, radix) {
  1158. var S = trim(toString_1(string));
  1159. return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  1160. } : $parseInt;
  1161. // `parseInt` method
  1162. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1163. _export({ global: true, forced: parseInt != numberParseInt }, {
  1164. parseInt: numberParseInt
  1165. });
  1166. /**
  1167. * @author: YL
  1168. * @update: zhixin wen <wenzhixin2010@gmail.com>
  1169. */
  1170. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1171. treeEnable: false,
  1172. treeShowField: null,
  1173. idField: 'id',
  1174. parentIdField: 'pid',
  1175. rootParentId: null
  1176. });
  1177. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1178. _inherits(_class, _$$BootstrapTable);
  1179. var _super = _createSuper(_class);
  1180. function _class() {
  1181. _classCallCheck(this, _class);
  1182. return _super.apply(this, arguments);
  1183. }
  1184. _createClass(_class, [{
  1185. key: "init",
  1186. value: function init() {
  1187. var _get2;
  1188. this._rowStyle = this.options.rowStyle;
  1189. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1190. args[_key] = arguments[_key];
  1191. }
  1192. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1193. }
  1194. }, {
  1195. key: "initHeader",
  1196. value: function initHeader() {
  1197. var _get3;
  1198. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1199. args[_key2] = arguments[_key2];
  1200. }
  1201. (_get3 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get3, [this].concat(args));
  1202. var treeShowField = this.options.treeShowField;
  1203. if (treeShowField) {
  1204. var _iterator = _createForOfIteratorHelper(this.header.fields),
  1205. _step;
  1206. try {
  1207. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1208. var field = _step.value;
  1209. if (treeShowField === field) {
  1210. this.treeEnable = true;
  1211. break;
  1212. }
  1213. }
  1214. } catch (err) {
  1215. _iterator.e(err);
  1216. } finally {
  1217. _iterator.f();
  1218. }
  1219. }
  1220. }
  1221. }, {
  1222. key: "initBody",
  1223. value: function initBody() {
  1224. var _get4;
  1225. if (this.treeEnable) {
  1226. this.options.virtualScroll = false;
  1227. }
  1228. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  1229. args[_key3] = arguments[_key3];
  1230. }
  1231. (_get4 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get4, [this].concat(args));
  1232. }
  1233. }, {
  1234. key: "initTr",
  1235. value: function initTr(item, idx, data, parentDom) {
  1236. var _this = this;
  1237. var nodes = data.filter(function (it) {
  1238. return item[_this.options.idField] === it[_this.options.parentIdField];
  1239. });
  1240. parentDom.append(_get(_getPrototypeOf(_class.prototype), "initRow", this).call(this, item, idx, data, parentDom)); // init sub node
  1241. var len = nodes.length - 1;
  1242. for (var i = 0; i <= len; i++) {
  1243. var node = nodes[i];
  1244. var defaultItem = $__default["default"].extend(true, {}, item);
  1245. node._level = defaultItem._level + 1;
  1246. node._parent = defaultItem;
  1247. if (i === len) {
  1248. node._last = 1;
  1249. } // jquery.treegrid.js
  1250. this.options.rowStyle = function (item, idx) {
  1251. var res = _this._rowStyle(item, idx);
  1252. var id = item[_this.options.idField] ? item[_this.options.idField] : 0;
  1253. var pid = item[_this.options.parentIdField] ? item[_this.options.parentIdField] : 0;
  1254. res.classes = [res.classes || '', "treegrid-".concat(id), "treegrid-parent-".concat(pid)].join(' ');
  1255. return res;
  1256. };
  1257. this.initTr(node, $__default["default"].inArray(node, data), data, parentDom);
  1258. }
  1259. }
  1260. }, {
  1261. key: "initRow",
  1262. value: function initRow(item, idx, data, parentDom) {
  1263. var _this2 = this;
  1264. if (this.treeEnable) {
  1265. var parentId = parseInt(item[this.options.parentIdField], 10);
  1266. if (this.options.rootParentId === parentId || !parentId) {
  1267. if (item._level === undefined) {
  1268. item._level = 0;
  1269. } // jquery.treegrid.js
  1270. this.options.rowStyle = function (item, idx) {
  1271. var res = _this2._rowStyle(item, idx);
  1272. var x = item[_this2.options.idField] ? item[_this2.options.idField] : 0;
  1273. res.classes = [res.classes || '', "treegrid-".concat(x)].join(' ');
  1274. return res;
  1275. };
  1276. this.initTr(item, idx, data, parentDom);
  1277. return true;
  1278. }
  1279. return false;
  1280. }
  1281. return _get(_getPrototypeOf(_class.prototype), "initRow", this).call(this, item, idx, data, parentDom);
  1282. }
  1283. }, {
  1284. key: "destroy",
  1285. value: function destroy() {
  1286. var _get5;
  1287. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1288. args[_key4] = arguments[_key4];
  1289. }
  1290. (_get5 = _get(_getPrototypeOf(_class.prototype), "destroy", this)).call.apply(_get5, [this].concat(args));
  1291. this.options.rowStyle = this._rowStyle;
  1292. }
  1293. }]);
  1294. return _class;
  1295. }($__default["default"].BootstrapTable);
  1296. }));