bootstrap-table-print.js 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115
  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/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/no-object-defineproperty -- required for testing
  212. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  213. });
  214. var functionBindNative = !fails(function () {
  215. var test = (function () { /* empty */ }).bind();
  216. // eslint-disable-next-line no-prototype-builtins -- safe
  217. return typeof test != 'function' || test.hasOwnProperty('prototype');
  218. });
  219. var call$1 = Function.prototype.call;
  220. var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
  221. return call$1.apply(call$1, arguments);
  222. };
  223. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  224. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  225. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  226. // Nashorn ~ JDK8 bug
  227. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  228. // `Object.prototype.propertyIsEnumerable` method implementation
  229. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  230. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  231. var descriptor = getOwnPropertyDescriptor$1(this, V);
  232. return !!descriptor && descriptor.enumerable;
  233. } : $propertyIsEnumerable;
  234. var objectPropertyIsEnumerable = {
  235. f: f$5
  236. };
  237. var createPropertyDescriptor = function (bitmap, value) {
  238. return {
  239. enumerable: !(bitmap & 1),
  240. configurable: !(bitmap & 2),
  241. writable: !(bitmap & 4),
  242. value: value
  243. };
  244. };
  245. var FunctionPrototype$1 = Function.prototype;
  246. var bind$1 = FunctionPrototype$1.bind;
  247. var call = FunctionPrototype$1.call;
  248. var uncurryThis = functionBindNative && bind$1.bind(call, call);
  249. var functionUncurryThis = functionBindNative ? function (fn) {
  250. return fn && uncurryThis(fn);
  251. } : function (fn) {
  252. return fn && function () {
  253. return call.apply(fn, arguments);
  254. };
  255. };
  256. var toString$1 = functionUncurryThis({}.toString);
  257. var stringSlice = functionUncurryThis(''.slice);
  258. var classofRaw = function (it) {
  259. return stringSlice(toString$1(it), 8, -1);
  260. };
  261. var Object$4 = global_1.Object;
  262. var split = functionUncurryThis(''.split);
  263. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  264. var indexedObject = fails(function () {
  265. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  266. // eslint-disable-next-line no-prototype-builtins -- safe
  267. return !Object$4('z').propertyIsEnumerable(0);
  268. }) ? function (it) {
  269. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  270. } : Object$4;
  271. var TypeError$9 = global_1.TypeError;
  272. // `RequireObjectCoercible` abstract operation
  273. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  274. var requireObjectCoercible = function (it) {
  275. if (it == undefined) throw TypeError$9("Can't call method on " + it);
  276. return it;
  277. };
  278. // toObject with fallback for non-array-like ES3 strings
  279. var toIndexedObject = function (it) {
  280. return indexedObject(requireObjectCoercible(it));
  281. };
  282. // `IsCallable` abstract operation
  283. // https://tc39.es/ecma262/#sec-iscallable
  284. var isCallable = function (argument) {
  285. return typeof argument == 'function';
  286. };
  287. var isObject = function (it) {
  288. return typeof it == 'object' ? it !== null : isCallable(it);
  289. };
  290. var aFunction = function (argument) {
  291. return isCallable(argument) ? argument : undefined;
  292. };
  293. var getBuiltIn = function (namespace, method) {
  294. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  295. };
  296. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  297. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  298. var process = global_1.process;
  299. var Deno = global_1.Deno;
  300. var versions = process && process.versions || Deno && Deno.version;
  301. var v8 = versions && versions.v8;
  302. var match, version;
  303. if (v8) {
  304. match = v8.split('.');
  305. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  306. // but their correct versions are not interesting for us
  307. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  308. }
  309. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  310. // so check `userAgent` even if `.v8` exists, but 0
  311. if (!version && engineUserAgent) {
  312. match = engineUserAgent.match(/Edge\/(\d+)/);
  313. if (!match || match[1] >= 74) {
  314. match = engineUserAgent.match(/Chrome\/(\d+)/);
  315. if (match) version = +match[1];
  316. }
  317. }
  318. var engineV8Version = version;
  319. /* eslint-disable es/no-symbol -- required for testing */
  320. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  321. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  322. var symbol = Symbol();
  323. // Chrome 38 Symbol has incorrect toString conversion
  324. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  325. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  326. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  327. !Symbol.sham && engineV8Version && engineV8Version < 41;
  328. });
  329. /* eslint-disable es/no-symbol -- required for testing */
  330. var useSymbolAsUid = nativeSymbol
  331. && !Symbol.sham
  332. && typeof Symbol.iterator == 'symbol';
  333. var Object$3 = global_1.Object;
  334. var isSymbol = useSymbolAsUid ? function (it) {
  335. return typeof it == 'symbol';
  336. } : function (it) {
  337. var $Symbol = getBuiltIn('Symbol');
  338. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  339. };
  340. var String$3 = global_1.String;
  341. var tryToString = function (argument) {
  342. try {
  343. return String$3(argument);
  344. } catch (error) {
  345. return 'Object';
  346. }
  347. };
  348. var TypeError$8 = global_1.TypeError;
  349. // `Assert: IsCallable(argument) is true`
  350. var aCallable = function (argument) {
  351. if (isCallable(argument)) return argument;
  352. throw TypeError$8(tryToString(argument) + ' is not a function');
  353. };
  354. // `GetMethod` abstract operation
  355. // https://tc39.es/ecma262/#sec-getmethod
  356. var getMethod = function (V, P) {
  357. var func = V[P];
  358. return func == null ? undefined : aCallable(func);
  359. };
  360. var TypeError$7 = global_1.TypeError;
  361. // `OrdinaryToPrimitive` abstract operation
  362. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  363. var ordinaryToPrimitive = function (input, pref) {
  364. var fn, val;
  365. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  366. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  367. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  368. throw TypeError$7("Can't convert object to primitive value");
  369. };
  370. // eslint-disable-next-line es/no-object-defineproperty -- safe
  371. var defineProperty$1 = Object.defineProperty;
  372. var setGlobal = function (key, value) {
  373. try {
  374. defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
  375. } catch (error) {
  376. global_1[key] = value;
  377. } return value;
  378. };
  379. var SHARED = '__core-js_shared__';
  380. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  381. var sharedStore = store$1;
  382. var shared = createCommonjsModule(function (module) {
  383. (module.exports = function (key, value) {
  384. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  385. })('versions', []).push({
  386. version: '3.21.1',
  387. mode: 'global',
  388. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  389. license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
  390. source: 'https://github.com/zloirock/core-js'
  391. });
  392. });
  393. var Object$2 = global_1.Object;
  394. // `ToObject` abstract operation
  395. // https://tc39.es/ecma262/#sec-toobject
  396. var toObject = function (argument) {
  397. return Object$2(requireObjectCoercible(argument));
  398. };
  399. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  400. // `HasOwnProperty` abstract operation
  401. // https://tc39.es/ecma262/#sec-hasownproperty
  402. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  403. return hasOwnProperty(toObject(it), key);
  404. };
  405. var id = 0;
  406. var postfix = Math.random();
  407. var toString = functionUncurryThis(1.0.toString);
  408. var uid = function (key) {
  409. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  410. };
  411. var WellKnownSymbolsStore = shared('wks');
  412. var Symbol$1 = global_1.Symbol;
  413. var symbolFor = Symbol$1 && Symbol$1['for'];
  414. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  415. var wellKnownSymbol = function (name) {
  416. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  417. var description = 'Symbol.' + name;
  418. if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
  419. WellKnownSymbolsStore[name] = Symbol$1[name];
  420. } else if (useSymbolAsUid && symbolFor) {
  421. WellKnownSymbolsStore[name] = symbolFor(description);
  422. } else {
  423. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  424. }
  425. } return WellKnownSymbolsStore[name];
  426. };
  427. var TypeError$6 = global_1.TypeError;
  428. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  429. // `ToPrimitive` abstract operation
  430. // https://tc39.es/ecma262/#sec-toprimitive
  431. var toPrimitive = function (input, pref) {
  432. if (!isObject(input) || isSymbol(input)) return input;
  433. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  434. var result;
  435. if (exoticToPrim) {
  436. if (pref === undefined) pref = 'default';
  437. result = functionCall(exoticToPrim, input, pref);
  438. if (!isObject(result) || isSymbol(result)) return result;
  439. throw TypeError$6("Can't convert object to primitive value");
  440. }
  441. if (pref === undefined) pref = 'number';
  442. return ordinaryToPrimitive(input, pref);
  443. };
  444. // `ToPropertyKey` abstract operation
  445. // https://tc39.es/ecma262/#sec-topropertykey
  446. var toPropertyKey = function (argument) {
  447. var key = toPrimitive(argument, 'string');
  448. return isSymbol(key) ? key : key + '';
  449. };
  450. var document$1 = global_1.document;
  451. // typeof document.createElement is 'object' in old IE
  452. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  453. var documentCreateElement = function (it) {
  454. return EXISTS$1 ? document$1.createElement(it) : {};
  455. };
  456. // Thanks to IE8 for its funny defineProperty
  457. var ie8DomDefine = !descriptors && !fails(function () {
  458. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  459. return Object.defineProperty(documentCreateElement('div'), 'a', {
  460. get: function () { return 7; }
  461. }).a != 7;
  462. });
  463. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  464. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  465. // `Object.getOwnPropertyDescriptor` method
  466. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  467. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  468. O = toIndexedObject(O);
  469. P = toPropertyKey(P);
  470. if (ie8DomDefine) try {
  471. return $getOwnPropertyDescriptor$1(O, P);
  472. } catch (error) { /* empty */ }
  473. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  474. };
  475. var objectGetOwnPropertyDescriptor = {
  476. f: f$4
  477. };
  478. // V8 ~ Chrome 36-
  479. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  480. var v8PrototypeDefineBug = descriptors && fails(function () {
  481. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  482. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  483. value: 42,
  484. writable: false
  485. }).prototype != 42;
  486. });
  487. var String$2 = global_1.String;
  488. var TypeError$5 = global_1.TypeError;
  489. // `Assert: Type(argument) is Object`
  490. var anObject = function (argument) {
  491. if (isObject(argument)) return argument;
  492. throw TypeError$5(String$2(argument) + ' is not an object');
  493. };
  494. var TypeError$4 = global_1.TypeError;
  495. // eslint-disable-next-line es/no-object-defineproperty -- safe
  496. var $defineProperty = Object.defineProperty;
  497. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  498. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  499. var ENUMERABLE = 'enumerable';
  500. var CONFIGURABLE$1 = 'configurable';
  501. var WRITABLE = 'writable';
  502. // `Object.defineProperty` method
  503. // https://tc39.es/ecma262/#sec-object.defineproperty
  504. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  505. anObject(O);
  506. P = toPropertyKey(P);
  507. anObject(Attributes);
  508. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  509. var current = $getOwnPropertyDescriptor(O, P);
  510. if (current && current[WRITABLE]) {
  511. O[P] = Attributes.value;
  512. Attributes = {
  513. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  514. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  515. writable: false
  516. };
  517. }
  518. } return $defineProperty(O, P, Attributes);
  519. } : $defineProperty : function defineProperty(O, P, Attributes) {
  520. anObject(O);
  521. P = toPropertyKey(P);
  522. anObject(Attributes);
  523. if (ie8DomDefine) try {
  524. return $defineProperty(O, P, Attributes);
  525. } catch (error) { /* empty */ }
  526. if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
  527. if ('value' in Attributes) O[P] = Attributes.value;
  528. return O;
  529. };
  530. var objectDefineProperty = {
  531. f: f$3
  532. };
  533. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  534. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  535. } : function (object, key, value) {
  536. object[key] = value;
  537. return object;
  538. };
  539. var functionToString = functionUncurryThis(Function.toString);
  540. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  541. if (!isCallable(sharedStore.inspectSource)) {
  542. sharedStore.inspectSource = function (it) {
  543. return functionToString(it);
  544. };
  545. }
  546. var inspectSource = sharedStore.inspectSource;
  547. var WeakMap$1 = global_1.WeakMap;
  548. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  549. var keys = shared('keys');
  550. var sharedKey = function (key) {
  551. return keys[key] || (keys[key] = uid(key));
  552. };
  553. var hiddenKeys$1 = {};
  554. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  555. var TypeError$3 = global_1.TypeError;
  556. var WeakMap = global_1.WeakMap;
  557. var set, get, has;
  558. var enforce = function (it) {
  559. return has(it) ? get(it) : set(it, {});
  560. };
  561. var getterFor = function (TYPE) {
  562. return function (it) {
  563. var state;
  564. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  565. throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
  566. } return state;
  567. };
  568. };
  569. if (nativeWeakMap || sharedStore.state) {
  570. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  571. var wmget = functionUncurryThis(store.get);
  572. var wmhas = functionUncurryThis(store.has);
  573. var wmset = functionUncurryThis(store.set);
  574. set = function (it, metadata) {
  575. if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  576. metadata.facade = it;
  577. wmset(store, it, metadata);
  578. return metadata;
  579. };
  580. get = function (it) {
  581. return wmget(store, it) || {};
  582. };
  583. has = function (it) {
  584. return wmhas(store, it);
  585. };
  586. } else {
  587. var STATE = sharedKey('state');
  588. hiddenKeys$1[STATE] = true;
  589. set = function (it, metadata) {
  590. if (hasOwnProperty_1(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  591. metadata.facade = it;
  592. createNonEnumerableProperty(it, STATE, metadata);
  593. return metadata;
  594. };
  595. get = function (it) {
  596. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  597. };
  598. has = function (it) {
  599. return hasOwnProperty_1(it, STATE);
  600. };
  601. }
  602. var internalState = {
  603. set: set,
  604. get: get,
  605. has: has,
  606. enforce: enforce,
  607. getterFor: getterFor
  608. };
  609. var FunctionPrototype = Function.prototype;
  610. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  611. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  612. var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
  613. // additional protection from minified / mangled / dropped function names
  614. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  615. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
  616. var functionName = {
  617. EXISTS: EXISTS,
  618. PROPER: PROPER,
  619. CONFIGURABLE: CONFIGURABLE
  620. };
  621. var redefine = createCommonjsModule(function (module) {
  622. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  623. var getInternalState = internalState.get;
  624. var enforceInternalState = internalState.enforce;
  625. var TEMPLATE = String(String).split('String');
  626. (module.exports = function (O, key, value, options) {
  627. var unsafe = options ? !!options.unsafe : false;
  628. var simple = options ? !!options.enumerable : false;
  629. var noTargetGet = options ? !!options.noTargetGet : false;
  630. var name = options && options.name !== undefined ? options.name : key;
  631. var state;
  632. if (isCallable(value)) {
  633. if (String(name).slice(0, 7) === 'Symbol(') {
  634. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  635. }
  636. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  637. createNonEnumerableProperty(value, 'name', name);
  638. }
  639. state = enforceInternalState(value);
  640. if (!state.source) {
  641. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  642. }
  643. }
  644. if (O === global_1) {
  645. if (simple) O[key] = value;
  646. else setGlobal(key, value);
  647. return;
  648. } else if (!unsafe) {
  649. delete O[key];
  650. } else if (!noTargetGet && O[key]) {
  651. simple = true;
  652. }
  653. if (simple) O[key] = value;
  654. else createNonEnumerableProperty(O, key, value);
  655. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  656. })(Function.prototype, 'toString', function toString() {
  657. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  658. });
  659. });
  660. var ceil = Math.ceil;
  661. var floor$1 = Math.floor;
  662. // `ToIntegerOrInfinity` abstract operation
  663. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  664. var toIntegerOrInfinity = function (argument) {
  665. var number = +argument;
  666. // eslint-disable-next-line no-self-compare -- safe
  667. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  668. };
  669. var max$2 = Math.max;
  670. var min$1 = Math.min;
  671. // Helper for a popular repeating case of the spec:
  672. // Let integer be ? ToInteger(index).
  673. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  674. var toAbsoluteIndex = function (index, length) {
  675. var integer = toIntegerOrInfinity(index);
  676. return integer < 0 ? max$2(integer + length, 0) : min$1(integer, length);
  677. };
  678. var min = Math.min;
  679. // `ToLength` abstract operation
  680. // https://tc39.es/ecma262/#sec-tolength
  681. var toLength = function (argument) {
  682. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  683. };
  684. // `LengthOfArrayLike` abstract operation
  685. // https://tc39.es/ecma262/#sec-lengthofarraylike
  686. var lengthOfArrayLike = function (obj) {
  687. return toLength(obj.length);
  688. };
  689. // `Array.prototype.{ indexOf, includes }` methods implementation
  690. var createMethod$1 = function (IS_INCLUDES) {
  691. return function ($this, el, fromIndex) {
  692. var O = toIndexedObject($this);
  693. var length = lengthOfArrayLike(O);
  694. var index = toAbsoluteIndex(fromIndex, length);
  695. var value;
  696. // Array#includes uses SameValueZero equality algorithm
  697. // eslint-disable-next-line no-self-compare -- NaN check
  698. if (IS_INCLUDES && el != el) while (length > index) {
  699. value = O[index++];
  700. // eslint-disable-next-line no-self-compare -- NaN check
  701. if (value != value) return true;
  702. // Array#indexOf ignores holes, Array#includes - not
  703. } else for (;length > index; index++) {
  704. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  705. } return !IS_INCLUDES && -1;
  706. };
  707. };
  708. var arrayIncludes = {
  709. // `Array.prototype.includes` method
  710. // https://tc39.es/ecma262/#sec-array.prototype.includes
  711. includes: createMethod$1(true),
  712. // `Array.prototype.indexOf` method
  713. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  714. indexOf: createMethod$1(false)
  715. };
  716. var indexOf = arrayIncludes.indexOf;
  717. var push$2 = functionUncurryThis([].push);
  718. var objectKeysInternal = function (object, names) {
  719. var O = toIndexedObject(object);
  720. var i = 0;
  721. var result = [];
  722. var key;
  723. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
  724. // Don't enum bug & hidden keys
  725. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  726. ~indexOf(result, key) || push$2(result, key);
  727. }
  728. return result;
  729. };
  730. // IE8- don't enum bug keys
  731. var enumBugKeys = [
  732. 'constructor',
  733. 'hasOwnProperty',
  734. 'isPrototypeOf',
  735. 'propertyIsEnumerable',
  736. 'toLocaleString',
  737. 'toString',
  738. 'valueOf'
  739. ];
  740. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  741. // `Object.getOwnPropertyNames` method
  742. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  743. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  744. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  745. return objectKeysInternal(O, hiddenKeys);
  746. };
  747. var objectGetOwnPropertyNames = {
  748. f: f$2
  749. };
  750. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  751. var f$1 = Object.getOwnPropertySymbols;
  752. var objectGetOwnPropertySymbols = {
  753. f: f$1
  754. };
  755. var concat$1 = functionUncurryThis([].concat);
  756. // all object keys, includes non-enumerable and symbols
  757. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  758. var keys = objectGetOwnPropertyNames.f(anObject(it));
  759. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  760. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  761. };
  762. var copyConstructorProperties = function (target, source, exceptions) {
  763. var keys = ownKeys(source);
  764. var defineProperty = objectDefineProperty.f;
  765. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  766. for (var i = 0; i < keys.length; i++) {
  767. var key = keys[i];
  768. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  769. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  770. }
  771. }
  772. };
  773. var replacement = /#|\.prototype\./;
  774. var isForced = function (feature, detection) {
  775. var value = data[normalize(feature)];
  776. return value == POLYFILL ? true
  777. : value == NATIVE ? false
  778. : isCallable(detection) ? fails(detection)
  779. : !!detection;
  780. };
  781. var normalize = isForced.normalize = function (string) {
  782. return String(string).replace(replacement, '.').toLowerCase();
  783. };
  784. var data = isForced.data = {};
  785. var NATIVE = isForced.NATIVE = 'N';
  786. var POLYFILL = isForced.POLYFILL = 'P';
  787. var isForced_1 = isForced;
  788. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  789. /*
  790. options.target - name of the target object
  791. options.global - target is the global object
  792. options.stat - export as static methods of target
  793. options.proto - export as prototype methods of target
  794. options.real - real prototype method for the `pure` version
  795. options.forced - export even if the native feature is available
  796. options.bind - bind methods to the target, required for the `pure` version
  797. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  798. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  799. options.sham - add a flag to not completely full polyfills
  800. options.enumerable - export as enumerable property
  801. options.noTargetGet - prevent calling a getter on target
  802. options.name - the .name of the function if it does not match the key
  803. */
  804. var _export = function (options, source) {
  805. var TARGET = options.target;
  806. var GLOBAL = options.global;
  807. var STATIC = options.stat;
  808. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  809. if (GLOBAL) {
  810. target = global_1;
  811. } else if (STATIC) {
  812. target = global_1[TARGET] || setGlobal(TARGET, {});
  813. } else {
  814. target = (global_1[TARGET] || {}).prototype;
  815. }
  816. if (target) for (key in source) {
  817. sourceProperty = source[key];
  818. if (options.noTargetGet) {
  819. descriptor = getOwnPropertyDescriptor(target, key);
  820. targetProperty = descriptor && descriptor.value;
  821. } else targetProperty = target[key];
  822. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  823. // contained in target
  824. if (!FORCED && targetProperty !== undefined) {
  825. if (typeof sourceProperty == typeof targetProperty) continue;
  826. copyConstructorProperties(sourceProperty, targetProperty);
  827. }
  828. // add a flag to not completely full polyfills
  829. if (options.sham || (targetProperty && targetProperty.sham)) {
  830. createNonEnumerableProperty(sourceProperty, 'sham', true);
  831. }
  832. // extend global
  833. redefine(target, key, sourceProperty, options);
  834. }
  835. };
  836. // `IsArray` abstract operation
  837. // https://tc39.es/ecma262/#sec-isarray
  838. // eslint-disable-next-line es/no-array-isarray -- safe
  839. var isArray = Array.isArray || function isArray(argument) {
  840. return classofRaw(argument) == 'Array';
  841. };
  842. var createProperty = function (object, key, value) {
  843. var propertyKey = toPropertyKey(key);
  844. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  845. else object[propertyKey] = value;
  846. };
  847. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  848. var test$1 = {};
  849. test$1[TO_STRING_TAG$1] = 'z';
  850. var toStringTagSupport = String(test$1) === '[object z]';
  851. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  852. var Object$1 = global_1.Object;
  853. // ES3 wrong here
  854. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  855. // fallback for IE11 Script Access Denied error
  856. var tryGet = function (it, key) {
  857. try {
  858. return it[key];
  859. } catch (error) { /* empty */ }
  860. };
  861. // getting tag from ES6+ `Object.prototype.toString`
  862. var classof = toStringTagSupport ? classofRaw : function (it) {
  863. var O, tag, result;
  864. return it === undefined ? 'Undefined' : it === null ? 'Null'
  865. // @@toStringTag case
  866. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  867. // builtinTag case
  868. : CORRECT_ARGUMENTS ? classofRaw(O)
  869. // ES3 arguments fallback
  870. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  871. };
  872. var noop = function () { /* empty */ };
  873. var empty = [];
  874. var construct = getBuiltIn('Reflect', 'construct');
  875. var constructorRegExp = /^\s*(?:class|function)\b/;
  876. var exec = functionUncurryThis(constructorRegExp.exec);
  877. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  878. var isConstructorModern = function isConstructor(argument) {
  879. if (!isCallable(argument)) return false;
  880. try {
  881. construct(noop, empty, argument);
  882. return true;
  883. } catch (error) {
  884. return false;
  885. }
  886. };
  887. var isConstructorLegacy = function isConstructor(argument) {
  888. if (!isCallable(argument)) return false;
  889. switch (classof(argument)) {
  890. case 'AsyncFunction':
  891. case 'GeneratorFunction':
  892. case 'AsyncGeneratorFunction': return false;
  893. }
  894. try {
  895. // we can't check .prototype since constructors produced by .bind haven't it
  896. // `Function#toString` throws on some built-it function in some legacy engines
  897. // (for example, `DOMQuad` and similar in FF41-)
  898. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  899. } catch (error) {
  900. return true;
  901. }
  902. };
  903. isConstructorLegacy.sham = true;
  904. // `IsConstructor` abstract operation
  905. // https://tc39.es/ecma262/#sec-isconstructor
  906. var isConstructor = !construct || fails(function () {
  907. var called;
  908. return isConstructorModern(isConstructorModern.call)
  909. || !isConstructorModern(Object)
  910. || !isConstructorModern(function () { called = true; })
  911. || called;
  912. }) ? isConstructorLegacy : isConstructorModern;
  913. var SPECIES$2 = wellKnownSymbol('species');
  914. var Array$3 = global_1.Array;
  915. // a part of `ArraySpeciesCreate` abstract operation
  916. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  917. var arraySpeciesConstructor = function (originalArray) {
  918. var C;
  919. if (isArray(originalArray)) {
  920. C = originalArray.constructor;
  921. // cross-realm fallback
  922. if (isConstructor(C) && (C === Array$3 || isArray(C.prototype))) C = undefined;
  923. else if (isObject(C)) {
  924. C = C[SPECIES$2];
  925. if (C === null) C = undefined;
  926. }
  927. } return C === undefined ? Array$3 : C;
  928. };
  929. // `ArraySpeciesCreate` abstract operation
  930. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  931. var arraySpeciesCreate = function (originalArray, length) {
  932. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  933. };
  934. var SPECIES$1 = wellKnownSymbol('species');
  935. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  936. // We can't use this feature detection in V8 since it causes
  937. // deoptimization and serious performance degradation
  938. // https://github.com/zloirock/core-js/issues/677
  939. return engineV8Version >= 51 || !fails(function () {
  940. var array = [];
  941. var constructor = array.constructor = {};
  942. constructor[SPECIES$1] = function () {
  943. return { foo: 1 };
  944. };
  945. return array[METHOD_NAME](Boolean).foo !== 1;
  946. });
  947. };
  948. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  949. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  950. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  951. var TypeError$2 = global_1.TypeError;
  952. // We can't use this feature detection in V8 since it causes
  953. // deoptimization and serious performance degradation
  954. // https://github.com/zloirock/core-js/issues/679
  955. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  956. var array = [];
  957. array[IS_CONCAT_SPREADABLE] = false;
  958. return array.concat()[0] !== array;
  959. });
  960. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  961. var isConcatSpreadable = function (O) {
  962. if (!isObject(O)) return false;
  963. var spreadable = O[IS_CONCAT_SPREADABLE];
  964. return spreadable !== undefined ? !!spreadable : isArray(O);
  965. };
  966. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  967. // `Array.prototype.concat` method
  968. // https://tc39.es/ecma262/#sec-array.prototype.concat
  969. // with adding support of @@isConcatSpreadable and @@species
  970. _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
  971. // eslint-disable-next-line no-unused-vars -- required for `.length`
  972. concat: function concat(arg) {
  973. var O = toObject(this);
  974. var A = arraySpeciesCreate(O, 0);
  975. var n = 0;
  976. var i, k, length, len, E;
  977. for (i = -1, length = arguments.length; i < length; i++) {
  978. E = i === -1 ? O : arguments[i];
  979. if (isConcatSpreadable(E)) {
  980. len = lengthOfArrayLike(E);
  981. if (n + len > MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  982. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  983. } else {
  984. if (n >= MAX_SAFE_INTEGER) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  985. createProperty(A, n++, E);
  986. }
  987. }
  988. A.length = n;
  989. return A;
  990. }
  991. });
  992. // `Object.keys` method
  993. // https://tc39.es/ecma262/#sec-object.keys
  994. // eslint-disable-next-line es/no-object-keys -- safe
  995. var objectKeys = Object.keys || function keys(O) {
  996. return objectKeysInternal(O, enumBugKeys);
  997. };
  998. // eslint-disable-next-line es/no-object-assign -- safe
  999. var $assign = Object.assign;
  1000. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1001. var defineProperty = Object.defineProperty;
  1002. var concat = functionUncurryThis([].concat);
  1003. // `Object.assign` method
  1004. // https://tc39.es/ecma262/#sec-object.assign
  1005. var objectAssign = !$assign || fails(function () {
  1006. // should have correct order of operations (Edge bug)
  1007. if (descriptors && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1008. enumerable: true,
  1009. get: function () {
  1010. defineProperty(this, 'b', {
  1011. value: 3,
  1012. enumerable: false
  1013. });
  1014. }
  1015. }), { b: 2 })).b !== 1) return true;
  1016. // should work with symbols and should have deterministic property order (V8 bug)
  1017. var A = {};
  1018. var B = {};
  1019. // eslint-disable-next-line es/no-symbol -- safe
  1020. var symbol = Symbol();
  1021. var alphabet = 'abcdefghijklmnopqrst';
  1022. A[symbol] = 7;
  1023. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1024. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  1025. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1026. var T = toObject(target);
  1027. var argumentsLength = arguments.length;
  1028. var index = 1;
  1029. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  1030. var propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1031. while (argumentsLength > index) {
  1032. var S = indexedObject(arguments[index++]);
  1033. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1034. var length = keys.length;
  1035. var j = 0;
  1036. var key;
  1037. while (length > j) {
  1038. key = keys[j++];
  1039. if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
  1040. }
  1041. } return T;
  1042. } : $assign;
  1043. // `Object.assign` method
  1044. // https://tc39.es/ecma262/#sec-object.assign
  1045. // eslint-disable-next-line es/no-object-assign -- required for testing
  1046. _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
  1047. assign: objectAssign
  1048. });
  1049. var arraySlice = functionUncurryThis([].slice);
  1050. var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('slice');
  1051. var SPECIES = wellKnownSymbol('species');
  1052. var Array$2 = global_1.Array;
  1053. var max$1 = Math.max;
  1054. // `Array.prototype.slice` method
  1055. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1056. // fallback for not array-like ES3 strings and DOM objects
  1057. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
  1058. slice: function slice(start, end) {
  1059. var O = toIndexedObject(this);
  1060. var length = lengthOfArrayLike(O);
  1061. var k = toAbsoluteIndex(start, length);
  1062. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1063. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1064. var Constructor, result, n;
  1065. if (isArray(O)) {
  1066. Constructor = O.constructor;
  1067. // cross-realm fallback
  1068. if (isConstructor(Constructor) && (Constructor === Array$2 || isArray(Constructor.prototype))) {
  1069. Constructor = undefined;
  1070. } else if (isObject(Constructor)) {
  1071. Constructor = Constructor[SPECIES];
  1072. if (Constructor === null) Constructor = undefined;
  1073. }
  1074. if (Constructor === Array$2 || Constructor === undefined) {
  1075. return arraySlice(O, k, fin);
  1076. }
  1077. }
  1078. result = new (Constructor === undefined ? Array$2 : Constructor)(max$1(fin - k, 0));
  1079. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  1080. result.length = n;
  1081. return result;
  1082. }
  1083. });
  1084. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1085. var method = [][METHOD_NAME];
  1086. return !!method && fails(function () {
  1087. // eslint-disable-next-line no-useless-call -- required for testing
  1088. method.call(null, argument || function () { return 1; }, 1);
  1089. });
  1090. };
  1091. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1092. var $IndexOf = arrayIncludes.indexOf;
  1093. var un$IndexOf = functionUncurryThis([].indexOf);
  1094. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1095. var STRICT_METHOD$2 = arrayMethodIsStrict('indexOf');
  1096. // `Array.prototype.indexOf` method
  1097. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1098. _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$2 }, {
  1099. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1100. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1101. return NEGATIVE_ZERO
  1102. // convert -0 to +0
  1103. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1104. : $IndexOf(this, searchElement, fromIndex);
  1105. }
  1106. });
  1107. var bind = functionUncurryThis(functionUncurryThis.bind);
  1108. // optional / simple context binding
  1109. var functionBindContext = function (fn, that) {
  1110. aCallable(fn);
  1111. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  1112. return fn.apply(that, arguments);
  1113. };
  1114. };
  1115. var TypeError$1 = global_1.TypeError;
  1116. // `FlattenIntoArray` abstract operation
  1117. // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
  1118. var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
  1119. var targetIndex = start;
  1120. var sourceIndex = 0;
  1121. var mapFn = mapper ? functionBindContext(mapper, thisArg) : false;
  1122. var element, elementLen;
  1123. while (sourceIndex < sourceLen) {
  1124. if (sourceIndex in source) {
  1125. element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
  1126. if (depth > 0 && isArray(element)) {
  1127. elementLen = lengthOfArrayLike(element);
  1128. targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;
  1129. } else {
  1130. if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError$1('Exceed the acceptable array length');
  1131. target[targetIndex] = element;
  1132. }
  1133. targetIndex++;
  1134. }
  1135. sourceIndex++;
  1136. }
  1137. return targetIndex;
  1138. };
  1139. var flattenIntoArray_1 = flattenIntoArray;
  1140. // `Array.prototype.flat` method
  1141. // https://tc39.es/ecma262/#sec-array.prototype.flat
  1142. _export({ target: 'Array', proto: true }, {
  1143. flat: function flat(/* depthArg = 1 */) {
  1144. var depthArg = arguments.length ? arguments[0] : undefined;
  1145. var O = toObject(this);
  1146. var sourceLen = lengthOfArrayLike(O);
  1147. var A = arraySpeciesCreate(O, 0);
  1148. A.length = flattenIntoArray_1(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
  1149. return A;
  1150. }
  1151. });
  1152. // `Object.defineProperties` method
  1153. // https://tc39.es/ecma262/#sec-object.defineproperties
  1154. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1155. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  1156. anObject(O);
  1157. var props = toIndexedObject(Properties);
  1158. var keys = objectKeys(Properties);
  1159. var length = keys.length;
  1160. var index = 0;
  1161. var key;
  1162. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  1163. return O;
  1164. };
  1165. var objectDefineProperties = {
  1166. f: f
  1167. };
  1168. var html = getBuiltIn('document', 'documentElement');
  1169. /* global ActiveXObject -- old IE, WSH */
  1170. var GT = '>';
  1171. var LT = '<';
  1172. var PROTOTYPE = 'prototype';
  1173. var SCRIPT = 'script';
  1174. var IE_PROTO = sharedKey('IE_PROTO');
  1175. var EmptyConstructor = function () { /* empty */ };
  1176. var scriptTag = function (content) {
  1177. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1178. };
  1179. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1180. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1181. activeXDocument.write(scriptTag(''));
  1182. activeXDocument.close();
  1183. var temp = activeXDocument.parentWindow.Object;
  1184. activeXDocument = null; // avoid memory leak
  1185. return temp;
  1186. };
  1187. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1188. var NullProtoObjectViaIFrame = function () {
  1189. // Thrash, waste and sodomy: IE GC bug
  1190. var iframe = documentCreateElement('iframe');
  1191. var JS = 'java' + SCRIPT + ':';
  1192. var iframeDocument;
  1193. iframe.style.display = 'none';
  1194. html.appendChild(iframe);
  1195. // https://github.com/zloirock/core-js/issues/475
  1196. iframe.src = String(JS);
  1197. iframeDocument = iframe.contentWindow.document;
  1198. iframeDocument.open();
  1199. iframeDocument.write(scriptTag('document.F=Object'));
  1200. iframeDocument.close();
  1201. return iframeDocument.F;
  1202. };
  1203. // Check for document.domain and active x support
  1204. // No need to use active x approach when document.domain is not set
  1205. // see https://github.com/es-shims/es5-shim/issues/150
  1206. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1207. // avoid IE GC bug
  1208. var activeXDocument;
  1209. var NullProtoObject = function () {
  1210. try {
  1211. activeXDocument = new ActiveXObject('htmlfile');
  1212. } catch (error) { /* ignore */ }
  1213. NullProtoObject = typeof document != 'undefined'
  1214. ? document.domain && activeXDocument
  1215. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1216. : NullProtoObjectViaIFrame()
  1217. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1218. var length = enumBugKeys.length;
  1219. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1220. return NullProtoObject();
  1221. };
  1222. hiddenKeys$1[IE_PROTO] = true;
  1223. // `Object.create` method
  1224. // https://tc39.es/ecma262/#sec-object.create
  1225. var objectCreate = Object.create || function create(O, Properties) {
  1226. var result;
  1227. if (O !== null) {
  1228. EmptyConstructor[PROTOTYPE] = anObject(O);
  1229. result = new EmptyConstructor();
  1230. EmptyConstructor[PROTOTYPE] = null;
  1231. // add "__proto__" for Object.getPrototypeOf polyfill
  1232. result[IE_PROTO] = O;
  1233. } else result = NullProtoObject();
  1234. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  1235. };
  1236. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1237. var ArrayPrototype = Array.prototype;
  1238. // Array.prototype[@@unscopables]
  1239. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1240. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1241. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1242. configurable: true,
  1243. value: objectCreate(null)
  1244. });
  1245. }
  1246. // add a key to Array.prototype[@@unscopables]
  1247. var addToUnscopables = function (key) {
  1248. ArrayPrototype[UNSCOPABLES][key] = true;
  1249. };
  1250. // this method was added to unscopables after implementation
  1251. // in popular engines, so it's moved to a separate module
  1252. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1253. addToUnscopables('flat');
  1254. var String$1 = global_1.String;
  1255. var toString_1 = function (argument) {
  1256. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1257. return String$1(argument);
  1258. };
  1259. var Array$1 = global_1.Array;
  1260. var max = Math.max;
  1261. var arraySliceSimple = function (O, start, end) {
  1262. var length = lengthOfArrayLike(O);
  1263. var k = toAbsoluteIndex(start, length);
  1264. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1265. var result = Array$1(max(fin - k, 0));
  1266. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  1267. result.length = n;
  1268. return result;
  1269. };
  1270. var floor = Math.floor;
  1271. var mergeSort = function (array, comparefn) {
  1272. var length = array.length;
  1273. var middle = floor(length / 2);
  1274. return length < 8 ? insertionSort(array, comparefn) : merge(
  1275. array,
  1276. mergeSort(arraySliceSimple(array, 0, middle), comparefn),
  1277. mergeSort(arraySliceSimple(array, middle), comparefn),
  1278. comparefn
  1279. );
  1280. };
  1281. var insertionSort = function (array, comparefn) {
  1282. var length = array.length;
  1283. var i = 1;
  1284. var element, j;
  1285. while (i < length) {
  1286. j = i;
  1287. element = array[i];
  1288. while (j && comparefn(array[j - 1], element) > 0) {
  1289. array[j] = array[--j];
  1290. }
  1291. if (j !== i++) array[j] = element;
  1292. } return array;
  1293. };
  1294. var merge = function (array, left, right, comparefn) {
  1295. var llength = left.length;
  1296. var rlength = right.length;
  1297. var lindex = 0;
  1298. var rindex = 0;
  1299. while (lindex < llength || rindex < rlength) {
  1300. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1301. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1302. : lindex < llength ? left[lindex++] : right[rindex++];
  1303. } return array;
  1304. };
  1305. var arraySort = mergeSort;
  1306. var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
  1307. var engineFfVersion = !!firefox && +firefox[1];
  1308. var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent);
  1309. var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
  1310. var engineWebkitVersion = !!webkit && +webkit[1];
  1311. var test = [];
  1312. var un$Sort = functionUncurryThis(test.sort);
  1313. var push$1 = functionUncurryThis(test.push);
  1314. // IE8-
  1315. var FAILS_ON_UNDEFINED = fails(function () {
  1316. test.sort(undefined);
  1317. });
  1318. // V8 bug
  1319. var FAILS_ON_NULL = fails(function () {
  1320. test.sort(null);
  1321. });
  1322. // Old WebKit
  1323. var STRICT_METHOD$1 = arrayMethodIsStrict('sort');
  1324. var STABLE_SORT = !fails(function () {
  1325. // feature detection can be too slow, so check engines versions
  1326. if (engineV8Version) return engineV8Version < 70;
  1327. if (engineFfVersion && engineFfVersion > 3) return;
  1328. if (engineIsIeOrEdge) return true;
  1329. if (engineWebkitVersion) return engineWebkitVersion < 603;
  1330. var result = '';
  1331. var code, chr, value, index;
  1332. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1333. for (code = 65; code < 76; code++) {
  1334. chr = String.fromCharCode(code);
  1335. switch (code) {
  1336. case 66: case 69: case 70: case 72: value = 3; break;
  1337. case 68: case 71: value = 4; break;
  1338. default: value = 2;
  1339. }
  1340. for (index = 0; index < 47; index++) {
  1341. test.push({ k: chr + index, v: value });
  1342. }
  1343. }
  1344. test.sort(function (a, b) { return b.v - a.v; });
  1345. for (index = 0; index < test.length; index++) {
  1346. chr = test[index].k.charAt(0);
  1347. if (result.charAt(result.length - 1) !== chr) result += chr;
  1348. }
  1349. return result !== 'DGBEFHACIJK';
  1350. });
  1351. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD$1 || !STABLE_SORT;
  1352. var getSortCompare = function (comparefn) {
  1353. return function (x, y) {
  1354. if (y === undefined) return -1;
  1355. if (x === undefined) return 1;
  1356. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1357. return toString_1(x) > toString_1(y) ? 1 : -1;
  1358. };
  1359. };
  1360. // `Array.prototype.sort` method
  1361. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1362. _export({ target: 'Array', proto: true, forced: FORCED }, {
  1363. sort: function sort(comparefn) {
  1364. if (comparefn !== undefined) aCallable(comparefn);
  1365. var array = toObject(this);
  1366. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  1367. var items = [];
  1368. var arrayLength = lengthOfArrayLike(array);
  1369. var itemsLength, index;
  1370. for (index = 0; index < arrayLength; index++) {
  1371. if (index in array) push$1(items, array[index]);
  1372. }
  1373. arraySort(items, getSortCompare(comparefn));
  1374. itemsLength = items.length;
  1375. index = 0;
  1376. while (index < itemsLength) array[index] = items[index++];
  1377. while (index < arrayLength) delete array[index++];
  1378. return array;
  1379. }
  1380. });
  1381. var $includes = arrayIncludes.includes;
  1382. // `Array.prototype.includes` method
  1383. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1384. _export({ target: 'Array', proto: true }, {
  1385. includes: function includes(el /* , fromIndex = 0 */) {
  1386. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1387. }
  1388. });
  1389. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1390. addToUnscopables('includes');
  1391. var push = functionUncurryThis([].push);
  1392. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1393. var createMethod = function (TYPE) {
  1394. var IS_MAP = TYPE == 1;
  1395. var IS_FILTER = TYPE == 2;
  1396. var IS_SOME = TYPE == 3;
  1397. var IS_EVERY = TYPE == 4;
  1398. var IS_FIND_INDEX = TYPE == 6;
  1399. var IS_FILTER_REJECT = TYPE == 7;
  1400. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1401. return function ($this, callbackfn, that, specificCreate) {
  1402. var O = toObject($this);
  1403. var self = indexedObject(O);
  1404. var boundFunction = functionBindContext(callbackfn, that);
  1405. var length = lengthOfArrayLike(self);
  1406. var index = 0;
  1407. var create = specificCreate || arraySpeciesCreate;
  1408. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1409. var value, result;
  1410. for (;length > index; index++) if (NO_HOLES || index in self) {
  1411. value = self[index];
  1412. result = boundFunction(value, index, O);
  1413. if (TYPE) {
  1414. if (IS_MAP) target[index] = result; // map
  1415. else if (result) switch (TYPE) {
  1416. case 3: return true; // some
  1417. case 5: return value; // find
  1418. case 6: return index; // findIndex
  1419. case 2: push(target, value); // filter
  1420. } else switch (TYPE) {
  1421. case 4: return false; // every
  1422. case 7: push(target, value); // filterReject
  1423. }
  1424. }
  1425. }
  1426. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1427. };
  1428. };
  1429. var arrayIteration = {
  1430. // `Array.prototype.forEach` method
  1431. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1432. forEach: createMethod(0),
  1433. // `Array.prototype.map` method
  1434. // https://tc39.es/ecma262/#sec-array.prototype.map
  1435. map: createMethod(1),
  1436. // `Array.prototype.filter` method
  1437. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1438. filter: createMethod(2),
  1439. // `Array.prototype.some` method
  1440. // https://tc39.es/ecma262/#sec-array.prototype.some
  1441. some: createMethod(3),
  1442. // `Array.prototype.every` method
  1443. // https://tc39.es/ecma262/#sec-array.prototype.every
  1444. every: createMethod(4),
  1445. // `Array.prototype.find` method
  1446. // https://tc39.es/ecma262/#sec-array.prototype.find
  1447. find: createMethod(5),
  1448. // `Array.prototype.findIndex` method
  1449. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1450. findIndex: createMethod(6),
  1451. // `Array.prototype.filterReject` method
  1452. // https://github.com/tc39/proposal-array-filtering
  1453. filterReject: createMethod(7)
  1454. };
  1455. var $find = arrayIteration.find;
  1456. var FIND = 'find';
  1457. var SKIPS_HOLES = true;
  1458. // Shouldn't skip holes
  1459. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1460. // `Array.prototype.find` method
  1461. // https://tc39.es/ecma262/#sec-array.prototype.find
  1462. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1463. find: function find(callbackfn /* , that = undefined */) {
  1464. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1465. }
  1466. });
  1467. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1468. addToUnscopables(FIND);
  1469. // `Object.prototype.toString` method implementation
  1470. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1471. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  1472. return '[object ' + classof(this) + ']';
  1473. };
  1474. // `Object.prototype.toString` method
  1475. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1476. if (!toStringTagSupport) {
  1477. redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
  1478. }
  1479. var un$Join = functionUncurryThis([].join);
  1480. var ES3_STRINGS = indexedObject != Object;
  1481. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1482. // `Array.prototype.join` method
  1483. // https://tc39.es/ecma262/#sec-array.prototype.join
  1484. _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1485. join: function join(separator) {
  1486. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  1487. }
  1488. });
  1489. var $filter = arrayIteration.filter;
  1490. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('filter');
  1491. // `Array.prototype.filter` method
  1492. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1493. // with adding support of @@species
  1494. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1495. filter: function filter(callbackfn /* , thisArg */) {
  1496. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1497. }
  1498. });
  1499. var $map = arrayIteration.map;
  1500. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  1501. // `Array.prototype.map` method
  1502. // https://tc39.es/ecma262/#sec-array.prototype.map
  1503. // with adding support of @@species
  1504. _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1505. map: function map(callbackfn /* , thisArg */) {
  1506. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1507. }
  1508. });
  1509. /**
  1510. * @update zhixin wen <wenzhixin2010@gmail.com>
  1511. */
  1512. var Utils = $__default["default"].fn.bootstrapTable.utils;
  1513. function printPageBuilderDefault(table) {
  1514. return "\n <html>\n <head>\n <style type=\"text/css\" media=\"print\">\n @page {\n size: auto;\n margin: 25px 0 25px 0;\n }\n </style>\n <style type=\"text/css\" media=\"all\">\n table {\n border-collapse: collapse;\n font-size: 12px;\n }\n table, th, td {\n border: 1px solid grey;\n }\n th, td {\n text-align: center;\n vertical-align: middle;\n }\n p {\n font-weight: bold;\n margin-left:20px;\n }\n table {\n width:94%;\n margin-left:3%;\n margin-right:3%;\n }\n div.bs-table-print {\n text-align:center;\n }\n </style>\n </head>\n <title>Print Table</title>\n <body>\n <p>Printed on: ".concat(new Date(), " </p>\n <div class=\"bs-table-print\">").concat(table, "</div>\n </body>\n </html>");
  1515. }
  1516. $__default["default"].extend($__default["default"].fn.bootstrapTable.locales, {
  1517. formatPrint: function formatPrint() {
  1518. return 'Print';
  1519. }
  1520. });
  1521. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, $__default["default"].fn.bootstrapTable.locales);
  1522. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1523. showPrint: false,
  1524. printAsFilteredAndSortedOnUI: true,
  1525. printSortColumn: undefined,
  1526. printSortOrder: 'asc',
  1527. printPageBuilder: function printPageBuilder(table) {
  1528. return printPageBuilderDefault(table);
  1529. }
  1530. });
  1531. $__default["default"].extend($__default["default"].fn.bootstrapTable.COLUMN_DEFAULTS, {
  1532. printFilter: undefined,
  1533. printIgnore: false,
  1534. printFormatter: undefined
  1535. });
  1536. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults.icons, {
  1537. print: {
  1538. bootstrap3: 'glyphicon-print icon-share',
  1539. bootstrap5: 'bi-printer',
  1540. 'bootstrap-table': 'icon-printer'
  1541. }[$__default["default"].fn.bootstrapTable.theme] || 'fa-print'
  1542. });
  1543. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1544. _inherits(_class, _$$BootstrapTable);
  1545. var _super = _createSuper(_class);
  1546. function _class() {
  1547. _classCallCheck(this, _class);
  1548. return _super.apply(this, arguments);
  1549. }
  1550. _createClass(_class, [{
  1551. key: "init",
  1552. value: function init() {
  1553. var _get2;
  1554. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1555. args[_key] = arguments[_key];
  1556. }
  1557. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1558. if (!this.options.showPrint) {
  1559. return;
  1560. }
  1561. this.mergedCells = [];
  1562. }
  1563. }, {
  1564. key: "initToolbar",
  1565. value: function initToolbar() {
  1566. var _this = this,
  1567. _get3;
  1568. this.showToolbar = this.showToolbar || this.options.showPrint;
  1569. if (this.options.showPrint) {
  1570. this.buttons = Object.assign(this.buttons, {
  1571. print: {
  1572. text: this.options.formatPrint(),
  1573. icon: this.options.icons.print,
  1574. event: function event() {
  1575. _this.doPrint(_this.options.printAsFilteredAndSortedOnUI ? _this.getData() : _this.options.data.slice(0));
  1576. },
  1577. attributes: {
  1578. 'aria-label': this.options.formatPrint(),
  1579. title: this.options.formatPrint()
  1580. }
  1581. }
  1582. });
  1583. }
  1584. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1585. args[_key2] = arguments[_key2];
  1586. }
  1587. (_get3 = _get(_getPrototypeOf(_class.prototype), "initToolbar", this)).call.apply(_get3, [this].concat(args));
  1588. }
  1589. }, {
  1590. key: "mergeCells",
  1591. value: function mergeCells(options) {
  1592. _get(_getPrototypeOf(_class.prototype), "mergeCells", this).call(this, options);
  1593. if (!this.options.showPrint) {
  1594. return;
  1595. }
  1596. var col = this.getVisibleFields().indexOf(options.field);
  1597. if (Utils.hasDetailViewIcon(this.options)) {
  1598. col += 1;
  1599. }
  1600. this.mergedCells.push({
  1601. row: options.index,
  1602. col: col,
  1603. rowspan: options.rowspan || 1,
  1604. colspan: options.colspan || 1
  1605. });
  1606. }
  1607. }, {
  1608. key: "doPrint",
  1609. value: function doPrint(data) {
  1610. var _this2 = this;
  1611. var formatValue = function formatValue(row, i, column) {
  1612. var value = Utils.calculateObjectValue(column, column.printFormatter || column.formatter, [row[column.field], row, i], row[column.field]);
  1613. return typeof value === 'undefined' || value === null ? _this2.options.undefinedText : value;
  1614. };
  1615. var buildTable = function buildTable(data, columnsArray) {
  1616. var dir = _this2.$el.attr('dir') || 'ltr';
  1617. var html = ["<table dir=\"".concat(dir, "\"><thead>")];
  1618. var _iterator = _createForOfIteratorHelper(columnsArray),
  1619. _step;
  1620. try {
  1621. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  1622. var _columns2 = _step.value;
  1623. html.push('<tr>');
  1624. for (var _h = 0; _h < _columns2.length; _h++) {
  1625. if (!_columns2[_h].printIgnore) {
  1626. html.push("<th\n ".concat(Utils.sprintf(' rowspan="%s"', _columns2[_h].rowspan), "\n ").concat(Utils.sprintf(' colspan="%s"', _columns2[_h].colspan), "\n >").concat(_columns2[_h].title, "</th>"));
  1627. }
  1628. }
  1629. html.push('</tr>');
  1630. }
  1631. } catch (err) {
  1632. _iterator.e(err);
  1633. } finally {
  1634. _iterator.f();
  1635. }
  1636. html.push('</thead><tbody>');
  1637. var dontRender = [];
  1638. if (_this2.mergedCells) {
  1639. for (var mc = 0; mc < _this2.mergedCells.length; mc++) {
  1640. var currentMergedCell = _this2.mergedCells[mc];
  1641. for (var rs = 0; rs < currentMergedCell.rowspan; rs++) {
  1642. var row = currentMergedCell.row + rs;
  1643. for (var cs = 0; cs < currentMergedCell.colspan; cs++) {
  1644. var col = currentMergedCell.col + cs;
  1645. dontRender.push("".concat(row, ",").concat(col));
  1646. }
  1647. }
  1648. }
  1649. }
  1650. for (var i = 0; i < data.length; i++) {
  1651. html.push('<tr>');
  1652. var columns = columnsArray.flat(1);
  1653. columns.sort(function (c1, c2) {
  1654. return c1.colspanIndex - c2.colspanIndex;
  1655. });
  1656. for (var j = 0; j < columns.length; j++) {
  1657. if (columns[j].colspanGroup > 0) continue;
  1658. var rowspan = 0;
  1659. var colspan = 0;
  1660. if (_this2.mergedCells) {
  1661. for (var _mc = 0; _mc < _this2.mergedCells.length; _mc++) {
  1662. var _currentMergedCell = _this2.mergedCells[_mc];
  1663. if (_currentMergedCell.col === j && _currentMergedCell.row === i) {
  1664. rowspan = _currentMergedCell.rowspan;
  1665. colspan = _currentMergedCell.colspan;
  1666. }
  1667. }
  1668. }
  1669. if (!columns[j].printIgnore && columns[j].field && (!dontRender.includes("".concat(i, ",").concat(j)) || rowspan > 0 && colspan > 0)) {
  1670. if (rowspan > 0 && colspan > 0) {
  1671. html.push("<td ".concat(Utils.sprintf(' rowspan="%s"', rowspan), " ").concat(Utils.sprintf(' colspan="%s"', colspan), ">"), formatValue(data[i], i, columns[j]), '</td>');
  1672. } else {
  1673. html.push('<td>', formatValue(data[i], i, columns[j]), '</td>');
  1674. }
  1675. }
  1676. }
  1677. html.push('</tr>');
  1678. }
  1679. html.push('</tbody>');
  1680. if (_this2.options.showFooter) {
  1681. html.push('<footer><tr>');
  1682. var _iterator2 = _createForOfIteratorHelper(columnsArray),
  1683. _step2;
  1684. try {
  1685. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  1686. var _columns = _step2.value;
  1687. for (var h = 0; h < _columns.length; h++) {
  1688. if (!_columns[h].printIgnore) {
  1689. var footerData = Utils.trToData(_columns, _this2.$el.find('>tfoot>tr'));
  1690. var footerValue = Utils.calculateObjectValue(_columns[h], _columns[h].footerFormatter, [data], footerData[0] && footerData[0][_columns[h].field] || '');
  1691. html.push("<th>".concat(footerValue, "</th>"));
  1692. }
  1693. }
  1694. }
  1695. } catch (err) {
  1696. _iterator2.e(err);
  1697. } finally {
  1698. _iterator2.f();
  1699. }
  1700. html.push('</tr></footer>');
  1701. }
  1702. html.push('</table>');
  1703. return html.join('');
  1704. };
  1705. var sortRows = function sortRows(data, colName, sortOrder) {
  1706. if (!colName) {
  1707. return data;
  1708. }
  1709. var reverse = sortOrder !== 'asc';
  1710. reverse = -(+reverse || -1);
  1711. return data.sort(function (a, b) {
  1712. return reverse * a[colName].localeCompare(b[colName]);
  1713. });
  1714. };
  1715. var filterRow = function filterRow(row, filters) {
  1716. for (var index = 0; index < filters.length; ++index) {
  1717. if (row[filters[index].colName] !== filters[index].value) {
  1718. return false;
  1719. }
  1720. }
  1721. return true;
  1722. };
  1723. var filterRows = function filterRows(data, filters) {
  1724. return data.filter(function (row) {
  1725. return filterRow(row, filters);
  1726. });
  1727. };
  1728. var getColumnFilters = function getColumnFilters(columns) {
  1729. return !columns || !columns[0] ? [] : columns[0].filter(function (col) {
  1730. return col.printFilter;
  1731. }).map(function (col) {
  1732. return {
  1733. colName: col.field,
  1734. value: col.printFilter
  1735. };
  1736. });
  1737. };
  1738. data = filterRows(data, getColumnFilters(this.options.columns));
  1739. data = sortRows(data, this.options.printSortColumn, this.options.printSortOrder);
  1740. var table = buildTable(data, this.options.columns);
  1741. var newWin = window.open('');
  1742. var calculatedPrintPage = Utils.calculateObjectValue(this, this.options.printPageBuilder, [table], printPageBuilderDefault(table));
  1743. newWin.document.write(calculatedPrintPage);
  1744. newWin.document.close();
  1745. newWin.focus();
  1746. newWin.print();
  1747. newWin.close();
  1748. }
  1749. }]);
  1750. return _class;
  1751. }($__default["default"].BootstrapTable);
  1752. }));