bootstrap-table-cookie.js 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346
  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 ($$c) { 'use strict';
  6. function _arrayLikeToArray(r, a) {
  7. (null == a || a > r.length) && (a = r.length);
  8. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  9. return n;
  10. }
  11. function _arrayWithHoles(r) {
  12. if (Array.isArray(r)) return r;
  13. }
  14. function _assertThisInitialized(e) {
  15. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16. return e;
  17. }
  18. function _callSuper(t, o, e) {
  19. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  20. }
  21. function _classCallCheck(a, n) {
  22. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  23. }
  24. function _defineProperties(e, r) {
  25. for (var t = 0; t < r.length; t++) {
  26. var o = r[t];
  27. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  28. }
  29. }
  30. function _createClass(e, r, t) {
  31. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  32. writable: !1
  33. }), e;
  34. }
  35. function _createForOfIteratorHelper(r, e) {
  36. var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  37. if (!t) {
  38. if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
  39. t && (r = t);
  40. var n = 0,
  41. F = function () {};
  42. return {
  43. s: F,
  44. n: function () {
  45. return n >= r.length ? {
  46. done: !0
  47. } : {
  48. done: !1,
  49. value: r[n++]
  50. };
  51. },
  52. e: function (r) {
  53. throw r;
  54. },
  55. f: F
  56. };
  57. }
  58. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  59. }
  60. var o,
  61. a = !0,
  62. u = !1;
  63. return {
  64. s: function () {
  65. t = t.call(r);
  66. },
  67. n: function () {
  68. var r = t.next();
  69. return a = r.done, r;
  70. },
  71. e: function (r) {
  72. u = !0, o = r;
  73. },
  74. f: function () {
  75. try {
  76. a || null == t.return || t.return();
  77. } finally {
  78. if (u) throw o;
  79. }
  80. }
  81. };
  82. }
  83. function _get() {
  84. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  85. var p = _superPropBase(e, t);
  86. if (p) {
  87. var n = Object.getOwnPropertyDescriptor(p, t);
  88. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  89. }
  90. }, _get.apply(null, arguments);
  91. }
  92. function _getPrototypeOf(t) {
  93. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  94. return t.__proto__ || Object.getPrototypeOf(t);
  95. }, _getPrototypeOf(t);
  96. }
  97. function _inherits(t, e) {
  98. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  99. t.prototype = Object.create(e && e.prototype, {
  100. constructor: {
  101. value: t,
  102. writable: !0,
  103. configurable: !0
  104. }
  105. }), Object.defineProperty(t, "prototype", {
  106. writable: !1
  107. }), e && _setPrototypeOf(t, e);
  108. }
  109. function _isNativeReflectConstruct() {
  110. try {
  111. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  112. } catch (t) {}
  113. return (_isNativeReflectConstruct = function () {
  114. return !!t;
  115. })();
  116. }
  117. function _iterableToArrayLimit(r, l) {
  118. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  119. if (null != t) {
  120. var e,
  121. n,
  122. i,
  123. u,
  124. a = [],
  125. f = !0,
  126. o = !1;
  127. try {
  128. if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
  129. } catch (r) {
  130. o = !0, n = r;
  131. } finally {
  132. try {
  133. if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
  134. } finally {
  135. if (o) throw n;
  136. }
  137. }
  138. return a;
  139. }
  140. }
  141. function _nonIterableRest() {
  142. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  143. }
  144. function _possibleConstructorReturn(t, e) {
  145. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  146. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  147. return _assertThisInitialized(t);
  148. }
  149. function _setPrototypeOf(t, e) {
  150. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  151. return t.__proto__ = e, t;
  152. }, _setPrototypeOf(t, e);
  153. }
  154. function _slicedToArray(r, e) {
  155. return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
  156. }
  157. function _superPropBase(t, o) {
  158. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  159. return t;
  160. }
  161. function _superPropGet(t, e, r, o) {
  162. var p = _get(_getPrototypeOf(t.prototype ), e, r);
  163. return function (t) {
  164. return p.apply(r, t);
  165. } ;
  166. }
  167. function _toPrimitive(t, r) {
  168. if ("object" != typeof t || !t) return t;
  169. var e = t[Symbol.toPrimitive];
  170. if (void 0 !== e) {
  171. var i = e.call(t, r);
  172. if ("object" != typeof i) return i;
  173. throw new TypeError("@@toPrimitive must return a primitive value.");
  174. }
  175. return (String )(t);
  176. }
  177. function _toPropertyKey(t) {
  178. var i = _toPrimitive(t, "string");
  179. return "symbol" == typeof i ? i : i + "";
  180. }
  181. function _unsupportedIterableToArray(r, a) {
  182. if (r) {
  183. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  184. var t = {}.toString.call(r).slice(8, -1);
  185. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  186. }
  187. }
  188. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  189. var check = function (it) {
  190. return it && it.Math === Math && it;
  191. };
  192. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  193. var globalThis_1 =
  194. // eslint-disable-next-line es/no-global-this -- safe
  195. check(typeof globalThis == 'object' && globalThis) ||
  196. check(typeof window == 'object' && window) ||
  197. // eslint-disable-next-line no-restricted-globals -- safe
  198. check(typeof self == 'object' && self) ||
  199. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  200. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  201. // eslint-disable-next-line no-new-func -- fallback
  202. (function () { return this; })() || Function('return this')();
  203. var objectGetOwnPropertyDescriptor = {};
  204. var fails$o = function (exec) {
  205. try {
  206. return !!exec();
  207. } catch (error) {
  208. return true;
  209. }
  210. };
  211. var fails$n = fails$o;
  212. // Detect IE8's incomplete defineProperty implementation
  213. var descriptors = !fails$n(function () {
  214. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  215. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  216. });
  217. var fails$m = fails$o;
  218. var functionBindNative = !fails$m(function () {
  219. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  220. var test = (function () { /* empty */ }).bind();
  221. // eslint-disable-next-line no-prototype-builtins -- safe
  222. return typeof test != 'function' || test.hasOwnProperty('prototype');
  223. });
  224. var NATIVE_BIND$3 = functionBindNative;
  225. var call$c = Function.prototype.call;
  226. var functionCall = NATIVE_BIND$3 ? call$c.bind(call$c) : function () {
  227. return call$c.apply(call$c, arguments);
  228. };
  229. var objectPropertyIsEnumerable = {};
  230. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  231. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  232. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  233. // Nashorn ~ JDK8 bug
  234. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  235. // `Object.prototype.propertyIsEnumerable` method implementation
  236. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  237. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  238. var descriptor = getOwnPropertyDescriptor$1(this, V);
  239. return !!descriptor && descriptor.enumerable;
  240. } : $propertyIsEnumerable$1;
  241. var createPropertyDescriptor$3 = function (bitmap, value) {
  242. return {
  243. enumerable: !(bitmap & 1),
  244. configurable: !(bitmap & 2),
  245. writable: !(bitmap & 4),
  246. value: value
  247. };
  248. };
  249. var NATIVE_BIND$2 = functionBindNative;
  250. var FunctionPrototype$2 = Function.prototype;
  251. var call$b = FunctionPrototype$2.call;
  252. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
  253. var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
  254. return function () {
  255. return call$b.apply(fn, arguments);
  256. };
  257. };
  258. var uncurryThis$k = functionUncurryThis;
  259. var toString$8 = uncurryThis$k({}.toString);
  260. var stringSlice$5 = uncurryThis$k(''.slice);
  261. var classofRaw$2 = function (it) {
  262. return stringSlice$5(toString$8(it), 8, -1);
  263. };
  264. var uncurryThis$j = functionUncurryThis;
  265. var fails$l = fails$o;
  266. var classof$7 = classofRaw$2;
  267. var $Object$4 = Object;
  268. var split = uncurryThis$j(''.split);
  269. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  270. var indexedObject = fails$l(function () {
  271. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  272. // eslint-disable-next-line no-prototype-builtins -- safe
  273. return !$Object$4('z').propertyIsEnumerable(0);
  274. }) ? function (it) {
  275. return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
  276. } : $Object$4;
  277. // we can't use just `it == null` since of `document.all` special case
  278. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  279. var isNullOrUndefined$4 = function (it) {
  280. return it === null || it === undefined;
  281. };
  282. var isNullOrUndefined$3 = isNullOrUndefined$4;
  283. var $TypeError$8 = TypeError;
  284. // `RequireObjectCoercible` abstract operation
  285. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  286. var requireObjectCoercible$6 = function (it) {
  287. if (isNullOrUndefined$3(it)) throw new $TypeError$8("Can't call method on " + it);
  288. return it;
  289. };
  290. // toObject with fallback for non-array-like ES3 strings
  291. var IndexedObject$3 = indexedObject;
  292. var requireObjectCoercible$5 = requireObjectCoercible$6;
  293. var toIndexedObject$6 = function (it) {
  294. return IndexedObject$3(requireObjectCoercible$5(it));
  295. };
  296. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  297. var documentAll = typeof document == 'object' && document.all;
  298. // `IsCallable` abstract operation
  299. // https://tc39.es/ecma262/#sec-iscallable
  300. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  301. var isCallable$f = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  302. return typeof argument == 'function' || argument === documentAll;
  303. } : function (argument) {
  304. return typeof argument == 'function';
  305. };
  306. var isCallable$e = isCallable$f;
  307. var isObject$8 = function (it) {
  308. return typeof it == 'object' ? it !== null : isCallable$e(it);
  309. };
  310. var globalThis$f = globalThis_1;
  311. var isCallable$d = isCallable$f;
  312. var aFunction = function (argument) {
  313. return isCallable$d(argument) ? argument : undefined;
  314. };
  315. var getBuiltIn$4 = function (namespace, method) {
  316. return arguments.length < 2 ? aFunction(globalThis$f[namespace]) : globalThis$f[namespace] && globalThis$f[namespace][method];
  317. };
  318. var uncurryThis$i = functionUncurryThis;
  319. var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
  320. var globalThis$e = globalThis_1;
  321. var navigator$1 = globalThis$e.navigator;
  322. var userAgent$1 = navigator$1 && navigator$1.userAgent;
  323. var environmentUserAgent = userAgent$1 ? String(userAgent$1) : '';
  324. var globalThis$d = globalThis_1;
  325. var userAgent = environmentUserAgent;
  326. var process = globalThis$d.process;
  327. var Deno = globalThis$d.Deno;
  328. var versions = process && process.versions || Deno && Deno.version;
  329. var v8 = versions && versions.v8;
  330. var match, version;
  331. if (v8) {
  332. match = v8.split('.');
  333. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  334. // but their correct versions are not interesting for us
  335. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  336. }
  337. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  338. // so check `userAgent` even if `.v8` exists, but 0
  339. if (!version && userAgent) {
  340. match = userAgent.match(/Edge\/(\d+)/);
  341. if (!match || match[1] >= 74) {
  342. match = userAgent.match(/Chrome\/(\d+)/);
  343. if (match) version = +match[1];
  344. }
  345. }
  346. var environmentV8Version = version;
  347. /* eslint-disable es/no-symbol -- required for testing */
  348. var V8_VERSION$2 = environmentV8Version;
  349. var fails$k = fails$o;
  350. var globalThis$c = globalThis_1;
  351. var $String$4 = globalThis$c.String;
  352. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  353. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
  354. var symbol = Symbol('symbol detection');
  355. // Chrome 38 Symbol has incorrect toString conversion
  356. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  357. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  358. // of course, fail.
  359. return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
  360. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  361. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  362. });
  363. /* eslint-disable es/no-symbol -- required for testing */
  364. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  365. var useSymbolAsUid = NATIVE_SYMBOL$1
  366. && !Symbol.sham
  367. && typeof Symbol.iterator == 'symbol';
  368. var getBuiltIn$3 = getBuiltIn$4;
  369. var isCallable$c = isCallable$f;
  370. var isPrototypeOf$1 = objectIsPrototypeOf;
  371. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  372. var $Object$3 = Object;
  373. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  374. return typeof it == 'symbol';
  375. } : function (it) {
  376. var $Symbol = getBuiltIn$3('Symbol');
  377. return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
  378. };
  379. var $String$3 = String;
  380. var tryToString$1 = function (argument) {
  381. try {
  382. return $String$3(argument);
  383. } catch (error) {
  384. return 'Object';
  385. }
  386. };
  387. var isCallable$b = isCallable$f;
  388. var tryToString = tryToString$1;
  389. var $TypeError$7 = TypeError;
  390. // `Assert: IsCallable(argument) is true`
  391. var aCallable$2 = function (argument) {
  392. if (isCallable$b(argument)) return argument;
  393. throw new $TypeError$7(tryToString(argument) + ' is not a function');
  394. };
  395. var aCallable$1 = aCallable$2;
  396. var isNullOrUndefined$2 = isNullOrUndefined$4;
  397. // `GetMethod` abstract operation
  398. // https://tc39.es/ecma262/#sec-getmethod
  399. var getMethod$3 = function (V, P) {
  400. var func = V[P];
  401. return isNullOrUndefined$2(func) ? undefined : aCallable$1(func);
  402. };
  403. var call$a = functionCall;
  404. var isCallable$a = isCallable$f;
  405. var isObject$7 = isObject$8;
  406. var $TypeError$6 = TypeError;
  407. // `OrdinaryToPrimitive` abstract operation
  408. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  409. var ordinaryToPrimitive$1 = function (input, pref) {
  410. var fn, val;
  411. if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$a(fn, input))) return val;
  412. if (isCallable$a(fn = input.valueOf) && !isObject$7(val = call$a(fn, input))) return val;
  413. if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$a(fn, input))) return val;
  414. throw new $TypeError$6("Can't convert object to primitive value");
  415. };
  416. var sharedStore = {exports: {}};
  417. var globalThis$b = globalThis_1;
  418. // eslint-disable-next-line es/no-object-defineproperty -- safe
  419. var defineProperty$3 = Object.defineProperty;
  420. var defineGlobalProperty$3 = function (key, value) {
  421. try {
  422. defineProperty$3(globalThis$b, key, { value: value, configurable: true, writable: true });
  423. } catch (error) {
  424. globalThis$b[key] = value;
  425. } return value;
  426. };
  427. var globalThis$a = globalThis_1;
  428. var defineGlobalProperty$2 = defineGlobalProperty$3;
  429. var SHARED = '__core-js_shared__';
  430. var store$3 = sharedStore.exports = globalThis$a[SHARED] || defineGlobalProperty$2(SHARED, {});
  431. (store$3.versions || (store$3.versions = [])).push({
  432. version: '3.38.1',
  433. mode: 'global',
  434. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  435. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  436. source: 'https://github.com/zloirock/core-js'
  437. });
  438. var sharedStoreExports = sharedStore.exports;
  439. var store$2 = sharedStoreExports;
  440. var shared$4 = function (key, value) {
  441. return store$2[key] || (store$2[key] = value || {});
  442. };
  443. var requireObjectCoercible$4 = requireObjectCoercible$6;
  444. var $Object$2 = Object;
  445. // `ToObject` abstract operation
  446. // https://tc39.es/ecma262/#sec-toobject
  447. var toObject$8 = function (argument) {
  448. return $Object$2(requireObjectCoercible$4(argument));
  449. };
  450. var uncurryThis$h = functionUncurryThis;
  451. var toObject$7 = toObject$8;
  452. var hasOwnProperty = uncurryThis$h({}.hasOwnProperty);
  453. // `HasOwnProperty` abstract operation
  454. // https://tc39.es/ecma262/#sec-hasownproperty
  455. // eslint-disable-next-line es/no-object-hasown -- safe
  456. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  457. return hasOwnProperty(toObject$7(it), key);
  458. };
  459. var uncurryThis$g = functionUncurryThis;
  460. var id = 0;
  461. var postfix = Math.random();
  462. var toString$7 = uncurryThis$g(1.0.toString);
  463. var uid$2 = function (key) {
  464. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
  465. };
  466. var globalThis$9 = globalThis_1;
  467. var shared$3 = shared$4;
  468. var hasOwn$8 = hasOwnProperty_1;
  469. var uid$1 = uid$2;
  470. var NATIVE_SYMBOL = symbolConstructorDetection;
  471. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  472. var Symbol$1 = globalThis$9.Symbol;
  473. var WellKnownSymbolsStore = shared$3('wks');
  474. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  475. var wellKnownSymbol$b = function (name) {
  476. if (!hasOwn$8(WellKnownSymbolsStore, name)) {
  477. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
  478. ? Symbol$1[name]
  479. : createWellKnownSymbol('Symbol.' + name);
  480. } return WellKnownSymbolsStore[name];
  481. };
  482. var call$9 = functionCall;
  483. var isObject$6 = isObject$8;
  484. var isSymbol$1 = isSymbol$2;
  485. var getMethod$2 = getMethod$3;
  486. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  487. var wellKnownSymbol$a = wellKnownSymbol$b;
  488. var $TypeError$5 = TypeError;
  489. var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
  490. // `ToPrimitive` abstract operation
  491. // https://tc39.es/ecma262/#sec-toprimitive
  492. var toPrimitive$2 = function (input, pref) {
  493. if (!isObject$6(input) || isSymbol$1(input)) return input;
  494. var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
  495. var result;
  496. if (exoticToPrim) {
  497. if (pref === undefined) pref = 'default';
  498. result = call$9(exoticToPrim, input, pref);
  499. if (!isObject$6(result) || isSymbol$1(result)) return result;
  500. throw new $TypeError$5("Can't convert object to primitive value");
  501. }
  502. if (pref === undefined) pref = 'number';
  503. return ordinaryToPrimitive(input, pref);
  504. };
  505. var toPrimitive$1 = toPrimitive$2;
  506. var isSymbol = isSymbol$2;
  507. // `ToPropertyKey` abstract operation
  508. // https://tc39.es/ecma262/#sec-topropertykey
  509. var toPropertyKey$2 = function (argument) {
  510. var key = toPrimitive$1(argument, 'string');
  511. return isSymbol(key) ? key : key + '';
  512. };
  513. var globalThis$8 = globalThis_1;
  514. var isObject$5 = isObject$8;
  515. var document$1 = globalThis$8.document;
  516. // typeof document.createElement is 'object' in old IE
  517. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  518. var documentCreateElement$2 = function (it) {
  519. return EXISTS$1 ? document$1.createElement(it) : {};
  520. };
  521. var DESCRIPTORS$a = descriptors;
  522. var fails$j = fails$o;
  523. var createElement = documentCreateElement$2;
  524. // Thanks to IE8 for its funny defineProperty
  525. var ie8DomDefine = !DESCRIPTORS$a && !fails$j(function () {
  526. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  527. return Object.defineProperty(createElement('div'), 'a', {
  528. get: function () { return 7; }
  529. }).a !== 7;
  530. });
  531. var DESCRIPTORS$9 = descriptors;
  532. var call$8 = functionCall;
  533. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  534. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  535. var toIndexedObject$5 = toIndexedObject$6;
  536. var toPropertyKey$1 = toPropertyKey$2;
  537. var hasOwn$7 = hasOwnProperty_1;
  538. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  539. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  540. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  541. // `Object.getOwnPropertyDescriptor` method
  542. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  543. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  544. O = toIndexedObject$5(O);
  545. P = toPropertyKey$1(P);
  546. if (IE8_DOM_DEFINE$1) try {
  547. return $getOwnPropertyDescriptor$1(O, P);
  548. } catch (error) { /* empty */ }
  549. if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$8(propertyIsEnumerableModule$1.f, O, P), O[P]);
  550. };
  551. var objectDefineProperty = {};
  552. var DESCRIPTORS$8 = descriptors;
  553. var fails$i = fails$o;
  554. // V8 ~ Chrome 36-
  555. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  556. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$i(function () {
  557. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  558. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  559. value: 42,
  560. writable: false
  561. }).prototype !== 42;
  562. });
  563. var isObject$4 = isObject$8;
  564. var $String$2 = String;
  565. var $TypeError$4 = TypeError;
  566. // `Assert: Type(argument) is Object`
  567. var anObject$9 = function (argument) {
  568. if (isObject$4(argument)) return argument;
  569. throw new $TypeError$4($String$2(argument) + ' is not an object');
  570. };
  571. var DESCRIPTORS$7 = descriptors;
  572. var IE8_DOM_DEFINE = ie8DomDefine;
  573. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  574. var anObject$8 = anObject$9;
  575. var toPropertyKey = toPropertyKey$2;
  576. var $TypeError$3 = TypeError;
  577. // eslint-disable-next-line es/no-object-defineproperty -- safe
  578. var $defineProperty = Object.defineProperty;
  579. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  580. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  581. var ENUMERABLE = 'enumerable';
  582. var CONFIGURABLE$1 = 'configurable';
  583. var WRITABLE = 'writable';
  584. // `Object.defineProperty` method
  585. // https://tc39.es/ecma262/#sec-object.defineproperty
  586. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  587. anObject$8(O);
  588. P = toPropertyKey(P);
  589. anObject$8(Attributes);
  590. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  591. var current = $getOwnPropertyDescriptor(O, P);
  592. if (current && current[WRITABLE]) {
  593. O[P] = Attributes.value;
  594. Attributes = {
  595. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  596. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  597. writable: false
  598. };
  599. }
  600. } return $defineProperty(O, P, Attributes);
  601. } : $defineProperty : function defineProperty(O, P, Attributes) {
  602. anObject$8(O);
  603. P = toPropertyKey(P);
  604. anObject$8(Attributes);
  605. if (IE8_DOM_DEFINE) try {
  606. return $defineProperty(O, P, Attributes);
  607. } catch (error) { /* empty */ }
  608. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
  609. if ('value' in Attributes) O[P] = Attributes.value;
  610. return O;
  611. };
  612. var DESCRIPTORS$6 = descriptors;
  613. var definePropertyModule$4 = objectDefineProperty;
  614. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  615. var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
  616. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  617. } : function (object, key, value) {
  618. object[key] = value;
  619. return object;
  620. };
  621. var makeBuiltIn$2 = {exports: {}};
  622. var DESCRIPTORS$5 = descriptors;
  623. var hasOwn$6 = hasOwnProperty_1;
  624. var FunctionPrototype$1 = Function.prototype;
  625. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  626. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  627. var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
  628. // additional protection from minified / mangled / dropped function names
  629. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  630. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  631. var functionName = {
  632. EXISTS: EXISTS,
  633. PROPER: PROPER,
  634. CONFIGURABLE: CONFIGURABLE
  635. };
  636. var uncurryThis$f = functionUncurryThis;
  637. var isCallable$9 = isCallable$f;
  638. var store$1 = sharedStoreExports;
  639. var functionToString = uncurryThis$f(Function.toString);
  640. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  641. if (!isCallable$9(store$1.inspectSource)) {
  642. store$1.inspectSource = function (it) {
  643. return functionToString(it);
  644. };
  645. }
  646. var inspectSource$2 = store$1.inspectSource;
  647. var globalThis$7 = globalThis_1;
  648. var isCallable$8 = isCallable$f;
  649. var WeakMap$1 = globalThis$7.WeakMap;
  650. var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
  651. var shared$2 = shared$4;
  652. var uid = uid$2;
  653. var keys = shared$2('keys');
  654. var sharedKey$3 = function (key) {
  655. return keys[key] || (keys[key] = uid(key));
  656. };
  657. var hiddenKeys$4 = {};
  658. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  659. var globalThis$6 = globalThis_1;
  660. var isObject$3 = isObject$8;
  661. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  662. var hasOwn$5 = hasOwnProperty_1;
  663. var shared$1 = sharedStoreExports;
  664. var sharedKey$2 = sharedKey$3;
  665. var hiddenKeys$3 = hiddenKeys$4;
  666. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  667. var TypeError$1 = globalThis$6.TypeError;
  668. var WeakMap = globalThis$6.WeakMap;
  669. var set, get, has;
  670. var enforce = function (it) {
  671. return has(it) ? get(it) : set(it, {});
  672. };
  673. var getterFor = function (TYPE) {
  674. return function (it) {
  675. var state;
  676. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  677. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  678. } return state;
  679. };
  680. };
  681. if (NATIVE_WEAK_MAP || shared$1.state) {
  682. var store = shared$1.state || (shared$1.state = new WeakMap());
  683. /* eslint-disable no-self-assign -- prototype methods protection */
  684. store.get = store.get;
  685. store.has = store.has;
  686. store.set = store.set;
  687. /* eslint-enable no-self-assign -- prototype methods protection */
  688. set = function (it, metadata) {
  689. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  690. metadata.facade = it;
  691. store.set(it, metadata);
  692. return metadata;
  693. };
  694. get = function (it) {
  695. return store.get(it) || {};
  696. };
  697. has = function (it) {
  698. return store.has(it);
  699. };
  700. } else {
  701. var STATE = sharedKey$2('state');
  702. hiddenKeys$3[STATE] = true;
  703. set = function (it, metadata) {
  704. if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  705. metadata.facade = it;
  706. createNonEnumerableProperty$3(it, STATE, metadata);
  707. return metadata;
  708. };
  709. get = function (it) {
  710. return hasOwn$5(it, STATE) ? it[STATE] : {};
  711. };
  712. has = function (it) {
  713. return hasOwn$5(it, STATE);
  714. };
  715. }
  716. var internalState = {
  717. set: set,
  718. get: get,
  719. has: has,
  720. enforce: enforce,
  721. getterFor: getterFor
  722. };
  723. var uncurryThis$e = functionUncurryThis;
  724. var fails$h = fails$o;
  725. var isCallable$7 = isCallable$f;
  726. var hasOwn$4 = hasOwnProperty_1;
  727. var DESCRIPTORS$4 = descriptors;
  728. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  729. var inspectSource$1 = inspectSource$2;
  730. var InternalStateModule = internalState;
  731. var enforceInternalState = InternalStateModule.enforce;
  732. var getInternalState$1 = InternalStateModule.get;
  733. var $String$1 = String;
  734. // eslint-disable-next-line es/no-object-defineproperty -- safe
  735. var defineProperty$2 = Object.defineProperty;
  736. var stringSlice$4 = uncurryThis$e(''.slice);
  737. var replace$2 = uncurryThis$e(''.replace);
  738. var join = uncurryThis$e([].join);
  739. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$h(function () {
  740. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  741. });
  742. var TEMPLATE = String(String).split('String');
  743. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  744. if (stringSlice$4($String$1(name), 0, 7) === 'Symbol(') {
  745. name = '[' + replace$2($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  746. }
  747. if (options && options.getter) name = 'get ' + name;
  748. if (options && options.setter) name = 'set ' + name;
  749. if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  750. if (DESCRIPTORS$4) defineProperty$2(value, 'name', { value: name, configurable: true });
  751. else value.name = name;
  752. }
  753. if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
  754. defineProperty$2(value, 'length', { value: options.arity });
  755. }
  756. try {
  757. if (options && hasOwn$4(options, 'constructor') && options.constructor) {
  758. if (DESCRIPTORS$4) defineProperty$2(value, 'prototype', { writable: false });
  759. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  760. } else if (value.prototype) value.prototype = undefined;
  761. } catch (error) { /* empty */ }
  762. var state = enforceInternalState(value);
  763. if (!hasOwn$4(state, 'source')) {
  764. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  765. } return value;
  766. };
  767. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  768. // eslint-disable-next-line no-extend-native -- required
  769. Function.prototype.toString = makeBuiltIn$1(function toString() {
  770. return isCallable$7(this) && getInternalState$1(this).source || inspectSource$1(this);
  771. }, 'toString');
  772. var makeBuiltInExports = makeBuiltIn$2.exports;
  773. var isCallable$6 = isCallable$f;
  774. var definePropertyModule$3 = objectDefineProperty;
  775. var makeBuiltIn = makeBuiltInExports;
  776. var defineGlobalProperty$1 = defineGlobalProperty$3;
  777. var defineBuiltIn$4 = function (O, key, value, options) {
  778. if (!options) options = {};
  779. var simple = options.enumerable;
  780. var name = options.name !== undefined ? options.name : key;
  781. if (isCallable$6(value)) makeBuiltIn(value, name, options);
  782. if (options.global) {
  783. if (simple) O[key] = value;
  784. else defineGlobalProperty$1(key, value);
  785. } else {
  786. try {
  787. if (!options.unsafe) delete O[key];
  788. else if (O[key]) simple = true;
  789. } catch (error) { /* empty */ }
  790. if (simple) O[key] = value;
  791. else definePropertyModule$3.f(O, key, {
  792. value: value,
  793. enumerable: false,
  794. configurable: !options.nonConfigurable,
  795. writable: !options.nonWritable
  796. });
  797. } return O;
  798. };
  799. var objectGetOwnPropertyNames = {};
  800. var ceil = Math.ceil;
  801. var floor$1 = Math.floor;
  802. // `Math.trunc` method
  803. // https://tc39.es/ecma262/#sec-math.trunc
  804. // eslint-disable-next-line es/no-math-trunc -- safe
  805. var mathTrunc = Math.trunc || function trunc(x) {
  806. var n = +x;
  807. return (n > 0 ? floor$1 : ceil)(n);
  808. };
  809. var trunc = mathTrunc;
  810. // `ToIntegerOrInfinity` abstract operation
  811. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  812. var toIntegerOrInfinity$4 = function (argument) {
  813. var number = +argument;
  814. // eslint-disable-next-line no-self-compare -- NaN check
  815. return number !== number || number === 0 ? 0 : trunc(number);
  816. };
  817. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  818. var max$1 = Math.max;
  819. var min$2 = Math.min;
  820. // Helper for a popular repeating case of the spec:
  821. // Let integer be ? ToInteger(index).
  822. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  823. var toAbsoluteIndex$1 = function (index, length) {
  824. var integer = toIntegerOrInfinity$3(index);
  825. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  826. };
  827. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  828. var min$1 = Math.min;
  829. // `ToLength` abstract operation
  830. // https://tc39.es/ecma262/#sec-tolength
  831. var toLength$2 = function (argument) {
  832. var len = toIntegerOrInfinity$2(argument);
  833. return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  834. };
  835. var toLength$1 = toLength$2;
  836. // `LengthOfArrayLike` abstract operation
  837. // https://tc39.es/ecma262/#sec-lengthofarraylike
  838. var lengthOfArrayLike$3 = function (obj) {
  839. return toLength$1(obj.length);
  840. };
  841. var toIndexedObject$4 = toIndexedObject$6;
  842. var toAbsoluteIndex = toAbsoluteIndex$1;
  843. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  844. // `Array.prototype.{ indexOf, includes }` methods implementation
  845. var createMethod$3 = function (IS_INCLUDES) {
  846. return function ($this, el, fromIndex) {
  847. var O = toIndexedObject$4($this);
  848. var length = lengthOfArrayLike$2(O);
  849. if (length === 0) return !IS_INCLUDES && -1;
  850. var index = toAbsoluteIndex(fromIndex, length);
  851. var value;
  852. // Array#includes uses SameValueZero equality algorithm
  853. // eslint-disable-next-line no-self-compare -- NaN check
  854. if (IS_INCLUDES && el !== el) while (length > index) {
  855. value = O[index++];
  856. // eslint-disable-next-line no-self-compare -- NaN check
  857. if (value !== value) return true;
  858. // Array#indexOf ignores holes, Array#includes - not
  859. } else for (;length > index; index++) {
  860. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  861. } return !IS_INCLUDES && -1;
  862. };
  863. };
  864. var arrayIncludes = {
  865. // `Array.prototype.includes` method
  866. // https://tc39.es/ecma262/#sec-array.prototype.includes
  867. includes: createMethod$3(true),
  868. // `Array.prototype.indexOf` method
  869. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  870. indexOf: createMethod$3(false)
  871. };
  872. var uncurryThis$d = functionUncurryThis;
  873. var hasOwn$3 = hasOwnProperty_1;
  874. var toIndexedObject$3 = toIndexedObject$6;
  875. var indexOf$1 = arrayIncludes.indexOf;
  876. var hiddenKeys$2 = hiddenKeys$4;
  877. var push$3 = uncurryThis$d([].push);
  878. var objectKeysInternal = function (object, names) {
  879. var O = toIndexedObject$3(object);
  880. var i = 0;
  881. var result = [];
  882. var key;
  883. for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$3(result, key);
  884. // Don't enum bug & hidden keys
  885. while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
  886. ~indexOf$1(result, key) || push$3(result, key);
  887. }
  888. return result;
  889. };
  890. // IE8- don't enum bug keys
  891. var enumBugKeys$3 = [
  892. 'constructor',
  893. 'hasOwnProperty',
  894. 'isPrototypeOf',
  895. 'propertyIsEnumerable',
  896. 'toLocaleString',
  897. 'toString',
  898. 'valueOf'
  899. ];
  900. var internalObjectKeys$1 = objectKeysInternal;
  901. var enumBugKeys$2 = enumBugKeys$3;
  902. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  903. // `Object.getOwnPropertyNames` method
  904. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  905. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  906. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  907. return internalObjectKeys$1(O, hiddenKeys$1);
  908. };
  909. var objectGetOwnPropertySymbols = {};
  910. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  911. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  912. var getBuiltIn$2 = getBuiltIn$4;
  913. var uncurryThis$c = functionUncurryThis;
  914. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  915. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  916. var anObject$7 = anObject$9;
  917. var concat$2 = uncurryThis$c([].concat);
  918. // all object keys, includes non-enumerable and symbols
  919. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  920. var keys = getOwnPropertyNamesModule.f(anObject$7(it));
  921. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  922. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  923. };
  924. var hasOwn$2 = hasOwnProperty_1;
  925. var ownKeys = ownKeys$1;
  926. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  927. var definePropertyModule$2 = objectDefineProperty;
  928. var copyConstructorProperties$1 = function (target, source, exceptions) {
  929. var keys = ownKeys(source);
  930. var defineProperty = definePropertyModule$2.f;
  931. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  932. for (var i = 0; i < keys.length; i++) {
  933. var key = keys[i];
  934. if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
  935. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  936. }
  937. }
  938. };
  939. var fails$g = fails$o;
  940. var isCallable$5 = isCallable$f;
  941. var replacement = /#|\.prototype\./;
  942. var isForced$1 = function (feature, detection) {
  943. var value = data[normalize(feature)];
  944. return value === POLYFILL ? true
  945. : value === NATIVE ? false
  946. : isCallable$5(detection) ? fails$g(detection)
  947. : !!detection;
  948. };
  949. var normalize = isForced$1.normalize = function (string) {
  950. return String(string).replace(replacement, '.').toLowerCase();
  951. };
  952. var data = isForced$1.data = {};
  953. var NATIVE = isForced$1.NATIVE = 'N';
  954. var POLYFILL = isForced$1.POLYFILL = 'P';
  955. var isForced_1 = isForced$1;
  956. var globalThis$5 = globalThis_1;
  957. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  958. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  959. var defineBuiltIn$3 = defineBuiltIn$4;
  960. var defineGlobalProperty = defineGlobalProperty$3;
  961. var copyConstructorProperties = copyConstructorProperties$1;
  962. var isForced = isForced_1;
  963. /*
  964. options.target - name of the target object
  965. options.global - target is the global object
  966. options.stat - export as static methods of target
  967. options.proto - export as prototype methods of target
  968. options.real - real prototype method for the `pure` version
  969. options.forced - export even if the native feature is available
  970. options.bind - bind methods to the target, required for the `pure` version
  971. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  972. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  973. options.sham - add a flag to not completely full polyfills
  974. options.enumerable - export as enumerable property
  975. options.dontCallGetSet - prevent calling a getter on target
  976. options.name - the .name of the function if it does not match the key
  977. */
  978. var _export = function (options, source) {
  979. var TARGET = options.target;
  980. var GLOBAL = options.global;
  981. var STATIC = options.stat;
  982. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  983. if (GLOBAL) {
  984. target = globalThis$5;
  985. } else if (STATIC) {
  986. target = globalThis$5[TARGET] || defineGlobalProperty(TARGET, {});
  987. } else {
  988. target = globalThis$5[TARGET] && globalThis$5[TARGET].prototype;
  989. }
  990. if (target) for (key in source) {
  991. sourceProperty = source[key];
  992. if (options.dontCallGetSet) {
  993. descriptor = getOwnPropertyDescriptor(target, key);
  994. targetProperty = descriptor && descriptor.value;
  995. } else targetProperty = target[key];
  996. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  997. // contained in target
  998. if (!FORCED && targetProperty !== undefined) {
  999. if (typeof sourceProperty == typeof targetProperty) continue;
  1000. copyConstructorProperties(sourceProperty, targetProperty);
  1001. }
  1002. // add a flag to not completely full polyfills
  1003. if (options.sham || (targetProperty && targetProperty.sham)) {
  1004. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  1005. }
  1006. defineBuiltIn$3(target, key, sourceProperty, options);
  1007. }
  1008. };
  1009. var classof$6 = classofRaw$2;
  1010. // `IsArray` abstract operation
  1011. // https://tc39.es/ecma262/#sec-isarray
  1012. // eslint-disable-next-line es/no-array-isarray -- safe
  1013. var isArray$2 = Array.isArray || function isArray(argument) {
  1014. return classof$6(argument) === 'Array';
  1015. };
  1016. var $TypeError$2 = TypeError;
  1017. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1018. var doesNotExceedSafeInteger$1 = function (it) {
  1019. if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
  1020. return it;
  1021. };
  1022. var DESCRIPTORS$3 = descriptors;
  1023. var definePropertyModule$1 = objectDefineProperty;
  1024. var createPropertyDescriptor = createPropertyDescriptor$3;
  1025. var createProperty$1 = function (object, key, value) {
  1026. if (DESCRIPTORS$3) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
  1027. else object[key] = value;
  1028. };
  1029. var wellKnownSymbol$9 = wellKnownSymbol$b;
  1030. var TO_STRING_TAG$1 = wellKnownSymbol$9('toStringTag');
  1031. var test = {};
  1032. test[TO_STRING_TAG$1] = 'z';
  1033. var toStringTagSupport = String(test) === '[object z]';
  1034. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1035. var isCallable$4 = isCallable$f;
  1036. var classofRaw$1 = classofRaw$2;
  1037. var wellKnownSymbol$8 = wellKnownSymbol$b;
  1038. var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
  1039. var $Object$1 = Object;
  1040. // ES3 wrong here
  1041. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  1042. // fallback for IE11 Script Access Denied error
  1043. var tryGet = function (it, key) {
  1044. try {
  1045. return it[key];
  1046. } catch (error) { /* empty */ }
  1047. };
  1048. // getting tag from ES6+ `Object.prototype.toString`
  1049. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
  1050. var O, tag, result;
  1051. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1052. // @@toStringTag case
  1053. : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  1054. // builtinTag case
  1055. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  1056. // ES3 arguments fallback
  1057. : (result = classofRaw$1(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
  1058. };
  1059. var uncurryThis$b = functionUncurryThis;
  1060. var fails$f = fails$o;
  1061. var isCallable$3 = isCallable$f;
  1062. var classof$4 = classof$5;
  1063. var getBuiltIn$1 = getBuiltIn$4;
  1064. var inspectSource = inspectSource$2;
  1065. var noop = function () { /* empty */ };
  1066. var construct = getBuiltIn$1('Reflect', 'construct');
  1067. var constructorRegExp = /^\s*(?:class|function)\b/;
  1068. var exec$1 = uncurryThis$b(constructorRegExp.exec);
  1069. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1070. var isConstructorModern = function isConstructor(argument) {
  1071. if (!isCallable$3(argument)) return false;
  1072. try {
  1073. construct(noop, [], argument);
  1074. return true;
  1075. } catch (error) {
  1076. return false;
  1077. }
  1078. };
  1079. var isConstructorLegacy = function isConstructor(argument) {
  1080. if (!isCallable$3(argument)) return false;
  1081. switch (classof$4(argument)) {
  1082. case 'AsyncFunction':
  1083. case 'GeneratorFunction':
  1084. case 'AsyncGeneratorFunction': return false;
  1085. }
  1086. try {
  1087. // we can't check .prototype since constructors produced by .bind haven't it
  1088. // `Function#toString` throws on some built-it function in some legacy engines
  1089. // (for example, `DOMQuad` and similar in FF41-)
  1090. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  1091. } catch (error) {
  1092. return true;
  1093. }
  1094. };
  1095. isConstructorLegacy.sham = true;
  1096. // `IsConstructor` abstract operation
  1097. // https://tc39.es/ecma262/#sec-isconstructor
  1098. var isConstructor$1 = !construct || fails$f(function () {
  1099. var called;
  1100. return isConstructorModern(isConstructorModern.call)
  1101. || !isConstructorModern(Object)
  1102. || !isConstructorModern(function () { called = true; })
  1103. || called;
  1104. }) ? isConstructorLegacy : isConstructorModern;
  1105. var isArray$1 = isArray$2;
  1106. var isConstructor = isConstructor$1;
  1107. var isObject$2 = isObject$8;
  1108. var wellKnownSymbol$7 = wellKnownSymbol$b;
  1109. var SPECIES$2 = wellKnownSymbol$7('species');
  1110. var $Array = Array;
  1111. // a part of `ArraySpeciesCreate` abstract operation
  1112. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1113. var arraySpeciesConstructor$1 = function (originalArray) {
  1114. var C;
  1115. if (isArray$1(originalArray)) {
  1116. C = originalArray.constructor;
  1117. // cross-realm fallback
  1118. if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined;
  1119. else if (isObject$2(C)) {
  1120. C = C[SPECIES$2];
  1121. if (C === null) C = undefined;
  1122. }
  1123. } return C === undefined ? $Array : C;
  1124. };
  1125. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1126. // `ArraySpeciesCreate` abstract operation
  1127. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1128. var arraySpeciesCreate$2 = function (originalArray, length) {
  1129. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1130. };
  1131. var fails$e = fails$o;
  1132. var wellKnownSymbol$6 = wellKnownSymbol$b;
  1133. var V8_VERSION$1 = environmentV8Version;
  1134. var SPECIES$1 = wellKnownSymbol$6('species');
  1135. var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
  1136. // We can't use this feature detection in V8 since it causes
  1137. // deoptimization and serious performance degradation
  1138. // https://github.com/zloirock/core-js/issues/677
  1139. return V8_VERSION$1 >= 51 || !fails$e(function () {
  1140. var array = [];
  1141. var constructor = array.constructor = {};
  1142. constructor[SPECIES$1] = function () {
  1143. return { foo: 1 };
  1144. };
  1145. return array[METHOD_NAME](Boolean).foo !== 1;
  1146. });
  1147. };
  1148. var $$b = _export;
  1149. var fails$d = fails$o;
  1150. var isArray = isArray$2;
  1151. var isObject$1 = isObject$8;
  1152. var toObject$6 = toObject$8;
  1153. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1154. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1155. var createProperty = createProperty$1;
  1156. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1157. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
  1158. var wellKnownSymbol$5 = wellKnownSymbol$b;
  1159. var V8_VERSION = environmentV8Version;
  1160. var IS_CONCAT_SPREADABLE = wellKnownSymbol$5('isConcatSpreadable');
  1161. // We can't use this feature detection in V8 since it causes
  1162. // deoptimization and serious performance degradation
  1163. // https://github.com/zloirock/core-js/issues/679
  1164. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$d(function () {
  1165. var array = [];
  1166. array[IS_CONCAT_SPREADABLE] = false;
  1167. return array.concat()[0] !== array;
  1168. });
  1169. var isConcatSpreadable = function (O) {
  1170. if (!isObject$1(O)) return false;
  1171. var spreadable = O[IS_CONCAT_SPREADABLE];
  1172. return spreadable !== undefined ? !!spreadable : isArray(O);
  1173. };
  1174. var FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$2('concat');
  1175. // `Array.prototype.concat` method
  1176. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1177. // with adding support of @@isConcatSpreadable and @@species
  1178. $$b({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
  1179. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1180. concat: function concat(arg) {
  1181. var O = toObject$6(this);
  1182. var A = arraySpeciesCreate$1(O, 0);
  1183. var n = 0;
  1184. var i, k, length, len, E;
  1185. for (i = -1, length = arguments.length; i < length; i++) {
  1186. E = i === -1 ? O : arguments[i];
  1187. if (isConcatSpreadable(E)) {
  1188. len = lengthOfArrayLike$1(E);
  1189. doesNotExceedSafeInteger(n + len);
  1190. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1191. } else {
  1192. doesNotExceedSafeInteger(n + 1);
  1193. createProperty(A, n++, E);
  1194. }
  1195. }
  1196. A.length = n;
  1197. return A;
  1198. }
  1199. });
  1200. var classofRaw = classofRaw$2;
  1201. var uncurryThis$a = functionUncurryThis;
  1202. var functionUncurryThisClause = function (fn) {
  1203. // Nashorn bug:
  1204. // https://github.com/zloirock/core-js/issues/1128
  1205. // https://github.com/zloirock/core-js/issues/1130
  1206. if (classofRaw(fn) === 'Function') return uncurryThis$a(fn);
  1207. };
  1208. var uncurryThis$9 = functionUncurryThisClause;
  1209. var aCallable = aCallable$2;
  1210. var NATIVE_BIND$1 = functionBindNative;
  1211. var bind$1 = uncurryThis$9(uncurryThis$9.bind);
  1212. // optional / simple context binding
  1213. var functionBindContext = function (fn, that) {
  1214. aCallable(fn);
  1215. return that === undefined ? fn : NATIVE_BIND$1 ? bind$1(fn, that) : function (/* ...args */) {
  1216. return fn.apply(that, arguments);
  1217. };
  1218. };
  1219. var bind = functionBindContext;
  1220. var uncurryThis$8 = functionUncurryThis;
  1221. var IndexedObject$2 = indexedObject;
  1222. var toObject$5 = toObject$8;
  1223. var lengthOfArrayLike = lengthOfArrayLike$3;
  1224. var arraySpeciesCreate = arraySpeciesCreate$2;
  1225. var push$2 = uncurryThis$8([].push);
  1226. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1227. var createMethod$2 = function (TYPE) {
  1228. var IS_MAP = TYPE === 1;
  1229. var IS_FILTER = TYPE === 2;
  1230. var IS_SOME = TYPE === 3;
  1231. var IS_EVERY = TYPE === 4;
  1232. var IS_FIND_INDEX = TYPE === 6;
  1233. var IS_FILTER_REJECT = TYPE === 7;
  1234. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1235. return function ($this, callbackfn, that, specificCreate) {
  1236. var O = toObject$5($this);
  1237. var self = IndexedObject$2(O);
  1238. var length = lengthOfArrayLike(self);
  1239. var boundFunction = bind(callbackfn, that);
  1240. var index = 0;
  1241. var create = specificCreate || arraySpeciesCreate;
  1242. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1243. var value, result;
  1244. for (;length > index; index++) if (NO_HOLES || index in self) {
  1245. value = self[index];
  1246. result = boundFunction(value, index, O);
  1247. if (TYPE) {
  1248. if (IS_MAP) target[index] = result; // map
  1249. else if (result) switch (TYPE) {
  1250. case 3: return true; // some
  1251. case 5: return value; // find
  1252. case 6: return index; // findIndex
  1253. case 2: push$2(target, value); // filter
  1254. } else switch (TYPE) {
  1255. case 4: return false; // every
  1256. case 7: push$2(target, value); // filterReject
  1257. }
  1258. }
  1259. }
  1260. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1261. };
  1262. };
  1263. var arrayIteration = {
  1264. // `Array.prototype.forEach` method
  1265. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1266. forEach: createMethod$2(0),
  1267. // `Array.prototype.map` method
  1268. // https://tc39.es/ecma262/#sec-array.prototype.map
  1269. map: createMethod$2(1),
  1270. // `Array.prototype.filter` method
  1271. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1272. filter: createMethod$2(2),
  1273. // `Array.prototype.some` method
  1274. // https://tc39.es/ecma262/#sec-array.prototype.some
  1275. some: createMethod$2(3),
  1276. // `Array.prototype.every` method
  1277. // https://tc39.es/ecma262/#sec-array.prototype.every
  1278. every: createMethod$2(4),
  1279. // `Array.prototype.find` method
  1280. // https://tc39.es/ecma262/#sec-array.prototype.find
  1281. find: createMethod$2(5),
  1282. // `Array.prototype.findIndex` method
  1283. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1284. findIndex: createMethod$2(6),
  1285. // `Array.prototype.filterReject` method
  1286. // https://github.com/tc39/proposal-array-filtering
  1287. filterReject: createMethod$2(7)
  1288. };
  1289. var $$a = _export;
  1290. var $filter = arrayIteration.filter;
  1291. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
  1292. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('filter');
  1293. // `Array.prototype.filter` method
  1294. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1295. // with adding support of @@species
  1296. $$a({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1297. filter: function filter(callbackfn /* , thisArg */) {
  1298. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1299. }
  1300. });
  1301. var objectDefineProperties = {};
  1302. var internalObjectKeys = objectKeysInternal;
  1303. var enumBugKeys$1 = enumBugKeys$3;
  1304. // `Object.keys` method
  1305. // https://tc39.es/ecma262/#sec-object.keys
  1306. // eslint-disable-next-line es/no-object-keys -- safe
  1307. var objectKeys$3 = Object.keys || function keys(O) {
  1308. return internalObjectKeys(O, enumBugKeys$1);
  1309. };
  1310. var DESCRIPTORS$2 = descriptors;
  1311. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1312. var definePropertyModule = objectDefineProperty;
  1313. var anObject$6 = anObject$9;
  1314. var toIndexedObject$2 = toIndexedObject$6;
  1315. var objectKeys$2 = objectKeys$3;
  1316. // `Object.defineProperties` method
  1317. // https://tc39.es/ecma262/#sec-object.defineproperties
  1318. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1319. objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1320. anObject$6(O);
  1321. var props = toIndexedObject$2(Properties);
  1322. var keys = objectKeys$2(Properties);
  1323. var length = keys.length;
  1324. var index = 0;
  1325. var key;
  1326. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1327. return O;
  1328. };
  1329. var getBuiltIn = getBuiltIn$4;
  1330. var html$1 = getBuiltIn('document', 'documentElement');
  1331. /* global ActiveXObject -- old IE, WSH */
  1332. var anObject$5 = anObject$9;
  1333. var definePropertiesModule = objectDefineProperties;
  1334. var enumBugKeys = enumBugKeys$3;
  1335. var hiddenKeys = hiddenKeys$4;
  1336. var html = html$1;
  1337. var documentCreateElement$1 = documentCreateElement$2;
  1338. var sharedKey$1 = sharedKey$3;
  1339. var GT = '>';
  1340. var LT = '<';
  1341. var PROTOTYPE = 'prototype';
  1342. var SCRIPT = 'script';
  1343. var IE_PROTO$1 = sharedKey$1('IE_PROTO');
  1344. var EmptyConstructor = function () { /* empty */ };
  1345. var scriptTag = function (content) {
  1346. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1347. };
  1348. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1349. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1350. activeXDocument.write(scriptTag(''));
  1351. activeXDocument.close();
  1352. var temp = activeXDocument.parentWindow.Object;
  1353. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  1354. activeXDocument = null;
  1355. return temp;
  1356. };
  1357. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1358. var NullProtoObjectViaIFrame = function () {
  1359. // Thrash, waste and sodomy: IE GC bug
  1360. var iframe = documentCreateElement$1('iframe');
  1361. var JS = 'java' + SCRIPT + ':';
  1362. var iframeDocument;
  1363. iframe.style.display = 'none';
  1364. html.appendChild(iframe);
  1365. // https://github.com/zloirock/core-js/issues/475
  1366. iframe.src = String(JS);
  1367. iframeDocument = iframe.contentWindow.document;
  1368. iframeDocument.open();
  1369. iframeDocument.write(scriptTag('document.F=Object'));
  1370. iframeDocument.close();
  1371. return iframeDocument.F;
  1372. };
  1373. // Check for document.domain and active x support
  1374. // No need to use active x approach when document.domain is not set
  1375. // see https://github.com/es-shims/es5-shim/issues/150
  1376. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1377. // avoid IE GC bug
  1378. var activeXDocument;
  1379. var NullProtoObject = function () {
  1380. try {
  1381. activeXDocument = new ActiveXObject('htmlfile');
  1382. } catch (error) { /* ignore */ }
  1383. NullProtoObject = typeof document != 'undefined'
  1384. ? document.domain && activeXDocument
  1385. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1386. : NullProtoObjectViaIFrame()
  1387. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1388. var length = enumBugKeys.length;
  1389. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1390. return NullProtoObject();
  1391. };
  1392. hiddenKeys[IE_PROTO$1] = true;
  1393. // `Object.create` method
  1394. // https://tc39.es/ecma262/#sec-object.create
  1395. // eslint-disable-next-line es/no-object-create -- safe
  1396. var objectCreate = Object.create || function create(O, Properties) {
  1397. var result;
  1398. if (O !== null) {
  1399. EmptyConstructor[PROTOTYPE] = anObject$5(O);
  1400. result = new EmptyConstructor();
  1401. EmptyConstructor[PROTOTYPE] = null;
  1402. // add "__proto__" for Object.getPrototypeOf polyfill
  1403. result[IE_PROTO$1] = O;
  1404. } else result = NullProtoObject();
  1405. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1406. };
  1407. var wellKnownSymbol$4 = wellKnownSymbol$b;
  1408. var create$1 = objectCreate;
  1409. var defineProperty$1 = objectDefineProperty.f;
  1410. var UNSCOPABLES = wellKnownSymbol$4('unscopables');
  1411. var ArrayPrototype = Array.prototype;
  1412. // Array.prototype[@@unscopables]
  1413. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1414. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1415. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1416. configurable: true,
  1417. value: create$1(null)
  1418. });
  1419. }
  1420. // add a key to Array.prototype[@@unscopables]
  1421. var addToUnscopables$2 = function (key) {
  1422. ArrayPrototype[UNSCOPABLES][key] = true;
  1423. };
  1424. var $$9 = _export;
  1425. var $find = arrayIteration.find;
  1426. var addToUnscopables$1 = addToUnscopables$2;
  1427. var FIND = 'find';
  1428. var SKIPS_HOLES = true;
  1429. // Shouldn't skip holes
  1430. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1431. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1432. // `Array.prototype.find` method
  1433. // https://tc39.es/ecma262/#sec-array.prototype.find
  1434. $$9({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1435. find: function find(callbackfn /* , that = undefined */) {
  1436. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1437. }
  1438. });
  1439. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1440. addToUnscopables$1(FIND);
  1441. var $$8 = _export;
  1442. var $includes = arrayIncludes.includes;
  1443. var fails$c = fails$o;
  1444. var addToUnscopables = addToUnscopables$2;
  1445. // FF99+ bug
  1446. var BROKEN_ON_SPARSE = fails$c(function () {
  1447. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1448. return !Array(1).includes();
  1449. });
  1450. // `Array.prototype.includes` method
  1451. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1452. $$8({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1453. includes: function includes(el /* , fromIndex = 0 */) {
  1454. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1455. }
  1456. });
  1457. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1458. addToUnscopables('includes');
  1459. var fails$b = fails$o;
  1460. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1461. var method = [][METHOD_NAME];
  1462. return !!method && fails$b(function () {
  1463. // eslint-disable-next-line no-useless-call -- required for testing
  1464. method.call(null, argument || function () { return 1; }, 1);
  1465. });
  1466. };
  1467. var $$7 = _export;
  1468. var uncurryThis$7 = functionUncurryThis;
  1469. var IndexedObject$1 = indexedObject;
  1470. var toIndexedObject$1 = toIndexedObject$6;
  1471. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1472. var nativeJoin = uncurryThis$7([].join);
  1473. var ES3_STRINGS = IndexedObject$1 !== Object;
  1474. var FORCED$1 = ES3_STRINGS || !arrayMethodIsStrict$1('join', ',');
  1475. // `Array.prototype.join` method
  1476. // https://tc39.es/ecma262/#sec-array.prototype.join
  1477. $$7({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1478. join: function join(separator) {
  1479. return nativeJoin(toIndexedObject$1(this), separator === undefined ? ',' : separator);
  1480. }
  1481. });
  1482. var $$6 = _export;
  1483. var $map = arrayIteration.map;
  1484. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
  1485. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  1486. // `Array.prototype.map` method
  1487. // https://tc39.es/ecma262/#sec-array.prototype.map
  1488. // with adding support of @@species
  1489. $$6({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1490. map: function map(callbackfn /* , thisArg */) {
  1491. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1492. }
  1493. });
  1494. var $$5 = _export;
  1495. var fails$a = fails$o;
  1496. var toObject$4 = toObject$8;
  1497. var toPrimitive = toPrimitive$2;
  1498. var FORCED = fails$a(function () {
  1499. return new Date(NaN).toJSON() !== null
  1500. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  1501. });
  1502. // `Date.prototype.toJSON` method
  1503. // https://tc39.es/ecma262/#sec-date.prototype.tojson
  1504. $$5({ target: 'Date', proto: true, arity: 1, forced: FORCED }, {
  1505. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1506. toJSON: function toJSON(key) {
  1507. var O = toObject$4(this);
  1508. var pv = toPrimitive(O, 'number');
  1509. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  1510. }
  1511. });
  1512. var DESCRIPTORS$1 = descriptors;
  1513. var uncurryThis$6 = functionUncurryThis;
  1514. var call$7 = functionCall;
  1515. var fails$9 = fails$o;
  1516. var objectKeys$1 = objectKeys$3;
  1517. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1518. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1519. var toObject$3 = toObject$8;
  1520. var IndexedObject = indexedObject;
  1521. // eslint-disable-next-line es/no-object-assign -- safe
  1522. var $assign = Object.assign;
  1523. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1524. var defineProperty = Object.defineProperty;
  1525. var concat$1 = uncurryThis$6([].concat);
  1526. // `Object.assign` method
  1527. // https://tc39.es/ecma262/#sec-object.assign
  1528. var objectAssign = !$assign || fails$9(function () {
  1529. // should have correct order of operations (Edge bug)
  1530. if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1531. enumerable: true,
  1532. get: function () {
  1533. defineProperty(this, 'b', {
  1534. value: 3,
  1535. enumerable: false
  1536. });
  1537. }
  1538. }), { b: 2 })).b !== 1) return true;
  1539. // should work with symbols and should have deterministic property order (V8 bug)
  1540. var A = {};
  1541. var B = {};
  1542. // eslint-disable-next-line es/no-symbol -- safe
  1543. var symbol = Symbol('assign detection');
  1544. var alphabet = 'abcdefghijklmnopqrst';
  1545. A[symbol] = 7;
  1546. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1547. return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
  1548. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1549. var T = toObject$3(target);
  1550. var argumentsLength = arguments.length;
  1551. var index = 1;
  1552. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1553. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1554. while (argumentsLength > index) {
  1555. var S = IndexedObject(arguments[index++]);
  1556. var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
  1557. var length = keys.length;
  1558. var j = 0;
  1559. var key;
  1560. while (length > j) {
  1561. key = keys[j++];
  1562. if (!DESCRIPTORS$1 || call$7(propertyIsEnumerable, S, key)) T[key] = S[key];
  1563. }
  1564. } return T;
  1565. } : $assign;
  1566. var $$4 = _export;
  1567. var assign = objectAssign;
  1568. // `Object.assign` method
  1569. // https://tc39.es/ecma262/#sec-object.assign
  1570. // eslint-disable-next-line es/no-object-assign -- required for testing
  1571. $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1572. assign: assign
  1573. });
  1574. var fails$8 = fails$o;
  1575. var correctPrototypeGetter = !fails$8(function () {
  1576. function F() { /* empty */ }
  1577. F.prototype.constructor = null;
  1578. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  1579. return Object.getPrototypeOf(new F()) !== F.prototype;
  1580. });
  1581. var hasOwn$1 = hasOwnProperty_1;
  1582. var isCallable$2 = isCallable$f;
  1583. var toObject$2 = toObject$8;
  1584. var sharedKey = sharedKey$3;
  1585. var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
  1586. var IE_PROTO = sharedKey('IE_PROTO');
  1587. var $Object = Object;
  1588. var ObjectPrototype = $Object.prototype;
  1589. // `Object.getPrototypeOf` method
  1590. // https://tc39.es/ecma262/#sec-object.getprototypeof
  1591. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  1592. var objectGetPrototypeOf$1 = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  1593. var object = toObject$2(O);
  1594. if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
  1595. var constructor = object.constructor;
  1596. if (isCallable$2(constructor) && object instanceof constructor) {
  1597. return constructor.prototype;
  1598. } return object instanceof $Object ? ObjectPrototype : null;
  1599. };
  1600. var DESCRIPTORS = descriptors;
  1601. var fails$7 = fails$o;
  1602. var uncurryThis$5 = functionUncurryThis;
  1603. var objectGetPrototypeOf = objectGetPrototypeOf$1;
  1604. var objectKeys = objectKeys$3;
  1605. var toIndexedObject = toIndexedObject$6;
  1606. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1607. var propertyIsEnumerable = uncurryThis$5($propertyIsEnumerable);
  1608. var push$1 = uncurryThis$5([].push);
  1609. // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
  1610. // of `null` prototype objects
  1611. var IE_BUG = DESCRIPTORS && fails$7(function () {
  1612. // eslint-disable-next-line es/no-object-create -- safe
  1613. var O = Object.create(null);
  1614. O[2] = 2;
  1615. return !propertyIsEnumerable(O, 2);
  1616. });
  1617. // `Object.{ entries, values }` methods implementation
  1618. var createMethod$1 = function (TO_ENTRIES) {
  1619. return function (it) {
  1620. var O = toIndexedObject(it);
  1621. var keys = objectKeys(O);
  1622. var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
  1623. var length = keys.length;
  1624. var i = 0;
  1625. var result = [];
  1626. var key;
  1627. while (length > i) {
  1628. key = keys[i++];
  1629. if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
  1630. push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1631. }
  1632. }
  1633. return result;
  1634. };
  1635. };
  1636. var objectToArray = {
  1637. // `Object.entries` method
  1638. // https://tc39.es/ecma262/#sec-object.entries
  1639. entries: createMethod$1(true),
  1640. // `Object.values` method
  1641. // https://tc39.es/ecma262/#sec-object.values
  1642. values: createMethod$1(false)
  1643. };
  1644. var $$3 = _export;
  1645. var $entries = objectToArray.entries;
  1646. // `Object.entries` method
  1647. // https://tc39.es/ecma262/#sec-object.entries
  1648. $$3({ target: 'Object', stat: true }, {
  1649. entries: function entries(O) {
  1650. return $entries(O);
  1651. }
  1652. });
  1653. var $$2 = _export;
  1654. var toObject$1 = toObject$8;
  1655. var nativeKeys = objectKeys$3;
  1656. var fails$6 = fails$o;
  1657. var FAILS_ON_PRIMITIVES = fails$6(function () { nativeKeys(1); });
  1658. // `Object.keys` method
  1659. // https://tc39.es/ecma262/#sec-object.keys
  1660. $$2({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1661. keys: function keys(it) {
  1662. return nativeKeys(toObject$1(it));
  1663. }
  1664. });
  1665. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1666. var classof$3 = classof$5;
  1667. // `Object.prototype.toString` method implementation
  1668. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1669. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1670. return '[object ' + classof$3(this) + ']';
  1671. };
  1672. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1673. var defineBuiltIn$2 = defineBuiltIn$4;
  1674. var toString$6 = objectToString;
  1675. // `Object.prototype.toString` method
  1676. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1677. if (!TO_STRING_TAG_SUPPORT) {
  1678. defineBuiltIn$2(Object.prototype, 'toString', toString$6, { unsafe: true });
  1679. }
  1680. var classof$2 = classof$5;
  1681. var $String = String;
  1682. var toString$5 = function (argument) {
  1683. if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1684. return $String(argument);
  1685. };
  1686. var anObject$4 = anObject$9;
  1687. // `RegExp.prototype.flags` getter implementation
  1688. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1689. var regexpFlags$1 = function () {
  1690. var that = anObject$4(this);
  1691. var result = '';
  1692. if (that.hasIndices) result += 'd';
  1693. if (that.global) result += 'g';
  1694. if (that.ignoreCase) result += 'i';
  1695. if (that.multiline) result += 'm';
  1696. if (that.dotAll) result += 's';
  1697. if (that.unicode) result += 'u';
  1698. if (that.unicodeSets) result += 'v';
  1699. if (that.sticky) result += 'y';
  1700. return result;
  1701. };
  1702. var fails$5 = fails$o;
  1703. var globalThis$4 = globalThis_1;
  1704. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1705. var $RegExp$2 = globalThis$4.RegExp;
  1706. var UNSUPPORTED_Y$1 = fails$5(function () {
  1707. var re = $RegExp$2('a', 'y');
  1708. re.lastIndex = 2;
  1709. return re.exec('abcd') !== null;
  1710. });
  1711. // UC Browser bug
  1712. // https://github.com/zloirock/core-js/issues/1008
  1713. var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
  1714. return !$RegExp$2('a', 'y').sticky;
  1715. });
  1716. var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
  1717. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1718. var re = $RegExp$2('^r', 'gy');
  1719. re.lastIndex = 2;
  1720. return re.exec('str') !== null;
  1721. });
  1722. var regexpStickyHelpers = {
  1723. BROKEN_CARET: BROKEN_CARET,
  1724. MISSED_STICKY: MISSED_STICKY,
  1725. UNSUPPORTED_Y: UNSUPPORTED_Y$1
  1726. };
  1727. var fails$4 = fails$o;
  1728. var globalThis$3 = globalThis_1;
  1729. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1730. var $RegExp$1 = globalThis$3.RegExp;
  1731. var regexpUnsupportedDotAll = fails$4(function () {
  1732. var re = $RegExp$1('.', 's');
  1733. return !(re.dotAll && re.test('\n') && re.flags === 's');
  1734. });
  1735. var fails$3 = fails$o;
  1736. var globalThis$2 = globalThis_1;
  1737. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1738. var $RegExp = globalThis$2.RegExp;
  1739. var regexpUnsupportedNcg = fails$3(function () {
  1740. var re = $RegExp('(?<a>b)', 'g');
  1741. return re.exec('b').groups.a !== 'b' ||
  1742. 'b'.replace(re, '$<a>c') !== 'bc';
  1743. });
  1744. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1745. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1746. var call$6 = functionCall;
  1747. var uncurryThis$4 = functionUncurryThis;
  1748. var toString$4 = toString$5;
  1749. var regexpFlags = regexpFlags$1;
  1750. var stickyHelpers = regexpStickyHelpers;
  1751. var shared = shared$4;
  1752. var create = objectCreate;
  1753. var getInternalState = internalState.get;
  1754. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1755. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1756. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1757. var nativeExec = RegExp.prototype.exec;
  1758. var patchedExec = nativeExec;
  1759. var charAt$3 = uncurryThis$4(''.charAt);
  1760. var indexOf = uncurryThis$4(''.indexOf);
  1761. var replace$1 = uncurryThis$4(''.replace);
  1762. var stringSlice$3 = uncurryThis$4(''.slice);
  1763. var UPDATES_LAST_INDEX_WRONG = (function () {
  1764. var re1 = /a/;
  1765. var re2 = /b*/g;
  1766. call$6(nativeExec, re1, 'a');
  1767. call$6(nativeExec, re2, 'a');
  1768. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1769. })();
  1770. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  1771. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1772. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1773. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1774. if (PATCH) {
  1775. patchedExec = function exec(string) {
  1776. var re = this;
  1777. var state = getInternalState(re);
  1778. var str = toString$4(string);
  1779. var raw = state.raw;
  1780. var result, reCopy, lastIndex, match, i, object, group;
  1781. if (raw) {
  1782. raw.lastIndex = re.lastIndex;
  1783. result = call$6(patchedExec, raw, str);
  1784. re.lastIndex = raw.lastIndex;
  1785. return result;
  1786. }
  1787. var groups = state.groups;
  1788. var sticky = UNSUPPORTED_Y && re.sticky;
  1789. var flags = call$6(regexpFlags, re);
  1790. var source = re.source;
  1791. var charsAdded = 0;
  1792. var strCopy = str;
  1793. if (sticky) {
  1794. flags = replace$1(flags, 'y', '');
  1795. if (indexOf(flags, 'g') === -1) {
  1796. flags += 'g';
  1797. }
  1798. strCopy = stringSlice$3(str, re.lastIndex);
  1799. // Support anchored sticky behavior.
  1800. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1801. source = '(?: ' + source + ')';
  1802. strCopy = ' ' + strCopy;
  1803. charsAdded++;
  1804. }
  1805. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1806. // simulate the 'y' flag.
  1807. reCopy = new RegExp('^(?:' + source + ')', flags);
  1808. }
  1809. if (NPCG_INCLUDED) {
  1810. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1811. }
  1812. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1813. match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
  1814. if (sticky) {
  1815. if (match) {
  1816. match.input = stringSlice$3(match.input, charsAdded);
  1817. match[0] = stringSlice$3(match[0], charsAdded);
  1818. match.index = re.lastIndex;
  1819. re.lastIndex += match[0].length;
  1820. } else re.lastIndex = 0;
  1821. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1822. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1823. }
  1824. if (NPCG_INCLUDED && match && match.length > 1) {
  1825. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1826. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1827. call$6(nativeReplace, match[0], reCopy, function () {
  1828. for (i = 1; i < arguments.length - 2; i++) {
  1829. if (arguments[i] === undefined) match[i] = undefined;
  1830. }
  1831. });
  1832. }
  1833. if (match && groups) {
  1834. match.groups = object = create(null);
  1835. for (i = 0; i < groups.length; i++) {
  1836. group = groups[i];
  1837. object[group[0]] = match[group[1]];
  1838. }
  1839. }
  1840. return match;
  1841. };
  1842. }
  1843. var regexpExec$2 = patchedExec;
  1844. var $$1 = _export;
  1845. var exec = regexpExec$2;
  1846. // `RegExp.prototype.exec` method
  1847. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1848. $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  1849. exec: exec
  1850. });
  1851. var call$5 = functionCall;
  1852. var hasOwn = hasOwnProperty_1;
  1853. var isPrototypeOf = objectIsPrototypeOf;
  1854. var regExpFlags = regexpFlags$1;
  1855. var RegExpPrototype$2 = RegExp.prototype;
  1856. var regexpGetFlags = function (R) {
  1857. var flags = R.flags;
  1858. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
  1859. ? call$5(regExpFlags, R) : flags;
  1860. };
  1861. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1862. var defineBuiltIn$1 = defineBuiltIn$4;
  1863. var anObject$3 = anObject$9;
  1864. var $toString = toString$5;
  1865. var fails$2 = fails$o;
  1866. var getRegExpFlags = regexpGetFlags;
  1867. var TO_STRING = 'toString';
  1868. var RegExpPrototype$1 = RegExp.prototype;
  1869. var nativeToString = RegExpPrototype$1[TO_STRING];
  1870. var NOT_GENERIC = fails$2(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  1871. // FF44- RegExp#toString has a wrong name
  1872. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  1873. // `RegExp.prototype.toString` method
  1874. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1875. if (NOT_GENERIC || INCORRECT_NAME) {
  1876. defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
  1877. var R = anObject$3(this);
  1878. var pattern = $toString(R.source);
  1879. var flags = $toString(getRegExpFlags(R));
  1880. return '/' + pattern + '/' + flags;
  1881. }, { unsafe: true });
  1882. }
  1883. var isObject = isObject$8;
  1884. var classof$1 = classofRaw$2;
  1885. var wellKnownSymbol$3 = wellKnownSymbol$b;
  1886. var MATCH$1 = wellKnownSymbol$3('match');
  1887. // `IsRegExp` abstract operation
  1888. // https://tc39.es/ecma262/#sec-isregexp
  1889. var isRegexp = function (it) {
  1890. var isRegExp;
  1891. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
  1892. };
  1893. var isRegExp = isRegexp;
  1894. var $TypeError$1 = TypeError;
  1895. var notARegexp = function (it) {
  1896. if (isRegExp(it)) {
  1897. throw new $TypeError$1("The method doesn't accept regular expressions");
  1898. } return it;
  1899. };
  1900. var wellKnownSymbol$2 = wellKnownSymbol$b;
  1901. var MATCH = wellKnownSymbol$2('match');
  1902. var correctIsRegexpLogic = function (METHOD_NAME) {
  1903. var regexp = /./;
  1904. try {
  1905. '/./'[METHOD_NAME](regexp);
  1906. } catch (error1) {
  1907. try {
  1908. regexp[MATCH] = false;
  1909. return '/./'[METHOD_NAME](regexp);
  1910. } catch (error2) { /* empty */ }
  1911. } return false;
  1912. };
  1913. var $ = _export;
  1914. var uncurryThis$3 = functionUncurryThis;
  1915. var notARegExp = notARegexp;
  1916. var requireObjectCoercible$3 = requireObjectCoercible$6;
  1917. var toString$3 = toString$5;
  1918. var correctIsRegExpLogic = correctIsRegexpLogic;
  1919. var stringIndexOf$1 = uncurryThis$3(''.indexOf);
  1920. // `String.prototype.includes` method
  1921. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1922. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1923. includes: function includes(searchString /* , position = 0 */) {
  1924. return !!~stringIndexOf$1(
  1925. toString$3(requireObjectCoercible$3(this)),
  1926. toString$3(notARegExp(searchString)),
  1927. arguments.length > 1 ? arguments[1] : undefined
  1928. );
  1929. }
  1930. });
  1931. var NATIVE_BIND = functionBindNative;
  1932. var FunctionPrototype = Function.prototype;
  1933. var apply$1 = FunctionPrototype.apply;
  1934. var call$4 = FunctionPrototype.call;
  1935. // eslint-disable-next-line es/no-reflect -- safe
  1936. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$1) : function () {
  1937. return call$4.apply(apply$1, arguments);
  1938. });
  1939. // TODO: Remove from `core-js@4` since it's moved to entry points
  1940. var call$3 = functionCall;
  1941. var defineBuiltIn = defineBuiltIn$4;
  1942. var regexpExec$1 = regexpExec$2;
  1943. var fails$1 = fails$o;
  1944. var wellKnownSymbol$1 = wellKnownSymbol$b;
  1945. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  1946. var SPECIES = wellKnownSymbol$1('species');
  1947. var RegExpPrototype = RegExp.prototype;
  1948. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1949. var SYMBOL = wellKnownSymbol$1(KEY);
  1950. var DELEGATES_TO_SYMBOL = !fails$1(function () {
  1951. // String methods call symbol-named RegExp methods
  1952. var O = {};
  1953. O[SYMBOL] = function () { return 7; };
  1954. return ''[KEY](O) !== 7;
  1955. });
  1956. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
  1957. // Symbol-named RegExp methods call .exec
  1958. var execCalled = false;
  1959. var re = /a/;
  1960. if (KEY === 'split') {
  1961. // We can't use real regex here since it causes deoptimization
  1962. // and serious performance degradation in V8
  1963. // https://github.com/zloirock/core-js/issues/306
  1964. re = {};
  1965. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1966. // a new one. We need to return the patched regex when creating the new one.
  1967. re.constructor = {};
  1968. re.constructor[SPECIES] = function () { return re; };
  1969. re.flags = '';
  1970. re[SYMBOL] = /./[SYMBOL];
  1971. }
  1972. re.exec = function () {
  1973. execCalled = true;
  1974. return null;
  1975. };
  1976. re[SYMBOL]('');
  1977. return !execCalled;
  1978. });
  1979. if (
  1980. !DELEGATES_TO_SYMBOL ||
  1981. !DELEGATES_TO_EXEC ||
  1982. FORCED
  1983. ) {
  1984. var nativeRegExpMethod = /./[SYMBOL];
  1985. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1986. var $exec = regexp.exec;
  1987. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  1988. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1989. // The native String method already delegates to @@method (this
  1990. // polyfilled function), leasing to infinite recursion.
  1991. // We avoid it by directly calling the native @@method method.
  1992. return { done: true, value: call$3(nativeRegExpMethod, regexp, str, arg2) };
  1993. }
  1994. return { done: true, value: call$3(nativeMethod, str, regexp, arg2) };
  1995. }
  1996. return { done: false };
  1997. });
  1998. defineBuiltIn(String.prototype, KEY, methods[0]);
  1999. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  2000. }
  2001. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
  2002. };
  2003. var uncurryThis$2 = functionUncurryThis;
  2004. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  2005. var toString$2 = toString$5;
  2006. var requireObjectCoercible$2 = requireObjectCoercible$6;
  2007. var charAt$2 = uncurryThis$2(''.charAt);
  2008. var charCodeAt = uncurryThis$2(''.charCodeAt);
  2009. var stringSlice$2 = uncurryThis$2(''.slice);
  2010. var createMethod = function (CONVERT_TO_STRING) {
  2011. return function ($this, pos) {
  2012. var S = toString$2(requireObjectCoercible$2($this));
  2013. var position = toIntegerOrInfinity$1(pos);
  2014. var size = S.length;
  2015. var first, second;
  2016. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2017. first = charCodeAt(S, position);
  2018. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2019. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  2020. ? CONVERT_TO_STRING
  2021. ? charAt$2(S, position)
  2022. : first
  2023. : CONVERT_TO_STRING
  2024. ? stringSlice$2(S, position, position + 2)
  2025. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2026. };
  2027. };
  2028. var stringMultibyte = {
  2029. // `String.prototype.codePointAt` method
  2030. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2031. codeAt: createMethod(false),
  2032. // `String.prototype.at` method
  2033. // https://github.com/mathiasbynens/String.prototype.at
  2034. charAt: createMethod(true)
  2035. };
  2036. var charAt$1 = stringMultibyte.charAt;
  2037. // `AdvanceStringIndex` abstract operation
  2038. // https://tc39.es/ecma262/#sec-advancestringindex
  2039. var advanceStringIndex$1 = function (S, index, unicode) {
  2040. return index + (unicode ? charAt$1(S, index).length : 1);
  2041. };
  2042. var uncurryThis$1 = functionUncurryThis;
  2043. var toObject = toObject$8;
  2044. var floor = Math.floor;
  2045. var charAt = uncurryThis$1(''.charAt);
  2046. var replace = uncurryThis$1(''.replace);
  2047. var stringSlice$1 = uncurryThis$1(''.slice);
  2048. // eslint-disable-next-line redos/no-vulnerable -- safe
  2049. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  2050. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  2051. // `GetSubstitution` abstract operation
  2052. // https://tc39.es/ecma262/#sec-getsubstitution
  2053. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  2054. var tailPos = position + matched.length;
  2055. var m = captures.length;
  2056. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  2057. if (namedCaptures !== undefined) {
  2058. namedCaptures = toObject(namedCaptures);
  2059. symbols = SUBSTITUTION_SYMBOLS;
  2060. }
  2061. return replace(replacement, symbols, function (match, ch) {
  2062. var capture;
  2063. switch (charAt(ch, 0)) {
  2064. case '$': return '$';
  2065. case '&': return matched;
  2066. case '`': return stringSlice$1(str, 0, position);
  2067. case "'": return stringSlice$1(str, tailPos);
  2068. case '<':
  2069. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  2070. break;
  2071. default: // \d\d?
  2072. var n = +ch;
  2073. if (n === 0) return match;
  2074. if (n > m) {
  2075. var f = floor(n / 10);
  2076. if (f === 0) return match;
  2077. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  2078. return match;
  2079. }
  2080. capture = captures[n - 1];
  2081. }
  2082. return capture === undefined ? '' : capture;
  2083. });
  2084. };
  2085. var call$2 = functionCall;
  2086. var anObject$2 = anObject$9;
  2087. var isCallable$1 = isCallable$f;
  2088. var classof = classofRaw$2;
  2089. var regexpExec = regexpExec$2;
  2090. var $TypeError = TypeError;
  2091. // `RegExpExec` abstract operation
  2092. // https://tc39.es/ecma262/#sec-regexpexec
  2093. var regexpExecAbstract = function (R, S) {
  2094. var exec = R.exec;
  2095. if (isCallable$1(exec)) {
  2096. var result = call$2(exec, R, S);
  2097. if (result !== null) anObject$2(result);
  2098. return result;
  2099. }
  2100. if (classof(R) === 'RegExp') return call$2(regexpExec, R, S);
  2101. throw new $TypeError('RegExp#exec called on incompatible receiver');
  2102. };
  2103. var apply = functionApply;
  2104. var call$1 = functionCall;
  2105. var uncurryThis = functionUncurryThis;
  2106. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  2107. var fails = fails$o;
  2108. var anObject$1 = anObject$9;
  2109. var isCallable = isCallable$f;
  2110. var isNullOrUndefined$1 = isNullOrUndefined$4;
  2111. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  2112. var toLength = toLength$2;
  2113. var toString$1 = toString$5;
  2114. var requireObjectCoercible$1 = requireObjectCoercible$6;
  2115. var advanceStringIndex = advanceStringIndex$1;
  2116. var getMethod$1 = getMethod$3;
  2117. var getSubstitution = getSubstitution$1;
  2118. var regExpExec$1 = regexpExecAbstract;
  2119. var wellKnownSymbol = wellKnownSymbol$b;
  2120. var REPLACE = wellKnownSymbol('replace');
  2121. var max = Math.max;
  2122. var min = Math.min;
  2123. var concat = uncurryThis([].concat);
  2124. var push = uncurryThis([].push);
  2125. var stringIndexOf = uncurryThis(''.indexOf);
  2126. var stringSlice = uncurryThis(''.slice);
  2127. var maybeToString = function (it) {
  2128. return it === undefined ? it : String(it);
  2129. };
  2130. // IE <= 11 replaces $0 with the whole match, as if it was $&
  2131. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  2132. var REPLACE_KEEPS_$0 = (function () {
  2133. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  2134. return 'a'.replace(/./, '$0') === '$0';
  2135. })();
  2136. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  2137. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  2138. if (/./[REPLACE]) {
  2139. return /./[REPLACE]('a', '$0') === '';
  2140. }
  2141. return false;
  2142. })();
  2143. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  2144. var re = /./;
  2145. re.exec = function () {
  2146. var result = [];
  2147. result.groups = { a: '7' };
  2148. return result;
  2149. };
  2150. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  2151. return ''.replace(re, '$<a>') !== '7';
  2152. });
  2153. // @@replace logic
  2154. fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
  2155. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  2156. return [
  2157. // `String.prototype.replace` method
  2158. // https://tc39.es/ecma262/#sec-string.prototype.replace
  2159. function replace(searchValue, replaceValue) {
  2160. var O = requireObjectCoercible$1(this);
  2161. var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
  2162. return replacer
  2163. ? call$1(replacer, searchValue, O, replaceValue)
  2164. : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
  2165. },
  2166. // `RegExp.prototype[@@replace]` method
  2167. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  2168. function (string, replaceValue) {
  2169. var rx = anObject$1(this);
  2170. var S = toString$1(string);
  2171. if (
  2172. typeof replaceValue == 'string' &&
  2173. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  2174. stringIndexOf(replaceValue, '$<') === -1
  2175. ) {
  2176. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  2177. if (res.done) return res.value;
  2178. }
  2179. var functionalReplace = isCallable(replaceValue);
  2180. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  2181. var global = rx.global;
  2182. var fullUnicode;
  2183. if (global) {
  2184. fullUnicode = rx.unicode;
  2185. rx.lastIndex = 0;
  2186. }
  2187. var results = [];
  2188. var result;
  2189. while (true) {
  2190. result = regExpExec$1(rx, S);
  2191. if (result === null) break;
  2192. push(results, result);
  2193. if (!global) break;
  2194. var matchStr = toString$1(result[0]);
  2195. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  2196. }
  2197. var accumulatedResult = '';
  2198. var nextSourcePosition = 0;
  2199. for (var i = 0; i < results.length; i++) {
  2200. result = results[i];
  2201. var matched = toString$1(result[0]);
  2202. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  2203. var captures = [];
  2204. var replacement;
  2205. // NOTE: This is equivalent to
  2206. // captures = result.slice(1).map(maybeToString)
  2207. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  2208. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  2209. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  2210. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  2211. var namedCaptures = result.groups;
  2212. if (functionalReplace) {
  2213. var replacerArgs = concat([matched], captures, position, S);
  2214. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  2215. replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  2216. } else {
  2217. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  2218. }
  2219. if (position >= nextSourcePosition) {
  2220. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  2221. nextSourcePosition = position + matched.length;
  2222. }
  2223. }
  2224. return accumulatedResult + stringSlice(S, nextSourcePosition);
  2225. }
  2226. ];
  2227. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  2228. // `SameValue` abstract operation
  2229. // https://tc39.es/ecma262/#sec-samevalue
  2230. // eslint-disable-next-line es/no-object-is -- safe
  2231. var sameValue$1 = Object.is || function is(x, y) {
  2232. // eslint-disable-next-line no-self-compare -- NaN check
  2233. return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
  2234. };
  2235. var call = functionCall;
  2236. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  2237. var anObject = anObject$9;
  2238. var isNullOrUndefined = isNullOrUndefined$4;
  2239. var requireObjectCoercible = requireObjectCoercible$6;
  2240. var sameValue = sameValue$1;
  2241. var toString = toString$5;
  2242. var getMethod = getMethod$3;
  2243. var regExpExec = regexpExecAbstract;
  2244. // @@search logic
  2245. fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
  2246. return [
  2247. // `String.prototype.search` method
  2248. // https://tc39.es/ecma262/#sec-string.prototype.search
  2249. function search(regexp) {
  2250. var O = requireObjectCoercible(this);
  2251. var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
  2252. return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
  2253. },
  2254. // `RegExp.prototype[@@search]` method
  2255. // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
  2256. function (string) {
  2257. var rx = anObject(this);
  2258. var S = toString(string);
  2259. var res = maybeCallNative(nativeSearch, rx, S);
  2260. if (res.done) return res.value;
  2261. var previousLastIndex = rx.lastIndex;
  2262. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  2263. var result = regExpExec(rx, S);
  2264. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  2265. return result === null ? -1 : result.index;
  2266. }
  2267. ];
  2268. });
  2269. // iterable DOM collections
  2270. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  2271. var domIterables = {
  2272. CSSRuleList: 0,
  2273. CSSStyleDeclaration: 0,
  2274. CSSValueList: 0,
  2275. ClientRectList: 0,
  2276. DOMRectList: 0,
  2277. DOMStringList: 0,
  2278. DOMTokenList: 1,
  2279. DataTransferItemList: 0,
  2280. FileList: 0,
  2281. HTMLAllCollection: 0,
  2282. HTMLCollection: 0,
  2283. HTMLFormElement: 0,
  2284. HTMLSelectElement: 0,
  2285. MediaList: 0,
  2286. MimeTypeArray: 0,
  2287. NamedNodeMap: 0,
  2288. NodeList: 1,
  2289. PaintRequestList: 0,
  2290. Plugin: 0,
  2291. PluginArray: 0,
  2292. SVGLengthList: 0,
  2293. SVGNumberList: 0,
  2294. SVGPathSegList: 0,
  2295. SVGPointList: 0,
  2296. SVGStringList: 0,
  2297. SVGTransformList: 0,
  2298. SourceBufferList: 0,
  2299. StyleSheetList: 0,
  2300. TextTrackCueList: 0,
  2301. TextTrackList: 0,
  2302. TouchList: 0
  2303. };
  2304. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  2305. var documentCreateElement = documentCreateElement$2;
  2306. var classList = documentCreateElement('span').classList;
  2307. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  2308. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  2309. var $forEach = arrayIteration.forEach;
  2310. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  2311. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  2312. // `Array.prototype.forEach` method implementation
  2313. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  2314. var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  2315. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2316. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  2317. } : [].forEach;
  2318. var globalThis$1 = globalThis_1;
  2319. var DOMIterables = domIterables;
  2320. var DOMTokenListPrototype = domTokenListPrototype;
  2321. var forEach = arrayForEach;
  2322. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  2323. var handlePrototype = function (CollectionPrototype) {
  2324. // some Chrome versions have non-configurable methods on DOMTokenList
  2325. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  2326. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  2327. } catch (error) {
  2328. CollectionPrototype.forEach = forEach;
  2329. }
  2330. };
  2331. for (var COLLECTION_NAME in DOMIterables) {
  2332. if (DOMIterables[COLLECTION_NAME]) {
  2333. handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype);
  2334. }
  2335. }
  2336. handlePrototype(DOMTokenListPrototype);
  2337. /**
  2338. * @author: Dennis Hernández
  2339. * @update zhixin wen <wenzhixin2010@gmail.com>
  2340. */
  2341. var Utils = $$c.fn.bootstrapTable.utils;
  2342. var UtilsCookie = {
  2343. cookieIds: {
  2344. sortOrder: 'bs.table.sortOrder',
  2345. sortName: 'bs.table.sortName',
  2346. sortPriority: 'bs.table.sortPriority',
  2347. pageNumber: 'bs.table.pageNumber',
  2348. pageList: 'bs.table.pageList',
  2349. hiddenColumns: 'bs.table.hiddenColumns',
  2350. cardView: 'bs.table.cardView',
  2351. customView: 'bs.table.customView',
  2352. searchText: 'bs.table.searchText',
  2353. reorderColumns: 'bs.table.reorderColumns',
  2354. filterControl: 'bs.table.filterControl',
  2355. filterBy: 'bs.table.filterBy'
  2356. },
  2357. getCurrentHeader: function getCurrentHeader(that) {
  2358. return that.options.height ? that.$tableHeader : that.$header;
  2359. },
  2360. getCurrentSearchControls: function getCurrentSearchControls(that) {
  2361. return that.options.height ? 'table select, table input' : 'select, input';
  2362. },
  2363. isCookieSupportedByBrowser: function isCookieSupportedByBrowser() {
  2364. return navigator.cookieEnabled;
  2365. },
  2366. isCookieEnabled: function isCookieEnabled(that, cookieName) {
  2367. return that.options.cookiesEnabled.includes(cookieName);
  2368. },
  2369. setCookie: function setCookie(that, cookieName, cookieValue) {
  2370. if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2371. return;
  2372. }
  2373. return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue);
  2374. },
  2375. getCookie: function getCookie(that, cookieName) {
  2376. if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2377. return null;
  2378. }
  2379. return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2380. },
  2381. deleteCookie: function deleteCookie(that, cookieName) {
  2382. return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2383. },
  2384. calculateExpiration: function calculateExpiration(cookieExpire) {
  2385. var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
  2386. cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number
  2387. switch (time.toLowerCase()) {
  2388. case 's':
  2389. cookieExpire = +cookieExpire;
  2390. break;
  2391. case 'mi':
  2392. cookieExpire *= 60;
  2393. break;
  2394. case 'h':
  2395. cookieExpire = cookieExpire * 60 * 60;
  2396. break;
  2397. case 'd':
  2398. cookieExpire = cookieExpire * 24 * 60 * 60;
  2399. break;
  2400. case 'm':
  2401. cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
  2402. break;
  2403. case 'y':
  2404. cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
  2405. break;
  2406. default:
  2407. cookieExpire = undefined;
  2408. break;
  2409. }
  2410. if (!cookieExpire) {
  2411. return '';
  2412. }
  2413. var d = new Date();
  2414. d.setTime(d.getTime() + cookieExpire * 1000);
  2415. return d.toGMTString();
  2416. },
  2417. initCookieFilters: function initCookieFilters(that) {
  2418. setTimeout(function () {
  2419. var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(that, UtilsCookie.cookieIds.filterControl));
  2420. if (!that._filterControlValuesLoaded && parsedCookieFilters) {
  2421. var cachedFilters = {};
  2422. var header = UtilsCookie.getCurrentHeader(that);
  2423. var searchControls = UtilsCookie.getCurrentSearchControls(that);
  2424. var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
  2425. filteredCookies.forEach(function (cookie) {
  2426. var value = element.value.toString();
  2427. var text = cookie.text;
  2428. if (text === '' || element.type === 'radio' && value !== text) {
  2429. return;
  2430. }
  2431. if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) {
  2432. element.checked = true;
  2433. cachedFilters[cookie.field] = text;
  2434. } else if (element.tagName === 'INPUT') {
  2435. element.value = text;
  2436. cachedFilters[cookie.field] = text;
  2437. } else if (element.tagName === 'SELECT' && that.options.filterControlContainer) {
  2438. element.value = text;
  2439. cachedFilters[cookie.field] = text;
  2440. } else if (text !== '' && element.tagName === 'SELECT') {
  2441. cachedFilters[cookie.field] = text;
  2442. var _iterator = _createForOfIteratorHelper(element),
  2443. _step;
  2444. try {
  2445. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  2446. var currentElement = _step.value;
  2447. if (currentElement.value === text) {
  2448. currentElement.selected = true;
  2449. return;
  2450. }
  2451. }
  2452. } catch (err) {
  2453. _iterator.e(err);
  2454. } finally {
  2455. _iterator.f();
  2456. }
  2457. var option = document.createElement('option');
  2458. option.value = text;
  2459. option.text = text;
  2460. element.add(option, element[1]);
  2461. element.selectedIndex = 1;
  2462. }
  2463. });
  2464. };
  2465. var filterContainer = header;
  2466. if (that.options.filterControlContainer) {
  2467. filterContainer = $$c("".concat(that.options.filterControlContainer));
  2468. }
  2469. filterContainer.find(searchControls).each(function () {
  2470. var field = $$c(this).closest('[data-field]').data('field');
  2471. var filteredCookies = parsedCookieFilters.filter(function (cookie) {
  2472. return cookie.field === field;
  2473. });
  2474. applyCookieFilters(this, filteredCookies);
  2475. });
  2476. that.initColumnSearch(cachedFilters);
  2477. that._filterControlValuesLoaded = true;
  2478. that.initServer();
  2479. }
  2480. }, 250);
  2481. }
  2482. };
  2483. Object.assign($$c.fn.bootstrapTable.defaults, {
  2484. cookie: false,
  2485. cookieExpire: '2h',
  2486. cookiePath: null,
  2487. cookieDomain: null,
  2488. cookieSecure: null,
  2489. cookieSameSite: 'Lax',
  2490. cookieIdTable: '',
  2491. cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.sortPriority', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.hiddenColumns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns', 'bs.table.cardView', 'bs.table.customView'],
  2492. cookieStorage: 'cookieStorage',
  2493. // localStorage, sessionStorage, customStorage
  2494. cookieCustomStorageGet: null,
  2495. cookieCustomStorageSet: null,
  2496. cookieCustomStorageDelete: null,
  2497. // internal variable
  2498. _filterControls: [],
  2499. _filterControlValuesLoaded: false,
  2500. _storage: {
  2501. setItem: undefined,
  2502. getItem: undefined,
  2503. removeItem: undefined
  2504. }
  2505. });
  2506. $$c.fn.bootstrapTable.methods.push('getCookies');
  2507. $$c.fn.bootstrapTable.methods.push('deleteCookie');
  2508. Object.assign($$c.fn.bootstrapTable.utils, {
  2509. setCookie: UtilsCookie.setCookie,
  2510. getCookie: UtilsCookie.getCookie
  2511. });
  2512. $$c.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  2513. function _class() {
  2514. _classCallCheck(this, _class);
  2515. return _callSuper(this, _class, arguments);
  2516. }
  2517. _inherits(_class, _$$BootstrapTable);
  2518. return _createClass(_class, [{
  2519. key: "init",
  2520. value: function init() {
  2521. if (this.options.cookie) {
  2522. if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) {
  2523. throw new Error('Cookies are not enabled in this browser.');
  2524. }
  2525. this.configureStorage();
  2526. // FilterBy logic
  2527. var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy);
  2528. if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
  2529. throw new Error('The cookie value of filterBy must be a json!');
  2530. }
  2531. var filterByCookie = {};
  2532. try {
  2533. filterByCookie = JSON.parse(filterByCookieValue);
  2534. } catch (e) {
  2535. throw new Error('Could not parse the json of the filterBy cookie!');
  2536. }
  2537. this.filterColumns = filterByCookie ? filterByCookie : {};
  2538. // FilterControl logic
  2539. this._filterControls = [];
  2540. this._filterControlValuesLoaded = false;
  2541. this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').split(',') : this.options.cookiesEnabled;
  2542. if (this.options.filterControl) {
  2543. var that = this;
  2544. this.$el.on('column-search.bs.table', function (e, field, text) {
  2545. var isNewField = true;
  2546. for (var i = 0; i < that._filterControls.length; i++) {
  2547. if (that._filterControls[i].field === field) {
  2548. that._filterControls[i].text = text;
  2549. isNewField = false;
  2550. break;
  2551. }
  2552. }
  2553. if (isNewField) {
  2554. that._filterControls.push({
  2555. field: field,
  2556. text: text
  2557. });
  2558. }
  2559. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls));
  2560. }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
  2561. }
  2562. }
  2563. _superPropGet(_class, "init", this)([]);
  2564. }
  2565. }, {
  2566. key: "initServer",
  2567. value: function initServer() {
  2568. if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) {
  2569. var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl));
  2570. if (cookie) {
  2571. return;
  2572. }
  2573. }
  2574. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2575. args[_key] = arguments[_key];
  2576. }
  2577. _superPropGet(_class, "initServer", this)(args);
  2578. }
  2579. }, {
  2580. key: "initTable",
  2581. value: function initTable() {
  2582. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2583. args[_key2] = arguments[_key2];
  2584. }
  2585. _superPropGet(_class, "initTable", this)(args);
  2586. this.initCookie();
  2587. }
  2588. }, {
  2589. key: "onSort",
  2590. value: function onSort() {
  2591. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2592. args[_key3] = arguments[_key3];
  2593. }
  2594. _superPropGet(_class, "onSort", this)(args);
  2595. if (!this.options.cookie) {
  2596. return;
  2597. }
  2598. if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
  2599. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2600. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2601. } else {
  2602. this.options.sortPriority = null;
  2603. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2604. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
  2605. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
  2606. }
  2607. }
  2608. }, {
  2609. key: "onMultipleSort",
  2610. value: function onMultipleSort() {
  2611. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2612. args[_key4] = arguments[_key4];
  2613. }
  2614. _superPropGet(_class, "onMultipleSort", this)(args);
  2615. if (!this.options.cookie) {
  2616. return;
  2617. }
  2618. if (this.options.sortPriority === undefined) {
  2619. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2620. } else {
  2621. this.options.sortName = undefined;
  2622. this.options.sortOrder = undefined;
  2623. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2624. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2625. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority));
  2626. }
  2627. }
  2628. }, {
  2629. key: "onPageNumber",
  2630. value: function onPageNumber() {
  2631. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2632. args[_key5] = arguments[_key5];
  2633. }
  2634. _superPropGet(_class, "onPageNumber", this)(args);
  2635. if (!this.options.cookie) {
  2636. return;
  2637. }
  2638. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2639. }
  2640. }, {
  2641. key: "onPageListChange",
  2642. value: function onPageListChange() {
  2643. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2644. args[_key6] = arguments[_key6];
  2645. }
  2646. _superPropGet(_class, "onPageListChange", this)(args);
  2647. if (!this.options.cookie) {
  2648. return;
  2649. }
  2650. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize === this.options.formatAllRows() ? 'all' : this.options.pageSize);
  2651. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2652. }
  2653. }, {
  2654. key: "onPagePre",
  2655. value: function onPagePre() {
  2656. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2657. args[_key7] = arguments[_key7];
  2658. }
  2659. _superPropGet(_class, "onPagePre", this)(args);
  2660. if (!this.options.cookie) {
  2661. return;
  2662. }
  2663. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2664. }
  2665. }, {
  2666. key: "onPageNext",
  2667. value: function onPageNext() {
  2668. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2669. args[_key8] = arguments[_key8];
  2670. }
  2671. _superPropGet(_class, "onPageNext", this)(args);
  2672. if (!this.options.cookie) {
  2673. return;
  2674. }
  2675. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2676. }
  2677. }, {
  2678. key: "_toggleColumn",
  2679. value: function _toggleColumn() {
  2680. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  2681. args[_key9] = arguments[_key9];
  2682. }
  2683. _superPropGet(_class, "_toggleColumn", this)(args);
  2684. if (!this.options.cookie) {
  2685. return;
  2686. }
  2687. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2688. return column.field;
  2689. })));
  2690. }
  2691. }, {
  2692. key: "_toggleAllColumns",
  2693. value: function _toggleAllColumns() {
  2694. for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  2695. args[_key10] = arguments[_key10];
  2696. }
  2697. _superPropGet(_class, "_toggleAllColumns", this)(args);
  2698. if (!this.options.cookie) {
  2699. return;
  2700. }
  2701. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2702. return column.field;
  2703. })));
  2704. }
  2705. }, {
  2706. key: "toggleView",
  2707. value: function toggleView() {
  2708. _superPropGet(_class, "toggleView", this)([]);
  2709. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.cardView, this.options.cardView);
  2710. }
  2711. }, {
  2712. key: "toggleCustomView",
  2713. value: function toggleCustomView() {
  2714. _superPropGet(_class, "toggleCustomView", this)([]);
  2715. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.customView, this.customViewDefaultView);
  2716. }
  2717. }, {
  2718. key: "selectPage",
  2719. value: function selectPage(page) {
  2720. _superPropGet(_class, "selectPage", this)([page]);
  2721. if (!this.options.cookie) {
  2722. return;
  2723. }
  2724. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
  2725. }
  2726. }, {
  2727. key: "onSearch",
  2728. value: function onSearch(event) {
  2729. _superPropGet(_class, "onSearch", this)([event, arguments.length > 1 ? arguments[1] : true]);
  2730. if (!this.options.cookie) {
  2731. return;
  2732. }
  2733. if (this.options.search) {
  2734. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
  2735. }
  2736. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2737. }
  2738. }, {
  2739. key: "initHeader",
  2740. value: function initHeader() {
  2741. if (this.options.reorderableColumns && this.options.cookie) {
  2742. this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns));
  2743. }
  2744. for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
  2745. args[_key11] = arguments[_key11];
  2746. }
  2747. _superPropGet(_class, "initHeader", this)(args);
  2748. }
  2749. }, {
  2750. key: "persistReorderColumnsState",
  2751. value: function persistReorderColumnsState(that) {
  2752. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder));
  2753. }
  2754. }, {
  2755. key: "filterBy",
  2756. value: function filterBy() {
  2757. for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
  2758. args[_key12] = arguments[_key12];
  2759. }
  2760. _superPropGet(_class, "filterBy", this)(args);
  2761. if (!this.options.cookie) {
  2762. return;
  2763. }
  2764. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
  2765. }
  2766. }, {
  2767. key: "initCookie",
  2768. value: function initCookie() {
  2769. if (!this.options.cookie) {
  2770. return;
  2771. }
  2772. if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') {
  2773. console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
  2774. this.options.cookie = false; // Make sure that the cookie extension is disabled
  2775. return;
  2776. }
  2777. var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder);
  2778. var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName);
  2779. var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority);
  2780. var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber);
  2781. var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList);
  2782. var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText);
  2783. var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView);
  2784. var customViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.customView);
  2785. var hiddenColumnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.hiddenColumns);
  2786. var hiddenColumnsCookie = {};
  2787. try {
  2788. hiddenColumnsCookie = JSON.parse(hiddenColumnsCookieValue);
  2789. } catch (e) {
  2790. throw new Error('Could not parse the json of the hidden columns cookie!', hiddenColumnsCookieValue);
  2791. }
  2792. try {
  2793. sortPriorityCookie = JSON.parse(sortPriorityCookie);
  2794. } catch (e) {
  2795. throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie);
  2796. }
  2797. if (!sortPriorityCookie) {
  2798. // sortOrder
  2799. this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder;
  2800. // sortName
  2801. this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
  2802. } else {
  2803. this.options.sortOrder = undefined;
  2804. this.options.sortName = undefined;
  2805. }
  2806. // sortPriority
  2807. this.options.sortPriority = sortPriorityCookie ? sortPriorityCookie : this.options.sortPriority;
  2808. if (this.options.sortOrder || this.options.sortName) {
  2809. // sortPriority
  2810. this.options.sortPriority = null;
  2811. }
  2812. // pageNumber
  2813. this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber;
  2814. // pageSize
  2815. this.options.pageSize = pageListCookie ? pageListCookie === 'all' ? this.options.formatAllRows() : +pageListCookie : this.options.pageSize;
  2816. // searchText
  2817. if (UtilsCookie.isCookieEnabled(this, UtilsCookie.cookieIds.searchText) && this.options.searchText === '') {
  2818. this.options.searchText = searchTextCookie ? searchTextCookie : '';
  2819. }
  2820. // cardView
  2821. if (cardViewCookie !== null) {
  2822. this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false;
  2823. }
  2824. this.customViewDefaultView = customViewCookie === 'true';
  2825. if (hiddenColumnsCookie) {
  2826. var _iterator2 = _createForOfIteratorHelper(this.columns),
  2827. _step2;
  2828. try {
  2829. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  2830. var column = _step2.value;
  2831. if (!column.switchable) {
  2832. continue;
  2833. }
  2834. column.visible = this.isSelectionColumn(column) || !hiddenColumnsCookie.includes(column.field);
  2835. }
  2836. } catch (err) {
  2837. _iterator2.e(err);
  2838. } finally {
  2839. _iterator2.f();
  2840. }
  2841. }
  2842. }
  2843. }, {
  2844. key: "getCookies",
  2845. value: function getCookies() {
  2846. var bootstrapTable = this;
  2847. var cookies = {};
  2848. for (var _i = 0, _Object$entries = Object.entries(UtilsCookie.cookieIds); _i < _Object$entries.length; _i++) {
  2849. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  2850. key = _Object$entries$_i[0],
  2851. value = _Object$entries$_i[1];
  2852. cookies[key] = UtilsCookie.getCookie(bootstrapTable, value);
  2853. if (key === 'columns' || key === 'hiddenColumns' || key === 'sortPriority') {
  2854. cookies[key] = JSON.parse(cookies[key]);
  2855. }
  2856. }
  2857. return cookies;
  2858. }
  2859. }, {
  2860. key: "deleteCookie",
  2861. value: function deleteCookie(cookieName) {
  2862. if (!cookieName || !this.options.cookie) {
  2863. return;
  2864. }
  2865. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]);
  2866. }
  2867. }, {
  2868. key: "configureStorage",
  2869. value: function configureStorage() {
  2870. var that = this;
  2871. this._storage = {};
  2872. switch (this.options.cookieStorage) {
  2873. case 'cookieStorage':
  2874. this._storage.setItem = function (cookieName, cookieValue) {
  2875. document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2876. };
  2877. this._storage.getItem = function (cookieName) {
  2878. var value = "; ".concat(document.cookie);
  2879. var parts = value.split("; ".concat(cookieName, "="));
  2880. return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
  2881. };
  2882. this._storage.removeItem = function (cookieName) {
  2883. document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2884. };
  2885. break;
  2886. case 'localStorage':
  2887. this._storage.setItem = function (cookieName, cookieValue) {
  2888. localStorage.setItem(cookieName, cookieValue);
  2889. };
  2890. this._storage.getItem = function (cookieName) {
  2891. return localStorage.getItem(cookieName);
  2892. };
  2893. this._storage.removeItem = function (cookieName) {
  2894. localStorage.removeItem(cookieName);
  2895. };
  2896. break;
  2897. case 'sessionStorage':
  2898. this._storage.setItem = function (cookieName, cookieValue) {
  2899. sessionStorage.setItem(cookieName, cookieValue);
  2900. };
  2901. this._storage.getItem = function (cookieName) {
  2902. return sessionStorage.getItem(cookieName);
  2903. };
  2904. this._storage.removeItem = function (cookieName) {
  2905. sessionStorage.removeItem(cookieName);
  2906. };
  2907. break;
  2908. case 'customStorage':
  2909. if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) {
  2910. throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
  2911. }
  2912. this._storage.setItem = function (cookieName, cookieValue) {
  2913. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
  2914. };
  2915. this._storage.getItem = function (cookieName) {
  2916. return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
  2917. };
  2918. this._storage.removeItem = function (cookieName) {
  2919. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
  2920. };
  2921. break;
  2922. default:
  2923. throw new Error('Storage method not supported.');
  2924. }
  2925. }
  2926. }]);
  2927. }($$c.BootstrapTable);
  2928. }));