bootstrap-table-filter-control.js 186 KB

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