moralis.web3api.js 297 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415
  1. /**
  2. * Moralis JavaScript SDK v1.5.9
  3. *
  4. * The source tree of this library can be found at
  5. * https://github.com/MoralisWeb3/Moralis-JS-SDK
  6. */
  7. (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Web3Api = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
  8. "use strict";
  9. var _Object$keys2 = _dereq_("@babel/runtime-corejs3/core-js-stable/object/keys");
  10. var _Object$getOwnPropertySymbols = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
  11. var _filterInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/filter");
  12. var _Object$getOwnPropertyDescriptor = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
  13. var _forEachInstanceProperty2 = _dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each");
  14. var _Object$getOwnPropertyDescriptors = _dereq_("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
  15. var _Object$defineProperties = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-properties");
  16. var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js-stable/object/define-property");
  17. var _interopRequireDefault = _dereq_("@babel/runtime-corejs3/helpers/interopRequireDefault");
  18. _Object$defineProperty(exports, "__esModule", {
  19. value: true
  20. });
  21. exports.default = void 0;
  22. var _regenerator = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/regenerator"));
  23. var _forEach = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
  24. var _keys = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/object/keys"));
  25. var _filter = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/filter"));
  26. var _includes = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/instance/includes"));
  27. var _stringify = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/core-js-stable/json/stringify"));
  28. var _asyncToGenerator2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/asyncToGenerator"));
  29. var _classCallCheck2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/classCallCheck"));
  30. var _createClass2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/createClass"));
  31. var _defineProperty2 = _interopRequireDefault(_dereq_("@babel/runtime-corejs3/helpers/defineProperty"));
  32. function ownKeys(object, enumerableOnly) {
  33. var keys = _Object$keys2(object);
  34. if (_Object$getOwnPropertySymbols) {
  35. var symbols = _Object$getOwnPropertySymbols(object);
  36. enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) {
  37. return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
  38. })), keys.push.apply(keys, symbols);
  39. }
  40. return keys;
  41. }
  42. function _objectSpread(target) {
  43. for (var i = 1; i < arguments.length; i++) {
  44. var _context44, _context45;
  45. var source = null != arguments[i] ? arguments[i] : {};
  46. i % 2 ? _forEachInstanceProperty2(_context44 = ownKeys(Object(source), !0)).call(_context44, function (key) {
  47. (0, _defineProperty2.default)(target, key, source[key]);
  48. }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(_context45 = ownKeys(Object(source))).call(_context45, function (key) {
  49. _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key));
  50. });
  51. }
  52. return target;
  53. }
  54. /**
  55. * Automatically generated code, via genWeb3API.js
  56. * Do not modify manually
  57. */
  58. var axios = _dereq_('axios');
  59. var Web3Api = /*#__PURE__*/function () {
  60. function Web3Api() {
  61. (0, _classCallCheck2.default)(this, Web3Api);
  62. }
  63. (0, _createClass2.default)(Web3Api, null, [{
  64. key: "initialize",
  65. value: function (_ref) {
  66. var apiKey = _ref.apiKey,
  67. serverUrl = _ref.serverUrl,
  68. _ref$Moralis = _ref.Moralis,
  69. Moralis = _ref$Moralis === void 0 ? null : _ref$Moralis;
  70. if (!serverUrl && !apiKey) {
  71. throw new Error('Web3Api.initialize failed: initialize with apiKey or serverUrl');
  72. }
  73. if (apiKey) this.apiKey = apiKey;
  74. if (serverUrl) this.serverUrl = serverUrl;
  75. this.Moralis = Moralis;
  76. }
  77. }, {
  78. key: "getBody",
  79. value: function (params, bodyParams) {
  80. var _this = this;
  81. if (!params || !bodyParams || !bodyParams.length) {
  82. return undefined;
  83. }
  84. var body = {};
  85. (0, _forEach.default)(bodyParams).call(bodyParams, function (_ref2) {
  86. var key = _ref2.key,
  87. type = _ref2.type,
  88. required = _ref2.required;
  89. if (params[key] === undefined) {
  90. if (required) throw new Error("param ".concat(key, " is required!"));
  91. } else if (type === _this.BodyParamTypes.setBody) {
  92. body = params[key];
  93. } else {
  94. body[key] = params[key];
  95. } // remove the param so it doesn't also get added as a query param
  96. delete params[key];
  97. });
  98. return body;
  99. }
  100. }, {
  101. key: "getParameterizedUrl",
  102. value: function (url, params) {
  103. var _context;
  104. if (!(0, _keys.default)(params).length) return url; // find url params, they start with :
  105. var requiredParams = (0, _filter.default)(_context = url.split('/')).call(_context, function (s) {
  106. return s && (0, _includes.default)(s).call(s, ':');
  107. });
  108. if (!requiredParams.length) return url;
  109. var parameterizedUrl = url;
  110. (0, _forEach.default)(requiredParams).call(requiredParams, function (p) {
  111. // strip the : and replace with param value
  112. var key = p.substr(1);
  113. var value = params[key];
  114. if (!value) {
  115. throw new Error("required param ".concat(key, " not provided"));
  116. }
  117. parameterizedUrl = parameterizedUrl.replace(p, value); // remove required param from param list
  118. // so it doesn't become part of the query params
  119. delete params[key];
  120. });
  121. return parameterizedUrl;
  122. }
  123. }, {
  124. key: "getApiRateLimitInfo",
  125. value: function (headers) {
  126. return {
  127. 'x-rate-limit-limit': headers['x-rate-limit-limit'],
  128. 'x-rate-limit-remaining-ttl': headers['x-rate-limit-remaining-ttl'],
  129. 'x-rate-limit-used': headers['x-rate-limit-used'],
  130. 'x-rate-limit-remaining-ip-ttl': headers['x-rate-limit-remaining-ip-ttl'],
  131. 'x-rate-limit-ip-used': headers['x-rate-limit-ip-used']
  132. };
  133. }
  134. }, {
  135. key: "getApiErrorMessage",
  136. value: function (error, url) {
  137. var _error$response, _error$response$data;
  138. return (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.message) || (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.toString()) || "Web3 API error while calling ".concat(url);
  139. }
  140. }, {
  141. key: "fetch",
  142. value: function () {
  143. var _fetch = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
  144. var endpoint, providedParams, params, _this$Moralis, User, account, user;
  145. return _regenerator.default.wrap(function (_context2) {
  146. while (1) {
  147. switch (_context2.prev = _context2.next) {
  148. case 0:
  149. endpoint = _ref3.endpoint, providedParams = _ref3.params; // Make a shallow copy to prevent modification of original params
  150. params = _objectSpread({}, providedParams);
  151. if (this.Moralis) {
  152. _this$Moralis = this.Moralis, User = _this$Moralis.User, account = _this$Moralis.account;
  153. user = User.current();
  154. if (!params.address) {
  155. if (user) {
  156. params.address = user.get('ethAddress');
  157. } else if (account) {
  158. params.address = account;
  159. }
  160. }
  161. }
  162. if (this.apiKey) {
  163. _context2.next = 5;
  164. break;
  165. }
  166. return _context2.abrupt("return", this.fetchFromServer(endpoint.name, params));
  167. case 5:
  168. return _context2.abrupt("return", this.fetchFromApi(endpoint, params));
  169. case 6:
  170. case "end":
  171. return _context2.stop();
  172. }
  173. }
  174. }, _callee, this);
  175. }));
  176. return function () {
  177. return _fetch.apply(this, arguments);
  178. };
  179. }()
  180. }, {
  181. key: "fetchFromApi",
  182. value: function () {
  183. var _fetchFromApi = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(endpoint, params) {
  184. var _endpoint$method, method, url, bodyParams, parameterizedUrl, body, response, _error$response2, status, headers, data, msg;
  185. return _regenerator.default.wrap(function (_context3) {
  186. while (1) {
  187. switch (_context3.prev = _context3.next) {
  188. case 0:
  189. _endpoint$method = endpoint.method, method = _endpoint$method === void 0 ? 'GET' : _endpoint$method, url = endpoint.url, bodyParams = endpoint.bodyParams;
  190. _context3.prev = 1;
  191. parameterizedUrl = this.getParameterizedUrl(url, params);
  192. body = this.getBody(params, bodyParams);
  193. _context3.next = 6;
  194. return axios(this.baseURL + parameterizedUrl, {
  195. params: params,
  196. method: method,
  197. body: body,
  198. headers: {
  199. Accept: 'application/json',
  200. 'Content-Type': 'application/json',
  201. 'x-api-key': this.apiKey
  202. }
  203. });
  204. case 6:
  205. response = _context3.sent;
  206. return _context3.abrupt("return", response.data);
  207. case 10:
  208. _context3.prev = 10;
  209. _context3.t0 = _context3["catch"](1);
  210. _error$response2 = _context3.t0.response, status = _error$response2.status, headers = _error$response2.headers, data = _error$response2.data;
  211. if (status === 429) {
  212. msg = "This Moralis Server is rate-limited because of the plan restrictions. See the details about the current rate and throttle limits: ".concat((0, _stringify.default)(this.getApiRateLimitInfo(headers)));
  213. } else {
  214. msg = this.getApiErrorMessage(_context3.t0, url);
  215. }
  216. throw new Error(msg);
  217. case 15:
  218. case "end":
  219. return _context3.stop();
  220. }
  221. }
  222. }, _callee2, this, [[1, 10]]);
  223. }));
  224. return function () {
  225. return _fetchFromApi.apply(this, arguments);
  226. };
  227. }()
  228. }, {
  229. key: "fetchFromServer",
  230. value: function () {
  231. var _fetchFromServer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(name, options) {
  232. var http, user, response, _error$response3, _error$response3$data;
  233. return _regenerator.default.wrap(function (_context4) {
  234. while (1) {
  235. switch (_context4.prev = _context4.next) {
  236. case 0:
  237. if (this.serverUrl) {
  238. _context4.next = 2;
  239. break;
  240. }
  241. throw new Error('Web3Api not initialized, run Moralis.start() first');
  242. case 2:
  243. _context4.prev = 2;
  244. http = axios.create({
  245. baseURL: this.serverUrl
  246. });
  247. if (!options.chain) options.chain = 'eth';
  248. user = this.Moralis.User.current();
  249. if (user) {
  250. options._SessionToken = user.attributes.sessionToken;
  251. options._ApplicationId = this.Moralis.applicationId;
  252. }
  253. _context4.next = 9;
  254. return http.post("/functions/".concat(name), options, {
  255. headers: {
  256. Accept: 'application/json',
  257. 'Content-Type': 'application/json'
  258. }
  259. });
  260. case 9:
  261. response = _context4.sent;
  262. return _context4.abrupt("return", response.data.result);
  263. case 13:
  264. _context4.prev = 13;
  265. _context4.t0 = _context4["catch"](2);
  266. if (!((_error$response3 = _context4.t0.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && _error$response3$data.error)) {
  267. _context4.next = 17;
  268. break;
  269. }
  270. throw new Error(_context4.t0.response.data.error);
  271. case 17:
  272. throw _context4.t0;
  273. case 18:
  274. case "end":
  275. return _context4.stop();
  276. }
  277. }
  278. }, _callee3, this, [[2, 13]]);
  279. }));
  280. return function () {
  281. return _fetchFromServer.apply(this, arguments);
  282. };
  283. }()
  284. }]);
  285. return Web3Api;
  286. }();
  287. (0, _defineProperty2.default)(Web3Api, "baseURL", 'https://deep-index.moralis.io/api/v2');
  288. (0, _defineProperty2.default)(Web3Api, "BodyParamTypes", {
  289. setBody: 'set body',
  290. property: 'property'
  291. });
  292. (0, _defineProperty2.default)(Web3Api, "native", {
  293. getBlock: function () {
  294. var _getBlock = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
  295. var options,
  296. _args4 = arguments;
  297. return _regenerator.default.wrap(function (_context5) {
  298. while (1) {
  299. switch (_context5.prev = _context5.next) {
  300. case 0:
  301. options = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
  302. return _context5.abrupt("return", Web3Api.fetch({
  303. endpoint: {
  304. "method": "GET",
  305. "group": "native",
  306. "name": "getBlock",
  307. "url": "/block/:block_number_or_hash"
  308. },
  309. params: options
  310. }));
  311. case 2:
  312. case "end":
  313. return _context5.stop();
  314. }
  315. }
  316. }, _callee4);
  317. }));
  318. return function () {
  319. return _getBlock.apply(this, arguments);
  320. };
  321. }(),
  322. getDateToBlock: function () {
  323. var _getDateToBlock = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
  324. var options,
  325. _args5 = arguments;
  326. return _regenerator.default.wrap(function (_context6) {
  327. while (1) {
  328. switch (_context6.prev = _context6.next) {
  329. case 0:
  330. options = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
  331. return _context6.abrupt("return", Web3Api.fetch({
  332. endpoint: {
  333. "method": "GET",
  334. "group": "native",
  335. "name": "getDateToBlock",
  336. "url": "/dateToBlock"
  337. },
  338. params: options
  339. }));
  340. case 2:
  341. case "end":
  342. return _context6.stop();
  343. }
  344. }
  345. }, _callee5);
  346. }));
  347. return function () {
  348. return _getDateToBlock.apply(this, arguments);
  349. };
  350. }(),
  351. getLogsByAddress: function () {
  352. var _getLogsByAddress = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  353. var options,
  354. _args6 = arguments;
  355. return _regenerator.default.wrap(function (_context7) {
  356. while (1) {
  357. switch (_context7.prev = _context7.next) {
  358. case 0:
  359. options = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
  360. return _context7.abrupt("return", Web3Api.fetch({
  361. endpoint: {
  362. "method": "GET",
  363. "group": "native",
  364. "name": "getLogsByAddress",
  365. "url": "/:address/logs"
  366. },
  367. params: options
  368. }));
  369. case 2:
  370. case "end":
  371. return _context7.stop();
  372. }
  373. }
  374. }, _callee6);
  375. }));
  376. return function () {
  377. return _getLogsByAddress.apply(this, arguments);
  378. };
  379. }(),
  380. getNFTTransfersByBlock: function () {
  381. var _getNFTTransfersByBlock = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  382. var options,
  383. _args7 = arguments;
  384. return _regenerator.default.wrap(function (_context8) {
  385. while (1) {
  386. switch (_context8.prev = _context8.next) {
  387. case 0:
  388. options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
  389. return _context8.abrupt("return", Web3Api.fetch({
  390. endpoint: {
  391. "method": "GET",
  392. "group": "native",
  393. "name": "getNFTTransfersByBlock",
  394. "url": "/block/:block_number_or_hash/nft/transfers"
  395. },
  396. params: options
  397. }));
  398. case 2:
  399. case "end":
  400. return _context8.stop();
  401. }
  402. }
  403. }, _callee7);
  404. }));
  405. return function () {
  406. return _getNFTTransfersByBlock.apply(this, arguments);
  407. };
  408. }(),
  409. getTransaction: function () {
  410. var _getTransaction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  411. var options,
  412. _args8 = arguments;
  413. return _regenerator.default.wrap(function (_context9) {
  414. while (1) {
  415. switch (_context9.prev = _context9.next) {
  416. case 0:
  417. options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
  418. return _context9.abrupt("return", Web3Api.fetch({
  419. endpoint: {
  420. "method": "GET",
  421. "group": "native",
  422. "name": "getTransaction",
  423. "url": "/transaction/:transaction_hash"
  424. },
  425. params: options
  426. }));
  427. case 2:
  428. case "end":
  429. return _context9.stop();
  430. }
  431. }
  432. }, _callee8);
  433. }));
  434. return function () {
  435. return _getTransaction.apply(this, arguments);
  436. };
  437. }(),
  438. getContractEvents: function () {
  439. var _getContractEvents = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  440. var options,
  441. _args9 = arguments;
  442. return _regenerator.default.wrap(function (_context10) {
  443. while (1) {
  444. switch (_context10.prev = _context10.next) {
  445. case 0:
  446. options = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
  447. return _context10.abrupt("return", Web3Api.fetch({
  448. endpoint: {
  449. "method": "POST",
  450. "group": "native",
  451. "name": "getContractEvents",
  452. "url": "/:address/events",
  453. "bodyParams": [{
  454. "key": "data",
  455. "type": "set body",
  456. "required": false
  457. }]
  458. },
  459. params: options
  460. }));
  461. case 2:
  462. case "end":
  463. return _context10.stop();
  464. }
  465. }
  466. }, _callee9);
  467. }));
  468. return function () {
  469. return _getContractEvents.apply(this, arguments);
  470. };
  471. }(),
  472. runContractFunction: function () {
  473. var _runContractFunction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
  474. var options,
  475. _args10 = arguments;
  476. return _regenerator.default.wrap(function (_context11) {
  477. while (1) {
  478. switch (_context11.prev = _context11.next) {
  479. case 0:
  480. options = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
  481. return _context11.abrupt("return", Web3Api.fetch({
  482. endpoint: {
  483. "method": "POST",
  484. "group": "native",
  485. "name": "runContractFunction",
  486. "url": "/:address/function",
  487. "bodyParams": [{
  488. "key": "abi",
  489. "type": "property",
  490. "required": true
  491. }, {
  492. "key": "params",
  493. "type": "property",
  494. "required": false
  495. }]
  496. },
  497. params: options
  498. }));
  499. case 2:
  500. case "end":
  501. return _context11.stop();
  502. }
  503. }
  504. }, _callee10);
  505. }));
  506. return function () {
  507. return _runContractFunction.apply(this, arguments);
  508. };
  509. }()
  510. });
  511. (0, _defineProperty2.default)(Web3Api, "account", {
  512. getTransactions: function () {
  513. var _getTransactions = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11() {
  514. var options,
  515. _args11 = arguments;
  516. return _regenerator.default.wrap(function (_context12) {
  517. while (1) {
  518. switch (_context12.prev = _context12.next) {
  519. case 0:
  520. options = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
  521. return _context12.abrupt("return", Web3Api.fetch({
  522. endpoint: {
  523. "method": "GET",
  524. "group": "account",
  525. "name": "getTransactions",
  526. "url": "/:address"
  527. },
  528. params: options
  529. }));
  530. case 2:
  531. case "end":
  532. return _context12.stop();
  533. }
  534. }
  535. }, _callee11);
  536. }));
  537. return function () {
  538. return _getTransactions.apply(this, arguments);
  539. };
  540. }(),
  541. getNativeBalance: function () {
  542. var _getNativeBalance = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  543. var options,
  544. _args12 = arguments;
  545. return _regenerator.default.wrap(function (_context13) {
  546. while (1) {
  547. switch (_context13.prev = _context13.next) {
  548. case 0:
  549. options = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
  550. return _context13.abrupt("return", Web3Api.fetch({
  551. endpoint: {
  552. "method": "GET",
  553. "group": "account",
  554. "name": "getNativeBalance",
  555. "url": "/:address/balance"
  556. },
  557. params: options
  558. }));
  559. case 2:
  560. case "end":
  561. return _context13.stop();
  562. }
  563. }
  564. }, _callee12);
  565. }));
  566. return function () {
  567. return _getNativeBalance.apply(this, arguments);
  568. };
  569. }(),
  570. getTokenBalances: function () {
  571. var _getTokenBalances = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  572. var options,
  573. _args13 = arguments;
  574. return _regenerator.default.wrap(function (_context14) {
  575. while (1) {
  576. switch (_context14.prev = _context14.next) {
  577. case 0:
  578. options = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
  579. return _context14.abrupt("return", Web3Api.fetch({
  580. endpoint: {
  581. "method": "GET",
  582. "group": "account",
  583. "name": "getTokenBalances",
  584. "url": "/:address/erc20"
  585. },
  586. params: options
  587. }));
  588. case 2:
  589. case "end":
  590. return _context14.stop();
  591. }
  592. }
  593. }, _callee13);
  594. }));
  595. return function () {
  596. return _getTokenBalances.apply(this, arguments);
  597. };
  598. }(),
  599. getTokenTransfers: function () {
  600. var _getTokenTransfers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14() {
  601. var options,
  602. _args14 = arguments;
  603. return _regenerator.default.wrap(function (_context15) {
  604. while (1) {
  605. switch (_context15.prev = _context15.next) {
  606. case 0:
  607. options = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
  608. return _context15.abrupt("return", Web3Api.fetch({
  609. endpoint: {
  610. "method": "GET",
  611. "group": "account",
  612. "name": "getTokenTransfers",
  613. "url": "/:address/erc20/transfers"
  614. },
  615. params: options
  616. }));
  617. case 2:
  618. case "end":
  619. return _context15.stop();
  620. }
  621. }
  622. }, _callee14);
  623. }));
  624. return function () {
  625. return _getTokenTransfers.apply(this, arguments);
  626. };
  627. }(),
  628. getNFTs: function () {
  629. var _getNFTs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  630. var options,
  631. _args15 = arguments;
  632. return _regenerator.default.wrap(function (_context16) {
  633. while (1) {
  634. switch (_context16.prev = _context16.next) {
  635. case 0:
  636. options = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
  637. return _context16.abrupt("return", Web3Api.fetch({
  638. endpoint: {
  639. "method": "GET",
  640. "group": "account",
  641. "name": "getNFTs",
  642. "url": "/:address/nft"
  643. },
  644. params: options
  645. }));
  646. case 2:
  647. case "end":
  648. return _context16.stop();
  649. }
  650. }
  651. }, _callee15);
  652. }));
  653. return function () {
  654. return _getNFTs.apply(this, arguments);
  655. };
  656. }(),
  657. getNFTTransfers: function () {
  658. var _getNFTTransfers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  659. var options,
  660. _args16 = arguments;
  661. return _regenerator.default.wrap(function (_context17) {
  662. while (1) {
  663. switch (_context17.prev = _context17.next) {
  664. case 0:
  665. options = _args16.length > 0 && _args16[0] !== undefined ? _args16[0] : {};
  666. return _context17.abrupt("return", Web3Api.fetch({
  667. endpoint: {
  668. "method": "GET",
  669. "group": "account",
  670. "name": "getNFTTransfers",
  671. "url": "/:address/nft/transfers"
  672. },
  673. params: options
  674. }));
  675. case 2:
  676. case "end":
  677. return _context17.stop();
  678. }
  679. }
  680. }, _callee16);
  681. }));
  682. return function () {
  683. return _getNFTTransfers.apply(this, arguments);
  684. };
  685. }(),
  686. getNFTsForContract: function () {
  687. var _getNFTsForContract = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17() {
  688. var options,
  689. _args17 = arguments;
  690. return _regenerator.default.wrap(function (_context18) {
  691. while (1) {
  692. switch (_context18.prev = _context18.next) {
  693. case 0:
  694. options = _args17.length > 0 && _args17[0] !== undefined ? _args17[0] : {};
  695. return _context18.abrupt("return", Web3Api.fetch({
  696. endpoint: {
  697. "method": "GET",
  698. "group": "account",
  699. "name": "getNFTsForContract",
  700. "url": "/:address/nft/:token_address"
  701. },
  702. params: options
  703. }));
  704. case 2:
  705. case "end":
  706. return _context18.stop();
  707. }
  708. }
  709. }, _callee17);
  710. }));
  711. return function () {
  712. return _getNFTsForContract.apply(this, arguments);
  713. };
  714. }()
  715. });
  716. (0, _defineProperty2.default)(Web3Api, "token", {
  717. getTokenMetadata: function () {
  718. var _getTokenMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18() {
  719. var options,
  720. _args18 = arguments;
  721. return _regenerator.default.wrap(function (_context19) {
  722. while (1) {
  723. switch (_context19.prev = _context19.next) {
  724. case 0:
  725. options = _args18.length > 0 && _args18[0] !== undefined ? _args18[0] : {};
  726. return _context19.abrupt("return", Web3Api.fetch({
  727. endpoint: {
  728. "method": "GET",
  729. "group": "token",
  730. "name": "getTokenMetadata",
  731. "url": "/erc20/metadata"
  732. },
  733. params: options
  734. }));
  735. case 2:
  736. case "end":
  737. return _context19.stop();
  738. }
  739. }
  740. }, _callee18);
  741. }));
  742. return function () {
  743. return _getTokenMetadata.apply(this, arguments);
  744. };
  745. }(),
  746. getNFTTrades: function () {
  747. var _getNFTTrades = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19() {
  748. var options,
  749. _args19 = arguments;
  750. return _regenerator.default.wrap(function (_context20) {
  751. while (1) {
  752. switch (_context20.prev = _context20.next) {
  753. case 0:
  754. options = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
  755. return _context20.abrupt("return", Web3Api.fetch({
  756. endpoint: {
  757. "method": "GET",
  758. "group": "token",
  759. "name": "getNFTTrades",
  760. "url": "/nft/:address/trades"
  761. },
  762. params: options
  763. }));
  764. case 2:
  765. case "end":
  766. return _context20.stop();
  767. }
  768. }
  769. }, _callee19);
  770. }));
  771. return function () {
  772. return _getNFTTrades.apply(this, arguments);
  773. };
  774. }(),
  775. getNFTLowestPrice: function () {
  776. var _getNFTLowestPrice = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20() {
  777. var options,
  778. _args20 = arguments;
  779. return _regenerator.default.wrap(function (_context21) {
  780. while (1) {
  781. switch (_context21.prev = _context21.next) {
  782. case 0:
  783. options = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
  784. return _context21.abrupt("return", Web3Api.fetch({
  785. endpoint: {
  786. "method": "GET",
  787. "group": "token",
  788. "name": "getNFTLowestPrice",
  789. "url": "/nft/:address/lowestprice"
  790. },
  791. params: options
  792. }));
  793. case 2:
  794. case "end":
  795. return _context21.stop();
  796. }
  797. }
  798. }, _callee20);
  799. }));
  800. return function () {
  801. return _getNFTLowestPrice.apply(this, arguments);
  802. };
  803. }(),
  804. getTokenMetadataBySymbol: function () {
  805. var _getTokenMetadataBySymbol = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21() {
  806. var options,
  807. _args21 = arguments;
  808. return _regenerator.default.wrap(function (_context22) {
  809. while (1) {
  810. switch (_context22.prev = _context22.next) {
  811. case 0:
  812. options = _args21.length > 0 && _args21[0] !== undefined ? _args21[0] : {};
  813. return _context22.abrupt("return", Web3Api.fetch({
  814. endpoint: {
  815. "method": "GET",
  816. "group": "token",
  817. "name": "getTokenMetadataBySymbol",
  818. "url": "/erc20/metadata/symbols"
  819. },
  820. params: options
  821. }));
  822. case 2:
  823. case "end":
  824. return _context22.stop();
  825. }
  826. }
  827. }, _callee21);
  828. }));
  829. return function () {
  830. return _getTokenMetadataBySymbol.apply(this, arguments);
  831. };
  832. }(),
  833. getTokenPrice: function () {
  834. var _getTokenPrice = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22() {
  835. var options,
  836. _args22 = arguments;
  837. return _regenerator.default.wrap(function (_context23) {
  838. while (1) {
  839. switch (_context23.prev = _context23.next) {
  840. case 0:
  841. options = _args22.length > 0 && _args22[0] !== undefined ? _args22[0] : {};
  842. return _context23.abrupt("return", Web3Api.fetch({
  843. endpoint: {
  844. "method": "GET",
  845. "group": "token",
  846. "name": "getTokenPrice",
  847. "url": "/erc20/:address/price"
  848. },
  849. params: options
  850. }));
  851. case 2:
  852. case "end":
  853. return _context23.stop();
  854. }
  855. }
  856. }, _callee22);
  857. }));
  858. return function () {
  859. return _getTokenPrice.apply(this, arguments);
  860. };
  861. }(),
  862. getTokenAddressTransfers: function () {
  863. var _getTokenAddressTransfers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  864. var options,
  865. _args23 = arguments;
  866. return _regenerator.default.wrap(function (_context24) {
  867. while (1) {
  868. switch (_context24.prev = _context24.next) {
  869. case 0:
  870. options = _args23.length > 0 && _args23[0] !== undefined ? _args23[0] : {};
  871. return _context24.abrupt("return", Web3Api.fetch({
  872. endpoint: {
  873. "method": "GET",
  874. "group": "token",
  875. "name": "getTokenAddressTransfers",
  876. "url": "/erc20/:address/transfers"
  877. },
  878. params: options
  879. }));
  880. case 2:
  881. case "end":
  882. return _context24.stop();
  883. }
  884. }
  885. }, _callee23);
  886. }));
  887. return function () {
  888. return _getTokenAddressTransfers.apply(this, arguments);
  889. };
  890. }(),
  891. getTokenAllowance: function () {
  892. var _getTokenAllowance = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24() {
  893. var options,
  894. _args24 = arguments;
  895. return _regenerator.default.wrap(function (_context25) {
  896. while (1) {
  897. switch (_context25.prev = _context25.next) {
  898. case 0:
  899. options = _args24.length > 0 && _args24[0] !== undefined ? _args24[0] : {};
  900. return _context25.abrupt("return", Web3Api.fetch({
  901. endpoint: {
  902. "method": "GET",
  903. "group": "token",
  904. "name": "getTokenAllowance",
  905. "url": "/erc20/:address/allowance"
  906. },
  907. params: options
  908. }));
  909. case 2:
  910. case "end":
  911. return _context25.stop();
  912. }
  913. }
  914. }, _callee24);
  915. }));
  916. return function () {
  917. return _getTokenAllowance.apply(this, arguments);
  918. };
  919. }(),
  920. searchNFTs: function () {
  921. var _searchNFTs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25() {
  922. var options,
  923. _args25 = arguments;
  924. return _regenerator.default.wrap(function (_context26) {
  925. while (1) {
  926. switch (_context26.prev = _context26.next) {
  927. case 0:
  928. options = _args25.length > 0 && _args25[0] !== undefined ? _args25[0] : {};
  929. return _context26.abrupt("return", Web3Api.fetch({
  930. endpoint: {
  931. "method": "GET",
  932. "group": "token",
  933. "name": "searchNFTs",
  934. "url": "/nft/search"
  935. },
  936. params: options
  937. }));
  938. case 2:
  939. case "end":
  940. return _context26.stop();
  941. }
  942. }
  943. }, _callee25);
  944. }));
  945. return function () {
  946. return _searchNFTs.apply(this, arguments);
  947. };
  948. }(),
  949. getNftTransfersFromToBlock: function () {
  950. var _getNftTransfersFromToBlock = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  951. var options,
  952. _args26 = arguments;
  953. return _regenerator.default.wrap(function (_context27) {
  954. while (1) {
  955. switch (_context27.prev = _context27.next) {
  956. case 0:
  957. options = _args26.length > 0 && _args26[0] !== undefined ? _args26[0] : {};
  958. return _context27.abrupt("return", Web3Api.fetch({
  959. endpoint: {
  960. "method": "GET",
  961. "group": "token",
  962. "name": "getNftTransfersFromToBlock",
  963. "url": "/nft/transfers"
  964. },
  965. params: options
  966. }));
  967. case 2:
  968. case "end":
  969. return _context27.stop();
  970. }
  971. }
  972. }, _callee26);
  973. }));
  974. return function () {
  975. return _getNftTransfersFromToBlock.apply(this, arguments);
  976. };
  977. }(),
  978. getAllTokenIds: function () {
  979. var _getAllTokenIds = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27() {
  980. var options,
  981. _args27 = arguments;
  982. return _regenerator.default.wrap(function (_context28) {
  983. while (1) {
  984. switch (_context28.prev = _context28.next) {
  985. case 0:
  986. options = _args27.length > 0 && _args27[0] !== undefined ? _args27[0] : {};
  987. return _context28.abrupt("return", Web3Api.fetch({
  988. endpoint: {
  989. "method": "GET",
  990. "group": "token",
  991. "name": "getAllTokenIds",
  992. "url": "/nft/:address"
  993. },
  994. params: options
  995. }));
  996. case 2:
  997. case "end":
  998. return _context28.stop();
  999. }
  1000. }
  1001. }, _callee27);
  1002. }));
  1003. return function () {
  1004. return _getAllTokenIds.apply(this, arguments);
  1005. };
  1006. }(),
  1007. getContractNFTTransfers: function () {
  1008. var _getContractNFTTransfers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28() {
  1009. var options,
  1010. _args28 = arguments;
  1011. return _regenerator.default.wrap(function (_context29) {
  1012. while (1) {
  1013. switch (_context29.prev = _context29.next) {
  1014. case 0:
  1015. options = _args28.length > 0 && _args28[0] !== undefined ? _args28[0] : {};
  1016. return _context29.abrupt("return", Web3Api.fetch({
  1017. endpoint: {
  1018. "method": "GET",
  1019. "group": "token",
  1020. "name": "getContractNFTTransfers",
  1021. "url": "/nft/:address/transfers"
  1022. },
  1023. params: options
  1024. }));
  1025. case 2:
  1026. case "end":
  1027. return _context29.stop();
  1028. }
  1029. }
  1030. }, _callee28);
  1031. }));
  1032. return function () {
  1033. return _getContractNFTTransfers.apply(this, arguments);
  1034. };
  1035. }(),
  1036. getNFTOwners: function () {
  1037. var _getNFTOwners = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  1038. var options,
  1039. _args29 = arguments;
  1040. return _regenerator.default.wrap(function (_context30) {
  1041. while (1) {
  1042. switch (_context30.prev = _context30.next) {
  1043. case 0:
  1044. options = _args29.length > 0 && _args29[0] !== undefined ? _args29[0] : {};
  1045. return _context30.abrupt("return", Web3Api.fetch({
  1046. endpoint: {
  1047. "method": "GET",
  1048. "group": "token",
  1049. "name": "getNFTOwners",
  1050. "url": "/nft/:address/owners"
  1051. },
  1052. params: options
  1053. }));
  1054. case 2:
  1055. case "end":
  1056. return _context30.stop();
  1057. }
  1058. }
  1059. }, _callee29);
  1060. }));
  1061. return function () {
  1062. return _getNFTOwners.apply(this, arguments);
  1063. };
  1064. }(),
  1065. getNFTMetadata: function () {
  1066. var _getNFTMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30() {
  1067. var options,
  1068. _args30 = arguments;
  1069. return _regenerator.default.wrap(function (_context31) {
  1070. while (1) {
  1071. switch (_context31.prev = _context31.next) {
  1072. case 0:
  1073. options = _args30.length > 0 && _args30[0] !== undefined ? _args30[0] : {};
  1074. return _context31.abrupt("return", Web3Api.fetch({
  1075. endpoint: {
  1076. "method": "GET",
  1077. "group": "token",
  1078. "name": "getNFTMetadata",
  1079. "url": "/nft/:address/metadata"
  1080. },
  1081. params: options
  1082. }));
  1083. case 2:
  1084. case "end":
  1085. return _context31.stop();
  1086. }
  1087. }
  1088. }, _callee30);
  1089. }));
  1090. return function () {
  1091. return _getNFTMetadata.apply(this, arguments);
  1092. };
  1093. }(),
  1094. reSyncMetadata: function () {
  1095. var _reSyncMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
  1096. var options,
  1097. _args31 = arguments;
  1098. return _regenerator.default.wrap(function (_context32) {
  1099. while (1) {
  1100. switch (_context32.prev = _context32.next) {
  1101. case 0:
  1102. options = _args31.length > 0 && _args31[0] !== undefined ? _args31[0] : {};
  1103. return _context32.abrupt("return", Web3Api.fetch({
  1104. endpoint: {
  1105. "method": "GET",
  1106. "group": "token",
  1107. "name": "reSyncMetadata",
  1108. "url": "/nft/:address/:token_id/metadata/resync"
  1109. },
  1110. params: options
  1111. }));
  1112. case 2:
  1113. case "end":
  1114. return _context32.stop();
  1115. }
  1116. }
  1117. }, _callee31);
  1118. }));
  1119. return function () {
  1120. return _reSyncMetadata.apply(this, arguments);
  1121. };
  1122. }(),
  1123. syncNFTContract: function () {
  1124. var _syncNFTContract = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32() {
  1125. var options,
  1126. _args32 = arguments;
  1127. return _regenerator.default.wrap(function (_context33) {
  1128. while (1) {
  1129. switch (_context33.prev = _context33.next) {
  1130. case 0:
  1131. options = _args32.length > 0 && _args32[0] !== undefined ? _args32[0] : {};
  1132. return _context33.abrupt("return", Web3Api.fetch({
  1133. endpoint: {
  1134. "method": "PUT",
  1135. "group": "token",
  1136. "name": "syncNFTContract",
  1137. "url": "/nft/:address/sync"
  1138. },
  1139. params: options
  1140. }));
  1141. case 2:
  1142. case "end":
  1143. return _context33.stop();
  1144. }
  1145. }
  1146. }, _callee32);
  1147. }));
  1148. return function () {
  1149. return _syncNFTContract.apply(this, arguments);
  1150. };
  1151. }(),
  1152. getTokenIdMetadata: function () {
  1153. var _getTokenIdMetadata = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
  1154. var options,
  1155. _args33 = arguments;
  1156. return _regenerator.default.wrap(function (_context34) {
  1157. while (1) {
  1158. switch (_context34.prev = _context34.next) {
  1159. case 0:
  1160. options = _args33.length > 0 && _args33[0] !== undefined ? _args33[0] : {};
  1161. return _context34.abrupt("return", Web3Api.fetch({
  1162. endpoint: {
  1163. "method": "GET",
  1164. "group": "token",
  1165. "name": "getTokenIdMetadata",
  1166. "url": "/nft/:address/:token_id"
  1167. },
  1168. params: options
  1169. }));
  1170. case 2:
  1171. case "end":
  1172. return _context34.stop();
  1173. }
  1174. }
  1175. }, _callee33);
  1176. }));
  1177. return function () {
  1178. return _getTokenIdMetadata.apply(this, arguments);
  1179. };
  1180. }(),
  1181. getTokenIdOwners: function () {
  1182. var _getTokenIdOwners = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34() {
  1183. var options,
  1184. _args34 = arguments;
  1185. return _regenerator.default.wrap(function (_context35) {
  1186. while (1) {
  1187. switch (_context35.prev = _context35.next) {
  1188. case 0:
  1189. options = _args34.length > 0 && _args34[0] !== undefined ? _args34[0] : {};
  1190. return _context35.abrupt("return", Web3Api.fetch({
  1191. endpoint: {
  1192. "method": "GET",
  1193. "group": "token",
  1194. "name": "getTokenIdOwners",
  1195. "url": "/nft/:address/:token_id/owners"
  1196. },
  1197. params: options
  1198. }));
  1199. case 2:
  1200. case "end":
  1201. return _context35.stop();
  1202. }
  1203. }
  1204. }, _callee34);
  1205. }));
  1206. return function () {
  1207. return _getTokenIdOwners.apply(this, arguments);
  1208. };
  1209. }(),
  1210. getWalletTokenIdTransfers: function () {
  1211. var _getWalletTokenIdTransfers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35() {
  1212. var options,
  1213. _args35 = arguments;
  1214. return _regenerator.default.wrap(function (_context36) {
  1215. while (1) {
  1216. switch (_context36.prev = _context36.next) {
  1217. case 0:
  1218. options = _args35.length > 0 && _args35[0] !== undefined ? _args35[0] : {};
  1219. return _context36.abrupt("return", Web3Api.fetch({
  1220. endpoint: {
  1221. "method": "GET",
  1222. "group": "token",
  1223. "name": "getWalletTokenIdTransfers",
  1224. "url": "/nft/:address/:token_id/transfers"
  1225. },
  1226. params: options
  1227. }));
  1228. case 2:
  1229. case "end":
  1230. return _context36.stop();
  1231. }
  1232. }
  1233. }, _callee35);
  1234. }));
  1235. return function () {
  1236. return _getWalletTokenIdTransfers.apply(this, arguments);
  1237. };
  1238. }()
  1239. });
  1240. (0, _defineProperty2.default)(Web3Api, "resolve", {
  1241. resolveDomain: function () {
  1242. var _resolveDomain = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  1243. var options,
  1244. _args36 = arguments;
  1245. return _regenerator.default.wrap(function (_context37) {
  1246. while (1) {
  1247. switch (_context37.prev = _context37.next) {
  1248. case 0:
  1249. options = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {};
  1250. return _context37.abrupt("return", Web3Api.fetch({
  1251. endpoint: {
  1252. "method": "GET",
  1253. "group": "resolve",
  1254. "name": "resolveDomain",
  1255. "url": "/resolve/:domain"
  1256. },
  1257. params: options
  1258. }));
  1259. case 2:
  1260. case "end":
  1261. return _context37.stop();
  1262. }
  1263. }
  1264. }, _callee36);
  1265. }));
  1266. return function () {
  1267. return _resolveDomain.apply(this, arguments);
  1268. };
  1269. }(),
  1270. resolveAddress: function () {
  1271. var _resolveAddress = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  1272. var options,
  1273. _args37 = arguments;
  1274. return _regenerator.default.wrap(function (_context38) {
  1275. while (1) {
  1276. switch (_context38.prev = _context38.next) {
  1277. case 0:
  1278. options = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {};
  1279. return _context38.abrupt("return", Web3Api.fetch({
  1280. endpoint: {
  1281. "method": "GET",
  1282. "group": "resolve",
  1283. "name": "resolveAddress",
  1284. "url": "/resolve/:address/reverse"
  1285. },
  1286. params: options
  1287. }));
  1288. case 2:
  1289. case "end":
  1290. return _context38.stop();
  1291. }
  1292. }
  1293. }, _callee37);
  1294. }));
  1295. return function () {
  1296. return _resolveAddress.apply(this, arguments);
  1297. };
  1298. }()
  1299. });
  1300. (0, _defineProperty2.default)(Web3Api, "defi", {
  1301. getPairReserves: function () {
  1302. var _getPairReserves = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  1303. var options,
  1304. _args38 = arguments;
  1305. return _regenerator.default.wrap(function (_context39) {
  1306. while (1) {
  1307. switch (_context39.prev = _context39.next) {
  1308. case 0:
  1309. options = _args38.length > 0 && _args38[0] !== undefined ? _args38[0] : {};
  1310. return _context39.abrupt("return", Web3Api.fetch({
  1311. endpoint: {
  1312. "method": "GET",
  1313. "group": "defi",
  1314. "name": "getPairReserves",
  1315. "url": "/:pair_address/reserves"
  1316. },
  1317. params: options
  1318. }));
  1319. case 2:
  1320. case "end":
  1321. return _context39.stop();
  1322. }
  1323. }
  1324. }, _callee38);
  1325. }));
  1326. return function () {
  1327. return _getPairReserves.apply(this, arguments);
  1328. };
  1329. }(),
  1330. getPairAddress: function () {
  1331. var _getPairAddress = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  1332. var options,
  1333. _args39 = arguments;
  1334. return _regenerator.default.wrap(function (_context40) {
  1335. while (1) {
  1336. switch (_context40.prev = _context40.next) {
  1337. case 0:
  1338. options = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : {};
  1339. return _context40.abrupt("return", Web3Api.fetch({
  1340. endpoint: {
  1341. "method": "GET",
  1342. "group": "defi",
  1343. "name": "getPairAddress",
  1344. "url": "/:token0_address/:token1_address/pairAddress"
  1345. },
  1346. params: options
  1347. }));
  1348. case 2:
  1349. case "end":
  1350. return _context40.stop();
  1351. }
  1352. }
  1353. }, _callee39);
  1354. }));
  1355. return function () {
  1356. return _getPairAddress.apply(this, arguments);
  1357. };
  1358. }()
  1359. });
  1360. (0, _defineProperty2.default)(Web3Api, "storage", {
  1361. uploadFolder: function () {
  1362. var _uploadFolder = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  1363. var options,
  1364. _args40 = arguments;
  1365. return _regenerator.default.wrap(function (_context41) {
  1366. while (1) {
  1367. switch (_context41.prev = _context41.next) {
  1368. case 0:
  1369. options = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : {};
  1370. return _context41.abrupt("return", Web3Api.fetch({
  1371. endpoint: {
  1372. "method": "POST",
  1373. "group": "storage",
  1374. "name": "uploadFolder",
  1375. "url": "/ipfs/uploadFolder",
  1376. "bodyParams": [{
  1377. "key": "data",
  1378. "type": "set body",
  1379. "required": false
  1380. }]
  1381. },
  1382. params: options
  1383. }));
  1384. case 2:
  1385. case "end":
  1386. return _context41.stop();
  1387. }
  1388. }
  1389. }, _callee40);
  1390. }));
  1391. return function () {
  1392. return _uploadFolder.apply(this, arguments);
  1393. };
  1394. }()
  1395. });
  1396. (0, _defineProperty2.default)(Web3Api, "info", {
  1397. web3ApiVersion: function () {
  1398. var _web3ApiVersion = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  1399. var options,
  1400. _args41 = arguments;
  1401. return _regenerator.default.wrap(function (_context42) {
  1402. while (1) {
  1403. switch (_context42.prev = _context42.next) {
  1404. case 0:
  1405. options = _args41.length > 0 && _args41[0] !== undefined ? _args41[0] : {};
  1406. return _context42.abrupt("return", Web3Api.fetch({
  1407. endpoint: {
  1408. "method": "GET",
  1409. "group": "info",
  1410. "name": "web3ApiVersion",
  1411. "url": "/web3/version"
  1412. },
  1413. params: options
  1414. }));
  1415. case 2:
  1416. case "end":
  1417. return _context42.stop();
  1418. }
  1419. }
  1420. }, _callee41);
  1421. }));
  1422. return function () {
  1423. return _web3ApiVersion.apply(this, arguments);
  1424. };
  1425. }(),
  1426. endpointWeights: function () {
  1427. var _endpointWeights = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  1428. var options,
  1429. _args42 = arguments;
  1430. return _regenerator.default.wrap(function (_context43) {
  1431. while (1) {
  1432. switch (_context43.prev = _context43.next) {
  1433. case 0:
  1434. options = _args42.length > 0 && _args42[0] !== undefined ? _args42[0] : {};
  1435. return _context43.abrupt("return", Web3Api.fetch({
  1436. endpoint: {
  1437. "method": "GET",
  1438. "group": "info",
  1439. "name": "endpointWeights",
  1440. "url": "/info/endpointWeights"
  1441. },
  1442. params: options
  1443. }));
  1444. case 2:
  1445. case "end":
  1446. return _context43.stop();
  1447. }
  1448. }
  1449. }, _callee42);
  1450. }));
  1451. return function () {
  1452. return _endpointWeights.apply(this, arguments);
  1453. };
  1454. }()
  1455. });
  1456. var _default = Web3Api;
  1457. exports.default = _default;
  1458. },{"@babel/runtime-corejs3/core-js-stable/instance/filter":2,"@babel/runtime-corejs3/core-js-stable/instance/for-each":3,"@babel/runtime-corejs3/core-js-stable/instance/includes":4,"@babel/runtime-corejs3/core-js-stable/json/stringify":5,"@babel/runtime-corejs3/core-js-stable/object/define-properties":6,"@babel/runtime-corejs3/core-js-stable/object/define-property":7,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor":8,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors":9,"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols":10,"@babel/runtime-corejs3/core-js-stable/object/keys":11,"@babel/runtime-corejs3/helpers/asyncToGenerator":14,"@babel/runtime-corejs3/helpers/classCallCheck":15,"@babel/runtime-corejs3/helpers/createClass":16,"@babel/runtime-corejs3/helpers/defineProperty":17,"@babel/runtime-corejs3/helpers/interopRequireDefault":18,"@babel/runtime-corejs3/regenerator":19,"axios":20}],2:[function(_dereq_,module,exports){
  1459. module.exports = _dereq_("core-js-pure/stable/instance/filter");
  1460. },{"core-js-pure/stable/instance/filter":225}],3:[function(_dereq_,module,exports){
  1461. module.exports = _dereq_("core-js-pure/stable/instance/for-each");
  1462. },{"core-js-pure/stable/instance/for-each":226}],4:[function(_dereq_,module,exports){
  1463. module.exports = _dereq_("core-js-pure/stable/instance/includes");
  1464. },{"core-js-pure/stable/instance/includes":227}],5:[function(_dereq_,module,exports){
  1465. module.exports = _dereq_("core-js-pure/stable/json/stringify");
  1466. },{"core-js-pure/stable/json/stringify":228}],6:[function(_dereq_,module,exports){
  1467. module.exports = _dereq_("core-js-pure/stable/object/define-properties");
  1468. },{"core-js-pure/stable/object/define-properties":229}],7:[function(_dereq_,module,exports){
  1469. module.exports = _dereq_("core-js-pure/stable/object/define-property");
  1470. },{"core-js-pure/stable/object/define-property":230}],8:[function(_dereq_,module,exports){
  1471. module.exports = _dereq_("core-js-pure/stable/object/get-own-property-descriptor");
  1472. },{"core-js-pure/stable/object/get-own-property-descriptor":231}],9:[function(_dereq_,module,exports){
  1473. module.exports = _dereq_("core-js-pure/stable/object/get-own-property-descriptors");
  1474. },{"core-js-pure/stable/object/get-own-property-descriptors":232}],10:[function(_dereq_,module,exports){
  1475. module.exports = _dereq_("core-js-pure/stable/object/get-own-property-symbols");
  1476. },{"core-js-pure/stable/object/get-own-property-symbols":233}],11:[function(_dereq_,module,exports){
  1477. module.exports = _dereq_("core-js-pure/stable/object/keys");
  1478. },{"core-js-pure/stable/object/keys":234}],12:[function(_dereq_,module,exports){
  1479. module.exports = _dereq_("core-js-pure/features/object/define-property");
  1480. },{"core-js-pure/features/object/define-property":67}],13:[function(_dereq_,module,exports){
  1481. module.exports = _dereq_("core-js-pure/features/promise");
  1482. },{"core-js-pure/features/promise":68}],14:[function(_dereq_,module,exports){
  1483. var _Promise = _dereq_("@babel/runtime-corejs3/core-js/promise");
  1484. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  1485. try {
  1486. var info = gen[key](arg);
  1487. var value = info.value;
  1488. } catch (error) {
  1489. reject(error);
  1490. return;
  1491. }
  1492. if (info.done) {
  1493. resolve(value);
  1494. } else {
  1495. _Promise.resolve(value).then(_next, _throw);
  1496. }
  1497. }
  1498. function _asyncToGenerator(fn) {
  1499. return function () {
  1500. var self = this,
  1501. args = arguments;
  1502. return new _Promise(function (resolve, reject) {
  1503. var gen = fn.apply(self, args);
  1504. function _next(value) {
  1505. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  1506. }
  1507. function _throw(err) {
  1508. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  1509. }
  1510. _next(undefined);
  1511. });
  1512. };
  1513. }
  1514. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1515. },{"@babel/runtime-corejs3/core-js/promise":13}],15:[function(_dereq_,module,exports){
  1516. function _classCallCheck(instance, Constructor) {
  1517. if (!(instance instanceof Constructor)) {
  1518. throw new TypeError("Cannot call a class as a function");
  1519. }
  1520. }
  1521. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1522. },{}],16:[function(_dereq_,module,exports){
  1523. var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js/object/define-property");
  1524. function _defineProperties(target, props) {
  1525. for (var i = 0; i < props.length; i++) {
  1526. var descriptor = props[i];
  1527. descriptor.enumerable = descriptor.enumerable || false;
  1528. descriptor.configurable = true;
  1529. if ("value" in descriptor) descriptor.writable = true;
  1530. _Object$defineProperty(target, descriptor.key, descriptor);
  1531. }
  1532. }
  1533. function _createClass(Constructor, protoProps, staticProps) {
  1534. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  1535. if (staticProps) _defineProperties(Constructor, staticProps);
  1536. _Object$defineProperty(Constructor, "prototype", {
  1537. writable: false
  1538. });
  1539. return Constructor;
  1540. }
  1541. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1542. },{"@babel/runtime-corejs3/core-js/object/define-property":12}],17:[function(_dereq_,module,exports){
  1543. var _Object$defineProperty = _dereq_("@babel/runtime-corejs3/core-js/object/define-property");
  1544. function _defineProperty(obj, key, value) {
  1545. if (key in obj) {
  1546. _Object$defineProperty(obj, key, {
  1547. value: value,
  1548. enumerable: true,
  1549. configurable: true,
  1550. writable: true
  1551. });
  1552. } else {
  1553. obj[key] = value;
  1554. }
  1555. return obj;
  1556. }
  1557. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1558. },{"@babel/runtime-corejs3/core-js/object/define-property":12}],18:[function(_dereq_,module,exports){
  1559. function _interopRequireDefault(obj) {
  1560. return obj && obj.__esModule ? obj : {
  1561. "default": obj
  1562. };
  1563. }
  1564. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  1565. },{}],19:[function(_dereq_,module,exports){
  1566. module.exports = _dereq_("regenerator-runtime");
  1567. },{"regenerator-runtime":236}],20:[function(_dereq_,module,exports){
  1568. module.exports = _dereq_('./lib/axios');
  1569. },{"./lib/axios":22}],21:[function(_dereq_,module,exports){
  1570. 'use strict';
  1571. var utils = _dereq_('./../utils');
  1572. var settle = _dereq_('./../core/settle');
  1573. var cookies = _dereq_('./../helpers/cookies');
  1574. var buildURL = _dereq_('./../helpers/buildURL');
  1575. var buildFullPath = _dereq_('../core/buildFullPath');
  1576. var parseHeaders = _dereq_('./../helpers/parseHeaders');
  1577. var isURLSameOrigin = _dereq_('./../helpers/isURLSameOrigin');
  1578. var createError = _dereq_('../core/createError');
  1579. var transitionalDefaults = _dereq_('../defaults/transitional');
  1580. var Cancel = _dereq_('../cancel/Cancel');
  1581. module.exports = function xhrAdapter(config) {
  1582. return new Promise(function dispatchXhrRequest(resolve, reject) {
  1583. var requestData = config.data;
  1584. var requestHeaders = config.headers;
  1585. var responseType = config.responseType;
  1586. var onCanceled;
  1587. function done() {
  1588. if (config.cancelToken) {
  1589. config.cancelToken.unsubscribe(onCanceled);
  1590. }
  1591. if (config.signal) {
  1592. config.signal.removeEventListener('abort', onCanceled);
  1593. }
  1594. }
  1595. if (utils.isFormData(requestData)) {
  1596. delete requestHeaders['Content-Type']; // Let the browser set it
  1597. }
  1598. var request = new XMLHttpRequest();
  1599. // HTTP basic authentication
  1600. if (config.auth) {
  1601. var username = config.auth.username || '';
  1602. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  1603. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  1604. }
  1605. var fullPath = buildFullPath(config.baseURL, config.url);
  1606. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  1607. // Set the request timeout in MS
  1608. request.timeout = config.timeout;
  1609. function onloadend() {
  1610. if (!request) {
  1611. return;
  1612. }
  1613. // Prepare the response
  1614. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  1615. var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
  1616. request.responseText : request.response;
  1617. var response = {
  1618. data: responseData,
  1619. status: request.status,
  1620. statusText: request.statusText,
  1621. headers: responseHeaders,
  1622. config: config,
  1623. request: request
  1624. };
  1625. settle(function _resolve(value) {
  1626. resolve(value);
  1627. done();
  1628. }, function _reject(err) {
  1629. reject(err);
  1630. done();
  1631. }, response);
  1632. // Clean up request
  1633. request = null;
  1634. }
  1635. if ('onloadend' in request) {
  1636. // Use onloadend if available
  1637. request.onloadend = onloadend;
  1638. } else {
  1639. // Listen for ready state to emulate onloadend
  1640. request.onreadystatechange = function handleLoad() {
  1641. if (!request || request.readyState !== 4) {
  1642. return;
  1643. }
  1644. // The request errored out and we didn't get a response, this will be
  1645. // handled by onerror instead
  1646. // With one exception: request that using file: protocol, most browsers
  1647. // will return status as 0 even though it's a successful request
  1648. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  1649. return;
  1650. }
  1651. // readystate handler is calling before onerror or ontimeout handlers,
  1652. // so we should call onloadend on the next 'tick'
  1653. setTimeout(onloadend);
  1654. };
  1655. }
  1656. // Handle browser request cancellation (as opposed to a manual cancellation)
  1657. request.onabort = function handleAbort() {
  1658. if (!request) {
  1659. return;
  1660. }
  1661. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  1662. // Clean up request
  1663. request = null;
  1664. };
  1665. // Handle low level network errors
  1666. request.onerror = function handleError() {
  1667. // Real errors are hidden from us by the browser
  1668. // onerror should only fire if it's a network error
  1669. reject(createError('Network Error', config, null, request));
  1670. // Clean up request
  1671. request = null;
  1672. };
  1673. // Handle timeout
  1674. request.ontimeout = function handleTimeout() {
  1675. var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
  1676. var transitional = config.transitional || transitionalDefaults;
  1677. if (config.timeoutErrorMessage) {
  1678. timeoutErrorMessage = config.timeoutErrorMessage;
  1679. }
  1680. reject(createError(
  1681. timeoutErrorMessage,
  1682. config,
  1683. transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
  1684. request));
  1685. // Clean up request
  1686. request = null;
  1687. };
  1688. // Add xsrf header
  1689. // This is only done if running in a standard browser environment.
  1690. // Specifically not if we're in a web worker, or react-native.
  1691. if (utils.isStandardBrowserEnv()) {
  1692. // Add xsrf header
  1693. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  1694. cookies.read(config.xsrfCookieName) :
  1695. undefined;
  1696. if (xsrfValue) {
  1697. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  1698. }
  1699. }
  1700. // Add headers to the request
  1701. if ('setRequestHeader' in request) {
  1702. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  1703. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  1704. // Remove Content-Type if data is undefined
  1705. delete requestHeaders[key];
  1706. } else {
  1707. // Otherwise add header to the request
  1708. request.setRequestHeader(key, val);
  1709. }
  1710. });
  1711. }
  1712. // Add withCredentials to request if needed
  1713. if (!utils.isUndefined(config.withCredentials)) {
  1714. request.withCredentials = !!config.withCredentials;
  1715. }
  1716. // Add responseType to request if needed
  1717. if (responseType && responseType !== 'json') {
  1718. request.responseType = config.responseType;
  1719. }
  1720. // Handle progress if needed
  1721. if (typeof config.onDownloadProgress === 'function') {
  1722. request.addEventListener('progress', config.onDownloadProgress);
  1723. }
  1724. // Not all browsers support upload events
  1725. if (typeof config.onUploadProgress === 'function' && request.upload) {
  1726. request.upload.addEventListener('progress', config.onUploadProgress);
  1727. }
  1728. if (config.cancelToken || config.signal) {
  1729. // Handle cancellation
  1730. // eslint-disable-next-line func-names
  1731. onCanceled = function(cancel) {
  1732. if (!request) {
  1733. return;
  1734. }
  1735. reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);
  1736. request.abort();
  1737. request = null;
  1738. };
  1739. config.cancelToken && config.cancelToken.subscribe(onCanceled);
  1740. if (config.signal) {
  1741. config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
  1742. }
  1743. }
  1744. if (!requestData) {
  1745. requestData = null;
  1746. }
  1747. // Send the request
  1748. request.send(requestData);
  1749. });
  1750. };
  1751. },{"../cancel/Cancel":23,"../core/buildFullPath":28,"../core/createError":29,"../defaults/transitional":36,"./../core/settle":33,"./../helpers/buildURL":39,"./../helpers/cookies":41,"./../helpers/isURLSameOrigin":44,"./../helpers/parseHeaders":46,"./../utils":49}],22:[function(_dereq_,module,exports){
  1752. 'use strict';
  1753. var utils = _dereq_('./utils');
  1754. var bind = _dereq_('./helpers/bind');
  1755. var Axios = _dereq_('./core/Axios');
  1756. var mergeConfig = _dereq_('./core/mergeConfig');
  1757. var defaults = _dereq_('./defaults');
  1758. /**
  1759. * Create an instance of Axios
  1760. *
  1761. * @param {Object} defaultConfig The default config for the instance
  1762. * @return {Axios} A new instance of Axios
  1763. */
  1764. function createInstance(defaultConfig) {
  1765. var context = new Axios(defaultConfig);
  1766. var instance = bind(Axios.prototype.request, context);
  1767. // Copy axios.prototype to instance
  1768. utils.extend(instance, Axios.prototype, context);
  1769. // Copy context to instance
  1770. utils.extend(instance, context);
  1771. // Factory for creating new instances
  1772. instance.create = function create(instanceConfig) {
  1773. return createInstance(mergeConfig(defaultConfig, instanceConfig));
  1774. };
  1775. return instance;
  1776. }
  1777. // Create the default instance to be exported
  1778. var axios = createInstance(defaults);
  1779. // Expose Axios class to allow class inheritance
  1780. axios.Axios = Axios;
  1781. // Expose Cancel & CancelToken
  1782. axios.Cancel = _dereq_('./cancel/Cancel');
  1783. axios.CancelToken = _dereq_('./cancel/CancelToken');
  1784. axios.isCancel = _dereq_('./cancel/isCancel');
  1785. axios.VERSION = _dereq_('./env/data').version;
  1786. // Expose all/spread
  1787. axios.all = function all(promises) {
  1788. return Promise.all(promises);
  1789. };
  1790. axios.spread = _dereq_('./helpers/spread');
  1791. // Expose isAxiosError
  1792. axios.isAxiosError = _dereq_('./helpers/isAxiosError');
  1793. module.exports = axios;
  1794. // Allow use of default import syntax in TypeScript
  1795. module.exports.default = axios;
  1796. },{"./cancel/Cancel":23,"./cancel/CancelToken":24,"./cancel/isCancel":25,"./core/Axios":26,"./core/mergeConfig":32,"./defaults":35,"./env/data":37,"./helpers/bind":38,"./helpers/isAxiosError":43,"./helpers/spread":47,"./utils":49}],23:[function(_dereq_,module,exports){
  1797. 'use strict';
  1798. /**
  1799. * A `Cancel` is an object that is thrown when an operation is canceled.
  1800. *
  1801. * @class
  1802. * @param {string=} message The message.
  1803. */
  1804. function Cancel(message) {
  1805. this.message = message;
  1806. }
  1807. Cancel.prototype.toString = function toString() {
  1808. return 'Cancel' + (this.message ? ': ' + this.message : '');
  1809. };
  1810. Cancel.prototype.__CANCEL__ = true;
  1811. module.exports = Cancel;
  1812. },{}],24:[function(_dereq_,module,exports){
  1813. 'use strict';
  1814. var Cancel = _dereq_('./Cancel');
  1815. /**
  1816. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  1817. *
  1818. * @class
  1819. * @param {Function} executor The executor function.
  1820. */
  1821. function CancelToken(executor) {
  1822. if (typeof executor !== 'function') {
  1823. throw new TypeError('executor must be a function.');
  1824. }
  1825. var resolvePromise;
  1826. this.promise = new Promise(function promiseExecutor(resolve) {
  1827. resolvePromise = resolve;
  1828. });
  1829. var token = this;
  1830. // eslint-disable-next-line func-names
  1831. this.promise.then(function(cancel) {
  1832. if (!token._listeners) return;
  1833. var i;
  1834. var l = token._listeners.length;
  1835. for (i = 0; i < l; i++) {
  1836. token._listeners[i](cancel);
  1837. }
  1838. token._listeners = null;
  1839. });
  1840. // eslint-disable-next-line func-names
  1841. this.promise.then = function(onfulfilled) {
  1842. var _resolve;
  1843. // eslint-disable-next-line func-names
  1844. var promise = new Promise(function(resolve) {
  1845. token.subscribe(resolve);
  1846. _resolve = resolve;
  1847. }).then(onfulfilled);
  1848. promise.cancel = function reject() {
  1849. token.unsubscribe(_resolve);
  1850. };
  1851. return promise;
  1852. };
  1853. executor(function cancel(message) {
  1854. if (token.reason) {
  1855. // Cancellation has already been requested
  1856. return;
  1857. }
  1858. token.reason = new Cancel(message);
  1859. resolvePromise(token.reason);
  1860. });
  1861. }
  1862. /**
  1863. * Throws a `Cancel` if cancellation has been requested.
  1864. */
  1865. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  1866. if (this.reason) {
  1867. throw this.reason;
  1868. }
  1869. };
  1870. /**
  1871. * Subscribe to the cancel signal
  1872. */
  1873. CancelToken.prototype.subscribe = function subscribe(listener) {
  1874. if (this.reason) {
  1875. listener(this.reason);
  1876. return;
  1877. }
  1878. if (this._listeners) {
  1879. this._listeners.push(listener);
  1880. } else {
  1881. this._listeners = [listener];
  1882. }
  1883. };
  1884. /**
  1885. * Unsubscribe from the cancel signal
  1886. */
  1887. CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
  1888. if (!this._listeners) {
  1889. return;
  1890. }
  1891. var index = this._listeners.indexOf(listener);
  1892. if (index !== -1) {
  1893. this._listeners.splice(index, 1);
  1894. }
  1895. };
  1896. /**
  1897. * Returns an object that contains a new `CancelToken` and a function that, when called,
  1898. * cancels the `CancelToken`.
  1899. */
  1900. CancelToken.source = function source() {
  1901. var cancel;
  1902. var token = new CancelToken(function executor(c) {
  1903. cancel = c;
  1904. });
  1905. return {
  1906. token: token,
  1907. cancel: cancel
  1908. };
  1909. };
  1910. module.exports = CancelToken;
  1911. },{"./Cancel":23}],25:[function(_dereq_,module,exports){
  1912. 'use strict';
  1913. module.exports = function isCancel(value) {
  1914. return !!(value && value.__CANCEL__);
  1915. };
  1916. },{}],26:[function(_dereq_,module,exports){
  1917. 'use strict';
  1918. var utils = _dereq_('./../utils');
  1919. var buildURL = _dereq_('../helpers/buildURL');
  1920. var InterceptorManager = _dereq_('./InterceptorManager');
  1921. var dispatchRequest = _dereq_('./dispatchRequest');
  1922. var mergeConfig = _dereq_('./mergeConfig');
  1923. var validator = _dereq_('../helpers/validator');
  1924. var validators = validator.validators;
  1925. /**
  1926. * Create a new instance of Axios
  1927. *
  1928. * @param {Object} instanceConfig The default config for the instance
  1929. */
  1930. function Axios(instanceConfig) {
  1931. this.defaults = instanceConfig;
  1932. this.interceptors = {
  1933. request: new InterceptorManager(),
  1934. response: new InterceptorManager()
  1935. };
  1936. }
  1937. /**
  1938. * Dispatch a request
  1939. *
  1940. * @param {Object} config The config specific for this request (merged with this.defaults)
  1941. */
  1942. Axios.prototype.request = function request(configOrUrl, config) {
  1943. /*eslint no-param-reassign:0*/
  1944. // Allow for axios('example/url'[, config]) a la fetch API
  1945. if (typeof configOrUrl === 'string') {
  1946. config = config || {};
  1947. config.url = configOrUrl;
  1948. } else {
  1949. config = configOrUrl || {};
  1950. }
  1951. config = mergeConfig(this.defaults, config);
  1952. // Set config.method
  1953. if (config.method) {
  1954. config.method = config.method.toLowerCase();
  1955. } else if (this.defaults.method) {
  1956. config.method = this.defaults.method.toLowerCase();
  1957. } else {
  1958. config.method = 'get';
  1959. }
  1960. var transitional = config.transitional;
  1961. if (transitional !== undefined) {
  1962. validator.assertOptions(transitional, {
  1963. silentJSONParsing: validators.transitional(validators.boolean),
  1964. forcedJSONParsing: validators.transitional(validators.boolean),
  1965. clarifyTimeoutError: validators.transitional(validators.boolean)
  1966. }, false);
  1967. }
  1968. // filter out skipped interceptors
  1969. var requestInterceptorChain = [];
  1970. var synchronousRequestInterceptors = true;
  1971. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1972. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  1973. return;
  1974. }
  1975. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  1976. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  1977. });
  1978. var responseInterceptorChain = [];
  1979. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1980. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  1981. });
  1982. var promise;
  1983. if (!synchronousRequestInterceptors) {
  1984. var chain = [dispatchRequest, undefined];
  1985. Array.prototype.unshift.apply(chain, requestInterceptorChain);
  1986. chain = chain.concat(responseInterceptorChain);
  1987. promise = Promise.resolve(config);
  1988. while (chain.length) {
  1989. promise = promise.then(chain.shift(), chain.shift());
  1990. }
  1991. return promise;
  1992. }
  1993. var newConfig = config;
  1994. while (requestInterceptorChain.length) {
  1995. var onFulfilled = requestInterceptorChain.shift();
  1996. var onRejected = requestInterceptorChain.shift();
  1997. try {
  1998. newConfig = onFulfilled(newConfig);
  1999. } catch (error) {
  2000. onRejected(error);
  2001. break;
  2002. }
  2003. }
  2004. try {
  2005. promise = dispatchRequest(newConfig);
  2006. } catch (error) {
  2007. return Promise.reject(error);
  2008. }
  2009. while (responseInterceptorChain.length) {
  2010. promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  2011. }
  2012. return promise;
  2013. };
  2014. Axios.prototype.getUri = function getUri(config) {
  2015. config = mergeConfig(this.defaults, config);
  2016. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  2017. };
  2018. // Provide aliases for supported request methods
  2019. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  2020. /*eslint func-names:0*/
  2021. Axios.prototype[method] = function(url, config) {
  2022. return this.request(mergeConfig(config || {}, {
  2023. method: method,
  2024. url: url,
  2025. data: (config || {}).data
  2026. }));
  2027. };
  2028. });
  2029. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  2030. /*eslint func-names:0*/
  2031. Axios.prototype[method] = function(url, data, config) {
  2032. return this.request(mergeConfig(config || {}, {
  2033. method: method,
  2034. url: url,
  2035. data: data
  2036. }));
  2037. };
  2038. });
  2039. module.exports = Axios;
  2040. },{"../helpers/buildURL":39,"../helpers/validator":48,"./../utils":49,"./InterceptorManager":27,"./dispatchRequest":30,"./mergeConfig":32}],27:[function(_dereq_,module,exports){
  2041. 'use strict';
  2042. var utils = _dereq_('./../utils');
  2043. function InterceptorManager() {
  2044. this.handlers = [];
  2045. }
  2046. /**
  2047. * Add a new interceptor to the stack
  2048. *
  2049. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  2050. * @param {Function} rejected The function to handle `reject` for a `Promise`
  2051. *
  2052. * @return {Number} An ID used to remove interceptor later
  2053. */
  2054. InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
  2055. this.handlers.push({
  2056. fulfilled: fulfilled,
  2057. rejected: rejected,
  2058. synchronous: options ? options.synchronous : false,
  2059. runWhen: options ? options.runWhen : null
  2060. });
  2061. return this.handlers.length - 1;
  2062. };
  2063. /**
  2064. * Remove an interceptor from the stack
  2065. *
  2066. * @param {Number} id The ID that was returned by `use`
  2067. */
  2068. InterceptorManager.prototype.eject = function eject(id) {
  2069. if (this.handlers[id]) {
  2070. this.handlers[id] = null;
  2071. }
  2072. };
  2073. /**
  2074. * Iterate over all the registered interceptors
  2075. *
  2076. * This method is particularly useful for skipping over any
  2077. * interceptors that may have become `null` calling `eject`.
  2078. *
  2079. * @param {Function} fn The function to call for each interceptor
  2080. */
  2081. InterceptorManager.prototype.forEach = function forEach(fn) {
  2082. utils.forEach(this.handlers, function forEachHandler(h) {
  2083. if (h !== null) {
  2084. fn(h);
  2085. }
  2086. });
  2087. };
  2088. module.exports = InterceptorManager;
  2089. },{"./../utils":49}],28:[function(_dereq_,module,exports){
  2090. 'use strict';
  2091. var isAbsoluteURL = _dereq_('../helpers/isAbsoluteURL');
  2092. var combineURLs = _dereq_('../helpers/combineURLs');
  2093. /**
  2094. * Creates a new URL by combining the baseURL with the requestedURL,
  2095. * only when the requestedURL is not already an absolute URL.
  2096. * If the requestURL is absolute, this function returns the requestedURL untouched.
  2097. *
  2098. * @param {string} baseURL The base URL
  2099. * @param {string} requestedURL Absolute or relative URL to combine
  2100. * @returns {string} The combined full path
  2101. */
  2102. module.exports = function buildFullPath(baseURL, requestedURL) {
  2103. if (baseURL && !isAbsoluteURL(requestedURL)) {
  2104. return combineURLs(baseURL, requestedURL);
  2105. }
  2106. return requestedURL;
  2107. };
  2108. },{"../helpers/combineURLs":40,"../helpers/isAbsoluteURL":42}],29:[function(_dereq_,module,exports){
  2109. 'use strict';
  2110. var enhanceError = _dereq_('./enhanceError');
  2111. /**
  2112. * Create an Error with the specified message, config, error code, request and response.
  2113. *
  2114. * @param {string} message The error message.
  2115. * @param {Object} config The config.
  2116. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  2117. * @param {Object} [request] The request.
  2118. * @param {Object} [response] The response.
  2119. * @returns {Error} The created error.
  2120. */
  2121. module.exports = function createError(message, config, code, request, response) {
  2122. var error = new Error(message);
  2123. return enhanceError(error, config, code, request, response);
  2124. };
  2125. },{"./enhanceError":31}],30:[function(_dereq_,module,exports){
  2126. 'use strict';
  2127. var utils = _dereq_('./../utils');
  2128. var transformData = _dereq_('./transformData');
  2129. var isCancel = _dereq_('../cancel/isCancel');
  2130. var defaults = _dereq_('../defaults');
  2131. var Cancel = _dereq_('../cancel/Cancel');
  2132. /**
  2133. * Throws a `Cancel` if cancellation has been requested.
  2134. */
  2135. function throwIfCancellationRequested(config) {
  2136. if (config.cancelToken) {
  2137. config.cancelToken.throwIfRequested();
  2138. }
  2139. if (config.signal && config.signal.aborted) {
  2140. throw new Cancel('canceled');
  2141. }
  2142. }
  2143. /**
  2144. * Dispatch a request to the server using the configured adapter.
  2145. *
  2146. * @param {object} config The config that is to be used for the request
  2147. * @returns {Promise} The Promise to be fulfilled
  2148. */
  2149. module.exports = function dispatchRequest(config) {
  2150. throwIfCancellationRequested(config);
  2151. // Ensure headers exist
  2152. config.headers = config.headers || {};
  2153. // Transform request data
  2154. config.data = transformData.call(
  2155. config,
  2156. config.data,
  2157. config.headers,
  2158. config.transformRequest
  2159. );
  2160. // Flatten headers
  2161. config.headers = utils.merge(
  2162. config.headers.common || {},
  2163. config.headers[config.method] || {},
  2164. config.headers
  2165. );
  2166. utils.forEach(
  2167. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  2168. function cleanHeaderConfig(method) {
  2169. delete config.headers[method];
  2170. }
  2171. );
  2172. var adapter = config.adapter || defaults.adapter;
  2173. return adapter(config).then(function onAdapterResolution(response) {
  2174. throwIfCancellationRequested(config);
  2175. // Transform response data
  2176. response.data = transformData.call(
  2177. config,
  2178. response.data,
  2179. response.headers,
  2180. config.transformResponse
  2181. );
  2182. return response;
  2183. }, function onAdapterRejection(reason) {
  2184. if (!isCancel(reason)) {
  2185. throwIfCancellationRequested(config);
  2186. // Transform response data
  2187. if (reason && reason.response) {
  2188. reason.response.data = transformData.call(
  2189. config,
  2190. reason.response.data,
  2191. reason.response.headers,
  2192. config.transformResponse
  2193. );
  2194. }
  2195. }
  2196. return Promise.reject(reason);
  2197. });
  2198. };
  2199. },{"../cancel/Cancel":23,"../cancel/isCancel":25,"../defaults":35,"./../utils":49,"./transformData":34}],31:[function(_dereq_,module,exports){
  2200. 'use strict';
  2201. /**
  2202. * Update an Error with the specified config, error code, and response.
  2203. *
  2204. * @param {Error} error The error to update.
  2205. * @param {Object} config The config.
  2206. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  2207. * @param {Object} [request] The request.
  2208. * @param {Object} [response] The response.
  2209. * @returns {Error} The error.
  2210. */
  2211. module.exports = function enhanceError(error, config, code, request, response) {
  2212. error.config = config;
  2213. if (code) {
  2214. error.code = code;
  2215. }
  2216. error.request = request;
  2217. error.response = response;
  2218. error.isAxiosError = true;
  2219. error.toJSON = function toJSON() {
  2220. return {
  2221. // Standard
  2222. message: this.message,
  2223. name: this.name,
  2224. // Microsoft
  2225. description: this.description,
  2226. number: this.number,
  2227. // Mozilla
  2228. fileName: this.fileName,
  2229. lineNumber: this.lineNumber,
  2230. columnNumber: this.columnNumber,
  2231. stack: this.stack,
  2232. // Axios
  2233. config: this.config,
  2234. code: this.code,
  2235. status: this.response && this.response.status ? this.response.status : null
  2236. };
  2237. };
  2238. return error;
  2239. };
  2240. },{}],32:[function(_dereq_,module,exports){
  2241. 'use strict';
  2242. var utils = _dereq_('../utils');
  2243. /**
  2244. * Config-specific merge-function which creates a new config-object
  2245. * by merging two configuration objects together.
  2246. *
  2247. * @param {Object} config1
  2248. * @param {Object} config2
  2249. * @returns {Object} New object resulting from merging config2 to config1
  2250. */
  2251. module.exports = function mergeConfig(config1, config2) {
  2252. // eslint-disable-next-line no-param-reassign
  2253. config2 = config2 || {};
  2254. var config = {};
  2255. function getMergedValue(target, source) {
  2256. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  2257. return utils.merge(target, source);
  2258. } else if (utils.isPlainObject(source)) {
  2259. return utils.merge({}, source);
  2260. } else if (utils.isArray(source)) {
  2261. return source.slice();
  2262. }
  2263. return source;
  2264. }
  2265. // eslint-disable-next-line consistent-return
  2266. function mergeDeepProperties(prop) {
  2267. if (!utils.isUndefined(config2[prop])) {
  2268. return getMergedValue(config1[prop], config2[prop]);
  2269. } else if (!utils.isUndefined(config1[prop])) {
  2270. return getMergedValue(undefined, config1[prop]);
  2271. }
  2272. }
  2273. // eslint-disable-next-line consistent-return
  2274. function valueFromConfig2(prop) {
  2275. if (!utils.isUndefined(config2[prop])) {
  2276. return getMergedValue(undefined, config2[prop]);
  2277. }
  2278. }
  2279. // eslint-disable-next-line consistent-return
  2280. function defaultToConfig2(prop) {
  2281. if (!utils.isUndefined(config2[prop])) {
  2282. return getMergedValue(undefined, config2[prop]);
  2283. } else if (!utils.isUndefined(config1[prop])) {
  2284. return getMergedValue(undefined, config1[prop]);
  2285. }
  2286. }
  2287. // eslint-disable-next-line consistent-return
  2288. function mergeDirectKeys(prop) {
  2289. if (prop in config2) {
  2290. return getMergedValue(config1[prop], config2[prop]);
  2291. } else if (prop in config1) {
  2292. return getMergedValue(undefined, config1[prop]);
  2293. }
  2294. }
  2295. var mergeMap = {
  2296. 'url': valueFromConfig2,
  2297. 'method': valueFromConfig2,
  2298. 'data': valueFromConfig2,
  2299. 'baseURL': defaultToConfig2,
  2300. 'transformRequest': defaultToConfig2,
  2301. 'transformResponse': defaultToConfig2,
  2302. 'paramsSerializer': defaultToConfig2,
  2303. 'timeout': defaultToConfig2,
  2304. 'timeoutMessage': defaultToConfig2,
  2305. 'withCredentials': defaultToConfig2,
  2306. 'adapter': defaultToConfig2,
  2307. 'responseType': defaultToConfig2,
  2308. 'xsrfCookieName': defaultToConfig2,
  2309. 'xsrfHeaderName': defaultToConfig2,
  2310. 'onUploadProgress': defaultToConfig2,
  2311. 'onDownloadProgress': defaultToConfig2,
  2312. 'decompress': defaultToConfig2,
  2313. 'maxContentLength': defaultToConfig2,
  2314. 'maxBodyLength': defaultToConfig2,
  2315. 'transport': defaultToConfig2,
  2316. 'httpAgent': defaultToConfig2,
  2317. 'httpsAgent': defaultToConfig2,
  2318. 'cancelToken': defaultToConfig2,
  2319. 'socketPath': defaultToConfig2,
  2320. 'responseEncoding': defaultToConfig2,
  2321. 'validateStatus': mergeDirectKeys
  2322. };
  2323. utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
  2324. var merge = mergeMap[prop] || mergeDeepProperties;
  2325. var configValue = merge(prop);
  2326. (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
  2327. });
  2328. return config;
  2329. };
  2330. },{"../utils":49}],33:[function(_dereq_,module,exports){
  2331. 'use strict';
  2332. var createError = _dereq_('./createError');
  2333. /**
  2334. * Resolve or reject a Promise based on response status.
  2335. *
  2336. * @param {Function} resolve A function that resolves the promise.
  2337. * @param {Function} reject A function that rejects the promise.
  2338. * @param {object} response The response.
  2339. */
  2340. module.exports = function settle(resolve, reject, response) {
  2341. var validateStatus = response.config.validateStatus;
  2342. if (!response.status || !validateStatus || validateStatus(response.status)) {
  2343. resolve(response);
  2344. } else {
  2345. reject(createError(
  2346. 'Request failed with status code ' + response.status,
  2347. response.config,
  2348. null,
  2349. response.request,
  2350. response
  2351. ));
  2352. }
  2353. };
  2354. },{"./createError":29}],34:[function(_dereq_,module,exports){
  2355. 'use strict';
  2356. var utils = _dereq_('./../utils');
  2357. var defaults = _dereq_('../defaults');
  2358. /**
  2359. * Transform the data for a request or a response
  2360. *
  2361. * @param {Object|String} data The data to be transformed
  2362. * @param {Array} headers The headers for the request or response
  2363. * @param {Array|Function} fns A single function or Array of functions
  2364. * @returns {*} The resulting transformed data
  2365. */
  2366. module.exports = function transformData(data, headers, fns) {
  2367. var context = this || defaults;
  2368. /*eslint no-param-reassign:0*/
  2369. utils.forEach(fns, function transform(fn) {
  2370. data = fn.call(context, data, headers);
  2371. });
  2372. return data;
  2373. };
  2374. },{"../defaults":35,"./../utils":49}],35:[function(_dereq_,module,exports){
  2375. (function (process){(function (){
  2376. 'use strict';
  2377. var utils = _dereq_('../utils');
  2378. var normalizeHeaderName = _dereq_('../helpers/normalizeHeaderName');
  2379. var enhanceError = _dereq_('../core/enhanceError');
  2380. var transitionalDefaults = _dereq_('./transitional');
  2381. var DEFAULT_CONTENT_TYPE = {
  2382. 'Content-Type': 'application/x-www-form-urlencoded'
  2383. };
  2384. function setContentTypeIfUnset(headers, value) {
  2385. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  2386. headers['Content-Type'] = value;
  2387. }
  2388. }
  2389. function getDefaultAdapter() {
  2390. var adapter;
  2391. if (typeof XMLHttpRequest !== 'undefined') {
  2392. // For browsers use XHR adapter
  2393. adapter = _dereq_('../adapters/xhr');
  2394. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  2395. // For node use HTTP adapter
  2396. adapter = _dereq_('../adapters/http');
  2397. }
  2398. return adapter;
  2399. }
  2400. function stringifySafely(rawValue, parser, encoder) {
  2401. if (utils.isString(rawValue)) {
  2402. try {
  2403. (parser || JSON.parse)(rawValue);
  2404. return utils.trim(rawValue);
  2405. } catch (e) {
  2406. if (e.name !== 'SyntaxError') {
  2407. throw e;
  2408. }
  2409. }
  2410. }
  2411. return (encoder || JSON.stringify)(rawValue);
  2412. }
  2413. var defaults = {
  2414. transitional: transitionalDefaults,
  2415. adapter: getDefaultAdapter(),
  2416. transformRequest: [function transformRequest(data, headers) {
  2417. normalizeHeaderName(headers, 'Accept');
  2418. normalizeHeaderName(headers, 'Content-Type');
  2419. if (utils.isFormData(data) ||
  2420. utils.isArrayBuffer(data) ||
  2421. utils.isBuffer(data) ||
  2422. utils.isStream(data) ||
  2423. utils.isFile(data) ||
  2424. utils.isBlob(data)
  2425. ) {
  2426. return data;
  2427. }
  2428. if (utils.isArrayBufferView(data)) {
  2429. return data.buffer;
  2430. }
  2431. if (utils.isURLSearchParams(data)) {
  2432. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  2433. return data.toString();
  2434. }
  2435. if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
  2436. setContentTypeIfUnset(headers, 'application/json');
  2437. return stringifySafely(data);
  2438. }
  2439. return data;
  2440. }],
  2441. transformResponse: [function transformResponse(data) {
  2442. var transitional = this.transitional || defaults.transitional;
  2443. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  2444. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  2445. var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
  2446. if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
  2447. try {
  2448. return JSON.parse(data);
  2449. } catch (e) {
  2450. if (strictJSONParsing) {
  2451. if (e.name === 'SyntaxError') {
  2452. throw enhanceError(e, this, 'E_JSON_PARSE');
  2453. }
  2454. throw e;
  2455. }
  2456. }
  2457. }
  2458. return data;
  2459. }],
  2460. /**
  2461. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  2462. * timeout is not created.
  2463. */
  2464. timeout: 0,
  2465. xsrfCookieName: 'XSRF-TOKEN',
  2466. xsrfHeaderName: 'X-XSRF-TOKEN',
  2467. maxContentLength: -1,
  2468. maxBodyLength: -1,
  2469. validateStatus: function validateStatus(status) {
  2470. return status >= 200 && status < 300;
  2471. },
  2472. headers: {
  2473. common: {
  2474. 'Accept': 'application/json, text/plain, */*'
  2475. }
  2476. }
  2477. };
  2478. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  2479. defaults.headers[method] = {};
  2480. });
  2481. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  2482. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  2483. });
  2484. module.exports = defaults;
  2485. }).call(this)}).call(this,_dereq_('_process'))
  2486. },{"../adapters/http":21,"../adapters/xhr":21,"../core/enhanceError":31,"../helpers/normalizeHeaderName":45,"../utils":49,"./transitional":36,"_process":50}],36:[function(_dereq_,module,exports){
  2487. 'use strict';
  2488. module.exports = {
  2489. silentJSONParsing: true,
  2490. forcedJSONParsing: true,
  2491. clarifyTimeoutError: false
  2492. };
  2493. },{}],37:[function(_dereq_,module,exports){
  2494. module.exports = {
  2495. "version": "0.26.1"
  2496. };
  2497. },{}],38:[function(_dereq_,module,exports){
  2498. 'use strict';
  2499. module.exports = function bind(fn, thisArg) {
  2500. return function wrap() {
  2501. var args = new Array(arguments.length);
  2502. for (var i = 0; i < args.length; i++) {
  2503. args[i] = arguments[i];
  2504. }
  2505. return fn.apply(thisArg, args);
  2506. };
  2507. };
  2508. },{}],39:[function(_dereq_,module,exports){
  2509. 'use strict';
  2510. var utils = _dereq_('./../utils');
  2511. function encode(val) {
  2512. return encodeURIComponent(val).
  2513. replace(/%3A/gi, ':').
  2514. replace(/%24/g, '$').
  2515. replace(/%2C/gi, ',').
  2516. replace(/%20/g, '+').
  2517. replace(/%5B/gi, '[').
  2518. replace(/%5D/gi, ']');
  2519. }
  2520. /**
  2521. * Build a URL by appending params to the end
  2522. *
  2523. * @param {string} url The base of the url (e.g., http://www.google.com)
  2524. * @param {object} [params] The params to be appended
  2525. * @returns {string} The formatted url
  2526. */
  2527. module.exports = function buildURL(url, params, paramsSerializer) {
  2528. /*eslint no-param-reassign:0*/
  2529. if (!params) {
  2530. return url;
  2531. }
  2532. var serializedParams;
  2533. if (paramsSerializer) {
  2534. serializedParams = paramsSerializer(params);
  2535. } else if (utils.isURLSearchParams(params)) {
  2536. serializedParams = params.toString();
  2537. } else {
  2538. var parts = [];
  2539. utils.forEach(params, function serialize(val, key) {
  2540. if (val === null || typeof val === 'undefined') {
  2541. return;
  2542. }
  2543. if (utils.isArray(val)) {
  2544. key = key + '[]';
  2545. } else {
  2546. val = [val];
  2547. }
  2548. utils.forEach(val, function parseValue(v) {
  2549. if (utils.isDate(v)) {
  2550. v = v.toISOString();
  2551. } else if (utils.isObject(v)) {
  2552. v = JSON.stringify(v);
  2553. }
  2554. parts.push(encode(key) + '=' + encode(v));
  2555. });
  2556. });
  2557. serializedParams = parts.join('&');
  2558. }
  2559. if (serializedParams) {
  2560. var hashmarkIndex = url.indexOf('#');
  2561. if (hashmarkIndex !== -1) {
  2562. url = url.slice(0, hashmarkIndex);
  2563. }
  2564. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  2565. }
  2566. return url;
  2567. };
  2568. },{"./../utils":49}],40:[function(_dereq_,module,exports){
  2569. 'use strict';
  2570. /**
  2571. * Creates a new URL by combining the specified URLs
  2572. *
  2573. * @param {string} baseURL The base URL
  2574. * @param {string} relativeURL The relative URL
  2575. * @returns {string} The combined URL
  2576. */
  2577. module.exports = function combineURLs(baseURL, relativeURL) {
  2578. return relativeURL
  2579. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  2580. : baseURL;
  2581. };
  2582. },{}],41:[function(_dereq_,module,exports){
  2583. 'use strict';
  2584. var utils = _dereq_('./../utils');
  2585. module.exports = (
  2586. utils.isStandardBrowserEnv() ?
  2587. // Standard browser envs support document.cookie
  2588. (function standardBrowserEnv() {
  2589. return {
  2590. write: function write(name, value, expires, path, domain, secure) {
  2591. var cookie = [];
  2592. cookie.push(name + '=' + encodeURIComponent(value));
  2593. if (utils.isNumber(expires)) {
  2594. cookie.push('expires=' + new Date(expires).toGMTString());
  2595. }
  2596. if (utils.isString(path)) {
  2597. cookie.push('path=' + path);
  2598. }
  2599. if (utils.isString(domain)) {
  2600. cookie.push('domain=' + domain);
  2601. }
  2602. if (secure === true) {
  2603. cookie.push('secure');
  2604. }
  2605. document.cookie = cookie.join('; ');
  2606. },
  2607. read: function read(name) {
  2608. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  2609. return (match ? decodeURIComponent(match[3]) : null);
  2610. },
  2611. remove: function remove(name) {
  2612. this.write(name, '', Date.now() - 86400000);
  2613. }
  2614. };
  2615. })() :
  2616. // Non standard browser env (web workers, react-native) lack needed support.
  2617. (function nonStandardBrowserEnv() {
  2618. return {
  2619. write: function write() {},
  2620. read: function read() { return null; },
  2621. remove: function remove() {}
  2622. };
  2623. })()
  2624. );
  2625. },{"./../utils":49}],42:[function(_dereq_,module,exports){
  2626. 'use strict';
  2627. /**
  2628. * Determines whether the specified URL is absolute
  2629. *
  2630. * @param {string} url The URL to test
  2631. * @returns {boolean} True if the specified URL is absolute, otherwise false
  2632. */
  2633. module.exports = function isAbsoluteURL(url) {
  2634. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  2635. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  2636. // by any combination of letters, digits, plus, period, or hyphen.
  2637. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  2638. };
  2639. },{}],43:[function(_dereq_,module,exports){
  2640. 'use strict';
  2641. var utils = _dereq_('./../utils');
  2642. /**
  2643. * Determines whether the payload is an error thrown by Axios
  2644. *
  2645. * @param {*} payload The value to test
  2646. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  2647. */
  2648. module.exports = function isAxiosError(payload) {
  2649. return utils.isObject(payload) && (payload.isAxiosError === true);
  2650. };
  2651. },{"./../utils":49}],44:[function(_dereq_,module,exports){
  2652. 'use strict';
  2653. var utils = _dereq_('./../utils');
  2654. module.exports = (
  2655. utils.isStandardBrowserEnv() ?
  2656. // Standard browser envs have full support of the APIs needed to test
  2657. // whether the request URL is of the same origin as current location.
  2658. (function standardBrowserEnv() {
  2659. var msie = /(msie|trident)/i.test(navigator.userAgent);
  2660. var urlParsingNode = document.createElement('a');
  2661. var originURL;
  2662. /**
  2663. * Parse a URL to discover it's components
  2664. *
  2665. * @param {String} url The URL to be parsed
  2666. * @returns {Object}
  2667. */
  2668. function resolveURL(url) {
  2669. var href = url;
  2670. if (msie) {
  2671. // IE needs attribute set twice to normalize properties
  2672. urlParsingNode.setAttribute('href', href);
  2673. href = urlParsingNode.href;
  2674. }
  2675. urlParsingNode.setAttribute('href', href);
  2676. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  2677. return {
  2678. href: urlParsingNode.href,
  2679. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  2680. host: urlParsingNode.host,
  2681. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  2682. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  2683. hostname: urlParsingNode.hostname,
  2684. port: urlParsingNode.port,
  2685. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  2686. urlParsingNode.pathname :
  2687. '/' + urlParsingNode.pathname
  2688. };
  2689. }
  2690. originURL = resolveURL(window.location.href);
  2691. /**
  2692. * Determine if a URL shares the same origin as the current location
  2693. *
  2694. * @param {String} requestURL The URL to test
  2695. * @returns {boolean} True if URL shares the same origin, otherwise false
  2696. */
  2697. return function isURLSameOrigin(requestURL) {
  2698. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  2699. return (parsed.protocol === originURL.protocol &&
  2700. parsed.host === originURL.host);
  2701. };
  2702. })() :
  2703. // Non standard browser envs (web workers, react-native) lack needed support.
  2704. (function nonStandardBrowserEnv() {
  2705. return function isURLSameOrigin() {
  2706. return true;
  2707. };
  2708. })()
  2709. );
  2710. },{"./../utils":49}],45:[function(_dereq_,module,exports){
  2711. 'use strict';
  2712. var utils = _dereq_('../utils');
  2713. module.exports = function normalizeHeaderName(headers, normalizedName) {
  2714. utils.forEach(headers, function processHeader(value, name) {
  2715. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  2716. headers[normalizedName] = value;
  2717. delete headers[name];
  2718. }
  2719. });
  2720. };
  2721. },{"../utils":49}],46:[function(_dereq_,module,exports){
  2722. 'use strict';
  2723. var utils = _dereq_('./../utils');
  2724. // Headers whose duplicates are ignored by node
  2725. // c.f. https://nodejs.org/api/http.html#http_message_headers
  2726. var ignoreDuplicateOf = [
  2727. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  2728. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  2729. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  2730. 'referer', 'retry-after', 'user-agent'
  2731. ];
  2732. /**
  2733. * Parse headers into an object
  2734. *
  2735. * ```
  2736. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  2737. * Content-Type: application/json
  2738. * Connection: keep-alive
  2739. * Transfer-Encoding: chunked
  2740. * ```
  2741. *
  2742. * @param {String} headers Headers needing to be parsed
  2743. * @returns {Object} Headers parsed into an object
  2744. */
  2745. module.exports = function parseHeaders(headers) {
  2746. var parsed = {};
  2747. var key;
  2748. var val;
  2749. var i;
  2750. if (!headers) { return parsed; }
  2751. utils.forEach(headers.split('\n'), function parser(line) {
  2752. i = line.indexOf(':');
  2753. key = utils.trim(line.substr(0, i)).toLowerCase();
  2754. val = utils.trim(line.substr(i + 1));
  2755. if (key) {
  2756. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  2757. return;
  2758. }
  2759. if (key === 'set-cookie') {
  2760. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  2761. } else {
  2762. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  2763. }
  2764. }
  2765. });
  2766. return parsed;
  2767. };
  2768. },{"./../utils":49}],47:[function(_dereq_,module,exports){
  2769. 'use strict';
  2770. /**
  2771. * Syntactic sugar for invoking a function and expanding an array for arguments.
  2772. *
  2773. * Common use case would be to use `Function.prototype.apply`.
  2774. *
  2775. * ```js
  2776. * function f(x, y, z) {}
  2777. * var args = [1, 2, 3];
  2778. * f.apply(null, args);
  2779. * ```
  2780. *
  2781. * With `spread` this example can be re-written.
  2782. *
  2783. * ```js
  2784. * spread(function(x, y, z) {})([1, 2, 3]);
  2785. * ```
  2786. *
  2787. * @param {Function} callback
  2788. * @returns {Function}
  2789. */
  2790. module.exports = function spread(callback) {
  2791. return function wrap(arr) {
  2792. return callback.apply(null, arr);
  2793. };
  2794. };
  2795. },{}],48:[function(_dereq_,module,exports){
  2796. 'use strict';
  2797. var VERSION = _dereq_('../env/data').version;
  2798. var validators = {};
  2799. // eslint-disable-next-line func-names
  2800. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
  2801. validators[type] = function validator(thing) {
  2802. return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  2803. };
  2804. });
  2805. var deprecatedWarnings = {};
  2806. /**
  2807. * Transitional option validator
  2808. * @param {function|boolean?} validator - set to false if the transitional option has been removed
  2809. * @param {string?} version - deprecated version / removed since version
  2810. * @param {string?} message - some message with additional info
  2811. * @returns {function}
  2812. */
  2813. validators.transitional = function transitional(validator, version, message) {
  2814. function formatMessage(opt, desc) {
  2815. return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  2816. }
  2817. // eslint-disable-next-line func-names
  2818. return function(value, opt, opts) {
  2819. if (validator === false) {
  2820. throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
  2821. }
  2822. if (version && !deprecatedWarnings[opt]) {
  2823. deprecatedWarnings[opt] = true;
  2824. // eslint-disable-next-line no-console
  2825. console.warn(
  2826. formatMessage(
  2827. opt,
  2828. ' has been deprecated since v' + version + ' and will be removed in the near future'
  2829. )
  2830. );
  2831. }
  2832. return validator ? validator(value, opt, opts) : true;
  2833. };
  2834. };
  2835. /**
  2836. * Assert object's properties type
  2837. * @param {object} options
  2838. * @param {object} schema
  2839. * @param {boolean?} allowUnknown
  2840. */
  2841. function assertOptions(options, schema, allowUnknown) {
  2842. if (typeof options !== 'object') {
  2843. throw new TypeError('options must be an object');
  2844. }
  2845. var keys = Object.keys(options);
  2846. var i = keys.length;
  2847. while (i-- > 0) {
  2848. var opt = keys[i];
  2849. var validator = schema[opt];
  2850. if (validator) {
  2851. var value = options[opt];
  2852. var result = value === undefined || validator(value, opt, options);
  2853. if (result !== true) {
  2854. throw new TypeError('option ' + opt + ' must be ' + result);
  2855. }
  2856. continue;
  2857. }
  2858. if (allowUnknown !== true) {
  2859. throw Error('Unknown option ' + opt);
  2860. }
  2861. }
  2862. }
  2863. module.exports = {
  2864. assertOptions: assertOptions,
  2865. validators: validators
  2866. };
  2867. },{"../env/data":37}],49:[function(_dereq_,module,exports){
  2868. 'use strict';
  2869. var bind = _dereq_('./helpers/bind');
  2870. // utils is a library of generic helper functions non-specific to axios
  2871. var toString = Object.prototype.toString;
  2872. /**
  2873. * Determine if a value is an Array
  2874. *
  2875. * @param {Object} val The value to test
  2876. * @returns {boolean} True if value is an Array, otherwise false
  2877. */
  2878. function isArray(val) {
  2879. return Array.isArray(val);
  2880. }
  2881. /**
  2882. * Determine if a value is undefined
  2883. *
  2884. * @param {Object} val The value to test
  2885. * @returns {boolean} True if the value is undefined, otherwise false
  2886. */
  2887. function isUndefined(val) {
  2888. return typeof val === 'undefined';
  2889. }
  2890. /**
  2891. * Determine if a value is a Buffer
  2892. *
  2893. * @param {Object} val The value to test
  2894. * @returns {boolean} True if value is a Buffer, otherwise false
  2895. */
  2896. function isBuffer(val) {
  2897. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  2898. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  2899. }
  2900. /**
  2901. * Determine if a value is an ArrayBuffer
  2902. *
  2903. * @param {Object} val The value to test
  2904. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  2905. */
  2906. function isArrayBuffer(val) {
  2907. return toString.call(val) === '[object ArrayBuffer]';
  2908. }
  2909. /**
  2910. * Determine if a value is a FormData
  2911. *
  2912. * @param {Object} val The value to test
  2913. * @returns {boolean} True if value is an FormData, otherwise false
  2914. */
  2915. function isFormData(val) {
  2916. return toString.call(val) === '[object FormData]';
  2917. }
  2918. /**
  2919. * Determine if a value is a view on an ArrayBuffer
  2920. *
  2921. * @param {Object} val The value to test
  2922. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  2923. */
  2924. function isArrayBufferView(val) {
  2925. var result;
  2926. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  2927. result = ArrayBuffer.isView(val);
  2928. } else {
  2929. result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
  2930. }
  2931. return result;
  2932. }
  2933. /**
  2934. * Determine if a value is a String
  2935. *
  2936. * @param {Object} val The value to test
  2937. * @returns {boolean} True if value is a String, otherwise false
  2938. */
  2939. function isString(val) {
  2940. return typeof val === 'string';
  2941. }
  2942. /**
  2943. * Determine if a value is a Number
  2944. *
  2945. * @param {Object} val The value to test
  2946. * @returns {boolean} True if value is a Number, otherwise false
  2947. */
  2948. function isNumber(val) {
  2949. return typeof val === 'number';
  2950. }
  2951. /**
  2952. * Determine if a value is an Object
  2953. *
  2954. * @param {Object} val The value to test
  2955. * @returns {boolean} True if value is an Object, otherwise false
  2956. */
  2957. function isObject(val) {
  2958. return val !== null && typeof val === 'object';
  2959. }
  2960. /**
  2961. * Determine if a value is a plain Object
  2962. *
  2963. * @param {Object} val The value to test
  2964. * @return {boolean} True if value is a plain Object, otherwise false
  2965. */
  2966. function isPlainObject(val) {
  2967. if (toString.call(val) !== '[object Object]') {
  2968. return false;
  2969. }
  2970. var prototype = Object.getPrototypeOf(val);
  2971. return prototype === null || prototype === Object.prototype;
  2972. }
  2973. /**
  2974. * Determine if a value is a Date
  2975. *
  2976. * @param {Object} val The value to test
  2977. * @returns {boolean} True if value is a Date, otherwise false
  2978. */
  2979. function isDate(val) {
  2980. return toString.call(val) === '[object Date]';
  2981. }
  2982. /**
  2983. * Determine if a value is a File
  2984. *
  2985. * @param {Object} val The value to test
  2986. * @returns {boolean} True if value is a File, otherwise false
  2987. */
  2988. function isFile(val) {
  2989. return toString.call(val) === '[object File]';
  2990. }
  2991. /**
  2992. * Determine if a value is a Blob
  2993. *
  2994. * @param {Object} val The value to test
  2995. * @returns {boolean} True if value is a Blob, otherwise false
  2996. */
  2997. function isBlob(val) {
  2998. return toString.call(val) === '[object Blob]';
  2999. }
  3000. /**
  3001. * Determine if a value is a Function
  3002. *
  3003. * @param {Object} val The value to test
  3004. * @returns {boolean} True if value is a Function, otherwise false
  3005. */
  3006. function isFunction(val) {
  3007. return toString.call(val) === '[object Function]';
  3008. }
  3009. /**
  3010. * Determine if a value is a Stream
  3011. *
  3012. * @param {Object} val The value to test
  3013. * @returns {boolean} True if value is a Stream, otherwise false
  3014. */
  3015. function isStream(val) {
  3016. return isObject(val) && isFunction(val.pipe);
  3017. }
  3018. /**
  3019. * Determine if a value is a URLSearchParams object
  3020. *
  3021. * @param {Object} val The value to test
  3022. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  3023. */
  3024. function isURLSearchParams(val) {
  3025. return toString.call(val) === '[object URLSearchParams]';
  3026. }
  3027. /**
  3028. * Trim excess whitespace off the beginning and end of a string
  3029. *
  3030. * @param {String} str The String to trim
  3031. * @returns {String} The String freed of excess whitespace
  3032. */
  3033. function trim(str) {
  3034. return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
  3035. }
  3036. /**
  3037. * Determine if we're running in a standard browser environment
  3038. *
  3039. * This allows axios to run in a web worker, and react-native.
  3040. * Both environments support XMLHttpRequest, but not fully standard globals.
  3041. *
  3042. * web workers:
  3043. * typeof window -> undefined
  3044. * typeof document -> undefined
  3045. *
  3046. * react-native:
  3047. * navigator.product -> 'ReactNative'
  3048. * nativescript
  3049. * navigator.product -> 'NativeScript' or 'NS'
  3050. */
  3051. function isStandardBrowserEnv() {
  3052. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  3053. navigator.product === 'NativeScript' ||
  3054. navigator.product === 'NS')) {
  3055. return false;
  3056. }
  3057. return (
  3058. typeof window !== 'undefined' &&
  3059. typeof document !== 'undefined'
  3060. );
  3061. }
  3062. /**
  3063. * Iterate over an Array or an Object invoking a function for each item.
  3064. *
  3065. * If `obj` is an Array callback will be called passing
  3066. * the value, index, and complete array for each item.
  3067. *
  3068. * If 'obj' is an Object callback will be called passing
  3069. * the value, key, and complete object for each property.
  3070. *
  3071. * @param {Object|Array} obj The object to iterate
  3072. * @param {Function} fn The callback to invoke for each item
  3073. */
  3074. function forEach(obj, fn) {
  3075. // Don't bother if no value provided
  3076. if (obj === null || typeof obj === 'undefined') {
  3077. return;
  3078. }
  3079. // Force an array if not already something iterable
  3080. if (typeof obj !== 'object') {
  3081. /*eslint no-param-reassign:0*/
  3082. obj = [obj];
  3083. }
  3084. if (isArray(obj)) {
  3085. // Iterate over array values
  3086. for (var i = 0, l = obj.length; i < l; i++) {
  3087. fn.call(null, obj[i], i, obj);
  3088. }
  3089. } else {
  3090. // Iterate over object keys
  3091. for (var key in obj) {
  3092. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  3093. fn.call(null, obj[key], key, obj);
  3094. }
  3095. }
  3096. }
  3097. }
  3098. /**
  3099. * Accepts varargs expecting each argument to be an object, then
  3100. * immutably merges the properties of each object and returns result.
  3101. *
  3102. * When multiple objects contain the same key the later object in
  3103. * the arguments list will take precedence.
  3104. *
  3105. * Example:
  3106. *
  3107. * ```js
  3108. * var result = merge({foo: 123}, {foo: 456});
  3109. * console.log(result.foo); // outputs 456
  3110. * ```
  3111. *
  3112. * @param {Object} obj1 Object to merge
  3113. * @returns {Object} Result of all merge properties
  3114. */
  3115. function merge(/* obj1, obj2, obj3, ... */) {
  3116. var result = {};
  3117. function assignValue(val, key) {
  3118. if (isPlainObject(result[key]) && isPlainObject(val)) {
  3119. result[key] = merge(result[key], val);
  3120. } else if (isPlainObject(val)) {
  3121. result[key] = merge({}, val);
  3122. } else if (isArray(val)) {
  3123. result[key] = val.slice();
  3124. } else {
  3125. result[key] = val;
  3126. }
  3127. }
  3128. for (var i = 0, l = arguments.length; i < l; i++) {
  3129. forEach(arguments[i], assignValue);
  3130. }
  3131. return result;
  3132. }
  3133. /**
  3134. * Extends object a by mutably adding to it the properties of object b.
  3135. *
  3136. * @param {Object} a The object to be extended
  3137. * @param {Object} b The object to copy properties from
  3138. * @param {Object} thisArg The object to bind function to
  3139. * @return {Object} The resulting value of object a
  3140. */
  3141. function extend(a, b, thisArg) {
  3142. forEach(b, function assignValue(val, key) {
  3143. if (thisArg && typeof val === 'function') {
  3144. a[key] = bind(val, thisArg);
  3145. } else {
  3146. a[key] = val;
  3147. }
  3148. });
  3149. return a;
  3150. }
  3151. /**
  3152. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  3153. *
  3154. * @param {string} content with BOM
  3155. * @return {string} content value without BOM
  3156. */
  3157. function stripBOM(content) {
  3158. if (content.charCodeAt(0) === 0xFEFF) {
  3159. content = content.slice(1);
  3160. }
  3161. return content;
  3162. }
  3163. module.exports = {
  3164. isArray: isArray,
  3165. isArrayBuffer: isArrayBuffer,
  3166. isBuffer: isBuffer,
  3167. isFormData: isFormData,
  3168. isArrayBufferView: isArrayBufferView,
  3169. isString: isString,
  3170. isNumber: isNumber,
  3171. isObject: isObject,
  3172. isPlainObject: isPlainObject,
  3173. isUndefined: isUndefined,
  3174. isDate: isDate,
  3175. isFile: isFile,
  3176. isBlob: isBlob,
  3177. isFunction: isFunction,
  3178. isStream: isStream,
  3179. isURLSearchParams: isURLSearchParams,
  3180. isStandardBrowserEnv: isStandardBrowserEnv,
  3181. forEach: forEach,
  3182. merge: merge,
  3183. extend: extend,
  3184. trim: trim,
  3185. stripBOM: stripBOM
  3186. };
  3187. },{"./helpers/bind":38}],50:[function(_dereq_,module,exports){
  3188. },{}],51:[function(_dereq_,module,exports){
  3189. var parent = _dereq_('../../stable/object/define-property');
  3190. module.exports = parent;
  3191. },{"../../stable/object/define-property":230}],52:[function(_dereq_,module,exports){
  3192. var parent = _dereq_('../../stable/promise');
  3193. module.exports = parent;
  3194. },{"../../stable/promise":235}],53:[function(_dereq_,module,exports){
  3195. _dereq_('../../../modules/es.array.filter');
  3196. var entryVirtual = _dereq_('../../../internals/entry-virtual');
  3197. module.exports = entryVirtual('Array').filter;
  3198. },{"../../../internals/entry-virtual":107,"../../../modules/es.array.filter":201}],54:[function(_dereq_,module,exports){
  3199. _dereq_('../../../modules/es.array.for-each');
  3200. var entryVirtual = _dereq_('../../../internals/entry-virtual');
  3201. module.exports = entryVirtual('Array').forEach;
  3202. },{"../../../internals/entry-virtual":107,"../../../modules/es.array.for-each":202}],55:[function(_dereq_,module,exports){
  3203. _dereq_('../../../modules/es.array.includes');
  3204. var entryVirtual = _dereq_('../../../internals/entry-virtual');
  3205. module.exports = entryVirtual('Array').includes;
  3206. },{"../../../internals/entry-virtual":107,"../../../modules/es.array.includes":203}],56:[function(_dereq_,module,exports){
  3207. var isPrototypeOf = _dereq_('../../internals/object-is-prototype-of');
  3208. var method = _dereq_('../array/virtual/filter');
  3209. var ArrayPrototype = Array.prototype;
  3210. module.exports = function (it) {
  3211. var own = it.filter;
  3212. return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.filter) ? method : own;
  3213. };
  3214. },{"../../internals/object-is-prototype-of":161,"../array/virtual/filter":53}],57:[function(_dereq_,module,exports){
  3215. var isPrototypeOf = _dereq_('../../internals/object-is-prototype-of');
  3216. var arrayMethod = _dereq_('../array/virtual/includes');
  3217. var stringMethod = _dereq_('../string/virtual/includes');
  3218. var ArrayPrototype = Array.prototype;
  3219. var StringPrototype = String.prototype;
  3220. module.exports = function (it) {
  3221. var own = it.includes;
  3222. if (it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.includes)) return arrayMethod;
  3223. if (typeof it == 'string' || it === StringPrototype || (isPrototypeOf(StringPrototype, it) && own === StringPrototype.includes)) {
  3224. return stringMethod;
  3225. } return own;
  3226. };
  3227. },{"../../internals/object-is-prototype-of":161,"../array/virtual/includes":55,"../string/virtual/includes":66}],58:[function(_dereq_,module,exports){
  3228. _dereq_('../../modules/es.json.stringify');
  3229. var path = _dereq_('../../internals/path');
  3230. var apply = _dereq_('../../internals/function-apply');
  3231. // eslint-disable-next-line es/no-json -- safe
  3232. if (!path.JSON) path.JSON = { stringify: JSON.stringify };
  3233. // eslint-disable-next-line no-unused-vars -- required for `.length`
  3234. module.exports = function stringify(it, replacer, space) {
  3235. return apply(path.JSON.stringify, null, arguments);
  3236. };
  3237. },{"../../internals/function-apply":112,"../../internals/path":169,"../../modules/es.json.stringify":205}],59:[function(_dereq_,module,exports){
  3238. _dereq_('../../modules/es.object.define-properties');
  3239. var path = _dereq_('../../internals/path');
  3240. var Object = path.Object;
  3241. var defineProperties = module.exports = function defineProperties(T, D) {
  3242. return Object.defineProperties(T, D);
  3243. };
  3244. if (Object.defineProperties.sham) defineProperties.sham = true;
  3245. },{"../../internals/path":169,"../../modules/es.object.define-properties":206}],60:[function(_dereq_,module,exports){
  3246. _dereq_('../../modules/es.object.define-property');
  3247. var path = _dereq_('../../internals/path');
  3248. var Object = path.Object;
  3249. var defineProperty = module.exports = function defineProperty(it, key, desc) {
  3250. return Object.defineProperty(it, key, desc);
  3251. };
  3252. if (Object.defineProperty.sham) defineProperty.sham = true;
  3253. },{"../../internals/path":169,"../../modules/es.object.define-property":207}],61:[function(_dereq_,module,exports){
  3254. _dereq_('../../modules/es.object.get-own-property-descriptor');
  3255. var path = _dereq_('../../internals/path');
  3256. var Object = path.Object;
  3257. var getOwnPropertyDescriptor = module.exports = function getOwnPropertyDescriptor(it, key) {
  3258. return Object.getOwnPropertyDescriptor(it, key);
  3259. };
  3260. if (Object.getOwnPropertyDescriptor.sham) getOwnPropertyDescriptor.sham = true;
  3261. },{"../../internals/path":169,"../../modules/es.object.get-own-property-descriptor":208}],62:[function(_dereq_,module,exports){
  3262. _dereq_('../../modules/es.object.get-own-property-descriptors');
  3263. var path = _dereq_('../../internals/path');
  3264. module.exports = path.Object.getOwnPropertyDescriptors;
  3265. },{"../../internals/path":169,"../../modules/es.object.get-own-property-descriptors":209}],63:[function(_dereq_,module,exports){
  3266. _dereq_('../../modules/es.symbol');
  3267. var path = _dereq_('../../internals/path');
  3268. module.exports = path.Object.getOwnPropertySymbols;
  3269. },{"../../internals/path":169,"../../modules/es.symbol":218}],64:[function(_dereq_,module,exports){
  3270. _dereq_('../../modules/es.object.keys');
  3271. var path = _dereq_('../../internals/path');
  3272. module.exports = path.Object.keys;
  3273. },{"../../internals/path":169,"../../modules/es.object.keys":210}],65:[function(_dereq_,module,exports){
  3274. _dereq_('../../modules/es.aggregate-error');
  3275. _dereq_('../../modules/es.array.iterator');
  3276. _dereq_('../../modules/es.object.to-string');
  3277. _dereq_('../../modules/es.promise');
  3278. _dereq_('../../modules/es.promise.all-settled');
  3279. _dereq_('../../modules/es.promise.any');
  3280. _dereq_('../../modules/es.promise.finally');
  3281. _dereq_('../../modules/es.string.iterator');
  3282. var path = _dereq_('../../internals/path');
  3283. module.exports = path.Promise;
  3284. },{"../../internals/path":169,"../../modules/es.aggregate-error":200,"../../modules/es.array.iterator":204,"../../modules/es.object.to-string":211,"../../modules/es.promise":215,"../../modules/es.promise.all-settled":212,"../../modules/es.promise.any":213,"../../modules/es.promise.finally":214,"../../modules/es.string.iterator":217}],66:[function(_dereq_,module,exports){
  3285. _dereq_('../../../modules/es.string.includes');
  3286. var entryVirtual = _dereq_('../../../internals/entry-virtual');
  3287. module.exports = entryVirtual('String').includes;
  3288. },{"../../../internals/entry-virtual":107,"../../../modules/es.string.includes":216}],67:[function(_dereq_,module,exports){
  3289. var parent = _dereq_('../../actual/object/define-property');
  3290. module.exports = parent;
  3291. },{"../../actual/object/define-property":51}],68:[function(_dereq_,module,exports){
  3292. var parent = _dereq_('../../actual/promise');
  3293. _dereq_('../../modules/esnext.aggregate-error');
  3294. // TODO: Remove from `core-js@4`
  3295. _dereq_('../../modules/esnext.promise.all-settled');
  3296. _dereq_('../../modules/esnext.promise.try');
  3297. _dereq_('../../modules/esnext.promise.any');
  3298. module.exports = parent;
  3299. },{"../../actual/promise":52,"../../modules/esnext.aggregate-error":219,"../../modules/esnext.promise.all-settled":220,"../../modules/esnext.promise.any":221,"../../modules/esnext.promise.try":222}],69:[function(_dereq_,module,exports){
  3300. var global = _dereq_('../internals/global');
  3301. var isCallable = _dereq_('../internals/is-callable');
  3302. var tryToString = _dereq_('../internals/try-to-string');
  3303. var TypeError = global.TypeError;
  3304. // `Assert: IsCallable(argument) is true`
  3305. module.exports = function (argument) {
  3306. if (isCallable(argument)) return argument;
  3307. throw TypeError(tryToString(argument) + ' is not a function');
  3308. };
  3309. },{"../internals/global":122,"../internals/is-callable":134,"../internals/try-to-string":194}],70:[function(_dereq_,module,exports){
  3310. var global = _dereq_('../internals/global');
  3311. var isConstructor = _dereq_('../internals/is-constructor');
  3312. var tryToString = _dereq_('../internals/try-to-string');
  3313. var TypeError = global.TypeError;
  3314. // `Assert: IsConstructor(argument) is true`
  3315. module.exports = function (argument) {
  3316. if (isConstructor(argument)) return argument;
  3317. throw TypeError(tryToString(argument) + ' is not a constructor');
  3318. };
  3319. },{"../internals/global":122,"../internals/is-constructor":135,"../internals/try-to-string":194}],71:[function(_dereq_,module,exports){
  3320. var global = _dereq_('../internals/global');
  3321. var isCallable = _dereq_('../internals/is-callable');
  3322. var String = global.String;
  3323. var TypeError = global.TypeError;
  3324. module.exports = function (argument) {
  3325. if (typeof argument == 'object' || isCallable(argument)) return argument;
  3326. throw TypeError("Can't set " + String(argument) + ' as a prototype');
  3327. };
  3328. },{"../internals/global":122,"../internals/is-callable":134}],72:[function(_dereq_,module,exports){
  3329. module.exports = function () { /* empty */ };
  3330. },{}],73:[function(_dereq_,module,exports){
  3331. var global = _dereq_('../internals/global');
  3332. var isPrototypeOf = _dereq_('../internals/object-is-prototype-of');
  3333. var TypeError = global.TypeError;
  3334. module.exports = function (it, Prototype) {
  3335. if (isPrototypeOf(Prototype, it)) return it;
  3336. throw TypeError('Incorrect invocation');
  3337. };
  3338. },{"../internals/global":122,"../internals/object-is-prototype-of":161}],74:[function(_dereq_,module,exports){
  3339. var global = _dereq_('../internals/global');
  3340. var isObject = _dereq_('../internals/is-object');
  3341. var String = global.String;
  3342. var TypeError = global.TypeError;
  3343. // `Assert: Type(argument) is Object`
  3344. module.exports = function (argument) {
  3345. if (isObject(argument)) return argument;
  3346. throw TypeError(String(argument) + ' is not an object');
  3347. };
  3348. },{"../internals/global":122,"../internals/is-object":137}],75:[function(_dereq_,module,exports){
  3349. 'use strict';
  3350. var $forEach = _dereq_('../internals/array-iteration').forEach;
  3351. var arrayMethodIsStrict = _dereq_('../internals/array-method-is-strict');
  3352. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  3353. // `Array.prototype.forEach` method implementation
  3354. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  3355. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  3356. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  3357. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  3358. } : [].forEach;
  3359. },{"../internals/array-iteration":77,"../internals/array-method-is-strict":79}],76:[function(_dereq_,module,exports){
  3360. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  3361. var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
  3362. var lengthOfArrayLike = _dereq_('../internals/length-of-array-like');
  3363. // `Array.prototype.{ indexOf, includes }` methods implementation
  3364. var createMethod = function (IS_INCLUDES) {
  3365. return function ($this, el, fromIndex) {
  3366. var O = toIndexedObject($this);
  3367. var length = lengthOfArrayLike(O);
  3368. var index = toAbsoluteIndex(fromIndex, length);
  3369. var value;
  3370. // Array#includes uses SameValueZero equality algorithm
  3371. // eslint-disable-next-line no-self-compare -- NaN check
  3372. if (IS_INCLUDES && el != el) while (length > index) {
  3373. value = O[index++];
  3374. // eslint-disable-next-line no-self-compare -- NaN check
  3375. if (value != value) return true;
  3376. // Array#indexOf ignores holes, Array#includes - not
  3377. } else for (;length > index; index++) {
  3378. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  3379. } return !IS_INCLUDES && -1;
  3380. };
  3381. };
  3382. module.exports = {
  3383. // `Array.prototype.includes` method
  3384. // https://tc39.es/ecma262/#sec-array.prototype.includes
  3385. includes: createMethod(true),
  3386. // `Array.prototype.indexOf` method
  3387. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  3388. indexOf: createMethod(false)
  3389. };
  3390. },{"../internals/length-of-array-like":145,"../internals/to-absolute-index":185,"../internals/to-indexed-object":186}],77:[function(_dereq_,module,exports){
  3391. var bind = _dereq_('../internals/function-bind-context');
  3392. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  3393. var IndexedObject = _dereq_('../internals/indexed-object');
  3394. var toObject = _dereq_('../internals/to-object');
  3395. var lengthOfArrayLike = _dereq_('../internals/length-of-array-like');
  3396. var arraySpeciesCreate = _dereq_('../internals/array-species-create');
  3397. var push = uncurryThis([].push);
  3398. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  3399. var createMethod = function (TYPE) {
  3400. var IS_MAP = TYPE == 1;
  3401. var IS_FILTER = TYPE == 2;
  3402. var IS_SOME = TYPE == 3;
  3403. var IS_EVERY = TYPE == 4;
  3404. var IS_FIND_INDEX = TYPE == 6;
  3405. var IS_FILTER_REJECT = TYPE == 7;
  3406. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  3407. return function ($this, callbackfn, that, specificCreate) {
  3408. var O = toObject($this);
  3409. var self = IndexedObject(O);
  3410. var boundFunction = bind(callbackfn, that);
  3411. var length = lengthOfArrayLike(self);
  3412. var index = 0;
  3413. var create = specificCreate || arraySpeciesCreate;
  3414. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  3415. var value, result;
  3416. for (;length > index; index++) if (NO_HOLES || index in self) {
  3417. value = self[index];
  3418. result = boundFunction(value, index, O);
  3419. if (TYPE) {
  3420. if (IS_MAP) target[index] = result; // map
  3421. else if (result) switch (TYPE) {
  3422. case 3: return true; // some
  3423. case 5: return value; // find
  3424. case 6: return index; // findIndex
  3425. case 2: push(target, value); // filter
  3426. } else switch (TYPE) {
  3427. case 4: return false; // every
  3428. case 7: push(target, value); // filterReject
  3429. }
  3430. }
  3431. }
  3432. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  3433. };
  3434. };
  3435. module.exports = {
  3436. // `Array.prototype.forEach` method
  3437. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  3438. forEach: createMethod(0),
  3439. // `Array.prototype.map` method
  3440. // https://tc39.es/ecma262/#sec-array.prototype.map
  3441. map: createMethod(1),
  3442. // `Array.prototype.filter` method
  3443. // https://tc39.es/ecma262/#sec-array.prototype.filter
  3444. filter: createMethod(2),
  3445. // `Array.prototype.some` method
  3446. // https://tc39.es/ecma262/#sec-array.prototype.some
  3447. some: createMethod(3),
  3448. // `Array.prototype.every` method
  3449. // https://tc39.es/ecma262/#sec-array.prototype.every
  3450. every: createMethod(4),
  3451. // `Array.prototype.find` method
  3452. // https://tc39.es/ecma262/#sec-array.prototype.find
  3453. find: createMethod(5),
  3454. // `Array.prototype.findIndex` method
  3455. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  3456. findIndex: createMethod(6),
  3457. // `Array.prototype.filterReject` method
  3458. // https://github.com/tc39/proposal-array-filtering
  3459. filterReject: createMethod(7)
  3460. };
  3461. },{"../internals/array-species-create":83,"../internals/function-bind-context":113,"../internals/function-uncurry-this":117,"../internals/indexed-object":128,"../internals/length-of-array-like":145,"../internals/to-object":189}],78:[function(_dereq_,module,exports){
  3462. var fails = _dereq_('../internals/fails');
  3463. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3464. var V8_VERSION = _dereq_('../internals/engine-v8-version');
  3465. var SPECIES = wellKnownSymbol('species');
  3466. module.exports = function (METHOD_NAME) {
  3467. // We can't use this feature detection in V8 since it causes
  3468. // deoptimization and serious performance degradation
  3469. // https://github.com/zloirock/core-js/issues/677
  3470. return V8_VERSION >= 51 || !fails(function () {
  3471. var array = [];
  3472. var constructor = array.constructor = {};
  3473. constructor[SPECIES] = function () {
  3474. return { foo: 1 };
  3475. };
  3476. return array[METHOD_NAME](Boolean).foo !== 1;
  3477. });
  3478. };
  3479. },{"../internals/engine-v8-version":106,"../internals/fails":111,"../internals/well-known-symbol":199}],79:[function(_dereq_,module,exports){
  3480. 'use strict';
  3481. var fails = _dereq_('../internals/fails');
  3482. module.exports = function (METHOD_NAME, argument) {
  3483. var method = [][METHOD_NAME];
  3484. return !!method && fails(function () {
  3485. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  3486. method.call(null, argument || function () { throw 1; }, 1);
  3487. });
  3488. };
  3489. },{"../internals/fails":111}],80:[function(_dereq_,module,exports){
  3490. var global = _dereq_('../internals/global');
  3491. var toAbsoluteIndex = _dereq_('../internals/to-absolute-index');
  3492. var lengthOfArrayLike = _dereq_('../internals/length-of-array-like');
  3493. var createProperty = _dereq_('../internals/create-property');
  3494. var Array = global.Array;
  3495. var max = Math.max;
  3496. module.exports = function (O, start, end) {
  3497. var length = lengthOfArrayLike(O);
  3498. var k = toAbsoluteIndex(start, length);
  3499. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  3500. var result = Array(max(fin - k, 0));
  3501. for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
  3502. result.length = n;
  3503. return result;
  3504. };
  3505. },{"../internals/create-property":94,"../internals/global":122,"../internals/length-of-array-like":145,"../internals/to-absolute-index":185}],81:[function(_dereq_,module,exports){
  3506. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  3507. module.exports = uncurryThis([].slice);
  3508. },{"../internals/function-uncurry-this":117}],82:[function(_dereq_,module,exports){
  3509. var global = _dereq_('../internals/global');
  3510. var isArray = _dereq_('../internals/is-array');
  3511. var isConstructor = _dereq_('../internals/is-constructor');
  3512. var isObject = _dereq_('../internals/is-object');
  3513. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3514. var SPECIES = wellKnownSymbol('species');
  3515. var Array = global.Array;
  3516. // a part of `ArraySpeciesCreate` abstract operation
  3517. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  3518. module.exports = function (originalArray) {
  3519. var C;
  3520. if (isArray(originalArray)) {
  3521. C = originalArray.constructor;
  3522. // cross-realm fallback
  3523. if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;
  3524. else if (isObject(C)) {
  3525. C = C[SPECIES];
  3526. if (C === null) C = undefined;
  3527. }
  3528. } return C === undefined ? Array : C;
  3529. };
  3530. },{"../internals/global":122,"../internals/is-array":133,"../internals/is-constructor":135,"../internals/is-object":137,"../internals/well-known-symbol":199}],83:[function(_dereq_,module,exports){
  3531. var arraySpeciesConstructor = _dereq_('../internals/array-species-constructor');
  3532. // `ArraySpeciesCreate` abstract operation
  3533. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  3534. module.exports = function (originalArray, length) {
  3535. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  3536. };
  3537. },{"../internals/array-species-constructor":82}],84:[function(_dereq_,module,exports){
  3538. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3539. var ITERATOR = wellKnownSymbol('iterator');
  3540. var SAFE_CLOSING = false;
  3541. try {
  3542. var called = 0;
  3543. var iteratorWithReturn = {
  3544. next: function () {
  3545. return { done: !!called++ };
  3546. },
  3547. 'return': function () {
  3548. SAFE_CLOSING = true;
  3549. }
  3550. };
  3551. iteratorWithReturn[ITERATOR] = function () {
  3552. return this;
  3553. };
  3554. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  3555. Array.from(iteratorWithReturn, function () { throw 2; });
  3556. } catch (error) { /* empty */ }
  3557. module.exports = function (exec, SKIP_CLOSING) {
  3558. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  3559. var ITERATION_SUPPORT = false;
  3560. try {
  3561. var object = {};
  3562. object[ITERATOR] = function () {
  3563. return {
  3564. next: function () {
  3565. return { done: ITERATION_SUPPORT = true };
  3566. }
  3567. };
  3568. };
  3569. exec(object);
  3570. } catch (error) { /* empty */ }
  3571. return ITERATION_SUPPORT;
  3572. };
  3573. },{"../internals/well-known-symbol":199}],85:[function(_dereq_,module,exports){
  3574. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  3575. var toString = uncurryThis({}.toString);
  3576. var stringSlice = uncurryThis(''.slice);
  3577. module.exports = function (it) {
  3578. return stringSlice(toString(it), 8, -1);
  3579. };
  3580. },{"../internals/function-uncurry-this":117}],86:[function(_dereq_,module,exports){
  3581. var global = _dereq_('../internals/global');
  3582. var TO_STRING_TAG_SUPPORT = _dereq_('../internals/to-string-tag-support');
  3583. var isCallable = _dereq_('../internals/is-callable');
  3584. var classofRaw = _dereq_('../internals/classof-raw');
  3585. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3586. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  3587. var Object = global.Object;
  3588. // ES3 wrong here
  3589. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  3590. // fallback for IE11 Script Access Denied error
  3591. var tryGet = function (it, key) {
  3592. try {
  3593. return it[key];
  3594. } catch (error) { /* empty */ }
  3595. };
  3596. // getting tag from ES6+ `Object.prototype.toString`
  3597. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  3598. var O, tag, result;
  3599. return it === undefined ? 'Undefined' : it === null ? 'Null'
  3600. // @@toStringTag case
  3601. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  3602. // builtinTag case
  3603. : CORRECT_ARGUMENTS ? classofRaw(O)
  3604. // ES3 arguments fallback
  3605. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  3606. };
  3607. },{"../internals/classof-raw":85,"../internals/global":122,"../internals/is-callable":134,"../internals/to-string-tag-support":192,"../internals/well-known-symbol":199}],87:[function(_dereq_,module,exports){
  3608. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  3609. var replace = uncurryThis(''.replace);
  3610. var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd');
  3611. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  3612. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  3613. module.exports = function (stack, dropEntries) {
  3614. if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string') {
  3615. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  3616. } return stack;
  3617. };
  3618. },{"../internals/function-uncurry-this":117}],88:[function(_dereq_,module,exports){
  3619. var hasOwn = _dereq_('../internals/has-own-property');
  3620. var ownKeys = _dereq_('../internals/own-keys');
  3621. var getOwnPropertyDescriptorModule = _dereq_('../internals/object-get-own-property-descriptor');
  3622. var definePropertyModule = _dereq_('../internals/object-define-property');
  3623. module.exports = function (target, source, exceptions) {
  3624. var keys = ownKeys(source);
  3625. var defineProperty = definePropertyModule.f;
  3626. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  3627. for (var i = 0; i < keys.length; i++) {
  3628. var key = keys[i];
  3629. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  3630. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  3631. }
  3632. }
  3633. };
  3634. },{"../internals/has-own-property":123,"../internals/object-define-property":155,"../internals/object-get-own-property-descriptor":156,"../internals/own-keys":168}],89:[function(_dereq_,module,exports){
  3635. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3636. var MATCH = wellKnownSymbol('match');
  3637. module.exports = function (METHOD_NAME) {
  3638. var regexp = /./;
  3639. try {
  3640. '/./'[METHOD_NAME](regexp);
  3641. } catch (error1) {
  3642. try {
  3643. regexp[MATCH] = false;
  3644. return '/./'[METHOD_NAME](regexp);
  3645. } catch (error2) { /* empty */ }
  3646. } return false;
  3647. };
  3648. },{"../internals/well-known-symbol":199}],90:[function(_dereq_,module,exports){
  3649. var fails = _dereq_('../internals/fails');
  3650. module.exports = !fails(function () {
  3651. function F() { /* empty */ }
  3652. F.prototype.constructor = null;
  3653. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  3654. return Object.getPrototypeOf(new F()) !== F.prototype;
  3655. });
  3656. },{"../internals/fails":111}],91:[function(_dereq_,module,exports){
  3657. 'use strict';
  3658. var IteratorPrototype = _dereq_('../internals/iterators-core').IteratorPrototype;
  3659. var create = _dereq_('../internals/object-create');
  3660. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  3661. var setToStringTag = _dereq_('../internals/set-to-string-tag');
  3662. var Iterators = _dereq_('../internals/iterators');
  3663. var returnThis = function () { return this; };
  3664. module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
  3665. var TO_STRING_TAG = NAME + ' Iterator';
  3666. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
  3667. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  3668. Iterators[TO_STRING_TAG] = returnThis;
  3669. return IteratorConstructor;
  3670. };
  3671. },{"../internals/create-property-descriptor":93,"../internals/iterators":144,"../internals/iterators-core":143,"../internals/object-create":153,"../internals/set-to-string-tag":178}],92:[function(_dereq_,module,exports){
  3672. var DESCRIPTORS = _dereq_('../internals/descriptors');
  3673. var definePropertyModule = _dereq_('../internals/object-define-property');
  3674. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  3675. module.exports = DESCRIPTORS ? function (object, key, value) {
  3676. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  3677. } : function (object, key, value) {
  3678. object[key] = value;
  3679. return object;
  3680. };
  3681. },{"../internals/create-property-descriptor":93,"../internals/descriptors":97,"../internals/object-define-property":155}],93:[function(_dereq_,module,exports){
  3682. module.exports = function (bitmap, value) {
  3683. return {
  3684. enumerable: !(bitmap & 1),
  3685. configurable: !(bitmap & 2),
  3686. writable: !(bitmap & 4),
  3687. value: value
  3688. };
  3689. };
  3690. },{}],94:[function(_dereq_,module,exports){
  3691. 'use strict';
  3692. var toPropertyKey = _dereq_('../internals/to-property-key');
  3693. var definePropertyModule = _dereq_('../internals/object-define-property');
  3694. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  3695. module.exports = function (object, key, value) {
  3696. var propertyKey = toPropertyKey(key);
  3697. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  3698. else object[propertyKey] = value;
  3699. };
  3700. },{"../internals/create-property-descriptor":93,"../internals/object-define-property":155,"../internals/to-property-key":191}],95:[function(_dereq_,module,exports){
  3701. 'use strict';
  3702. var $ = _dereq_('../internals/export');
  3703. var call = _dereq_('../internals/function-call');
  3704. var IS_PURE = _dereq_('../internals/is-pure');
  3705. var FunctionName = _dereq_('../internals/function-name');
  3706. var isCallable = _dereq_('../internals/is-callable');
  3707. var createIteratorConstructor = _dereq_('../internals/create-iterator-constructor');
  3708. var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
  3709. var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
  3710. var setToStringTag = _dereq_('../internals/set-to-string-tag');
  3711. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  3712. var redefine = _dereq_('../internals/redefine');
  3713. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  3714. var Iterators = _dereq_('../internals/iterators');
  3715. var IteratorsCore = _dereq_('../internals/iterators-core');
  3716. var PROPER_FUNCTION_NAME = FunctionName.PROPER;
  3717. var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
  3718. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  3719. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  3720. var ITERATOR = wellKnownSymbol('iterator');
  3721. var KEYS = 'keys';
  3722. var VALUES = 'values';
  3723. var ENTRIES = 'entries';
  3724. var returnThis = function () { return this; };
  3725. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  3726. createIteratorConstructor(IteratorConstructor, NAME, next);
  3727. var getIterationMethod = function (KIND) {
  3728. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  3729. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  3730. switch (KIND) {
  3731. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  3732. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  3733. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  3734. } return function () { return new IteratorConstructor(this); };
  3735. };
  3736. var TO_STRING_TAG = NAME + ' Iterator';
  3737. var INCORRECT_VALUES_NAME = false;
  3738. var IterablePrototype = Iterable.prototype;
  3739. var nativeIterator = IterablePrototype[ITERATOR]
  3740. || IterablePrototype['@@iterator']
  3741. || DEFAULT && IterablePrototype[DEFAULT];
  3742. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  3743. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  3744. var CurrentIteratorPrototype, methods, KEY;
  3745. // fix native
  3746. if (anyNativeIterator) {
  3747. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  3748. if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  3749. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  3750. if (setPrototypeOf) {
  3751. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  3752. } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
  3753. redefine(CurrentIteratorPrototype, ITERATOR, returnThis);
  3754. }
  3755. }
  3756. // Set @@toStringTag to native iterators
  3757. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  3758. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  3759. }
  3760. }
  3761. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  3762. if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  3763. if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
  3764. createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
  3765. } else {
  3766. INCORRECT_VALUES_NAME = true;
  3767. defaultIterator = function values() { return call(nativeIterator, this); };
  3768. }
  3769. }
  3770. // export additional methods
  3771. if (DEFAULT) {
  3772. methods = {
  3773. values: getIterationMethod(VALUES),
  3774. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  3775. entries: getIterationMethod(ENTRIES)
  3776. };
  3777. if (FORCED) for (KEY in methods) {
  3778. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  3779. redefine(IterablePrototype, KEY, methods[KEY]);
  3780. }
  3781. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  3782. }
  3783. // define iterator
  3784. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  3785. redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
  3786. }
  3787. Iterators[NAME] = defaultIterator;
  3788. return methods;
  3789. };
  3790. },{"../internals/create-iterator-constructor":91,"../internals/create-non-enumerable-property":92,"../internals/export":110,"../internals/function-call":115,"../internals/function-name":116,"../internals/is-callable":134,"../internals/is-pure":138,"../internals/iterators":144,"../internals/iterators-core":143,"../internals/object-get-prototype-of":160,"../internals/object-set-prototype-of":165,"../internals/redefine":174,"../internals/set-to-string-tag":178,"../internals/well-known-symbol":199}],96:[function(_dereq_,module,exports){
  3791. var path = _dereq_('../internals/path');
  3792. var hasOwn = _dereq_('../internals/has-own-property');
  3793. var wrappedWellKnownSymbolModule = _dereq_('../internals/well-known-symbol-wrapped');
  3794. var defineProperty = _dereq_('../internals/object-define-property').f;
  3795. module.exports = function (NAME) {
  3796. var Symbol = path.Symbol || (path.Symbol = {});
  3797. if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
  3798. value: wrappedWellKnownSymbolModule.f(NAME)
  3799. });
  3800. };
  3801. },{"../internals/has-own-property":123,"../internals/object-define-property":155,"../internals/path":169,"../internals/well-known-symbol-wrapped":198}],97:[function(_dereq_,module,exports){
  3802. var fails = _dereq_('../internals/fails');
  3803. // Detect IE8's incomplete defineProperty implementation
  3804. module.exports = !fails(function () {
  3805. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  3806. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  3807. });
  3808. },{"../internals/fails":111}],98:[function(_dereq_,module,exports){
  3809. var global = _dereq_('../internals/global');
  3810. var isObject = _dereq_('../internals/is-object');
  3811. var document = global.document;
  3812. // typeof document.createElement is 'object' in old IE
  3813. var EXISTS = isObject(document) && isObject(document.createElement);
  3814. module.exports = function (it) {
  3815. return EXISTS ? document.createElement(it) : {};
  3816. };
  3817. },{"../internals/global":122,"../internals/is-object":137}],99:[function(_dereq_,module,exports){
  3818. // iterable DOM collections
  3819. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  3820. module.exports = {
  3821. CSSRuleList: 0,
  3822. CSSStyleDeclaration: 0,
  3823. CSSValueList: 0,
  3824. ClientRectList: 0,
  3825. DOMRectList: 0,
  3826. DOMStringList: 0,
  3827. DOMTokenList: 1,
  3828. DataTransferItemList: 0,
  3829. FileList: 0,
  3830. HTMLAllCollection: 0,
  3831. HTMLCollection: 0,
  3832. HTMLFormElement: 0,
  3833. HTMLSelectElement: 0,
  3834. MediaList: 0,
  3835. MimeTypeArray: 0,
  3836. NamedNodeMap: 0,
  3837. NodeList: 1,
  3838. PaintRequestList: 0,
  3839. Plugin: 0,
  3840. PluginArray: 0,
  3841. SVGLengthList: 0,
  3842. SVGNumberList: 0,
  3843. SVGPathSegList: 0,
  3844. SVGPointList: 0,
  3845. SVGStringList: 0,
  3846. SVGTransformList: 0,
  3847. SourceBufferList: 0,
  3848. StyleSheetList: 0,
  3849. TextTrackCueList: 0,
  3850. TextTrackList: 0,
  3851. TouchList: 0
  3852. };
  3853. },{}],100:[function(_dereq_,module,exports){
  3854. module.exports = typeof window == 'object';
  3855. },{}],101:[function(_dereq_,module,exports){
  3856. var userAgent = _dereq_('../internals/engine-user-agent');
  3857. var global = _dereq_('../internals/global');
  3858. module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;
  3859. },{"../internals/engine-user-agent":105,"../internals/global":122}],102:[function(_dereq_,module,exports){
  3860. var userAgent = _dereq_('../internals/engine-user-agent');
  3861. module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
  3862. },{"../internals/engine-user-agent":105}],103:[function(_dereq_,module,exports){
  3863. var classof = _dereq_('../internals/classof-raw');
  3864. var global = _dereq_('../internals/global');
  3865. module.exports = classof(global.process) == 'process';
  3866. },{"../internals/classof-raw":85,"../internals/global":122}],104:[function(_dereq_,module,exports){
  3867. var userAgent = _dereq_('../internals/engine-user-agent');
  3868. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  3869. },{"../internals/engine-user-agent":105}],105:[function(_dereq_,module,exports){
  3870. var getBuiltIn = _dereq_('../internals/get-built-in');
  3871. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  3872. },{"../internals/get-built-in":118}],106:[function(_dereq_,module,exports){
  3873. var global = _dereq_('../internals/global');
  3874. var userAgent = _dereq_('../internals/engine-user-agent');
  3875. var process = global.process;
  3876. var Deno = global.Deno;
  3877. var versions = process && process.versions || Deno && Deno.version;
  3878. var v8 = versions && versions.v8;
  3879. var match, version;
  3880. if (v8) {
  3881. match = v8.split('.');
  3882. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  3883. // but their correct versions are not interesting for us
  3884. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  3885. }
  3886. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  3887. // so check `userAgent` even if `.v8` exists, but 0
  3888. if (!version && userAgent) {
  3889. match = userAgent.match(/Edge\/(\d+)/);
  3890. if (!match || match[1] >= 74) {
  3891. match = userAgent.match(/Chrome\/(\d+)/);
  3892. if (match) version = +match[1];
  3893. }
  3894. }
  3895. module.exports = version;
  3896. },{"../internals/engine-user-agent":105,"../internals/global":122}],107:[function(_dereq_,module,exports){
  3897. var path = _dereq_('../internals/path');
  3898. module.exports = function (CONSTRUCTOR) {
  3899. return path[CONSTRUCTOR + 'Prototype'];
  3900. };
  3901. },{"../internals/path":169}],108:[function(_dereq_,module,exports){
  3902. // IE8- don't enum bug keys
  3903. module.exports = [
  3904. 'constructor',
  3905. 'hasOwnProperty',
  3906. 'isPrototypeOf',
  3907. 'propertyIsEnumerable',
  3908. 'toLocaleString',
  3909. 'toString',
  3910. 'valueOf'
  3911. ];
  3912. },{}],109:[function(_dereq_,module,exports){
  3913. var fails = _dereq_('../internals/fails');
  3914. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  3915. module.exports = !fails(function () {
  3916. var error = Error('a');
  3917. if (!('stack' in error)) return true;
  3918. // eslint-disable-next-line es/no-object-defineproperty -- safe
  3919. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  3920. return error.stack !== 7;
  3921. });
  3922. },{"../internals/create-property-descriptor":93,"../internals/fails":111}],110:[function(_dereq_,module,exports){
  3923. 'use strict';
  3924. var global = _dereq_('../internals/global');
  3925. var apply = _dereq_('../internals/function-apply');
  3926. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  3927. var isCallable = _dereq_('../internals/is-callable');
  3928. var getOwnPropertyDescriptor = _dereq_('../internals/object-get-own-property-descriptor').f;
  3929. var isForced = _dereq_('../internals/is-forced');
  3930. var path = _dereq_('../internals/path');
  3931. var bind = _dereq_('../internals/function-bind-context');
  3932. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  3933. var hasOwn = _dereq_('../internals/has-own-property');
  3934. var wrapConstructor = function (NativeConstructor) {
  3935. var Wrapper = function (a, b, c) {
  3936. if (this instanceof Wrapper) {
  3937. switch (arguments.length) {
  3938. case 0: return new NativeConstructor();
  3939. case 1: return new NativeConstructor(a);
  3940. case 2: return new NativeConstructor(a, b);
  3941. } return new NativeConstructor(a, b, c);
  3942. } return apply(NativeConstructor, this, arguments);
  3943. };
  3944. Wrapper.prototype = NativeConstructor.prototype;
  3945. return Wrapper;
  3946. };
  3947. /*
  3948. options.target - name of the target object
  3949. options.global - target is the global object
  3950. options.stat - export as static methods of target
  3951. options.proto - export as prototype methods of target
  3952. options.real - real prototype method for the `pure` version
  3953. options.forced - export even if the native feature is available
  3954. options.bind - bind methods to the target, required for the `pure` version
  3955. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  3956. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  3957. options.sham - add a flag to not completely full polyfills
  3958. options.enumerable - export as enumerable property
  3959. options.noTargetGet - prevent calling a getter on target
  3960. options.name - the .name of the function if it does not match the key
  3961. */
  3962. module.exports = function (options, source) {
  3963. var TARGET = options.target;
  3964. var GLOBAL = options.global;
  3965. var STATIC = options.stat;
  3966. var PROTO = options.proto;
  3967. var nativeSource = GLOBAL ? global : STATIC ? global[TARGET] : (global[TARGET] || {}).prototype;
  3968. var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
  3969. var targetPrototype = target.prototype;
  3970. var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
  3971. var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
  3972. for (key in source) {
  3973. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  3974. // contains in native
  3975. USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
  3976. targetProperty = target[key];
  3977. if (USE_NATIVE) if (options.noTargetGet) {
  3978. descriptor = getOwnPropertyDescriptor(nativeSource, key);
  3979. nativeProperty = descriptor && descriptor.value;
  3980. } else nativeProperty = nativeSource[key];
  3981. // export native or implementation
  3982. sourceProperty = (USE_NATIVE && nativeProperty) ? nativeProperty : source[key];
  3983. if (USE_NATIVE && typeof targetProperty == typeof sourceProperty) continue;
  3984. // bind timers to global for call from export context
  3985. if (options.bind && USE_NATIVE) resultProperty = bind(sourceProperty, global);
  3986. // wrap global constructors for prevent changs in this version
  3987. else if (options.wrap && USE_NATIVE) resultProperty = wrapConstructor(sourceProperty);
  3988. // make static versions for prototype methods
  3989. else if (PROTO && isCallable(sourceProperty)) resultProperty = uncurryThis(sourceProperty);
  3990. // default case
  3991. else resultProperty = sourceProperty;
  3992. // add a flag to not completely full polyfills
  3993. if (options.sham || (sourceProperty && sourceProperty.sham) || (targetProperty && targetProperty.sham)) {
  3994. createNonEnumerableProperty(resultProperty, 'sham', true);
  3995. }
  3996. createNonEnumerableProperty(target, key, resultProperty);
  3997. if (PROTO) {
  3998. VIRTUAL_PROTOTYPE = TARGET + 'Prototype';
  3999. if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
  4000. createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
  4001. }
  4002. // export virtual prototype methods
  4003. createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
  4004. // export real prototype methods
  4005. if (options.real && targetPrototype && !targetPrototype[key]) {
  4006. createNonEnumerableProperty(targetPrototype, key, sourceProperty);
  4007. }
  4008. }
  4009. }
  4010. };
  4011. },{"../internals/create-non-enumerable-property":92,"../internals/function-apply":112,"../internals/function-bind-context":113,"../internals/function-uncurry-this":117,"../internals/global":122,"../internals/has-own-property":123,"../internals/is-callable":134,"../internals/is-forced":136,"../internals/object-get-own-property-descriptor":156,"../internals/path":169}],111:[function(_dereq_,module,exports){
  4012. module.exports = function (exec) {
  4013. try {
  4014. return !!exec();
  4015. } catch (error) {
  4016. return true;
  4017. }
  4018. };
  4019. },{}],112:[function(_dereq_,module,exports){
  4020. var NATIVE_BIND = _dereq_('../internals/function-bind-native');
  4021. var FunctionPrototype = Function.prototype;
  4022. var apply = FunctionPrototype.apply;
  4023. var call = FunctionPrototype.call;
  4024. // eslint-disable-next-line es/no-reflect -- safe
  4025. module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  4026. return call.apply(apply, arguments);
  4027. });
  4028. },{"../internals/function-bind-native":114}],113:[function(_dereq_,module,exports){
  4029. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4030. var aCallable = _dereq_('../internals/a-callable');
  4031. var NATIVE_BIND = _dereq_('../internals/function-bind-native');
  4032. var bind = uncurryThis(uncurryThis.bind);
  4033. // optional / simple context binding
  4034. module.exports = function (fn, that) {
  4035. aCallable(fn);
  4036. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  4037. return fn.apply(that, arguments);
  4038. };
  4039. };
  4040. },{"../internals/a-callable":69,"../internals/function-bind-native":114,"../internals/function-uncurry-this":117}],114:[function(_dereq_,module,exports){
  4041. var fails = _dereq_('../internals/fails');
  4042. module.exports = !fails(function () {
  4043. var test = (function () { /* empty */ }).bind();
  4044. // eslint-disable-next-line no-prototype-builtins -- safe
  4045. return typeof test != 'function' || test.hasOwnProperty('prototype');
  4046. });
  4047. },{"../internals/fails":111}],115:[function(_dereq_,module,exports){
  4048. var NATIVE_BIND = _dereq_('../internals/function-bind-native');
  4049. var call = Function.prototype.call;
  4050. module.exports = NATIVE_BIND ? call.bind(call) : function () {
  4051. return call.apply(call, arguments);
  4052. };
  4053. },{"../internals/function-bind-native":114}],116:[function(_dereq_,module,exports){
  4054. var DESCRIPTORS = _dereq_('../internals/descriptors');
  4055. var hasOwn = _dereq_('../internals/has-own-property');
  4056. var FunctionPrototype = Function.prototype;
  4057. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  4058. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  4059. var EXISTS = hasOwn(FunctionPrototype, 'name');
  4060. // additional protection from minified / mangled / dropped function names
  4061. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  4062. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  4063. module.exports = {
  4064. EXISTS: EXISTS,
  4065. PROPER: PROPER,
  4066. CONFIGURABLE: CONFIGURABLE
  4067. };
  4068. },{"../internals/descriptors":97,"../internals/has-own-property":123}],117:[function(_dereq_,module,exports){
  4069. var NATIVE_BIND = _dereq_('../internals/function-bind-native');
  4070. var FunctionPrototype = Function.prototype;
  4071. var bind = FunctionPrototype.bind;
  4072. var call = FunctionPrototype.call;
  4073. var uncurryThis = NATIVE_BIND && bind.bind(call, call);
  4074. module.exports = NATIVE_BIND ? function (fn) {
  4075. return fn && uncurryThis(fn);
  4076. } : function (fn) {
  4077. return fn && function () {
  4078. return call.apply(fn, arguments);
  4079. };
  4080. };
  4081. },{"../internals/function-bind-native":114}],118:[function(_dereq_,module,exports){
  4082. var path = _dereq_('../internals/path');
  4083. var global = _dereq_('../internals/global');
  4084. var isCallable = _dereq_('../internals/is-callable');
  4085. var aFunction = function (variable) {
  4086. return isCallable(variable) ? variable : undefined;
  4087. };
  4088. module.exports = function (namespace, method) {
  4089. return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
  4090. : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
  4091. };
  4092. },{"../internals/global":122,"../internals/is-callable":134,"../internals/path":169}],119:[function(_dereq_,module,exports){
  4093. var classof = _dereq_('../internals/classof');
  4094. var getMethod = _dereq_('../internals/get-method');
  4095. var Iterators = _dereq_('../internals/iterators');
  4096. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  4097. var ITERATOR = wellKnownSymbol('iterator');
  4098. module.exports = function (it) {
  4099. if (it != undefined) return getMethod(it, ITERATOR)
  4100. || getMethod(it, '@@iterator')
  4101. || Iterators[classof(it)];
  4102. };
  4103. },{"../internals/classof":86,"../internals/get-method":121,"../internals/iterators":144,"../internals/well-known-symbol":199}],120:[function(_dereq_,module,exports){
  4104. var global = _dereq_('../internals/global');
  4105. var call = _dereq_('../internals/function-call');
  4106. var aCallable = _dereq_('../internals/a-callable');
  4107. var anObject = _dereq_('../internals/an-object');
  4108. var tryToString = _dereq_('../internals/try-to-string');
  4109. var getIteratorMethod = _dereq_('../internals/get-iterator-method');
  4110. var TypeError = global.TypeError;
  4111. module.exports = function (argument, usingIterator) {
  4112. var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  4113. if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  4114. throw TypeError(tryToString(argument) + ' is not iterable');
  4115. };
  4116. },{"../internals/a-callable":69,"../internals/an-object":74,"../internals/function-call":115,"../internals/get-iterator-method":119,"../internals/global":122,"../internals/try-to-string":194}],121:[function(_dereq_,module,exports){
  4117. var aCallable = _dereq_('../internals/a-callable');
  4118. // `GetMethod` abstract operation
  4119. // https://tc39.es/ecma262/#sec-getmethod
  4120. module.exports = function (V, P) {
  4121. var func = V[P];
  4122. return func == null ? undefined : aCallable(func);
  4123. };
  4124. },{"../internals/a-callable":69}],122:[function(_dereq_,module,exports){
  4125. (function (global){(function (){
  4126. var check = function (it) {
  4127. return it && it.Math == Math && it;
  4128. };
  4129. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  4130. module.exports =
  4131. // eslint-disable-next-line es/no-global-this -- safe
  4132. check(typeof globalThis == 'object' && globalThis) ||
  4133. check(typeof window == 'object' && window) ||
  4134. // eslint-disable-next-line no-restricted-globals -- safe
  4135. check(typeof self == 'object' && self) ||
  4136. check(typeof global == 'object' && global) ||
  4137. // eslint-disable-next-line no-new-func -- fallback
  4138. (function () { return this; })() || Function('return this')();
  4139. }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  4140. },{}],123:[function(_dereq_,module,exports){
  4141. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4142. var toObject = _dereq_('../internals/to-object');
  4143. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  4144. // `HasOwnProperty` abstract operation
  4145. // https://tc39.es/ecma262/#sec-hasownproperty
  4146. module.exports = Object.hasOwn || function hasOwn(it, key) {
  4147. return hasOwnProperty(toObject(it), key);
  4148. };
  4149. },{"../internals/function-uncurry-this":117,"../internals/to-object":189}],124:[function(_dereq_,module,exports){
  4150. module.exports = {};
  4151. },{}],125:[function(_dereq_,module,exports){
  4152. var global = _dereq_('../internals/global');
  4153. module.exports = function (a, b) {
  4154. var console = global.console;
  4155. if (console && console.error) {
  4156. arguments.length == 1 ? console.error(a) : console.error(a, b);
  4157. }
  4158. };
  4159. },{"../internals/global":122}],126:[function(_dereq_,module,exports){
  4160. var getBuiltIn = _dereq_('../internals/get-built-in');
  4161. module.exports = getBuiltIn('document', 'documentElement');
  4162. },{"../internals/get-built-in":118}],127:[function(_dereq_,module,exports){
  4163. var DESCRIPTORS = _dereq_('../internals/descriptors');
  4164. var fails = _dereq_('../internals/fails');
  4165. var createElement = _dereq_('../internals/document-create-element');
  4166. // Thanks to IE8 for its funny defineProperty
  4167. module.exports = !DESCRIPTORS && !fails(function () {
  4168. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  4169. return Object.defineProperty(createElement('div'), 'a', {
  4170. get: function () { return 7; }
  4171. }).a != 7;
  4172. });
  4173. },{"../internals/descriptors":97,"../internals/document-create-element":98,"../internals/fails":111}],128:[function(_dereq_,module,exports){
  4174. var global = _dereq_('../internals/global');
  4175. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4176. var fails = _dereq_('../internals/fails');
  4177. var classof = _dereq_('../internals/classof-raw');
  4178. var Object = global.Object;
  4179. var split = uncurryThis(''.split);
  4180. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  4181. module.exports = fails(function () {
  4182. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  4183. // eslint-disable-next-line no-prototype-builtins -- safe
  4184. return !Object('z').propertyIsEnumerable(0);
  4185. }) ? function (it) {
  4186. return classof(it) == 'String' ? split(it, '') : Object(it);
  4187. } : Object;
  4188. },{"../internals/classof-raw":85,"../internals/fails":111,"../internals/function-uncurry-this":117,"../internals/global":122}],129:[function(_dereq_,module,exports){
  4189. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4190. var isCallable = _dereq_('../internals/is-callable');
  4191. var store = _dereq_('../internals/shared-store');
  4192. var functionToString = uncurryThis(Function.toString);
  4193. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  4194. if (!isCallable(store.inspectSource)) {
  4195. store.inspectSource = function (it) {
  4196. return functionToString(it);
  4197. };
  4198. }
  4199. module.exports = store.inspectSource;
  4200. },{"../internals/function-uncurry-this":117,"../internals/is-callable":134,"../internals/shared-store":180}],130:[function(_dereq_,module,exports){
  4201. var isObject = _dereq_('../internals/is-object');
  4202. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  4203. // `InstallErrorCause` abstract operation
  4204. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  4205. module.exports = function (O, options) {
  4206. if (isObject(options) && 'cause' in options) {
  4207. createNonEnumerableProperty(O, 'cause', options.cause);
  4208. }
  4209. };
  4210. },{"../internals/create-non-enumerable-property":92,"../internals/is-object":137}],131:[function(_dereq_,module,exports){
  4211. var NATIVE_WEAK_MAP = _dereq_('../internals/native-weak-map');
  4212. var global = _dereq_('../internals/global');
  4213. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4214. var isObject = _dereq_('../internals/is-object');
  4215. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  4216. var hasOwn = _dereq_('../internals/has-own-property');
  4217. var shared = _dereq_('../internals/shared-store');
  4218. var sharedKey = _dereq_('../internals/shared-key');
  4219. var hiddenKeys = _dereq_('../internals/hidden-keys');
  4220. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  4221. var TypeError = global.TypeError;
  4222. var WeakMap = global.WeakMap;
  4223. var set, get, has;
  4224. var enforce = function (it) {
  4225. return has(it) ? get(it) : set(it, {});
  4226. };
  4227. var getterFor = function (TYPE) {
  4228. return function (it) {
  4229. var state;
  4230. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  4231. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  4232. } return state;
  4233. };
  4234. };
  4235. if (NATIVE_WEAK_MAP || shared.state) {
  4236. var store = shared.state || (shared.state = new WeakMap());
  4237. var wmget = uncurryThis(store.get);
  4238. var wmhas = uncurryThis(store.has);
  4239. var wmset = uncurryThis(store.set);
  4240. set = function (it, metadata) {
  4241. if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  4242. metadata.facade = it;
  4243. wmset(store, it, metadata);
  4244. return metadata;
  4245. };
  4246. get = function (it) {
  4247. return wmget(store, it) || {};
  4248. };
  4249. has = function (it) {
  4250. return wmhas(store, it);
  4251. };
  4252. } else {
  4253. var STATE = sharedKey('state');
  4254. hiddenKeys[STATE] = true;
  4255. set = function (it, metadata) {
  4256. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  4257. metadata.facade = it;
  4258. createNonEnumerableProperty(it, STATE, metadata);
  4259. return metadata;
  4260. };
  4261. get = function (it) {
  4262. return hasOwn(it, STATE) ? it[STATE] : {};
  4263. };
  4264. has = function (it) {
  4265. return hasOwn(it, STATE);
  4266. };
  4267. }
  4268. module.exports = {
  4269. set: set,
  4270. get: get,
  4271. has: has,
  4272. enforce: enforce,
  4273. getterFor: getterFor
  4274. };
  4275. },{"../internals/create-non-enumerable-property":92,"../internals/function-uncurry-this":117,"../internals/global":122,"../internals/has-own-property":123,"../internals/hidden-keys":124,"../internals/is-object":137,"../internals/native-weak-map":149,"../internals/shared-key":179,"../internals/shared-store":180}],132:[function(_dereq_,module,exports){
  4276. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  4277. var Iterators = _dereq_('../internals/iterators');
  4278. var ITERATOR = wellKnownSymbol('iterator');
  4279. var ArrayPrototype = Array.prototype;
  4280. // check on default Array iterator
  4281. module.exports = function (it) {
  4282. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  4283. };
  4284. },{"../internals/iterators":144,"../internals/well-known-symbol":199}],133:[function(_dereq_,module,exports){
  4285. var classof = _dereq_('../internals/classof-raw');
  4286. // `IsArray` abstract operation
  4287. // https://tc39.es/ecma262/#sec-isarray
  4288. // eslint-disable-next-line es/no-array-isarray -- safe
  4289. module.exports = Array.isArray || function isArray(argument) {
  4290. return classof(argument) == 'Array';
  4291. };
  4292. },{"../internals/classof-raw":85}],134:[function(_dereq_,module,exports){
  4293. // `IsCallable` abstract operation
  4294. // https://tc39.es/ecma262/#sec-iscallable
  4295. module.exports = function (argument) {
  4296. return typeof argument == 'function';
  4297. };
  4298. },{}],135:[function(_dereq_,module,exports){
  4299. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4300. var fails = _dereq_('../internals/fails');
  4301. var isCallable = _dereq_('../internals/is-callable');
  4302. var classof = _dereq_('../internals/classof');
  4303. var getBuiltIn = _dereq_('../internals/get-built-in');
  4304. var inspectSource = _dereq_('../internals/inspect-source');
  4305. var noop = function () { /* empty */ };
  4306. var empty = [];
  4307. var construct = getBuiltIn('Reflect', 'construct');
  4308. var constructorRegExp = /^\s*(?:class|function)\b/;
  4309. var exec = uncurryThis(constructorRegExp.exec);
  4310. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  4311. var isConstructorModern = function isConstructor(argument) {
  4312. if (!isCallable(argument)) return false;
  4313. try {
  4314. construct(noop, empty, argument);
  4315. return true;
  4316. } catch (error) {
  4317. return false;
  4318. }
  4319. };
  4320. var isConstructorLegacy = function isConstructor(argument) {
  4321. if (!isCallable(argument)) return false;
  4322. switch (classof(argument)) {
  4323. case 'AsyncFunction':
  4324. case 'GeneratorFunction':
  4325. case 'AsyncGeneratorFunction': return false;
  4326. }
  4327. try {
  4328. // we can't check .prototype since constructors produced by .bind haven't it
  4329. // `Function#toString` throws on some built-it function in some legacy engines
  4330. // (for example, `DOMQuad` and similar in FF41-)
  4331. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  4332. } catch (error) {
  4333. return true;
  4334. }
  4335. };
  4336. isConstructorLegacy.sham = true;
  4337. // `IsConstructor` abstract operation
  4338. // https://tc39.es/ecma262/#sec-isconstructor
  4339. module.exports = !construct || fails(function () {
  4340. var called;
  4341. return isConstructorModern(isConstructorModern.call)
  4342. || !isConstructorModern(Object)
  4343. || !isConstructorModern(function () { called = true; })
  4344. || called;
  4345. }) ? isConstructorLegacy : isConstructorModern;
  4346. },{"../internals/classof":86,"../internals/fails":111,"../internals/function-uncurry-this":117,"../internals/get-built-in":118,"../internals/inspect-source":129,"../internals/is-callable":134}],136:[function(_dereq_,module,exports){
  4347. var fails = _dereq_('../internals/fails');
  4348. var isCallable = _dereq_('../internals/is-callable');
  4349. var replacement = /#|\.prototype\./;
  4350. var isForced = function (feature, detection) {
  4351. var value = data[normalize(feature)];
  4352. return value == POLYFILL ? true
  4353. : value == NATIVE ? false
  4354. : isCallable(detection) ? fails(detection)
  4355. : !!detection;
  4356. };
  4357. var normalize = isForced.normalize = function (string) {
  4358. return String(string).replace(replacement, '.').toLowerCase();
  4359. };
  4360. var data = isForced.data = {};
  4361. var NATIVE = isForced.NATIVE = 'N';
  4362. var POLYFILL = isForced.POLYFILL = 'P';
  4363. module.exports = isForced;
  4364. },{"../internals/fails":111,"../internals/is-callable":134}],137:[function(_dereq_,module,exports){
  4365. var isCallable = _dereq_('../internals/is-callable');
  4366. module.exports = function (it) {
  4367. return typeof it == 'object' ? it !== null : isCallable(it);
  4368. };
  4369. },{"../internals/is-callable":134}],138:[function(_dereq_,module,exports){
  4370. module.exports = true;
  4371. },{}],139:[function(_dereq_,module,exports){
  4372. var isObject = _dereq_('../internals/is-object');
  4373. var classof = _dereq_('../internals/classof-raw');
  4374. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  4375. var MATCH = wellKnownSymbol('match');
  4376. // `IsRegExp` abstract operation
  4377. // https://tc39.es/ecma262/#sec-isregexp
  4378. module.exports = function (it) {
  4379. var isRegExp;
  4380. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
  4381. };
  4382. },{"../internals/classof-raw":85,"../internals/is-object":137,"../internals/well-known-symbol":199}],140:[function(_dereq_,module,exports){
  4383. var global = _dereq_('../internals/global');
  4384. var getBuiltIn = _dereq_('../internals/get-built-in');
  4385. var isCallable = _dereq_('../internals/is-callable');
  4386. var isPrototypeOf = _dereq_('../internals/object-is-prototype-of');
  4387. var USE_SYMBOL_AS_UID = _dereq_('../internals/use-symbol-as-uid');
  4388. var Object = global.Object;
  4389. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  4390. return typeof it == 'symbol';
  4391. } : function (it) {
  4392. var $Symbol = getBuiltIn('Symbol');
  4393. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it));
  4394. };
  4395. },{"../internals/get-built-in":118,"../internals/global":122,"../internals/is-callable":134,"../internals/object-is-prototype-of":161,"../internals/use-symbol-as-uid":196}],141:[function(_dereq_,module,exports){
  4396. var global = _dereq_('../internals/global');
  4397. var bind = _dereq_('../internals/function-bind-context');
  4398. var call = _dereq_('../internals/function-call');
  4399. var anObject = _dereq_('../internals/an-object');
  4400. var tryToString = _dereq_('../internals/try-to-string');
  4401. var isArrayIteratorMethod = _dereq_('../internals/is-array-iterator-method');
  4402. var lengthOfArrayLike = _dereq_('../internals/length-of-array-like');
  4403. var isPrototypeOf = _dereq_('../internals/object-is-prototype-of');
  4404. var getIterator = _dereq_('../internals/get-iterator');
  4405. var getIteratorMethod = _dereq_('../internals/get-iterator-method');
  4406. var iteratorClose = _dereq_('../internals/iterator-close');
  4407. var TypeError = global.TypeError;
  4408. var Result = function (stopped, result) {
  4409. this.stopped = stopped;
  4410. this.result = result;
  4411. };
  4412. var ResultPrototype = Result.prototype;
  4413. module.exports = function (iterable, unboundFunction, options) {
  4414. var that = options && options.that;
  4415. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  4416. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  4417. var INTERRUPTED = !!(options && options.INTERRUPTED);
  4418. var fn = bind(unboundFunction, that);
  4419. var iterator, iterFn, index, length, result, next, step;
  4420. var stop = function (condition) {
  4421. if (iterator) iteratorClose(iterator, 'normal', condition);
  4422. return new Result(true, condition);
  4423. };
  4424. var callFn = function (value) {
  4425. if (AS_ENTRIES) {
  4426. anObject(value);
  4427. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  4428. } return INTERRUPTED ? fn(value, stop) : fn(value);
  4429. };
  4430. if (IS_ITERATOR) {
  4431. iterator = iterable;
  4432. } else {
  4433. iterFn = getIteratorMethod(iterable);
  4434. if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable');
  4435. // optimisation for array iterators
  4436. if (isArrayIteratorMethod(iterFn)) {
  4437. for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
  4438. result = callFn(iterable[index]);
  4439. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  4440. } return new Result(false);
  4441. }
  4442. iterator = getIterator(iterable, iterFn);
  4443. }
  4444. next = iterator.next;
  4445. while (!(step = call(next, iterator)).done) {
  4446. try {
  4447. result = callFn(step.value);
  4448. } catch (error) {
  4449. iteratorClose(iterator, 'throw', error);
  4450. }
  4451. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  4452. } return new Result(false);
  4453. };
  4454. },{"../internals/an-object":74,"../internals/function-bind-context":113,"../internals/function-call":115,"../internals/get-iterator":120,"../internals/get-iterator-method":119,"../internals/global":122,"../internals/is-array-iterator-method":132,"../internals/iterator-close":142,"../internals/length-of-array-like":145,"../internals/object-is-prototype-of":161,"../internals/try-to-string":194}],142:[function(_dereq_,module,exports){
  4455. var call = _dereq_('../internals/function-call');
  4456. var anObject = _dereq_('../internals/an-object');
  4457. var getMethod = _dereq_('../internals/get-method');
  4458. module.exports = function (iterator, kind, value) {
  4459. var innerResult, innerError;
  4460. anObject(iterator);
  4461. try {
  4462. innerResult = getMethod(iterator, 'return');
  4463. if (!innerResult) {
  4464. if (kind === 'throw') throw value;
  4465. return value;
  4466. }
  4467. innerResult = call(innerResult, iterator);
  4468. } catch (error) {
  4469. innerError = true;
  4470. innerResult = error;
  4471. }
  4472. if (kind === 'throw') throw value;
  4473. if (innerError) throw innerResult;
  4474. anObject(innerResult);
  4475. return value;
  4476. };
  4477. },{"../internals/an-object":74,"../internals/function-call":115,"../internals/get-method":121}],143:[function(_dereq_,module,exports){
  4478. 'use strict';
  4479. var fails = _dereq_('../internals/fails');
  4480. var isCallable = _dereq_('../internals/is-callable');
  4481. var create = _dereq_('../internals/object-create');
  4482. var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
  4483. var redefine = _dereq_('../internals/redefine');
  4484. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  4485. var IS_PURE = _dereq_('../internals/is-pure');
  4486. var ITERATOR = wellKnownSymbol('iterator');
  4487. var BUGGY_SAFARI_ITERATORS = false;
  4488. // `%IteratorPrototype%` object
  4489. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  4490. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  4491. /* eslint-disable es/no-array-prototype-keys -- safe */
  4492. if ([].keys) {
  4493. arrayIterator = [].keys();
  4494. // Safari 8 has buggy iterators w/o `next`
  4495. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  4496. else {
  4497. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  4498. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  4499. }
  4500. }
  4501. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  4502. var test = {};
  4503. // FF44- legacy iterators case
  4504. return IteratorPrototype[ITERATOR].call(test) !== test;
  4505. });
  4506. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  4507. else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
  4508. // `%IteratorPrototype%[@@iterator]()` method
  4509. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  4510. if (!isCallable(IteratorPrototype[ITERATOR])) {
  4511. redefine(IteratorPrototype, ITERATOR, function () {
  4512. return this;
  4513. });
  4514. }
  4515. module.exports = {
  4516. IteratorPrototype: IteratorPrototype,
  4517. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  4518. };
  4519. },{"../internals/fails":111,"../internals/is-callable":134,"../internals/is-pure":138,"../internals/object-create":153,"../internals/object-get-prototype-of":160,"../internals/redefine":174,"../internals/well-known-symbol":199}],144:[function(_dereq_,module,exports){
  4520. arguments[4][124][0].apply(exports,arguments)
  4521. },{"dup":124}],145:[function(_dereq_,module,exports){
  4522. var toLength = _dereq_('../internals/to-length');
  4523. // `LengthOfArrayLike` abstract operation
  4524. // https://tc39.es/ecma262/#sec-lengthofarraylike
  4525. module.exports = function (obj) {
  4526. return toLength(obj.length);
  4527. };
  4528. },{"../internals/to-length":188}],146:[function(_dereq_,module,exports){
  4529. var global = _dereq_('../internals/global');
  4530. var bind = _dereq_('../internals/function-bind-context');
  4531. var getOwnPropertyDescriptor = _dereq_('../internals/object-get-own-property-descriptor').f;
  4532. var macrotask = _dereq_('../internals/task').set;
  4533. var IS_IOS = _dereq_('../internals/engine-is-ios');
  4534. var IS_IOS_PEBBLE = _dereq_('../internals/engine-is-ios-pebble');
  4535. var IS_WEBOS_WEBKIT = _dereq_('../internals/engine-is-webos-webkit');
  4536. var IS_NODE = _dereq_('../internals/engine-is-node');
  4537. var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
  4538. var document = global.document;
  4539. var process = global.process;
  4540. var Promise = global.Promise;
  4541. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  4542. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
  4543. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  4544. var flush, head, last, notify, toggle, node, promise, then;
  4545. // modern engines have queueMicrotask method
  4546. if (!queueMicrotask) {
  4547. flush = function () {
  4548. var parent, fn;
  4549. if (IS_NODE && (parent = process.domain)) parent.exit();
  4550. while (head) {
  4551. fn = head.fn;
  4552. head = head.next;
  4553. try {
  4554. fn();
  4555. } catch (error) {
  4556. if (head) notify();
  4557. else last = undefined;
  4558. throw error;
  4559. }
  4560. } last = undefined;
  4561. if (parent) parent.enter();
  4562. };
  4563. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  4564. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  4565. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  4566. toggle = true;
  4567. node = document.createTextNode('');
  4568. new MutationObserver(flush).observe(node, { characterData: true });
  4569. notify = function () {
  4570. node.data = toggle = !toggle;
  4571. };
  4572. // environments with maybe non-completely correct, but existent Promise
  4573. } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
  4574. // Promise.resolve without an argument throws an error in LG WebOS 2
  4575. promise = Promise.resolve(undefined);
  4576. // workaround of WebKit ~ iOS Safari 10.1 bug
  4577. promise.constructor = Promise;
  4578. then = bind(promise.then, promise);
  4579. notify = function () {
  4580. then(flush);
  4581. };
  4582. // Node.js without promises
  4583. } else if (IS_NODE) {
  4584. notify = function () {
  4585. process.nextTick(flush);
  4586. };
  4587. // for other environments - macrotask based on:
  4588. // - setImmediate
  4589. // - MessageChannel
  4590. // - window.postMessag
  4591. // - onreadystatechange
  4592. // - setTimeout
  4593. } else {
  4594. // strange IE + webpack dev server bug - use .bind(global)
  4595. macrotask = bind(macrotask, global);
  4596. notify = function () {
  4597. macrotask(flush);
  4598. };
  4599. }
  4600. }
  4601. module.exports = queueMicrotask || function (fn) {
  4602. var task = { fn: fn, next: undefined };
  4603. if (last) last.next = task;
  4604. if (!head) {
  4605. head = task;
  4606. notify();
  4607. } last = task;
  4608. };
  4609. },{"../internals/engine-is-ios":102,"../internals/engine-is-ios-pebble":101,"../internals/engine-is-node":103,"../internals/engine-is-webos-webkit":104,"../internals/function-bind-context":113,"../internals/global":122,"../internals/object-get-own-property-descriptor":156,"../internals/task":184}],147:[function(_dereq_,module,exports){
  4610. var global = _dereq_('../internals/global');
  4611. module.exports = global.Promise;
  4612. },{"../internals/global":122}],148:[function(_dereq_,module,exports){
  4613. /* eslint-disable es/no-symbol -- required for testing */
  4614. var V8_VERSION = _dereq_('../internals/engine-v8-version');
  4615. var fails = _dereq_('../internals/fails');
  4616. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  4617. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  4618. var symbol = Symbol();
  4619. // Chrome 38 Symbol has incorrect toString conversion
  4620. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  4621. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  4622. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  4623. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  4624. });
  4625. },{"../internals/engine-v8-version":106,"../internals/fails":111}],149:[function(_dereq_,module,exports){
  4626. var global = _dereq_('../internals/global');
  4627. var isCallable = _dereq_('../internals/is-callable');
  4628. var inspectSource = _dereq_('../internals/inspect-source');
  4629. var WeakMap = global.WeakMap;
  4630. module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
  4631. },{"../internals/global":122,"../internals/inspect-source":129,"../internals/is-callable":134}],150:[function(_dereq_,module,exports){
  4632. 'use strict';
  4633. var aCallable = _dereq_('../internals/a-callable');
  4634. var PromiseCapability = function (C) {
  4635. var resolve, reject;
  4636. this.promise = new C(function ($$resolve, $$reject) {
  4637. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  4638. resolve = $$resolve;
  4639. reject = $$reject;
  4640. });
  4641. this.resolve = aCallable(resolve);
  4642. this.reject = aCallable(reject);
  4643. };
  4644. // `NewPromiseCapability` abstract operation
  4645. // https://tc39.es/ecma262/#sec-newpromisecapability
  4646. module.exports.f = function (C) {
  4647. return new PromiseCapability(C);
  4648. };
  4649. },{"../internals/a-callable":69}],151:[function(_dereq_,module,exports){
  4650. var toString = _dereq_('../internals/to-string');
  4651. module.exports = function (argument, $default) {
  4652. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  4653. };
  4654. },{"../internals/to-string":193}],152:[function(_dereq_,module,exports){
  4655. var global = _dereq_('../internals/global');
  4656. var isRegExp = _dereq_('../internals/is-regexp');
  4657. var TypeError = global.TypeError;
  4658. module.exports = function (it) {
  4659. if (isRegExp(it)) {
  4660. throw TypeError("The method doesn't accept regular expressions");
  4661. } return it;
  4662. };
  4663. },{"../internals/global":122,"../internals/is-regexp":139}],153:[function(_dereq_,module,exports){
  4664. /* global ActiveXObject -- old IE, WSH */
  4665. var anObject = _dereq_('../internals/an-object');
  4666. var definePropertiesModule = _dereq_('../internals/object-define-properties');
  4667. var enumBugKeys = _dereq_('../internals/enum-bug-keys');
  4668. var hiddenKeys = _dereq_('../internals/hidden-keys');
  4669. var html = _dereq_('../internals/html');
  4670. var documentCreateElement = _dereq_('../internals/document-create-element');
  4671. var sharedKey = _dereq_('../internals/shared-key');
  4672. var GT = '>';
  4673. var LT = '<';
  4674. var PROTOTYPE = 'prototype';
  4675. var SCRIPT = 'script';
  4676. var IE_PROTO = sharedKey('IE_PROTO');
  4677. var EmptyConstructor = function () { /* empty */ };
  4678. var scriptTag = function (content) {
  4679. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  4680. };
  4681. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  4682. var NullProtoObjectViaActiveX = function (activeXDocument) {
  4683. activeXDocument.write(scriptTag(''));
  4684. activeXDocument.close();
  4685. var temp = activeXDocument.parentWindow.Object;
  4686. activeXDocument = null; // avoid memory leak
  4687. return temp;
  4688. };
  4689. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  4690. var NullProtoObjectViaIFrame = function () {
  4691. // Thrash, waste and sodomy: IE GC bug
  4692. var iframe = documentCreateElement('iframe');
  4693. var JS = 'java' + SCRIPT + ':';
  4694. var iframeDocument;
  4695. iframe.style.display = 'none';
  4696. html.appendChild(iframe);
  4697. // https://github.com/zloirock/core-js/issues/475
  4698. iframe.src = String(JS);
  4699. iframeDocument = iframe.contentWindow.document;
  4700. iframeDocument.open();
  4701. iframeDocument.write(scriptTag('document.F=Object'));
  4702. iframeDocument.close();
  4703. return iframeDocument.F;
  4704. };
  4705. // Check for document.domain and active x support
  4706. // No need to use active x approach when document.domain is not set
  4707. // see https://github.com/es-shims/es5-shim/issues/150
  4708. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  4709. // avoid IE GC bug
  4710. var activeXDocument;
  4711. var NullProtoObject = function () {
  4712. try {
  4713. activeXDocument = new ActiveXObject('htmlfile');
  4714. } catch (error) { /* ignore */ }
  4715. NullProtoObject = typeof document != 'undefined'
  4716. ? document.domain && activeXDocument
  4717. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  4718. : NullProtoObjectViaIFrame()
  4719. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  4720. var length = enumBugKeys.length;
  4721. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  4722. return NullProtoObject();
  4723. };
  4724. hiddenKeys[IE_PROTO] = true;
  4725. // `Object.create` method
  4726. // https://tc39.es/ecma262/#sec-object.create
  4727. module.exports = Object.create || function create(O, Properties) {
  4728. var result;
  4729. if (O !== null) {
  4730. EmptyConstructor[PROTOTYPE] = anObject(O);
  4731. result = new EmptyConstructor();
  4732. EmptyConstructor[PROTOTYPE] = null;
  4733. // add "__proto__" for Object.getPrototypeOf polyfill
  4734. result[IE_PROTO] = O;
  4735. } else result = NullProtoObject();
  4736. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  4737. };
  4738. },{"../internals/an-object":74,"../internals/document-create-element":98,"../internals/enum-bug-keys":108,"../internals/hidden-keys":124,"../internals/html":126,"../internals/object-define-properties":154,"../internals/shared-key":179}],154:[function(_dereq_,module,exports){
  4739. var DESCRIPTORS = _dereq_('../internals/descriptors');
  4740. var V8_PROTOTYPE_DEFINE_BUG = _dereq_('../internals/v8-prototype-define-bug');
  4741. var definePropertyModule = _dereq_('../internals/object-define-property');
  4742. var anObject = _dereq_('../internals/an-object');
  4743. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  4744. var objectKeys = _dereq_('../internals/object-keys');
  4745. // `Object.defineProperties` method
  4746. // https://tc39.es/ecma262/#sec-object.defineproperties
  4747. // eslint-disable-next-line es/no-object-defineproperties -- safe
  4748. exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  4749. anObject(O);
  4750. var props = toIndexedObject(Properties);
  4751. var keys = objectKeys(Properties);
  4752. var length = keys.length;
  4753. var index = 0;
  4754. var key;
  4755. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  4756. return O;
  4757. };
  4758. },{"../internals/an-object":74,"../internals/descriptors":97,"../internals/object-define-property":155,"../internals/object-keys":163,"../internals/to-indexed-object":186,"../internals/v8-prototype-define-bug":197}],155:[function(_dereq_,module,exports){
  4759. var global = _dereq_('../internals/global');
  4760. var DESCRIPTORS = _dereq_('../internals/descriptors');
  4761. var IE8_DOM_DEFINE = _dereq_('../internals/ie8-dom-define');
  4762. var V8_PROTOTYPE_DEFINE_BUG = _dereq_('../internals/v8-prototype-define-bug');
  4763. var anObject = _dereq_('../internals/an-object');
  4764. var toPropertyKey = _dereq_('../internals/to-property-key');
  4765. var TypeError = global.TypeError;
  4766. // eslint-disable-next-line es/no-object-defineproperty -- safe
  4767. var $defineProperty = Object.defineProperty;
  4768. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  4769. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  4770. var ENUMERABLE = 'enumerable';
  4771. var CONFIGURABLE = 'configurable';
  4772. var WRITABLE = 'writable';
  4773. // `Object.defineProperty` method
  4774. // https://tc39.es/ecma262/#sec-object.defineproperty
  4775. exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  4776. anObject(O);
  4777. P = toPropertyKey(P);
  4778. anObject(Attributes);
  4779. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  4780. var current = $getOwnPropertyDescriptor(O, P);
  4781. if (current && current[WRITABLE]) {
  4782. O[P] = Attributes.value;
  4783. Attributes = {
  4784. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  4785. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  4786. writable: false
  4787. };
  4788. }
  4789. } return $defineProperty(O, P, Attributes);
  4790. } : $defineProperty : function defineProperty(O, P, Attributes) {
  4791. anObject(O);
  4792. P = toPropertyKey(P);
  4793. anObject(Attributes);
  4794. if (IE8_DOM_DEFINE) try {
  4795. return $defineProperty(O, P, Attributes);
  4796. } catch (error) { /* empty */ }
  4797. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  4798. if ('value' in Attributes) O[P] = Attributes.value;
  4799. return O;
  4800. };
  4801. },{"../internals/an-object":74,"../internals/descriptors":97,"../internals/global":122,"../internals/ie8-dom-define":127,"../internals/to-property-key":191,"../internals/v8-prototype-define-bug":197}],156:[function(_dereq_,module,exports){
  4802. var DESCRIPTORS = _dereq_('../internals/descriptors');
  4803. var call = _dereq_('../internals/function-call');
  4804. var propertyIsEnumerableModule = _dereq_('../internals/object-property-is-enumerable');
  4805. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  4806. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  4807. var toPropertyKey = _dereq_('../internals/to-property-key');
  4808. var hasOwn = _dereq_('../internals/has-own-property');
  4809. var IE8_DOM_DEFINE = _dereq_('../internals/ie8-dom-define');
  4810. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  4811. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  4812. // `Object.getOwnPropertyDescriptor` method
  4813. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  4814. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  4815. O = toIndexedObject(O);
  4816. P = toPropertyKey(P);
  4817. if (IE8_DOM_DEFINE) try {
  4818. return $getOwnPropertyDescriptor(O, P);
  4819. } catch (error) { /* empty */ }
  4820. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  4821. };
  4822. },{"../internals/create-property-descriptor":93,"../internals/descriptors":97,"../internals/function-call":115,"../internals/has-own-property":123,"../internals/ie8-dom-define":127,"../internals/object-property-is-enumerable":164,"../internals/to-indexed-object":186,"../internals/to-property-key":191}],157:[function(_dereq_,module,exports){
  4823. /* eslint-disable es/no-object-getownpropertynames -- safe */
  4824. var classof = _dereq_('../internals/classof-raw');
  4825. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  4826. var $getOwnPropertyNames = _dereq_('../internals/object-get-own-property-names').f;
  4827. var arraySlice = _dereq_('../internals/array-slice-simple');
  4828. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  4829. ? Object.getOwnPropertyNames(window) : [];
  4830. var getWindowNames = function (it) {
  4831. try {
  4832. return $getOwnPropertyNames(it);
  4833. } catch (error) {
  4834. return arraySlice(windowNames);
  4835. }
  4836. };
  4837. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  4838. module.exports.f = function getOwnPropertyNames(it) {
  4839. return windowNames && classof(it) == 'Window'
  4840. ? getWindowNames(it)
  4841. : $getOwnPropertyNames(toIndexedObject(it));
  4842. };
  4843. },{"../internals/array-slice-simple":80,"../internals/classof-raw":85,"../internals/object-get-own-property-names":158,"../internals/to-indexed-object":186}],158:[function(_dereq_,module,exports){
  4844. var internalObjectKeys = _dereq_('../internals/object-keys-internal');
  4845. var enumBugKeys = _dereq_('../internals/enum-bug-keys');
  4846. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  4847. // `Object.getOwnPropertyNames` method
  4848. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  4849. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  4850. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  4851. return internalObjectKeys(O, hiddenKeys);
  4852. };
  4853. },{"../internals/enum-bug-keys":108,"../internals/object-keys-internal":162}],159:[function(_dereq_,module,exports){
  4854. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  4855. exports.f = Object.getOwnPropertySymbols;
  4856. },{}],160:[function(_dereq_,module,exports){
  4857. var global = _dereq_('../internals/global');
  4858. var hasOwn = _dereq_('../internals/has-own-property');
  4859. var isCallable = _dereq_('../internals/is-callable');
  4860. var toObject = _dereq_('../internals/to-object');
  4861. var sharedKey = _dereq_('../internals/shared-key');
  4862. var CORRECT_PROTOTYPE_GETTER = _dereq_('../internals/correct-prototype-getter');
  4863. var IE_PROTO = sharedKey('IE_PROTO');
  4864. var Object = global.Object;
  4865. var ObjectPrototype = Object.prototype;
  4866. // `Object.getPrototypeOf` method
  4867. // https://tc39.es/ecma262/#sec-object.getprototypeof
  4868. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  4869. var object = toObject(O);
  4870. if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  4871. var constructor = object.constructor;
  4872. if (isCallable(constructor) && object instanceof constructor) {
  4873. return constructor.prototype;
  4874. } return object instanceof Object ? ObjectPrototype : null;
  4875. };
  4876. },{"../internals/correct-prototype-getter":90,"../internals/global":122,"../internals/has-own-property":123,"../internals/is-callable":134,"../internals/shared-key":179,"../internals/to-object":189}],161:[function(_dereq_,module,exports){
  4877. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4878. module.exports = uncurryThis({}.isPrototypeOf);
  4879. },{"../internals/function-uncurry-this":117}],162:[function(_dereq_,module,exports){
  4880. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4881. var hasOwn = _dereq_('../internals/has-own-property');
  4882. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  4883. var indexOf = _dereq_('../internals/array-includes').indexOf;
  4884. var hiddenKeys = _dereq_('../internals/hidden-keys');
  4885. var push = uncurryThis([].push);
  4886. module.exports = function (object, names) {
  4887. var O = toIndexedObject(object);
  4888. var i = 0;
  4889. var result = [];
  4890. var key;
  4891. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  4892. // Don't enum bug & hidden keys
  4893. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  4894. ~indexOf(result, key) || push(result, key);
  4895. }
  4896. return result;
  4897. };
  4898. },{"../internals/array-includes":76,"../internals/function-uncurry-this":117,"../internals/has-own-property":123,"../internals/hidden-keys":124,"../internals/to-indexed-object":186}],163:[function(_dereq_,module,exports){
  4899. var internalObjectKeys = _dereq_('../internals/object-keys-internal');
  4900. var enumBugKeys = _dereq_('../internals/enum-bug-keys');
  4901. // `Object.keys` method
  4902. // https://tc39.es/ecma262/#sec-object.keys
  4903. // eslint-disable-next-line es/no-object-keys -- safe
  4904. module.exports = Object.keys || function keys(O) {
  4905. return internalObjectKeys(O, enumBugKeys);
  4906. };
  4907. },{"../internals/enum-bug-keys":108,"../internals/object-keys-internal":162}],164:[function(_dereq_,module,exports){
  4908. 'use strict';
  4909. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  4910. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  4911. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  4912. // Nashorn ~ JDK8 bug
  4913. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  4914. // `Object.prototype.propertyIsEnumerable` method implementation
  4915. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  4916. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  4917. var descriptor = getOwnPropertyDescriptor(this, V);
  4918. return !!descriptor && descriptor.enumerable;
  4919. } : $propertyIsEnumerable;
  4920. },{}],165:[function(_dereq_,module,exports){
  4921. /* eslint-disable no-proto -- safe */
  4922. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4923. var anObject = _dereq_('../internals/an-object');
  4924. var aPossiblePrototype = _dereq_('../internals/a-possible-prototype');
  4925. // `Object.setPrototypeOf` method
  4926. // https://tc39.es/ecma262/#sec-object.setprototypeof
  4927. // Works with __proto__ only. Old v8 can't work with null proto objects.
  4928. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  4929. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  4930. var CORRECT_SETTER = false;
  4931. var test = {};
  4932. var setter;
  4933. try {
  4934. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  4935. setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  4936. setter(test, []);
  4937. CORRECT_SETTER = test instanceof Array;
  4938. } catch (error) { /* empty */ }
  4939. return function setPrototypeOf(O, proto) {
  4940. anObject(O);
  4941. aPossiblePrototype(proto);
  4942. if (CORRECT_SETTER) setter(O, proto);
  4943. else O.__proto__ = proto;
  4944. return O;
  4945. };
  4946. }() : undefined);
  4947. },{"../internals/a-possible-prototype":71,"../internals/an-object":74,"../internals/function-uncurry-this":117}],166:[function(_dereq_,module,exports){
  4948. 'use strict';
  4949. var TO_STRING_TAG_SUPPORT = _dereq_('../internals/to-string-tag-support');
  4950. var classof = _dereq_('../internals/classof');
  4951. // `Object.prototype.toString` method implementation
  4952. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  4953. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  4954. return '[object ' + classof(this) + ']';
  4955. };
  4956. },{"../internals/classof":86,"../internals/to-string-tag-support":192}],167:[function(_dereq_,module,exports){
  4957. var global = _dereq_('../internals/global');
  4958. var call = _dereq_('../internals/function-call');
  4959. var isCallable = _dereq_('../internals/is-callable');
  4960. var isObject = _dereq_('../internals/is-object');
  4961. var TypeError = global.TypeError;
  4962. // `OrdinaryToPrimitive` abstract operation
  4963. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  4964. module.exports = function (input, pref) {
  4965. var fn, val;
  4966. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  4967. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  4968. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  4969. throw TypeError("Can't convert object to primitive value");
  4970. };
  4971. },{"../internals/function-call":115,"../internals/global":122,"../internals/is-callable":134,"../internals/is-object":137}],168:[function(_dereq_,module,exports){
  4972. var getBuiltIn = _dereq_('../internals/get-built-in');
  4973. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  4974. var getOwnPropertyNamesModule = _dereq_('../internals/object-get-own-property-names');
  4975. var getOwnPropertySymbolsModule = _dereq_('../internals/object-get-own-property-symbols');
  4976. var anObject = _dereq_('../internals/an-object');
  4977. var concat = uncurryThis([].concat);
  4978. // all object keys, includes non-enumerable and symbols
  4979. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  4980. var keys = getOwnPropertyNamesModule.f(anObject(it));
  4981. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  4982. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  4983. };
  4984. },{"../internals/an-object":74,"../internals/function-uncurry-this":117,"../internals/get-built-in":118,"../internals/object-get-own-property-names":158,"../internals/object-get-own-property-symbols":159}],169:[function(_dereq_,module,exports){
  4985. arguments[4][124][0].apply(exports,arguments)
  4986. },{"dup":124}],170:[function(_dereq_,module,exports){
  4987. module.exports = function (exec) {
  4988. try {
  4989. return { error: false, value: exec() };
  4990. } catch (error) {
  4991. return { error: true, value: error };
  4992. }
  4993. };
  4994. },{}],171:[function(_dereq_,module,exports){
  4995. var anObject = _dereq_('../internals/an-object');
  4996. var isObject = _dereq_('../internals/is-object');
  4997. var newPromiseCapability = _dereq_('../internals/new-promise-capability');
  4998. module.exports = function (C, x) {
  4999. anObject(C);
  5000. if (isObject(x) && x.constructor === C) return x;
  5001. var promiseCapability = newPromiseCapability.f(C);
  5002. var resolve = promiseCapability.resolve;
  5003. resolve(x);
  5004. return promiseCapability.promise;
  5005. };
  5006. },{"../internals/an-object":74,"../internals/is-object":137,"../internals/new-promise-capability":150}],172:[function(_dereq_,module,exports){
  5007. var Queue = function () {
  5008. this.head = null;
  5009. this.tail = null;
  5010. };
  5011. Queue.prototype = {
  5012. add: function (item) {
  5013. var entry = { item: item, next: null };
  5014. if (this.head) this.tail.next = entry;
  5015. else this.head = entry;
  5016. this.tail = entry;
  5017. },
  5018. get: function () {
  5019. var entry = this.head;
  5020. if (entry) {
  5021. this.head = entry.next;
  5022. if (this.tail === entry) this.tail = null;
  5023. return entry.item;
  5024. }
  5025. }
  5026. };
  5027. module.exports = Queue;
  5028. },{}],173:[function(_dereq_,module,exports){
  5029. var redefine = _dereq_('../internals/redefine');
  5030. module.exports = function (target, src, options) {
  5031. for (var key in src) {
  5032. if (options && options.unsafe && target[key]) target[key] = src[key];
  5033. else redefine(target, key, src[key], options);
  5034. } return target;
  5035. };
  5036. },{"../internals/redefine":174}],174:[function(_dereq_,module,exports){
  5037. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  5038. module.exports = function (target, key, value, options) {
  5039. if (options && options.enumerable) target[key] = value;
  5040. else createNonEnumerableProperty(target, key, value);
  5041. };
  5042. },{"../internals/create-non-enumerable-property":92}],175:[function(_dereq_,module,exports){
  5043. var global = _dereq_('../internals/global');
  5044. var TypeError = global.TypeError;
  5045. // `RequireObjectCoercible` abstract operation
  5046. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  5047. module.exports = function (it) {
  5048. if (it == undefined) throw TypeError("Can't call method on " + it);
  5049. return it;
  5050. };
  5051. },{"../internals/global":122}],176:[function(_dereq_,module,exports){
  5052. var global = _dereq_('../internals/global');
  5053. // eslint-disable-next-line es/no-object-defineproperty -- safe
  5054. var defineProperty = Object.defineProperty;
  5055. module.exports = function (key, value) {
  5056. try {
  5057. defineProperty(global, key, { value: value, configurable: true, writable: true });
  5058. } catch (error) {
  5059. global[key] = value;
  5060. } return value;
  5061. };
  5062. },{"../internals/global":122}],177:[function(_dereq_,module,exports){
  5063. 'use strict';
  5064. var getBuiltIn = _dereq_('../internals/get-built-in');
  5065. var definePropertyModule = _dereq_('../internals/object-define-property');
  5066. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5067. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5068. var SPECIES = wellKnownSymbol('species');
  5069. module.exports = function (CONSTRUCTOR_NAME) {
  5070. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  5071. var defineProperty = definePropertyModule.f;
  5072. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  5073. defineProperty(Constructor, SPECIES, {
  5074. configurable: true,
  5075. get: function () { return this; }
  5076. });
  5077. }
  5078. };
  5079. },{"../internals/descriptors":97,"../internals/get-built-in":118,"../internals/object-define-property":155,"../internals/well-known-symbol":199}],178:[function(_dereq_,module,exports){
  5080. var TO_STRING_TAG_SUPPORT = _dereq_('../internals/to-string-tag-support');
  5081. var defineProperty = _dereq_('../internals/object-define-property').f;
  5082. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  5083. var hasOwn = _dereq_('../internals/has-own-property');
  5084. var toString = _dereq_('../internals/object-to-string');
  5085. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5086. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  5087. module.exports = function (it, TAG, STATIC, SET_METHOD) {
  5088. if (it) {
  5089. var target = STATIC ? it : it.prototype;
  5090. if (!hasOwn(target, TO_STRING_TAG)) {
  5091. defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });
  5092. }
  5093. if (SET_METHOD && !TO_STRING_TAG_SUPPORT) {
  5094. createNonEnumerableProperty(target, 'toString', toString);
  5095. }
  5096. }
  5097. };
  5098. },{"../internals/create-non-enumerable-property":92,"../internals/has-own-property":123,"../internals/object-define-property":155,"../internals/object-to-string":166,"../internals/to-string-tag-support":192,"../internals/well-known-symbol":199}],179:[function(_dereq_,module,exports){
  5099. var shared = _dereq_('../internals/shared');
  5100. var uid = _dereq_('../internals/uid');
  5101. var keys = shared('keys');
  5102. module.exports = function (key) {
  5103. return keys[key] || (keys[key] = uid(key));
  5104. };
  5105. },{"../internals/shared":181,"../internals/uid":195}],180:[function(_dereq_,module,exports){
  5106. var global = _dereq_('../internals/global');
  5107. var setGlobal = _dereq_('../internals/set-global');
  5108. var SHARED = '__core-js_shared__';
  5109. var store = global[SHARED] || setGlobal(SHARED, {});
  5110. module.exports = store;
  5111. },{"../internals/global":122,"../internals/set-global":176}],181:[function(_dereq_,module,exports){
  5112. var IS_PURE = _dereq_('../internals/is-pure');
  5113. var store = _dereq_('../internals/shared-store');
  5114. (module.exports = function (key, value) {
  5115. return store[key] || (store[key] = value !== undefined ? value : {});
  5116. })('versions', []).push({
  5117. version: '3.20.3',
  5118. mode: IS_PURE ? 'pure' : 'global',
  5119. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  5120. license: 'https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE',
  5121. source: 'https://github.com/zloirock/core-js'
  5122. });
  5123. },{"../internals/is-pure":138,"../internals/shared-store":180}],182:[function(_dereq_,module,exports){
  5124. var anObject = _dereq_('../internals/an-object');
  5125. var aConstructor = _dereq_('../internals/a-constructor');
  5126. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5127. var SPECIES = wellKnownSymbol('species');
  5128. // `SpeciesConstructor` abstract operation
  5129. // https://tc39.es/ecma262/#sec-speciesconstructor
  5130. module.exports = function (O, defaultConstructor) {
  5131. var C = anObject(O).constructor;
  5132. var S;
  5133. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
  5134. };
  5135. },{"../internals/a-constructor":70,"../internals/an-object":74,"../internals/well-known-symbol":199}],183:[function(_dereq_,module,exports){
  5136. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  5137. var toIntegerOrInfinity = _dereq_('../internals/to-integer-or-infinity');
  5138. var toString = _dereq_('../internals/to-string');
  5139. var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
  5140. var charAt = uncurryThis(''.charAt);
  5141. var charCodeAt = uncurryThis(''.charCodeAt);
  5142. var stringSlice = uncurryThis(''.slice);
  5143. var createMethod = function (CONVERT_TO_STRING) {
  5144. return function ($this, pos) {
  5145. var S = toString(requireObjectCoercible($this));
  5146. var position = toIntegerOrInfinity(pos);
  5147. var size = S.length;
  5148. var first, second;
  5149. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  5150. first = charCodeAt(S, position);
  5151. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  5152. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  5153. ? CONVERT_TO_STRING
  5154. ? charAt(S, position)
  5155. : first
  5156. : CONVERT_TO_STRING
  5157. ? stringSlice(S, position, position + 2)
  5158. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  5159. };
  5160. };
  5161. module.exports = {
  5162. // `String.prototype.codePointAt` method
  5163. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  5164. codeAt: createMethod(false),
  5165. // `String.prototype.at` method
  5166. // https://github.com/mathiasbynens/String.prototype.at
  5167. charAt: createMethod(true)
  5168. };
  5169. },{"../internals/function-uncurry-this":117,"../internals/require-object-coercible":175,"../internals/to-integer-or-infinity":187,"../internals/to-string":193}],184:[function(_dereq_,module,exports){
  5170. var global = _dereq_('../internals/global');
  5171. var apply = _dereq_('../internals/function-apply');
  5172. var bind = _dereq_('../internals/function-bind-context');
  5173. var isCallable = _dereq_('../internals/is-callable');
  5174. var hasOwn = _dereq_('../internals/has-own-property');
  5175. var fails = _dereq_('../internals/fails');
  5176. var html = _dereq_('../internals/html');
  5177. var arraySlice = _dereq_('../internals/array-slice');
  5178. var createElement = _dereq_('../internals/document-create-element');
  5179. var IS_IOS = _dereq_('../internals/engine-is-ios');
  5180. var IS_NODE = _dereq_('../internals/engine-is-node');
  5181. var set = global.setImmediate;
  5182. var clear = global.clearImmediate;
  5183. var process = global.process;
  5184. var Dispatch = global.Dispatch;
  5185. var Function = global.Function;
  5186. var MessageChannel = global.MessageChannel;
  5187. var String = global.String;
  5188. var counter = 0;
  5189. var queue = {};
  5190. var ONREADYSTATECHANGE = 'onreadystatechange';
  5191. var location, defer, channel, port;
  5192. try {
  5193. // Deno throws a ReferenceError on `location` access without `--location` flag
  5194. location = global.location;
  5195. } catch (error) { /* empty */ }
  5196. var run = function (id) {
  5197. if (hasOwn(queue, id)) {
  5198. var fn = queue[id];
  5199. delete queue[id];
  5200. fn();
  5201. }
  5202. };
  5203. var runner = function (id) {
  5204. return function () {
  5205. run(id);
  5206. };
  5207. };
  5208. var listener = function (event) {
  5209. run(event.data);
  5210. };
  5211. var post = function (id) {
  5212. // old engines have not location.origin
  5213. global.postMessage(String(id), location.protocol + '//' + location.host);
  5214. };
  5215. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  5216. if (!set || !clear) {
  5217. set = function setImmediate(fn) {
  5218. var args = arraySlice(arguments, 1);
  5219. queue[++counter] = function () {
  5220. apply(isCallable(fn) ? fn : Function(fn), undefined, args);
  5221. };
  5222. defer(counter);
  5223. return counter;
  5224. };
  5225. clear = function clearImmediate(id) {
  5226. delete queue[id];
  5227. };
  5228. // Node.js 0.8-
  5229. if (IS_NODE) {
  5230. defer = function (id) {
  5231. process.nextTick(runner(id));
  5232. };
  5233. // Sphere (JS game engine) Dispatch API
  5234. } else if (Dispatch && Dispatch.now) {
  5235. defer = function (id) {
  5236. Dispatch.now(runner(id));
  5237. };
  5238. // Browsers with MessageChannel, includes WebWorkers
  5239. // except iOS - https://github.com/zloirock/core-js/issues/624
  5240. } else if (MessageChannel && !IS_IOS) {
  5241. channel = new MessageChannel();
  5242. port = channel.port2;
  5243. channel.port1.onmessage = listener;
  5244. defer = bind(port.postMessage, port);
  5245. // Browsers with postMessage, skip WebWorkers
  5246. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  5247. } else if (
  5248. global.addEventListener &&
  5249. isCallable(global.postMessage) &&
  5250. !global.importScripts &&
  5251. location && location.protocol !== 'file:' &&
  5252. !fails(post)
  5253. ) {
  5254. defer = post;
  5255. global.addEventListener('message', listener, false);
  5256. // IE8-
  5257. } else if (ONREADYSTATECHANGE in createElement('script')) {
  5258. defer = function (id) {
  5259. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  5260. html.removeChild(this);
  5261. run(id);
  5262. };
  5263. };
  5264. // Rest old browsers
  5265. } else {
  5266. defer = function (id) {
  5267. setTimeout(runner(id), 0);
  5268. };
  5269. }
  5270. }
  5271. module.exports = {
  5272. set: set,
  5273. clear: clear
  5274. };
  5275. },{"../internals/array-slice":81,"../internals/document-create-element":98,"../internals/engine-is-ios":102,"../internals/engine-is-node":103,"../internals/fails":111,"../internals/function-apply":112,"../internals/function-bind-context":113,"../internals/global":122,"../internals/has-own-property":123,"../internals/html":126,"../internals/is-callable":134}],185:[function(_dereq_,module,exports){
  5276. var toIntegerOrInfinity = _dereq_('../internals/to-integer-or-infinity');
  5277. var max = Math.max;
  5278. var min = Math.min;
  5279. // Helper for a popular repeating case of the spec:
  5280. // Let integer be ? ToInteger(index).
  5281. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  5282. module.exports = function (index, length) {
  5283. var integer = toIntegerOrInfinity(index);
  5284. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  5285. };
  5286. },{"../internals/to-integer-or-infinity":187}],186:[function(_dereq_,module,exports){
  5287. // toObject with fallback for non-array-like ES3 strings
  5288. var IndexedObject = _dereq_('../internals/indexed-object');
  5289. var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
  5290. module.exports = function (it) {
  5291. return IndexedObject(requireObjectCoercible(it));
  5292. };
  5293. },{"../internals/indexed-object":128,"../internals/require-object-coercible":175}],187:[function(_dereq_,module,exports){
  5294. var ceil = Math.ceil;
  5295. var floor = Math.floor;
  5296. // `ToIntegerOrInfinity` abstract operation
  5297. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  5298. module.exports = function (argument) {
  5299. var number = +argument;
  5300. // eslint-disable-next-line no-self-compare -- safe
  5301. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  5302. };
  5303. },{}],188:[function(_dereq_,module,exports){
  5304. var toIntegerOrInfinity = _dereq_('../internals/to-integer-or-infinity');
  5305. var min = Math.min;
  5306. // `ToLength` abstract operation
  5307. // https://tc39.es/ecma262/#sec-tolength
  5308. module.exports = function (argument) {
  5309. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  5310. };
  5311. },{"../internals/to-integer-or-infinity":187}],189:[function(_dereq_,module,exports){
  5312. var global = _dereq_('../internals/global');
  5313. var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
  5314. var Object = global.Object;
  5315. // `ToObject` abstract operation
  5316. // https://tc39.es/ecma262/#sec-toobject
  5317. module.exports = function (argument) {
  5318. return Object(requireObjectCoercible(argument));
  5319. };
  5320. },{"../internals/global":122,"../internals/require-object-coercible":175}],190:[function(_dereq_,module,exports){
  5321. var global = _dereq_('../internals/global');
  5322. var call = _dereq_('../internals/function-call');
  5323. var isObject = _dereq_('../internals/is-object');
  5324. var isSymbol = _dereq_('../internals/is-symbol');
  5325. var getMethod = _dereq_('../internals/get-method');
  5326. var ordinaryToPrimitive = _dereq_('../internals/ordinary-to-primitive');
  5327. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5328. var TypeError = global.TypeError;
  5329. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  5330. // `ToPrimitive` abstract operation
  5331. // https://tc39.es/ecma262/#sec-toprimitive
  5332. module.exports = function (input, pref) {
  5333. if (!isObject(input) || isSymbol(input)) return input;
  5334. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  5335. var result;
  5336. if (exoticToPrim) {
  5337. if (pref === undefined) pref = 'default';
  5338. result = call(exoticToPrim, input, pref);
  5339. if (!isObject(result) || isSymbol(result)) return result;
  5340. throw TypeError("Can't convert object to primitive value");
  5341. }
  5342. if (pref === undefined) pref = 'number';
  5343. return ordinaryToPrimitive(input, pref);
  5344. };
  5345. },{"../internals/function-call":115,"../internals/get-method":121,"../internals/global":122,"../internals/is-object":137,"../internals/is-symbol":140,"../internals/ordinary-to-primitive":167,"../internals/well-known-symbol":199}],191:[function(_dereq_,module,exports){
  5346. var toPrimitive = _dereq_('../internals/to-primitive');
  5347. var isSymbol = _dereq_('../internals/is-symbol');
  5348. // `ToPropertyKey` abstract operation
  5349. // https://tc39.es/ecma262/#sec-topropertykey
  5350. module.exports = function (argument) {
  5351. var key = toPrimitive(argument, 'string');
  5352. return isSymbol(key) ? key : key + '';
  5353. };
  5354. },{"../internals/is-symbol":140,"../internals/to-primitive":190}],192:[function(_dereq_,module,exports){
  5355. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5356. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  5357. var test = {};
  5358. test[TO_STRING_TAG] = 'z';
  5359. module.exports = String(test) === '[object z]';
  5360. },{"../internals/well-known-symbol":199}],193:[function(_dereq_,module,exports){
  5361. var global = _dereq_('../internals/global');
  5362. var classof = _dereq_('../internals/classof');
  5363. var String = global.String;
  5364. module.exports = function (argument) {
  5365. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  5366. return String(argument);
  5367. };
  5368. },{"../internals/classof":86,"../internals/global":122}],194:[function(_dereq_,module,exports){
  5369. var global = _dereq_('../internals/global');
  5370. var String = global.String;
  5371. module.exports = function (argument) {
  5372. try {
  5373. return String(argument);
  5374. } catch (error) {
  5375. return 'Object';
  5376. }
  5377. };
  5378. },{"../internals/global":122}],195:[function(_dereq_,module,exports){
  5379. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  5380. var id = 0;
  5381. var postfix = Math.random();
  5382. var toString = uncurryThis(1.0.toString);
  5383. module.exports = function (key) {
  5384. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  5385. };
  5386. },{"../internals/function-uncurry-this":117}],196:[function(_dereq_,module,exports){
  5387. /* eslint-disable es/no-symbol -- required for testing */
  5388. var NATIVE_SYMBOL = _dereq_('../internals/native-symbol');
  5389. module.exports = NATIVE_SYMBOL
  5390. && !Symbol.sham
  5391. && typeof Symbol.iterator == 'symbol';
  5392. },{"../internals/native-symbol":148}],197:[function(_dereq_,module,exports){
  5393. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5394. var fails = _dereq_('../internals/fails');
  5395. // V8 ~ Chrome 36-
  5396. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  5397. module.exports = DESCRIPTORS && fails(function () {
  5398. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  5399. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  5400. value: 42,
  5401. writable: false
  5402. }).prototype != 42;
  5403. });
  5404. },{"../internals/descriptors":97,"../internals/fails":111}],198:[function(_dereq_,module,exports){
  5405. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5406. exports.f = wellKnownSymbol;
  5407. },{"../internals/well-known-symbol":199}],199:[function(_dereq_,module,exports){
  5408. var global = _dereq_('../internals/global');
  5409. var shared = _dereq_('../internals/shared');
  5410. var hasOwn = _dereq_('../internals/has-own-property');
  5411. var uid = _dereq_('../internals/uid');
  5412. var NATIVE_SYMBOL = _dereq_('../internals/native-symbol');
  5413. var USE_SYMBOL_AS_UID = _dereq_('../internals/use-symbol-as-uid');
  5414. var WellKnownSymbolsStore = shared('wks');
  5415. var Symbol = global.Symbol;
  5416. var symbolFor = Symbol && Symbol['for'];
  5417. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  5418. module.exports = function (name) {
  5419. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  5420. var description = 'Symbol.' + name;
  5421. if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
  5422. WellKnownSymbolsStore[name] = Symbol[name];
  5423. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  5424. WellKnownSymbolsStore[name] = symbolFor(description);
  5425. } else {
  5426. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  5427. }
  5428. } return WellKnownSymbolsStore[name];
  5429. };
  5430. },{"../internals/global":122,"../internals/has-own-property":123,"../internals/native-symbol":148,"../internals/shared":181,"../internals/uid":195,"../internals/use-symbol-as-uid":196}],200:[function(_dereq_,module,exports){
  5431. 'use strict';
  5432. var $ = _dereq_('../internals/export');
  5433. var global = _dereq_('../internals/global');
  5434. var isPrototypeOf = _dereq_('../internals/object-is-prototype-of');
  5435. var getPrototypeOf = _dereq_('../internals/object-get-prototype-of');
  5436. var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
  5437. var copyConstructorProperties = _dereq_('../internals/copy-constructor-properties');
  5438. var create = _dereq_('../internals/object-create');
  5439. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  5440. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  5441. var clearErrorStack = _dereq_('../internals/clear-error-stack');
  5442. var installErrorCause = _dereq_('../internals/install-error-cause');
  5443. var iterate = _dereq_('../internals/iterate');
  5444. var normalizeStringArgument = _dereq_('../internals/normalize-string-argument');
  5445. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5446. var ERROR_STACK_INSTALLABLE = _dereq_('../internals/error-stack-installable');
  5447. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  5448. var Error = global.Error;
  5449. var push = [].push;
  5450. var $AggregateError = function AggregateError(errors, message /* , options */) {
  5451. var options = arguments.length > 2 ? arguments[2] : undefined;
  5452. var isInstance = isPrototypeOf(AggregateErrorPrototype, this);
  5453. var that;
  5454. if (setPrototypeOf) {
  5455. that = setPrototypeOf(new Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype);
  5456. } else {
  5457. that = isInstance ? this : create(AggregateErrorPrototype);
  5458. createNonEnumerableProperty(that, TO_STRING_TAG, 'Error');
  5459. }
  5460. if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message));
  5461. if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
  5462. installErrorCause(that, options);
  5463. var errorsArray = [];
  5464. iterate(errors, push, { that: errorsArray });
  5465. createNonEnumerableProperty(that, 'errors', errorsArray);
  5466. return that;
  5467. };
  5468. if (setPrototypeOf) setPrototypeOf($AggregateError, Error);
  5469. else copyConstructorProperties($AggregateError, Error, { name: true });
  5470. var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {
  5471. constructor: createPropertyDescriptor(1, $AggregateError),
  5472. message: createPropertyDescriptor(1, ''),
  5473. name: createPropertyDescriptor(1, 'AggregateError')
  5474. });
  5475. // `AggregateError` constructor
  5476. // https://tc39.es/ecma262/#sec-aggregate-error-constructor
  5477. $({ global: true }, {
  5478. AggregateError: $AggregateError
  5479. });
  5480. },{"../internals/clear-error-stack":87,"../internals/copy-constructor-properties":88,"../internals/create-non-enumerable-property":92,"../internals/create-property-descriptor":93,"../internals/error-stack-installable":109,"../internals/export":110,"../internals/global":122,"../internals/install-error-cause":130,"../internals/iterate":141,"../internals/normalize-string-argument":151,"../internals/object-create":153,"../internals/object-get-prototype-of":160,"../internals/object-is-prototype-of":161,"../internals/object-set-prototype-of":165,"../internals/well-known-symbol":199}],201:[function(_dereq_,module,exports){
  5481. 'use strict';
  5482. var $ = _dereq_('../internals/export');
  5483. var $filter = _dereq_('../internals/array-iteration').filter;
  5484. var arrayMethodHasSpeciesSupport = _dereq_('../internals/array-method-has-species-support');
  5485. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  5486. // `Array.prototype.filter` method
  5487. // https://tc39.es/ecma262/#sec-array.prototype.filter
  5488. // with adding support of @@species
  5489. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  5490. filter: function filter(callbackfn /* , thisArg */) {
  5491. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  5492. }
  5493. });
  5494. },{"../internals/array-iteration":77,"../internals/array-method-has-species-support":78,"../internals/export":110}],202:[function(_dereq_,module,exports){
  5495. 'use strict';
  5496. var $ = _dereq_('../internals/export');
  5497. var forEach = _dereq_('../internals/array-for-each');
  5498. // `Array.prototype.forEach` method
  5499. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  5500. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  5501. $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
  5502. forEach: forEach
  5503. });
  5504. },{"../internals/array-for-each":75,"../internals/export":110}],203:[function(_dereq_,module,exports){
  5505. 'use strict';
  5506. var $ = _dereq_('../internals/export');
  5507. var $includes = _dereq_('../internals/array-includes').includes;
  5508. var addToUnscopables = _dereq_('../internals/add-to-unscopables');
  5509. // `Array.prototype.includes` method
  5510. // https://tc39.es/ecma262/#sec-array.prototype.includes
  5511. $({ target: 'Array', proto: true }, {
  5512. includes: function includes(el /* , fromIndex = 0 */) {
  5513. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  5514. }
  5515. });
  5516. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  5517. addToUnscopables('includes');
  5518. },{"../internals/add-to-unscopables":72,"../internals/array-includes":76,"../internals/export":110}],204:[function(_dereq_,module,exports){
  5519. 'use strict';
  5520. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  5521. var addToUnscopables = _dereq_('../internals/add-to-unscopables');
  5522. var Iterators = _dereq_('../internals/iterators');
  5523. var InternalStateModule = _dereq_('../internals/internal-state');
  5524. var defineProperty = _dereq_('../internals/object-define-property').f;
  5525. var defineIterator = _dereq_('../internals/define-iterator');
  5526. var IS_PURE = _dereq_('../internals/is-pure');
  5527. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5528. var ARRAY_ITERATOR = 'Array Iterator';
  5529. var setInternalState = InternalStateModule.set;
  5530. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  5531. // `Array.prototype.entries` method
  5532. // https://tc39.es/ecma262/#sec-array.prototype.entries
  5533. // `Array.prototype.keys` method
  5534. // https://tc39.es/ecma262/#sec-array.prototype.keys
  5535. // `Array.prototype.values` method
  5536. // https://tc39.es/ecma262/#sec-array.prototype.values
  5537. // `Array.prototype[@@iterator]` method
  5538. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  5539. // `CreateArrayIterator` internal method
  5540. // https://tc39.es/ecma262/#sec-createarrayiterator
  5541. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  5542. setInternalState(this, {
  5543. type: ARRAY_ITERATOR,
  5544. target: toIndexedObject(iterated), // target
  5545. index: 0, // next index
  5546. kind: kind // kind
  5547. });
  5548. // `%ArrayIteratorPrototype%.next` method
  5549. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  5550. }, function () {
  5551. var state = getInternalState(this);
  5552. var target = state.target;
  5553. var kind = state.kind;
  5554. var index = state.index++;
  5555. if (!target || index >= target.length) {
  5556. state.target = undefined;
  5557. return { value: undefined, done: true };
  5558. }
  5559. if (kind == 'keys') return { value: index, done: false };
  5560. if (kind == 'values') return { value: target[index], done: false };
  5561. return { value: [index, target[index]], done: false };
  5562. }, 'values');
  5563. // argumentsList[@@iterator] is %ArrayProto_values%
  5564. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  5565. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  5566. var values = Iterators.Arguments = Iterators.Array;
  5567. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  5568. addToUnscopables('keys');
  5569. addToUnscopables('values');
  5570. addToUnscopables('entries');
  5571. // V8 ~ Chrome 45- bug
  5572. if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {
  5573. defineProperty(values, 'name', { value: 'values' });
  5574. } catch (error) { /* empty */ }
  5575. },{"../internals/add-to-unscopables":72,"../internals/define-iterator":95,"../internals/descriptors":97,"../internals/internal-state":131,"../internals/is-pure":138,"../internals/iterators":144,"../internals/object-define-property":155,"../internals/to-indexed-object":186}],205:[function(_dereq_,module,exports){
  5576. var $ = _dereq_('../internals/export');
  5577. var global = _dereq_('../internals/global');
  5578. var getBuiltIn = _dereq_('../internals/get-built-in');
  5579. var apply = _dereq_('../internals/function-apply');
  5580. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  5581. var fails = _dereq_('../internals/fails');
  5582. var Array = global.Array;
  5583. var $stringify = getBuiltIn('JSON', 'stringify');
  5584. var exec = uncurryThis(/./.exec);
  5585. var charAt = uncurryThis(''.charAt);
  5586. var charCodeAt = uncurryThis(''.charCodeAt);
  5587. var replace = uncurryThis(''.replace);
  5588. var numberToString = uncurryThis(1.0.toString);
  5589. var tester = /[\uD800-\uDFFF]/g;
  5590. var low = /^[\uD800-\uDBFF]$/;
  5591. var hi = /^[\uDC00-\uDFFF]$/;
  5592. var fix = function (match, offset, string) {
  5593. var prev = charAt(string, offset - 1);
  5594. var next = charAt(string, offset + 1);
  5595. if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
  5596. return '\\u' + numberToString(charCodeAt(match, 0), 16);
  5597. } return match;
  5598. };
  5599. var FORCED = fails(function () {
  5600. return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
  5601. || $stringify('\uDEAD') !== '"\\udead"';
  5602. });
  5603. if ($stringify) {
  5604. // `JSON.stringify` method
  5605. // https://tc39.es/ecma262/#sec-json.stringify
  5606. // https://github.com/tc39/proposal-well-formed-stringify
  5607. $({ target: 'JSON', stat: true, forced: FORCED }, {
  5608. // eslint-disable-next-line no-unused-vars -- required for `.length`
  5609. stringify: function stringify(it, replacer, space) {
  5610. for (var i = 0, l = arguments.length, args = Array(l); i < l; i++) args[i] = arguments[i];
  5611. var result = apply($stringify, null, args);
  5612. return typeof result == 'string' ? replace(result, tester, fix) : result;
  5613. }
  5614. });
  5615. }
  5616. },{"../internals/export":110,"../internals/fails":111,"../internals/function-apply":112,"../internals/function-uncurry-this":117,"../internals/get-built-in":118,"../internals/global":122}],206:[function(_dereq_,module,exports){
  5617. var $ = _dereq_('../internals/export');
  5618. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5619. var defineProperties = _dereq_('../internals/object-define-properties').f;
  5620. // `Object.defineProperties` method
  5621. // https://tc39.es/ecma262/#sec-object.defineproperties
  5622. // eslint-disable-next-line es/no-object-defineproperties -- safe
  5623. $({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
  5624. defineProperties: defineProperties
  5625. });
  5626. },{"../internals/descriptors":97,"../internals/export":110,"../internals/object-define-properties":154}],207:[function(_dereq_,module,exports){
  5627. var $ = _dereq_('../internals/export');
  5628. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5629. var defineProperty = _dereq_('../internals/object-define-property').f;
  5630. // `Object.defineProperty` method
  5631. // https://tc39.es/ecma262/#sec-object.defineproperty
  5632. // eslint-disable-next-line es/no-object-defineproperty -- safe
  5633. $({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
  5634. defineProperty: defineProperty
  5635. });
  5636. },{"../internals/descriptors":97,"../internals/export":110,"../internals/object-define-property":155}],208:[function(_dereq_,module,exports){
  5637. var $ = _dereq_('../internals/export');
  5638. var fails = _dereq_('../internals/fails');
  5639. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  5640. var nativeGetOwnPropertyDescriptor = _dereq_('../internals/object-get-own-property-descriptor').f;
  5641. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5642. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
  5643. var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
  5644. // `Object.getOwnPropertyDescriptor` method
  5645. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  5646. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  5647. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  5648. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  5649. }
  5650. });
  5651. },{"../internals/descriptors":97,"../internals/export":110,"../internals/fails":111,"../internals/object-get-own-property-descriptor":156,"../internals/to-indexed-object":186}],209:[function(_dereq_,module,exports){
  5652. var $ = _dereq_('../internals/export');
  5653. var DESCRIPTORS = _dereq_('../internals/descriptors');
  5654. var ownKeys = _dereq_('../internals/own-keys');
  5655. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  5656. var getOwnPropertyDescriptorModule = _dereq_('../internals/object-get-own-property-descriptor');
  5657. var createProperty = _dereq_('../internals/create-property');
  5658. // `Object.getOwnPropertyDescriptors` method
  5659. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  5660. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  5661. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  5662. var O = toIndexedObject(object);
  5663. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  5664. var keys = ownKeys(O);
  5665. var result = {};
  5666. var index = 0;
  5667. var key, descriptor;
  5668. while (keys.length > index) {
  5669. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  5670. if (descriptor !== undefined) createProperty(result, key, descriptor);
  5671. }
  5672. return result;
  5673. }
  5674. });
  5675. },{"../internals/create-property":94,"../internals/descriptors":97,"../internals/export":110,"../internals/object-get-own-property-descriptor":156,"../internals/own-keys":168,"../internals/to-indexed-object":186}],210:[function(_dereq_,module,exports){
  5676. var $ = _dereq_('../internals/export');
  5677. var toObject = _dereq_('../internals/to-object');
  5678. var nativeKeys = _dereq_('../internals/object-keys');
  5679. var fails = _dereq_('../internals/fails');
  5680. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  5681. // `Object.keys` method
  5682. // https://tc39.es/ecma262/#sec-object.keys
  5683. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  5684. keys: function keys(it) {
  5685. return nativeKeys(toObject(it));
  5686. }
  5687. });
  5688. },{"../internals/export":110,"../internals/fails":111,"../internals/object-keys":163,"../internals/to-object":189}],211:[function(_dereq_,module,exports){
  5689. // empty
  5690. },{}],212:[function(_dereq_,module,exports){
  5691. 'use strict';
  5692. var $ = _dereq_('../internals/export');
  5693. var call = _dereq_('../internals/function-call');
  5694. var aCallable = _dereq_('../internals/a-callable');
  5695. var newPromiseCapabilityModule = _dereq_('../internals/new-promise-capability');
  5696. var perform = _dereq_('../internals/perform');
  5697. var iterate = _dereq_('../internals/iterate');
  5698. // `Promise.allSettled` method
  5699. // https://tc39.es/ecma262/#sec-promise.allsettled
  5700. $({ target: 'Promise', stat: true }, {
  5701. allSettled: function allSettled(iterable) {
  5702. var C = this;
  5703. var capability = newPromiseCapabilityModule.f(C);
  5704. var resolve = capability.resolve;
  5705. var reject = capability.reject;
  5706. var result = perform(function () {
  5707. var promiseResolve = aCallable(C.resolve);
  5708. var values = [];
  5709. var counter = 0;
  5710. var remaining = 1;
  5711. iterate(iterable, function (promise) {
  5712. var index = counter++;
  5713. var alreadyCalled = false;
  5714. remaining++;
  5715. call(promiseResolve, C, promise).then(function (value) {
  5716. if (alreadyCalled) return;
  5717. alreadyCalled = true;
  5718. values[index] = { status: 'fulfilled', value: value };
  5719. --remaining || resolve(values);
  5720. }, function (error) {
  5721. if (alreadyCalled) return;
  5722. alreadyCalled = true;
  5723. values[index] = { status: 'rejected', reason: error };
  5724. --remaining || resolve(values);
  5725. });
  5726. });
  5727. --remaining || resolve(values);
  5728. });
  5729. if (result.error) reject(result.value);
  5730. return capability.promise;
  5731. }
  5732. });
  5733. },{"../internals/a-callable":69,"../internals/export":110,"../internals/function-call":115,"../internals/iterate":141,"../internals/new-promise-capability":150,"../internals/perform":170}],213:[function(_dereq_,module,exports){
  5734. 'use strict';
  5735. var $ = _dereq_('../internals/export');
  5736. var aCallable = _dereq_('../internals/a-callable');
  5737. var getBuiltIn = _dereq_('../internals/get-built-in');
  5738. var call = _dereq_('../internals/function-call');
  5739. var newPromiseCapabilityModule = _dereq_('../internals/new-promise-capability');
  5740. var perform = _dereq_('../internals/perform');
  5741. var iterate = _dereq_('../internals/iterate');
  5742. var PROMISE_ANY_ERROR = 'No one promise resolved';
  5743. // `Promise.any` method
  5744. // https://tc39.es/ecma262/#sec-promise.any
  5745. $({ target: 'Promise', stat: true }, {
  5746. any: function any(iterable) {
  5747. var C = this;
  5748. var AggregateError = getBuiltIn('AggregateError');
  5749. var capability = newPromiseCapabilityModule.f(C);
  5750. var resolve = capability.resolve;
  5751. var reject = capability.reject;
  5752. var result = perform(function () {
  5753. var promiseResolve = aCallable(C.resolve);
  5754. var errors = [];
  5755. var counter = 0;
  5756. var remaining = 1;
  5757. var alreadyResolved = false;
  5758. iterate(iterable, function (promise) {
  5759. var index = counter++;
  5760. var alreadyRejected = false;
  5761. remaining++;
  5762. call(promiseResolve, C, promise).then(function (value) {
  5763. if (alreadyRejected || alreadyResolved) return;
  5764. alreadyResolved = true;
  5765. resolve(value);
  5766. }, function (error) {
  5767. if (alreadyRejected || alreadyResolved) return;
  5768. alreadyRejected = true;
  5769. errors[index] = error;
  5770. --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
  5771. });
  5772. });
  5773. --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
  5774. });
  5775. if (result.error) reject(result.value);
  5776. return capability.promise;
  5777. }
  5778. });
  5779. },{"../internals/a-callable":69,"../internals/export":110,"../internals/function-call":115,"../internals/get-built-in":118,"../internals/iterate":141,"../internals/new-promise-capability":150,"../internals/perform":170}],214:[function(_dereq_,module,exports){
  5780. 'use strict';
  5781. var $ = _dereq_('../internals/export');
  5782. var IS_PURE = _dereq_('../internals/is-pure');
  5783. var NativePromise = _dereq_('../internals/native-promise-constructor');
  5784. var fails = _dereq_('../internals/fails');
  5785. var getBuiltIn = _dereq_('../internals/get-built-in');
  5786. var isCallable = _dereq_('../internals/is-callable');
  5787. var speciesConstructor = _dereq_('../internals/species-constructor');
  5788. var promiseResolve = _dereq_('../internals/promise-resolve');
  5789. var redefine = _dereq_('../internals/redefine');
  5790. // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
  5791. var NON_GENERIC = !!NativePromise && fails(function () {
  5792. // eslint-disable-next-line unicorn/no-thenable -- required for testing
  5793. NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
  5794. });
  5795. // `Promise.prototype.finally` method
  5796. // https://tc39.es/ecma262/#sec-promise.prototype.finally
  5797. $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
  5798. 'finally': function (onFinally) {
  5799. var C = speciesConstructor(this, getBuiltIn('Promise'));
  5800. var isFunction = isCallable(onFinally);
  5801. return this.then(
  5802. isFunction ? function (x) {
  5803. return promiseResolve(C, onFinally()).then(function () { return x; });
  5804. } : onFinally,
  5805. isFunction ? function (e) {
  5806. return promiseResolve(C, onFinally()).then(function () { throw e; });
  5807. } : onFinally
  5808. );
  5809. }
  5810. });
  5811. // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
  5812. if (!IS_PURE && isCallable(NativePromise)) {
  5813. var method = getBuiltIn('Promise').prototype['finally'];
  5814. if (NativePromise.prototype['finally'] !== method) {
  5815. redefine(NativePromise.prototype, 'finally', method, { unsafe: true });
  5816. }
  5817. }
  5818. },{"../internals/export":110,"../internals/fails":111,"../internals/get-built-in":118,"../internals/is-callable":134,"../internals/is-pure":138,"../internals/native-promise-constructor":147,"../internals/promise-resolve":171,"../internals/redefine":174,"../internals/species-constructor":182}],215:[function(_dereq_,module,exports){
  5819. 'use strict';
  5820. var $ = _dereq_('../internals/export');
  5821. var IS_PURE = _dereq_('../internals/is-pure');
  5822. var global = _dereq_('../internals/global');
  5823. var getBuiltIn = _dereq_('../internals/get-built-in');
  5824. var call = _dereq_('../internals/function-call');
  5825. var NativePromise = _dereq_('../internals/native-promise-constructor');
  5826. var redefine = _dereq_('../internals/redefine');
  5827. var redefineAll = _dereq_('../internals/redefine-all');
  5828. var setPrototypeOf = _dereq_('../internals/object-set-prototype-of');
  5829. var setToStringTag = _dereq_('../internals/set-to-string-tag');
  5830. var setSpecies = _dereq_('../internals/set-species');
  5831. var aCallable = _dereq_('../internals/a-callable');
  5832. var isCallable = _dereq_('../internals/is-callable');
  5833. var isObject = _dereq_('../internals/is-object');
  5834. var anInstance = _dereq_('../internals/an-instance');
  5835. var inspectSource = _dereq_('../internals/inspect-source');
  5836. var iterate = _dereq_('../internals/iterate');
  5837. var checkCorrectnessOfIteration = _dereq_('../internals/check-correctness-of-iteration');
  5838. var speciesConstructor = _dereq_('../internals/species-constructor');
  5839. var task = _dereq_('../internals/task').set;
  5840. var microtask = _dereq_('../internals/microtask');
  5841. var promiseResolve = _dereq_('../internals/promise-resolve');
  5842. var hostReportErrors = _dereq_('../internals/host-report-errors');
  5843. var newPromiseCapabilityModule = _dereq_('../internals/new-promise-capability');
  5844. var perform = _dereq_('../internals/perform');
  5845. var Queue = _dereq_('../internals/queue');
  5846. var InternalStateModule = _dereq_('../internals/internal-state');
  5847. var isForced = _dereq_('../internals/is-forced');
  5848. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  5849. var IS_BROWSER = _dereq_('../internals/engine-is-browser');
  5850. var IS_NODE = _dereq_('../internals/engine-is-node');
  5851. var V8_VERSION = _dereq_('../internals/engine-v8-version');
  5852. var SPECIES = wellKnownSymbol('species');
  5853. var PROMISE = 'Promise';
  5854. var getInternalState = InternalStateModule.getterFor(PROMISE);
  5855. var setInternalState = InternalStateModule.set;
  5856. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  5857. var NativePromisePrototype = NativePromise && NativePromise.prototype;
  5858. var PromiseConstructor = NativePromise;
  5859. var PromisePrototype = NativePromisePrototype;
  5860. var TypeError = global.TypeError;
  5861. var document = global.document;
  5862. var process = global.process;
  5863. var newPromiseCapability = newPromiseCapabilityModule.f;
  5864. var newGenericPromiseCapability = newPromiseCapability;
  5865. var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
  5866. var NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);
  5867. var UNHANDLED_REJECTION = 'unhandledrejection';
  5868. var REJECTION_HANDLED = 'rejectionhandled';
  5869. var PENDING = 0;
  5870. var FULFILLED = 1;
  5871. var REJECTED = 2;
  5872. var HANDLED = 1;
  5873. var UNHANDLED = 2;
  5874. var SUBCLASSING = false;
  5875. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  5876. var FORCED = isForced(PROMISE, function () {
  5877. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
  5878. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
  5879. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  5880. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  5881. // We can't detect it synchronously, so just check versions
  5882. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  5883. // We need Promise#finally in the pure version for preventing prototype pollution
  5884. if (IS_PURE && !PromisePrototype['finally']) return true;
  5885. // We can't use @@species feature detection in V8 since it causes
  5886. // deoptimization and performance degradation
  5887. // https://github.com/zloirock/core-js/issues/679
  5888. if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
  5889. // Detect correctness of subclassing with @@species support
  5890. var promise = new PromiseConstructor(function (resolve) { resolve(1); });
  5891. var FakePromise = function (exec) {
  5892. exec(function () { /* empty */ }, function () { /* empty */ });
  5893. };
  5894. var constructor = promise.constructor = {};
  5895. constructor[SPECIES] = FakePromise;
  5896. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  5897. if (!SUBCLASSING) return true;
  5898. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  5899. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
  5900. });
  5901. var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  5902. PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
  5903. });
  5904. // helpers
  5905. var isThenable = function (it) {
  5906. var then;
  5907. return isObject(it) && isCallable(then = it.then) ? then : false;
  5908. };
  5909. var callReaction = function (reaction, state) {
  5910. var value = state.value;
  5911. var ok = state.state == FULFILLED;
  5912. var handler = ok ? reaction.ok : reaction.fail;
  5913. var resolve = reaction.resolve;
  5914. var reject = reaction.reject;
  5915. var domain = reaction.domain;
  5916. var result, then, exited;
  5917. try {
  5918. if (handler) {
  5919. if (!ok) {
  5920. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  5921. state.rejection = HANDLED;
  5922. }
  5923. if (handler === true) result = value;
  5924. else {
  5925. if (domain) domain.enter();
  5926. result = handler(value); // can throw
  5927. if (domain) {
  5928. domain.exit();
  5929. exited = true;
  5930. }
  5931. }
  5932. if (result === reaction.promise) {
  5933. reject(TypeError('Promise-chain cycle'));
  5934. } else if (then = isThenable(result)) {
  5935. call(then, result, resolve, reject);
  5936. } else resolve(result);
  5937. } else reject(value);
  5938. } catch (error) {
  5939. if (domain && !exited) domain.exit();
  5940. reject(error);
  5941. }
  5942. };
  5943. var notify = function (state, isReject) {
  5944. if (state.notified) return;
  5945. state.notified = true;
  5946. microtask(function () {
  5947. var reactions = state.reactions;
  5948. var reaction;
  5949. while (reaction = reactions.get()) {
  5950. callReaction(reaction, state);
  5951. }
  5952. state.notified = false;
  5953. if (isReject && !state.rejection) onUnhandled(state);
  5954. });
  5955. };
  5956. var dispatchEvent = function (name, promise, reason) {
  5957. var event, handler;
  5958. if (DISPATCH_EVENT) {
  5959. event = document.createEvent('Event');
  5960. event.promise = promise;
  5961. event.reason = reason;
  5962. event.initEvent(name, false, true);
  5963. global.dispatchEvent(event);
  5964. } else event = { promise: promise, reason: reason };
  5965. if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  5966. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  5967. };
  5968. var onUnhandled = function (state) {
  5969. call(task, global, function () {
  5970. var promise = state.facade;
  5971. var value = state.value;
  5972. var IS_UNHANDLED = isUnhandled(state);
  5973. var result;
  5974. if (IS_UNHANDLED) {
  5975. result = perform(function () {
  5976. if (IS_NODE) {
  5977. process.emit('unhandledRejection', value, promise);
  5978. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  5979. });
  5980. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  5981. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  5982. if (result.error) throw result.value;
  5983. }
  5984. });
  5985. };
  5986. var isUnhandled = function (state) {
  5987. return state.rejection !== HANDLED && !state.parent;
  5988. };
  5989. var onHandleUnhandled = function (state) {
  5990. call(task, global, function () {
  5991. var promise = state.facade;
  5992. if (IS_NODE) {
  5993. process.emit('rejectionHandled', promise);
  5994. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  5995. });
  5996. };
  5997. var bind = function (fn, state, unwrap) {
  5998. return function (value) {
  5999. fn(state, value, unwrap);
  6000. };
  6001. };
  6002. var internalReject = function (state, value, unwrap) {
  6003. if (state.done) return;
  6004. state.done = true;
  6005. if (unwrap) state = unwrap;
  6006. state.value = value;
  6007. state.state = REJECTED;
  6008. notify(state, true);
  6009. };
  6010. var internalResolve = function (state, value, unwrap) {
  6011. if (state.done) return;
  6012. state.done = true;
  6013. if (unwrap) state = unwrap;
  6014. try {
  6015. if (state.facade === value) throw TypeError("Promise can't be resolved itself");
  6016. var then = isThenable(value);
  6017. if (then) {
  6018. microtask(function () {
  6019. var wrapper = { done: false };
  6020. try {
  6021. call(then, value,
  6022. bind(internalResolve, wrapper, state),
  6023. bind(internalReject, wrapper, state)
  6024. );
  6025. } catch (error) {
  6026. internalReject(wrapper, error, state);
  6027. }
  6028. });
  6029. } else {
  6030. state.value = value;
  6031. state.state = FULFILLED;
  6032. notify(state, false);
  6033. }
  6034. } catch (error) {
  6035. internalReject({ done: false }, error, state);
  6036. }
  6037. };
  6038. // constructor polyfill
  6039. if (FORCED) {
  6040. // 25.4.3.1 Promise(executor)
  6041. PromiseConstructor = function Promise(executor) {
  6042. anInstance(this, PromisePrototype);
  6043. aCallable(executor);
  6044. call(Internal, this);
  6045. var state = getInternalState(this);
  6046. try {
  6047. executor(bind(internalResolve, state), bind(internalReject, state));
  6048. } catch (error) {
  6049. internalReject(state, error);
  6050. }
  6051. };
  6052. PromisePrototype = PromiseConstructor.prototype;
  6053. // eslint-disable-next-line no-unused-vars -- required for `.length`
  6054. Internal = function Promise(executor) {
  6055. setInternalState(this, {
  6056. type: PROMISE,
  6057. done: false,
  6058. notified: false,
  6059. parent: false,
  6060. reactions: new Queue(),
  6061. rejection: false,
  6062. state: PENDING,
  6063. value: undefined
  6064. });
  6065. };
  6066. Internal.prototype = redefineAll(PromisePrototype, {
  6067. // `Promise.prototype.then` method
  6068. // https://tc39.es/ecma262/#sec-promise.prototype.then
  6069. // eslint-disable-next-line unicorn/no-thenable -- safe
  6070. then: function then(onFulfilled, onRejected) {
  6071. var state = getInternalPromiseState(this);
  6072. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  6073. state.parent = true;
  6074. reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
  6075. reaction.fail = isCallable(onRejected) && onRejected;
  6076. reaction.domain = IS_NODE ? process.domain : undefined;
  6077. if (state.state == PENDING) state.reactions.add(reaction);
  6078. else microtask(function () {
  6079. callReaction(reaction, state);
  6080. });
  6081. return reaction.promise;
  6082. },
  6083. // `Promise.prototype.catch` method
  6084. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  6085. 'catch': function (onRejected) {
  6086. return this.then(undefined, onRejected);
  6087. }
  6088. });
  6089. OwnPromiseCapability = function () {
  6090. var promise = new Internal();
  6091. var state = getInternalState(promise);
  6092. this.promise = promise;
  6093. this.resolve = bind(internalResolve, state);
  6094. this.reject = bind(internalReject, state);
  6095. };
  6096. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  6097. return C === PromiseConstructor || C === PromiseWrapper
  6098. ? new OwnPromiseCapability(C)
  6099. : newGenericPromiseCapability(C);
  6100. };
  6101. if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
  6102. nativeThen = NativePromisePrototype.then;
  6103. if (!SUBCLASSING) {
  6104. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  6105. redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  6106. var that = this;
  6107. return new PromiseConstructor(function (resolve, reject) {
  6108. call(nativeThen, that, resolve, reject);
  6109. }).then(onFulfilled, onRejected);
  6110. // https://github.com/zloirock/core-js/issues/640
  6111. }, { unsafe: true });
  6112. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  6113. redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
  6114. }
  6115. // make `.constructor === Promise` work for native promise-based APIs
  6116. try {
  6117. delete NativePromisePrototype.constructor;
  6118. } catch (error) { /* empty */ }
  6119. // make `instanceof Promise` work for native promise-based APIs
  6120. if (setPrototypeOf) {
  6121. setPrototypeOf(NativePromisePrototype, PromisePrototype);
  6122. }
  6123. }
  6124. }
  6125. $({ global: true, wrap: true, forced: FORCED }, {
  6126. Promise: PromiseConstructor
  6127. });
  6128. setToStringTag(PromiseConstructor, PROMISE, false, true);
  6129. setSpecies(PROMISE);
  6130. PromiseWrapper = getBuiltIn(PROMISE);
  6131. // statics
  6132. $({ target: PROMISE, stat: true, forced: FORCED }, {
  6133. // `Promise.reject` method
  6134. // https://tc39.es/ecma262/#sec-promise.reject
  6135. reject: function reject(r) {
  6136. var capability = newPromiseCapability(this);
  6137. call(capability.reject, undefined, r);
  6138. return capability.promise;
  6139. }
  6140. });
  6141. $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  6142. // `Promise.resolve` method
  6143. // https://tc39.es/ecma262/#sec-promise.resolve
  6144. resolve: function resolve(x) {
  6145. return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  6146. }
  6147. });
  6148. $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  6149. // `Promise.all` method
  6150. // https://tc39.es/ecma262/#sec-promise.all
  6151. all: function all(iterable) {
  6152. var C = this;
  6153. var capability = newPromiseCapability(C);
  6154. var resolve = capability.resolve;
  6155. var reject = capability.reject;
  6156. var result = perform(function () {
  6157. var $promiseResolve = aCallable(C.resolve);
  6158. var values = [];
  6159. var counter = 0;
  6160. var remaining = 1;
  6161. iterate(iterable, function (promise) {
  6162. var index = counter++;
  6163. var alreadyCalled = false;
  6164. remaining++;
  6165. call($promiseResolve, C, promise).then(function (value) {
  6166. if (alreadyCalled) return;
  6167. alreadyCalled = true;
  6168. values[index] = value;
  6169. --remaining || resolve(values);
  6170. }, reject);
  6171. });
  6172. --remaining || resolve(values);
  6173. });
  6174. if (result.error) reject(result.value);
  6175. return capability.promise;
  6176. },
  6177. // `Promise.race` method
  6178. // https://tc39.es/ecma262/#sec-promise.race
  6179. race: function race(iterable) {
  6180. var C = this;
  6181. var capability = newPromiseCapability(C);
  6182. var reject = capability.reject;
  6183. var result = perform(function () {
  6184. var $promiseResolve = aCallable(C.resolve);
  6185. iterate(iterable, function (promise) {
  6186. call($promiseResolve, C, promise).then(capability.resolve, reject);
  6187. });
  6188. });
  6189. if (result.error) reject(result.value);
  6190. return capability.promise;
  6191. }
  6192. });
  6193. },{"../internals/a-callable":69,"../internals/an-instance":73,"../internals/check-correctness-of-iteration":84,"../internals/engine-is-browser":100,"../internals/engine-is-node":103,"../internals/engine-v8-version":106,"../internals/export":110,"../internals/function-call":115,"../internals/get-built-in":118,"../internals/global":122,"../internals/host-report-errors":125,"../internals/inspect-source":129,"../internals/internal-state":131,"../internals/is-callable":134,"../internals/is-forced":136,"../internals/is-object":137,"../internals/is-pure":138,"../internals/iterate":141,"../internals/microtask":146,"../internals/native-promise-constructor":147,"../internals/new-promise-capability":150,"../internals/object-set-prototype-of":165,"../internals/perform":170,"../internals/promise-resolve":171,"../internals/queue":172,"../internals/redefine":174,"../internals/redefine-all":173,"../internals/set-species":177,"../internals/set-to-string-tag":178,"../internals/species-constructor":182,"../internals/task":184,"../internals/well-known-symbol":199}],216:[function(_dereq_,module,exports){
  6194. 'use strict';
  6195. var $ = _dereq_('../internals/export');
  6196. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  6197. var notARegExp = _dereq_('../internals/not-a-regexp');
  6198. var requireObjectCoercible = _dereq_('../internals/require-object-coercible');
  6199. var toString = _dereq_('../internals/to-string');
  6200. var correctIsRegExpLogic = _dereq_('../internals/correct-is-regexp-logic');
  6201. var stringIndexOf = uncurryThis(''.indexOf);
  6202. // `String.prototype.includes` method
  6203. // https://tc39.es/ecma262/#sec-string.prototype.includes
  6204. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  6205. includes: function includes(searchString /* , position = 0 */) {
  6206. return !!~stringIndexOf(
  6207. toString(requireObjectCoercible(this)),
  6208. toString(notARegExp(searchString)),
  6209. arguments.length > 1 ? arguments[1] : undefined
  6210. );
  6211. }
  6212. });
  6213. },{"../internals/correct-is-regexp-logic":89,"../internals/export":110,"../internals/function-uncurry-this":117,"../internals/not-a-regexp":152,"../internals/require-object-coercible":175,"../internals/to-string":193}],217:[function(_dereq_,module,exports){
  6214. 'use strict';
  6215. var charAt = _dereq_('../internals/string-multibyte').charAt;
  6216. var toString = _dereq_('../internals/to-string');
  6217. var InternalStateModule = _dereq_('../internals/internal-state');
  6218. var defineIterator = _dereq_('../internals/define-iterator');
  6219. var STRING_ITERATOR = 'String Iterator';
  6220. var setInternalState = InternalStateModule.set;
  6221. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  6222. // `String.prototype[@@iterator]` method
  6223. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  6224. defineIterator(String, 'String', function (iterated) {
  6225. setInternalState(this, {
  6226. type: STRING_ITERATOR,
  6227. string: toString(iterated),
  6228. index: 0
  6229. });
  6230. // `%StringIteratorPrototype%.next` method
  6231. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  6232. }, function next() {
  6233. var state = getInternalState(this);
  6234. var string = state.string;
  6235. var index = state.index;
  6236. var point;
  6237. if (index >= string.length) return { value: undefined, done: true };
  6238. point = charAt(string, index);
  6239. state.index += point.length;
  6240. return { value: point, done: false };
  6241. });
  6242. },{"../internals/define-iterator":95,"../internals/internal-state":131,"../internals/string-multibyte":183,"../internals/to-string":193}],218:[function(_dereq_,module,exports){
  6243. 'use strict';
  6244. var $ = _dereq_('../internals/export');
  6245. var global = _dereq_('../internals/global');
  6246. var getBuiltIn = _dereq_('../internals/get-built-in');
  6247. var apply = _dereq_('../internals/function-apply');
  6248. var call = _dereq_('../internals/function-call');
  6249. var uncurryThis = _dereq_('../internals/function-uncurry-this');
  6250. var IS_PURE = _dereq_('../internals/is-pure');
  6251. var DESCRIPTORS = _dereq_('../internals/descriptors');
  6252. var NATIVE_SYMBOL = _dereq_('../internals/native-symbol');
  6253. var fails = _dereq_('../internals/fails');
  6254. var hasOwn = _dereq_('../internals/has-own-property');
  6255. var isArray = _dereq_('../internals/is-array');
  6256. var isCallable = _dereq_('../internals/is-callable');
  6257. var isObject = _dereq_('../internals/is-object');
  6258. var isPrototypeOf = _dereq_('../internals/object-is-prototype-of');
  6259. var isSymbol = _dereq_('../internals/is-symbol');
  6260. var anObject = _dereq_('../internals/an-object');
  6261. var toObject = _dereq_('../internals/to-object');
  6262. var toIndexedObject = _dereq_('../internals/to-indexed-object');
  6263. var toPropertyKey = _dereq_('../internals/to-property-key');
  6264. var $toString = _dereq_('../internals/to-string');
  6265. var createPropertyDescriptor = _dereq_('../internals/create-property-descriptor');
  6266. var nativeObjectCreate = _dereq_('../internals/object-create');
  6267. var objectKeys = _dereq_('../internals/object-keys');
  6268. var getOwnPropertyNamesModule = _dereq_('../internals/object-get-own-property-names');
  6269. var getOwnPropertyNamesExternal = _dereq_('../internals/object-get-own-property-names-external');
  6270. var getOwnPropertySymbolsModule = _dereq_('../internals/object-get-own-property-symbols');
  6271. var getOwnPropertyDescriptorModule = _dereq_('../internals/object-get-own-property-descriptor');
  6272. var definePropertyModule = _dereq_('../internals/object-define-property');
  6273. var definePropertiesModule = _dereq_('../internals/object-define-properties');
  6274. var propertyIsEnumerableModule = _dereq_('../internals/object-property-is-enumerable');
  6275. var arraySlice = _dereq_('../internals/array-slice');
  6276. var redefine = _dereq_('../internals/redefine');
  6277. var shared = _dereq_('../internals/shared');
  6278. var sharedKey = _dereq_('../internals/shared-key');
  6279. var hiddenKeys = _dereq_('../internals/hidden-keys');
  6280. var uid = _dereq_('../internals/uid');
  6281. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  6282. var wrappedWellKnownSymbolModule = _dereq_('../internals/well-known-symbol-wrapped');
  6283. var defineWellKnownSymbol = _dereq_('../internals/define-well-known-symbol');
  6284. var setToStringTag = _dereq_('../internals/set-to-string-tag');
  6285. var InternalStateModule = _dereq_('../internals/internal-state');
  6286. var $forEach = _dereq_('../internals/array-iteration').forEach;
  6287. var HIDDEN = sharedKey('hidden');
  6288. var SYMBOL = 'Symbol';
  6289. var PROTOTYPE = 'prototype';
  6290. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  6291. var setInternalState = InternalStateModule.set;
  6292. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  6293. var ObjectPrototype = Object[PROTOTYPE];
  6294. var $Symbol = global.Symbol;
  6295. var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
  6296. var TypeError = global.TypeError;
  6297. var QObject = global.QObject;
  6298. var $stringify = getBuiltIn('JSON', 'stringify');
  6299. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  6300. var nativeDefineProperty = definePropertyModule.f;
  6301. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  6302. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  6303. var push = uncurryThis([].push);
  6304. var AllSymbols = shared('symbols');
  6305. var ObjectPrototypeSymbols = shared('op-symbols');
  6306. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  6307. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  6308. var WellKnownSymbolsStore = shared('wks');
  6309. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  6310. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  6311. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  6312. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  6313. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  6314. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  6315. })).a != 7;
  6316. }) ? function (O, P, Attributes) {
  6317. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  6318. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  6319. nativeDefineProperty(O, P, Attributes);
  6320. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  6321. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  6322. }
  6323. } : nativeDefineProperty;
  6324. var wrap = function (tag, description) {
  6325. var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
  6326. setInternalState(symbol, {
  6327. type: SYMBOL,
  6328. tag: tag,
  6329. description: description
  6330. });
  6331. if (!DESCRIPTORS) symbol.description = description;
  6332. return symbol;
  6333. };
  6334. var $defineProperty = function defineProperty(O, P, Attributes) {
  6335. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  6336. anObject(O);
  6337. var key = toPropertyKey(P);
  6338. anObject(Attributes);
  6339. if (hasOwn(AllSymbols, key)) {
  6340. if (!Attributes.enumerable) {
  6341. if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
  6342. O[HIDDEN][key] = true;
  6343. } else {
  6344. if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  6345. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  6346. } return setSymbolDescriptor(O, key, Attributes);
  6347. } return nativeDefineProperty(O, key, Attributes);
  6348. };
  6349. var $defineProperties = function defineProperties(O, Properties) {
  6350. anObject(O);
  6351. var properties = toIndexedObject(Properties);
  6352. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  6353. $forEach(keys, function (key) {
  6354. if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
  6355. });
  6356. return O;
  6357. };
  6358. var $create = function create(O, Properties) {
  6359. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  6360. };
  6361. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  6362. var P = toPropertyKey(V);
  6363. var enumerable = call(nativePropertyIsEnumerable, this, P);
  6364. if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
  6365. return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
  6366. ? enumerable : true;
  6367. };
  6368. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  6369. var it = toIndexedObject(O);
  6370. var key = toPropertyKey(P);
  6371. if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
  6372. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  6373. if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
  6374. descriptor.enumerable = true;
  6375. }
  6376. return descriptor;
  6377. };
  6378. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  6379. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  6380. var result = [];
  6381. $forEach(names, function (key) {
  6382. if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
  6383. });
  6384. return result;
  6385. };
  6386. var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  6387. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  6388. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  6389. var result = [];
  6390. $forEach(names, function (key) {
  6391. if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
  6392. push(result, AllSymbols[key]);
  6393. }
  6394. });
  6395. return result;
  6396. };
  6397. // `Symbol` constructor
  6398. // https://tc39.es/ecma262/#sec-symbol-constructor
  6399. if (!NATIVE_SYMBOL) {
  6400. $Symbol = function Symbol() {
  6401. if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');
  6402. var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
  6403. var tag = uid(description);
  6404. var setter = function (value) {
  6405. if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
  6406. if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  6407. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  6408. };
  6409. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  6410. return wrap(tag, description);
  6411. };
  6412. SymbolPrototype = $Symbol[PROTOTYPE];
  6413. redefine(SymbolPrototype, 'toString', function toString() {
  6414. return getInternalState(this).tag;
  6415. });
  6416. redefine($Symbol, 'withoutSetter', function (description) {
  6417. return wrap(uid(description), description);
  6418. });
  6419. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  6420. definePropertyModule.f = $defineProperty;
  6421. definePropertiesModule.f = $defineProperties;
  6422. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  6423. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  6424. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  6425. wrappedWellKnownSymbolModule.f = function (name) {
  6426. return wrap(wellKnownSymbol(name), name);
  6427. };
  6428. if (DESCRIPTORS) {
  6429. // https://github.com/tc39/proposal-Symbol-description
  6430. nativeDefineProperty(SymbolPrototype, 'description', {
  6431. configurable: true,
  6432. get: function description() {
  6433. return getInternalState(this).description;
  6434. }
  6435. });
  6436. if (!IS_PURE) {
  6437. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  6438. }
  6439. }
  6440. }
  6441. $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  6442. Symbol: $Symbol
  6443. });
  6444. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  6445. defineWellKnownSymbol(name);
  6446. });
  6447. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  6448. // `Symbol.for` method
  6449. // https://tc39.es/ecma262/#sec-symbol.for
  6450. 'for': function (key) {
  6451. var string = $toString(key);
  6452. if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  6453. var symbol = $Symbol(string);
  6454. StringToSymbolRegistry[string] = symbol;
  6455. SymbolToStringRegistry[symbol] = string;
  6456. return symbol;
  6457. },
  6458. // `Symbol.keyFor` method
  6459. // https://tc39.es/ecma262/#sec-symbol.keyfor
  6460. keyFor: function keyFor(sym) {
  6461. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  6462. if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  6463. },
  6464. useSetter: function () { USE_SETTER = true; },
  6465. useSimple: function () { USE_SETTER = false; }
  6466. });
  6467. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  6468. // `Object.create` method
  6469. // https://tc39.es/ecma262/#sec-object.create
  6470. create: $create,
  6471. // `Object.defineProperty` method
  6472. // https://tc39.es/ecma262/#sec-object.defineproperty
  6473. defineProperty: $defineProperty,
  6474. // `Object.defineProperties` method
  6475. // https://tc39.es/ecma262/#sec-object.defineproperties
  6476. defineProperties: $defineProperties,
  6477. // `Object.getOwnPropertyDescriptor` method
  6478. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  6479. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  6480. });
  6481. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  6482. // `Object.getOwnPropertyNames` method
  6483. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  6484. getOwnPropertyNames: $getOwnPropertyNames,
  6485. // `Object.getOwnPropertySymbols` method
  6486. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  6487. getOwnPropertySymbols: $getOwnPropertySymbols
  6488. });
  6489. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  6490. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  6491. $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  6492. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  6493. return getOwnPropertySymbolsModule.f(toObject(it));
  6494. }
  6495. });
  6496. // `JSON.stringify` method behavior with symbols
  6497. // https://tc39.es/ecma262/#sec-json.stringify
  6498. if ($stringify) {
  6499. var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
  6500. var symbol = $Symbol();
  6501. // MS Edge converts symbol values to JSON as {}
  6502. return $stringify([symbol]) != '[null]'
  6503. // WebKit converts symbol values to JSON as null
  6504. || $stringify({ a: symbol }) != '{}'
  6505. // V8 throws on boxed symbols
  6506. || $stringify(Object(symbol)) != '{}';
  6507. });
  6508. $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
  6509. // eslint-disable-next-line no-unused-vars -- required for `.length`
  6510. stringify: function stringify(it, replacer, space) {
  6511. var args = arraySlice(arguments);
  6512. var $replacer = replacer;
  6513. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  6514. if (!isArray(replacer)) replacer = function (key, value) {
  6515. if (isCallable($replacer)) value = call($replacer, this, key, value);
  6516. if (!isSymbol(value)) return value;
  6517. };
  6518. args[1] = replacer;
  6519. return apply($stringify, null, args);
  6520. }
  6521. });
  6522. }
  6523. // `Symbol.prototype[@@toPrimitive]` method
  6524. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  6525. if (!SymbolPrototype[TO_PRIMITIVE]) {
  6526. var valueOf = SymbolPrototype.valueOf;
  6527. // eslint-disable-next-line no-unused-vars -- required for .length
  6528. redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) {
  6529. // TODO: improve hint logic
  6530. return call(valueOf, this);
  6531. });
  6532. }
  6533. // `Symbol.prototype[@@toStringTag]` property
  6534. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  6535. setToStringTag($Symbol, SYMBOL);
  6536. hiddenKeys[HIDDEN] = true;
  6537. },{"../internals/an-object":74,"../internals/array-iteration":77,"../internals/array-slice":81,"../internals/create-property-descriptor":93,"../internals/define-well-known-symbol":96,"../internals/descriptors":97,"../internals/export":110,"../internals/fails":111,"../internals/function-apply":112,"../internals/function-call":115,"../internals/function-uncurry-this":117,"../internals/get-built-in":118,"../internals/global":122,"../internals/has-own-property":123,"../internals/hidden-keys":124,"../internals/internal-state":131,"../internals/is-array":133,"../internals/is-callable":134,"../internals/is-object":137,"../internals/is-pure":138,"../internals/is-symbol":140,"../internals/native-symbol":148,"../internals/object-create":153,"../internals/object-define-properties":154,"../internals/object-define-property":155,"../internals/object-get-own-property-descriptor":156,"../internals/object-get-own-property-names":158,"../internals/object-get-own-property-names-external":157,"../internals/object-get-own-property-symbols":159,"../internals/object-is-prototype-of":161,"../internals/object-keys":163,"../internals/object-property-is-enumerable":164,"../internals/redefine":174,"../internals/set-to-string-tag":178,"../internals/shared":181,"../internals/shared-key":179,"../internals/to-indexed-object":186,"../internals/to-object":189,"../internals/to-property-key":191,"../internals/to-string":193,"../internals/uid":195,"../internals/well-known-symbol":199,"../internals/well-known-symbol-wrapped":198}],219:[function(_dereq_,module,exports){
  6538. // TODO: Remove from `core-js@4`
  6539. _dereq_('../modules/es.aggregate-error');
  6540. },{"../modules/es.aggregate-error":200}],220:[function(_dereq_,module,exports){
  6541. // TODO: Remove from `core-js@4`
  6542. _dereq_('../modules/es.promise.all-settled.js');
  6543. },{"../modules/es.promise.all-settled.js":212}],221:[function(_dereq_,module,exports){
  6544. // TODO: Remove from `core-js@4`
  6545. _dereq_('../modules/es.promise.any');
  6546. },{"../modules/es.promise.any":213}],222:[function(_dereq_,module,exports){
  6547. 'use strict';
  6548. var $ = _dereq_('../internals/export');
  6549. var newPromiseCapabilityModule = _dereq_('../internals/new-promise-capability');
  6550. var perform = _dereq_('../internals/perform');
  6551. // `Promise.try` method
  6552. // https://github.com/tc39/proposal-promise-try
  6553. $({ target: 'Promise', stat: true }, {
  6554. 'try': function (callbackfn) {
  6555. var promiseCapability = newPromiseCapabilityModule.f(this);
  6556. var result = perform(callbackfn);
  6557. (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
  6558. return promiseCapability.promise;
  6559. }
  6560. });
  6561. },{"../internals/export":110,"../internals/new-promise-capability":150,"../internals/perform":170}],223:[function(_dereq_,module,exports){
  6562. _dereq_('../modules/es.array.iterator');
  6563. var DOMIterables = _dereq_('../internals/dom-iterables');
  6564. var global = _dereq_('../internals/global');
  6565. var classof = _dereq_('../internals/classof');
  6566. var createNonEnumerableProperty = _dereq_('../internals/create-non-enumerable-property');
  6567. var Iterators = _dereq_('../internals/iterators');
  6568. var wellKnownSymbol = _dereq_('../internals/well-known-symbol');
  6569. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  6570. for (var COLLECTION_NAME in DOMIterables) {
  6571. var Collection = global[COLLECTION_NAME];
  6572. var CollectionPrototype = Collection && Collection.prototype;
  6573. if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {
  6574. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  6575. }
  6576. Iterators[COLLECTION_NAME] = Iterators.Array;
  6577. }
  6578. },{"../internals/classof":86,"../internals/create-non-enumerable-property":92,"../internals/dom-iterables":99,"../internals/global":122,"../internals/iterators":144,"../internals/well-known-symbol":199,"../modules/es.array.iterator":204}],224:[function(_dereq_,module,exports){
  6579. var parent = _dereq_('../../../es/array/virtual/for-each');
  6580. module.exports = parent;
  6581. },{"../../../es/array/virtual/for-each":54}],225:[function(_dereq_,module,exports){
  6582. var parent = _dereq_('../../es/instance/filter');
  6583. module.exports = parent;
  6584. },{"../../es/instance/filter":56}],226:[function(_dereq_,module,exports){
  6585. _dereq_('../../modules/web.dom-collections.iterator');
  6586. var classof = _dereq_('../../internals/classof');
  6587. var hasOwn = _dereq_('../../internals/has-own-property');
  6588. var isPrototypeOf = _dereq_('../../internals/object-is-prototype-of');
  6589. var method = _dereq_('../array/virtual/for-each');
  6590. var ArrayPrototype = Array.prototype;
  6591. var DOMIterables = {
  6592. DOMTokenList: true,
  6593. NodeList: true
  6594. };
  6595. module.exports = function (it) {
  6596. var own = it.forEach;
  6597. return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.forEach)
  6598. || hasOwn(DOMIterables, classof(it)) ? method : own;
  6599. };
  6600. },{"../../internals/classof":86,"../../internals/has-own-property":123,"../../internals/object-is-prototype-of":161,"../../modules/web.dom-collections.iterator":223,"../array/virtual/for-each":224}],227:[function(_dereq_,module,exports){
  6601. var parent = _dereq_('../../es/instance/includes');
  6602. module.exports = parent;
  6603. },{"../../es/instance/includes":57}],228:[function(_dereq_,module,exports){
  6604. var parent = _dereq_('../../es/json/stringify');
  6605. module.exports = parent;
  6606. },{"../../es/json/stringify":58}],229:[function(_dereq_,module,exports){
  6607. var parent = _dereq_('../../es/object/define-properties');
  6608. module.exports = parent;
  6609. },{"../../es/object/define-properties":59}],230:[function(_dereq_,module,exports){
  6610. var parent = _dereq_('../../es/object/define-property');
  6611. module.exports = parent;
  6612. },{"../../es/object/define-property":60}],231:[function(_dereq_,module,exports){
  6613. var parent = _dereq_('../../es/object/get-own-property-descriptor');
  6614. module.exports = parent;
  6615. },{"../../es/object/get-own-property-descriptor":61}],232:[function(_dereq_,module,exports){
  6616. var parent = _dereq_('../../es/object/get-own-property-descriptors');
  6617. module.exports = parent;
  6618. },{"../../es/object/get-own-property-descriptors":62}],233:[function(_dereq_,module,exports){
  6619. var parent = _dereq_('../../es/object/get-own-property-symbols');
  6620. module.exports = parent;
  6621. },{"../../es/object/get-own-property-symbols":63}],234:[function(_dereq_,module,exports){
  6622. var parent = _dereq_('../../es/object/keys');
  6623. module.exports = parent;
  6624. },{"../../es/object/keys":64}],235:[function(_dereq_,module,exports){
  6625. var parent = _dereq_('../../es/promise');
  6626. _dereq_('../../modules/web.dom-collections.iterator');
  6627. module.exports = parent;
  6628. },{"../../es/promise":65,"../../modules/web.dom-collections.iterator":223}],236:[function(_dereq_,module,exports){
  6629. /**
  6630. * Copyright (c) 2014-present, Facebook, Inc.
  6631. *
  6632. * This source code is licensed under the MIT license found in the
  6633. * LICENSE file in the root directory of this source tree.
  6634. */
  6635. var runtime = (function (exports) {
  6636. "use strict";
  6637. var Op = Object.prototype;
  6638. var hasOwn = Op.hasOwnProperty;
  6639. var undefined; // More compressible than void 0.
  6640. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  6641. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  6642. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  6643. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  6644. function define(obj, key, value) {
  6645. Object.defineProperty(obj, key, {
  6646. value: value,
  6647. enumerable: true,
  6648. configurable: true,
  6649. writable: true
  6650. });
  6651. return obj[key];
  6652. }
  6653. try {
  6654. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  6655. define({}, "");
  6656. } catch (err) {
  6657. define = function(obj, key, value) {
  6658. return obj[key] = value;
  6659. };
  6660. }
  6661. function wrap(innerFn, outerFn, self, tryLocsList) {
  6662. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  6663. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  6664. var generator = Object.create(protoGenerator.prototype);
  6665. var context = new Context(tryLocsList || []);
  6666. // The ._invoke method unifies the implementations of the .next,
  6667. // .throw, and .return methods.
  6668. generator._invoke = makeInvokeMethod(innerFn, self, context);
  6669. return generator;
  6670. }
  6671. exports.wrap = wrap;
  6672. // Try/catch helper to minimize deoptimizations. Returns a completion
  6673. // record like context.tryEntries[i].completion. This interface could
  6674. // have been (and was previously) designed to take a closure to be
  6675. // invoked without arguments, but in all the cases we care about we
  6676. // already have an existing method we want to call, so there's no need
  6677. // to create a new function object. We can even get away with assuming
  6678. // the method takes exactly one argument, since that happens to be true
  6679. // in every case, so we don't have to touch the arguments object. The
  6680. // only additional allocation required is the completion record, which
  6681. // has a stable shape and so hopefully should be cheap to allocate.
  6682. function tryCatch(fn, obj, arg) {
  6683. try {
  6684. return { type: "normal", arg: fn.call(obj, arg) };
  6685. } catch (err) {
  6686. return { type: "throw", arg: err };
  6687. }
  6688. }
  6689. var GenStateSuspendedStart = "suspendedStart";
  6690. var GenStateSuspendedYield = "suspendedYield";
  6691. var GenStateExecuting = "executing";
  6692. var GenStateCompleted = "completed";
  6693. // Returning this object from the innerFn has the same effect as
  6694. // breaking out of the dispatch switch statement.
  6695. var ContinueSentinel = {};
  6696. // Dummy constructor functions that we use as the .constructor and
  6697. // .constructor.prototype properties for functions that return Generator
  6698. // objects. For full spec compliance, you may wish to configure your
  6699. // minifier not to mangle the names of these two functions.
  6700. function Generator() {}
  6701. function GeneratorFunction() {}
  6702. function GeneratorFunctionPrototype() {}
  6703. // This is a polyfill for %IteratorPrototype% for environments that
  6704. // don't natively support it.
  6705. var IteratorPrototype = {};
  6706. define(IteratorPrototype, iteratorSymbol, function () {
  6707. return this;
  6708. });
  6709. var getProto = Object.getPrototypeOf;
  6710. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  6711. if (NativeIteratorPrototype &&
  6712. NativeIteratorPrototype !== Op &&
  6713. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  6714. // This environment has a native %IteratorPrototype%; use it instead
  6715. // of the polyfill.
  6716. IteratorPrototype = NativeIteratorPrototype;
  6717. }
  6718. var Gp = GeneratorFunctionPrototype.prototype =
  6719. Generator.prototype = Object.create(IteratorPrototype);
  6720. GeneratorFunction.prototype = GeneratorFunctionPrototype;
  6721. define(Gp, "constructor", GeneratorFunctionPrototype);
  6722. define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
  6723. GeneratorFunction.displayName = define(
  6724. GeneratorFunctionPrototype,
  6725. toStringTagSymbol,
  6726. "GeneratorFunction"
  6727. );
  6728. // Helper for defining the .next, .throw, and .return methods of the
  6729. // Iterator interface in terms of a single ._invoke method.
  6730. function defineIteratorMethods(prototype) {
  6731. ["next", "throw", "return"].forEach(function(method) {
  6732. define(prototype, method, function(arg) {
  6733. return this._invoke(method, arg);
  6734. });
  6735. });
  6736. }
  6737. exports.isGeneratorFunction = function(genFun) {
  6738. var ctor = typeof genFun === "function" && genFun.constructor;
  6739. return ctor
  6740. ? ctor === GeneratorFunction ||
  6741. // For the native GeneratorFunction constructor, the best we can
  6742. // do is to check its .name property.
  6743. (ctor.displayName || ctor.name) === "GeneratorFunction"
  6744. : false;
  6745. };
  6746. exports.mark = function(genFun) {
  6747. if (Object.setPrototypeOf) {
  6748. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  6749. } else {
  6750. genFun.__proto__ = GeneratorFunctionPrototype;
  6751. define(genFun, toStringTagSymbol, "GeneratorFunction");
  6752. }
  6753. genFun.prototype = Object.create(Gp);
  6754. return genFun;
  6755. };
  6756. // Within the body of any async function, `await x` is transformed to
  6757. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  6758. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  6759. // meant to be awaited.
  6760. exports.awrap = function(arg) {
  6761. return { __await: arg };
  6762. };
  6763. function AsyncIterator(generator, PromiseImpl) {
  6764. function invoke(method, arg, resolve, reject) {
  6765. var record = tryCatch(generator[method], generator, arg);
  6766. if (record.type === "throw") {
  6767. reject(record.arg);
  6768. } else {
  6769. var result = record.arg;
  6770. var value = result.value;
  6771. if (value &&
  6772. typeof value === "object" &&
  6773. hasOwn.call(value, "__await")) {
  6774. return PromiseImpl.resolve(value.__await).then(function(value) {
  6775. invoke("next", value, resolve, reject);
  6776. }, function(err) {
  6777. invoke("throw", err, resolve, reject);
  6778. });
  6779. }
  6780. return PromiseImpl.resolve(value).then(function(unwrapped) {
  6781. // When a yielded Promise is resolved, its final value becomes
  6782. // the .value of the Promise<{value,done}> result for the
  6783. // current iteration.
  6784. result.value = unwrapped;
  6785. resolve(result);
  6786. }, function(error) {
  6787. // If a rejected Promise was yielded, throw the rejection back
  6788. // into the async generator function so it can be handled there.
  6789. return invoke("throw", error, resolve, reject);
  6790. });
  6791. }
  6792. }
  6793. var previousPromise;
  6794. function enqueue(method, arg) {
  6795. function callInvokeWithMethodAndArg() {
  6796. return new PromiseImpl(function(resolve, reject) {
  6797. invoke(method, arg, resolve, reject);
  6798. });
  6799. }
  6800. return previousPromise =
  6801. // If enqueue has been called before, then we want to wait until
  6802. // all previous Promises have been resolved before calling invoke,
  6803. // so that results are always delivered in the correct order. If
  6804. // enqueue has not been called before, then it is important to
  6805. // call invoke immediately, without waiting on a callback to fire,
  6806. // so that the async generator function has the opportunity to do
  6807. // any necessary setup in a predictable way. This predictability
  6808. // is why the Promise constructor synchronously invokes its
  6809. // executor callback, and why async functions synchronously
  6810. // execute code before the first await. Since we implement simple
  6811. // async functions in terms of async generators, it is especially
  6812. // important to get this right, even though it requires care.
  6813. previousPromise ? previousPromise.then(
  6814. callInvokeWithMethodAndArg,
  6815. // Avoid propagating failures to Promises returned by later
  6816. // invocations of the iterator.
  6817. callInvokeWithMethodAndArg
  6818. ) : callInvokeWithMethodAndArg();
  6819. }
  6820. // Define the unified helper method that is used to implement .next,
  6821. // .throw, and .return (see defineIteratorMethods).
  6822. this._invoke = enqueue;
  6823. }
  6824. defineIteratorMethods(AsyncIterator.prototype);
  6825. define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  6826. return this;
  6827. });
  6828. exports.AsyncIterator = AsyncIterator;
  6829. // Note that simple async functions are implemented on top of
  6830. // AsyncIterator objects; they just return a Promise for the value of
  6831. // the final result produced by the iterator.
  6832. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  6833. if (PromiseImpl === void 0) PromiseImpl = Promise;
  6834. var iter = new AsyncIterator(
  6835. wrap(innerFn, outerFn, self, tryLocsList),
  6836. PromiseImpl
  6837. );
  6838. return exports.isGeneratorFunction(outerFn)
  6839. ? iter // If outerFn is a generator, return the full iterator.
  6840. : iter.next().then(function(result) {
  6841. return result.done ? result.value : iter.next();
  6842. });
  6843. };
  6844. function makeInvokeMethod(innerFn, self, context) {
  6845. var state = GenStateSuspendedStart;
  6846. return function invoke(method, arg) {
  6847. if (state === GenStateExecuting) {
  6848. throw new Error("Generator is already running");
  6849. }
  6850. if (state === GenStateCompleted) {
  6851. if (method === "throw") {
  6852. throw arg;
  6853. }
  6854. // Be forgiving, per 25.3.3.3.3 of the spec:
  6855. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  6856. return doneResult();
  6857. }
  6858. context.method = method;
  6859. context.arg = arg;
  6860. while (true) {
  6861. var delegate = context.delegate;
  6862. if (delegate) {
  6863. var delegateResult = maybeInvokeDelegate(delegate, context);
  6864. if (delegateResult) {
  6865. if (delegateResult === ContinueSentinel) continue;
  6866. return delegateResult;
  6867. }
  6868. }
  6869. if (context.method === "next") {
  6870. // Setting context._sent for legacy support of Babel's
  6871. // function.sent implementation.
  6872. context.sent = context._sent = context.arg;
  6873. } else if (context.method === "throw") {
  6874. if (state === GenStateSuspendedStart) {
  6875. state = GenStateCompleted;
  6876. throw context.arg;
  6877. }
  6878. context.dispatchException(context.arg);
  6879. } else if (context.method === "return") {
  6880. context.abrupt("return", context.arg);
  6881. }
  6882. state = GenStateExecuting;
  6883. var record = tryCatch(innerFn, self, context);
  6884. if (record.type === "normal") {
  6885. // If an exception is thrown from innerFn, we leave state ===
  6886. // GenStateExecuting and loop back for another invocation.
  6887. state = context.done
  6888. ? GenStateCompleted
  6889. : GenStateSuspendedYield;
  6890. if (record.arg === ContinueSentinel) {
  6891. continue;
  6892. }
  6893. return {
  6894. value: record.arg,
  6895. done: context.done
  6896. };
  6897. } else if (record.type === "throw") {
  6898. state = GenStateCompleted;
  6899. // Dispatch the exception by looping back around to the
  6900. // context.dispatchException(context.arg) call above.
  6901. context.method = "throw";
  6902. context.arg = record.arg;
  6903. }
  6904. }
  6905. };
  6906. }
  6907. // Call delegate.iterator[context.method](context.arg) and handle the
  6908. // result, either by returning a { value, done } result from the
  6909. // delegate iterator, or by modifying context.method and context.arg,
  6910. // setting context.delegate to null, and returning the ContinueSentinel.
  6911. function maybeInvokeDelegate(delegate, context) {
  6912. var method = delegate.iterator[context.method];
  6913. if (method === undefined) {
  6914. // A .throw or .return when the delegate iterator has no .throw
  6915. // method always terminates the yield* loop.
  6916. context.delegate = null;
  6917. if (context.method === "throw") {
  6918. // Note: ["return"] must be used for ES3 parsing compatibility.
  6919. if (delegate.iterator["return"]) {
  6920. // If the delegate iterator has a return method, give it a
  6921. // chance to clean up.
  6922. context.method = "return";
  6923. context.arg = undefined;
  6924. maybeInvokeDelegate(delegate, context);
  6925. if (context.method === "throw") {
  6926. // If maybeInvokeDelegate(context) changed context.method from
  6927. // "return" to "throw", let that override the TypeError below.
  6928. return ContinueSentinel;
  6929. }
  6930. }
  6931. context.method = "throw";
  6932. context.arg = new TypeError(
  6933. "The iterator does not provide a 'throw' method");
  6934. }
  6935. return ContinueSentinel;
  6936. }
  6937. var record = tryCatch(method, delegate.iterator, context.arg);
  6938. if (record.type === "throw") {
  6939. context.method = "throw";
  6940. context.arg = record.arg;
  6941. context.delegate = null;
  6942. return ContinueSentinel;
  6943. }
  6944. var info = record.arg;
  6945. if (! info) {
  6946. context.method = "throw";
  6947. context.arg = new TypeError("iterator result is not an object");
  6948. context.delegate = null;
  6949. return ContinueSentinel;
  6950. }
  6951. if (info.done) {
  6952. // Assign the result of the finished delegate to the temporary
  6953. // variable specified by delegate.resultName (see delegateYield).
  6954. context[delegate.resultName] = info.value;
  6955. // Resume execution at the desired location (see delegateYield).
  6956. context.next = delegate.nextLoc;
  6957. // If context.method was "throw" but the delegate handled the
  6958. // exception, let the outer generator proceed normally. If
  6959. // context.method was "next", forget context.arg since it has been
  6960. // "consumed" by the delegate iterator. If context.method was
  6961. // "return", allow the original .return call to continue in the
  6962. // outer generator.
  6963. if (context.method !== "return") {
  6964. context.method = "next";
  6965. context.arg = undefined;
  6966. }
  6967. } else {
  6968. // Re-yield the result returned by the delegate method.
  6969. return info;
  6970. }
  6971. // The delegate iterator is finished, so forget it and continue with
  6972. // the outer generator.
  6973. context.delegate = null;
  6974. return ContinueSentinel;
  6975. }
  6976. // Define Generator.prototype.{next,throw,return} in terms of the
  6977. // unified ._invoke helper method.
  6978. defineIteratorMethods(Gp);
  6979. define(Gp, toStringTagSymbol, "Generator");
  6980. // A Generator should always return itself as the iterator object when the
  6981. // @@iterator function is called on it. Some browsers' implementations of the
  6982. // iterator prototype chain incorrectly implement this, causing the Generator
  6983. // object to not be returned from this call. This ensures that doesn't happen.
  6984. // See https://github.com/facebook/regenerator/issues/274 for more details.
  6985. define(Gp, iteratorSymbol, function() {
  6986. return this;
  6987. });
  6988. define(Gp, "toString", function() {
  6989. return "[object Generator]";
  6990. });
  6991. function pushTryEntry(locs) {
  6992. var entry = { tryLoc: locs[0] };
  6993. if (1 in locs) {
  6994. entry.catchLoc = locs[1];
  6995. }
  6996. if (2 in locs) {
  6997. entry.finallyLoc = locs[2];
  6998. entry.afterLoc = locs[3];
  6999. }
  7000. this.tryEntries.push(entry);
  7001. }
  7002. function resetTryEntry(entry) {
  7003. var record = entry.completion || {};
  7004. record.type = "normal";
  7005. delete record.arg;
  7006. entry.completion = record;
  7007. }
  7008. function Context(tryLocsList) {
  7009. // The root entry object (effectively a try statement without a catch
  7010. // or a finally block) gives us a place to store values thrown from
  7011. // locations where there is no enclosing try statement.
  7012. this.tryEntries = [{ tryLoc: "root" }];
  7013. tryLocsList.forEach(pushTryEntry, this);
  7014. this.reset(true);
  7015. }
  7016. exports.keys = function(object) {
  7017. var keys = [];
  7018. for (var key in object) {
  7019. keys.push(key);
  7020. }
  7021. keys.reverse();
  7022. // Rather than returning an object with a next method, we keep
  7023. // things simple and return the next function itself.
  7024. return function next() {
  7025. while (keys.length) {
  7026. var key = keys.pop();
  7027. if (key in object) {
  7028. next.value = key;
  7029. next.done = false;
  7030. return next;
  7031. }
  7032. }
  7033. // To avoid creating an additional object, we just hang the .value
  7034. // and .done properties off the next function object itself. This
  7035. // also ensures that the minifier will not anonymize the function.
  7036. next.done = true;
  7037. return next;
  7038. };
  7039. };
  7040. function values(iterable) {
  7041. if (iterable) {
  7042. var iteratorMethod = iterable[iteratorSymbol];
  7043. if (iteratorMethod) {
  7044. return iteratorMethod.call(iterable);
  7045. }
  7046. if (typeof iterable.next === "function") {
  7047. return iterable;
  7048. }
  7049. if (!isNaN(iterable.length)) {
  7050. var i = -1, next = function next() {
  7051. while (++i < iterable.length) {
  7052. if (hasOwn.call(iterable, i)) {
  7053. next.value = iterable[i];
  7054. next.done = false;
  7055. return next;
  7056. }
  7057. }
  7058. next.value = undefined;
  7059. next.done = true;
  7060. return next;
  7061. };
  7062. return next.next = next;
  7063. }
  7064. }
  7065. // Return an iterator with no values.
  7066. return { next: doneResult };
  7067. }
  7068. exports.values = values;
  7069. function doneResult() {
  7070. return { value: undefined, done: true };
  7071. }
  7072. Context.prototype = {
  7073. constructor: Context,
  7074. reset: function(skipTempReset) {
  7075. this.prev = 0;
  7076. this.next = 0;
  7077. // Resetting context._sent for legacy support of Babel's
  7078. // function.sent implementation.
  7079. this.sent = this._sent = undefined;
  7080. this.done = false;
  7081. this.delegate = null;
  7082. this.method = "next";
  7083. this.arg = undefined;
  7084. this.tryEntries.forEach(resetTryEntry);
  7085. if (!skipTempReset) {
  7086. for (var name in this) {
  7087. // Not sure about the optimal order of these conditions:
  7088. if (name.charAt(0) === "t" &&
  7089. hasOwn.call(this, name) &&
  7090. !isNaN(+name.slice(1))) {
  7091. this[name] = undefined;
  7092. }
  7093. }
  7094. }
  7095. },
  7096. stop: function() {
  7097. this.done = true;
  7098. var rootEntry = this.tryEntries[0];
  7099. var rootRecord = rootEntry.completion;
  7100. if (rootRecord.type === "throw") {
  7101. throw rootRecord.arg;
  7102. }
  7103. return this.rval;
  7104. },
  7105. dispatchException: function(exception) {
  7106. if (this.done) {
  7107. throw exception;
  7108. }
  7109. var context = this;
  7110. function handle(loc, caught) {
  7111. record.type = "throw";
  7112. record.arg = exception;
  7113. context.next = loc;
  7114. if (caught) {
  7115. // If the dispatched exception was caught by a catch block,
  7116. // then let that catch block handle the exception normally.
  7117. context.method = "next";
  7118. context.arg = undefined;
  7119. }
  7120. return !! caught;
  7121. }
  7122. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7123. var entry = this.tryEntries[i];
  7124. var record = entry.completion;
  7125. if (entry.tryLoc === "root") {
  7126. // Exception thrown outside of any try block that could handle
  7127. // it, so set the completion value of the entire function to
  7128. // throw the exception.
  7129. return handle("end");
  7130. }
  7131. if (entry.tryLoc <= this.prev) {
  7132. var hasCatch = hasOwn.call(entry, "catchLoc");
  7133. var hasFinally = hasOwn.call(entry, "finallyLoc");
  7134. if (hasCatch && hasFinally) {
  7135. if (this.prev < entry.catchLoc) {
  7136. return handle(entry.catchLoc, true);
  7137. } else if (this.prev < entry.finallyLoc) {
  7138. return handle(entry.finallyLoc);
  7139. }
  7140. } else if (hasCatch) {
  7141. if (this.prev < entry.catchLoc) {
  7142. return handle(entry.catchLoc, true);
  7143. }
  7144. } else if (hasFinally) {
  7145. if (this.prev < entry.finallyLoc) {
  7146. return handle(entry.finallyLoc);
  7147. }
  7148. } else {
  7149. throw new Error("try statement without catch or finally");
  7150. }
  7151. }
  7152. }
  7153. },
  7154. abrupt: function(type, arg) {
  7155. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7156. var entry = this.tryEntries[i];
  7157. if (entry.tryLoc <= this.prev &&
  7158. hasOwn.call(entry, "finallyLoc") &&
  7159. this.prev < entry.finallyLoc) {
  7160. var finallyEntry = entry;
  7161. break;
  7162. }
  7163. }
  7164. if (finallyEntry &&
  7165. (type === "break" ||
  7166. type === "continue") &&
  7167. finallyEntry.tryLoc <= arg &&
  7168. arg <= finallyEntry.finallyLoc) {
  7169. // Ignore the finally entry if control is not jumping to a
  7170. // location outside the try/catch block.
  7171. finallyEntry = null;
  7172. }
  7173. var record = finallyEntry ? finallyEntry.completion : {};
  7174. record.type = type;
  7175. record.arg = arg;
  7176. if (finallyEntry) {
  7177. this.method = "next";
  7178. this.next = finallyEntry.finallyLoc;
  7179. return ContinueSentinel;
  7180. }
  7181. return this.complete(record);
  7182. },
  7183. complete: function(record, afterLoc) {
  7184. if (record.type === "throw") {
  7185. throw record.arg;
  7186. }
  7187. if (record.type === "break" ||
  7188. record.type === "continue") {
  7189. this.next = record.arg;
  7190. } else if (record.type === "return") {
  7191. this.rval = this.arg = record.arg;
  7192. this.method = "return";
  7193. this.next = "end";
  7194. } else if (record.type === "normal" && afterLoc) {
  7195. this.next = afterLoc;
  7196. }
  7197. return ContinueSentinel;
  7198. },
  7199. finish: function(finallyLoc) {
  7200. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7201. var entry = this.tryEntries[i];
  7202. if (entry.finallyLoc === finallyLoc) {
  7203. this.complete(entry.completion, entry.afterLoc);
  7204. resetTryEntry(entry);
  7205. return ContinueSentinel;
  7206. }
  7207. }
  7208. },
  7209. "catch": function(tryLoc) {
  7210. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  7211. var entry = this.tryEntries[i];
  7212. if (entry.tryLoc === tryLoc) {
  7213. var record = entry.completion;
  7214. if (record.type === "throw") {
  7215. var thrown = record.arg;
  7216. resetTryEntry(entry);
  7217. }
  7218. return thrown;
  7219. }
  7220. }
  7221. // The context.catch method must only be called with a location
  7222. // argument that corresponds to a known catch block.
  7223. throw new Error("illegal catch attempt");
  7224. },
  7225. delegateYield: function(iterable, resultName, nextLoc) {
  7226. this.delegate = {
  7227. iterator: values(iterable),
  7228. resultName: resultName,
  7229. nextLoc: nextLoc
  7230. };
  7231. if (this.method === "next") {
  7232. // Deliberately forget the last sent value so that we don't
  7233. // accidentally pass it on to the delegate.
  7234. this.arg = undefined;
  7235. }
  7236. return ContinueSentinel;
  7237. }
  7238. };
  7239. // Regardless of whether this script is executing as a CommonJS module
  7240. // or not, return the runtime object so that we can declare the variable
  7241. // regeneratorRuntime in the outer scope, which allows this module to be
  7242. // injected easily by `bin/regenerator --include-runtime script.js`.
  7243. return exports;
  7244. }(
  7245. // If this script is executing as a CommonJS module, use module.exports
  7246. // as the regeneratorRuntime namespace. Otherwise create a new empty
  7247. // object. Either way, the resulting object will be used to initialize
  7248. // the regeneratorRuntime variable at the top of this file.
  7249. typeof module === "object" ? module.exports : {}
  7250. ));
  7251. try {
  7252. regeneratorRuntime = runtime;
  7253. } catch (accidentalStrictMode) {
  7254. // This module should not be running in strict mode, so the above
  7255. // assignment should always work unless something is misconfigured. Just
  7256. // in case runtime.js accidentally runs in strict mode, in modern engines
  7257. // we can explicitly access globalThis. In older engines we can escape
  7258. // strict mode using a global Function call. This could conceivably fail
  7259. // if a Content Security Policy forbids using Function, but in that case
  7260. // the proper solution is to fix the accidental strict mode problem. If
  7261. // you've misconfigured your bundler to force strict mode and applied a
  7262. // CSP to forbid Function, and you're not willing to fix either of those
  7263. // problems, please detail your unique predicament in a GitHub issue.
  7264. if (typeof globalThis === "object") {
  7265. globalThis.regeneratorRuntime = runtime;
  7266. } else {
  7267. Function("r", "regeneratorRuntime = r")(runtime);
  7268. }
  7269. }
  7270. },{}]},{},[1])(1)
  7271. });