bootstrap-table-filter-control.js 186 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284
  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 : 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$a = 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$9 = requireObjectCoercible$a;
  257. var toIndexedObject$6 = function (it) {
  258. return IndexedObject$3(requireObjectCoercible$9(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$c = 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$b = isObject$c;
  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$b(val = call$h(fn, input))) return val;
  373. if (isCallable$e(fn = input.valueOf) && !isObject$b(val = call$h(fn, input))) return val;
  374. if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$b(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.1',
  394. mode: 'global',
  395. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  396. license: 'https://github.com/zloirock/core-js/blob/v3.36.1/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$8 = requireObjectCoercible$a;
  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$8(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$a = isObject$c;
  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$a(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$a(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$9 = isObject$c;
  476. var document$3 = global$g.document;
  477. // typeof document.createElement is 'object' in old IE
  478. var EXISTS$1 = isObject$9(document$3) && isObject$9(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$8 = isObject$c;
  525. var $String$3 = String;
  526. var $TypeError$c = TypeError;
  527. // `Assert: Type(argument) is Object`
  528. var anObject$f = function (argument) {
  529. if (isObject$8(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$e = anObject$f;
  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$e(O);
  549. P = toPropertyKey(P);
  550. anObject$e(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$e(O);
  564. P = toPropertyKey(P);
  565. anObject$e(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$7 = isObject$c;
  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$7(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$d = anObject$f;
  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$d(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$6 = isObject$c;
  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$6(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$5 = isObject$c;
  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$5(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$c = anObject$f;
  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$c(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$b = anObject$f;
  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$b(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$7 = requireObjectCoercible$a;
  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$7($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$4 = isObject$c;
  1689. var isPossiblePrototype$1 = function (argument) {
  1690. return isObject$4(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 isObject$3 = isObject$c;
  1702. var requireObjectCoercible$6 = requireObjectCoercible$a;
  1703. var aPossiblePrototype = aPossiblePrototype$1;
  1704. // `Object.setPrototypeOf` method
  1705. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1706. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1707. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  1708. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1709. var CORRECT_SETTER = false;
  1710. var test = {};
  1711. var setter;
  1712. try {
  1713. setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
  1714. setter(test, []);
  1715. CORRECT_SETTER = test instanceof Array;
  1716. } catch (error) { /* empty */ }
  1717. return function setPrototypeOf(O, proto) {
  1718. requireObjectCoercible$6(O);
  1719. aPossiblePrototype(proto);
  1720. if (!isObject$3(O)) return O;
  1721. if (CORRECT_SETTER) setter(O, proto);
  1722. else O.__proto__ = proto;
  1723. return O;
  1724. };
  1725. }() : undefined);
  1726. var defineProperty$1 = objectDefineProperty.f;
  1727. var hasOwn$2 = hasOwnProperty_1;
  1728. var wellKnownSymbol$a = wellKnownSymbol$i;
  1729. var TO_STRING_TAG = wellKnownSymbol$a('toStringTag');
  1730. var setToStringTag$1 = function (target, TAG, STATIC) {
  1731. if (target && !STATIC) target = target.prototype;
  1732. if (target && !hasOwn$2(target, TO_STRING_TAG)) {
  1733. defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
  1734. }
  1735. };
  1736. var makeBuiltIn = makeBuiltInExports;
  1737. var defineProperty = objectDefineProperty;
  1738. var defineBuiltInAccessor$1 = function (target, name, descriptor) {
  1739. if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
  1740. if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
  1741. return defineProperty.f(target, name, descriptor);
  1742. };
  1743. var getBuiltIn$2 = getBuiltIn$7;
  1744. var defineBuiltInAccessor = defineBuiltInAccessor$1;
  1745. var wellKnownSymbol$9 = wellKnownSymbol$i;
  1746. var DESCRIPTORS$1 = descriptors;
  1747. var SPECIES$3 = wellKnownSymbol$9('species');
  1748. var setSpecies$1 = function (CONSTRUCTOR_NAME) {
  1749. var Constructor = getBuiltIn$2(CONSTRUCTOR_NAME);
  1750. if (DESCRIPTORS$1 && Constructor && !Constructor[SPECIES$3]) {
  1751. defineBuiltInAccessor(Constructor, SPECIES$3, {
  1752. configurable: true,
  1753. get: function () { return this; }
  1754. });
  1755. }
  1756. };
  1757. var isPrototypeOf$2 = objectIsPrototypeOf;
  1758. var $TypeError$8 = TypeError;
  1759. var anInstance$1 = function (it, Prototype) {
  1760. if (isPrototypeOf$2(Prototype, it)) return it;
  1761. throw new $TypeError$8('Incorrect invocation');
  1762. };
  1763. var isConstructor = isConstructor$2;
  1764. var tryToString$3 = tryToString$5;
  1765. var $TypeError$7 = TypeError;
  1766. // `Assert: IsConstructor(argument) is true`
  1767. var aConstructor$1 = function (argument) {
  1768. if (isConstructor(argument)) return argument;
  1769. throw new $TypeError$7(tryToString$3(argument) + ' is not a constructor');
  1770. };
  1771. var anObject$a = anObject$f;
  1772. var aConstructor = aConstructor$1;
  1773. var isNullOrUndefined$4 = isNullOrUndefined$7;
  1774. var wellKnownSymbol$8 = wellKnownSymbol$i;
  1775. var SPECIES$2 = wellKnownSymbol$8('species');
  1776. // `SpeciesConstructor` abstract operation
  1777. // https://tc39.es/ecma262/#sec-speciesconstructor
  1778. var speciesConstructor$2 = function (O, defaultConstructor) {
  1779. var C = anObject$a(O).constructor;
  1780. var S;
  1781. return C === undefined || isNullOrUndefined$4(S = anObject$a(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
  1782. };
  1783. var NATIVE_BIND = functionBindNative;
  1784. var FunctionPrototype = Function.prototype;
  1785. var apply$2 = FunctionPrototype.apply;
  1786. var call$d = FunctionPrototype.call;
  1787. // eslint-disable-next-line es/no-reflect -- safe
  1788. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$d.bind(apply$2) : function () {
  1789. return call$d.apply(apply$2, arguments);
  1790. });
  1791. var uncurryThis$9 = functionUncurryThis;
  1792. var arraySlice$2 = uncurryThis$9([].slice);
  1793. var $TypeError$6 = TypeError;
  1794. var validateArgumentsLength$1 = function (passed, required) {
  1795. if (passed < required) throw new $TypeError$6('Not enough arguments');
  1796. return passed;
  1797. };
  1798. var userAgent$4 = engineUserAgent;
  1799. // eslint-disable-next-line redos/no-vulnerable -- safe
  1800. var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$4);
  1801. var global$a = global$m;
  1802. var apply$1 = functionApply;
  1803. var bind$3 = functionBindContext;
  1804. var isCallable$5 = isCallable$j;
  1805. var hasOwn$1 = hasOwnProperty_1;
  1806. var fails$9 = fails$s;
  1807. var html = html$2;
  1808. var arraySlice$1 = arraySlice$2;
  1809. var createElement = documentCreateElement$2;
  1810. var validateArgumentsLength = validateArgumentsLength$1;
  1811. var IS_IOS$1 = engineIsIos;
  1812. var IS_NODE$3 = engineIsNode;
  1813. var set = global$a.setImmediate;
  1814. var clear = global$a.clearImmediate;
  1815. var process$2 = global$a.process;
  1816. var Dispatch = global$a.Dispatch;
  1817. var Function$1 = global$a.Function;
  1818. var MessageChannel = global$a.MessageChannel;
  1819. var String$1 = global$a.String;
  1820. var counter = 0;
  1821. var queue$2 = {};
  1822. var ONREADYSTATECHANGE = 'onreadystatechange';
  1823. var $location, defer, channel, port;
  1824. fails$9(function () {
  1825. // Deno throws a ReferenceError on `location` access without `--location` flag
  1826. $location = global$a.location;
  1827. });
  1828. var run = function (id) {
  1829. if (hasOwn$1(queue$2, id)) {
  1830. var fn = queue$2[id];
  1831. delete queue$2[id];
  1832. fn();
  1833. }
  1834. };
  1835. var runner = function (id) {
  1836. return function () {
  1837. run(id);
  1838. };
  1839. };
  1840. var eventListener = function (event) {
  1841. run(event.data);
  1842. };
  1843. var globalPostMessageDefer = function (id) {
  1844. // old engines have not location.origin
  1845. global$a.postMessage(String$1(id), $location.protocol + '//' + $location.host);
  1846. };
  1847. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  1848. if (!set || !clear) {
  1849. set = function setImmediate(handler) {
  1850. validateArgumentsLength(arguments.length, 1);
  1851. var fn = isCallable$5(handler) ? handler : Function$1(handler);
  1852. var args = arraySlice$1(arguments, 1);
  1853. queue$2[++counter] = function () {
  1854. apply$1(fn, undefined, args);
  1855. };
  1856. defer(counter);
  1857. return counter;
  1858. };
  1859. clear = function clearImmediate(id) {
  1860. delete queue$2[id];
  1861. };
  1862. // Node.js 0.8-
  1863. if (IS_NODE$3) {
  1864. defer = function (id) {
  1865. process$2.nextTick(runner(id));
  1866. };
  1867. // Sphere (JS game engine) Dispatch API
  1868. } else if (Dispatch && Dispatch.now) {
  1869. defer = function (id) {
  1870. Dispatch.now(runner(id));
  1871. };
  1872. // Browsers with MessageChannel, includes WebWorkers
  1873. // except iOS - https://github.com/zloirock/core-js/issues/624
  1874. } else if (MessageChannel && !IS_IOS$1) {
  1875. channel = new MessageChannel();
  1876. port = channel.port2;
  1877. channel.port1.onmessage = eventListener;
  1878. defer = bind$3(port.postMessage, port);
  1879. // Browsers with postMessage, skip WebWorkers
  1880. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  1881. } else if (
  1882. global$a.addEventListener &&
  1883. isCallable$5(global$a.postMessage) &&
  1884. !global$a.importScripts &&
  1885. $location && $location.protocol !== 'file:' &&
  1886. !fails$9(globalPostMessageDefer)
  1887. ) {
  1888. defer = globalPostMessageDefer;
  1889. global$a.addEventListener('message', eventListener, false);
  1890. // IE8-
  1891. } else if (ONREADYSTATECHANGE in createElement('script')) {
  1892. defer = function (id) {
  1893. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  1894. html.removeChild(this);
  1895. run(id);
  1896. };
  1897. };
  1898. // Rest old browsers
  1899. } else {
  1900. defer = function (id) {
  1901. setTimeout(runner(id), 0);
  1902. };
  1903. }
  1904. }
  1905. var task$1 = {
  1906. set: set,
  1907. clear: clear
  1908. };
  1909. var global$9 = global$m;
  1910. var DESCRIPTORS = descriptors;
  1911. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1912. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  1913. // Avoid NodeJS experimental warning
  1914. var safeGetBuiltIn$1 = function (name) {
  1915. if (!DESCRIPTORS) return global$9[name];
  1916. var descriptor = getOwnPropertyDescriptor$1(global$9, name);
  1917. return descriptor && descriptor.value;
  1918. };
  1919. var Queue$2 = function () {
  1920. this.head = null;
  1921. this.tail = null;
  1922. };
  1923. Queue$2.prototype = {
  1924. add: function (item) {
  1925. var entry = { item: item, next: null };
  1926. var tail = this.tail;
  1927. if (tail) tail.next = entry;
  1928. else this.head = entry;
  1929. this.tail = entry;
  1930. },
  1931. get: function () {
  1932. var entry = this.head;
  1933. if (entry) {
  1934. var next = this.head = entry.next;
  1935. if (next === null) this.tail = null;
  1936. return entry.item;
  1937. }
  1938. }
  1939. };
  1940. var queue$1 = Queue$2;
  1941. var userAgent$3 = engineUserAgent;
  1942. var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$3) && typeof Pebble != 'undefined';
  1943. var userAgent$2 = engineUserAgent;
  1944. var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent$2);
  1945. var global$8 = global$m;
  1946. var safeGetBuiltIn = safeGetBuiltIn$1;
  1947. var bind$2 = functionBindContext;
  1948. var macrotask = task$1.set;
  1949. var Queue$1 = queue$1;
  1950. var IS_IOS = engineIsIos;
  1951. var IS_IOS_PEBBLE = engineIsIosPebble;
  1952. var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
  1953. var IS_NODE$2 = engineIsNode;
  1954. var MutationObserver = global$8.MutationObserver || global$8.WebKitMutationObserver;
  1955. var document$2 = global$8.document;
  1956. var process$1 = global$8.process;
  1957. var Promise$1 = global$8.Promise;
  1958. var microtask$1 = safeGetBuiltIn('queueMicrotask');
  1959. var notify$1, toggle, node, promise, then;
  1960. // modern engines have queueMicrotask method
  1961. if (!microtask$1) {
  1962. var queue = new Queue$1();
  1963. var flush = function () {
  1964. var parent, fn;
  1965. if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
  1966. while (fn = queue.get()) try {
  1967. fn();
  1968. } catch (error) {
  1969. if (queue.head) notify$1();
  1970. throw error;
  1971. }
  1972. if (parent) parent.enter();
  1973. };
  1974. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  1975. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  1976. if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
  1977. toggle = true;
  1978. node = document$2.createTextNode('');
  1979. new MutationObserver(flush).observe(node, { characterData: true });
  1980. notify$1 = function () {
  1981. node.data = toggle = !toggle;
  1982. };
  1983. // environments with maybe non-completely correct, but existent Promise
  1984. } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
  1985. // Promise.resolve without an argument throws an error in LG WebOS 2
  1986. promise = Promise$1.resolve(undefined);
  1987. // workaround of WebKit ~ iOS Safari 10.1 bug
  1988. promise.constructor = Promise$1;
  1989. then = bind$2(promise.then, promise);
  1990. notify$1 = function () {
  1991. then(flush);
  1992. };
  1993. // Node.js without promises
  1994. } else if (IS_NODE$2) {
  1995. notify$1 = function () {
  1996. process$1.nextTick(flush);
  1997. };
  1998. // for other environments - macrotask based on:
  1999. // - setImmediate
  2000. // - MessageChannel
  2001. // - window.postMessage
  2002. // - onreadystatechange
  2003. // - setTimeout
  2004. } else {
  2005. // `webpack` dev server bug on IE global methods - use bind(fn, global)
  2006. macrotask = bind$2(macrotask, global$8);
  2007. notify$1 = function () {
  2008. macrotask(flush);
  2009. };
  2010. }
  2011. microtask$1 = function (fn) {
  2012. if (!queue.head) notify$1();
  2013. queue.add(fn);
  2014. };
  2015. }
  2016. var microtask_1 = microtask$1;
  2017. var hostReportErrors$1 = function (a, b) {
  2018. try {
  2019. // eslint-disable-next-line no-console -- safe
  2020. arguments.length === 1 ? console.error(a) : console.error(a, b);
  2021. } catch (error) { /* empty */ }
  2022. };
  2023. var perform$3 = function (exec) {
  2024. try {
  2025. return { error: false, value: exec() };
  2026. } catch (error) {
  2027. return { error: true, value: error };
  2028. }
  2029. };
  2030. var global$7 = global$m;
  2031. var promiseNativeConstructor = global$7.Promise;
  2032. /* global Deno -- Deno case */
  2033. var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
  2034. var IS_DENO$1 = engineIsDeno;
  2035. var IS_NODE$1 = engineIsNode;
  2036. var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
  2037. && typeof window == 'object'
  2038. && typeof document == 'object';
  2039. var global$6 = global$m;
  2040. var NativePromiseConstructor$3 = promiseNativeConstructor;
  2041. var isCallable$4 = isCallable$j;
  2042. var isForced = isForced_1;
  2043. var inspectSource = inspectSource$3;
  2044. var wellKnownSymbol$7 = wellKnownSymbol$i;
  2045. var IS_BROWSER = engineIsBrowser;
  2046. var IS_DENO = engineIsDeno;
  2047. var V8_VERSION = engineV8Version;
  2048. NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
  2049. var SPECIES$1 = wellKnownSymbol$7('species');
  2050. var SUBCLASSING = false;
  2051. var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(global$6.PromiseRejectionEvent);
  2052. var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
  2053. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
  2054. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
  2055. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  2056. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  2057. // We can't detect it synchronously, so just check versions
  2058. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  2059. // We can't use @@species feature detection in V8 since it causes
  2060. // deoptimization and performance degradation
  2061. // https://github.com/zloirock/core-js/issues/679
  2062. if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
  2063. // Detect correctness of subclassing with @@species support
  2064. var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
  2065. var FakePromise = function (exec) {
  2066. exec(function () { /* empty */ }, function () { /* empty */ });
  2067. };
  2068. var constructor = promise.constructor = {};
  2069. constructor[SPECIES$1] = FakePromise;
  2070. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  2071. if (!SUBCLASSING) return true;
  2072. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  2073. } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
  2074. });
  2075. var promiseConstructorDetection = {
  2076. CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
  2077. REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
  2078. SUBCLASSING: SUBCLASSING
  2079. };
  2080. var newPromiseCapability$2 = {};
  2081. var aCallable$5 = aCallable$9;
  2082. var $TypeError$5 = TypeError;
  2083. var PromiseCapability = function (C) {
  2084. var resolve, reject;
  2085. this.promise = new C(function ($$resolve, $$reject) {
  2086. if (resolve !== undefined || reject !== undefined) throw new $TypeError$5('Bad Promise constructor');
  2087. resolve = $$resolve;
  2088. reject = $$reject;
  2089. });
  2090. this.resolve = aCallable$5(resolve);
  2091. this.reject = aCallable$5(reject);
  2092. };
  2093. // `NewPromiseCapability` abstract operation
  2094. // https://tc39.es/ecma262/#sec-newpromisecapability
  2095. newPromiseCapability$2.f = function (C) {
  2096. return new PromiseCapability(C);
  2097. };
  2098. var $$b = _export;
  2099. var IS_NODE = engineIsNode;
  2100. var global$5 = global$m;
  2101. var call$c = functionCall;
  2102. var defineBuiltIn$3 = defineBuiltIn$6;
  2103. var setPrototypeOf = objectSetPrototypeOf;
  2104. var setToStringTag = setToStringTag$1;
  2105. var setSpecies = setSpecies$1;
  2106. var aCallable$4 = aCallable$9;
  2107. var isCallable$3 = isCallable$j;
  2108. var isObject$2 = isObject$c;
  2109. var anInstance = anInstance$1;
  2110. var speciesConstructor$1 = speciesConstructor$2;
  2111. var task = task$1.set;
  2112. var microtask = microtask_1;
  2113. var hostReportErrors = hostReportErrors$1;
  2114. var perform$2 = perform$3;
  2115. var Queue = queue$1;
  2116. var InternalStateModule = internalState;
  2117. var NativePromiseConstructor$2 = promiseNativeConstructor;
  2118. var PromiseConstructorDetection = promiseConstructorDetection;
  2119. var newPromiseCapabilityModule$3 = newPromiseCapability$2;
  2120. var PROMISE = 'Promise';
  2121. var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
  2122. var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
  2123. var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
  2124. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  2125. var setInternalState = InternalStateModule.set;
  2126. var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
  2127. var PromiseConstructor = NativePromiseConstructor$2;
  2128. var PromisePrototype = NativePromisePrototype$1;
  2129. var TypeError$1 = global$5.TypeError;
  2130. var document$1 = global$5.document;
  2131. var process = global$5.process;
  2132. var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
  2133. var newGenericPromiseCapability = newPromiseCapability$1;
  2134. var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$5.dispatchEvent);
  2135. var UNHANDLED_REJECTION = 'unhandledrejection';
  2136. var REJECTION_HANDLED = 'rejectionhandled';
  2137. var PENDING = 0;
  2138. var FULFILLED = 1;
  2139. var REJECTED = 2;
  2140. var HANDLED = 1;
  2141. var UNHANDLED = 2;
  2142. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  2143. // helpers
  2144. var isThenable = function (it) {
  2145. var then;
  2146. return isObject$2(it) && isCallable$3(then = it.then) ? then : false;
  2147. };
  2148. var callReaction = function (reaction, state) {
  2149. var value = state.value;
  2150. var ok = state.state === FULFILLED;
  2151. var handler = ok ? reaction.ok : reaction.fail;
  2152. var resolve = reaction.resolve;
  2153. var reject = reaction.reject;
  2154. var domain = reaction.domain;
  2155. var result, then, exited;
  2156. try {
  2157. if (handler) {
  2158. if (!ok) {
  2159. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  2160. state.rejection = HANDLED;
  2161. }
  2162. if (handler === true) result = value;
  2163. else {
  2164. if (domain) domain.enter();
  2165. result = handler(value); // can throw
  2166. if (domain) {
  2167. domain.exit();
  2168. exited = true;
  2169. }
  2170. }
  2171. if (result === reaction.promise) {
  2172. reject(new TypeError$1('Promise-chain cycle'));
  2173. } else if (then = isThenable(result)) {
  2174. call$c(then, result, resolve, reject);
  2175. } else resolve(result);
  2176. } else reject(value);
  2177. } catch (error) {
  2178. if (domain && !exited) domain.exit();
  2179. reject(error);
  2180. }
  2181. };
  2182. var notify = function (state, isReject) {
  2183. if (state.notified) return;
  2184. state.notified = true;
  2185. microtask(function () {
  2186. var reactions = state.reactions;
  2187. var reaction;
  2188. while (reaction = reactions.get()) {
  2189. callReaction(reaction, state);
  2190. }
  2191. state.notified = false;
  2192. if (isReject && !state.rejection) onUnhandled(state);
  2193. });
  2194. };
  2195. var dispatchEvent = function (name, promise, reason) {
  2196. var event, handler;
  2197. if (DISPATCH_EVENT) {
  2198. event = document$1.createEvent('Event');
  2199. event.promise = promise;
  2200. event.reason = reason;
  2201. event.initEvent(name, false, true);
  2202. global$5.dispatchEvent(event);
  2203. } else event = { promise: promise, reason: reason };
  2204. if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$5['on' + name])) handler(event);
  2205. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  2206. };
  2207. var onUnhandled = function (state) {
  2208. call$c(task, global$5, function () {
  2209. var promise = state.facade;
  2210. var value = state.value;
  2211. var IS_UNHANDLED = isUnhandled(state);
  2212. var result;
  2213. if (IS_UNHANDLED) {
  2214. result = perform$2(function () {
  2215. if (IS_NODE) {
  2216. process.emit('unhandledRejection', value, promise);
  2217. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  2218. });
  2219. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  2220. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  2221. if (result.error) throw result.value;
  2222. }
  2223. });
  2224. };
  2225. var isUnhandled = function (state) {
  2226. return state.rejection !== HANDLED && !state.parent;
  2227. };
  2228. var onHandleUnhandled = function (state) {
  2229. call$c(task, global$5, function () {
  2230. var promise = state.facade;
  2231. if (IS_NODE) {
  2232. process.emit('rejectionHandled', promise);
  2233. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  2234. });
  2235. };
  2236. var bind$1 = function (fn, state, unwrap) {
  2237. return function (value) {
  2238. fn(state, value, unwrap);
  2239. };
  2240. };
  2241. var internalReject = function (state, value, unwrap) {
  2242. if (state.done) return;
  2243. state.done = true;
  2244. if (unwrap) state = unwrap;
  2245. state.value = value;
  2246. state.state = REJECTED;
  2247. notify(state, true);
  2248. };
  2249. var internalResolve = function (state, value, unwrap) {
  2250. if (state.done) return;
  2251. state.done = true;
  2252. if (unwrap) state = unwrap;
  2253. try {
  2254. if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
  2255. var then = isThenable(value);
  2256. if (then) {
  2257. microtask(function () {
  2258. var wrapper = { done: false };
  2259. try {
  2260. call$c(then, value,
  2261. bind$1(internalResolve, wrapper, state),
  2262. bind$1(internalReject, wrapper, state)
  2263. );
  2264. } catch (error) {
  2265. internalReject(wrapper, error, state);
  2266. }
  2267. });
  2268. } else {
  2269. state.value = value;
  2270. state.state = FULFILLED;
  2271. notify(state, false);
  2272. }
  2273. } catch (error) {
  2274. internalReject({ done: false }, error, state);
  2275. }
  2276. };
  2277. // constructor polyfill
  2278. if (FORCED_PROMISE_CONSTRUCTOR$4) {
  2279. // 25.4.3.1 Promise(executor)
  2280. PromiseConstructor = function Promise(executor) {
  2281. anInstance(this, PromisePrototype);
  2282. aCallable$4(executor);
  2283. call$c(Internal, this);
  2284. var state = getInternalPromiseState(this);
  2285. try {
  2286. executor(bind$1(internalResolve, state), bind$1(internalReject, state));
  2287. } catch (error) {
  2288. internalReject(state, error);
  2289. }
  2290. };
  2291. PromisePrototype = PromiseConstructor.prototype;
  2292. // eslint-disable-next-line no-unused-vars -- required for `.length`
  2293. Internal = function Promise(executor) {
  2294. setInternalState(this, {
  2295. type: PROMISE,
  2296. done: false,
  2297. notified: false,
  2298. parent: false,
  2299. reactions: new Queue(),
  2300. rejection: false,
  2301. state: PENDING,
  2302. value: undefined
  2303. });
  2304. };
  2305. // `Promise.prototype.then` method
  2306. // https://tc39.es/ecma262/#sec-promise.prototype.then
  2307. Internal.prototype = defineBuiltIn$3(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
  2308. var state = getInternalPromiseState(this);
  2309. var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
  2310. state.parent = true;
  2311. reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
  2312. reaction.fail = isCallable$3(onRejected) && onRejected;
  2313. reaction.domain = IS_NODE ? process.domain : undefined;
  2314. if (state.state === PENDING) state.reactions.add(reaction);
  2315. else microtask(function () {
  2316. callReaction(reaction, state);
  2317. });
  2318. return reaction.promise;
  2319. });
  2320. OwnPromiseCapability = function () {
  2321. var promise = new Internal();
  2322. var state = getInternalPromiseState(promise);
  2323. this.promise = promise;
  2324. this.resolve = bind$1(internalResolve, state);
  2325. this.reject = bind$1(internalReject, state);
  2326. };
  2327. newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
  2328. return C === PromiseConstructor || C === PromiseWrapper
  2329. ? new OwnPromiseCapability(C)
  2330. : newGenericPromiseCapability(C);
  2331. };
  2332. if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
  2333. nativeThen = NativePromisePrototype$1.then;
  2334. if (!NATIVE_PROMISE_SUBCLASSING) {
  2335. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  2336. defineBuiltIn$3(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
  2337. var that = this;
  2338. return new PromiseConstructor(function (resolve, reject) {
  2339. call$c(nativeThen, that, resolve, reject);
  2340. }).then(onFulfilled, onRejected);
  2341. // https://github.com/zloirock/core-js/issues/640
  2342. }, { unsafe: true });
  2343. }
  2344. // make `.constructor === Promise` work for native promise-based APIs
  2345. try {
  2346. delete NativePromisePrototype$1.constructor;
  2347. } catch (error) { /* empty */ }
  2348. // make `instanceof Promise` work for native promise-based APIs
  2349. if (setPrototypeOf) {
  2350. setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
  2351. }
  2352. }
  2353. }
  2354. $$b({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
  2355. Promise: PromiseConstructor
  2356. });
  2357. setToStringTag(PromiseConstructor, PROMISE, false);
  2358. setSpecies(PROMISE);
  2359. var iterators = {};
  2360. var wellKnownSymbol$6 = wellKnownSymbol$i;
  2361. var Iterators$1 = iterators;
  2362. var ITERATOR$2 = wellKnownSymbol$6('iterator');
  2363. var ArrayPrototype = Array.prototype;
  2364. // check on default Array iterator
  2365. var isArrayIteratorMethod$1 = function (it) {
  2366. return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
  2367. };
  2368. var classof$2 = classof$7;
  2369. var getMethod$4 = getMethod$6;
  2370. var isNullOrUndefined$3 = isNullOrUndefined$7;
  2371. var Iterators = iterators;
  2372. var wellKnownSymbol$5 = wellKnownSymbol$i;
  2373. var ITERATOR$1 = wellKnownSymbol$5('iterator');
  2374. var getIteratorMethod$2 = function (it) {
  2375. if (!isNullOrUndefined$3(it)) return getMethod$4(it, ITERATOR$1)
  2376. || getMethod$4(it, '@@iterator')
  2377. || Iterators[classof$2(it)];
  2378. };
  2379. var call$b = functionCall;
  2380. var aCallable$3 = aCallable$9;
  2381. var anObject$9 = anObject$f;
  2382. var tryToString$2 = tryToString$5;
  2383. var getIteratorMethod$1 = getIteratorMethod$2;
  2384. var $TypeError$4 = TypeError;
  2385. var getIterator$1 = function (argument, usingIterator) {
  2386. var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
  2387. if (aCallable$3(iteratorMethod)) return anObject$9(call$b(iteratorMethod, argument));
  2388. throw new $TypeError$4(tryToString$2(argument) + ' is not iterable');
  2389. };
  2390. var call$a = functionCall;
  2391. var anObject$8 = anObject$f;
  2392. var getMethod$3 = getMethod$6;
  2393. var iteratorClose$1 = function (iterator, kind, value) {
  2394. var innerResult, innerError;
  2395. anObject$8(iterator);
  2396. try {
  2397. innerResult = getMethod$3(iterator, 'return');
  2398. if (!innerResult) {
  2399. if (kind === 'throw') throw value;
  2400. return value;
  2401. }
  2402. innerResult = call$a(innerResult, iterator);
  2403. } catch (error) {
  2404. innerError = true;
  2405. innerResult = error;
  2406. }
  2407. if (kind === 'throw') throw value;
  2408. if (innerError) throw innerResult;
  2409. anObject$8(innerResult);
  2410. return value;
  2411. };
  2412. var bind = functionBindContext;
  2413. var call$9 = functionCall;
  2414. var anObject$7 = anObject$f;
  2415. var tryToString$1 = tryToString$5;
  2416. var isArrayIteratorMethod = isArrayIteratorMethod$1;
  2417. var lengthOfArrayLike$1 = lengthOfArrayLike$5;
  2418. var isPrototypeOf$1 = objectIsPrototypeOf;
  2419. var getIterator = getIterator$1;
  2420. var getIteratorMethod = getIteratorMethod$2;
  2421. var iteratorClose = iteratorClose$1;
  2422. var $TypeError$3 = TypeError;
  2423. var Result = function (stopped, result) {
  2424. this.stopped = stopped;
  2425. this.result = result;
  2426. };
  2427. var ResultPrototype = Result.prototype;
  2428. var iterate$2 = function (iterable, unboundFunction, options) {
  2429. var that = options && options.that;
  2430. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  2431. var IS_RECORD = !!(options && options.IS_RECORD);
  2432. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  2433. var INTERRUPTED = !!(options && options.INTERRUPTED);
  2434. var fn = bind(unboundFunction, that);
  2435. var iterator, iterFn, index, length, result, next, step;
  2436. var stop = function (condition) {
  2437. if (iterator) iteratorClose(iterator, 'normal', condition);
  2438. return new Result(true, condition);
  2439. };
  2440. var callFn = function (value) {
  2441. if (AS_ENTRIES) {
  2442. anObject$7(value);
  2443. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  2444. } return INTERRUPTED ? fn(value, stop) : fn(value);
  2445. };
  2446. if (IS_RECORD) {
  2447. iterator = iterable.iterator;
  2448. } else if (IS_ITERATOR) {
  2449. iterator = iterable;
  2450. } else {
  2451. iterFn = getIteratorMethod(iterable);
  2452. if (!iterFn) throw new $TypeError$3(tryToString$1(iterable) + ' is not iterable');
  2453. // optimisation for array iterators
  2454. if (isArrayIteratorMethod(iterFn)) {
  2455. for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
  2456. result = callFn(iterable[index]);
  2457. if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
  2458. } return new Result(false);
  2459. }
  2460. iterator = getIterator(iterable, iterFn);
  2461. }
  2462. next = IS_RECORD ? iterable.next : iterator.next;
  2463. while (!(step = call$9(next, iterator)).done) {
  2464. try {
  2465. result = callFn(step.value);
  2466. } catch (error) {
  2467. iteratorClose(iterator, 'throw', error);
  2468. }
  2469. if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
  2470. } return new Result(false);
  2471. };
  2472. var wellKnownSymbol$4 = wellKnownSymbol$i;
  2473. var ITERATOR = wellKnownSymbol$4('iterator');
  2474. var SAFE_CLOSING = false;
  2475. try {
  2476. var called = 0;
  2477. var iteratorWithReturn = {
  2478. next: function () {
  2479. return { done: !!called++ };
  2480. },
  2481. 'return': function () {
  2482. SAFE_CLOSING = true;
  2483. }
  2484. };
  2485. iteratorWithReturn[ITERATOR] = function () {
  2486. return this;
  2487. };
  2488. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  2489. Array.from(iteratorWithReturn, function () { throw 2; });
  2490. } catch (error) { /* empty */ }
  2491. var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
  2492. try {
  2493. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  2494. } catch (error) { return false; } // workaround of old WebKit + `eval` bug
  2495. var ITERATION_SUPPORT = false;
  2496. try {
  2497. var object = {};
  2498. object[ITERATOR] = function () {
  2499. return {
  2500. next: function () {
  2501. return { done: ITERATION_SUPPORT = true };
  2502. }
  2503. };
  2504. };
  2505. exec(object);
  2506. } catch (error) { /* empty */ }
  2507. return ITERATION_SUPPORT;
  2508. };
  2509. var NativePromiseConstructor$1 = promiseNativeConstructor;
  2510. var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
  2511. var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
  2512. var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
  2513. NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
  2514. });
  2515. var $$a = _export;
  2516. var call$8 = functionCall;
  2517. var aCallable$2 = aCallable$9;
  2518. var newPromiseCapabilityModule$2 = newPromiseCapability$2;
  2519. var perform$1 = perform$3;
  2520. var iterate$1 = iterate$2;
  2521. var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
  2522. // `Promise.all` method
  2523. // https://tc39.es/ecma262/#sec-promise.all
  2524. $$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
  2525. all: function all(iterable) {
  2526. var C = this;
  2527. var capability = newPromiseCapabilityModule$2.f(C);
  2528. var resolve = capability.resolve;
  2529. var reject = capability.reject;
  2530. var result = perform$1(function () {
  2531. var $promiseResolve = aCallable$2(C.resolve);
  2532. var values = [];
  2533. var counter = 0;
  2534. var remaining = 1;
  2535. iterate$1(iterable, function (promise) {
  2536. var index = counter++;
  2537. var alreadyCalled = false;
  2538. remaining++;
  2539. call$8($promiseResolve, C, promise).then(function (value) {
  2540. if (alreadyCalled) return;
  2541. alreadyCalled = true;
  2542. values[index] = value;
  2543. --remaining || resolve(values);
  2544. }, reject);
  2545. });
  2546. --remaining || resolve(values);
  2547. });
  2548. if (result.error) reject(result.value);
  2549. return capability.promise;
  2550. }
  2551. });
  2552. var $$9 = _export;
  2553. var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
  2554. var NativePromiseConstructor = promiseNativeConstructor;
  2555. var getBuiltIn$1 = getBuiltIn$7;
  2556. var isCallable$2 = isCallable$j;
  2557. var defineBuiltIn$2 = defineBuiltIn$6;
  2558. var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
  2559. // `Promise.prototype.catch` method
  2560. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  2561. $$9({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
  2562. 'catch': function (onRejected) {
  2563. return this.then(undefined, onRejected);
  2564. }
  2565. });
  2566. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  2567. if (isCallable$2(NativePromiseConstructor)) {
  2568. var method = getBuiltIn$1('Promise').prototype['catch'];
  2569. if (NativePromisePrototype['catch'] !== method) {
  2570. defineBuiltIn$2(NativePromisePrototype, 'catch', method, { unsafe: true });
  2571. }
  2572. }
  2573. var $$8 = _export;
  2574. var call$7 = functionCall;
  2575. var aCallable$1 = aCallable$9;
  2576. var newPromiseCapabilityModule$1 = newPromiseCapability$2;
  2577. var perform = perform$3;
  2578. var iterate = iterate$2;
  2579. var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
  2580. // `Promise.race` method
  2581. // https://tc39.es/ecma262/#sec-promise.race
  2582. $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
  2583. race: function race(iterable) {
  2584. var C = this;
  2585. var capability = newPromiseCapabilityModule$1.f(C);
  2586. var reject = capability.reject;
  2587. var result = perform(function () {
  2588. var $promiseResolve = aCallable$1(C.resolve);
  2589. iterate(iterable, function (promise) {
  2590. call$7($promiseResolve, C, promise).then(capability.resolve, reject);
  2591. });
  2592. });
  2593. if (result.error) reject(result.value);
  2594. return capability.promise;
  2595. }
  2596. });
  2597. var $$7 = _export;
  2598. var newPromiseCapabilityModule = newPromiseCapability$2;
  2599. var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
  2600. // `Promise.reject` method
  2601. // https://tc39.es/ecma262/#sec-promise.reject
  2602. $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
  2603. reject: function reject(r) {
  2604. var capability = newPromiseCapabilityModule.f(this);
  2605. var capabilityReject = capability.reject;
  2606. capabilityReject(r);
  2607. return capability.promise;
  2608. }
  2609. });
  2610. var anObject$6 = anObject$f;
  2611. var isObject$1 = isObject$c;
  2612. var newPromiseCapability = newPromiseCapability$2;
  2613. var promiseResolve$1 = function (C, x) {
  2614. anObject$6(C);
  2615. if (isObject$1(x) && x.constructor === C) return x;
  2616. var promiseCapability = newPromiseCapability.f(C);
  2617. var resolve = promiseCapability.resolve;
  2618. resolve(x);
  2619. return promiseCapability.promise;
  2620. };
  2621. var $$6 = _export;
  2622. var getBuiltIn = getBuiltIn$7;
  2623. var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
  2624. var promiseResolve = promiseResolve$1;
  2625. getBuiltIn('Promise');
  2626. // `Promise.resolve` method
  2627. // https://tc39.es/ecma262/#sec-promise.resolve
  2628. $$6({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  2629. resolve: function resolve(x) {
  2630. return promiseResolve(this, x);
  2631. }
  2632. });
  2633. var anObject$5 = anObject$f;
  2634. // `RegExp.prototype.flags` getter implementation
  2635. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2636. var regexpFlags$1 = function () {
  2637. var that = anObject$5(this);
  2638. var result = '';
  2639. if (that.hasIndices) result += 'd';
  2640. if (that.global) result += 'g';
  2641. if (that.ignoreCase) result += 'i';
  2642. if (that.multiline) result += 'm';
  2643. if (that.dotAll) result += 's';
  2644. if (that.unicode) result += 'u';
  2645. if (that.unicodeSets) result += 'v';
  2646. if (that.sticky) result += 'y';
  2647. return result;
  2648. };
  2649. var fails$8 = fails$s;
  2650. var global$4 = global$m;
  2651. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  2652. var $RegExp$2 = global$4.RegExp;
  2653. var UNSUPPORTED_Y$2 = fails$8(function () {
  2654. var re = $RegExp$2('a', 'y');
  2655. re.lastIndex = 2;
  2656. return re.exec('abcd') !== null;
  2657. });
  2658. // UC Browser bug
  2659. // https://github.com/zloirock/core-js/issues/1008
  2660. var MISSED_STICKY = UNSUPPORTED_Y$2 || fails$8(function () {
  2661. return !$RegExp$2('a', 'y').sticky;
  2662. });
  2663. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$8(function () {
  2664. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  2665. var re = $RegExp$2('^r', 'gy');
  2666. re.lastIndex = 2;
  2667. return re.exec('str') !== null;
  2668. });
  2669. var regexpStickyHelpers = {
  2670. BROKEN_CARET: BROKEN_CARET,
  2671. MISSED_STICKY: MISSED_STICKY,
  2672. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  2673. };
  2674. var fails$7 = fails$s;
  2675. var global$3 = global$m;
  2676. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  2677. var $RegExp$1 = global$3.RegExp;
  2678. var regexpUnsupportedDotAll = fails$7(function () {
  2679. var re = $RegExp$1('.', 's');
  2680. return !(re.dotAll && re.test('\n') && re.flags === 's');
  2681. });
  2682. var fails$6 = fails$s;
  2683. var global$2 = global$m;
  2684. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  2685. var $RegExp = global$2.RegExp;
  2686. var regexpUnsupportedNcg = fails$6(function () {
  2687. var re = $RegExp('(?<a>b)', 'g');
  2688. return re.exec('b').groups.a !== 'b' ||
  2689. 'b'.replace(re, '$<a>c') !== 'bc';
  2690. });
  2691. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  2692. /* eslint-disable regexp/no-useless-quantifier -- testing */
  2693. var call$6 = functionCall;
  2694. var uncurryThis$8 = functionUncurryThis;
  2695. var toString$7 = toString$a;
  2696. var regexpFlags = regexpFlags$1;
  2697. var stickyHelpers$1 = regexpStickyHelpers;
  2698. var shared = shared$4;
  2699. var create = objectCreate;
  2700. var getInternalState = internalState.get;
  2701. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  2702. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  2703. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  2704. var nativeExec = RegExp.prototype.exec;
  2705. var patchedExec = nativeExec;
  2706. var charAt$3 = uncurryThis$8(''.charAt);
  2707. var indexOf = uncurryThis$8(''.indexOf);
  2708. var replace$1 = uncurryThis$8(''.replace);
  2709. var stringSlice$5 = uncurryThis$8(''.slice);
  2710. var UPDATES_LAST_INDEX_WRONG = (function () {
  2711. var re1 = /a/;
  2712. var re2 = /b*/g;
  2713. call$6(nativeExec, re1, 'a');
  2714. call$6(nativeExec, re2, 'a');
  2715. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  2716. })();
  2717. var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
  2718. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  2719. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  2720. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  2721. if (PATCH) {
  2722. patchedExec = function exec(string) {
  2723. var re = this;
  2724. var state = getInternalState(re);
  2725. var str = toString$7(string);
  2726. var raw = state.raw;
  2727. var result, reCopy, lastIndex, match, i, object, group;
  2728. if (raw) {
  2729. raw.lastIndex = re.lastIndex;
  2730. result = call$6(patchedExec, raw, str);
  2731. re.lastIndex = raw.lastIndex;
  2732. return result;
  2733. }
  2734. var groups = state.groups;
  2735. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  2736. var flags = call$6(regexpFlags, re);
  2737. var source = re.source;
  2738. var charsAdded = 0;
  2739. var strCopy = str;
  2740. if (sticky) {
  2741. flags = replace$1(flags, 'y', '');
  2742. if (indexOf(flags, 'g') === -1) {
  2743. flags += 'g';
  2744. }
  2745. strCopy = stringSlice$5(str, re.lastIndex);
  2746. // Support anchored sticky behavior.
  2747. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  2748. source = '(?: ' + source + ')';
  2749. strCopy = ' ' + strCopy;
  2750. charsAdded++;
  2751. }
  2752. // ^(? + rx + ) is needed, in combination with some str slicing, to
  2753. // simulate the 'y' flag.
  2754. reCopy = new RegExp('^(?:' + source + ')', flags);
  2755. }
  2756. if (NPCG_INCLUDED) {
  2757. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  2758. }
  2759. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  2760. match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
  2761. if (sticky) {
  2762. if (match) {
  2763. match.input = stringSlice$5(match.input, charsAdded);
  2764. match[0] = stringSlice$5(match[0], charsAdded);
  2765. match.index = re.lastIndex;
  2766. re.lastIndex += match[0].length;
  2767. } else re.lastIndex = 0;
  2768. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  2769. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  2770. }
  2771. if (NPCG_INCLUDED && match && match.length > 1) {
  2772. // Fix browsers whose `exec` methods don't consistently return `undefined`
  2773. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  2774. call$6(nativeReplace, match[0], reCopy, function () {
  2775. for (i = 1; i < arguments.length - 2; i++) {
  2776. if (arguments[i] === undefined) match[i] = undefined;
  2777. }
  2778. });
  2779. }
  2780. if (match && groups) {
  2781. match.groups = object = create(null);
  2782. for (i = 0; i < groups.length; i++) {
  2783. group = groups[i];
  2784. object[group[0]] = match[group[1]];
  2785. }
  2786. }
  2787. return match;
  2788. };
  2789. }
  2790. var regexpExec$2 = patchedExec;
  2791. var $$5 = _export;
  2792. var exec = regexpExec$2;
  2793. // `RegExp.prototype.exec` method
  2794. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  2795. $$5({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  2796. exec: exec
  2797. });
  2798. var call$5 = functionCall;
  2799. var hasOwn = hasOwnProperty_1;
  2800. var isPrototypeOf = objectIsPrototypeOf;
  2801. var regExpFlags = regexpFlags$1;
  2802. var RegExpPrototype$2 = RegExp.prototype;
  2803. var regexpGetFlags = function (R) {
  2804. var flags = R.flags;
  2805. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
  2806. ? call$5(regExpFlags, R) : flags;
  2807. };
  2808. var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
  2809. var defineBuiltIn$1 = defineBuiltIn$6;
  2810. var anObject$4 = anObject$f;
  2811. var $toString = toString$a;
  2812. var fails$5 = fails$s;
  2813. var getRegExpFlags = regexpGetFlags;
  2814. var TO_STRING = 'toString';
  2815. var RegExpPrototype$1 = RegExp.prototype;
  2816. var nativeToString = RegExpPrototype$1[TO_STRING];
  2817. var NOT_GENERIC = fails$5(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  2818. // FF44- RegExp#toString has a wrong name
  2819. var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name !== TO_STRING;
  2820. // `RegExp.prototype.toString` method
  2821. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2822. if (NOT_GENERIC || INCORRECT_NAME) {
  2823. defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
  2824. var R = anObject$4(this);
  2825. var pattern = $toString(R.source);
  2826. var flags = $toString(getRegExpFlags(R));
  2827. return '/' + pattern + '/' + flags;
  2828. }, { unsafe: true });
  2829. }
  2830. var isObject = isObject$c;
  2831. var classof$1 = classofRaw$2;
  2832. var wellKnownSymbol$3 = wellKnownSymbol$i;
  2833. var MATCH$1 = wellKnownSymbol$3('match');
  2834. // `IsRegExp` abstract operation
  2835. // https://tc39.es/ecma262/#sec-isregexp
  2836. var isRegexp = function (it) {
  2837. var isRegExp;
  2838. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
  2839. };
  2840. var isRegExp = isRegexp;
  2841. var $TypeError$2 = TypeError;
  2842. var notARegexp = function (it) {
  2843. if (isRegExp(it)) {
  2844. throw new $TypeError$2("The method doesn't accept regular expressions");
  2845. } return it;
  2846. };
  2847. var wellKnownSymbol$2 = wellKnownSymbol$i;
  2848. var MATCH = wellKnownSymbol$2('match');
  2849. var correctIsRegexpLogic = function (METHOD_NAME) {
  2850. var regexp = /./;
  2851. try {
  2852. '/./'[METHOD_NAME](regexp);
  2853. } catch (error1) {
  2854. try {
  2855. regexp[MATCH] = false;
  2856. return '/./'[METHOD_NAME](regexp);
  2857. } catch (error2) { /* empty */ }
  2858. } return false;
  2859. };
  2860. var $$4 = _export;
  2861. var uncurryThis$7 = functionUncurryThis;
  2862. var notARegExp$1 = notARegexp;
  2863. var requireObjectCoercible$5 = requireObjectCoercible$a;
  2864. var toString$6 = toString$a;
  2865. var correctIsRegExpLogic$1 = correctIsRegexpLogic;
  2866. var stringIndexOf$1 = uncurryThis$7(''.indexOf);
  2867. // `String.prototype.includes` method
  2868. // https://tc39.es/ecma262/#sec-string.prototype.includes
  2869. $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
  2870. includes: function includes(searchString /* , position = 0 */) {
  2871. return !!~stringIndexOf$1(
  2872. toString$6(requireObjectCoercible$5(this)),
  2873. toString$6(notARegExp$1(searchString)),
  2874. arguments.length > 1 ? arguments[1] : undefined
  2875. );
  2876. }
  2877. });
  2878. // TODO: Remove from `core-js@4` since it's moved to entry points
  2879. var call$4 = functionCall;
  2880. var defineBuiltIn = defineBuiltIn$6;
  2881. var regexpExec$1 = regexpExec$2;
  2882. var fails$4 = fails$s;
  2883. var wellKnownSymbol$1 = wellKnownSymbol$i;
  2884. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  2885. var SPECIES = wellKnownSymbol$1('species');
  2886. var RegExpPrototype = RegExp.prototype;
  2887. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  2888. var SYMBOL = wellKnownSymbol$1(KEY);
  2889. var DELEGATES_TO_SYMBOL = !fails$4(function () {
  2890. // String methods call symbol-named RegExp methods
  2891. var O = {};
  2892. O[SYMBOL] = function () { return 7; };
  2893. return ''[KEY](O) !== 7;
  2894. });
  2895. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () {
  2896. // Symbol-named RegExp methods call .exec
  2897. var execCalled = false;
  2898. var re = /a/;
  2899. if (KEY === 'split') {
  2900. // We can't use real regex here since it causes deoptimization
  2901. // and serious performance degradation in V8
  2902. // https://github.com/zloirock/core-js/issues/306
  2903. re = {};
  2904. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  2905. // a new one. We need to return the patched regex when creating the new one.
  2906. re.constructor = {};
  2907. re.constructor[SPECIES] = function () { return re; };
  2908. re.flags = '';
  2909. re[SYMBOL] = /./[SYMBOL];
  2910. }
  2911. re.exec = function () {
  2912. execCalled = true;
  2913. return null;
  2914. };
  2915. re[SYMBOL]('');
  2916. return !execCalled;
  2917. });
  2918. if (
  2919. !DELEGATES_TO_SYMBOL ||
  2920. !DELEGATES_TO_EXEC ||
  2921. FORCED
  2922. ) {
  2923. var nativeRegExpMethod = /./[SYMBOL];
  2924. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  2925. var $exec = regexp.exec;
  2926. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  2927. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  2928. // The native String method already delegates to @@method (this
  2929. // polyfilled function), leasing to infinite recursion.
  2930. // We avoid it by directly calling the native @@method method.
  2931. return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) };
  2932. }
  2933. return { done: true, value: call$4(nativeMethod, str, regexp, arg2) };
  2934. }
  2935. return { done: false };
  2936. });
  2937. defineBuiltIn(String.prototype, KEY, methods[0]);
  2938. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  2939. }
  2940. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
  2941. };
  2942. var uncurryThis$6 = functionUncurryThis;
  2943. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  2944. var toString$5 = toString$a;
  2945. var requireObjectCoercible$4 = requireObjectCoercible$a;
  2946. var charAt$2 = uncurryThis$6(''.charAt);
  2947. var charCodeAt = uncurryThis$6(''.charCodeAt);
  2948. var stringSlice$4 = uncurryThis$6(''.slice);
  2949. var createMethod = function (CONVERT_TO_STRING) {
  2950. return function ($this, pos) {
  2951. var S = toString$5(requireObjectCoercible$4($this));
  2952. var position = toIntegerOrInfinity$1(pos);
  2953. var size = S.length;
  2954. var first, second;
  2955. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2956. first = charCodeAt(S, position);
  2957. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2958. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  2959. ? CONVERT_TO_STRING
  2960. ? charAt$2(S, position)
  2961. : first
  2962. : CONVERT_TO_STRING
  2963. ? stringSlice$4(S, position, position + 2)
  2964. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2965. };
  2966. };
  2967. var stringMultibyte = {
  2968. // `String.prototype.codePointAt` method
  2969. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2970. codeAt: createMethod(false),
  2971. // `String.prototype.at` method
  2972. // https://github.com/mathiasbynens/String.prototype.at
  2973. charAt: createMethod(true)
  2974. };
  2975. var charAt$1 = stringMultibyte.charAt;
  2976. // `AdvanceStringIndex` abstract operation
  2977. // https://tc39.es/ecma262/#sec-advancestringindex
  2978. var advanceStringIndex$3 = function (S, index, unicode) {
  2979. return index + (unicode ? charAt$1(S, index).length : 1);
  2980. };
  2981. var call$3 = functionCall;
  2982. var anObject$3 = anObject$f;
  2983. var isCallable$1 = isCallable$j;
  2984. var classof = classofRaw$2;
  2985. var regexpExec = regexpExec$2;
  2986. var $TypeError$1 = TypeError;
  2987. // `RegExpExec` abstract operation
  2988. // https://tc39.es/ecma262/#sec-regexpexec
  2989. var regexpExecAbstract = function (R, S) {
  2990. var exec = R.exec;
  2991. if (isCallable$1(exec)) {
  2992. var result = call$3(exec, R, S);
  2993. if (result !== null) anObject$3(result);
  2994. return result;
  2995. }
  2996. if (classof(R) === 'RegExp') return call$3(regexpExec, R, S);
  2997. throw new $TypeError$1('RegExp#exec called on incompatible receiver');
  2998. };
  2999. var call$2 = functionCall;
  3000. var uncurryThis$5 = functionUncurryThis;
  3001. var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
  3002. var anObject$2 = anObject$f;
  3003. var isNullOrUndefined$2 = isNullOrUndefined$7;
  3004. var requireObjectCoercible$3 = requireObjectCoercible$a;
  3005. var speciesConstructor = speciesConstructor$2;
  3006. var advanceStringIndex$2 = advanceStringIndex$3;
  3007. var toLength$3 = toLength$5;
  3008. var toString$4 = toString$a;
  3009. var getMethod$2 = getMethod$6;
  3010. var regExpExec$2 = regexpExecAbstract;
  3011. var stickyHelpers = regexpStickyHelpers;
  3012. var fails$3 = fails$s;
  3013. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  3014. var MAX_UINT32 = 0xFFFFFFFF;
  3015. var min$2 = Math.min;
  3016. var push$2 = uncurryThis$5([].push);
  3017. var stringSlice$3 = uncurryThis$5(''.slice);
  3018. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  3019. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  3020. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$3(function () {
  3021. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3022. var re = /(?:)/;
  3023. var originalExec = re.exec;
  3024. re.exec = function () { return originalExec.apply(this, arguments); };
  3025. var result = 'ab'.split(re);
  3026. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  3027. });
  3028. var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
  3029. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  3030. 'test'.split(/(?:)/, -1).length !== 4 ||
  3031. 'ab'.split(/(?:ab)*/).length !== 2 ||
  3032. '.'.split(/(.?)(.?)/).length !== 4 ||
  3033. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  3034. '.'.split(/()()/).length > 1 ||
  3035. ''.split(/.?/).length;
  3036. // @@split logic
  3037. fixRegExpWellKnownSymbolLogic$2('split', function (SPLIT, nativeSplit, maybeCallNative) {
  3038. var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
  3039. return separator === undefined && limit === 0 ? [] : call$2(nativeSplit, this, separator, limit);
  3040. } : nativeSplit;
  3041. return [
  3042. // `String.prototype.split` method
  3043. // https://tc39.es/ecma262/#sec-string.prototype.split
  3044. function split(separator, limit) {
  3045. var O = requireObjectCoercible$3(this);
  3046. var splitter = isNullOrUndefined$2(separator) ? undefined : getMethod$2(separator, SPLIT);
  3047. return splitter
  3048. ? call$2(splitter, separator, O, limit)
  3049. : call$2(internalSplit, toString$4(O), separator, limit);
  3050. },
  3051. // `RegExp.prototype[@@split]` method
  3052. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  3053. //
  3054. // NOTE: This cannot be properly polyfilled in engines that don't support
  3055. // the 'y' flag.
  3056. function (string, limit) {
  3057. var rx = anObject$2(this);
  3058. var S = toString$4(string);
  3059. if (!BUGGY) {
  3060. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  3061. if (res.done) return res.value;
  3062. }
  3063. var C = speciesConstructor(rx, RegExp);
  3064. var unicodeMatching = rx.unicode;
  3065. var flags = (rx.ignoreCase ? 'i' : '') +
  3066. (rx.multiline ? 'm' : '') +
  3067. (rx.unicode ? 'u' : '') +
  3068. (UNSUPPORTED_Y ? 'g' : 'y');
  3069. // ^(? + rx + ) is needed, in combination with some S slicing, to
  3070. // simulate the 'y' flag.
  3071. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  3072. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  3073. if (lim === 0) return [];
  3074. if (S.length === 0) return regExpExec$2(splitter, S) === null ? [S] : [];
  3075. var p = 0;
  3076. var q = 0;
  3077. var A = [];
  3078. while (q < S.length) {
  3079. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  3080. var z = regExpExec$2(splitter, UNSUPPORTED_Y ? stringSlice$3(S, q) : S);
  3081. var e;
  3082. if (
  3083. z === null ||
  3084. (e = min$2(toLength$3(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  3085. ) {
  3086. q = advanceStringIndex$2(S, q, unicodeMatching);
  3087. } else {
  3088. push$2(A, stringSlice$3(S, p, q));
  3089. if (A.length === lim) return A;
  3090. for (var i = 1; i <= z.length - 1; i++) {
  3091. push$2(A, z[i]);
  3092. if (A.length === lim) return A;
  3093. }
  3094. q = p = e;
  3095. }
  3096. }
  3097. push$2(A, stringSlice$3(S, p));
  3098. return A;
  3099. }
  3100. ];
  3101. }, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  3102. var PROPER_FUNCTION_NAME = functionName.PROPER;
  3103. var fails$2 = fails$s;
  3104. var whitespaces = whitespaces$3;
  3105. var non = '\u200B\u0085\u180E';
  3106. // check that a method works with the correct list
  3107. // of whitespaces and has a correct name
  3108. var stringTrimForced = function (METHOD_NAME) {
  3109. return fails$2(function () {
  3110. return !!whitespaces[METHOD_NAME]()
  3111. || non[METHOD_NAME]() !== non
  3112. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  3113. });
  3114. };
  3115. var $$3 = _export;
  3116. var $trim = stringTrim.trim;
  3117. var forcedStringTrimMethod = stringTrimForced;
  3118. // `String.prototype.trim` method
  3119. // https://tc39.es/ecma262/#sec-string.prototype.trim
  3120. $$3({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  3121. trim: function trim() {
  3122. return $trim(this);
  3123. }
  3124. });
  3125. // iterable DOM collections
  3126. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  3127. var domIterables = {
  3128. CSSRuleList: 0,
  3129. CSSStyleDeclaration: 0,
  3130. CSSValueList: 0,
  3131. ClientRectList: 0,
  3132. DOMRectList: 0,
  3133. DOMStringList: 0,
  3134. DOMTokenList: 1,
  3135. DataTransferItemList: 0,
  3136. FileList: 0,
  3137. HTMLAllCollection: 0,
  3138. HTMLCollection: 0,
  3139. HTMLFormElement: 0,
  3140. HTMLSelectElement: 0,
  3141. MediaList: 0,
  3142. MimeTypeArray: 0,
  3143. NamedNodeMap: 0,
  3144. NodeList: 1,
  3145. PaintRequestList: 0,
  3146. Plugin: 0,
  3147. PluginArray: 0,
  3148. SVGLengthList: 0,
  3149. SVGNumberList: 0,
  3150. SVGPathSegList: 0,
  3151. SVGPointList: 0,
  3152. SVGStringList: 0,
  3153. SVGTransformList: 0,
  3154. SourceBufferList: 0,
  3155. StyleSheetList: 0,
  3156. TextTrackCueList: 0,
  3157. TextTrackList: 0,
  3158. TouchList: 0
  3159. };
  3160. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  3161. var documentCreateElement = documentCreateElement$2;
  3162. var classList = documentCreateElement('span').classList;
  3163. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  3164. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  3165. var $forEach = arrayIteration.forEach;
  3166. var arrayMethodIsStrict$2 = arrayMethodIsStrict$4;
  3167. var STRICT_METHOD$1 = arrayMethodIsStrict$2('forEach');
  3168. // `Array.prototype.forEach` method implementation
  3169. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  3170. var arrayForEach = !STRICT_METHOD$1 ? function forEach(callbackfn /* , thisArg */) {
  3171. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3172. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  3173. } : [].forEach;
  3174. var global$1 = global$m;
  3175. var DOMIterables = domIterables;
  3176. var DOMTokenListPrototype = domTokenListPrototype;
  3177. var forEach = arrayForEach;
  3178. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  3179. var handlePrototype = function (CollectionPrototype) {
  3180. // some Chrome versions have non-configurable methods on DOMTokenList
  3181. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  3182. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  3183. } catch (error) {
  3184. CollectionPrototype.forEach = forEach;
  3185. }
  3186. };
  3187. for (var COLLECTION_NAME in DOMIterables) {
  3188. if (DOMIterables[COLLECTION_NAME]) {
  3189. handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
  3190. }
  3191. }
  3192. handlePrototype(DOMTokenListPrototype);
  3193. var $$2 = _export;
  3194. var uncurryThis$4 = functionUncurryThis;
  3195. var IndexedObject = indexedObject;
  3196. var toIndexedObject = toIndexedObject$6;
  3197. var arrayMethodIsStrict$1 = arrayMethodIsStrict$4;
  3198. var nativeJoin = uncurryThis$4([].join);
  3199. var ES3_STRINGS = IndexedObject !== Object;
  3200. var FORCED$1 = ES3_STRINGS || !arrayMethodIsStrict$1('join', ',');
  3201. // `Array.prototype.join` method
  3202. // https://tc39.es/ecma262/#sec-array.prototype.join
  3203. $$2({ target: 'Array', proto: true, forced: FORCED$1 }, {
  3204. join: function join(separator) {
  3205. return nativeJoin(toIndexedObject(this), separator === undefined ? ',' : separator);
  3206. }
  3207. });
  3208. var tryToString = tryToString$5;
  3209. var $TypeError = TypeError;
  3210. var deletePropertyOrThrow$1 = function (O, P) {
  3211. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  3212. };
  3213. var arraySlice = arraySlice$2;
  3214. var floor$1 = Math.floor;
  3215. var sort = function (array, comparefn) {
  3216. var length = array.length;
  3217. if (length < 8) {
  3218. // insertion sort
  3219. var i = 1;
  3220. var element, j;
  3221. while (i < length) {
  3222. j = i;
  3223. element = array[i];
  3224. while (j && comparefn(array[j - 1], element) > 0) {
  3225. array[j] = array[--j];
  3226. }
  3227. if (j !== i++) array[j] = element;
  3228. }
  3229. } else {
  3230. // merge sort
  3231. var middle = floor$1(length / 2);
  3232. var left = sort(arraySlice(array, 0, middle), comparefn);
  3233. var right = sort(arraySlice(array, middle), comparefn);
  3234. var llength = left.length;
  3235. var rlength = right.length;
  3236. var lindex = 0;
  3237. var rindex = 0;
  3238. while (lindex < llength || rindex < rlength) {
  3239. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  3240. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  3241. : lindex < llength ? left[lindex++] : right[rindex++];
  3242. }
  3243. }
  3244. return array;
  3245. };
  3246. var arraySort = sort;
  3247. var userAgent$1 = engineUserAgent;
  3248. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  3249. var engineFfVersion = !!firefox && +firefox[1];
  3250. var UA = engineUserAgent;
  3251. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  3252. var userAgent = engineUserAgent;
  3253. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  3254. var engineWebkitVersion = !!webkit && +webkit[1];
  3255. var $$1 = _export;
  3256. var uncurryThis$3 = functionUncurryThis;
  3257. var aCallable = aCallable$9;
  3258. var toObject$1 = toObject$8;
  3259. var lengthOfArrayLike = lengthOfArrayLike$5;
  3260. var deletePropertyOrThrow = deletePropertyOrThrow$1;
  3261. var toString$3 = toString$a;
  3262. var fails$1 = fails$s;
  3263. var internalSort = arraySort;
  3264. var arrayMethodIsStrict = arrayMethodIsStrict$4;
  3265. var FF = engineFfVersion;
  3266. var IE_OR_EDGE = engineIsIeOrEdge;
  3267. var V8 = engineV8Version;
  3268. var WEBKIT = engineWebkitVersion;
  3269. var test = [];
  3270. var nativeSort = uncurryThis$3(test.sort);
  3271. var push$1 = uncurryThis$3(test.push);
  3272. // IE8-
  3273. var FAILS_ON_UNDEFINED = fails$1(function () {
  3274. test.sort(undefined);
  3275. });
  3276. // V8 bug
  3277. var FAILS_ON_NULL = fails$1(function () {
  3278. test.sort(null);
  3279. });
  3280. // Old WebKit
  3281. var STRICT_METHOD = arrayMethodIsStrict('sort');
  3282. var STABLE_SORT = !fails$1(function () {
  3283. // feature detection can be too slow, so check engines versions
  3284. if (V8) return V8 < 70;
  3285. if (FF && FF > 3) return;
  3286. if (IE_OR_EDGE) return true;
  3287. if (WEBKIT) return WEBKIT < 603;
  3288. var result = '';
  3289. var code, chr, value, index;
  3290. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  3291. for (code = 65; code < 76; code++) {
  3292. chr = String.fromCharCode(code);
  3293. switch (code) {
  3294. case 66: case 69: case 70: case 72: value = 3; break;
  3295. case 68: case 71: value = 4; break;
  3296. default: value = 2;
  3297. }
  3298. for (index = 0; index < 47; index++) {
  3299. test.push({ k: chr + index, v: value });
  3300. }
  3301. }
  3302. test.sort(function (a, b) { return b.v - a.v; });
  3303. for (index = 0; index < test.length; index++) {
  3304. chr = test[index].k.charAt(0);
  3305. if (result.charAt(result.length - 1) !== chr) result += chr;
  3306. }
  3307. return result !== 'DGBEFHACIJK';
  3308. });
  3309. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  3310. var getSortCompare = function (comparefn) {
  3311. return function (x, y) {
  3312. if (y === undefined) return -1;
  3313. if (x === undefined) return 1;
  3314. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  3315. return toString$3(x) > toString$3(y) ? 1 : -1;
  3316. };
  3317. };
  3318. // `Array.prototype.sort` method
  3319. // https://tc39.es/ecma262/#sec-array.prototype.sort
  3320. $$1({ target: 'Array', proto: true, forced: FORCED }, {
  3321. sort: function sort(comparefn) {
  3322. if (comparefn !== undefined) aCallable(comparefn);
  3323. var array = toObject$1(this);
  3324. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  3325. var items = [];
  3326. var arrayLength = lengthOfArrayLike(array);
  3327. var itemsLength, index;
  3328. for (index = 0; index < arrayLength; index++) {
  3329. if (index in array) push$1(items, array[index]);
  3330. }
  3331. internalSort(items, getSortCompare(comparefn));
  3332. itemsLength = lengthOfArrayLike(items);
  3333. index = 0;
  3334. while (index < itemsLength) array[index] = items[index++];
  3335. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  3336. return array;
  3337. }
  3338. });
  3339. var call$1 = functionCall;
  3340. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  3341. var anObject$1 = anObject$f;
  3342. var isNullOrUndefined$1 = isNullOrUndefined$7;
  3343. var toLength$2 = toLength$5;
  3344. var toString$2 = toString$a;
  3345. var requireObjectCoercible$2 = requireObjectCoercible$a;
  3346. var getMethod$1 = getMethod$6;
  3347. var advanceStringIndex$1 = advanceStringIndex$3;
  3348. var regExpExec$1 = regexpExecAbstract;
  3349. // @@match logic
  3350. fixRegExpWellKnownSymbolLogic$1('match', function (MATCH, nativeMatch, maybeCallNative) {
  3351. return [
  3352. // `String.prototype.match` method
  3353. // https://tc39.es/ecma262/#sec-string.prototype.match
  3354. function match(regexp) {
  3355. var O = requireObjectCoercible$2(this);
  3356. var matcher = isNullOrUndefined$1(regexp) ? undefined : getMethod$1(regexp, MATCH);
  3357. return matcher ? call$1(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$2(O));
  3358. },
  3359. // `RegExp.prototype[@@match]` method
  3360. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  3361. function (string) {
  3362. var rx = anObject$1(this);
  3363. var S = toString$2(string);
  3364. var res = maybeCallNative(nativeMatch, rx, S);
  3365. if (res.done) return res.value;
  3366. if (!rx.global) return regExpExec$1(rx, S);
  3367. var fullUnicode = rx.unicode;
  3368. rx.lastIndex = 0;
  3369. var A = [];
  3370. var n = 0;
  3371. var result;
  3372. while ((result = regExpExec$1(rx, S)) !== null) {
  3373. var matchStr = toString$2(result[0]);
  3374. A[n] = matchStr;
  3375. if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$2(rx.lastIndex), fullUnicode);
  3376. n++;
  3377. }
  3378. return n === 0 ? null : A;
  3379. }
  3380. ];
  3381. });
  3382. var uncurryThis$2 = functionUncurryThis;
  3383. var toObject = toObject$8;
  3384. var floor = Math.floor;
  3385. var charAt = uncurryThis$2(''.charAt);
  3386. var replace = uncurryThis$2(''.replace);
  3387. var stringSlice$2 = uncurryThis$2(''.slice);
  3388. // eslint-disable-next-line redos/no-vulnerable -- safe
  3389. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  3390. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  3391. // `GetSubstitution` abstract operation
  3392. // https://tc39.es/ecma262/#sec-getsubstitution
  3393. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  3394. var tailPos = position + matched.length;
  3395. var m = captures.length;
  3396. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  3397. if (namedCaptures !== undefined) {
  3398. namedCaptures = toObject(namedCaptures);
  3399. symbols = SUBSTITUTION_SYMBOLS;
  3400. }
  3401. return replace(replacement, symbols, function (match, ch) {
  3402. var capture;
  3403. switch (charAt(ch, 0)) {
  3404. case '$': return '$';
  3405. case '&': return matched;
  3406. case '`': return stringSlice$2(str, 0, position);
  3407. case "'": return stringSlice$2(str, tailPos);
  3408. case '<':
  3409. capture = namedCaptures[stringSlice$2(ch, 1, -1)];
  3410. break;
  3411. default: // \d\d?
  3412. var n = +ch;
  3413. if (n === 0) return match;
  3414. if (n > m) {
  3415. var f = floor(n / 10);
  3416. if (f === 0) return match;
  3417. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  3418. return match;
  3419. }
  3420. capture = captures[n - 1];
  3421. }
  3422. return capture === undefined ? '' : capture;
  3423. });
  3424. };
  3425. var apply = functionApply;
  3426. var call = functionCall;
  3427. var uncurryThis$1 = functionUncurryThis;
  3428. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  3429. var fails = fails$s;
  3430. var anObject = anObject$f;
  3431. var isCallable = isCallable$j;
  3432. var isNullOrUndefined = isNullOrUndefined$7;
  3433. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  3434. var toLength$1 = toLength$5;
  3435. var toString$1 = toString$a;
  3436. var requireObjectCoercible$1 = requireObjectCoercible$a;
  3437. var advanceStringIndex = advanceStringIndex$3;
  3438. var getMethod = getMethod$6;
  3439. var getSubstitution = getSubstitution$1;
  3440. var regExpExec = regexpExecAbstract;
  3441. var wellKnownSymbol = wellKnownSymbol$i;
  3442. var REPLACE = wellKnownSymbol('replace');
  3443. var max = Math.max;
  3444. var min$1 = Math.min;
  3445. var concat = uncurryThis$1([].concat);
  3446. var push = uncurryThis$1([].push);
  3447. var stringIndexOf = uncurryThis$1(''.indexOf);
  3448. var stringSlice$1 = uncurryThis$1(''.slice);
  3449. var maybeToString = function (it) {
  3450. return it === undefined ? it : String(it);
  3451. };
  3452. // IE <= 11 replaces $0 with the whole match, as if it was $&
  3453. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  3454. var REPLACE_KEEPS_$0 = (function () {
  3455. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  3456. return 'a'.replace(/./, '$0') === '$0';
  3457. })();
  3458. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  3459. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  3460. if (/./[REPLACE]) {
  3461. return /./[REPLACE]('a', '$0') === '';
  3462. }
  3463. return false;
  3464. })();
  3465. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  3466. var re = /./;
  3467. re.exec = function () {
  3468. var result = [];
  3469. result.groups = { a: '7' };
  3470. return result;
  3471. };
  3472. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  3473. return ''.replace(re, '$<a>') !== '7';
  3474. });
  3475. // @@replace logic
  3476. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  3477. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  3478. return [
  3479. // `String.prototype.replace` method
  3480. // https://tc39.es/ecma262/#sec-string.prototype.replace
  3481. function replace(searchValue, replaceValue) {
  3482. var O = requireObjectCoercible$1(this);
  3483. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  3484. return replacer
  3485. ? call(replacer, searchValue, O, replaceValue)
  3486. : call(nativeReplace, toString$1(O), searchValue, replaceValue);
  3487. },
  3488. // `RegExp.prototype[@@replace]` method
  3489. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  3490. function (string, replaceValue) {
  3491. var rx = anObject(this);
  3492. var S = toString$1(string);
  3493. if (
  3494. typeof replaceValue == 'string' &&
  3495. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  3496. stringIndexOf(replaceValue, '$<') === -1
  3497. ) {
  3498. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  3499. if (res.done) return res.value;
  3500. }
  3501. var functionalReplace = isCallable(replaceValue);
  3502. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  3503. var global = rx.global;
  3504. var fullUnicode;
  3505. if (global) {
  3506. fullUnicode = rx.unicode;
  3507. rx.lastIndex = 0;
  3508. }
  3509. var results = [];
  3510. var result;
  3511. while (true) {
  3512. result = regExpExec(rx, S);
  3513. if (result === null) break;
  3514. push(results, result);
  3515. if (!global) break;
  3516. var matchStr = toString$1(result[0]);
  3517. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength$1(rx.lastIndex), fullUnicode);
  3518. }
  3519. var accumulatedResult = '';
  3520. var nextSourcePosition = 0;
  3521. for (var i = 0; i < results.length; i++) {
  3522. result = results[i];
  3523. var matched = toString$1(result[0]);
  3524. var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
  3525. var captures = [];
  3526. var replacement;
  3527. // NOTE: This is equivalent to
  3528. // captures = result.slice(1).map(maybeToString)
  3529. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  3530. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  3531. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  3532. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  3533. var namedCaptures = result.groups;
  3534. if (functionalReplace) {
  3535. var replacerArgs = concat([matched], captures, position, S);
  3536. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  3537. replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  3538. } else {
  3539. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  3540. }
  3541. if (position >= nextSourcePosition) {
  3542. accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
  3543. nextSourcePosition = position + matched.length;
  3544. }
  3545. }
  3546. return accumulatedResult + stringSlice$1(S, nextSourcePosition);
  3547. }
  3548. ];
  3549. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  3550. var $ = _export;
  3551. var uncurryThis = functionUncurryThisClause;
  3552. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  3553. var toLength = toLength$5;
  3554. var toString = toString$a;
  3555. var notARegExp = notARegexp;
  3556. var requireObjectCoercible = requireObjectCoercible$a;
  3557. var correctIsRegExpLogic = correctIsRegexpLogic;
  3558. var stringSlice = uncurryThis(''.slice);
  3559. var min = Math.min;
  3560. var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
  3561. // https://github.com/zloirock/core-js/pull/702
  3562. var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
  3563. var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
  3564. return descriptor && !descriptor.writable;
  3565. }();
  3566. // `String.prototype.startsWith` method
  3567. // https://tc39.es/ecma262/#sec-string.prototype.startswith
  3568. $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
  3569. startsWith: function startsWith(searchString /* , position = 0 */) {
  3570. var that = toString(requireObjectCoercible(this));
  3571. notARegExp(searchString);
  3572. var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
  3573. var search = toString(searchString);
  3574. return stringSlice(that, index, index + search.length) === search;
  3575. }
  3576. });
  3577. /* eslint-disable no-use-before-define */
  3578. var Utils$1 = $$l.fn.bootstrapTable.utils;
  3579. var searchControls = 'select, input:not([type="checkbox"]):not([type="radio"])';
  3580. function getInputClass(that) {
  3581. var isSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3582. var formControlClass = isSelect ? that.constants.classes.select : that.constants.classes.input;
  3583. return that.options.iconSize ? Utils$1.sprintf('%s %s-%s', formControlClass, formControlClass, that.options.iconSize) : formControlClass;
  3584. }
  3585. function getOptionsFromSelectControl(selectControl) {
  3586. return selectControl[0].options;
  3587. }
  3588. function getControlContainer(that) {
  3589. if (that.options.filterControlContainer) {
  3590. return $$l("".concat(that.options.filterControlContainer));
  3591. }
  3592. if (that.options.height && that._initialized) {
  3593. return that.$tableContainer.find('.fixed-table-header table thead');
  3594. }
  3595. return that.$header;
  3596. }
  3597. function isKeyAllowed(keyCode) {
  3598. return $$l.inArray(keyCode, [37, 38, 39, 40]) > -1;
  3599. }
  3600. function getSearchControls(that) {
  3601. return getControlContainer(that).find(searchControls);
  3602. }
  3603. function existOptionInSelectControl(selectControl, value) {
  3604. var options = getOptionsFromSelectControl(selectControl);
  3605. for (var i = 0; i < options.length; i++) {
  3606. if (options[i].value === Utils$1.unescapeHTML(value)) {
  3607. // The value is not valid to add
  3608. return true;
  3609. }
  3610. }
  3611. // If we get here, the value is valid to add
  3612. return false;
  3613. }
  3614. function addOptionToSelectControl(selectControl, _value, text, selected, shouldCompareText) {
  3615. var value = _value === undefined || _value === null ? '' : _value.toString().trim();
  3616. value = Utils$1.removeHTML(Utils$1.unescapeHTML(value));
  3617. text = Utils$1.removeHTML(Utils$1.unescapeHTML(text));
  3618. if (existOptionInSelectControl(selectControl, value)) {
  3619. return;
  3620. }
  3621. var isSelected = shouldCompareText ? value === selected || text === selected : value === selected;
  3622. var option = new Option(text, value, false, isSelected);
  3623. selectControl.get(0).add(option);
  3624. }
  3625. function sortSelectControl(selectControl, orderBy, options) {
  3626. var $selectControl = selectControl.get(0);
  3627. if (orderBy === 'server') {
  3628. return;
  3629. }
  3630. var tmpAry = new Array();
  3631. for (var i = 0; i < $selectControl.options.length; i++) {
  3632. tmpAry[i] = new Array();
  3633. tmpAry[i][0] = $selectControl.options[i].text;
  3634. tmpAry[i][1] = $selectControl.options[i].value;
  3635. tmpAry[i][2] = $selectControl.options[i].selected;
  3636. }
  3637. tmpAry.sort(function (a, b) {
  3638. return Utils$1.sort(a[0], b[0], orderBy === 'desc' ? -1 : 1, options);
  3639. });
  3640. while ($selectControl.options.length > 0) {
  3641. $selectControl.options[0] = null;
  3642. }
  3643. for (var _i = 0; _i < tmpAry.length; _i++) {
  3644. var op = new Option(tmpAry[_i][0], tmpAry[_i][1], false, tmpAry[_i][2]);
  3645. $selectControl.add(op);
  3646. }
  3647. }
  3648. function fixHeaderCSS(_ref) {
  3649. var $tableHeader = _ref.$tableHeader;
  3650. $tableHeader.css('height', $tableHeader.find('table').outerHeight(true));
  3651. }
  3652. function getElementClass($element) {
  3653. return $element.attr('class').split(' ').filter(function (className) {
  3654. return className.startsWith('bootstrap-table-filter-control-');
  3655. });
  3656. }
  3657. function getCursorPosition(el) {
  3658. if ($$l(el).is('input[type=search]')) {
  3659. var pos = 0;
  3660. if ('selectionStart' in el) {
  3661. pos = el.selectionStart;
  3662. } else if ('selection' in document) {
  3663. el.focus();
  3664. var Sel = document.selection.createRange();
  3665. var SelLength = document.selection.createRange().text.length;
  3666. Sel.moveStart('character', -el.value.length);
  3667. pos = Sel.text.length - SelLength;
  3668. }
  3669. return pos;
  3670. }
  3671. return -1;
  3672. }
  3673. function cacheValues(that) {
  3674. var searchControls = getSearchControls(that);
  3675. that._valuesFilterControl = [];
  3676. searchControls.each(function () {
  3677. var $field = $$l(this);
  3678. var fieldClass = escapeID(getElementClass($field));
  3679. if (that.options.height && !that.options.filterControlContainer) {
  3680. $field = that.$el.find(".fixed-table-header .".concat(fieldClass));
  3681. } else if (that.options.filterControlContainer) {
  3682. $field = $$l("".concat(that.options.filterControlContainer, " .").concat(fieldClass));
  3683. } else {
  3684. $field = that.$el.find(".".concat(fieldClass));
  3685. }
  3686. that._valuesFilterControl.push({
  3687. field: $field.closest('[data-field]').data('field'),
  3688. value: $field.val(),
  3689. position: getCursorPosition($field.get(0)),
  3690. hasFocus: $field.is(':focus')
  3691. });
  3692. });
  3693. }
  3694. function setCaretPosition(elem, caretPos) {
  3695. try {
  3696. if (elem) {
  3697. if (elem.createTextRange) {
  3698. var range = elem.createTextRange();
  3699. range.move('character', caretPos);
  3700. range.select();
  3701. } else {
  3702. elem.setSelectionRange(caretPos, caretPos);
  3703. }
  3704. }
  3705. } catch (ex) {
  3706. // ignored
  3707. }
  3708. }
  3709. function setValues(that) {
  3710. var field = null;
  3711. var result = [];
  3712. var searchControls = getSearchControls(that);
  3713. if (that._valuesFilterControl.length > 0) {
  3714. // Callback to apply after settings fields values
  3715. var callbacks = [];
  3716. searchControls.each(function (i, el) {
  3717. var $this = $$l(el);
  3718. field = $this.closest('[data-field]').data('field');
  3719. result = that._valuesFilterControl.filter(function (valueObj) {
  3720. return valueObj.field === field;
  3721. });
  3722. if (result.length > 0) {
  3723. if (result[0].hasFocus || result[0].value) {
  3724. var fieldToFocusCallback = function (element, cacheElementInfo) {
  3725. // Closure here to capture the field information
  3726. var closedCallback = function closedCallback() {
  3727. if (cacheElementInfo.hasFocus) {
  3728. element.focus();
  3729. }
  3730. if (Array.isArray(cacheElementInfo.value)) {
  3731. var $element = $$l(element);
  3732. $$l.each(cacheElementInfo.value, function (i, e) {
  3733. $element.find(Utils$1.sprintf('option[value=\'%s\']', e)).prop('selected', true);
  3734. });
  3735. } else {
  3736. element.value = cacheElementInfo.value;
  3737. }
  3738. setCaretPosition(element, cacheElementInfo.position);
  3739. };
  3740. return closedCallback;
  3741. }($this.get(0), result[0]);
  3742. callbacks.push(fieldToFocusCallback);
  3743. }
  3744. }
  3745. });
  3746. // Callback call.
  3747. if (callbacks.length > 0) {
  3748. callbacks.forEach(function (callback) {
  3749. return callback();
  3750. });
  3751. }
  3752. }
  3753. }
  3754. function collectBootstrapTableFilterCookies() {
  3755. var cookies = [];
  3756. var foundCookies = document.cookie.match(/bs\.table\.(filterControl|searchText)/g);
  3757. var foundLocalStorage = localStorage;
  3758. if (foundCookies) {
  3759. $$l.each(foundCookies, function (i, _cookie) {
  3760. var cookie = _cookie;
  3761. if (/./.test(cookie)) {
  3762. cookie = cookie.split('.').pop();
  3763. }
  3764. if ($$l.inArray(cookie, cookies) === -1) {
  3765. cookies.push(cookie);
  3766. }
  3767. });
  3768. }
  3769. if (foundLocalStorage) {
  3770. for (var i = 0; i < foundLocalStorage.length; i++) {
  3771. var cookie = foundLocalStorage.key(i);
  3772. if (/./.test(cookie)) {
  3773. cookie = cookie.split('.').pop();
  3774. }
  3775. if (!cookies.includes(cookie)) {
  3776. cookies.push(cookie);
  3777. }
  3778. }
  3779. }
  3780. return cookies;
  3781. }
  3782. function escapeID(id) {
  3783. // eslint-disable-next-line no-useless-escape
  3784. return String(id).replace(/([:.\[\],])/g, '\\$1');
  3785. }
  3786. function isColumnSearchableViaSelect(_ref2) {
  3787. var filterControl = _ref2.filterControl,
  3788. searchable = _ref2.searchable;
  3789. return filterControl && filterControl.toLowerCase() === 'select' && searchable;
  3790. }
  3791. function isFilterDataNotGiven(_ref3) {
  3792. var filterData = _ref3.filterData;
  3793. return filterData === undefined || filterData.toLowerCase() === 'column';
  3794. }
  3795. function hasSelectControlElement(selectControl) {
  3796. return selectControl && selectControl.length > 0;
  3797. }
  3798. function initFilterSelectControls(that) {
  3799. var data = that.options.data;
  3800. $$l.each(that.header.fields, function (j, field) {
  3801. var column = that.columns[that.fieldsColumnsIndex[field]];
  3802. var selectControl = getControlContainer(that).find("select.bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3803. if (isColumnSearchableViaSelect(column) && isFilterDataNotGiven(column) && hasSelectControlElement(selectControl)) {
  3804. if (!selectControl[0].multiple && selectControl.get(selectControl.length - 1).options.length === 0) {
  3805. // Added the default option, must use a non-breaking space(&nbsp;) to pass the W3C validator
  3806. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder || ' ', column.filterDefault);
  3807. }
  3808. var uniqueValues = {};
  3809. for (var i = 0; i < data.length; i++) {
  3810. // Added a new value
  3811. var fieldValue = Utils$1.getItemField(data[i], field, false);
  3812. var formatter = that.options.editable && column.editable ? column._formatter : that.header.formatters[j];
  3813. var formattedValue = Utils$1.calculateObjectValue(that.header, formatter, [fieldValue, data[i], i], fieldValue);
  3814. if (fieldValue === undefined || fieldValue === null) {
  3815. fieldValue = formattedValue;
  3816. column._forceFormatter = true;
  3817. }
  3818. if (column.filterDataCollector) {
  3819. formattedValue = Utils$1.calculateObjectValue(that.header, column.filterDataCollector, [fieldValue, data[i], formattedValue], formattedValue);
  3820. }
  3821. if (column.searchFormatter) {
  3822. fieldValue = formattedValue;
  3823. }
  3824. uniqueValues[formattedValue] = fieldValue;
  3825. if (_typeof(formattedValue) === 'object' && formattedValue !== null) {
  3826. formattedValue.forEach(function (value) {
  3827. addOptionToSelectControl(selectControl, value, value, column.filterDefault);
  3828. });
  3829. continue;
  3830. }
  3831. }
  3832. // eslint-disable-next-line guard-for-in
  3833. for (var key in uniqueValues) {
  3834. addOptionToSelectControl(selectControl, uniqueValues[key], key, column.filterDefault);
  3835. }
  3836. if (that.options.sortSelectOptions) {
  3837. sortSelectControl(selectControl, column.filterOrderBy, that.options);
  3838. }
  3839. }
  3840. });
  3841. }
  3842. function getFilterDataMethod(objFilterDataMethod, searchTerm) {
  3843. var keys = Object.keys(objFilterDataMethod);
  3844. for (var i = 0; i < keys.length; i++) {
  3845. if (keys[i] === searchTerm) {
  3846. return objFilterDataMethod[searchTerm];
  3847. }
  3848. }
  3849. return null;
  3850. }
  3851. function createControls(that, header) {
  3852. var addedFilterControl = false;
  3853. var html;
  3854. $$l.each(that.columns, function (_, column) {
  3855. html = [];
  3856. if (!column.visible && !(that.options.filterControlContainer && $$l(".bootstrap-table-filter-control-".concat(escapeID(column.field))).length >= 1)) {
  3857. return;
  3858. }
  3859. if (!column.filterControl && !that.options.filterControlContainer) {
  3860. html.push('<div class="no-filter-control"></div>');
  3861. } else if (that.options.filterControlContainer) {
  3862. // Use a filter control container instead of th
  3863. var $filterControls = $$l(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3864. $$l.each($filterControls, function (_, filterControl) {
  3865. var $filterControl = $$l(filterControl);
  3866. if (!$filterControl.is('[type=radio]')) {
  3867. var placeholder = column.filterControlPlaceholder || '';
  3868. $filterControl.attr('placeholder', placeholder).val(column.filterDefault);
  3869. }
  3870. $filterControl.attr('data-field', column.field);
  3871. });
  3872. addedFilterControl = true;
  3873. } else {
  3874. // Create the control based on the html defined in the filterTemplate array.
  3875. var nameControl = column.filterControl.toLowerCase();
  3876. html.push('<div class="filter-control">');
  3877. addedFilterControl = true;
  3878. if (column.searchable && that.options.filterTemplate[nameControl]) {
  3879. html.push(that.options.filterTemplate[nameControl](that, column, column.filterControlPlaceholder ? column.filterControlPlaceholder : '', column.filterDefault));
  3880. }
  3881. }
  3882. // Filtering by default when it is set.
  3883. if (column.filterControl && '' !== column.filterDefault && 'undefined' !== typeof column.filterDefault) {
  3884. if ($$l.isEmptyObject(that.filterColumnsPartial)) {
  3885. that.filterColumnsPartial = {};
  3886. }
  3887. if (!(column.field in that.filterColumnsPartial)) {
  3888. that.filterColumnsPartial[column.field] = column.filterDefault;
  3889. }
  3890. }
  3891. $$l.each(header.find('th'), function (_, th) {
  3892. var $th = $$l(th);
  3893. if ($th.data('field') === column.field) {
  3894. $th.find('.filter-control').remove();
  3895. $th.find('.fht-cell').html(html.join(''));
  3896. return false;
  3897. }
  3898. });
  3899. if (column.filterData && column.filterData.toLowerCase() !== 'column') {
  3900. var filterDataType = getFilterDataMethod(filterDataMethods, column.filterData.substring(0, column.filterData.indexOf(':')));
  3901. var filterDataSource;
  3902. var selectControl;
  3903. if (filterDataType) {
  3904. filterDataSource = column.filterData.substring(column.filterData.indexOf(':') + 1, column.filterData.length);
  3905. selectControl = header.find(".bootstrap-table-filter-control-".concat(escapeID(column.field)));
  3906. addOptionToSelectControl(selectControl, '', column.filterControlPlaceholder, column.filterDefault, true);
  3907. filterDataType(that, filterDataSource, selectControl, that.options.filterOrderBy, column.filterDefault);
  3908. } else {
  3909. 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"}');
  3910. }
  3911. }
  3912. });
  3913. if (addedFilterControl) {
  3914. header.off('keyup', 'input').on('keyup', 'input', function (_ref4, obj) {
  3915. var currentTarget = _ref4.currentTarget,
  3916. keyCode = _ref4.keyCode;
  3917. keyCode = obj ? obj.keyCode : keyCode;
  3918. if (that.options.searchOnEnterKey && keyCode !== 13) {
  3919. return;
  3920. }
  3921. if (isKeyAllowed(keyCode)) {
  3922. return;
  3923. }
  3924. var $currentTarget = $$l(currentTarget);
  3925. if ($currentTarget.is(':checkbox') || $currentTarget.is(':radio')) {
  3926. return;
  3927. }
  3928. clearTimeout(currentTarget.timeoutId || 0);
  3929. currentTarget.timeoutId = setTimeout(function () {
  3930. that.onColumnSearch({
  3931. currentTarget: currentTarget,
  3932. keyCode: keyCode
  3933. });
  3934. }, that.options.searchTimeOut);
  3935. });
  3936. header.off('change', 'select', '.fc-multipleselect').on('change', 'select', '.fc-multipleselect', function (_ref5) {
  3937. var currentTarget = _ref5.currentTarget,
  3938. keyCode = _ref5.keyCode;
  3939. var $selectControl = $$l(currentTarget);
  3940. var value = $selectControl.val();
  3941. if (Array.isArray(value)) {
  3942. for (var i = 0; i < value.length; i++) {
  3943. if (value[i] && value[i].length > 0 && value[i].trim()) {
  3944. $selectControl.find("option[value=\"".concat(value[i], "\"]")).attr('selected', true);
  3945. }
  3946. }
  3947. } else if (value && value.length > 0 && value.trim()) {
  3948. $selectControl.find('option[selected]').removeAttr('selected');
  3949. $selectControl.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  3950. } else {
  3951. $selectControl.find('option[selected]').removeAttr('selected');
  3952. }
  3953. clearTimeout(currentTarget.timeoutId || 0);
  3954. currentTarget.timeoutId = setTimeout(function () {
  3955. that.onColumnSearch({
  3956. currentTarget: currentTarget,
  3957. keyCode: keyCode
  3958. });
  3959. }, that.options.searchTimeOut);
  3960. });
  3961. header.off('mouseup', 'input:not([type=radio])').on('mouseup', 'input:not([type=radio])', function (_ref6) {
  3962. var currentTarget = _ref6.currentTarget,
  3963. keyCode = _ref6.keyCode;
  3964. var $input = $$l(currentTarget);
  3965. var oldValue = $input.val();
  3966. if (oldValue === '') {
  3967. return;
  3968. }
  3969. setTimeout(function () {
  3970. var newValue = $input.val();
  3971. if (newValue === '') {
  3972. clearTimeout(currentTarget.timeoutId || 0);
  3973. currentTarget.timeoutId = setTimeout(function () {
  3974. that.onColumnSearch({
  3975. currentTarget: currentTarget,
  3976. keyCode: keyCode
  3977. });
  3978. }, that.options.searchTimeOut);
  3979. }
  3980. }, 1);
  3981. });
  3982. header.off('change', 'input[type=radio]').on('change', 'input[type=radio]', function (_ref7) {
  3983. var currentTarget = _ref7.currentTarget,
  3984. keyCode = _ref7.keyCode;
  3985. clearTimeout(currentTarget.timeoutId || 0);
  3986. currentTarget.timeoutId = setTimeout(function () {
  3987. that.onColumnSearch({
  3988. currentTarget: currentTarget,
  3989. keyCode: keyCode
  3990. });
  3991. }, that.options.searchTimeOut);
  3992. });
  3993. // See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
  3994. if (header.find('.date-filter-control').length > 0) {
  3995. $$l.each(that.columns, function (i, _ref8) {
  3996. var filterDefault = _ref8.filterDefault,
  3997. filterControl = _ref8.filterControl,
  3998. field = _ref8.field,
  3999. filterDatepickerOptions = _ref8.filterDatepickerOptions;
  4000. if (filterControl !== undefined && filterControl.toLowerCase() === 'datepicker') {
  4001. var $datepicker = header.find(".date-filter-control.bootstrap-table-filter-control-".concat(escapeID(field)));
  4002. if (filterDefault) {
  4003. $datepicker.value(filterDefault);
  4004. }
  4005. if (filterDatepickerOptions.min) {
  4006. $datepicker.attr('min', filterDatepickerOptions.min);
  4007. }
  4008. if (filterDatepickerOptions.max) {
  4009. $datepicker.attr('max', filterDatepickerOptions.max);
  4010. }
  4011. if (filterDatepickerOptions.step) {
  4012. $datepicker.attr('step', filterDatepickerOptions.step);
  4013. }
  4014. if (filterDatepickerOptions.pattern) {
  4015. $datepicker.attr('pattern', filterDatepickerOptions.pattern);
  4016. }
  4017. $datepicker.on('change', function (_ref9) {
  4018. var currentTarget = _ref9.currentTarget;
  4019. clearTimeout(currentTarget.timeoutId || 0);
  4020. currentTarget.timeoutId = setTimeout(function () {
  4021. that.onColumnSearch({
  4022. currentTarget: currentTarget
  4023. });
  4024. }, that.options.searchTimeOut);
  4025. });
  4026. }
  4027. });
  4028. }
  4029. if (that.options.sidePagination !== 'server') {
  4030. that.triggerSearch();
  4031. }
  4032. if (!that.options.filterControlVisible) {
  4033. header.find('.filter-control, .no-filter-control').hide();
  4034. }
  4035. } else {
  4036. header.find('.filter-control, .no-filter-control').hide();
  4037. }
  4038. that.trigger('created-controls');
  4039. }
  4040. function getDirectionOfSelectOptions(_alignment) {
  4041. var alignment = _alignment === undefined ? 'left' : _alignment.toLowerCase();
  4042. switch (alignment) {
  4043. case 'left':
  4044. return 'ltr';
  4045. case 'right':
  4046. return 'rtl';
  4047. case 'auto':
  4048. return 'auto';
  4049. default:
  4050. return 'ltr';
  4051. }
  4052. }
  4053. function syncHeaders(that) {
  4054. if (!that.options.height) {
  4055. return;
  4056. }
  4057. var fixedHeader = that.$tableContainer.find('.fixed-table-header table thead');
  4058. if (fixedHeader.length === 0) {
  4059. return;
  4060. }
  4061. that.$header.children().find('th[data-field]').each(function (_, element) {
  4062. if (element.classList[0] !== 'bs-checkbox') {
  4063. var $element = $$l(element);
  4064. var $field = $element.data('field');
  4065. var $fixedField = that.$tableContainer.find("th[data-field='".concat($field, "']")).not($element);
  4066. var input = $element.find('input');
  4067. var fixedInput = $fixedField.find('input');
  4068. if (input.length > 0 && fixedInput.length > 0) {
  4069. if (input.val() !== fixedInput.val()) {
  4070. input.val(fixedInput.val());
  4071. }
  4072. }
  4073. }
  4074. });
  4075. }
  4076. var filterDataMethods = {
  4077. func: function func(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4078. var variableValues = window[filterDataSource].apply();
  4079. // eslint-disable-next-line guard-for-in
  4080. for (var key in variableValues) {
  4081. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4082. }
  4083. if (that.options.sortSelectOptions) {
  4084. sortSelectControl(selectControl, filterOrderBy, that.options);
  4085. }
  4086. setValues(that);
  4087. },
  4088. obj: function obj(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4089. var objectKeys = filterDataSource.split('.');
  4090. var variableName = objectKeys.shift();
  4091. var variableValues = window[variableName];
  4092. if (objectKeys.length > 0) {
  4093. objectKeys.forEach(function (key) {
  4094. variableValues = variableValues[key];
  4095. });
  4096. }
  4097. // eslint-disable-next-line guard-for-in
  4098. for (var key in variableValues) {
  4099. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4100. }
  4101. if (that.options.sortSelectOptions) {
  4102. sortSelectControl(selectControl, filterOrderBy, that.options);
  4103. }
  4104. setValues(that);
  4105. },
  4106. var: function _var(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4107. var variableValues = window[filterDataSource];
  4108. var isArray = Array.isArray(variableValues);
  4109. for (var key in variableValues) {
  4110. if (isArray) {
  4111. addOptionToSelectControl(selectControl, variableValues[key], variableValues[key], selected, true);
  4112. } else {
  4113. addOptionToSelectControl(selectControl, key, variableValues[key], selected, true);
  4114. }
  4115. }
  4116. if (that.options.sortSelectOptions) {
  4117. sortSelectControl(selectControl, filterOrderBy, that.options);
  4118. }
  4119. setValues(that);
  4120. },
  4121. url: function url(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4122. $$l.ajax({
  4123. url: filterDataSource,
  4124. dataType: 'json',
  4125. success: function success(data) {
  4126. // eslint-disable-next-line guard-for-in
  4127. for (var key in data) {
  4128. addOptionToSelectControl(selectControl, key, data[key], selected);
  4129. }
  4130. if (that.options.sortSelectOptions) {
  4131. sortSelectControl(selectControl, filterOrderBy, that.options);
  4132. }
  4133. setValues(that);
  4134. }
  4135. });
  4136. },
  4137. json: function json(that, filterDataSource, selectControl, filterOrderBy, selected) {
  4138. var variableValues = JSON.parse(filterDataSource);
  4139. // eslint-disable-next-line guard-for-in
  4140. for (var key in variableValues) {
  4141. addOptionToSelectControl(selectControl, key, variableValues[key], selected);
  4142. }
  4143. if (that.options.sortSelectOptions) {
  4144. sortSelectControl(selectControl, filterOrderBy, that.options);
  4145. }
  4146. setValues(that);
  4147. }
  4148. };
  4149. var Utils = $$l.fn.bootstrapTable.utils;
  4150. Object.assign($$l.fn.bootstrapTable.defaults, {
  4151. filterControl: false,
  4152. filterControlVisible: true,
  4153. filterControlMultipleSearch: false,
  4154. filterControlMultipleSearchDelimiter: ',',
  4155. // eslint-disable-next-line no-unused-vars
  4156. onColumnSearch: function onColumnSearch(field, text) {
  4157. return false;
  4158. },
  4159. onCreatedControls: function onCreatedControls() {
  4160. return false;
  4161. },
  4162. alignmentSelectControlOptions: undefined,
  4163. filterTemplate: {
  4164. input: function input(that, column, placeholder, value) {
  4165. 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);
  4166. },
  4167. select: function select(that, column) {
  4168. 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));
  4169. },
  4170. datepicker: function datepicker(that, column, value) {
  4171. 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);
  4172. }
  4173. },
  4174. searchOnEnterKey: false,
  4175. showFilterControlSwitch: false,
  4176. sortSelectOptions: false,
  4177. // internal variables
  4178. _valuesFilterControl: [],
  4179. _initialized: false,
  4180. _isRendering: false,
  4181. _usingMultipleSelect: false
  4182. });
  4183. Object.assign($$l.fn.bootstrapTable.columnDefaults, {
  4184. filterControl: undefined,
  4185. // input, select, datepicker
  4186. filterControlMultipleSelect: false,
  4187. filterControlMultipleSelectOptions: {},
  4188. filterDataCollector: undefined,
  4189. filterData: undefined,
  4190. filterDatepickerOptions: {},
  4191. filterStrictSearch: false,
  4192. filterStartsWithSearch: false,
  4193. filterControlPlaceholder: '',
  4194. filterDefault: '',
  4195. filterOrderBy: 'asc',
  4196. // asc || desc
  4197. filterCustomSearch: undefined
  4198. });
  4199. Object.assign($$l.fn.bootstrapTable.events, {
  4200. 'column-search.bs.table': 'onColumnSearch',
  4201. 'created-controls.bs.table': 'onCreatedControls'
  4202. });
  4203. Object.assign($$l.fn.bootstrapTable.defaults.icons, {
  4204. filterControlSwitchHide: {
  4205. bootstrap3: 'glyphicon-zoom-out icon-zoom-out',
  4206. bootstrap5: 'bi-zoom-out',
  4207. materialize: 'zoom_out'
  4208. }[$$l.fn.bootstrapTable.theme] || 'fa-search-minus',
  4209. filterControlSwitchShow: {
  4210. bootstrap3: 'glyphicon-zoom-in icon-zoom-in',
  4211. bootstrap5: 'bi-zoom-in',
  4212. materialize: 'zoom_in'
  4213. }[$$l.fn.bootstrapTable.theme] || 'fa-search-plus'
  4214. });
  4215. Object.assign($$l.fn.bootstrapTable.locales, {
  4216. formatFilterControlSwitch: function formatFilterControlSwitch() {
  4217. return 'Hide/Show controls';
  4218. },
  4219. formatFilterControlSwitchHide: function formatFilterControlSwitchHide() {
  4220. return 'Hide controls';
  4221. },
  4222. formatFilterControlSwitchShow: function formatFilterControlSwitchShow() {
  4223. return 'Show controls';
  4224. },
  4225. formatClearSearch: function formatClearSearch() {
  4226. return 'Clear filters';
  4227. }
  4228. });
  4229. Object.assign($$l.fn.bootstrapTable.defaults, $$l.fn.bootstrapTable.locales);
  4230. $$l.fn.bootstrapTable.methods.push('triggerSearch');
  4231. $$l.fn.bootstrapTable.methods.push('clearFilterControl');
  4232. $$l.fn.bootstrapTable.methods.push('toggleFilterControl');
  4233. $$l.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  4234. function _class() {
  4235. _classCallCheck(this, _class);
  4236. return _callSuper(this, _class, arguments);
  4237. }
  4238. _inherits(_class, _$$BootstrapTable);
  4239. return _createClass(_class, [{
  4240. key: "init",
  4241. value: function init() {
  4242. var _this = this;
  4243. // Make sure that the filterControl option is set
  4244. if (this.options.filterControl) {
  4245. // Make sure that the internal variables are set correctly
  4246. this._valuesFilterControl = [];
  4247. this._initialized = false;
  4248. this._usingMultipleSelect = false;
  4249. this._isRendering = false;
  4250. this.$el.on('reset-view.bs.table', Utils.debounce(function () {
  4251. initFilterSelectControls(_this);
  4252. setValues(_this);
  4253. }, 3)).on('toggle.bs.table', Utils.debounce(function (_, cardView) {
  4254. _this._initialized = false;
  4255. if (!cardView) {
  4256. initFilterSelectControls(_this);
  4257. setValues(_this);
  4258. _this._initialized = true;
  4259. }
  4260. }, 1)).on('post-header.bs.table', Utils.debounce(function () {
  4261. initFilterSelectControls(_this);
  4262. setValues(_this);
  4263. }, 3)).on('column-switch.bs.table', Utils.debounce(function () {
  4264. setValues(_this);
  4265. if (_this.options.height) {
  4266. _this.fitHeader();
  4267. }
  4268. }, 1)).on('post-body.bs.table', Utils.debounce(function () {
  4269. if (_this.options.height && !_this.options.filterControlContainer && _this.options.filterControlVisible) {
  4270. fixHeaderCSS(_this);
  4271. }
  4272. _this.$tableLoading.css('top', _this.$header.outerHeight() + 1);
  4273. }, 1)).on('all.bs.table', function () {
  4274. syncHeaders(_this);
  4275. });
  4276. }
  4277. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  4278. }
  4279. }, {
  4280. key: "initBody",
  4281. value: function initBody() {
  4282. var _this2 = this;
  4283. _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this);
  4284. if (!this.options.filterControl) {
  4285. return;
  4286. }
  4287. setTimeout(function () {
  4288. initFilterSelectControls(_this2);
  4289. setValues(_this2);
  4290. }, 3);
  4291. }
  4292. }, {
  4293. key: "load",
  4294. value: function load(data) {
  4295. _get(_getPrototypeOf(_class.prototype), "load", this).call(this, data);
  4296. if (!this.options.filterControl) {
  4297. return;
  4298. }
  4299. createControls(this, getControlContainer(this));
  4300. setValues(this);
  4301. }
  4302. }, {
  4303. key: "initHeader",
  4304. value: function initHeader() {
  4305. _get(_getPrototypeOf(_class.prototype), "initHeader", this).call(this);
  4306. if (!this.options.filterControl) {
  4307. return;
  4308. }
  4309. createControls(this, getControlContainer(this));
  4310. this._initialized = true;
  4311. }
  4312. }, {
  4313. key: "initSearch",
  4314. value: function initSearch() {
  4315. var _this3 = this;
  4316. var that = this;
  4317. var filterPartial = $$l.isEmptyObject(that.filterColumnsPartial) ? null : that.filterColumnsPartial;
  4318. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  4319. if (this.options.sidePagination === 'server' || filterPartial === null) {
  4320. return;
  4321. }
  4322. // Check partial column filter
  4323. that.data = filterPartial ? that.data.filter(function (item, i) {
  4324. var itemIsExpected = [];
  4325. var keys1 = Object.keys(item);
  4326. var keys2 = Object.keys(filterPartial);
  4327. var keys = keys1.concat(keys2.filter(function (item) {
  4328. return !keys1.includes(item);
  4329. }));
  4330. keys.forEach(function (key) {
  4331. var thisColumn = that.columns[that.fieldsColumnsIndex[key]];
  4332. var rawFilterValue = filterPartial[key] || '';
  4333. var filterValue = rawFilterValue.toLowerCase();
  4334. var value = Utils.unescapeHTML(Utils.getItemField(item, key, false));
  4335. var tmpItemIsExpected;
  4336. if (_this3.options.searchAccentNeutralise) {
  4337. filterValue = Utils.normalizeAccent(filterValue);
  4338. }
  4339. var filterValues = [filterValue];
  4340. if (_this3.options.filterControlMultipleSearch) {
  4341. filterValues = filterValue.split(_this3.options.filterControlMultipleSearchDelimiter);
  4342. }
  4343. filterValues.forEach(function (filterValue) {
  4344. if (tmpItemIsExpected === true) {
  4345. return;
  4346. }
  4347. filterValue = filterValue.trim();
  4348. if (filterValue === '') {
  4349. tmpItemIsExpected = true;
  4350. } else {
  4351. // Fix #142: search use formatted data
  4352. if (thisColumn) {
  4353. if (thisColumn.searchFormatter || thisColumn._forceFormatter) {
  4354. value = $$l.fn.bootstrapTable.utils.calculateObjectValue(thisColumn, that.header.formatters[$$l.inArray(key, that.header.fields)], [value, item, i], value);
  4355. }
  4356. }
  4357. if ($$l.inArray(key, that.header.fields) !== -1) {
  4358. if (value === undefined || value === null) {
  4359. tmpItemIsExpected = false;
  4360. } else if (_typeof(value) === 'object' && thisColumn.filterCustomSearch) {
  4361. itemIsExpected.push(that.isValueExpected(rawFilterValue, value, thisColumn, key));
  4362. } else if (_typeof(value) === 'object' && Array.isArray(value)) {
  4363. value.forEach(function (objectValue) {
  4364. if (tmpItemIsExpected) {
  4365. return;
  4366. }
  4367. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4368. });
  4369. } else if (_typeof(value) === 'object' && !Array.isArray(value)) {
  4370. Object.values(value).forEach(function (objectValue) {
  4371. if (tmpItemIsExpected) {
  4372. return;
  4373. }
  4374. tmpItemIsExpected = that.isValueExpected(filterValue, objectValue, thisColumn, key);
  4375. });
  4376. } else if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
  4377. tmpItemIsExpected = that.isValueExpected(filterValue, value, thisColumn, key);
  4378. }
  4379. }
  4380. }
  4381. });
  4382. itemIsExpected.push(tmpItemIsExpected);
  4383. });
  4384. return !itemIsExpected.includes(false);
  4385. }) : that.data;
  4386. that.unsortedData = _toConsumableArray(that.data);
  4387. }
  4388. }, {
  4389. key: "isValueExpected",
  4390. value: function isValueExpected(searchValue, value, column, key) {
  4391. var tmpItemIsExpected;
  4392. if (column.filterControl === 'select') {
  4393. value = Utils.removeHTML(value.toString().toLowerCase());
  4394. }
  4395. if (this.options.searchAccentNeutralise) {
  4396. value = Utils.normalizeAccent(value);
  4397. }
  4398. if (column.filterStrictSearch || column.filterControl === 'select' && column.passed.filterStrictSearch !== false) {
  4399. tmpItemIsExpected = value.toString().toLowerCase() === searchValue.toString().toLowerCase();
  4400. } else if (column.filterStartsWithSearch) {
  4401. tmpItemIsExpected = "".concat(value).toLowerCase().indexOf(searchValue) === 0;
  4402. } else if (column.filterControl === 'datepicker') {
  4403. tmpItemIsExpected = new Date(value).getTime() === new Date(searchValue).getTime();
  4404. } else if (this.options.regexSearch) {
  4405. tmpItemIsExpected = Utils.regexCompare(value, searchValue);
  4406. } else {
  4407. tmpItemIsExpected = "".concat(value).toLowerCase().includes(searchValue);
  4408. }
  4409. var largerSmallerEqualsRegex = /(?:(<=|=>|=<|>=|>|<)(?:\s+)?(\d+)?|(\d+)?(\s+)?(<=|=>|=<|>=|>|<))/gm;
  4410. var matches = largerSmallerEqualsRegex.exec(searchValue);
  4411. if (matches) {
  4412. var operator = matches[1] || "".concat(matches[5], "l");
  4413. var comparisonValue = matches[2] || matches[3];
  4414. var int = parseInt(value, 10);
  4415. var comparisonInt = parseInt(comparisonValue, 10);
  4416. switch (operator) {
  4417. case '>':
  4418. case '<l':
  4419. tmpItemIsExpected = int > comparisonInt;
  4420. break;
  4421. case '<':
  4422. case '>l':
  4423. tmpItemIsExpected = int < comparisonInt;
  4424. break;
  4425. case '<=':
  4426. case '=<':
  4427. case '>=l':
  4428. case '=>l':
  4429. tmpItemIsExpected = int <= comparisonInt;
  4430. break;
  4431. case '>=':
  4432. case '=>':
  4433. case '<=l':
  4434. case '=<l':
  4435. tmpItemIsExpected = int >= comparisonInt;
  4436. break;
  4437. }
  4438. }
  4439. if (column.filterCustomSearch) {
  4440. var customSearchResult = Utils.calculateObjectValue(column, column.filterCustomSearch, [searchValue, value, key, this.options.data], true);
  4441. if (customSearchResult !== null) {
  4442. tmpItemIsExpected = customSearchResult;
  4443. }
  4444. }
  4445. return tmpItemIsExpected;
  4446. }
  4447. }, {
  4448. key: "initColumnSearch",
  4449. value: function initColumnSearch(filterColumnsDefaults) {
  4450. cacheValues(this);
  4451. if (filterColumnsDefaults) {
  4452. this.filterColumnsPartial = filterColumnsDefaults;
  4453. this.updatePagination();
  4454. // eslint-disable-next-line guard-for-in
  4455. for (var filter in filterColumnsDefaults) {
  4456. this.trigger('column-search', filter, filterColumnsDefaults[filter]);
  4457. }
  4458. }
  4459. }
  4460. }, {
  4461. key: "initToolbar",
  4462. value: function initToolbar() {
  4463. this.showToolbar = this.showToolbar || this.options.showFilterControlSwitch;
  4464. this.showSearchClearButton = this.options.filterControl && this.options.showSearchClearButton;
  4465. if (this.options.showFilterControlSwitch) {
  4466. this.buttons = Object.assign(this.buttons, {
  4467. filterControlSwitch: {
  4468. text: this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow(),
  4469. icon: this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow,
  4470. event: this.toggleFilterControl,
  4471. attributes: {
  4472. 'aria-label': this.options.formatFilterControlSwitch(),
  4473. title: this.options.formatFilterControlSwitch()
  4474. }
  4475. }
  4476. });
  4477. }
  4478. _get(_getPrototypeOf(_class.prototype), "initToolbar", this).call(this);
  4479. }
  4480. }, {
  4481. key: "resetSearch",
  4482. value: function resetSearch(text) {
  4483. if (this.options.filterControl && this.options.showSearchClearButton) {
  4484. this.clearFilterControl();
  4485. }
  4486. _get(_getPrototypeOf(_class.prototype), "resetSearch", this).call(this, text);
  4487. }
  4488. }, {
  4489. key: "clearFilterControl",
  4490. value: function clearFilterControl() {
  4491. if (!this.options.filterControl) {
  4492. return;
  4493. }
  4494. var that = this;
  4495. var table = this.$el.closest('table');
  4496. var cookies = collectBootstrapTableFilterCookies();
  4497. var controls = getSearchControls(that);
  4498. // const search = Utils.getSearchInput(this)
  4499. var hasValues = false;
  4500. var timeoutId = 0;
  4501. // Clear cache values
  4502. $$l.each(that._valuesFilterControl, function (i, item) {
  4503. hasValues = hasValues ? true : item.value !== '';
  4504. item.value = '';
  4505. });
  4506. // Clear controls in UI
  4507. $$l.each(controls, function (i, item) {
  4508. item.value = '';
  4509. });
  4510. // Cache controls again
  4511. setValues(that);
  4512. // clear cookies once the filters are clean
  4513. clearTimeout(timeoutId);
  4514. timeoutId = setTimeout(function () {
  4515. if (cookies && cookies.length > 0) {
  4516. $$l.each(cookies, function (i, item) {
  4517. if (that.deleteCookie !== undefined) {
  4518. that.deleteCookie(item);
  4519. }
  4520. });
  4521. }
  4522. }, that.options.searchTimeOut);
  4523. // If there is not any value in the controls exit this method
  4524. if (!hasValues) {
  4525. return;
  4526. }
  4527. // Clear each type of filter if it exists.
  4528. // Requires the body to reload each time a type of filter is found because we never know
  4529. // which ones are going to be present.
  4530. if (controls.length > 0) {
  4531. this.filterColumnsPartial = {};
  4532. controls.eq(0).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', {
  4533. keyCode: 13
  4534. });
  4535. /* controls.each(function () {
  4536. $(this).trigger(this.tagName === 'INPUT' ? 'keyup' : 'change', { keyCode: 13 })
  4537. })*/
  4538. } else {
  4539. return;
  4540. }
  4541. /* if (search.length > 0) {
  4542. that.resetSearch('fc')
  4543. }*/
  4544. // use the default sort order if it exists. do nothing if it does not
  4545. if (that.options.sortName !== table.data('sortName') || that.options.sortOrder !== table.data('sortOrder')) {
  4546. var sorter = this.$header.find(Utils.sprintf('[data-field="%s"]', $$l(controls[0]).closest('table').data('sortName')));
  4547. if (sorter.length > 0) {
  4548. that.onSort({
  4549. type: 'keypress',
  4550. currentTarget: sorter
  4551. });
  4552. $$l(sorter).find('.sortable').trigger('click');
  4553. }
  4554. }
  4555. }
  4556. // EVENTS
  4557. }, {
  4558. key: "onColumnSearch",
  4559. value: function onColumnSearch(_ref) {
  4560. var _this4 = this;
  4561. var currentTarget = _ref.currentTarget,
  4562. keyCode = _ref.keyCode;
  4563. if (isKeyAllowed(keyCode)) {
  4564. return;
  4565. }
  4566. cacheValues(this);
  4567. // Cookie extension support
  4568. if (!this.options.cookie) {
  4569. this.options.pageNumber = 1;
  4570. } else {
  4571. // Force call the initServer method in Cookie extension
  4572. this._filterControlValuesLoaded = true;
  4573. }
  4574. if ($$l.isEmptyObject(this.filterColumnsPartial)) {
  4575. this.filterColumnsPartial = {};
  4576. }
  4577. // If searchOnEnterKey is set to true, then we need to iterate over all controls and grab their values.
  4578. var controls = this.options.searchOnEnterKey ? getSearchControls(this).toArray() : [currentTarget];
  4579. controls.forEach(function (element) {
  4580. var $element = $$l(element);
  4581. var elementValue = $element.val();
  4582. var text = elementValue ? elementValue.trim() : '';
  4583. var $field = $element.closest('[data-field]').data('field');
  4584. _this4.trigger('column-search', $field, text);
  4585. if (text) {
  4586. _this4.filterColumnsPartial[$field] = text;
  4587. } else {
  4588. delete _this4.filterColumnsPartial[$field];
  4589. }
  4590. });
  4591. this.onSearch({
  4592. currentTarget: currentTarget
  4593. }, false);
  4594. }
  4595. }, {
  4596. key: "toggleFilterControl",
  4597. value: function toggleFilterControl() {
  4598. this.options.filterControlVisible = !this.options.filterControlVisible;
  4599. // Controls in original header or container.
  4600. var $filterControls = getControlContainer(this).find('.filter-control, .no-filter-control');
  4601. if (this.options.filterControlVisible) {
  4602. $filterControls.show();
  4603. } else {
  4604. $filterControls.hide();
  4605. this.clearFilterControl();
  4606. }
  4607. // Controls in fixed header
  4608. if (this.options.height) {
  4609. var $fixedControls = this.$tableContainer.find('.fixed-table-header table thead').find('.filter-control, .no-filter-control');
  4610. $fixedControls.toggle(this.options.filterControlVisible);
  4611. fixHeaderCSS(this);
  4612. }
  4613. var icon = this.options.showButtonIcons ? this.options.filterControlVisible ? this.options.icons.filterControlSwitchHide : this.options.icons.filterControlSwitchShow : '';
  4614. var text = this.options.showButtonText ? this.options.filterControlVisible ? this.options.formatFilterControlSwitchHide() : this.options.formatFilterControlSwitchShow() : '';
  4615. this.$toolbar.find('>.columns').find('.filter-control-switch').html("".concat(Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, icon), " ").concat(text));
  4616. }
  4617. }, {
  4618. key: "triggerSearch",
  4619. value: function triggerSearch() {
  4620. var searchControls = getSearchControls(this);
  4621. searchControls.each(function () {
  4622. var $element = $$l(this);
  4623. if ($element.is('select')) {
  4624. $element.trigger('change');
  4625. } else {
  4626. $element.trigger('keyup');
  4627. }
  4628. });
  4629. }
  4630. }, {
  4631. key: "_toggleColumn",
  4632. value: function _toggleColumn(index, checked, needUpdate) {
  4633. this._initialized = false;
  4634. _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this).call(this, index, checked, needUpdate);
  4635. syncHeaders(this);
  4636. }
  4637. }]);
  4638. }($$l.BootstrapTable);
  4639. }));