utils.js 115 KB

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