bootstrap-table-export.js 91 KB

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