bootstrap-table-filter-control.js 186 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($$l) { 'use strict';
  6. function _arrayLikeToArray(r, a) {
  7. (null == a || a > r.length) && (a = r.length);
  8. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  9. return n;
  10. }
  11. function _arrayWithoutHoles(r) {
  12. if (Array.isArray(r)) return _arrayLikeToArray(r);
  13. }
  14. function _assertThisInitialized(e) {
  15. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16. return e;
  17. }
  18. function _callSuper(t, o, e) {
  19. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  20. }
  21. function _classCallCheck(a, n) {
  22. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  23. }
  24. function _defineProperties(e, r) {
  25. for (var t = 0; t < r.length; t++) {
  26. var o = r[t];
  27. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  28. }
  29. }
  30. function _createClass(e, r, t) {
  31. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  32. writable: !1
  33. }), e;
  34. }
  35. function _get() {
  36. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  37. var p = _superPropBase(e, t);
  38. if (p) {
  39. var n = Object.getOwnPropertyDescriptor(p, t);
  40. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  41. }
  42. }, _get.apply(null, arguments);
  43. }
  44. function _getPrototypeOf(t) {
  45. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  46. return t.__proto__ || Object.getPrototypeOf(t);
  47. }, _getPrototypeOf(t);
  48. }
  49. function _inherits(t, e) {
  50. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  51. t.prototype = Object.create(e && e.prototype, {
  52. constructor: {
  53. value: t,
  54. writable: !0,
  55. configurable: !0
  56. }
  57. }), Object.defineProperty(t, "prototype", {
  58. writable: !1
  59. }), e && _setPrototypeOf(t, e);
  60. }
  61. function _isNativeReflectConstruct() {
  62. try {
  63. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  64. } catch (t) {}
  65. return (_isNativeReflectConstruct = function () {
  66. return !!t;
  67. })();
  68. }
  69. function _iterableToArray(r) {
  70. if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
  71. }
  72. function _nonIterableSpread() {
  73. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  74. }
  75. function _possibleConstructorReturn(t, e) {
  76. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  77. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  78. return _assertThisInitialized(t);
  79. }
  80. function _setPrototypeOf(t, e) {
  81. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  82. return t.__proto__ = e, t;
  83. }, _setPrototypeOf(t, e);
  84. }
  85. function _superPropBase(t, o) {
  86. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  87. return t;
  88. }
  89. function _superPropGet(t, e, r, o) {
  90. var p = _get(_getPrototypeOf(t.prototype ), e, r);
  91. return function (t) {
  92. return p.apply(r, t);
  93. } ;
  94. }
  95. function _toConsumableArray(r) {
  96. return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
  97. }
  98. function _toPrimitive(t, r) {
  99. if ("object" != typeof t || !t) return t;
  100. var e = t[Symbol.toPrimitive];
  101. if (void 0 !== e) {
  102. var i = e.call(t, r);
  103. if ("object" != typeof i) return i;
  104. throw new TypeError("@@toPrimitive must return a primitive value.");
  105. }
  106. return (String )(t);
  107. }
  108. function _toPropertyKey(t) {
  109. var i = _toPrimitive(t, "string");
  110. return "symbol" == typeof i ? i : i + "";
  111. }
  112. function _typeof(o) {
  113. "@babel/helpers - typeof";
  114. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  115. return typeof o;
  116. } : function (o) {
  117. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  118. }, _typeof(o);
  119. }
  120. function _unsupportedIterableToArray(r, a) {
  121. if (r) {
  122. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  123. var t = {}.toString.call(r).slice(8, -1);
  124. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  125. }
  126. }
  127. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  128. var check = function (it) {
  129. return it && it.Math === Math && it;
  130. };
  131. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  132. var globalThis_1 =
  133. // eslint-disable-next-line es/no-global-this -- safe
  134. check(typeof globalThis == 'object' && globalThis) ||
  135. check(typeof window == 'object' && window) ||
  136. // eslint-disable-next-line no-restricted-globals -- safe
  137. check(typeof self == 'object' && self) ||
  138. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  139. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  140. // eslint-disable-next-line no-new-func -- fallback
  141. (function () { return this; })() || Function('return this')();
  142. var objectGetOwnPropertyDescriptor = {};
  143. var fails$s = function (exec) {
  144. try {
  145. return !!exec();
  146. } catch (error) {
  147. return true;
  148. }
  149. };
  150. var fails$r = fails$s;
  151. // Detect IE8's incomplete defineProperty implementation
  152. var descriptors = !fails$r(function () {
  153. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  154. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  155. });
  156. var fails$q = fails$s;
  157. var functionBindNative = !fails$q(function () {
  158. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  159. var test = (function () { /* empty */ }).bind();
  160. // eslint-disable-next-line no-prototype-builtins -- safe
  161. return typeof test != 'function' || test.hasOwnProperty('prototype');
  162. });
  163. var NATIVE_BIND$3 = functionBindNative;
  164. var call$j = Function.prototype.call;
  165. var functionCall = NATIVE_BIND$3 ? call$j.bind(call$j) : function () {
  166. return call$j.apply(call$j, arguments);
  167. };
  168. var objectPropertyIsEnumerable = {};
  169. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  170. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  171. var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
  172. // Nashorn ~ JDK8 bug
  173. var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  174. // `Object.prototype.propertyIsEnumerable` method implementation
  175. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  176. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  177. var descriptor = getOwnPropertyDescriptor$3(this, V);
  178. return !!descriptor && descriptor.enumerable;
  179. } : $propertyIsEnumerable$1;
  180. var createPropertyDescriptor$3 = function (bitmap, value) {
  181. return {
  182. enumerable: !(bitmap & 1),
  183. configurable: !(bitmap & 2),
  184. writable: !(bitmap & 4),
  185. value: value
  186. };
  187. };
  188. var NATIVE_BIND$2 = functionBindNative;
  189. var FunctionPrototype$2 = Function.prototype;
  190. var call$i = FunctionPrototype$2.call;
  191. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$i, call$i);
  192. var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
  193. return function () {
  194. return call$i.apply(fn, arguments);
  195. };
  196. };
  197. var uncurryThis$s = functionUncurryThis;
  198. var toString$d = uncurryThis$s({}.toString);
  199. var stringSlice$7 = uncurryThis$s(''.slice);
  200. var classofRaw$2 = function (it) {
  201. return stringSlice$7(toString$d(it), 8, -1);
  202. };
  203. var uncurryThis$r = functionUncurryThis;
  204. var fails$p = fails$s;
  205. var classof$9 = classofRaw$2;
  206. var $Object$4 = Object;
  207. var split = uncurryThis$r(''.split);
  208. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  209. var indexedObject = fails$p(function () {
  210. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  211. // eslint-disable-next-line no-prototype-builtins -- safe
  212. return !$Object$4('z').propertyIsEnumerable(0);
  213. }) ? function (it) {
  214. return classof$9(it) === 'String' ? split(it, '') : $Object$4(it);
  215. } : $Object$4;
  216. // we can't use just `it == null` since of `document.all` special case
  217. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  218. var isNullOrUndefined$7 = function (it) {
  219. return it === null || it === undefined;
  220. };
  221. var isNullOrUndefined$6 = isNullOrUndefined$7;
  222. var $TypeError$g = TypeError;
  223. // `RequireObjectCoercible` abstract operation
  224. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  225. var requireObjectCoercible$a = function (it) {
  226. if (isNullOrUndefined$6(it)) throw new $TypeError$g("Can't call method on " + it);
  227. return it;
  228. };
  229. // toObject with fallback for non-array-like ES3 strings
  230. var IndexedObject$3 = indexedObject;
  231. var requireObjectCoercible$9 = requireObjectCoercible$a;
  232. var toIndexedObject$6 = function (it) {
  233. return IndexedObject$3(requireObjectCoercible$9(it));
  234. };
  235. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  236. var documentAll = typeof document == 'object' && document.all;
  237. // `IsCallable` abstract operation
  238. // https://tc39.es/ecma262/#sec-iscallable
  239. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  240. var isCallable$j = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  241. return typeof argument == 'function' || argument === documentAll;
  242. } : function (argument) {
  243. return typeof argument == 'function';
  244. };
  245. var isCallable$i = isCallable$j;
  246. var isObject$c = function (it) {
  247. return typeof it == 'object' ? it !== null : isCallable$i(it);
  248. };
  249. var globalThis$n = globalThis_1;
  250. var isCallable$h = isCallable$j;
  251. var aFunction = function (argument) {
  252. return isCallable$h(argument) ? argument : undefined;
  253. };
  254. var getBuiltIn$7 = function (namespace, method) {
  255. return arguments.length < 2 ? aFunction(globalThis$n[namespace]) : globalThis$n[namespace] && globalThis$n[namespace][method];
  256. };
  257. var uncurryThis$q = functionUncurryThis;
  258. var objectIsPrototypeOf = uncurryThis$q({}.isPrototypeOf);
  259. var globalThis$m = globalThis_1;
  260. var navigator = globalThis$m.navigator;
  261. var userAgent$7 = navigator && navigator.userAgent;
  262. var environmentUserAgent = userAgent$7 ? String(userAgent$7) : '';
  263. var globalThis$l = globalThis_1;
  264. var userAgent$6 = environmentUserAgent;
  265. var process$3 = globalThis$l.process;
  266. var Deno$1 = globalThis$l.Deno;
  267. var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
  268. var v8 = versions && versions.v8;
  269. var match, version;
  270. if (v8) {
  271. match = v8.split('.');
  272. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  273. // but their correct versions are not interesting for us
  274. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  275. }
  276. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  277. // so check `userAgent` even if `.v8` exists, but 0
  278. if (!version && userAgent$6) {
  279. match = userAgent$6.match(/Edge\/(\d+)/);
  280. if (!match || match[1] >= 74) {
  281. match = userAgent$6.match(/Chrome\/(\d+)/);
  282. if (match) version = +match[1];
  283. }
  284. }
  285. var environmentV8Version = version;
  286. /* eslint-disable es/no-symbol -- required for testing */
  287. var V8_VERSION$3 = environmentV8Version;
  288. var fails$o = fails$s;
  289. var globalThis$k = globalThis_1;
  290. var $String$5 = globalThis$k.String;
  291. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  292. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$o(function () {
  293. var symbol = Symbol('symbol detection');
  294. // Chrome 38 Symbol has incorrect toString conversion
  295. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  296. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  297. // of course, fail.
  298. return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
  299. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  300. !Symbol.sham && V8_VERSION$3 && V8_VERSION$3 < 41;
  301. });
  302. /* eslint-disable es/no-symbol -- required for testing */
  303. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  304. var useSymbolAsUid = NATIVE_SYMBOL$1
  305. && !Symbol.sham
  306. && typeof Symbol.iterator == 'symbol';
  307. var getBuiltIn$6 = getBuiltIn$7;
  308. var isCallable$g = isCallable$j;
  309. var isPrototypeOf$3 = objectIsPrototypeOf;
  310. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  311. var $Object$3 = Object;
  312. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  313. return typeof it == 'symbol';
  314. } : function (it) {
  315. var $Symbol = getBuiltIn$6('Symbol');
  316. return isCallable$g($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
  317. };
  318. var $String$4 = String;
  319. var tryToString$5 = function (argument) {
  320. try {
  321. return $String$4(argument);
  322. } catch (error) {
  323. return 'Object';
  324. }
  325. };
  326. var isCallable$f = isCallable$j;
  327. var tryToString$4 = tryToString$5;
  328. var $TypeError$f = TypeError;
  329. // `Assert: IsCallable(argument) is true`
  330. var aCallable$9 = function (argument) {
  331. if (isCallable$f(argument)) return argument;
  332. throw new $TypeError$f(tryToString$4(argument) + ' is not a function');
  333. };
  334. var aCallable$8 = aCallable$9;
  335. var isNullOrUndefined$5 = isNullOrUndefined$7;
  336. // `GetMethod` abstract operation
  337. // https://tc39.es/ecma262/#sec-getmethod
  338. var getMethod$6 = function (V, P) {
  339. var func = V[P];
  340. return isNullOrUndefined$5(func) ? undefined : aCallable$8(func);
  341. };
  342. var call$h = functionCall;
  343. var isCallable$e = isCallable$j;
  344. var isObject$b = isObject$c;
  345. var $TypeError$e = TypeError;
  346. // `OrdinaryToPrimitive` abstract operation
  347. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  348. var ordinaryToPrimitive$1 = function (input, pref) {
  349. var fn, val;
  350. if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$b(val = call$h(fn, input))) return val;
  351. if (isCallable$e(fn = input.valueOf) && !isObject$b(val = call$h(fn, input))) return val;
  352. if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$b(val = call$h(fn, input))) return val;
  353. throw new $TypeError$e("Can't convert object to primitive value");
  354. };
  355. var sharedStore = {exports: {}};
  356. var globalThis$j = globalThis_1;
  357. // eslint-disable-next-line es/no-object-defineproperty -- safe
  358. var defineProperty$5 = Object.defineProperty;
  359. var defineGlobalProperty$3 = function (key, value) {
  360. try {
  361. defineProperty$5(globalThis$j, key, { value: value, configurable: true, writable: true });
  362. } catch (error) {
  363. globalThis$j[key] = value;
  364. } return value;
  365. };
  366. var globalThis$i = globalThis_1;
  367. var defineGlobalProperty$2 = defineGlobalProperty$3;
  368. var SHARED = '__core-js_shared__';
  369. var store$3 = sharedStore.exports = globalThis$i[SHARED] || defineGlobalProperty$2(SHARED, {});
  370. (store$3.versions || (store$3.versions = [])).push({
  371. version: '3.38.1',
  372. mode: 'global',
  373. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  374. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  375. source: 'https://github.com/zloirock/core-js'
  376. });
  377. var sharedStoreExports = sharedStore.exports;
  378. var store$2 = sharedStoreExports;
  379. var shared$4 = function (key, value) {
  380. return store$2[key] || (store$2[key] = value || {});
  381. };
  382. var requireObjectCoercible$8 = requireObjectCoercible$a;
  383. var $Object$2 = Object;
  384. // `ToObject` abstract operation
  385. // https://tc39.es/ecma262/#sec-toobject
  386. var toObject$8 = function (argument) {
  387. return $Object$2(requireObjectCoercible$8(argument));
  388. };
  389. var uncurryThis$p = functionUncurryThis;
  390. var toObject$7 = toObject$8;
  391. var hasOwnProperty = uncurryThis$p({}.hasOwnProperty);
  392. // `HasOwnProperty` abstract operation
  393. // https://tc39.es/ecma262/#sec-hasownproperty
  394. // eslint-disable-next-line es/no-object-hasown -- safe
  395. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  396. return hasOwnProperty(toObject$7(it), key);
  397. };
  398. var uncurryThis$o = functionUncurryThis;
  399. var id = 0;
  400. var postfix = Math.random();
  401. var toString$c = uncurryThis$o(1.0.toString);
  402. var uid$2 = function (key) {
  403. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$c(++id + postfix, 36);
  404. };
  405. var globalThis$h = globalThis_1;
  406. var shared$3 = shared$4;
  407. var hasOwn$a = hasOwnProperty_1;
  408. var uid$1 = uid$2;
  409. var NATIVE_SYMBOL = symbolConstructorDetection;
  410. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  411. var Symbol$2 = globalThis$h.Symbol;
  412. var WellKnownSymbolsStore = shared$3('wks');
  413. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  414. var wellKnownSymbol$i = function (name) {
  415. if (!hasOwn$a(WellKnownSymbolsStore, name)) {
  416. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)
  417. ? Symbol$2[name]
  418. : createWellKnownSymbol('Symbol.' + name);
  419. } return WellKnownSymbolsStore[name];
  420. };
  421. var call$g = functionCall;
  422. var isObject$a = isObject$c;
  423. var isSymbol$1 = isSymbol$2;
  424. var getMethod$5 = getMethod$6;
  425. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  426. var wellKnownSymbol$h = wellKnownSymbol$i;
  427. var $TypeError$d = TypeError;
  428. var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
  429. // `ToPrimitive` abstract operation
  430. // https://tc39.es/ecma262/#sec-toprimitive
  431. var toPrimitive$1 = function (input, pref) {
  432. if (!isObject$a(input) || isSymbol$1(input)) return input;
  433. var exoticToPrim = getMethod$5(input, TO_PRIMITIVE);
  434. var result;
  435. if (exoticToPrim) {
  436. if (pref === undefined) pref = 'default';
  437. result = call$g(exoticToPrim, input, pref);
  438. if (!isObject$a(result) || isSymbol$1(result)) return result;
  439. throw new $TypeError$d("Can't convert object to primitive value");
  440. }
  441. if (pref === undefined) pref = 'number';
  442. return ordinaryToPrimitive(input, pref);
  443. };
  444. var toPrimitive = toPrimitive$1;
  445. var isSymbol = isSymbol$2;
  446. // `ToPropertyKey` abstract operation
  447. // https://tc39.es/ecma262/#sec-topropertykey
  448. var toPropertyKey$2 = function (argument) {
  449. var key = toPrimitive(argument, 'string');
  450. return isSymbol(key) ? key : key + '';
  451. };
  452. var globalThis$g = globalThis_1;
  453. var isObject$9 = isObject$c;
  454. var document$3 = globalThis$g.document;
  455. // typeof document.createElement is 'object' in old IE
  456. var EXISTS$1 = isObject$9(document$3) && isObject$9(document$3.createElement);
  457. var documentCreateElement$2 = function (it) {
  458. return EXISTS$1 ? document$3.createElement(it) : {};
  459. };
  460. var DESCRIPTORS$c = descriptors;
  461. var fails$n = fails$s;
  462. var createElement$1 = documentCreateElement$2;
  463. // Thanks to IE8 for its funny defineProperty
  464. var ie8DomDefine = !DESCRIPTORS$c && !fails$n(function () {
  465. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  466. return Object.defineProperty(createElement$1('div'), 'a', {
  467. get: function () { return 7; }
  468. }).a !== 7;
  469. });
  470. var DESCRIPTORS$b = descriptors;
  471. var call$f = functionCall;
  472. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  473. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  474. var toIndexedObject$5 = toIndexedObject$6;
  475. var toPropertyKey$1 = toPropertyKey$2;
  476. var hasOwn$9 = hasOwnProperty_1;
  477. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  478. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  479. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  480. // `Object.getOwnPropertyDescriptor` method
  481. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  482. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$b ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  483. O = toIndexedObject$5(O);
  484. P = toPropertyKey$1(P);
  485. if (IE8_DOM_DEFINE$1) try {
  486. return $getOwnPropertyDescriptor$1(O, P);
  487. } catch (error) { /* empty */ }
  488. if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$f(propertyIsEnumerableModule$1.f, O, P), O[P]);
  489. };
  490. var objectDefineProperty = {};
  491. var DESCRIPTORS$a = descriptors;
  492. var fails$m = fails$s;
  493. // V8 ~ Chrome 36-
  494. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  495. var v8PrototypeDefineBug = DESCRIPTORS$a && fails$m(function () {
  496. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  497. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  498. value: 42,
  499. writable: false
  500. }).prototype !== 42;
  501. });
  502. var isObject$8 = isObject$c;
  503. var $String$3 = String;
  504. var $TypeError$c = TypeError;
  505. // `Assert: Type(argument) is Object`
  506. var anObject$f = function (argument) {
  507. if (isObject$8(argument)) return argument;
  508. throw new $TypeError$c($String$3(argument) + ' is not an object');
  509. };
  510. var DESCRIPTORS$9 = descriptors;
  511. var IE8_DOM_DEFINE = ie8DomDefine;
  512. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  513. var anObject$e = anObject$f;
  514. var toPropertyKey = toPropertyKey$2;
  515. var $TypeError$b = TypeError;
  516. // eslint-disable-next-line es/no-object-defineproperty -- safe
  517. var $defineProperty = Object.defineProperty;
  518. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  519. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  520. var ENUMERABLE = 'enumerable';
  521. var CONFIGURABLE$1 = 'configurable';
  522. var WRITABLE = 'writable';
  523. // `Object.defineProperty` method
  524. // https://tc39.es/ecma262/#sec-object.defineproperty
  525. objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  526. anObject$e(O);
  527. P = toPropertyKey(P);
  528. anObject$e(Attributes);
  529. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  530. var current = $getOwnPropertyDescriptor(O, P);
  531. if (current && current[WRITABLE]) {
  532. O[P] = Attributes.value;
  533. Attributes = {
  534. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  535. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  536. writable: false
  537. };
  538. }
  539. } return $defineProperty(O, P, Attributes);
  540. } : $defineProperty : function defineProperty(O, P, Attributes) {
  541. anObject$e(O);
  542. P = toPropertyKey(P);
  543. anObject$e(Attributes);
  544. if (IE8_DOM_DEFINE) try {
  545. return $defineProperty(O, P, Attributes);
  546. } catch (error) { /* empty */ }
  547. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$b('Accessors not supported');
  548. if ('value' in Attributes) O[P] = Attributes.value;
  549. return O;
  550. };
  551. var DESCRIPTORS$8 = descriptors;
  552. var definePropertyModule$4 = objectDefineProperty;
  553. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  554. var createNonEnumerableProperty$4 = DESCRIPTORS$8 ? function (object, key, value) {
  555. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  556. } : function (object, key, value) {
  557. object[key] = value;
  558. return object;
  559. };
  560. var makeBuiltIn$3 = {exports: {}};
  561. var DESCRIPTORS$7 = descriptors;
  562. var hasOwn$8 = hasOwnProperty_1;
  563. var FunctionPrototype$1 = Function.prototype;
  564. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  565. var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
  566. var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
  567. // additional protection from minified / mangled / dropped function names
  568. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  569. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$7 || (DESCRIPTORS$7 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  570. var functionName = {
  571. EXISTS: EXISTS,
  572. PROPER: PROPER,
  573. CONFIGURABLE: CONFIGURABLE
  574. };
  575. var uncurryThis$n = functionUncurryThis;
  576. var isCallable$d = isCallable$j;
  577. var store$1 = sharedStoreExports;
  578. var functionToString = uncurryThis$n(Function.toString);
  579. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  580. if (!isCallable$d(store$1.inspectSource)) {
  581. store$1.inspectSource = function (it) {
  582. return functionToString(it);
  583. };
  584. }
  585. var inspectSource$3 = store$1.inspectSource;
  586. var globalThis$f = globalThis_1;
  587. var isCallable$c = isCallable$j;
  588. var WeakMap$1 = globalThis$f.WeakMap;
  589. var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
  590. var shared$2 = shared$4;
  591. var uid = uid$2;
  592. var keys = shared$2('keys');
  593. var sharedKey$3 = function (key) {
  594. return keys[key] || (keys[key] = uid(key));
  595. };
  596. var hiddenKeys$4 = {};
  597. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  598. var globalThis$e = globalThis_1;
  599. var isObject$7 = isObject$c;
  600. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  601. var hasOwn$7 = hasOwnProperty_1;
  602. var shared$1 = sharedStoreExports;
  603. var sharedKey$2 = sharedKey$3;
  604. var hiddenKeys$3 = hiddenKeys$4;
  605. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  606. var TypeError$2 = globalThis$e.TypeError;
  607. var WeakMap = globalThis$e.WeakMap;
  608. var set$1, get, has;
  609. var enforce = function (it) {
  610. return has(it) ? get(it) : set$1(it, {});
  611. };
  612. var getterFor = function (TYPE) {
  613. return function (it) {
  614. var state;
  615. if (!isObject$7(it) || (state = get(it)).type !== TYPE) {
  616. throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  617. } return state;
  618. };
  619. };
  620. if (NATIVE_WEAK_MAP || shared$1.state) {
  621. var store = shared$1.state || (shared$1.state = new WeakMap());
  622. /* eslint-disable no-self-assign -- prototype methods protection */
  623. store.get = store.get;
  624. store.has = store.has;
  625. store.set = store.set;
  626. /* eslint-enable no-self-assign -- prototype methods protection */
  627. set$1 = function (it, metadata) {
  628. if (store.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  629. metadata.facade = it;
  630. store.set(it, metadata);
  631. return metadata;
  632. };
  633. get = function (it) {
  634. return store.get(it) || {};
  635. };
  636. has = function (it) {
  637. return store.has(it);
  638. };
  639. } else {
  640. var STATE = sharedKey$2('state');
  641. hiddenKeys$3[STATE] = true;
  642. set$1 = function (it, metadata) {
  643. if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  644. metadata.facade = it;
  645. createNonEnumerableProperty$3(it, STATE, metadata);
  646. return metadata;
  647. };
  648. get = function (it) {
  649. return hasOwn$7(it, STATE) ? it[STATE] : {};
  650. };
  651. has = function (it) {
  652. return hasOwn$7(it, STATE);
  653. };
  654. }
  655. var internalState = {
  656. set: set$1,
  657. get: get,
  658. has: has,
  659. enforce: enforce,
  660. getterFor: getterFor
  661. };
  662. var uncurryThis$m = functionUncurryThis;
  663. var fails$l = fails$s;
  664. var isCallable$b = isCallable$j;
  665. var hasOwn$6 = hasOwnProperty_1;
  666. var DESCRIPTORS$6 = descriptors;
  667. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  668. var inspectSource$2 = inspectSource$3;
  669. var InternalStateModule$1 = internalState;
  670. var enforceInternalState = InternalStateModule$1.enforce;
  671. var getInternalState$1 = InternalStateModule$1.get;
  672. var $String$2 = String;
  673. // eslint-disable-next-line es/no-object-defineproperty -- safe
  674. var defineProperty$4 = Object.defineProperty;
  675. var stringSlice$6 = uncurryThis$m(''.slice);
  676. var replace$3 = uncurryThis$m(''.replace);
  677. var join = uncurryThis$m([].join);
  678. var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$l(function () {
  679. return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  680. });
  681. var TEMPLATE = String(String).split('String');
  682. var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
  683. if (stringSlice$6($String$2(name), 0, 7) === 'Symbol(') {
  684. name = '[' + replace$3($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  685. }
  686. if (options && options.getter) name = 'get ' + name;
  687. if (options && options.setter) name = 'set ' + name;
  688. if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  689. if (DESCRIPTORS$6) defineProperty$4(value, 'name', { value: name, configurable: true });
  690. else value.name = name;
  691. }
  692. if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
  693. defineProperty$4(value, 'length', { value: options.arity });
  694. }
  695. try {
  696. if (options && hasOwn$6(options, 'constructor') && options.constructor) {
  697. if (DESCRIPTORS$6) defineProperty$4(value, 'prototype', { writable: false });
  698. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  699. } else if (value.prototype) value.prototype = undefined;
  700. } catch (error) { /* empty */ }
  701. var state = enforceInternalState(value);
  702. if (!hasOwn$6(state, 'source')) {
  703. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  704. } return value;
  705. };
  706. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  707. // eslint-disable-next-line no-extend-native -- required
  708. Function.prototype.toString = makeBuiltIn$2(function toString() {
  709. return isCallable$b(this) && getInternalState$1(this).source || inspectSource$2(this);
  710. }, 'toString');
  711. var makeBuiltInExports = makeBuiltIn$3.exports;
  712. var isCallable$a = isCallable$j;
  713. var definePropertyModule$3 = objectDefineProperty;
  714. var makeBuiltIn$1 = makeBuiltInExports;
  715. var defineGlobalProperty$1 = defineGlobalProperty$3;
  716. var defineBuiltIn$6 = function (O, key, value, options) {
  717. if (!options) options = {};
  718. var simple = options.enumerable;
  719. var name = options.name !== undefined ? options.name : key;
  720. if (isCallable$a(value)) makeBuiltIn$1(value, name, options);
  721. if (options.global) {
  722. if (simple) O[key] = value;
  723. else defineGlobalProperty$1(key, value);
  724. } else {
  725. try {
  726. if (!options.unsafe) delete O[key];
  727. else if (O[key]) simple = true;
  728. } catch (error) { /* empty */ }
  729. if (simple) O[key] = value;
  730. else definePropertyModule$3.f(O, key, {
  731. value: value,
  732. enumerable: false,
  733. configurable: !options.nonConfigurable,
  734. writable: !options.nonWritable
  735. });
  736. } return O;
  737. };
  738. var objectGetOwnPropertyNames = {};
  739. var ceil = Math.ceil;
  740. var floor$2 = Math.floor;
  741. // `Math.trunc` method
  742. // https://tc39.es/ecma262/#sec-math.trunc
  743. // eslint-disable-next-line es/no-math-trunc -- safe
  744. var mathTrunc = Math.trunc || function trunc(x) {
  745. var n = +x;
  746. return (n > 0 ? floor$2 : ceil)(n);
  747. };
  748. var trunc = mathTrunc;
  749. // `ToIntegerOrInfinity` abstract operation
  750. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  751. var toIntegerOrInfinity$4 = function (argument) {
  752. var number = +argument;
  753. // eslint-disable-next-line no-self-compare -- NaN check
  754. return number !== number || number === 0 ? 0 : trunc(number);
  755. };
  756. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  757. var max$1 = Math.max;
  758. var min$4 = Math.min;
  759. // Helper for a popular repeating case of the spec:
  760. // Let integer be ? ToInteger(index).
  761. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  762. var toAbsoluteIndex$1 = function (index, length) {
  763. var integer = toIntegerOrInfinity$3(index);
  764. return integer < 0 ? max$1(integer + length, 0) : min$4(integer, length);
  765. };
  766. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  767. var min$3 = Math.min;
  768. // `ToLength` abstract operation
  769. // https://tc39.es/ecma262/#sec-tolength
  770. var toLength$5 = function (argument) {
  771. var len = toIntegerOrInfinity$2(argument);
  772. return len > 0 ? min$3(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  773. };
  774. var toLength$4 = toLength$5;
  775. // `LengthOfArrayLike` abstract operation
  776. // https://tc39.es/ecma262/#sec-lengthofarraylike
  777. var lengthOfArrayLike$5 = function (obj) {
  778. return toLength$4(obj.length);
  779. };
  780. var toIndexedObject$4 = toIndexedObject$6;
  781. var toAbsoluteIndex = toAbsoluteIndex$1;
  782. var lengthOfArrayLike$4 = lengthOfArrayLike$5;
  783. // `Array.prototype.{ indexOf, includes }` methods implementation
  784. var createMethod$4 = function (IS_INCLUDES) {
  785. return function ($this, el, fromIndex) {
  786. var O = toIndexedObject$4($this);
  787. var length = lengthOfArrayLike$4(O);
  788. if (length === 0) return !IS_INCLUDES && -1;
  789. var index = toAbsoluteIndex(fromIndex, length);
  790. var value;
  791. // Array#includes uses SameValueZero equality algorithm
  792. // eslint-disable-next-line no-self-compare -- NaN check
  793. if (IS_INCLUDES && el !== el) while (length > index) {
  794. value = O[index++];
  795. // eslint-disable-next-line no-self-compare -- NaN check
  796. if (value !== value) return true;
  797. // Array#indexOf ignores holes, Array#includes - not
  798. } else for (;length > index; index++) {
  799. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  800. } return !IS_INCLUDES && -1;
  801. };
  802. };
  803. var arrayIncludes = {
  804. // `Array.prototype.includes` method
  805. // https://tc39.es/ecma262/#sec-array.prototype.includes
  806. includes: createMethod$4(true),
  807. // `Array.prototype.indexOf` method
  808. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  809. indexOf: createMethod$4(false)
  810. };
  811. var uncurryThis$l = functionUncurryThis;
  812. var hasOwn$5 = hasOwnProperty_1;
  813. var toIndexedObject$3 = toIndexedObject$6;
  814. var indexOf$1 = arrayIncludes.indexOf;
  815. var hiddenKeys$2 = hiddenKeys$4;
  816. var push$5 = uncurryThis$l([].push);
  817. var objectKeysInternal = function (object, names) {
  818. var O = toIndexedObject$3(object);
  819. var i = 0;
  820. var result = [];
  821. var key;
  822. for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$5(result, key);
  823. // Don't enum bug & hidden keys
  824. while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
  825. ~indexOf$1(result, key) || push$5(result, key);
  826. }
  827. return result;
  828. };
  829. // IE8- don't enum bug keys
  830. var enumBugKeys$3 = [
  831. 'constructor',
  832. 'hasOwnProperty',
  833. 'isPrototypeOf',
  834. 'propertyIsEnumerable',
  835. 'toLocaleString',
  836. 'toString',
  837. 'valueOf'
  838. ];
  839. var internalObjectKeys$1 = objectKeysInternal;
  840. var enumBugKeys$2 = enumBugKeys$3;
  841. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  842. // `Object.getOwnPropertyNames` method
  843. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  844. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  845. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  846. return internalObjectKeys$1(O, hiddenKeys$1);
  847. };
  848. var objectGetOwnPropertySymbols = {};
  849. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  850. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  851. var getBuiltIn$5 = getBuiltIn$7;
  852. var uncurryThis$k = functionUncurryThis;
  853. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  854. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  855. var anObject$d = anObject$f;
  856. var concat$2 = uncurryThis$k([].concat);
  857. // all object keys, includes non-enumerable and symbols
  858. var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
  859. var keys = getOwnPropertyNamesModule.f(anObject$d(it));
  860. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  861. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  862. };
  863. var hasOwn$4 = hasOwnProperty_1;
  864. var ownKeys = ownKeys$1;
  865. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  866. var definePropertyModule$2 = objectDefineProperty;
  867. var copyConstructorProperties$1 = function (target, source, exceptions) {
  868. var keys = ownKeys(source);
  869. var defineProperty = definePropertyModule$2.f;
  870. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  871. for (var i = 0; i < keys.length; i++) {
  872. var key = keys[i];
  873. if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
  874. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  875. }
  876. }
  877. };
  878. var fails$k = fails$s;
  879. var isCallable$9 = isCallable$j;
  880. var replacement = /#|\.prototype\./;
  881. var isForced$2 = function (feature, detection) {
  882. var value = data[normalize(feature)];
  883. return value === POLYFILL ? true
  884. : value === NATIVE ? false
  885. : isCallable$9(detection) ? fails$k(detection)
  886. : !!detection;
  887. };
  888. var normalize = isForced$2.normalize = function (string) {
  889. return String(string).replace(replacement, '.').toLowerCase();
  890. };
  891. var data = isForced$2.data = {};
  892. var NATIVE = isForced$2.NATIVE = 'N';
  893. var POLYFILL = isForced$2.POLYFILL = 'P';
  894. var isForced_1 = isForced$2;
  895. var globalThis$d = globalThis_1;
  896. var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
  897. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  898. var defineBuiltIn$5 = defineBuiltIn$6;
  899. var defineGlobalProperty = defineGlobalProperty$3;
  900. var copyConstructorProperties = copyConstructorProperties$1;
  901. var isForced$1 = isForced_1;
  902. /*
  903. options.target - name of the target object
  904. options.global - target is the global object
  905. options.stat - export as static methods of target
  906. options.proto - export as prototype methods of target
  907. options.real - real prototype method for the `pure` version
  908. options.forced - export even if the native feature is available
  909. options.bind - bind methods to the target, required for the `pure` version
  910. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  911. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  912. options.sham - add a flag to not completely full polyfills
  913. options.enumerable - export as enumerable property
  914. options.dontCallGetSet - prevent calling a getter on target
  915. options.name - the .name of the function if it does not match the key
  916. */
  917. var _export = function (options, source) {
  918. var TARGET = options.target;
  919. var GLOBAL = options.global;
  920. var STATIC = options.stat;
  921. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  922. if (GLOBAL) {
  923. target = globalThis$d;
  924. } else if (STATIC) {
  925. target = globalThis$d[TARGET] || defineGlobalProperty(TARGET, {});
  926. } else {
  927. target = globalThis$d[TARGET] && globalThis$d[TARGET].prototype;
  928. }
  929. if (target) for (key in source) {
  930. sourceProperty = source[key];
  931. if (options.dontCallGetSet) {
  932. descriptor = getOwnPropertyDescriptor$2(target, key);
  933. targetProperty = descriptor && descriptor.value;
  934. } else targetProperty = target[key];
  935. FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  936. // contained in target
  937. if (!FORCED && targetProperty !== undefined) {
  938. if (typeof sourceProperty == typeof targetProperty) continue;
  939. copyConstructorProperties(sourceProperty, targetProperty);
  940. }
  941. // add a flag to not completely full polyfills
  942. if (options.sham || (targetProperty && targetProperty.sham)) {
  943. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  944. }
  945. defineBuiltIn$5(target, key, sourceProperty, options);
  946. }
  947. };
  948. var classof$8 = classofRaw$2;
  949. // `IsArray` abstract operation
  950. // https://tc39.es/ecma262/#sec-isarray
  951. // eslint-disable-next-line es/no-array-isarray -- safe
  952. var isArray$2 = Array.isArray || function isArray(argument) {
  953. return classof$8(argument) === 'Array';
  954. };
  955. var $TypeError$a = TypeError;
  956. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  957. var doesNotExceedSafeInteger$1 = function (it) {
  958. if (it > MAX_SAFE_INTEGER) throw $TypeError$a('Maximum allowed index exceeded');
  959. return it;
  960. };
  961. var DESCRIPTORS$5 = descriptors;
  962. var definePropertyModule$1 = objectDefineProperty;
  963. var createPropertyDescriptor = createPropertyDescriptor$3;
  964. var createProperty$1 = function (object, key, value) {
  965. if (DESCRIPTORS$5) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
  966. else object[key] = value;
  967. };
  968. var wellKnownSymbol$g = wellKnownSymbol$i;
  969. var TO_STRING_TAG$2 = wellKnownSymbol$g('toStringTag');
  970. var test$1 = {};
  971. test$1[TO_STRING_TAG$2] = 'z';
  972. var toStringTagSupport = String(test$1) === '[object z]';
  973. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  974. var isCallable$8 = isCallable$j;
  975. var classofRaw$1 = classofRaw$2;
  976. var wellKnownSymbol$f = wellKnownSymbol$i;
  977. var TO_STRING_TAG$1 = wellKnownSymbol$f('toStringTag');
  978. var $Object$1 = Object;
  979. // ES3 wrong here
  980. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  981. // fallback for IE11 Script Access Denied error
  982. var tryGet = function (it, key) {
  983. try {
  984. return it[key];
  985. } catch (error) { /* empty */ }
  986. };
  987. // getting tag from ES6+ `Object.prototype.toString`
  988. var classof$7 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
  989. var O, tag, result;
  990. return it === undefined ? 'Undefined' : it === null ? 'Null'
  991. // @@toStringTag case
  992. : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
  993. // builtinTag case
  994. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  995. // ES3 arguments fallback
  996. : (result = classofRaw$1(O)) === 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
  997. };
  998. var uncurryThis$j = functionUncurryThis;
  999. var fails$j = fails$s;
  1000. var isCallable$7 = isCallable$j;
  1001. var classof$6 = classof$7;
  1002. var getBuiltIn$4 = getBuiltIn$7;
  1003. var inspectSource$1 = inspectSource$3;
  1004. var noop = function () { /* empty */ };
  1005. var construct = getBuiltIn$4('Reflect', 'construct');
  1006. var constructorRegExp = /^\s*(?:class|function)\b/;
  1007. var exec$2 = uncurryThis$j(constructorRegExp.exec);
  1008. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1009. var isConstructorModern = function isConstructor(argument) {
  1010. if (!isCallable$7(argument)) return false;
  1011. try {
  1012. construct(noop, [], argument);
  1013. return true;
  1014. } catch (error) {
  1015. return false;
  1016. }
  1017. };
  1018. var isConstructorLegacy = function isConstructor(argument) {
  1019. if (!isCallable$7(argument)) return false;
  1020. switch (classof$6(argument)) {
  1021. case 'AsyncFunction':
  1022. case 'GeneratorFunction':
  1023. case 'AsyncGeneratorFunction': return false;
  1024. }
  1025. try {
  1026. // we can't check .prototype since constructors produced by .bind haven't it
  1027. // `Function#toString` throws on some built-it function in some legacy engines
  1028. // (for example, `DOMQuad` and similar in FF41-)
  1029. return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource$1(argument));
  1030. } catch (error) {
  1031. return true;
  1032. }
  1033. };
  1034. isConstructorLegacy.sham = true;
  1035. // `IsConstructor` abstract operation
  1036. // https://tc39.es/ecma262/#sec-isconstructor
  1037. var isConstructor$2 = !construct || fails$j(function () {
  1038. var called;
  1039. return isConstructorModern(isConstructorModern.call)
  1040. || !isConstructorModern(Object)
  1041. || !isConstructorModern(function () { called = true; })
  1042. || called;
  1043. }) ? isConstructorLegacy : isConstructorModern;
  1044. var isArray$1 = isArray$2;
  1045. var isConstructor$1 = isConstructor$2;
  1046. var isObject$6 = isObject$c;
  1047. var wellKnownSymbol$e = wellKnownSymbol$i;
  1048. var SPECIES$5 = wellKnownSymbol$e('species');
  1049. var $Array = Array;
  1050. // a part of `ArraySpeciesCreate` abstract operation
  1051. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1052. var arraySpeciesConstructor$1 = function (originalArray) {
  1053. var C;
  1054. if (isArray$1(originalArray)) {
  1055. C = originalArray.constructor;
  1056. // cross-realm fallback
  1057. if (isConstructor$1(C) && (C === $Array || isArray$1(C.prototype))) C = undefined;
  1058. else if (isObject$6(C)) {
  1059. C = C[SPECIES$5];
  1060. if (C === null) C = undefined;
  1061. }
  1062. } return C === undefined ? $Array : C;
  1063. };
  1064. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1065. // `ArraySpeciesCreate` abstract operation
  1066. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1067. var arraySpeciesCreate$2 = function (originalArray, length) {
  1068. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1069. };
  1070. var fails$i = fails$s;
  1071. var wellKnownSymbol$d = wellKnownSymbol$i;
  1072. var V8_VERSION$2 = environmentV8Version;
  1073. var SPECIES$4 = wellKnownSymbol$d('species');
  1074. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1075. // We can't use this feature detection in V8 since it causes
  1076. // deoptimization and serious performance degradation
  1077. // https://github.com/zloirock/core-js/issues/677
  1078. return V8_VERSION$2 >= 51 || !fails$i(function () {
  1079. var array = [];
  1080. var constructor = array.constructor = {};
  1081. constructor[SPECIES$4] = function () {
  1082. return { foo: 1 };
  1083. };
  1084. return array[METHOD_NAME](Boolean).foo !== 1;
  1085. });
  1086. };
  1087. var $$k = _export;
  1088. var fails$h = fails$s;
  1089. var isArray = isArray$2;
  1090. var isObject$5 = isObject$c;
  1091. var toObject$6 = toObject$8;
  1092. var lengthOfArrayLike$3 = lengthOfArrayLike$5;
  1093. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1094. var createProperty = createProperty$1;
  1095. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1096. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1097. var wellKnownSymbol$c = wellKnownSymbol$i;
  1098. var V8_VERSION$1 = environmentV8Version;
  1099. var IS_CONCAT_SPREADABLE = wellKnownSymbol$c('isConcatSpreadable');
  1100. // We can't use this feature detection in V8 since it causes
  1101. // deoptimization and serious performance degradation
  1102. // https://github.com/zloirock/core-js/issues/679
  1103. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION$1 >= 51 || !fails$h(function () {
  1104. var array = [];
  1105. array[IS_CONCAT_SPREADABLE] = false;
  1106. return array.concat()[0] !== array;
  1107. });
  1108. var isConcatSpreadable = function (O) {
  1109. if (!isObject$5(O)) return false;
  1110. var spreadable = O[IS_CONCAT_SPREADABLE];
  1111. return spreadable !== undefined ? !!spreadable : isArray(O);
  1112. };
  1113. var FORCED$4 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$1('concat');
  1114. // `Array.prototype.concat` method
  1115. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1116. // with adding support of @@isConcatSpreadable and @@species
  1117. $$k({ target: 'Array', proto: true, arity: 1, forced: FORCED$4 }, {
  1118. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1119. concat: function concat(arg) {
  1120. var O = toObject$6(this);
  1121. var A = arraySpeciesCreate$1(O, 0);
  1122. var n = 0;
  1123. var i, k, length, len, E;
  1124. for (i = -1, length = arguments.length; i < length; i++) {
  1125. E = i === -1 ? O : arguments[i];
  1126. if (isConcatSpreadable(E)) {
  1127. len = lengthOfArrayLike$3(E);
  1128. doesNotExceedSafeInteger(n + len);
  1129. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1130. } else {
  1131. doesNotExceedSafeInteger(n + 1);
  1132. createProperty(A, n++, E);
  1133. }
  1134. }
  1135. A.length = n;
  1136. return A;
  1137. }
  1138. });
  1139. var classofRaw = classofRaw$2;
  1140. var uncurryThis$i = functionUncurryThis;
  1141. var functionUncurryThisClause = function (fn) {
  1142. // Nashorn bug:
  1143. // https://github.com/zloirock/core-js/issues/1128
  1144. // https://github.com/zloirock/core-js/issues/1130
  1145. if (classofRaw(fn) === 'Function') return uncurryThis$i(fn);
  1146. };
  1147. var uncurryThis$h = functionUncurryThisClause;
  1148. var aCallable$7 = aCallable$9;
  1149. var NATIVE_BIND$1 = functionBindNative;
  1150. var bind$5 = uncurryThis$h(uncurryThis$h.bind);
  1151. // optional / simple context binding
  1152. var functionBindContext = function (fn, that) {
  1153. aCallable$7(fn);
  1154. return that === undefined ? fn : NATIVE_BIND$1 ? bind$5(fn, that) : function (/* ...args */) {
  1155. return fn.apply(that, arguments);
  1156. };
  1157. };
  1158. var bind$4 = functionBindContext;
  1159. var uncurryThis$g = functionUncurryThis;
  1160. var IndexedObject$2 = indexedObject;
  1161. var toObject$5 = toObject$8;
  1162. var lengthOfArrayLike$2 = lengthOfArrayLike$5;
  1163. var arraySpeciesCreate = arraySpeciesCreate$2;
  1164. var push$4 = uncurryThis$g([].push);
  1165. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1166. var createMethod$3 = function (TYPE) {
  1167. var IS_MAP = TYPE === 1;
  1168. var IS_FILTER = TYPE === 2;
  1169. var IS_SOME = TYPE === 3;
  1170. var IS_EVERY = TYPE === 4;
  1171. var IS_FIND_INDEX = TYPE === 6;
  1172. var IS_FILTER_REJECT = TYPE === 7;
  1173. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1174. return function ($this, callbackfn, that, specificCreate) {
  1175. var O = toObject$5($this);
  1176. var self = IndexedObject$2(O);
  1177. var length = lengthOfArrayLike$2(self);
  1178. var boundFunction = bind$4(callbackfn, that);
  1179. var index = 0;
  1180. var create = specificCreate || arraySpeciesCreate;
  1181. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1182. var value, result;
  1183. for (;length > index; index++) if (NO_HOLES || index in self) {
  1184. value = self[index];
  1185. result = boundFunction(value, index, O);
  1186. if (TYPE) {
  1187. if (IS_MAP) target[index] = result; // map
  1188. else if (result) switch (TYPE) {
  1189. case 3: return true; // some
  1190. case 5: return value; // find
  1191. case 6: return index; // findIndex
  1192. case 2: push$4(target, value); // filter
  1193. } else switch (TYPE) {
  1194. case 4: return false; // every
  1195. case 7: push$4(target, value); // filterReject
  1196. }
  1197. }
  1198. }
  1199. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1200. };
  1201. };
  1202. var arrayIteration = {
  1203. // `Array.prototype.forEach` method
  1204. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1205. forEach: createMethod$3(0),
  1206. // `Array.prototype.map` method
  1207. // https://tc39.es/ecma262/#sec-array.prototype.map
  1208. map: createMethod$3(1),
  1209. // `Array.prototype.filter` method
  1210. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1211. filter: createMethod$3(2),
  1212. // `Array.prototype.some` method
  1213. // https://tc39.es/ecma262/#sec-array.prototype.some
  1214. some: createMethod$3(3),
  1215. // `Array.prototype.every` method
  1216. // https://tc39.es/ecma262/#sec-array.prototype.every
  1217. every: createMethod$3(4),
  1218. // `Array.prototype.find` method
  1219. // https://tc39.es/ecma262/#sec-array.prototype.find
  1220. find: createMethod$3(5),
  1221. // `Array.prototype.findIndex` method
  1222. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1223. findIndex: createMethod$3(6),
  1224. // `Array.prototype.filterReject` method
  1225. // https://github.com/tc39/proposal-array-filtering
  1226. filterReject: createMethod$3(7)
  1227. };
  1228. var $$j = _export;
  1229. var $filter = arrayIteration.filter;
  1230. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1231. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  1232. // `Array.prototype.filter` method
  1233. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1234. // with adding support of @@species
  1235. $$j({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1236. filter: function filter(callbackfn /* , thisArg */) {
  1237. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1238. }
  1239. });
  1240. var objectDefineProperties = {};
  1241. var internalObjectKeys = objectKeysInternal;
  1242. var enumBugKeys$1 = enumBugKeys$3;
  1243. // `Object.keys` method
  1244. // https://tc39.es/ecma262/#sec-object.keys
  1245. // eslint-disable-next-line es/no-object-keys -- safe
  1246. var objectKeys$3 = Object.keys || function keys(O) {
  1247. return internalObjectKeys(O, enumBugKeys$1);
  1248. };
  1249. var DESCRIPTORS$4 = descriptors;
  1250. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1251. var definePropertyModule = objectDefineProperty;
  1252. var anObject$c = anObject$f;
  1253. var toIndexedObject$2 = toIndexedObject$6;
  1254. var objectKeys$2 = objectKeys$3;
  1255. // `Object.defineProperties` method
  1256. // https://tc39.es/ecma262/#sec-object.defineproperties
  1257. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1258. objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1259. anObject$c(O);
  1260. var props = toIndexedObject$2(Properties);
  1261. var keys = objectKeys$2(Properties);
  1262. var length = keys.length;
  1263. var index = 0;
  1264. var key;
  1265. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1266. return O;
  1267. };
  1268. var getBuiltIn$3 = getBuiltIn$7;
  1269. var html$2 = getBuiltIn$3('document', 'documentElement');
  1270. /* global ActiveXObject -- old IE, WSH */
  1271. var anObject$b = anObject$f;
  1272. var definePropertiesModule = objectDefineProperties;
  1273. var enumBugKeys = enumBugKeys$3;
  1274. var hiddenKeys = hiddenKeys$4;
  1275. var html$1 = html$2;
  1276. var documentCreateElement$1 = documentCreateElement$2;
  1277. var sharedKey$1 = sharedKey$3;
  1278. var GT = '>';
  1279. var LT = '<';
  1280. var PROTOTYPE = 'prototype';
  1281. var SCRIPT = 'script';
  1282. var IE_PROTO$1 = sharedKey$1('IE_PROTO');
  1283. var EmptyConstructor = function () { /* empty */ };
  1284. var scriptTag = function (content) {
  1285. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1286. };
  1287. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1288. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1289. activeXDocument.write(scriptTag(''));
  1290. activeXDocument.close();
  1291. var temp = activeXDocument.parentWindow.Object;
  1292. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  1293. activeXDocument = null;
  1294. return temp;
  1295. };
  1296. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1297. var NullProtoObjectViaIFrame = function () {
  1298. // Thrash, waste and sodomy: IE GC bug
  1299. var iframe = documentCreateElement$1('iframe');
  1300. var JS = 'java' + SCRIPT + ':';
  1301. var iframeDocument;
  1302. iframe.style.display = 'none';
  1303. html$1.appendChild(iframe);
  1304. // https://github.com/zloirock/core-js/issues/475
  1305. iframe.src = String(JS);
  1306. iframeDocument = iframe.contentWindow.document;
  1307. iframeDocument.open();
  1308. iframeDocument.write(scriptTag('document.F=Object'));
  1309. iframeDocument.close();
  1310. return iframeDocument.F;
  1311. };
  1312. // Check for document.domain and active x support
  1313. // No need to use active x approach when document.domain is not set
  1314. // see https://github.com/es-shims/es5-shim/issues/150
  1315. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1316. // avoid IE GC bug
  1317. var activeXDocument;
  1318. var NullProtoObject = function () {
  1319. try {
  1320. activeXDocument = new ActiveXObject('htmlfile');
  1321. } catch (error) { /* ignore */ }
  1322. NullProtoObject = typeof document != 'undefined'
  1323. ? document.domain && activeXDocument
  1324. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1325. : NullProtoObjectViaIFrame()
  1326. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1327. var length = enumBugKeys.length;
  1328. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1329. return NullProtoObject();
  1330. };
  1331. hiddenKeys[IE_PROTO$1] = true;
  1332. // `Object.create` method
  1333. // https://tc39.es/ecma262/#sec-object.create
  1334. // eslint-disable-next-line es/no-object-create -- safe
  1335. var objectCreate = Object.create || function create(O, Properties) {
  1336. var result;
  1337. if (O !== null) {
  1338. EmptyConstructor[PROTOTYPE] = anObject$b(O);
  1339. result = new EmptyConstructor();
  1340. EmptyConstructor[PROTOTYPE] = null;
  1341. // add "__proto__" for Object.getPrototypeOf polyfill
  1342. result[IE_PROTO$1] = O;
  1343. } else result = NullProtoObject();
  1344. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1345. };
  1346. var wellKnownSymbol$b = wellKnownSymbol$i;
  1347. var create$1 = objectCreate;
  1348. var defineProperty$3 = objectDefineProperty.f;
  1349. var UNSCOPABLES = wellKnownSymbol$b('unscopables');
  1350. var ArrayPrototype$1 = Array.prototype;
  1351. // Array.prototype[@@unscopables]
  1352. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1353. if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
  1354. defineProperty$3(ArrayPrototype$1, UNSCOPABLES, {
  1355. configurable: true,
  1356. value: create$1(null)
  1357. });
  1358. }
  1359. // add a key to Array.prototype[@@unscopables]
  1360. var addToUnscopables$2 = function (key) {
  1361. ArrayPrototype$1[UNSCOPABLES][key] = true;
  1362. };
  1363. var $$i = _export;
  1364. var $find = arrayIteration.find;
  1365. var addToUnscopables$1 = addToUnscopables$2;
  1366. var FIND = 'find';
  1367. var SKIPS_HOLES = true;
  1368. // Shouldn't skip holes
  1369. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1370. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1371. // `Array.prototype.find` method
  1372. // https://tc39.es/ecma262/#sec-array.prototype.find
  1373. $$i({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1374. find: function find(callbackfn /* , that = undefined */) {
  1375. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1376. }
  1377. });
  1378. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1379. addToUnscopables$1(FIND);
  1380. var $$h = _export;
  1381. var $includes = arrayIncludes.includes;
  1382. var fails$g = fails$s;
  1383. var addToUnscopables = addToUnscopables$2;
  1384. // FF99+ bug
  1385. var BROKEN_ON_SPARSE = fails$g(function () {
  1386. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1387. return !Array(1).includes();
  1388. });
  1389. // `Array.prototype.includes` method
  1390. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1391. $$h({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1392. includes: function includes(el /* , fromIndex = 0 */) {
  1393. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1394. }
  1395. });
  1396. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1397. addToUnscopables('includes');
  1398. var fails$f = fails$s;
  1399. var arrayMethodIsStrict$4 = function (METHOD_NAME, argument) {
  1400. var method = [][METHOD_NAME];
  1401. return !!method && fails$f(function () {
  1402. // eslint-disable-next-line no-useless-call -- required for testing
  1403. method.call(null, argument || function () { return 1; }, 1);
  1404. });
  1405. };
  1406. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1407. var $$g = _export;
  1408. var uncurryThis$f = functionUncurryThisClause;
  1409. var $indexOf = arrayIncludes.indexOf;
  1410. var arrayMethodIsStrict$3 = arrayMethodIsStrict$4;
  1411. var nativeIndexOf = uncurryThis$f([].indexOf);
  1412. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1413. var FORCED$3 = NEGATIVE_ZERO || !arrayMethodIsStrict$3('indexOf');
  1414. // `Array.prototype.indexOf` method
  1415. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1416. $$g({ target: 'Array', proto: true, forced: FORCED$3 }, {
  1417. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1418. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1419. return NEGATIVE_ZERO
  1420. // convert -0 to +0
  1421. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1422. : $indexOf(this, searchElement, fromIndex);
  1423. }
  1424. });
  1425. var DESCRIPTORS$3 = descriptors;
  1426. var uncurryThis$e = functionUncurryThis;
  1427. var call$e = functionCall;
  1428. var fails$e = fails$s;
  1429. var objectKeys$1 = objectKeys$3;
  1430. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1431. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1432. var toObject$4 = toObject$8;
  1433. var IndexedObject$1 = indexedObject;
  1434. // eslint-disable-next-line es/no-object-assign -- safe
  1435. var $assign = Object.assign;
  1436. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1437. var defineProperty$2 = Object.defineProperty;
  1438. var concat$1 = uncurryThis$e([].concat);
  1439. // `Object.assign` method
  1440. // https://tc39.es/ecma262/#sec-object.assign
  1441. var objectAssign = !$assign || fails$e(function () {
  1442. // should have correct order of operations (Edge bug)
  1443. if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
  1444. enumerable: true,
  1445. get: function () {
  1446. defineProperty$2(this, 'b', {
  1447. value: 3,
  1448. enumerable: false
  1449. });
  1450. }
  1451. }), { b: 2 })).b !== 1) return true;
  1452. // should work with symbols and should have deterministic property order (V8 bug)
  1453. var A = {};
  1454. var B = {};
  1455. // eslint-disable-next-line es/no-symbol -- safe
  1456. var symbol = Symbol('assign detection');
  1457. var alphabet = 'abcdefghijklmnopqrst';
  1458. A[symbol] = 7;
  1459. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1460. return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
  1461. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1462. var T = toObject$4(target);
  1463. var argumentsLength = arguments.length;
  1464. var index = 1;
  1465. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1466. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1467. while (argumentsLength > index) {
  1468. var S = IndexedObject$1(arguments[index++]);
  1469. var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
  1470. var length = keys.length;
  1471. var j = 0;
  1472. var key;
  1473. while (length > j) {
  1474. key = keys[j++];
  1475. if (!DESCRIPTORS$3 || call$e(propertyIsEnumerable, S, key)) T[key] = S[key];
  1476. }
  1477. } return T;
  1478. } : $assign;
  1479. var $$f = _export;
  1480. var assign = objectAssign;
  1481. // `Object.assign` method
  1482. // https://tc39.es/ecma262/#sec-object.assign
  1483. // eslint-disable-next-line es/no-object-assign -- required for testing
  1484. $$f({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1485. assign: assign
  1486. });
  1487. var $$e = _export;
  1488. var toObject$3 = toObject$8;
  1489. var nativeKeys = objectKeys$3;
  1490. var fails$d = fails$s;
  1491. var FAILS_ON_PRIMITIVES = fails$d(function () { nativeKeys(1); });
  1492. // `Object.keys` method
  1493. // https://tc39.es/ecma262/#sec-object.keys
  1494. $$e({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1495. keys: function keys(it) {
  1496. return nativeKeys(toObject$3(it));
  1497. }
  1498. });
  1499. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1500. var classof$5 = classof$7;
  1501. // `Object.prototype.toString` method implementation
  1502. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1503. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1504. return '[object ' + classof$5(this) + ']';
  1505. };
  1506. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1507. var defineBuiltIn$4 = defineBuiltIn$6;
  1508. var toString$b = objectToString;
  1509. // `Object.prototype.toString` method
  1510. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1511. if (!TO_STRING_TAG_SUPPORT) {
  1512. defineBuiltIn$4(Object.prototype, 'toString', toString$b, { unsafe: true });
  1513. }
  1514. var fails$c = fails$s;
  1515. var correctPrototypeGetter = !fails$c(function () {
  1516. function F() { /* empty */ }
  1517. F.prototype.constructor = null;
  1518. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  1519. return Object.getPrototypeOf(new F()) !== F.prototype;
  1520. });
  1521. var hasOwn$3 = hasOwnProperty_1;
  1522. var isCallable$6 = isCallable$j;
  1523. var toObject$2 = toObject$8;
  1524. var sharedKey = sharedKey$3;
  1525. var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
  1526. var IE_PROTO = sharedKey('IE_PROTO');
  1527. var $Object = Object;
  1528. var ObjectPrototype = $Object.prototype;
  1529. // `Object.getPrototypeOf` method
  1530. // https://tc39.es/ecma262/#sec-object.getprototypeof
  1531. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  1532. var objectGetPrototypeOf$1 = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  1533. var object = toObject$2(O);
  1534. if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
  1535. var constructor = object.constructor;
  1536. if (isCallable$6(constructor) && object instanceof constructor) {
  1537. return constructor.prototype;
  1538. } return object instanceof $Object ? ObjectPrototype : null;
  1539. };
  1540. var DESCRIPTORS$2 = descriptors;
  1541. var fails$b = fails$s;
  1542. var uncurryThis$d = functionUncurryThis;
  1543. var objectGetPrototypeOf = objectGetPrototypeOf$1;
  1544. var objectKeys = objectKeys$3;
  1545. var toIndexedObject$1 = toIndexedObject$6;
  1546. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1547. var propertyIsEnumerable = uncurryThis$d($propertyIsEnumerable);
  1548. var push$3 = uncurryThis$d([].push);
  1549. // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
  1550. // of `null` prototype objects
  1551. var IE_BUG = DESCRIPTORS$2 && fails$b(function () {
  1552. // eslint-disable-next-line es/no-object-create -- safe
  1553. var O = Object.create(null);
  1554. O[2] = 2;
  1555. return !propertyIsEnumerable(O, 2);
  1556. });
  1557. // `Object.{ entries, values }` methods implementation
  1558. var createMethod$2 = function (TO_ENTRIES) {
  1559. return function (it) {
  1560. var O = toIndexedObject$1(it);
  1561. var keys = objectKeys(O);
  1562. var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
  1563. var length = keys.length;
  1564. var i = 0;
  1565. var result = [];
  1566. var key;
  1567. while (length > i) {
  1568. key = keys[i++];
  1569. if (!DESCRIPTORS$2 || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
  1570. push$3(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1571. }
  1572. }
  1573. return result;
  1574. };
  1575. };
  1576. var objectToArray = {
  1577. // `Object.entries` method
  1578. // https://tc39.es/ecma262/#sec-object.entries
  1579. entries: createMethod$2(true),
  1580. // `Object.values` method
  1581. // https://tc39.es/ecma262/#sec-object.values
  1582. values: createMethod$2(false)
  1583. };
  1584. var $$d = _export;
  1585. var $values = objectToArray.values;
  1586. // `Object.values` method
  1587. // https://tc39.es/ecma262/#sec-object.values
  1588. $$d({ target: 'Object', stat: true }, {
  1589. values: function values(O) {
  1590. return $values(O);
  1591. }
  1592. });
  1593. var classof$4 = classof$7;
  1594. var $String$1 = String;
  1595. var toString$a = function (argument) {
  1596. if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1597. return $String$1(argument);
  1598. };
  1599. // a string of all valid unicode whitespaces
  1600. var whitespaces$3 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1601. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1602. var uncurryThis$c = functionUncurryThis;
  1603. var requireObjectCoercible$7 = requireObjectCoercible$a;
  1604. var toString$9 = toString$a;
  1605. var whitespaces$2 = whitespaces$3;
  1606. var replace$2 = uncurryThis$c(''.replace);
  1607. var ltrim = RegExp('^[' + whitespaces$2 + ']+');
  1608. var rtrim = RegExp('(^|[^' + whitespaces$2 + '])[' + whitespaces$2 + ']+$');
  1609. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1610. var createMethod$1 = function (TYPE) {
  1611. return function ($this) {
  1612. var string = toString$9(requireObjectCoercible$7($this));
  1613. if (TYPE & 1) string = replace$2(string, ltrim, '');
  1614. if (TYPE & 2) string = replace$2(string, rtrim, '$1');
  1615. return string;
  1616. };
  1617. };
  1618. var stringTrim = {
  1619. // `String.prototype.{ trimLeft, trimStart }` methods
  1620. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1621. start: createMethod$1(1),
  1622. // `String.prototype.{ trimRight, trimEnd }` methods
  1623. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1624. end: createMethod$1(2),
  1625. // `String.prototype.trim` method
  1626. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1627. trim: createMethod$1(3)
  1628. };
  1629. var globalThis$c = globalThis_1;
  1630. var fails$a = fails$s;
  1631. var uncurryThis$b = functionUncurryThis;
  1632. var toString$8 = toString$a;
  1633. var trim = stringTrim.trim;
  1634. var whitespaces$1 = whitespaces$3;
  1635. var $parseInt$1 = globalThis$c.parseInt;
  1636. var Symbol$1 = globalThis$c.Symbol;
  1637. var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
  1638. var hex = /^[+-]?0x/i;
  1639. var exec$1 = uncurryThis$b(hex.exec);
  1640. var FORCED$2 = $parseInt$1(whitespaces$1 + '08') !== 8 || $parseInt$1(whitespaces$1 + '0x16') !== 22
  1641. // MS Edge 18- broken with boxed symbols
  1642. || (ITERATOR$3 && !fails$a(function () { $parseInt$1(Object(ITERATOR$3)); }));
  1643. // `parseInt` method
  1644. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1645. var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
  1646. var S = trim(toString$8(string));
  1647. return $parseInt$1(S, (radix >>> 0) || (exec$1(hex, S) ? 16 : 10));
  1648. } : $parseInt$1;
  1649. var $$c = _export;
  1650. var $parseInt = numberParseInt;
  1651. // `parseInt` method
  1652. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1653. $$c({ global: true, forced: parseInt !== $parseInt }, {
  1654. parseInt: $parseInt
  1655. });
  1656. /* global Bun, Deno -- detection */
  1657. var globalThis$b = globalThis_1;
  1658. var userAgent$5 = environmentUserAgent;
  1659. var classof$3 = classofRaw$2;
  1660. var userAgentStartsWith = function (string) {
  1661. return userAgent$5.slice(0, string.length) === string;
  1662. };
  1663. var environment = (function () {
  1664. if (userAgentStartsWith('Bun/')) return 'BUN';
  1665. if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
  1666. if (userAgentStartsWith('Deno/')) return 'DENO';
  1667. if (userAgentStartsWith('Node.js/')) return 'NODE';
  1668. if (globalThis$b.Bun && typeof Bun.version == 'string') return 'BUN';
  1669. if (globalThis$b.Deno && typeof Deno.version == 'object') return 'DENO';
  1670. if (classof$3(globalThis$b.process) === 'process') return 'NODE';
  1671. if (globalThis$b.window && globalThis$b.document) return 'BROWSER';
  1672. return 'REST';
  1673. })();
  1674. var ENVIRONMENT$1 = environment;
  1675. var environmentIsNode = ENVIRONMENT$1 === 'NODE';
  1676. var uncurryThis$a = functionUncurryThis;
  1677. var aCallable$6 = aCallable$9;
  1678. var functionUncurryThisAccessor = function (object, key, method) {
  1679. try {
  1680. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1681. return uncurryThis$a(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
  1682. } catch (error) { /* empty */ }
  1683. };
  1684. var isObject$4 = isObject$c;
  1685. var isPossiblePrototype$1 = function (argument) {
  1686. return isObject$4(argument) || argument === null;
  1687. };
  1688. var isPossiblePrototype = isPossiblePrototype$1;
  1689. var $String = String;
  1690. var $TypeError$9 = TypeError;
  1691. var aPossiblePrototype$1 = function (argument) {
  1692. if (isPossiblePrototype(argument)) return argument;
  1693. throw new $TypeError$9("Can't set " + $String(argument) + ' as a prototype');
  1694. };
  1695. /* eslint-disable no-proto -- safe */
  1696. var uncurryThisAccessor = functionUncurryThisAccessor;
  1697. var isObject$3 = isObject$c;
  1698. var requireObjectCoercible$6 = requireObjectCoercible$a;
  1699. var aPossiblePrototype = aPossiblePrototype$1;
  1700. // `Object.setPrototypeOf` method
  1701. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1702. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1703. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  1704. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1705. var CORRECT_SETTER = false;
  1706. var test = {};
  1707. var setter;
  1708. try {
  1709. setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
  1710. setter(test, []);
  1711. CORRECT_SETTER = test instanceof Array;
  1712. } catch (error) { /* empty */ }
  1713. return function setPrototypeOf(O, proto) {
  1714. requireObjectCoercible$6(O);
  1715. aPossiblePrototype(proto);
  1716. if (!isObject$3(O)) return O;
  1717. if (CORRECT_SETTER) setter(O, proto);
  1718. else O.__proto__ = proto;
  1719. return O;
  1720. };
  1721. }() : undefined);
  1722. var defineProperty$1 = objectDefineProperty.f;
  1723. var hasOwn$2 = hasOwnProperty_1;
  1724. var wellKnownSymbol$a = wellKnownSymbol$i;
  1725. var TO_STRING_TAG = wellKnownSymbol$a('toStringTag');
  1726. var setToStringTag$1 = function (target, TAG, STATIC) {
  1727. if (target && !STATIC) target = target.prototype;
  1728. if (target && !hasOwn$2(target, TO_STRING_TAG)) {
  1729. defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
  1730. }
  1731. };
  1732. var makeBuiltIn = makeBuiltInExports;
  1733. var defineProperty = objectDefineProperty;
  1734. var defineBuiltInAccessor$1 = function (target, name, descriptor) {
  1735. if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  1736. if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  1737. return defineProperty.f(target, name, descriptor);
  1738. };
  1739. var getBuiltIn$2 = getBuiltIn$7;
  1740. var defineBuiltInAccessor = defineBuiltInAccessor$1;
  1741. var wellKnownSymbol$9 = wellKnownSymbol$i;
  1742. var DESCRIPTORS$1 = descriptors;
  1743. var SPECIES$3 = wellKnownSymbol$9('species');
  1744. var setSpecies$1 = function (CONSTRUCTOR_NAME) {
  1745. var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
  1746. if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$3]) {
  1747. defineBuiltInAccessor(Constructor, SPECIES$3, {
  1748. configurable: true,
  1749. get: function () { return this; }
  1750. });
  1751. }
  1752. };
  1753. var isPrototypeOf$2 = objectIsPrototypeOf;
  1754. var $TypeError$8 = TypeError;
  1755. var anInstance$1 = function (it, Prototype) {
  1756. if (isPrototypeOf$2(Prototype, it)) return it;
  1757. throw new $TypeError$8('Incorrect invocation');
  1758. };
  1759. var isConstructor = isConstructor$2;
  1760. var tryToString$3 = tryToString$5;
  1761. var $TypeError$7 = TypeError;
  1762. // `Assert: IsConstructor(argument) is true`
  1763. var aConstructor$1 = function (argument) {
  1764. if (isConstructor(argument)) return argument;
  1765. throw new $TypeError$7(tryToString$3(argument) + ' is not a constructor');
  1766. };
  1767. var anObject$a = anObject$f;
  1768. var aConstructor = aConstructor$1;
  1769. var isNullOrUndefined$4 = isNullOrUndefined$7;
  1770. var wellKnownSymbol$8 = wellKnownSymbol$i;
  1771. var SPECIES$2 = wellKnownSymbol$8('species');
  1772. // `SpeciesConstructor` abstract operation
  1773. // https://tc39.es/ecma262/#sec-speciesconstructor
  1774. var speciesConstructor$2 = function (O, defaultConstructor) {
  1775. var C = anObject$a(O).constructor;
  1776. var S;
  1777. return C === undefined || isNullOrUndefined$4(S = anObject$a(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
  1778. };
  1779. var NATIVE_BIND = functionBindNative;
  1780. var FunctionPrototype = Function.prototype;
  1781. var apply$2 = FunctionPrototype.apply;
  1782. var call$d = FunctionPrototype.call;
  1783. // eslint-disable-next-line es/no-reflect -- safe
  1784. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$d.bind(apply$2) : function () {
  1785. return call$d.apply(apply$2, arguments);
  1786. });
  1787. var uncurryThis$9 = functionUncurryThis;
  1788. var arraySlice$2 = uncurryThis$9([].slice);
  1789. var $TypeError$6 = TypeError;
  1790. var validateArgumentsLength$1 = function (passed, required) {
  1791. if (passed < required) throw new $TypeError$6('Not enough arguments');
  1792. return passed;
  1793. };
  1794. var userAgent$4 = environmentUserAgent;
  1795. // eslint-disable-next-line redos/no-vulnerable -- safe
  1796. var environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
  1797. var globalThis$a = globalThis_1;
  1798. var apply$1 = functionApply;
  1799. var bind$3 = functionBindContext;
  1800. var isCallable$5 = isCallable$j;
  1801. var hasOwn$1 = hasOwnProperty_1;
  1802. var fails$9 = fails$s;
  1803. var html = html$2;
  1804. var arraySlice$1 = arraySlice$2;
  1805. var createElement = documentCreateElement$2;
  1806. var validateArgumentsLength = validateArgumentsLength$1;
  1807. var IS_IOS$1 = environmentIsIos;
  1808. var IS_NODE$2 = environmentIsNode;
  1809. var set = globalThis$a.setImmediate;
  1810. var clear = globalThis$a.clearImmediate;
  1811. var process$2 = globalThis$a.process;
  1812. var Dispatch = globalThis$a.Dispatch;
  1813. var Function$1 = globalThis$a.Function;
  1814. var MessageChannel = globalThis$a.MessageChannel;
  1815. var String$1 = globalThis$a.String;
  1816. var counter = 0;
  1817. var queue$2 = {};
  1818. var ONREADYSTATECHANGE = 'onreadystatechange';
  1819. var $location, defer, channel, port;
  1820. fails$9(function () {
  1821. // Deno throws a ReferenceError on `location` access without `--location` flag
  1822. $location = globalThis$a.location;
  1823. });
  1824. var run = function (id) {
  1825. if (hasOwn$1(queue$2, id)) {
  1826. var fn = queue$2[id];
  1827. delete queue$2[id];
  1828. fn();
  1829. }
  1830. };
  1831. var runner = function (id) {
  1832. return function () {
  1833. run(id);
  1834. };
  1835. };
  1836. var eventListener = function (event) {
  1837. run(event.data);
  1838. };
  1839. var globalPostMessageDefer = function (id) {
  1840. // old engines have not location.origin
  1841. globalThis$a.postMessage(String$1(id), $location.protocol + '//' + $location.host);
  1842. };
  1843. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  1844. if (!set || !clear) {
  1845. set = function setImmediate(handler) {
  1846. validateArgumentsLength(arguments.length, 1);
  1847. var fn = isCallable$5(handler) ? handler : Function$1(handler);
  1848. var args = arraySlice$1(arguments, 1);
  1849. queue$2[++counter] = function () {
  1850. apply$1(fn, undefined, args);
  1851. };
  1852. defer(counter);
  1853. return counter;
  1854. };
  1855. clear = function clearImmediate(id) {
  1856. delete queue$2[id];
  1857. };
  1858. // Node.js 0.8-
  1859. if (IS_NODE$2) {
  1860. defer = function (id) {
  1861. process$2.nextTick(runner(id));
  1862. };
  1863. // Sphere (JS game engine) Dispatch API
  1864. } else if (Dispatch && Dispatch.now) {
  1865. defer = function (id) {
  1866. Dispatch.now(runner(id));
  1867. };
  1868. // Browsers with MessageChannel, includes WebWorkers
  1869. // except iOS - https://github.com/zloirock/core-js/issues/624
  1870. } else if (MessageChannel && !IS_IOS$1) {
  1871. channel = new MessageChannel();
  1872. port = channel.port2;
  1873. channel.port1.onmessage = eventListener;
  1874. defer = bind$3(port.postMessage, port);
  1875. // Browsers with postMessage, skip WebWorkers
  1876. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  1877. } else if (
  1878. globalThis$a.addEventListener &&
  1879. isCallable$5(globalThis$a.postMessage) &&
  1880. !globalThis$a.importScripts &&
  1881. $location && $location.protocol !== 'file:' &&
  1882. !fails$9(globalPostMessageDefer)
  1883. ) {
  1884. defer = globalPostMessageDefer;
  1885. globalThis$a.addEventListener('message', eventListener, false);
  1886. // IE8-
  1887. } else if (ONREADYSTATECHANGE in createElement('script')) {
  1888. defer = function (id) {
  1889. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  1890. html.removeChild(this);
  1891. run(id);
  1892. };
  1893. };
  1894. // Rest old browsers
  1895. } else {
  1896. defer = function (id) {
  1897. setTimeout(runner(id), 0);
  1898. };
  1899. }
  1900. }
  1901. var task$1 = {
  1902. set: set,
  1903. clear: clear
  1904. };
  1905. var globalThis$9 = globalThis_1;
  1906. var DESCRIPTORS = descriptors;
  1907. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1908. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  1909. // Avoid NodeJS experimental warning
  1910. var safeGetBuiltIn$1 = function (name) {
  1911. if (!DESCRIPTORS) return globalThis$9[name];
  1912. var descriptor = getOwnPropertyDescriptor$1(globalThis$9, name);
  1913. return descriptor && descriptor.value;
  1914. };
  1915. var Queue$2 = function () {
  1916. this.head = null;
  1917. this.tail = null;
  1918. };
  1919. Queue$2.prototype = {
  1920. add: function (item) {
  1921. var entry = { item: item, next: null };
  1922. var tail = this.tail;
  1923. if (tail) tail.next = entry;
  1924. else this.head = entry;
  1925. this.tail = entry;
  1926. },
  1927. get: function () {
  1928. var entry = this.head;
  1929. if (entry) {
  1930. var next = this.head = entry.next;
  1931. if (next === null) this.tail = null;
  1932. return entry.item;
  1933. }
  1934. }
  1935. };
  1936. var queue$1 = Queue$2;
  1937. var userAgent$3 = environmentUserAgent;
  1938. var environmentIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
  1939. var userAgent$2 = environmentUserAgent;
  1940. var environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
  1941. var globalThis$8 = globalThis_1;
  1942. var safeGetBuiltIn = safeGetBuiltIn$1;
  1943. var bind$2 = functionBindContext;
  1944. var macrotask = task$1.set;
  1945. var Queue$1 = queue$1;
  1946. var IS_IOS = environmentIsIos;
  1947. var IS_IOS_PEBBLE = environmentIsIosPebble;
  1948. var IS_WEBOS_WEBKIT = environmentIsWebosWebkit;
  1949. var IS_NODE$1 = environmentIsNode;
  1950. var MutationObserver = globalThis$8.MutationObserver || globalThis$8.WebKitMutationObserver;
  1951. var document$2 = globalThis$8.document;
  1952. var process$1 = globalThis$8.process;
  1953. var Promise$1 = globalThis$8.Promise;
  1954. var microtask$1 = safeGetBuiltIn('queueMicrotask');
  1955. var notify$1, toggle, node, promise, then;
  1956. // modern engines have queueMicrotask method
  1957. if (!microtask$1) {
  1958. var queue = new Queue$1();
  1959. var flush = function () {
  1960. var parent, fn;
  1961. if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
  1962. while (fn = queue.get()) try {
  1963. fn();
  1964. } catch (error) {
  1965. if (queue.head) notify$1();
  1966. throw error;
  1967. }
  1968. if (parent) parent.enter();
  1969. };
  1970. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  1971. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  1972. if (!IS_IOS && !IS_NODE$1 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
  1973. toggle = true;
  1974. node = document$2.createTextNode('');
  1975. new MutationObserver(flush).observe(node, { characterData: true });
  1976. notify$1 = function () {
  1977. node.data = toggle = !toggle;
  1978. };
  1979. // environments with maybe non-completely correct, but existent Promise
  1980. } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
  1981. // Promise.resolve without an argument throws an error in LG WebOS 2
  1982. promise = Promise$1.resolve(undefined);
  1983. // workaround of WebKit ~ iOS Safari 10.1 bug
  1984. promise.constructor = Promise$1;
  1985. then = bind$2(promise.then, promise);
  1986. notify$1 = function () {
  1987. then(flush);
  1988. };
  1989. // Node.js without promises
  1990. } else if (IS_NODE$1) {
  1991. notify$1 = function () {
  1992. process$1.nextTick(flush);
  1993. };
  1994. // for other environments - macrotask based on:
  1995. // - setImmediate
  1996. // - MessageChannel
  1997. // - window.postMessage
  1998. // - onreadystatechange
  1999. // - setTimeout
  2000. } else {
  2001. // `webpack` dev server bug on IE global methods - use bind(fn, global)
  2002. macrotask = bind$2(macrotask, globalThis$8);
  2003. notify$1 = function () {
  2004. macrotask(flush);
  2005. };
  2006. }
  2007. microtask$1 = function (fn) {
  2008. if (!queue.head) notify$1();
  2009. queue.add(fn);
  2010. };
  2011. }
  2012. var microtask_1 = microtask$1;
  2013. var hostReportErrors$1 = function (a, b) {
  2014. try {
  2015. // eslint-disable-next-line no-console -- safe
  2016. arguments.length === 1 ? console.error(a) : console.error(a, b);
  2017. } catch (error) { /* empty */ }
  2018. };
  2019. var perform$3 = function (exec) {
  2020. try {
  2021. return { error: false, value: exec() };
  2022. } catch (error) {
  2023. return { error: true, value: error };
  2024. }
  2025. };
  2026. var globalThis$7 = globalThis_1;
  2027. var promiseNativeConstructor = globalThis$7.Promise;
  2028. var globalThis$6 = globalThis_1;
  2029. var NativePromiseConstructor$3 = promiseNativeConstructor;
  2030. var isCallable$4 = isCallable$j;
  2031. var isForced = isForced_1;
  2032. var inspectSource = inspectSource$3;
  2033. var wellKnownSymbol$7 = wellKnownSymbol$i;
  2034. var ENVIRONMENT = environment;
  2035. var V8_VERSION = environmentV8Version;
  2036. NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
  2037. var SPECIES$1 = wellKnownSymbol$7('species');
  2038. var SUBCLASSING = false;
  2039. var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(globalThis$6.PromiseRejectionEvent);
  2040. var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
  2041. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
  2042. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
  2043. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2044. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2045. // We can't detect it synchronously, so just check versions
  2046. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2047. // We can't use @@species feature detection in V8 since it causes
  2048. // deoptimization and performance degradation
  2049. // https://github.com/zloirock/core-js/issues/679
  2050. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2051. // Detect correctness of subclassing with @@species support
  2052. var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
  2053. var FakePromise = function (exec) {
  2054. exec(function () { /* empty */ }, function () { /* empty */ });
  2055. };
  2056. var constructor = promise.constructor = {};
  2057. constructor[SPECIES$1] = FakePromise;
  2058. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2059. if (!SUBCLASSING) return true;
  2060. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2061. } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT$1;
  2062. });
  2063. var promiseConstructorDetection = {
  2064. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
  2065. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
  2066. SUBCLASSING: SUBCLASSING
  2067. };
  2068. var newPromiseCapability$2 = {};
  2069. var aCallable$5 = aCallable$9;
  2070. var $TypeError$5 = TypeError;
  2071. var PromiseCapability = function (C) {
  2072. var resolve, reject;
  2073. this.promise = new C(function ($$resolve, $$reject) {
  2074. if (resolve !== undefined || reject !== undefined) throw new $TypeError$5('Bad Promise constructor');
  2075. resolve = $$resolve;
  2076. reject = $$reject;
  2077. });
  2078. this.resolve = aCallable$5(resolve);
  2079. this.reject = aCallable$5(reject);
  2080. };
  2081. // `NewPromiseCapability` abstract operation
  2082. // https://tc39.es/ecma262/#sec-newpromisecapability
  2083. newPromiseCapability$2.f = function (C) {
  2084. return new PromiseCapability(C);
  2085. };
  2086. var $$b = _export;
  2087. var IS_NODE = environmentIsNode;
  2088. var globalThis$5 = globalThis_1;
  2089. var call$c = functionCall;
  2090. var defineBuiltIn$3 = defineBuiltIn$6;
  2091. var setPrototypeOf = objectSetPrototypeOf;
  2092. var setToStringTag = setToStringTag$1;
  2093. var setSpecies = setSpecies$1;
  2094. var aCallable$4 = aCallable$9;
  2095. var isCallable$3 = isCallable$j;
  2096. var isObject$2 = isObject$c;
  2097. var anInstance = anInstance$1;
  2098. var speciesConstructor$1 = speciesConstructor$2;
  2099. var task = task$1.set;
  2100. var microtask = microtask_1;
  2101. var hostReportErrors = hostReportErrors$1;
  2102. var perform$2 = perform$3;
  2103. var Queue = queue$1;
  2104. var InternalStateModule = internalState;
  2105. var NativePromiseConstructor$2 = promiseNativeConstructor;
  2106. var PromiseConstructorDetection = promiseConstructorDetection;
  2107. var newPromiseCapabilityModule$3 = newPromiseCapability$2;
  2108. var PROMISE = 'Promise';
  2109. var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
  2110. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  2111. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  2112. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  2113. var setInternalState = InternalStateModule.set;
  2114. var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
  2115. var PromiseConstructor = NativePromiseConstructor$2;
  2116. var PromisePrototype = NativePromisePrototype$1;
  2117. var TypeError$1 = globalThis$5.TypeError;
  2118. var document$1 = globalThis$5.document;
  2119. var process = globalThis$5.process;
  2120. var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
  2121. var newGenericPromiseCapability = newPromiseCapability$1;
  2122. var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$5.dispatchEvent);
  2123. var UNHANDLED_REJECTION = 'unhandledrejection';
  2124. var REJECTION_HANDLED = 'rejectionhandled';
  2125. var PENDING = 0;
  2126. var FULFILLED = 1;
  2127. var REJECTED = 2;
  2128. var HANDLED = 1;
  2129. var UNHANDLED = 2;
  2130. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  2131. // helpers
  2132. var isThenable = function (it) {
  2133. var then;
  2134. return isObject$2(it) && isCallable$3(then = it.then) ? then : false;
  2135. };
  2136. var callReaction = function (reaction, state) {
  2137. var value = state.value;
  2138. var ok = state.state === FULFILLED;
  2139. var handler = ok ? reaction.ok : reaction.fail;
  2140. var resolve = reaction.resolve;
  2141. var reject = reaction.reject;
  2142. var domain = reaction.domain;
  2143. var result, then, exited;
  2144. try {
  2145. if (handler) {
  2146. if (!ok) {
  2147. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  2148. state.rejection = HANDLED;
  2149. }
  2150. if (handler === true) result = value;
  2151. else {
  2152. if (domain) domain.enter();
  2153. result = handler(value); // can throw
  2154. if (domain) {
  2155. domain.exit();
  2156. exited = true;
  2157. }
  2158. }
  2159. if (result === reaction.promise) {
  2160. reject(new TypeError$1('Promise-chain cycle'));
  2161. } else if (then = isThenable(result)) {
  2162. call$c(then, result, resolve, reject);
  2163. } else resolve(result);
  2164. } else reject(value);
  2165. } catch (error) {
  2166. if (domain && !exited) domain.exit();
  2167. reject(error);
  2168. }
  2169. };
  2170. var notify = function (state, isReject) {
  2171. if (state.notified) return;
  2172. state.notified = true;
  2173. microtask(function () {
  2174. var reactions = state.reactions;
  2175. var reaction;
  2176. while (reaction = reactions.get()) {
  2177. callReaction(reaction, state);
  2178. }
  2179. state.notified = false;
  2180. if (isReject && !state.rejection) onUnhandled(state);
  2181. });
  2182. };
  2183. var dispatchEvent = function (name, promise, reason) {
  2184. var event, handler;
  2185. if (DISPATCH_EVENT) {
  2186. event = document$1.createEvent('Event');
  2187. event.promise = promise;
  2188. event.reason = reason;
  2189. event.initEvent(name, false, true);
  2190. globalThis$5.dispatchEvent(event);
  2191. } else event = { promise: promise, reason: reason };
  2192. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$5['on' + name])) handler(event);
  2193. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  2194. };
  2195. var onUnhandled = function (state) {
  2196. call$c(task, globalThis$5, function () {
  2197. var promise = state.facade;
  2198. var value = state.value;
  2199. var IS_UNHANDLED = isUnhandled(state);
  2200. var result;
  2201. if (IS_UNHANDLED) {
  2202. result = perform$2(function () {
  2203. if (IS_NODE) {
  2204. process.emit('unhandledRejection', value, promise);
  2205. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  2206. });
  2207. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  2208. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  2209. if (result.error) throw result.value;
  2210. }
  2211. });
  2212. };
  2213. var isUnhandled = function (state) {
  2214. return state.rejection !== HANDLED && !state.parent;
  2215. };
  2216. var onHandleUnhandled = function (state) {
  2217. call$c(task, globalThis$5, function () {
  2218. var promise = state.facade;
  2219. if (IS_NODE) {
  2220. process.emit('rejectionHandled', promise);
  2221. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  2222. });
  2223. };
  2224. var bind$1 = function (fn, state, unwrap) {
  2225. return function (value) {
  2226. fn(state, value, unwrap);
  2227. };
  2228. };
  2229. var internalReject = function (state, value, unwrap) {
  2230. if (state.done) return;
  2231. state.done = true;
  2232. if (unwrap) state = unwrap;
  2233. state.value = value;
  2234. state.state = REJECTED;
  2235. notify(state, true);
  2236. };
  2237. var internalResolve = function (state, value, unwrap) {
  2238. if (state.done) return;
  2239. state.done = true;
  2240. if (unwrap) state = unwrap;
  2241. try {
  2242. if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
  2243. var then = isThenable(value);
  2244. if (then) {
  2245. microtask(function () {
  2246. var wrapper = { done: false };
  2247. try {
  2248. call$c(then, value,
  2249. bind$1(internalResolve, wrapper, state),
  2250. bind$1(internalReject, wrapper, state)
  2251. );
  2252. } catch (error) {
  2253. internalReject(wrapper, error, state);
  2254. }
  2255. });
  2256. } else {
  2257. state.value = value;
  2258. state.state = FULFILLED;
  2259. notify(state, false);
  2260. }
  2261. } catch (error) {
  2262. internalReject({ done: false }, error, state);
  2263. }
  2264. };
  2265. // constructor polyfill
  2266. if (FORCED_PROMISE_CONSTRUCTOR$4) {
  2267. // 25.4.3.1 Promise(executor)
  2268. PromiseConstructor = function Promise(executor) {
  2269. anInstance(this, PromisePrototype);
  2270. aCallable$4(executor);
  2271. call$c(Internal, this);
  2272. var state = getInternalPromiseState(this);
  2273. try {
  2274. executor(bind$1(internalResolve, state), bind$1(internalReject, state));
  2275. } catch (error) {
  2276. internalReject(state, error);
  2277. }
  2278. };
  2279. PromisePrototype = PromiseConstructor.prototype;
  2280. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2281. Internal = function Promise(executor) {
  2282. setInternalState(this, {
  2283. type: PROMISE,
  2284. done: false,
  2285. notified: false,
  2286. parent: false,
  2287. reactions: new Queue(),
  2288. rejection: false,
  2289. state: PENDING,
  2290. value: null
  2291. });
  2292. };
  2293. // `Promise.prototype.then` method
  2294. // https://tc39.es/ecma262/#sec-promise.prototype.then
  2295. Internal.prototype = defineBuiltIn$3(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  2296. var state = getInternalPromiseState(this);
  2297. var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
  2298. state.parent = true;
  2299. reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
  2300. reaction.fail = isCallable$3(onRejected) && onRejected;
  2301. reaction.domain = IS_NODE ? process.domain : undefined;
  2302. if (state.state === PENDING) state.reactions.add(reaction);
  2303. else microtask(function () {
  2304. callReaction(reaction, state);
  2305. });
  2306. return reaction.promise;
  2307. });
  2308. OwnPromiseCapability = function () {
  2309. var promise = new Internal();
  2310. var state = getInternalPromiseState(promise);
  2311. this.promise = promise;
  2312. this.resolve = bind$1(internalResolve, state);
  2313. this.reject = bind$1(internalReject, state);
  2314. };
  2315. newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
  2316. return C === PromiseConstructor || C === PromiseWrapper
  2317. ? new OwnPromiseCapability(C)
  2318. : newGenericPromiseCapability(C);
  2319. };
  2320. if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
  2321. nativeThen = NativePromisePrototype$1.then;
  2322. if (!NATIVE_PROMISE_SUBCLASSING) {
  2323. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  2324. defineBuiltIn$3(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
  2325. var that = this;
  2326. return new PromiseConstructor(function (resolve, reject) {
  2327. call$c(nativeThen, that, resolve, reject);
  2328. }).then(onFulfilled, onRejected);
  2329. // https://github.com/zloirock/core-js/issues/640
  2330. }, { unsafe: true });
  2331. }
  2332. // make `.constructor === Promise` work for native promise-based APIs
  2333. try {
  2334. delete NativePromisePrototype$1.constructor;
  2335. } catch (error) { /* empty */ }
  2336. // make `instanceof Promise` work for native promise-based APIs
  2337. if (setPrototypeOf) {
  2338. setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
  2339. }
  2340. }
  2341. }
  2342. $$b({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
  2343. Promise: PromiseConstructor
  2344. });
  2345. setToStringTag(PromiseConstructor, PROMISE, false);
  2346. setSpecies(PROMISE);
  2347. var iterators = {};
  2348. var wellKnownSymbol$6 = wellKnownSymbol$i;
  2349. var Iterators$1 = iterators;
  2350. var ITERATOR$2 = wellKnownSymbol$6('iterator');
  2351. var ArrayPrototype = Array.prototype;
  2352. // check on default Array iterator
  2353. var isArrayIteratorMethod$1 = function (it) {
  2354. return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
  2355. };
  2356. var classof$2 = classof$7;
  2357. var getMethod$4 = getMethod$6;
  2358. var isNullOrUndefined$3 = isNullOrUndefined$7;
  2359. var Iterators = iterators;
  2360. var wellKnownSymbol$5 = wellKnownSymbol$i;
  2361. var ITERATOR$1 = wellKnownSymbol$5('iterator');
  2362. var getIteratorMethod$2 = function (it) {
  2363. if (!isNullOrUndefined$3(it)) return getMethod$4(it, ITERATOR$1)
  2364. || getMethod$4(it, '@@iterator')
  2365. || Iterators[classof$2(it)];
  2366. };
  2367. var call$b = functionCall;
  2368. var aCallable$3 = aCallable$9;
  2369. var anObject$9 = anObject$f;
  2370. var tryToString$2 = tryToString$5;
  2371. var getIteratorMethod$1 = getIteratorMethod$2;
  2372. var $TypeError$4 = TypeError;
  2373. var getIterator$1 = function (argument, usingIterator) {
  2374. var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
  2375. if (aCallable$3(iteratorMethod)) return anObject$9(call$b(iteratorMethod, argument));
  2376. throw new $TypeError$4(tryToString$2(argument) + ' is not iterable');
  2377. };
  2378. var call$a = functionCall;
  2379. var anObject$8 = anObject$f;
  2380. var getMethod$3 = getMethod$6;
  2381. var iteratorClose$1 = function (iterator, kind, value) {
  2382. var innerResult, innerError;
  2383. anObject$8(iterator);
  2384. try {
  2385. innerResult = getMethod$3(iterator, 'return');
  2386. if (!innerResult) {
  2387. if (kind === 'throw') throw value;
  2388. return value;
  2389. }
  2390. innerResult = call$a(innerResult, iterator);
  2391. } catch (error) {
  2392. innerError = true;
  2393. innerResult = error;
  2394. }
  2395. if (kind === 'throw') throw value;
  2396. if (innerError) throw innerResult;
  2397. anObject$8(innerResult);
  2398. return value;
  2399. };
  2400. var bind = functionBindContext;
  2401. var call$9 = functionCall;
  2402. var anObject$7 = anObject$f;
  2403. var tryToString$1 = tryToString$5;
  2404. var isArrayIteratorMethod = isArrayIteratorMethod$1;
  2405. var lengthOfArrayLike$1 = lengthOfArrayLike$5;
  2406. var isPrototypeOf$1 = objectIsPrototypeOf;
  2407. var getIterator = getIterator$1;
  2408. var getIteratorMethod = getIteratorMethod$2;
  2409. var iteratorClose = iteratorClose$1;
  2410. var $TypeError$3 = TypeError;
  2411. var Result = function (stopped, result) {
  2412. this.stopped = stopped;
  2413. this.result = result;
  2414. };
  2415. var ResultPrototype = Result.prototype;
  2416. var iterate$2 = function (iterable, unboundFunction, options) {
  2417. var that = options && options.that;
  2418. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  2419. var IS_RECORD = !!(options && options.IS_RECORD);
  2420. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  2421. var INTERRUPTED = !!(options && options.INTERRUPTED);
  2422. var fn = bind(unboundFunction, that);
  2423. var iterator, iterFn, index, length, result, next, step;
  2424. var stop = function (condition) {
  2425. if (iterator) iteratorClose(iterator, 'normal', condition);
  2426. return new Result(true, condition);
  2427. };
  2428. var callFn = function (value) {
  2429. if (AS_ENTRIES) {
  2430. anObject$7(value);
  2431. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  2432. } return INTERRUPTED ? fn(value, stop) : fn(value);
  2433. };
  2434. if (IS_RECORD) {
  2435. iterator = iterable.iterator;
  2436. } else if (IS_ITERATOR) {
  2437. iterator = iterable;
  2438. } else {
  2439. iterFn = getIteratorMethod(iterable);
  2440. if (!iterFn) throw new $TypeError$3(tryToString$1(iterable) + ' is not iterable');
  2441. // optimisation for array iterators
  2442. if (isArrayIteratorMethod(iterFn)) {
  2443. for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
  2444. result = callFn(iterable[index]);
  2445. if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
  2446. } return new Result(false);
  2447. }
  2448. iterator = getIterator(iterable, iterFn);
  2449. }
  2450. next = IS_RECORD ? iterable.next : iterator.next;
  2451. while (!(step = call$9(next, iterator)).done) {
  2452. try {
  2453. result = callFn(step.value);
  2454. } catch (error) {
  2455. iteratorClose(iterator, 'throw', error);
  2456. }
  2457. if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
  2458. } return new Result(false);
  2459. };
  2460. var wellKnownSymbol$4 = wellKnownSymbol$i;
  2461. var ITERATOR = wellKnownSymbol$4('iterator');
  2462. var SAFE_CLOSING = false;
  2463. try {
  2464. var called = 0;
  2465. var iteratorWithReturn = {
  2466. next: function () {
  2467. return { done: !!called++ };
  2468. },
  2469. 'return': function () {
  2470. SAFE_CLOSING = true;
  2471. }
  2472. };
  2473. iteratorWithReturn[ITERATOR] = function () {
  2474. return this;
  2475. };
  2476. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  2477. Array.from(iteratorWithReturn, function () { throw 2; });
  2478. } catch (error) { /* empty */ }
  2479. var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
  2480. try {
  2481. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  2482. } catch (error) { return false; } // workaround of old WebKit + `eval` bug
  2483. var ITERATION_SUPPORT = false;
  2484. try {
  2485. var object = {};
  2486. object[ITERATOR] = function () {
  2487. return {
  2488. next: function () {
  2489. return { done: ITERATION_SUPPORT = true };
  2490. }
  2491. };
  2492. };
  2493. exec(object);
  2494. } catch (error) { /* empty */ }
  2495. return ITERATION_SUPPORT;
  2496. };
  2497. var NativePromiseConstructor$1 = promiseNativeConstructor;
  2498. var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
  2499. var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
  2500. var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
  2501. NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
  2502. });
  2503. var $$a = _export;
  2504. var call$8 = functionCall;
  2505. var aCallable$2 = aCallable$9;
  2506. var newPromiseCapabilityModule$2 = newPromiseCapability$2;
  2507. var perform$1 = perform$3;
  2508. var iterate$1 = iterate$2;
  2509. var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
  2510. // `Promise.all` method
  2511. // https://tc39.es/ecma262/#sec-promise.all
  2512. $$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
  2513. all: function all(iterable) {
  2514. var C = this;
  2515. var capability = newPromiseCapabilityModule$2.f(C);
  2516. var resolve = capability.resolve;
  2517. var reject = capability.reject;
  2518. var result = perform$1(function () {
  2519. var $promiseResolve = aCallable$2(C.resolve);
  2520. var values = [];
  2521. var counter = 0;
  2522. var remaining = 1;
  2523. iterate$1(iterable, function (promise) {
  2524. var index = counter++;
  2525. var alreadyCalled = false;
  2526. remaining++;
  2527. call$8($promiseResolve, C, promise).then(function (value) {
  2528. if (alreadyCalled) return;
  2529. alreadyCalled = true;
  2530. values[index] = value;
  2531. --remaining || resolve(values);
  2532. }, reject);
  2533. });
  2534. --remaining || resolve(values);
  2535. });
  2536. if (result.error) reject(result.value);
  2537. return capability.promise;
  2538. }
  2539. });
  2540. var $$9 = _export;
  2541. var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
  2542. var NativePromiseConstructor = promiseNativeConstructor;
  2543. var getBuiltIn$1 = getBuiltIn$7;
  2544. var isCallable$2 = isCallable$j;
  2545. var defineBuiltIn$2 = defineBuiltIn$6;
  2546. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  2547. // `Promise.prototype.catch` method
  2548. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  2549. $$9({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
  2550. 'catch': function (onRejected) {
  2551. return this.then(undefined, onRejected);
  2552. }
  2553. });
  2554. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  2555. if (isCallable$2(NativePromiseConstructor)) {
  2556. var method = getBuiltIn$1('Promise').prototype['catch'];
  2557. if (NativePromisePrototype['catch'] !== method) {
  2558. defineBuiltIn$2(NativePromisePrototype, 'catch', method, { unsafe: true });
  2559. }
  2560. }
  2561. var $$8 = _export;
  2562. var call$7 = functionCall;
  2563. var aCallable$1 = aCallable$9;
  2564. var newPromiseCapabilityModule$1 = newPromiseCapability$2;
  2565. var perform = perform$3;
  2566. var iterate = iterate$2;
  2567. var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
  2568. // `Promise.race` method
  2569. // https://tc39.es/ecma262/#sec-promise.race
  2570. $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  2571. race: function race(iterable) {
  2572. var C = this;
  2573. var capability = newPromiseCapabilityModule$1.f(C);
  2574. var reject = capability.reject;
  2575. var result = perform(function () {
  2576. var $promiseResolve = aCallable$1(C.resolve);
  2577. iterate(iterable, function (promise) {
  2578. call$7($promiseResolve, C, promise).then(capability.resolve, reject);
  2579. });
  2580. });
  2581. if (result.error) reject(result.value);
  2582. return capability.promise;
  2583. }
  2584. });
  2585. var $$7 = _export;
  2586. var newPromiseCapabilityModule = newPromiseCapability$2;
  2587. var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
  2588. // `Promise.reject` method
  2589. // https://tc39.es/ecma262/#sec-promise.reject
  2590. $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
  2591. reject: function reject(r) {
  2592. var capability = newPromiseCapabilityModule.f(this);
  2593. var capabilityReject = capability.reject;
  2594. capabilityReject(r);
  2595. return capability.promise;
  2596. }
  2597. });
  2598. var anObject$6 = anObject$f;
  2599. var isObject$1 = isObject$c;
  2600. var newPromiseCapability = newPromiseCapability$2;
  2601. var promiseResolve$1 = function (C, x) {
  2602. anObject$6(C);
  2603. if (isObject$1(x) && x.constructor === C) return x;
  2604. var promiseCapability = newPromiseCapability.f(C);
  2605. var resolve = promiseCapability.resolve;
  2606. resolve(x);
  2607. return promiseCapability.promise;
  2608. };
  2609. var $$6 = _export;
  2610. var getBuiltIn = getBuiltIn$7;
  2611. var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
  2612. var promiseResolve = promiseResolve$1;
  2613. getBuiltIn('Promise');
  2614. // `Promise.resolve` method
  2615. // https://tc39.es/ecma262/#sec-promise.resolve
  2616. $$6({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  2617. resolve: function resolve(x) {
  2618. return promiseResolve(this, x);
  2619. }
  2620. });
  2621. var anObject$5 = anObject$f;
  2622. // `RegExp.prototype.flags` getter implementation
  2623. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2624. var regexpFlags$1 = function () {
  2625. var that = anObject$5(this);
  2626. var result = '';
  2627. if (that.hasIndices) result += 'd';
  2628. if (that.global) result += 'g';
  2629. if (that.ignoreCase) result += 'i';
  2630. if (that.multiline) result += 'm';
  2631. if (that.dotAll) result += 's';
  2632. if (that.unicode) result += 'u';
  2633. if (that.unicodeSets) result += 'v';
  2634. if (that.sticky) result += 'y';
  2635. return result;
  2636. };
  2637. var fails$8 = fails$s;
  2638. var globalThis$4 = globalThis_1;
  2639. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  2640. var $RegExp$2 = globalThis$4.RegExp;
  2641. var UNSUPPORTED_Y$2 = fails$8(function () {
  2642. var re = $RegExp$2('a', 'y');
  2643. re.lastIndex = 2;
  2644. return re.exec('abcd') !== null;
  2645. });
  2646. // UC Browser bug
  2647. // https://github.com/zloirock/core-js/issues/1008
  2648. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$8(function () {
  2649. return !$RegExp$2('a', 'y').sticky;
  2650. });
  2651. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$8(function () {
  2652. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  2653. var re = $RegExp$2('^r', 'gy');
  2654. re.lastIndex = 2;
  2655. return re.exec('str') !== null;
  2656. });
  2657. var regexpStickyHelpers = {
  2658. BROKEN_CARET: BROKEN_CARET,
  2659. MISSED_STICKY: MISSED_STICKY,
  2660. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  2661. };
  2662. var fails$7 = fails$s;
  2663. var globalThis$3 = globalThis_1;
  2664. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  2665. var $RegExp$1 = globalThis$3.RegExp;
  2666. var regexpUnsupportedDotAll = fails$7(function () {
  2667. var re = $RegExp$1('.', 's');
  2668. return !(re.dotAll && re.test('\n') && re.flags === 's');
  2669. });
  2670. var fails$6 = fails$s;
  2671. var globalThis$2 = globalThis_1;
  2672. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  2673. var $RegExp = globalThis$2.RegExp;
  2674. var regexpUnsupportedNcg = fails$6(function () {
  2675. var re = $RegExp('(?<a>b)', 'g');
  2676. return re.exec('b').groups.a !== 'b' ||
  2677. 'b'.replace(re, '$<a>c') !== 'bc';
  2678. });
  2679. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  2680. /* eslint-disable regexp/no-useless-quantifier -- testing */
  2681. var call$6 = functionCall;
  2682. var uncurryThis$8 = functionUncurryThis;
  2683. var toString$7 = toString$a;
  2684. var regexpFlags = regexpFlags$1;
  2685. var stickyHelpers$1 = regexpStickyHelpers;
  2686. var shared = shared$4;
  2687. var create = objectCreate;
  2688. var getInternalState = internalState.get;
  2689. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  2690. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  2691. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  2692. var nativeExec = RegExp.prototype.exec;
  2693. var patchedExec = nativeExec;
  2694. var charAt$3 = uncurryThis$8(''.charAt);
  2695. var indexOf = uncurryThis$8(''.indexOf);
  2696. var replace$1 = uncurryThis$8(''.replace);
  2697. var stringSlice$5 = uncurryThis$8(''.slice);
  2698. var UPDATES_LAST_INDEX_WRONG = (function () {
  2699. var re1 = /a/;
  2700. var re2 = /b*/g;
  2701. call$6(nativeExec, re1, 'a');
  2702. call$6(nativeExec, re2, 'a');
  2703. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  2704. })();
  2705. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  2706. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2707. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2708. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  2709. if (PATCH) {
  2710. patchedExec = function exec(string) {
  2711. var re = this;
  2712. var state = getInternalState(re);
  2713. var str = toString$7(string);
  2714. var raw = state.raw;
  2715. var result, reCopy, lastIndex, match, i, object, group;
  2716. if (raw) {
  2717. raw.lastIndex = re.lastIndex;
  2718. result = call$6(patchedExec, raw, str);
  2719. re.lastIndex = raw.lastIndex;
  2720. return result;
  2721. }
  2722. var groups = state.groups;
  2723. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  2724. var flags = call$6(regexpFlags, re);
  2725. var source = re.source;
  2726. var charsAdded = 0;
  2727. var strCopy = str;
  2728. if (sticky) {
  2729. flags = replace$1(flags, 'y', '');
  2730. if (indexOf(flags, 'g') === -1) {
  2731. flags += 'g';
  2732. }
  2733. strCopy = stringSlice$5(str, re.lastIndex);
  2734. // Support anchored sticky behavior.
  2735. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  2736. source = '(?: ' + source + ')';
  2737. strCopy = ' ' + strCopy;
  2738. charsAdded++;
  2739. }
  2740. // ^(? + rx + ) is needed, in combination with some str slicing, to
  2741. // simulate the 'y' flag.
  2742. reCopy = new RegExp('^(?:' + source + ')', flags);
  2743. }
  2744. if (NPCG_INCLUDED) {
  2745. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  2746. }
  2747. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  2748. match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
  2749. if (sticky) {
  2750. if (match) {
  2751. match.input = stringSlice$5(match.input, charsAdded);
  2752. match[0] = stringSlice$5(match[0], charsAdded);
  2753. match.index = re.lastIndex;
  2754. re.lastIndex += match[0].length;
  2755. } else re.lastIndex = 0;
  2756. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  2757. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  2758. }
  2759. if (NPCG_INCLUDED && match && match.length > 1) {
  2760. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2761. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  2762. call$6(nativeReplace, match[0], reCopy, function () {
  2763. for (i = 1; i < arguments.length - 2; i++) {
  2764. if (arguments[i] === undefined) match[i] = undefined;
  2765. }
  2766. });
  2767. }
  2768. if (match && groups) {
  2769. match.groups = object = create(null);
  2770. for (i = 0; i < groups.length; i++) {
  2771. group = groups[i];
  2772. object[group[0]] = match[group[1]];
  2773. }
  2774. }
  2775. return match;
  2776. };
  2777. }
  2778. var regexpExec$2 = patchedExec;
  2779. var $$5 = _export;
  2780. var exec = regexpExec$2;
  2781. // `RegExp.prototype.exec` method
  2782. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  2783. $$5({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  2784. exec: exec
  2785. });
  2786. var call$5 = functionCall;
  2787. var hasOwn = hasOwnProperty_1;
  2788. var isPrototypeOf = objectIsPrototypeOf;
  2789. var regExpFlags = regexpFlags$1;
  2790. var RegExpPrototype$2 = RegExp.prototype;
  2791. var regexpGetFlags = function (R) {
  2792. var flags = R.flags;
  2793. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
  2794. ? call$5(regExpFlags, R) : flags;
  2795. };
  2796. var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
  2797. var defineBuiltIn$1 = defineBuiltIn$6;
  2798. var anObject$4 = anObject$f;
  2799. var $toString = toString$a;
  2800. var fails$5 = fails$s;
  2801. var getRegExpFlags = regexpGetFlags;
  2802. var TO_STRING = 'toString';
  2803. var RegExpPrototype$1 = RegExp.prototype;
  2804. var nativeToString = RegExpPrototype$1[TO_STRING];
  2805. var NOT_GENERIC = fails$5(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  2806. // FF44- RegExp#toString has a wrong name
  2807. var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name !== TO_STRING;
  2808. // `RegExp.prototype.toString` method
  2809. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2810. if (NOT_GENERIC || INCORRECT_NAME) {
  2811. defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
  2812. var R = anObject$4(this);
  2813. var pattern = $toString(R.source);
  2814. var flags = $toString(getRegExpFlags(R));
  2815. return '/' + pattern + '/' + flags;
  2816. }, { unsafe: true });
  2817. }
  2818. var isObject = isObject$c;
  2819. var classof$1 = classofRaw$2;
  2820. var wellKnownSymbol$3 = wellKnownSymbol$i;
  2821. var MATCH$1 = wellKnownSymbol$3('match');
  2822. // `IsRegExp` abstract operation
  2823. // https://tc39.es/ecma262/#sec-isregexp
  2824. var isRegexp = function (it) {
  2825. var isRegExp;
  2826. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
  2827. };
  2828. var isRegExp = isRegexp;
  2829. var $TypeError$2 = TypeError;
  2830. var notARegexp = function (it) {
  2831. if (isRegExp(it)) {
  2832. throw new $TypeError$2("The method doesn't accept regular expressions");
  2833. } return it;
  2834. };
  2835. var wellKnownSymbol$2 = wellKnownSymbol$i;
  2836. var MATCH = wellKnownSymbol$2('match');
  2837. var correctIsRegexpLogic = function (METHOD_NAME) {
  2838. var regexp = /./;
  2839. try {
  2840. '/./'[METHOD_NAME](regexp);
  2841. } catch (error1) {
  2842. try {
  2843. regexp[MATCH] = false;
  2844. return '/./'[METHOD_NAME](regexp);
  2845. } catch (error2) { /* empty */ }
  2846. } return false;
  2847. };
  2848. var $$4 = _export;
  2849. var uncurryThis$7 = functionUncurryThis;
  2850. var notARegExp$1 = notARegexp;
  2851. var requireObjectCoercible$5 = requireObjectCoercible$a;
  2852. var toString$6 = toString$a;
  2853. var correctIsRegExpLogic$1 = correctIsRegexpLogic;
  2854. var stringIndexOf$1 = uncurryThis$7(''.indexOf);
  2855. // `String.prototype.includes` method
  2856. // https://tc39.es/ecma262/#sec-string.prototype.includes
  2857. $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
  2858. includes: function includes(searchString /* , position = 0 */) {
  2859. return !!~stringIndexOf$1(
  2860. toString$6(requireObjectCoercible$5(this)),
  2861. toString$6(notARegExp$1(searchString)),
  2862. arguments.length > 1 ? arguments[1] : undefined
  2863. );
  2864. }
  2865. });
  2866. // TODO: Remove from `core-js@4` since it's moved to entry points
  2867. var call$4 = functionCall;
  2868. var defineBuiltIn = defineBuiltIn$6;
  2869. var regexpExec$1 = regexpExec$2;
  2870. var fails$4 = fails$s;
  2871. var wellKnownSymbol$1 = wellKnownSymbol$i;
  2872. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  2873. var SPECIES = wellKnownSymbol$1('species');
  2874. var RegExpPrototype = RegExp.prototype;
  2875. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  2876. var SYMBOL = wellKnownSymbol$1(KEY);
  2877. var DELEGATES_TO_SYMBOL = !fails$4(function () {
  2878. // String methods call symbol-named RegExp methods
  2879. var O = {};
  2880. O[SYMBOL] = function () { return 7; };
  2881. return ''[KEY](O) !== 7;
  2882. });
  2883. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () {
  2884. // Symbol-named RegExp methods call .exec
  2885. var execCalled = false;
  2886. var re = /a/;
  2887. if (KEY === 'split') {
  2888. // We can't use real regex here since it causes deoptimization
  2889. // and serious performance degradation in V8
  2890. // https://github.com/zloirock/core-js/issues/306
  2891. re = {};
  2892. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  2893. // a new one. We need to return the patched regex when creating the new one.
  2894. re.constructor = {};
  2895. re.constructor[SPECIES] = function () { return re; };
  2896. re.flags = '';
  2897. re[SYMBOL] = /./[SYMBOL];
  2898. }
  2899. re.exec = function () {
  2900. execCalled = true;
  2901. return null;
  2902. };
  2903. re[SYMBOL]('');
  2904. return !execCalled;
  2905. });
  2906. if (
  2907. !DELEGATES_TO_SYMBOL ||
  2908. !DELEGATES_TO_EXEC ||
  2909. FORCED
  2910. ) {
  2911. var nativeRegExpMethod = /./[SYMBOL];
  2912. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  2913. var $exec = regexp.exec;
  2914. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  2915. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  2916. // The native String method already delegates to @@method (this
  2917. // polyfilled function), leasing to infinite recursion.
  2918. // We avoid it by directly calling the native @@method method.
  2919. return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) };
  2920. }
  2921. return { done: true, value: call$4(nativeMethod, str, regexp, arg2) };
  2922. }
  2923. return { done: false };
  2924. });
  2925. defineBuiltIn(String.prototype, KEY, methods[0]);
  2926. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  2927. }
  2928. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
  2929. };
  2930. var uncurryThis$6 = functionUncurryThis;
  2931. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  2932. var toString$5 = toString$a;
  2933. var requireObjectCoercible$4 = requireObjectCoercible$a;
  2934. var charAt$2 = uncurryThis$6(''.charAt);
  2935. var charCodeAt = uncurryThis$6(''.charCodeAt);
  2936. var stringSlice$4 = uncurryThis$6(''.slice);
  2937. var createMethod = function (CONVERT_TO_STRING) {
  2938. return function ($this, pos) {
  2939. var S = toString$5(requireObjectCoercible$4($this));
  2940. var position = toIntegerOrInfinity$1(pos);
  2941. var size = S.length;
  2942. var first, second;
  2943. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2944. first = charCodeAt(S, position);
  2945. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2946. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  2947. ? CONVERT_TO_STRING
  2948. ? charAt$2(S, position)
  2949. : first
  2950. : CONVERT_TO_STRING
  2951. ? stringSlice$4(S, position, position + 2)
  2952. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2953. };
  2954. };
  2955. var stringMultibyte = {
  2956. // `String.prototype.codePointAt` method
  2957. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2958. codeAt: createMethod(false),
  2959. // `String.prototype.at` method
  2960. // https://github.com/mathiasbynens/String.prototype.at
  2961. charAt: createMethod(true)
  2962. };
  2963. var charAt$1 = stringMultibyte.charAt;
  2964. // `AdvanceStringIndex` abstract operation
  2965. // https://tc39.es/ecma262/#sec-advancestringindex
  2966. var advanceStringIndex$3 = function (S, index, unicode) {
  2967. return index + (unicode ? charAt$1(S, index).length : 1);
  2968. };
  2969. var call$3 = functionCall;
  2970. var anObject$3 = anObject$f;
  2971. var isCallable$1 = isCallable$j;
  2972. var classof = classofRaw$2;
  2973. var regexpExec = regexpExec$2;
  2974. var $TypeError$1 = TypeError;
  2975. // `RegExpExec` abstract operation
  2976. // https://tc39.es/ecma262/#sec-regexpexec
  2977. var regexpExecAbstract = function (R, S) {
  2978. var exec = R.exec;
  2979. if (isCallable$1(exec)) {
  2980. var result = call$3(exec, R, S);
  2981. if (result !== null) anObject$3(result);
  2982. return result;
  2983. }
  2984. if (classof(R) === 'RegExp') return call$3(regexpExec, R, S);
  2985. throw new $TypeError$1('RegExp#exec called on incompatible receiver');
  2986. };
  2987. var call$2 = functionCall;
  2988. var uncurryThis$5 = functionUncurryThis;
  2989. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  2990. var anObject$2 = anObject$f;
  2991. var isNullOrUndefined$2 = isNullOrUndefined$7;
  2992. var requireObjectCoercible$3 = requireObjectCoercible$a;
  2993. var speciesConstructor = speciesConstructor$2;
  2994. var advanceStringIndex$2 = advanceStringIndex$3;
  2995. var toLength$3 = toLength$5;
  2996. var toString$4 = toString$a;
  2997. var getMethod$2 = getMethod$6;
  2998. var regExpExec$2 = regexpExecAbstract;
  2999. var stickyHelpers = regexpStickyHelpers;
  3000. var fails$3 = fails$s;
  3001. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  3002. var MAX_UINT32 = 0xFFFFFFFF;
  3003. var min$2 = Math.min;
  3004. var push$2 = uncurryThis$5([].push);
  3005. var stringSlice$3 = uncurryThis$5(''.slice);
  3006. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  3007. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  3008. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$3(function () {
  3009. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3010. var re = /(?:)/;
  3011. var originalExec = re.exec;
  3012. re.exec = function () { return originalExec.apply(this, arguments); };
  3013. var result = 'ab'.split(re);
  3014. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  3015. });
  3016. var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
  3017. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3018. 'test'.split(/(?:)/, -1).length !== 4 ||
  3019. 'ab'.split(/(?:ab)*/).length !== 2 ||
  3020. '.'.split(/(.?)(.?)/).length !== 4 ||
  3021. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  3022. '.'.split(/()()/).length > 1 ||
  3023. ''.split(/.?/).length;
  3024. // @@split logic
  3025. fixRegExpWellKnownSymbolLogic$2('split', function (SPLIT, nativeSplit, maybeCallNative) {
  3026. var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
  3027. return separator === undefined && limit === 0 ? [] : call$2(nativeSplit, this, separator, limit);
  3028. } : nativeSplit;
  3029. return [
  3030. // `String.prototype.split` method
  3031. // https://tc39.es/ecma262/#sec-string.prototype.split
  3032. function split(separator, limit) {
  3033. var O = requireObjectCoercible$3(this);
  3034. var splitter = isNullOrUndefined$2(separator) ? undefined : getMethod$2(separator, SPLIT);
  3035. return splitter
  3036. ? call$2(splitter, separator, O, limit)
  3037. : call$2(internalSplit, toString$4(O), separator, limit);
  3038. },
  3039. // `RegExp.prototype[@@split]` method
  3040. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  3041. //
  3042. // NOTE: This cannot be properly polyfilled in engines that don't support
  3043. // the 'y' flag.
  3044. function (string, limit) {
  3045. var rx = anObject$2(this);
  3046. var S = toString$4(string);
  3047. if (!BUGGY) {
  3048. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  3049. if (res.done) return res.value;
  3050. }
  3051. var C = speciesConstructor(rx, RegExp);
  3052. var unicodeMatching = rx.unicode;
  3053. var flags = (rx.ignoreCase ? 'i' : '') +
  3054. (rx.multiline ? 'm' : '') +
  3055. (rx.unicode ? 'u' : '') +
  3056. (UNSUPPORTED_Y ? 'g' : 'y');
  3057. // ^(? + rx + ) is needed, in combination with some S slicing, to
  3058. // simulate the 'y' flag.
  3059. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  3060. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3061. if (lim === 0) return [];
  3062. if (S.length === 0) return regExpExec$2(splitter, S) === null ? [S] : [];
  3063. var p = 0;
  3064. var q = 0;
  3065. var A = [];
  3066. while (q < S.length) {
  3067. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  3068. var z = regExpExec$2(splitter, UNSUPPORTED_Y ? stringSlice$3(S, q) : S);
  3069. var e;
  3070. if (
  3071. z === null ||
  3072. (e = min$2(toLength$3(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  3073. ) {
  3074. q = advanceStringIndex$2(S, q, unicodeMatching);
  3075. } else {
  3076. push$2(A, stringSlice$3(S, p, q));
  3077. if (A.length === lim) return A;
  3078. for (var i = 1; i <= z.length - 1; i++) {
  3079. push$2(A, z[i]);
  3080. if (A.length === lim) return A;
  3081. }
  3082. q = p = e;
  3083. }
  3084. }
  3085. push$2(A, stringSlice$3(S, p));
  3086. return A;
  3087. }
  3088. ];
  3089. }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  3090. var PROPER_FUNCTION_NAME = functionName.PROPER;
  3091. var fails$2 = fails$s;
  3092. var whitespaces = whitespaces$3;
  3093. var non = '\u200B\u0085\u180E';
  3094. // check that a method works with the correct list
  3095. // of whitespaces and has a correct name
  3096. var stringTrimForced = function (METHOD_NAME) {
  3097. return fails$2(function () {
  3098. return !!whitespaces[METHOD_NAME]()
  3099. || non[METHOD_NAME]() !== non
  3100. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  3101. });
  3102. };
  3103. var $$3 = _export;
  3104. var $trim = stringTrim.trim;
  3105. var forcedStringTrimMethod = stringTrimForced;
  3106. // `String.prototype.trim` method
  3107. // https://tc39.es/ecma262/#sec-string.prototype.trim
  3108. $$3({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  3109. trim: function trim() {
  3110. return $trim(this);
  3111. }
  3112. });
  3113. // iterable DOM collections
  3114. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  3115. var domIterables = {
  3116. CSSRuleList: 0,
  3117. CSSStyleDeclaration: 0,
  3118. CSSValueList: 0,
  3119. ClientRectList: 0,
  3120. DOMRectList: 0,
  3121. DOMStringList: 0,
  3122. DOMTokenList: 1,
  3123. DataTransferItemList: 0,
  3124. FileList: 0,
  3125. HTMLAllCollection: 0,
  3126. HTMLCollection: 0,
  3127. HTMLFormElement: 0,
  3128. HTMLSelectElement: 0,
  3129. MediaList: 0,
  3130. MimeTypeArray: 0,
  3131. NamedNodeMap: 0,
  3132. NodeList: 1,
  3133. PaintRequestList: 0,
  3134. Plugin: 0,
  3135. PluginArray: 0,
  3136. SVGLengthList: 0,
  3137. SVGNumberList: 0,
  3138. SVGPathSegList: 0,
  3139. SVGPointList: 0,
  3140. SVGStringList: 0,
  3141. SVGTransformList: 0,
  3142. SourceBufferList: 0,
  3143. StyleSheetList: 0,
  3144. TextTrackCueList: 0,
  3145. TextTrackList: 0,
  3146. TouchList: 0
  3147. };
  3148. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  3149. var documentCreateElement = documentCreateElement$2;
  3150. var classList = documentCreateElement('span').classList;
  3151. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  3152. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  3153. var $forEach = arrayIteration.forEach;
  3154. var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
  3155. var STRICT_METHOD$1 = arrayMethodIsStrict$2('forEach');
  3156. // `Array.prototype.forEach` method implementation
  3157. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  3158. var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
  3159. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3160. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  3161. } : [].forEach;
  3162. var globalThis$1 = globalThis_1;
  3163. var DOMIterables = domIterables;
  3164. var DOMTokenListPrototype = domTokenListPrototype;
  3165. var forEach = arrayForEach;
  3166. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  3167. var handlePrototype = function (CollectionPrototype) {
  3168. // some Chrome versions have non-configurable methods on DOMTokenList
  3169. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  3170. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  3171. } catch (error) {
  3172. CollectionPrototype.forEach = forEach;
  3173. }
  3174. };
  3175. for (var COLLECTION_NAME in DOMIterables) {
  3176. if (DOMIterables[COLLECTION_NAME]) {
  3177. handlePrototype(globalThis$1[COLLECTION_NAME] && globalThis$1[COLLECTION_NAME].prototype);
  3178. }
  3179. }
  3180. handlePrototype(DOMTokenListPrototype);
  3181. var $$2 = _export;
  3182. var uncurryThis$4 = functionUncurryThis;
  3183. var IndexedObject = indexedObject;
  3184. var toIndexedObject = toIndexedObject$6;
  3185. var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
  3186. var nativeJoin = uncurryThis$4([].join);
  3187. var ES3_STRINGS = IndexedObject !== Object;
  3188. var FORCED$1 = ES3_STRINGS || !arrayMethodIsStrict$1('join', ',');
  3189. // `Array.prototype.join` method
  3190. // https://tc39.es/ecma262/#sec-array.prototype.join
  3191. $$2({ target: 'Array', proto: true, forced: FORCED$1 }, {
  3192. join: function join(separator) {
  3193. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  3194. }
  3195. });
  3196. var tryToString = tryToString$5;
  3197. var $TypeError = TypeError;
  3198. var deletePropertyOrThrow$1 = function (O, P) {
  3199. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  3200. };
  3201. var arraySlice = arraySlice$2;
  3202. var floor$1 = Math.floor;
  3203. var sort = function (array, comparefn) {
  3204. var length = array.length;
  3205. if (length < 8) {
  3206. // insertion sort
  3207. var i = 1;
  3208. var element, j;
  3209. while (i < length) {
  3210. j = i;
  3211. element = array[i];
  3212. while (j && comparefn(array[j - 1], element) > 0) {
  3213. array[j] = array[--j];
  3214. }
  3215. if (j !== i++) array[j] = element;
  3216. }
  3217. } else {
  3218. // merge sort
  3219. var middle = floor$1(length / 2);
  3220. var left = sort(arraySlice(array, 0, middle), comparefn);
  3221. var right = sort(arraySlice(array, middle), comparefn);
  3222. var llength = left.length;
  3223. var rlength = right.length;
  3224. var lindex = 0;
  3225. var rindex = 0;
  3226. while (lindex < llength || rindex < rlength) {
  3227. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  3228. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  3229. : lindex < llength ? left[lindex++] : right[rindex++];
  3230. }
  3231. }
  3232. return array;
  3233. };
  3234. var arraySort = sort;
  3235. var userAgent$1 = environmentUserAgent;
  3236. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  3237. var environmentFfVersion = !!firefox && +firefox[1];
  3238. var UA = environmentUserAgent;
  3239. var environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
  3240. var userAgent = environmentUserAgent;
  3241. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  3242. var environmentWebkitVersion = !!webkit && +webkit[1];
  3243. var $$1 = _export;
  3244. var uncurryThis$3 = functionUncurryThis;
  3245. var aCallable = aCallable$9;
  3246. var toObject$1 = toObject$8;
  3247. var lengthOfArrayLike = lengthOfArrayLike$5;
  3248. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  3249. var toString$3 = toString$a;
  3250. var fails$1 = fails$s;
  3251. var internalSort = arraySort;
  3252. var arrayMethodIsStrict = arrayMethodIsStrict$4;
  3253. var FF = environmentFfVersion;
  3254. var IE_OR_EDGE = environmentIsIeOrEdge;
  3255. var V8 = environmentV8Version;
  3256. var WEBKIT = environmentWebkitVersion;
  3257. var test = [];
  3258. var nativeSort = uncurryThis$3(test.sort);
  3259. var push$1 = uncurryThis$3(test.push);
  3260. // IE8-
  3261. var FAILS_ON_UNDEFINED = fails$1(function () {
  3262. test.sort(undefined);
  3263. });
  3264. // V8 bug
  3265. var FAILS_ON_NULL = fails$1(function () {
  3266. test.sort(null);
  3267. });
  3268. // Old WebKit
  3269. var STRICT_METHOD = arrayMethodIsStrict('sort');
  3270. var STABLE_SORT = !fails$1(function () {
  3271. // feature detection can be too slow, so check engines versions
  3272. if (V8) return V8 < 70;
  3273. if (FF && FF > 3) return;
  3274. if (IE_OR_EDGE) return true;
  3275. if (WEBKIT) return WEBKIT < 603;
  3276. var result = '';
  3277. var code, chr, value, index;
  3278. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  3279. for (code = 65; code < 76; code++) {
  3280. chr = String.fromCharCode(code);
  3281. switch (code) {
  3282. case 66: case 69: case 70: case 72: value = 3; break;
  3283. case 68: case 71: value = 4; break;
  3284. default: value = 2;
  3285. }
  3286. for (index = 0; index < 47; index++) {
  3287. test.push({ k: chr + index, v: value });
  3288. }
  3289. }
  3290. test.sort(function (a, b) { return b.v - a.v; });
  3291. for (index = 0; index < test.length; index++) {
  3292. chr = test[index].k.charAt(0);
  3293. if (result.charAt(result.length - 1) !== chr) result += chr;
  3294. }
  3295. return result !== 'DGBEFHACIJK';
  3296. });
  3297. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  3298. var getSortCompare = function (comparefn) {
  3299. return function (x, y) {
  3300. if (y === undefined) return -1;
  3301. if (x === undefined) return 1;
  3302. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  3303. return toString$3(x) > toString$3(y) ? 1 : -1;
  3304. };
  3305. };
  3306. // `Array.prototype.sort` method
  3307. // https://tc39.es/ecma262/#sec-array.prototype.sort
  3308. $$1({ target: 'Array', proto: true, forced: FORCED }, {
  3309. sort: function sort(comparefn) {
  3310. if (comparefn !== undefined) aCallable(comparefn);
  3311. var array = toObject$1(this);
  3312. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  3313. var items = [];
  3314. var arrayLength = lengthOfArrayLike(array);
  3315. var itemsLength, index;
  3316. for (index = 0; index < arrayLength; index++) {
  3317. if (index in array) push$1(items, array[index]);
  3318. }
  3319. internalSort(items, getSortCompare(comparefn));
  3320. itemsLength = lengthOfArrayLike(items);
  3321. index = 0;
  3322. while (index < itemsLength) array[index] = items[index++];
  3323. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  3324. return array;
  3325. }
  3326. });
  3327. var call$1 = functionCall;
  3328. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  3329. var anObject$1 = anObject$f;
  3330. var isNullOrUndefined$1 = isNullOrUndefined$7;
  3331. var toLength$2 = toLength$5;
  3332. var toString$2 = toString$a;
  3333. var requireObjectCoercible$2 = requireObjectCoercible$a;
  3334. var getMethod$1 = getMethod$6;
  3335. var advanceStringIndex$1 = advanceStringIndex$3;
  3336. var regExpExec$1 = regexpExecAbstract;
  3337. // @@match logic
  3338. fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) {
  3339. return [
  3340. // `String.prototype.match` method
  3341. // https://tc39.es/ecma262/#sec-string.prototype.match
  3342. function match(regexp) {
  3343. var O = requireObjectCoercible$2(this);
  3344. var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, MATCH);
  3345. return matcher ? call$1(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$2(O));
  3346. },
  3347. // `RegExp.prototype[@@match]` method
  3348. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3349. function (string) {
  3350. var rx = anObject$1(this);
  3351. var S = toString$2(string);
  3352. var res = maybeCallNative(nativeMatch, rx, S);
  3353. if (res.done) return res.value;
  3354. if (!rx.global) return regExpExec$1(rx, S);
  3355. var fullUnicode = rx.unicode;
  3356. rx.lastIndex = 0;
  3357. var A = [];
  3358. var n = 0;
  3359. var result;
  3360. while ((result = regExpExec$1(rx, S)) !== null) {
  3361. var matchStr = toString$2(result[0]);
  3362. A[n] = matchStr;
  3363. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$2(rx.lastIndex), fullUnicode);
  3364. n++;
  3365. }
  3366. return n === 0 ? null : A;
  3367. }
  3368. ];
  3369. });
  3370. var uncurryThis$2 = functionUncurryThis;
  3371. var toObject = toObject$8;
  3372. var floor = Math.floor;
  3373. var charAt = uncurryThis$2(''.charAt);
  3374. var replace = uncurryThis$2(''.replace);
  3375. var stringSlice$2 = uncurryThis$2(''.slice);
  3376. // eslint-disable-next-line redos/no-vulnerable -- safe
  3377. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  3378. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  3379. // `GetSubstitution` abstract operation
  3380. // https://tc39.es/ecma262/#sec-getsubstitution
  3381. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  3382. var tailPos = position + matched.length;
  3383. var m = captures.length;
  3384. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3385. if (namedCaptures !== undefined) {
  3386. namedCaptures = toObject(namedCaptures);
  3387. symbols = SUBSTITUTION_SYMBOLS;
  3388. }
  3389. return replace(replacement, symbols, function (match, ch) {
  3390. var capture;
  3391. switch (charAt(ch, 0)) {
  3392. case '$': return '$';
  3393. case '&': return matched;
  3394. case '`': return stringSlice$2(str, 0, position);
  3395. case "'": return stringSlice$2(str, tailPos);
  3396. case '<':
  3397. capture = namedCaptures[stringSlice$2(ch, 1, -1)];
  3398. break;
  3399. default: // \d\d?
  3400. var n = +ch;
  3401. if (n === 0) return match;
  3402. if (n > m) {
  3403. var f = floor(n / 10);
  3404. if (f === 0) return match;
  3405. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  3406. return match;
  3407. }
  3408. capture = captures[n - 1];
  3409. }
  3410. return capture === undefined ? '' : capture;
  3411. });
  3412. };
  3413. var apply = functionApply;
  3414. var call = functionCall;
  3415. var uncurryThis$1 = functionUncurryThis;
  3416. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  3417. var fails = fails$s;
  3418. var anObject = anObject$f;
  3419. var isCallable = isCallable$j;
  3420. var isNullOrUndefined = isNullOrUndefined$7;
  3421. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  3422. var toLength$1 = toLength$5;
  3423. var toString$1 = toString$a;
  3424. var requireObjectCoercible$1 = requireObjectCoercible$a;
  3425. var advanceStringIndex = advanceStringIndex$3;
  3426. var getMethod = getMethod$6;
  3427. var getSubstitution = getSubstitution$1;
  3428. var regExpExec = regexpExecAbstract;
  3429. var wellKnownSymbol = wellKnownSymbol$i;
  3430. var REPLACE = wellKnownSymbol('replace');
  3431. var max = Math.max;
  3432. var min$1 = Math.min;
  3433. var concat = uncurryThis$1([].concat);
  3434. var push = uncurryThis$1([].push);
  3435. var stringIndexOf = uncurryThis$1(''.indexOf);
  3436. var stringSlice$1 = uncurryThis$1(''.slice);
  3437. var maybeToString = function (it) {
  3438. return it === undefined ? it : String(it);
  3439. };
  3440. // IE <= 11 replaces $0 with the whole match, as if it was $&
  3441. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  3442. var REPLACE_KEEPS_$0 = (function () {
  3443. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  3444. return 'a'.replace(/./, '$0') === '$0';
  3445. })();
  3446. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  3447. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  3448. if (/./[REPLACE]) {
  3449. return /./[REPLACE]('a', '$0') === '';
  3450. }
  3451. return false;
  3452. })();
  3453. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  3454. var re = /./;
  3455. re.exec = function () {
  3456. var result = [];
  3457. result.groups = { a: '7' };
  3458. return result;
  3459. };
  3460. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  3461. return ''.replace(re, '$<a>') !== '7';
  3462. });
  3463. // @@replace logic
  3464. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  3465. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3466. return [
  3467. // `String.prototype.replace` method
  3468. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3469. function replace(searchValue, replaceValue) {
  3470. var O = requireObjectCoercible$1(this);
  3471. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  3472. return replacer
  3473. ? call(replacer, searchValue, O, replaceValue)
  3474. : call(nativeReplace, toString$1(O), searchValue, replaceValue);
  3475. },
  3476. // `RegExp.prototype[@@replace]` method
  3477. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3478. function (string, replaceValue) {
  3479. var rx = anObject(this);
  3480. var S = toString$1(string);
  3481. if (
  3482. typeof replaceValue == 'string' &&
  3483. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  3484. stringIndexOf(replaceValue, '$<') === -1
  3485. ) {
  3486. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  3487. if (res.done) return res.value;
  3488. }
  3489. var functionalReplace = isCallable(replaceValue);
  3490. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  3491. var global = rx.global;
  3492. var fullUnicode;
  3493. if (global) {
  3494. fullUnicode = rx.unicode;
  3495. rx.lastIndex = 0;
  3496. }
  3497. var results = [];
  3498. var result;
  3499. while (true) {
  3500. result = regExpExec(rx, S);
  3501. if (result === null) break;
  3502. push(results, result);
  3503. if (!global) break;
  3504. var matchStr = toString$1(result[0]);
  3505. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
  3506. }
  3507. var accumulatedResult = '';
  3508. var nextSourcePosition = 0;
  3509. for (var i = 0; i < results.length; i++) {
  3510. result = results[i];
  3511. var matched = toString$1(result[0]);
  3512. var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
  3513. var captures = [];
  3514. var replacement;
  3515. // NOTE: This is equivalent to
  3516. // captures = result.slice(1).map(maybeToString)
  3517. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3518. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3519. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3520. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  3521. var namedCaptures = result.groups;
  3522. if (functionalReplace) {
  3523. var replacerArgs = concat([matched], captures, position, S);
  3524. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  3525. replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  3526. } else {
  3527. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3528. }
  3529. if (position >= nextSourcePosition) {
  3530. accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
  3531. nextSourcePosition = position + matched.length;
  3532. }
  3533. }
  3534. return accumulatedResult + stringSlice$1(S, nextSourcePosition);
  3535. }
  3536. ];
  3537. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  3538. var $ = _export;
  3539. var uncurryThis = functionUncurryThisClause;
  3540. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  3541. var toLength = toLength$5;
  3542. var toString = toString$a;
  3543. var notARegExp = notARegexp;
  3544. var requireObjectCoercible = requireObjectCoercible$a;
  3545. var correctIsRegExpLogic = correctIsRegexpLogic;
  3546. var stringSlice = uncurryThis(''.slice);
  3547. var min = Math.min;
  3548. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  3549. // https://github.com/zloirock/core-js/pull/702
  3550. var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
  3551. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  3552. return descriptor && !descriptor.writable;
  3553. }();
  3554. // `String.prototype.startsWith` method
  3555. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  3556. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  3557. startsWith: function startsWith(searchString /* , position = 0 */) {
  3558. var that = toString(requireObjectCoercible(this));
  3559. notARegExp(searchString);
  3560. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  3561. var search = toString(searchString);
  3562. return stringSlice(that, index, index + search.length) === search;
  3563. }
  3564. });
  3565. /* eslint-disable no-use-before-define */
  3566. var Utils$1 = $$l.fn.bootstrapTable.utils;
  3567. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3568. function getInputClass(that) {
  3569. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3570. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3571. return that.options.iconSize ? Utils$1.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  3572. }
  3573. function getOptionsFromSelectControl(selectControl) {
  3574. return selectControl[0].options;
  3575. }
  3576. function getControlContainer(that) {
  3577. if (that.options.filterControlContainer) {
  3578. return $$l("".concat(that.options.filterControlContainer));
  3579. }
  3580. if (that.options.height && that._initialized) {
  3581. return that.$tableContainer.find('.fixed-table-header table thead');
  3582. }
  3583. return that.$header;
  3584. }
  3585. function isKeyAllowed(keyCode) {
  3586. return $$l.inArray(keyCode, [37, 38, 39, 40]) > -1;
  3587. }
  3588. function getSearchControls(that) {
  3589. return getControlContainer(that).find(searchControls);
  3590. }
  3591. function existOptionInSelectControl(selectControl, value) {
  3592. var options = getOptionsFromSelectControl(selectControl);
  3593. for (var i = 0; i < options.length; i++) {
  3594. if (options[i].value === Utils$1.unescapeHTML(value)) {
  3595. // The value is not valid to add
  3596. return true;
  3597. }
  3598. }
  3599. // If we get here, the value is valid to add
  3600. return false;
  3601. }
  3602. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3603. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3604. value = Utils$1.removeHTML(Utils$1.unescapeHTML(value));
  3605. text = Utils$1.removeHTML(Utils$1.unescapeHTML(text));
  3606. if (existOptionInSelectControl(selectControl, value)) {
  3607. return;
  3608. }
  3609. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3610. var option = new Option(text, value, false, isSelected);
  3611. selectControl.get(0).add(option);
  3612. }
  3613. function sortSelectControl(selectControl, orderBy, options) {
  3614. var $selectControl = selectControl.get(0);
  3615. if (orderBy === 'server') {
  3616. return;
  3617. }
  3618. var tmpAry = new Array();
  3619. for (var i = 0; i < $selectControl.options.length; i++) {
  3620. tmpAry[i] = new Array();
  3621. tmpAry[i][0] = $selectControl.options[i].text;
  3622. tmpAry[i][1] = $selectControl.options[i].value;
  3623. tmpAry[i][2] = $selectControl.options[i].selected;
  3624. }
  3625. tmpAry.sort(function (a, b) {
  3626. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  3627. });
  3628. while ($selectControl.options.length > 0) {
  3629. $selectControl.options[0] = null;
  3630. }
  3631. for (var _i = 0; _i < tmpAry.length; _i++) {
  3632. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3633. $selectControl.add(op);
  3634. }
  3635. }
  3636. function fixHeaderCSS(_ref) {
  3637. var $tableHeader = _ref.$tableHeader;
  3638. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3639. }
  3640. function getElementClass($element) {
  3641. return $element.attr('class').split(' ').filter(function (className) {
  3642. return className.startsWith('bootstrap-table-filter-control-');
  3643. });
  3644. }
  3645. function getCursorPosition(el) {
  3646. if ($$l(el).is('input[type=search]')) {
  3647. var pos = 0;
  3648. if ('selectionStart' in el) {
  3649. pos = el.selectionStart;
  3650. } else if ('selection' in document) {
  3651. el.focus();
  3652. var Sel = document.selection.createRange();
  3653. var SelLength = document.selection.createRange().text.length;
  3654. Sel.moveStart('character', -el.value.length);
  3655. pos = Sel.text.length - SelLength;
  3656. }
  3657. return pos;
  3658. }
  3659. return -1;
  3660. }
  3661. function cacheValues(that) {
  3662. var searchControls = getSearchControls(that);
  3663. that._valuesFilterControl = [];
  3664. searchControls.each(function () {
  3665. var $field = $$l(this);
  3666. var fieldClass = escapeID(getElementClass($field));
  3667. if (that.options.height && !that.options.filterControlContainer) {
  3668. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  3669. } else if (that.options.filterControlContainer) {
  3670. $field = $$l("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3671. } else {
  3672. $field = that.$el.find(".".concat(fieldClass));
  3673. }
  3674. that._valuesFilterControl.push({
  3675. field: $field.closest('[data-field]').data('field'),
  3676. value: $field.val(),
  3677. position: getCursorPosition($field.get(0)),
  3678. hasFocus: $field.is(':focus')
  3679. });
  3680. });
  3681. }
  3682. function setCaretPosition(elem, caretPos) {
  3683. try {
  3684. if (elem) {
  3685. if (elem.createTextRange) {
  3686. var range = elem.createTextRange();
  3687. range.move('character', caretPos);
  3688. range.select();
  3689. } else {
  3690. elem.setSelectionRange(caretPos, caretPos);
  3691. }
  3692. }
  3693. } catch (ex) {
  3694. // ignored
  3695. }
  3696. }
  3697. function setValues(that) {
  3698. var field = null;
  3699. var result = [];
  3700. var searchControls = getSearchControls(that);
  3701. if (that._valuesFilterControl.length > 0) {
  3702. // Callback to apply after settings fields values
  3703. var callbacks = [];
  3704. searchControls.each(function (i, el) {
  3705. var $this = $$l(el);
  3706. field = $this.closest('[data-field]').data('field');
  3707. result = that._valuesFilterControl.filter(function (valueObj) {
  3708. return valueObj.field === field;
  3709. });
  3710. if (result.length > 0) {
  3711. if (result[0].hasFocus || result[0].value) {
  3712. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3713. // Closure here to capture the field information
  3714. var closedCallback = function closedCallback() {
  3715. if (cacheElementInfo.hasFocus) {
  3716. element.focus();
  3717. }
  3718. if (Array.isArray(cacheElementInfo.value)) {
  3719. var $element = $$l(element);
  3720. $$l.each(cacheElementInfo.value, function (i, e) {
  3721. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3722. });
  3723. } else {
  3724. element.value = cacheElementInfo.value;
  3725. }
  3726. setCaretPosition(element, cacheElementInfo.position);
  3727. };
  3728. return closedCallback;
  3729. }($this.get(0), result[0]);
  3730. callbacks.push(fieldToFocusCallback);
  3731. }
  3732. }
  3733. });
  3734. // Callback call.
  3735. if (callbacks.length > 0) {
  3736. callbacks.forEach(function (callback) {
  3737. return callback();
  3738. });
  3739. }
  3740. }
  3741. }
  3742. function collectBootstrapTableFilterCookies() {
  3743. var cookies = [];
  3744. var cookieRegex = /bs\.table\.(filterControl|searchText)/g;
  3745. var foundCookies = document.cookie.match(cookieRegex);
  3746. var foundLocalStorage = localStorage;
  3747. if (foundCookies) {
  3748. $$l.each(foundCookies, function (i, _cookie) {
  3749. var cookie = _cookie;
  3750. if (/./.test(cookie)) {
  3751. cookie = cookie.split('.').pop();
  3752. }
  3753. if ($$l.inArray(cookie, cookies) === -1) {
  3754. cookies.push(cookie);
  3755. }
  3756. });
  3757. }
  3758. if (!foundLocalStorage) {
  3759. return cookies;
  3760. }
  3761. Object.keys(localStorage).forEach(function (cookie) {
  3762. if (!cookieRegex.test(cookie)) {
  3763. return;
  3764. }
  3765. cookie = cookie.split('.').pop();
  3766. if (!cookies.includes(cookie)) {
  3767. cookies.push(cookie);
  3768. }
  3769. });
  3770. return cookies;
  3771. }
  3772. function escapeID(id) {
  3773. // eslint-disable-next-line no-useless-escape
  3774. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3775. }
  3776. function isColumnSearchableViaSelect(_ref2) {
  3777. var filterControl = _ref2.filterControl,
  3778. searchable = _ref2.searchable;
  3779. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3780. }
  3781. function isFilterDataNotGiven(_ref3) {
  3782. var filterData = _ref3.filterData;
  3783. return filterData === undefined || filterData.toLowerCase() === 'column';
  3784. }
  3785. function hasSelectControlElement(selectControl) {
  3786. return selectControl && selectControl.length > 0;
  3787. }
  3788. function initFilterSelectControls(that) {
  3789. var data = that.options.data;
  3790. $$l.each(that.header.fields, function (j, field) {
  3791. var column = that.columns[that.fieldsColumnsIndex[field]];
  3792. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3793. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3794. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3795. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3796. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3797. }
  3798. var uniqueValues = {};
  3799. for (var i = 0; i < data.length; i++) {
  3800. // Added a new value
  3801. var fieldValue = Utils$1.getItemField(data[i], field, false);
  3802. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3803. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3804. if (fieldValue === undefined || fieldValue === null) {
  3805. fieldValue = formattedValue;
  3806. column._forceFormatter = true;
  3807. }
  3808. if (column.filterDataCollector) {
  3809. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3810. }
  3811. if (column.searchFormatter) {
  3812. fieldValue = formattedValue;
  3813. }
  3814. uniqueValues[formattedValue] = fieldValue;
  3815. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3816. formattedValue.forEach(function (value) {
  3817. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3818. });
  3819. continue;
  3820. }
  3821. }
  3822. // eslint-disable-next-line guard-for-in
  3823. for (var key in uniqueValues) {
  3824. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3825. }
  3826. if (that.options.sortSelectOptions) {
  3827. sortSelectControl(selectControl, column.filterOrderBy, that.options);
  3828. }
  3829. }
  3830. });
  3831. }
  3832. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3833. var keys = Object.keys(objFilterDataMethod);
  3834. for (var i = 0; i < keys.length; i++) {
  3835. if (keys[i] === searchTerm) {
  3836. return objFilterDataMethod[searchTerm];
  3837. }
  3838. }
  3839. return null;
  3840. }
  3841. function createControls(that, header) {
  3842. var addedFilterControl = false;
  3843. var html;
  3844. $$l.each(that.columns, function (_, column) {
  3845. html = [];
  3846. if (!column.visible && !(that.options.filterControlContainer && $$l(".bootstrap-table-filter-control-".concat(escapeID(column.field))).length >= 1)) {
  3847. return;
  3848. }
  3849. if (!column.filterControl && !that.options.filterControlContainer) {
  3850. html.push('<div class="no-filter-control"></div>');
  3851. } else if (that.options.filterControlContainer) {
  3852. // Use a filter control container instead of th
  3853. var $filterControls = $$l(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3854. $$l.each($filterControls, function (_, filterControl) {
  3855. var $filterControl = $$l(filterControl);
  3856. if (!$filterControl.is('[type=radio]')) {
  3857. var placeholder = column.filterControlPlaceholder || '';
  3858. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3859. }
  3860. $filterControl.attr('data-field', column.field);
  3861. });
  3862. addedFilterControl = true;
  3863. } else {
  3864. // Create the control based on the html defined in the filterTemplate array.
  3865. var nameControl = column.filterControl.toLowerCase();
  3866. html.push('<div class="filter-control">');
  3867. addedFilterControl = true;
  3868. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3869. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3870. }
  3871. }
  3872. // Filtering by default when it is set.
  3873. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3874. if (Utils$1.isEmptyObject(that.filterColumnsPartial)) {
  3875. that.filterColumnsPartial = {};
  3876. }
  3877. if (!(column.field in that.filterColumnsPartial)) {
  3878. that.filterColumnsPartial[column.field] = column.filterDefault;
  3879. }
  3880. }
  3881. $$l.each(header.find('th'), function (_, th) {
  3882. var $th = $$l(th);
  3883. if ($th.data('field') === column.field) {
  3884. $th.find('.filter-control').remove();
  3885. $th.find('.fht-cell').html(html.join(''));
  3886. return false;
  3887. }
  3888. });
  3889. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3890. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3891. var filterDataSource;
  3892. var selectControl;
  3893. if (filterDataType) {
  3894. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3895. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3896. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3897. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3898. } else {
  3899. 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"}');
  3900. }
  3901. }
  3902. });
  3903. if (addedFilterControl) {
  3904. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3905. var currentTarget = _ref4.currentTarget,
  3906. keyCode = _ref4.keyCode;
  3907. keyCode = obj ? obj.keyCode : keyCode;
  3908. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3909. return;
  3910. }
  3911. if (isKeyAllowed(keyCode)) {
  3912. return;
  3913. }
  3914. var $currentTarget = $$l(currentTarget);
  3915. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3916. return;
  3917. }
  3918. clearTimeout(currentTarget.timeoutId || 0);
  3919. currentTarget.timeoutId = setTimeout(function () {
  3920. that.onColumnSearch({
  3921. currentTarget: currentTarget,
  3922. keyCode: keyCode
  3923. });
  3924. }, that.options.searchTimeOut);
  3925. });
  3926. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3927. var currentTarget = _ref5.currentTarget,
  3928. keyCode = _ref5.keyCode;
  3929. var $selectControl = $$l(currentTarget);
  3930. var value = $selectControl.val();
  3931. if (Array.isArray(value)) {
  3932. for (var i = 0; i < value.length; i++) {
  3933. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3934. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3935. }
  3936. }
  3937. } else if (value && value.length > 0 && value.trim()) {
  3938. $selectControl.find('option[selected]').removeAttr('selected');
  3939. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3940. } else {
  3941. $selectControl.find('option[selected]').removeAttr('selected');
  3942. }
  3943. clearTimeout(currentTarget.timeoutId || 0);
  3944. currentTarget.timeoutId = setTimeout(function () {
  3945. that.onColumnSearch({
  3946. currentTarget: currentTarget,
  3947. keyCode: keyCode
  3948. });
  3949. }, that.options.searchTimeOut);
  3950. });
  3951. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3952. var currentTarget = _ref6.currentTarget,
  3953. keyCode = _ref6.keyCode;
  3954. var $input = $$l(currentTarget);
  3955. var oldValue = $input.val();
  3956. if (oldValue === '') {
  3957. return;
  3958. }
  3959. setTimeout(function () {
  3960. var newValue = $input.val();
  3961. if (newValue === '') {
  3962. clearTimeout(currentTarget.timeoutId || 0);
  3963. currentTarget.timeoutId = setTimeout(function () {
  3964. that.onColumnSearch({
  3965. currentTarget: currentTarget,
  3966. keyCode: keyCode
  3967. });
  3968. }, that.options.searchTimeOut);
  3969. }
  3970. }, 1);
  3971. });
  3972. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3973. var currentTarget = _ref7.currentTarget,
  3974. keyCode = _ref7.keyCode;
  3975. clearTimeout(currentTarget.timeoutId || 0);
  3976. currentTarget.timeoutId = setTimeout(function () {
  3977. that.onColumnSearch({
  3978. currentTarget: currentTarget,
  3979. keyCode: keyCode
  3980. });
  3981. }, that.options.searchTimeOut);
  3982. });
  3983. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3984. if (header.find('.date-filter-control').length > 0) {
  3985. $$l.each(that.columns, function (i, _ref8) {
  3986. var filterDefault = _ref8.filterDefault,
  3987. filterControl = _ref8.filterControl,
  3988. field = _ref8.field,
  3989. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  3990. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  3991. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(escapeID(field)));
  3992. if (filterDefault) {
  3993. $datepicker.value(filterDefault);
  3994. }
  3995. if (filterDatepickerOptions.min) {
  3996. $datepicker.attr('min', filterDatepickerOptions.min);
  3997. }
  3998. if (filterDatepickerOptions.max) {
  3999. $datepicker.attr('max', filterDatepickerOptions.max);
  4000. }
  4001. if (filterDatepickerOptions.step) {
  4002. $datepicker.attr('step', filterDatepickerOptions.step);
  4003. }
  4004. if (filterDatepickerOptions.pattern) {
  4005. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  4006. }
  4007. $datepicker.on('change', function (_ref9) {
  4008. var currentTarget = _ref9.currentTarget;
  4009. clearTimeout(currentTarget.timeoutId || 0);
  4010. currentTarget.timeoutId = setTimeout(function () {
  4011. that.onColumnSearch({
  4012. currentTarget: currentTarget
  4013. });
  4014. }, that.options.searchTimeOut);
  4015. });
  4016. }
  4017. });
  4018. }
  4019. if (that.options.sidePagination !== 'server') {
  4020. that.triggerSearch();
  4021. }
  4022. if (!that.options.filterControlVisible) {
  4023. header.find('.filter-control, .no-filter-control').hide();
  4024. }
  4025. } else {
  4026. header.find('.filter-control, .no-filter-control').hide();
  4027. }
  4028. that.trigger('created-controls');
  4029. }
  4030. function getDirectionOfSelectOptions(_alignment) {
  4031. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  4032. switch (alignment) {
  4033. case 'left':
  4034. return 'ltr';
  4035. case 'right':
  4036. return 'rtl';
  4037. case 'auto':
  4038. return 'auto';
  4039. default:
  4040. return 'ltr';
  4041. }
  4042. }
  4043. function syncHeaders(that) {
  4044. if (!that.options.height) {
  4045. return;
  4046. }
  4047. var fixedHeader = that.$tableContainer.find('.fixed-table-header table thead');
  4048. if (fixedHeader.length === 0) {
  4049. return;
  4050. }
  4051. that.$header.children().find('th[data-field]').each(function (_, element) {
  4052. if (element.classList[0] !== 'bs-checkbox') {
  4053. var $element = $$l(element);
  4054. var $field = $element.data('field');
  4055. var $fixedField = that.$tableContainer.find("th[data-field='".concat($field, "']")).not($element);
  4056. var input = $element.find('input');
  4057. var fixedInput = $fixedField.find('input');
  4058. if (input.length > 0 && fixedInput.length > 0) {
  4059. if (input.val() !== fixedInput.val()) {
  4060. input.val(fixedInput.val());
  4061. }
  4062. }
  4063. }
  4064. });
  4065. }
  4066. var filterDataMethods = {
  4067. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4068. var variableValues = window[filterDataSource].apply();
  4069. // eslint-disable-next-line guard-for-in
  4070. for (var key in variableValues) {
  4071. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4072. }
  4073. if (that.options.sortSelectOptions) {
  4074. sortSelectControl(selectControl, filterOrderBy, that.options);
  4075. }
  4076. setValues(that);
  4077. },
  4078. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4079. var objectKeys = filterDataSource.split('.');
  4080. var variableName = objectKeys.shift();
  4081. var variableValues = window[variableName];
  4082. if (objectKeys.length > 0) {
  4083. objectKeys.forEach(function (key) {
  4084. variableValues = variableValues[key];
  4085. });
  4086. }
  4087. // eslint-disable-next-line guard-for-in
  4088. for (var key in variableValues) {
  4089. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4090. }
  4091. if (that.options.sortSelectOptions) {
  4092. sortSelectControl(selectControl, filterOrderBy, that.options);
  4093. }
  4094. setValues(that);
  4095. },
  4096. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4097. var variableValues = window[filterDataSource];
  4098. var isArray = Array.isArray(variableValues);
  4099. for (var key in variableValues) {
  4100. if (isArray) {
  4101. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  4102. } else {
  4103. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  4104. }
  4105. }
  4106. if (that.options.sortSelectOptions) {
  4107. sortSelectControl(selectControl, filterOrderBy, that.options);
  4108. }
  4109. setValues(that);
  4110. },
  4111. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4112. $$l.ajax({
  4113. url: filterDataSource,
  4114. dataType: 'json',
  4115. success: function success(data) {
  4116. // eslint-disable-next-line guard-for-in
  4117. for (var key in data) {
  4118. addOptionToSelectControl(selectControl, key, data[key], selected);
  4119. }
  4120. if (that.options.sortSelectOptions) {
  4121. sortSelectControl(selectControl, filterOrderBy, that.options);
  4122. }
  4123. setValues(that);
  4124. }
  4125. });
  4126. },
  4127. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4128. var variableValues = JSON.parse(filterDataSource);
  4129. // eslint-disable-next-line guard-for-in
  4130. for (var key in variableValues) {
  4131. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4132. }
  4133. if (that.options.sortSelectOptions) {
  4134. sortSelectControl(selectControl, filterOrderBy, that.options);
  4135. }
  4136. setValues(that);
  4137. }
  4138. };
  4139. var Utils = $$l.fn.bootstrapTable.utils;
  4140. Object.assign($$l.fn.bootstrapTable.defaults, {
  4141. filterControl: false,
  4142. filterControlVisible: true,
  4143. filterControlMultipleSearch: false,
  4144. filterControlMultipleSearchDelimiter: ',',
  4145. filterControlSearchClear: true,
  4146. // eslint-disable-next-line no-unused-vars
  4147. onColumnSearch: function onColumnSearch(field, text) {
  4148. return false;
  4149. },
  4150. onCreatedControls: function onCreatedControls() {
  4151. return false;
  4152. },
  4153. alignmentSelectControlOptions: undefined,
  4154. filterTemplate: {
  4155. input: function input(that, column, placeholder, value) {
  4156. return Utils.sprintf('<input type="search" class="%s bootstrap-table-filter-control-%s search-input" style="width: 100%;" placeholder="%s" value="%s">', getInputClass(that), column.field, 'undefined' === typeof placeholder ? '' : placeholder, 'undefined' === typeof value ? '' : value);
  4157. },
  4158. select: function select(that, column) {
  4159. return Utils.sprintf('<select class="%s bootstrap-table-filter-control-%s %s" %s style="width: 100%;" dir="%s"></select>', getInputClass(that, true), column.field, '', '', getDirectionOfSelectOptions(that.options.alignmentSelectControlOptions));
  4160. },
  4161. datepicker: function datepicker(that, column, value) {
  4162. return Utils.sprintf('<input type="date" class="%s date-filter-control bootstrap-table-filter-control-%s" style="width: 100%;" value="%s">', getInputClass(that), column.field, 'undefined' === typeof value ? '' : value);
  4163. }
  4164. },
  4165. searchOnEnterKey: false,
  4166. showFilterControlSwitch: false,
  4167. sortSelectOptions: false,
  4168. // internal variables
  4169. _valuesFilterControl: [],
  4170. _initialized: false,
  4171. _isRendering: false,
  4172. _usingMultipleSelect: false
  4173. });
  4174. Object.assign($$l.fn.bootstrapTable.columnDefaults, {
  4175. filterControl: undefined,
  4176. // input, select, datepicker
  4177. filterControlMultipleSelect: false,
  4178. filterControlMultipleSelectOptions: {},
  4179. filterDataCollector: undefined,
  4180. filterData: undefined,
  4181. filterDatepickerOptions: {},
  4182. filterStrictSearch: false,
  4183. filterStartsWithSearch: false,
  4184. filterControlPlaceholder: '',
  4185. filterDefault: '',
  4186. filterOrderBy: 'asc',
  4187. // asc || desc
  4188. filterCustomSearch: undefined
  4189. });
  4190. Object.assign($$l.fn.bootstrapTable.events, {
  4191. 'column-search.bs.table': 'onColumnSearch',
  4192. 'created-controls.bs.table': 'onCreatedControls'
  4193. });
  4194. Object.assign($$l.fn.bootstrapTable.defaults.icons, {
  4195. filterControlSwitchHide: {
  4196. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  4197. bootstrap5: 'bi-zoom-out',
  4198. materialize: 'zoom_out'
  4199. }[$$l.fn.bootstrapTable.theme] || 'fa-search-minus',
  4200. filterControlSwitchShow: {
  4201. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  4202. bootstrap5: 'bi-zoom-in',
  4203. materialize: 'zoom_in'
  4204. }[$$l.fn.bootstrapTable.theme] || 'fa-search-plus'
  4205. });
  4206. Object.assign($$l.fn.bootstrapTable.locales, {
  4207. formatFilterControlSwitch: function formatFilterControlSwitch() {
  4208. return 'Hide/Show controls';
  4209. },
  4210. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  4211. return 'Hide controls';
  4212. },
  4213. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  4214. return 'Show controls';
  4215. },
  4216. formatClearSearch: function formatClearSearch() {
  4217. return 'Clear filters';
  4218. }
  4219. });
  4220. Object.assign($$l.fn.bootstrapTable.defaults, $$l.fn.bootstrapTable.locales);
  4221. $$l.fn.bootstrapTable.methods.push('triggerSearch');
  4222. $$l.fn.bootstrapTable.methods.push('clearFilterControl');
  4223. $$l.fn.bootstrapTable.methods.push('toggleFilterControl');
  4224. $$l.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  4225. function _class() {
  4226. _classCallCheck(this, _class);
  4227. return _callSuper(this, _class, arguments);
  4228. }
  4229. _inherits(_class, _$$BootstrapTable);
  4230. return _createClass(_class, [{
  4231. key: "init",
  4232. value: function init() {
  4233. var _this = this;
  4234. // Make sure that the filterControl option is set
  4235. if (this.options.filterControl) {
  4236. // Make sure that the internal variables are set correctly
  4237. this._valuesFilterControl = [];
  4238. this._initialized = false;
  4239. this._usingMultipleSelect = false;
  4240. this._isRendering = false;
  4241. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  4242. initFilterSelectControls(_this);
  4243. setValues(_this);
  4244. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  4245. _this._initialized = false;
  4246. if (!cardView) {
  4247. initFilterSelectControls(_this);
  4248. setValues(_this);
  4249. _this._initialized = true;
  4250. }
  4251. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  4252. initFilterSelectControls(_this);
  4253. setValues(_this);
  4254. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  4255. setValues(_this);
  4256. if (_this.options.height) {
  4257. _this.fitHeader();
  4258. }
  4259. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  4260. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  4261. fixHeaderCSS(_this);
  4262. }
  4263. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  4264. }, 1)).on('all.bs.table', function () {
  4265. syncHeaders(_this);
  4266. });
  4267. }
  4268. _superPropGet(_class, "init", this)([]);
  4269. }
  4270. }, {
  4271. key: "initBody",
  4272. value: function initBody() {
  4273. var _this2 = this;
  4274. _superPropGet(_class, "initBody", this)([]);
  4275. if (!this.options.filterControl) {
  4276. return;
  4277. }
  4278. setTimeout(function () {
  4279. initFilterSelectControls(_this2);
  4280. setValues(_this2);
  4281. }, 3);
  4282. }
  4283. }, {
  4284. key: "load",
  4285. value: function load(data) {
  4286. _superPropGet(_class, "load", this)([data]);
  4287. if (!this.options.filterControl) {
  4288. return;
  4289. }
  4290. createControls(this, getControlContainer(this));
  4291. setValues(this);
  4292. }
  4293. }, {
  4294. key: "initHeader",
  4295. value: function initHeader() {
  4296. _superPropGet(_class, "initHeader", this)([]);
  4297. if (!this.options.filterControl) {
  4298. return;
  4299. }
  4300. createControls(this, getControlContainer(this));
  4301. this._initialized = true;
  4302. }
  4303. }, {
  4304. key: "initSearch",
  4305. value: function initSearch() {
  4306. var _this3 = this;
  4307. var that = this;
  4308. var filterPartial = Utils.isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  4309. _superPropGet(_class, "initSearch", this)([]);
  4310. if (this.options.sidePagination === 'server' || filterPartial === null) {
  4311. return;
  4312. }
  4313. // Check partial column filter
  4314. that.data = filterPartial ? that.data.filter(function (item, i) {
  4315. var itemIsExpected = [];
  4316. var keys1 = Object.keys(item);
  4317. var keys2 = Object.keys(filterPartial);
  4318. var keys = keys1.concat(keys2.filter(function (item) {
  4319. return !keys1.includes(item);
  4320. }));
  4321. keys.forEach(function (key) {
  4322. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  4323. var rawFilterValue = filterPartial[key] || '';
  4324. var filterValue = rawFilterValue.toLowerCase();
  4325. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  4326. var tmpItemIsExpected;
  4327. if (_this3.options.searchAccentNeutralise) {
  4328. filterValue = Utils.normalizeAccent(filterValue);
  4329. }
  4330. var filterValues = [filterValue];
  4331. if (_this3.options.filterControlMultipleSearch) {
  4332. filterValues = filterValue.split(_this3.options.filterControlMultipleSearchDelimiter);
  4333. }
  4334. filterValues.forEach(function (filterValue) {
  4335. if (tmpItemIsExpected === true) {
  4336. return;
  4337. }
  4338. filterValue = filterValue.trim();
  4339. if (filterValue === '') {
  4340. tmpItemIsExpected = true;
  4341. } else {
  4342. // Fix #142: search use formatted data
  4343. if (thisColumn) {
  4344. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  4345. value = $$l.fn.bootstrapTable.utils.calculateObjectValue(thisColumn, that.header.formatters[$$l.inArray(key, that.header.fields)], [value, item, i], value);
  4346. }
  4347. }
  4348. if ($$l.inArray(key, that.header.fields) !== -1) {
  4349. if (value === undefined || value === null) {
  4350. tmpItemIsExpected = false;
  4351. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  4352. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  4353. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  4354. value.forEach(function (objectValue) {
  4355. if (tmpItemIsExpected) {
  4356. return;
  4357. }
  4358. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4359. });
  4360. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  4361. Object.values(value).forEach(function (objectValue) {
  4362. if (tmpItemIsExpected) {
  4363. return;
  4364. }
  4365. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4366. });
  4367. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  4368. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  4369. }
  4370. }
  4371. }
  4372. });
  4373. itemIsExpected.push(tmpItemIsExpected);
  4374. });
  4375. return !itemIsExpected.includes(false);
  4376. }) : that.data;
  4377. that.unsortedData = _toConsumableArray(that.data);
  4378. }
  4379. }, {
  4380. key: "isValueExpected",
  4381. value: function isValueExpected(searchValue, value, column, key) {
  4382. var tmpItemIsExpected;
  4383. if (column.filterControl === 'select') {
  4384. value = Utils.removeHTML(value.toString().toLowerCase());
  4385. }
  4386. if (this.options.searchAccentNeutralise) {
  4387. value = Utils.normalizeAccent(value);
  4388. }
  4389. if (column.filterStrictSearch || column.filterControl === 'select' && column.passed.filterStrictSearch !== false) {
  4390. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  4391. } else if (column.filterStartsWithSearch) {
  4392. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  4393. } else if (column.filterControl === 'datepicker') {
  4394. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  4395. } else if (this.options.regexSearch) {
  4396. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  4397. } else {
  4398. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  4399. }
  4400. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  4401. var matches = largerSmallerEqualsRegex.exec(searchValue);
  4402. if (matches) {
  4403. var operator = matches[1] || "".concat(matches[5], "l");
  4404. var comparisonValue = matches[2] || matches[3];
  4405. var int = parseInt(value, 10);
  4406. var comparisonInt = parseInt(comparisonValue, 10);
  4407. switch (operator) {
  4408. case '>':
  4409. case '<l':
  4410. tmpItemIsExpected = int > comparisonInt;
  4411. break;
  4412. case '<':
  4413. case '>l':
  4414. tmpItemIsExpected = int < comparisonInt;
  4415. break;
  4416. case '<=':
  4417. case '=<':
  4418. case '>=l':
  4419. case '=>l':
  4420. tmpItemIsExpected = int <= comparisonInt;
  4421. break;
  4422. case '>=':
  4423. case '=>':
  4424. case '<=l':
  4425. case '=<l':
  4426. tmpItemIsExpected = int >= comparisonInt;
  4427. break;
  4428. }
  4429. }
  4430. if (column.filterCustomSearch) {
  4431. var customSearchResult = Utils.calculateObjectValue(column, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  4432. if (customSearchResult !== null) {
  4433. tmpItemIsExpected = customSearchResult;
  4434. }
  4435. }
  4436. return tmpItemIsExpected;
  4437. }
  4438. }, {
  4439. key: "initColumnSearch",
  4440. value: function initColumnSearch(filterColumnsDefaults) {
  4441. cacheValues(this);
  4442. if (filterColumnsDefaults) {
  4443. this.filterColumnsPartial = filterColumnsDefaults;
  4444. this.updatePagination();
  4445. // eslint-disable-next-line guard-for-in
  4446. for (var filter in filterColumnsDefaults) {
  4447. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  4448. }
  4449. }
  4450. }
  4451. }, {
  4452. key: "initToolbar",
  4453. value: function initToolbar() {
  4454. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  4455. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  4456. if (this.options.showFilterControlSwitch) {
  4457. this.buttons = Object.assign(this.buttons, {
  4458. filterControlSwitch: {
  4459. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  4460. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  4461. event: this.toggleFilterControl,
  4462. attributes: {
  4463. 'aria-label': this.options.formatFilterControlSwitch(),
  4464. title: this.options.formatFilterControlSwitch()
  4465. }
  4466. }
  4467. });
  4468. }
  4469. _superPropGet(_class, "initToolbar", this)([]);
  4470. }
  4471. }, {
  4472. key: "resetSearch",
  4473. value: function resetSearch(text) {
  4474. if (this.options.filterControl && this.options.filterControlSearchClear && this.options.showSearchClearButton) {
  4475. this.clearFilterControl();
  4476. }
  4477. _superPropGet(_class, "resetSearch", this)([text]);
  4478. }
  4479. }, {
  4480. key: "clearFilterControl",
  4481. value: function clearFilterControl() {
  4482. if (!this.options.filterControl) {
  4483. return;
  4484. }
  4485. var that = this;
  4486. var table = this.$el.closest('table');
  4487. var cookies = collectBootstrapTableFilterCookies();
  4488. var controls = getSearchControls(that);
  4489. // const search = Utils.getSearchInput(this)
  4490. var hasValues = false;
  4491. var timeoutId = 0;
  4492. // Clear cache values
  4493. $$l.each(that._valuesFilterControl, function (i, item) {
  4494. hasValues = hasValues ? true : item.value !== '';
  4495. item.value = '';
  4496. });
  4497. // Clear controls in UI
  4498. $$l.each(controls, function (i, item) {
  4499. item.value = '';
  4500. });
  4501. // Cache controls again
  4502. setValues(that);
  4503. // clear cookies once the filters are clean
  4504. clearTimeout(timeoutId);
  4505. timeoutId = setTimeout(function () {
  4506. if (cookies && cookies.length > 0) {
  4507. $$l.each(cookies, function (i, item) {
  4508. if (that.deleteCookie !== undefined) {
  4509. that.deleteCookie(item);
  4510. }
  4511. });
  4512. }
  4513. }, that.options.searchTimeOut);
  4514. // If there is not any value in the controls exit this method
  4515. if (!hasValues) {
  4516. return;
  4517. }
  4518. // Clear each type of filter if it exists.
  4519. // Requires the body to reload each time a type of filter is found because we never know
  4520. // which ones are going to be present.
  4521. if (controls.length > 0) {
  4522. this.filterColumnsPartial = {};
  4523. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  4524. keyCode: 13
  4525. });
  4526. /* controls.each(function () {
  4527. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  4528. })*/
  4529. } else {
  4530. return;
  4531. }
  4532. /* if (search.length > 0) {
  4533. that.resetSearch('fc')
  4534. }*/
  4535. // use the default sort order if it exists. do nothing if it does not
  4536. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  4537. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $$l(controls[0]).closest('table').data('sortName')));
  4538. if (sorter.length > 0) {
  4539. that.onSort({
  4540. type: 'keypress',
  4541. currentTarget: sorter
  4542. });
  4543. $$l(sorter).find('.sortable').trigger('click');
  4544. }
  4545. }
  4546. }
  4547. // EVENTS
  4548. }, {
  4549. key: "onColumnSearch",
  4550. value: function onColumnSearch(_ref) {
  4551. var _this4 = this;
  4552. var currentTarget = _ref.currentTarget,
  4553. keyCode = _ref.keyCode;
  4554. if (isKeyAllowed(keyCode)) {
  4555. return;
  4556. }
  4557. cacheValues(this);
  4558. // Cookie extension support
  4559. if (!this.options.cookie) {
  4560. this.options.pageNumber = 1;
  4561. } else {
  4562. // Force call the initServer method in Cookie extension
  4563. this._filterControlValuesLoaded = true;
  4564. }
  4565. if (Utils.isEmptyObject(this.filterColumnsPartial)) {
  4566. this.filterColumnsPartial = {};
  4567. }
  4568. // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  4569. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  4570. controls.forEach(function (element) {
  4571. var $element = $$l(element);
  4572. var elementValue = $element.val();
  4573. var text = elementValue ? elementValue.trim() : '';
  4574. var $field = $element.closest('[data-field]').data('field');
  4575. _this4.trigger('column-search', $field, text);
  4576. if (text) {
  4577. _this4.filterColumnsPartial[$field] = text;
  4578. } else {
  4579. delete _this4.filterColumnsPartial[$field];
  4580. }
  4581. });
  4582. this.onSearch({
  4583. currentTarget: currentTarget
  4584. }, false);
  4585. }
  4586. }, {
  4587. key: "toggleFilterControl",
  4588. value: function toggleFilterControl() {
  4589. this.options.filterControlVisible = !this.options.filterControlVisible;
  4590. // Controls in original header or container.
  4591. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  4592. if (this.options.filterControlVisible) {
  4593. $filterControls.show();
  4594. } else {
  4595. $filterControls.hide();
  4596. this.clearFilterControl();
  4597. }
  4598. // Controls in fixed header
  4599. if (this.options.height) {
  4600. var $fixedControls = this.$tableContainer.find('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  4601. $fixedControls.toggle(this.options.filterControlVisible);
  4602. fixHeaderCSS(this);
  4603. }
  4604. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  4605. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  4606. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  4607. }
  4608. }, {
  4609. key: "triggerSearch",
  4610. value: function triggerSearch() {
  4611. var searchControls = getSearchControls(this);
  4612. searchControls.each(function () {
  4613. var $element = $$l(this);
  4614. if ($element.is('select')) {
  4615. $element.trigger('change');
  4616. } else {
  4617. $element.trigger('keyup');
  4618. }
  4619. });
  4620. }
  4621. }, {
  4622. key: "_toggleColumn",
  4623. value: function _toggleColumn(index, checked, needUpdate) {
  4624. this._initialized = false;
  4625. _superPropGet(_class, "_toggleColumn", this)([index, checked, needUpdate]);
  4626. syncHeaders(this);
  4627. }
  4628. }]);
  4629. }($$l.BootstrapTable);
  4630. }));