bootstrap-table-cookie.js 117 KB

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