bootstrap-table-filter-control.js 183 KB

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