bootstrap-table-copy-rows.js 53 KB

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