babel-standalone.js 3.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829
  1. /*** POLYFILLS ***/
  2. console = typeof console !== 'undefined' ? console : null;
  3. if (console) assert = console.assert
  4. if (!console) console = {
  5. trace: () => null,
  6. log: () => null,
  7. warn: () => null,
  8. error: () => null,
  9. info: () => null,
  10. debug: () => null,
  11. };
  12. Uint8Array = Array;
  13. globalThis = global = window = parent = this;
  14. var describeContext;
  15. var itContext;
  16. describe = (description, callback) => {
  17. describeContext = description;
  18. callback();
  19. }
  20. it = (description, callback) => {
  21. itContext = description;
  22. try {
  23. callback();
  24. } catch(error) {
  25. assert(false, "error in " + describeContext + " -> " + itContext + "\n" + error.message);
  26. }
  27. }
  28. expect = (subject) => {
  29. return {
  30. toBe: (expected) => {
  31. assert(subject === expected, describeContext + " -> " + itContext);
  32. },
  33. toThrow: () => {
  34. try {
  35. subject();
  36. assert(false, describeContext + " -> " + itContext);
  37. }
  38. catch (err) {
  39. assert(true);
  40. }
  41. },
  42. toMatch: (pattern) => {
  43. assert(!!subject.match(pattern), describeContext + " -> " + itContext);
  44. },
  45. }
  46. };
  47. /*** BABEL ***/
  48. (function (global, factory) {
  49. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  50. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  51. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Babel = {}));
  52. }(this, (function (exports) { 'use strict';
  53. var babel = /*#__PURE__*/Object.freeze({
  54. __proto__: null,
  55. get version () { return version$3; },
  56. get types () { return t$p; },
  57. get DEFAULT_EXTENSIONS () { return DEFAULT_EXTENSIONS; },
  58. get OptionManager () { return OptionManager; },
  59. get Plugin () { return Plugin; },
  60. get File () { return File; },
  61. get buildExternalHelpers () { return babelBuildExternalHelpers; },
  62. get resolvePlugin () { return resolvePlugin; },
  63. get resolvePreset () { return resolvePreset; },
  64. get getEnv () { return getEnv; },
  65. get tokTypes () { return types$1; },
  66. get traverse () { return traverse; },
  67. get template () { return template$2; },
  68. get createConfigItem () { return createConfigItem; },
  69. get createConfigItemSync () { return createConfigItemSync; },
  70. get createConfigItemAsync () { return createConfigItemAsync; },
  71. get loadPartialConfig () { return loadPartialConfig; },
  72. get loadPartialConfigSync () { return loadPartialConfigSync; },
  73. get loadPartialConfigAsync () { return loadPartialConfigAsync; },
  74. get loadOptions () { return loadOptions; },
  75. get loadOptionsSync () { return loadOptionsSync; },
  76. get loadOptionsAsync () { return loadOptionsAsync; },
  77. get transform () { return transform$2; },
  78. get transformSync () { return transformSync; },
  79. get transformAsync () { return transformAsync; },
  80. get transformFile () { return transformFile; },
  81. get transformFileSync () { return transformFileSync; },
  82. get transformFileAsync () { return transformFileAsync; },
  83. get transformFromAst () { return transformFromAst$1; },
  84. get transformFromAstSync () { return transformFromAstSync; },
  85. get transformFromAstAsync () { return transformFromAstAsync; },
  86. get parse () { return parse$3; },
  87. get parseSync () { return parseSync; },
  88. get parseAsync () { return parseAsync; }
  89. });
  90. function _defineProperties(target, props) {
  91. for (var i = 0; i < props.length; i++) {
  92. var descriptor = props[i];
  93. descriptor.enumerable = descriptor.enumerable || false;
  94. descriptor.configurable = true;
  95. if ("value" in descriptor) descriptor.writable = true;
  96. Object.defineProperty(target, descriptor.key, descriptor);
  97. }
  98. }
  99. function _createClass(Constructor, protoProps, staticProps) {
  100. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  101. if (staticProps) _defineProperties(Constructor, staticProps);
  102. return Constructor;
  103. }
  104. function _inherits(subClass, superClass) {
  105. if (typeof superClass !== "function" && superClass !== null) {
  106. throw new TypeError("Super expression must either be null or a function");
  107. }
  108. subClass.prototype = Object.create(superClass && superClass.prototype, {
  109. constructor: {
  110. value: subClass,
  111. writable: true,
  112. configurable: true
  113. }
  114. });
  115. if (superClass) _setPrototypeOf(subClass, superClass);
  116. }
  117. function _setPrototypeOf(o, p) {
  118. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  119. o.__proto__ = p;
  120. return o;
  121. };
  122. return _setPrototypeOf(o, p);
  123. }
  124. function _objectWithoutPropertiesLoose(source, excluded) {
  125. if (source == null) return {};
  126. var target = {};
  127. var sourceKeys = Object.keys(source);
  128. var key, i;
  129. for (i = 0; i < sourceKeys.length; i++) {
  130. key = sourceKeys[i];
  131. if (excluded.indexOf(key) >= 0) continue;
  132. target[key] = source[key];
  133. }
  134. return target;
  135. }
  136. function _objectWithoutProperties(source, excluded) {
  137. if (source == null) return {};
  138. var target = _objectWithoutPropertiesLoose(source, excluded);
  139. var key, i;
  140. if (Object.getOwnPropertySymbols) {
  141. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  142. for (i = 0; i < sourceSymbolKeys.length; i++) {
  143. key = sourceSymbolKeys[i];
  144. if (excluded.indexOf(key) >= 0) continue;
  145. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  146. target[key] = source[key];
  147. }
  148. }
  149. return target;
  150. }
  151. function _taggedTemplateLiteralLoose(strings, raw) {
  152. if (!raw) {
  153. raw = strings.slice(0);
  154. }
  155. strings.raw = raw;
  156. return strings;
  157. }
  158. function _slicedToArray$2(arr, i) {
  159. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  160. }
  161. function _toConsumableArray(arr) {
  162. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  163. }
  164. function _arrayWithoutHoles(arr) {
  165. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  166. }
  167. function _arrayWithHoles(arr) {
  168. if (Array.isArray(arr)) return arr;
  169. }
  170. function _iterableToArray(iter) {
  171. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  172. }
  173. function _iterableToArrayLimit(arr, i) {
  174. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  175. if (_i == null) return;
  176. var _arr = [];
  177. var _n = true;
  178. var _d = false;
  179. var _s, _e;
  180. try {
  181. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  182. _arr.push(_s.value);
  183. if (i && _arr.length === i) break;
  184. }
  185. } catch (err) {
  186. _d = true;
  187. _e = err;
  188. } finally {
  189. try {
  190. if (!_n && _i["return"] != null) _i["return"]();
  191. } finally {
  192. if (_d) throw _e;
  193. }
  194. }
  195. return _arr;
  196. }
  197. function _unsupportedIterableToArray(o, minLen) {
  198. if (!o) return;
  199. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  200. var n = Object.prototype.toString.call(o).slice(8, -1);
  201. if (n === "Object" && o.constructor) n = o.constructor.name;
  202. if (n === "Map" || n === "Set") return Array.from(o);
  203. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  204. }
  205. function _arrayLikeToArray(arr, len) {
  206. if (len == null || len > arr.length) len = arr.length;
  207. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  208. return arr2;
  209. }
  210. function _nonIterableSpread() {
  211. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  212. }
  213. function _nonIterableRest() {
  214. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  215. }
  216. function _createForOfIteratorHelperLoose(o, allowArrayLike) {
  217. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  218. if (it) return (it = it.call(o)).next.bind(it);
  219. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  220. if (it) o = it;
  221. var i = 0;
  222. return function () {
  223. if (i >= o.length) return {
  224. done: true
  225. };
  226. return {
  227. done: false,
  228. value: o[i++]
  229. };
  230. };
  231. }
  232. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  233. }
  234. function shallowEqual(actual, expected) {
  235. var keys = Object.keys(expected);
  236. for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {
  237. var key = _keys[_i];
  238. if (actual[key] !== expected[key]) {
  239. return false;
  240. }
  241. }
  242. return true;
  243. }
  244. function isArrayExpression(node, opts) {
  245. if (!node) return false;
  246. var nodeType = node.type;
  247. if (nodeType === "ArrayExpression") {
  248. if (typeof opts === "undefined") {
  249. return true;
  250. } else {
  251. return shallowEqual(node, opts);
  252. }
  253. }
  254. return false;
  255. }
  256. function isAssignmentExpression(node, opts) {
  257. if (!node) return false;
  258. var nodeType = node.type;
  259. if (nodeType === "AssignmentExpression") {
  260. if (typeof opts === "undefined") {
  261. return true;
  262. } else {
  263. return shallowEqual(node, opts);
  264. }
  265. }
  266. return false;
  267. }
  268. function isBinaryExpression(node, opts) {
  269. if (!node) return false;
  270. var nodeType = node.type;
  271. if (nodeType === "BinaryExpression") {
  272. if (typeof opts === "undefined") {
  273. return true;
  274. } else {
  275. return shallowEqual(node, opts);
  276. }
  277. }
  278. return false;
  279. }
  280. function isInterpreterDirective(node, opts) {
  281. if (!node) return false;
  282. var nodeType = node.type;
  283. if (nodeType === "InterpreterDirective") {
  284. if (typeof opts === "undefined") {
  285. return true;
  286. } else {
  287. return shallowEqual(node, opts);
  288. }
  289. }
  290. return false;
  291. }
  292. function isDirective(node, opts) {
  293. if (!node) return false;
  294. var nodeType = node.type;
  295. if (nodeType === "Directive") {
  296. if (typeof opts === "undefined") {
  297. return true;
  298. } else {
  299. return shallowEqual(node, opts);
  300. }
  301. }
  302. return false;
  303. }
  304. function isDirectiveLiteral(node, opts) {
  305. if (!node) return false;
  306. var nodeType = node.type;
  307. if (nodeType === "DirectiveLiteral") {
  308. if (typeof opts === "undefined") {
  309. return true;
  310. } else {
  311. return shallowEqual(node, opts);
  312. }
  313. }
  314. return false;
  315. }
  316. function isBlockStatement(node, opts) {
  317. if (!node) return false;
  318. var nodeType = node.type;
  319. if (nodeType === "BlockStatement") {
  320. if (typeof opts === "undefined") {
  321. return true;
  322. } else {
  323. return shallowEqual(node, opts);
  324. }
  325. }
  326. return false;
  327. }
  328. function isBreakStatement(node, opts) {
  329. if (!node) return false;
  330. var nodeType = node.type;
  331. if (nodeType === "BreakStatement") {
  332. if (typeof opts === "undefined") {
  333. return true;
  334. } else {
  335. return shallowEqual(node, opts);
  336. }
  337. }
  338. return false;
  339. }
  340. function isCallExpression(node, opts) {
  341. if (!node) return false;
  342. var nodeType = node.type;
  343. if (nodeType === "CallExpression") {
  344. if (typeof opts === "undefined") {
  345. return true;
  346. } else {
  347. return shallowEqual(node, opts);
  348. }
  349. }
  350. return false;
  351. }
  352. function isCatchClause(node, opts) {
  353. if (!node) return false;
  354. var nodeType = node.type;
  355. if (nodeType === "CatchClause") {
  356. if (typeof opts === "undefined") {
  357. return true;
  358. } else {
  359. return shallowEqual(node, opts);
  360. }
  361. }
  362. return false;
  363. }
  364. function isConditionalExpression(node, opts) {
  365. if (!node) return false;
  366. var nodeType = node.type;
  367. if (nodeType === "ConditionalExpression") {
  368. if (typeof opts === "undefined") {
  369. return true;
  370. } else {
  371. return shallowEqual(node, opts);
  372. }
  373. }
  374. return false;
  375. }
  376. function isContinueStatement(node, opts) {
  377. if (!node) return false;
  378. var nodeType = node.type;
  379. if (nodeType === "ContinueStatement") {
  380. if (typeof opts === "undefined") {
  381. return true;
  382. } else {
  383. return shallowEqual(node, opts);
  384. }
  385. }
  386. return false;
  387. }
  388. function isDebuggerStatement(node, opts) {
  389. if (!node) return false;
  390. var nodeType = node.type;
  391. if (nodeType === "DebuggerStatement") {
  392. if (typeof opts === "undefined") {
  393. return true;
  394. } else {
  395. return shallowEqual(node, opts);
  396. }
  397. }
  398. return false;
  399. }
  400. function isDoWhileStatement(node, opts) {
  401. if (!node) return false;
  402. var nodeType = node.type;
  403. if (nodeType === "DoWhileStatement") {
  404. if (typeof opts === "undefined") {
  405. return true;
  406. } else {
  407. return shallowEqual(node, opts);
  408. }
  409. }
  410. return false;
  411. }
  412. function isEmptyStatement(node, opts) {
  413. if (!node) return false;
  414. var nodeType = node.type;
  415. if (nodeType === "EmptyStatement") {
  416. if (typeof opts === "undefined") {
  417. return true;
  418. } else {
  419. return shallowEqual(node, opts);
  420. }
  421. }
  422. return false;
  423. }
  424. function isExpressionStatement(node, opts) {
  425. if (!node) return false;
  426. var nodeType = node.type;
  427. if (nodeType === "ExpressionStatement") {
  428. if (typeof opts === "undefined") {
  429. return true;
  430. } else {
  431. return shallowEqual(node, opts);
  432. }
  433. }
  434. return false;
  435. }
  436. function isFile(node, opts) {
  437. if (!node) return false;
  438. var nodeType = node.type;
  439. if (nodeType === "File") {
  440. if (typeof opts === "undefined") {
  441. return true;
  442. } else {
  443. return shallowEqual(node, opts);
  444. }
  445. }
  446. return false;
  447. }
  448. function isForInStatement(node, opts) {
  449. if (!node) return false;
  450. var nodeType = node.type;
  451. if (nodeType === "ForInStatement") {
  452. if (typeof opts === "undefined") {
  453. return true;
  454. } else {
  455. return shallowEqual(node, opts);
  456. }
  457. }
  458. return false;
  459. }
  460. function isForStatement(node, opts) {
  461. if (!node) return false;
  462. var nodeType = node.type;
  463. if (nodeType === "ForStatement") {
  464. if (typeof opts === "undefined") {
  465. return true;
  466. } else {
  467. return shallowEqual(node, opts);
  468. }
  469. }
  470. return false;
  471. }
  472. function isFunctionDeclaration(node, opts) {
  473. if (!node) return false;
  474. var nodeType = node.type;
  475. if (nodeType === "FunctionDeclaration") {
  476. if (typeof opts === "undefined") {
  477. return true;
  478. } else {
  479. return shallowEqual(node, opts);
  480. }
  481. }
  482. return false;
  483. }
  484. function isFunctionExpression(node, opts) {
  485. if (!node) return false;
  486. var nodeType = node.type;
  487. if (nodeType === "FunctionExpression") {
  488. if (typeof opts === "undefined") {
  489. return true;
  490. } else {
  491. return shallowEqual(node, opts);
  492. }
  493. }
  494. return false;
  495. }
  496. function isIdentifier(node, opts) {
  497. if (!node) return false;
  498. var nodeType = node.type;
  499. if (nodeType === "Identifier") {
  500. if (typeof opts === "undefined") {
  501. return true;
  502. } else {
  503. return shallowEqual(node, opts);
  504. }
  505. }
  506. return false;
  507. }
  508. function isIfStatement(node, opts) {
  509. if (!node) return false;
  510. var nodeType = node.type;
  511. if (nodeType === "IfStatement") {
  512. if (typeof opts === "undefined") {
  513. return true;
  514. } else {
  515. return shallowEqual(node, opts);
  516. }
  517. }
  518. return false;
  519. }
  520. function isLabeledStatement(node, opts) {
  521. if (!node) return false;
  522. var nodeType = node.type;
  523. if (nodeType === "LabeledStatement") {
  524. if (typeof opts === "undefined") {
  525. return true;
  526. } else {
  527. return shallowEqual(node, opts);
  528. }
  529. }
  530. return false;
  531. }
  532. function isStringLiteral(node, opts) {
  533. if (!node) return false;
  534. var nodeType = node.type;
  535. if (nodeType === "StringLiteral") {
  536. if (typeof opts === "undefined") {
  537. return true;
  538. } else {
  539. return shallowEqual(node, opts);
  540. }
  541. }
  542. return false;
  543. }
  544. function isNumericLiteral(node, opts) {
  545. if (!node) return false;
  546. var nodeType = node.type;
  547. if (nodeType === "NumericLiteral") {
  548. if (typeof opts === "undefined") {
  549. return true;
  550. } else {
  551. return shallowEqual(node, opts);
  552. }
  553. }
  554. return false;
  555. }
  556. function isNullLiteral(node, opts) {
  557. if (!node) return false;
  558. var nodeType = node.type;
  559. if (nodeType === "NullLiteral") {
  560. if (typeof opts === "undefined") {
  561. return true;
  562. } else {
  563. return shallowEqual(node, opts);
  564. }
  565. }
  566. return false;
  567. }
  568. function isBooleanLiteral(node, opts) {
  569. if (!node) return false;
  570. var nodeType = node.type;
  571. if (nodeType === "BooleanLiteral") {
  572. if (typeof opts === "undefined") {
  573. return true;
  574. } else {
  575. return shallowEqual(node, opts);
  576. }
  577. }
  578. return false;
  579. }
  580. function isRegExpLiteral(node, opts) {
  581. if (!node) return false;
  582. var nodeType = node.type;
  583. if (nodeType === "RegExpLiteral") {
  584. if (typeof opts === "undefined") {
  585. return true;
  586. } else {
  587. return shallowEqual(node, opts);
  588. }
  589. }
  590. return false;
  591. }
  592. function isLogicalExpression(node, opts) {
  593. if (!node) return false;
  594. var nodeType = node.type;
  595. if (nodeType === "LogicalExpression") {
  596. if (typeof opts === "undefined") {
  597. return true;
  598. } else {
  599. return shallowEqual(node, opts);
  600. }
  601. }
  602. return false;
  603. }
  604. function isMemberExpression(node, opts) {
  605. if (!node) return false;
  606. var nodeType = node.type;
  607. if (nodeType === "MemberExpression") {
  608. if (typeof opts === "undefined") {
  609. return true;
  610. } else {
  611. return shallowEqual(node, opts);
  612. }
  613. }
  614. return false;
  615. }
  616. function isNewExpression(node, opts) {
  617. if (!node) return false;
  618. var nodeType = node.type;
  619. if (nodeType === "NewExpression") {
  620. if (typeof opts === "undefined") {
  621. return true;
  622. } else {
  623. return shallowEqual(node, opts);
  624. }
  625. }
  626. return false;
  627. }
  628. function isProgram(node, opts) {
  629. if (!node) return false;
  630. var nodeType = node.type;
  631. if (nodeType === "Program") {
  632. if (typeof opts === "undefined") {
  633. return true;
  634. } else {
  635. return shallowEqual(node, opts);
  636. }
  637. }
  638. return false;
  639. }
  640. function isObjectExpression(node, opts) {
  641. if (!node) return false;
  642. var nodeType = node.type;
  643. if (nodeType === "ObjectExpression") {
  644. if (typeof opts === "undefined") {
  645. return true;
  646. } else {
  647. return shallowEqual(node, opts);
  648. }
  649. }
  650. return false;
  651. }
  652. function isObjectMethod(node, opts) {
  653. if (!node) return false;
  654. var nodeType = node.type;
  655. if (nodeType === "ObjectMethod") {
  656. if (typeof opts === "undefined") {
  657. return true;
  658. } else {
  659. return shallowEqual(node, opts);
  660. }
  661. }
  662. return false;
  663. }
  664. function isObjectProperty(node, opts) {
  665. if (!node) return false;
  666. var nodeType = node.type;
  667. if (nodeType === "ObjectProperty") {
  668. if (typeof opts === "undefined") {
  669. return true;
  670. } else {
  671. return shallowEqual(node, opts);
  672. }
  673. }
  674. return false;
  675. }
  676. function isRestElement(node, opts) {
  677. if (!node) return false;
  678. var nodeType = node.type;
  679. if (nodeType === "RestElement") {
  680. if (typeof opts === "undefined") {
  681. return true;
  682. } else {
  683. return shallowEqual(node, opts);
  684. }
  685. }
  686. return false;
  687. }
  688. function isReturnStatement(node, opts) {
  689. if (!node) return false;
  690. var nodeType = node.type;
  691. if (nodeType === "ReturnStatement") {
  692. if (typeof opts === "undefined") {
  693. return true;
  694. } else {
  695. return shallowEqual(node, opts);
  696. }
  697. }
  698. return false;
  699. }
  700. function isSequenceExpression(node, opts) {
  701. if (!node) return false;
  702. var nodeType = node.type;
  703. if (nodeType === "SequenceExpression") {
  704. if (typeof opts === "undefined") {
  705. return true;
  706. } else {
  707. return shallowEqual(node, opts);
  708. }
  709. }
  710. return false;
  711. }
  712. function isParenthesizedExpression(node, opts) {
  713. if (!node) return false;
  714. var nodeType = node.type;
  715. if (nodeType === "ParenthesizedExpression") {
  716. if (typeof opts === "undefined") {
  717. return true;
  718. } else {
  719. return shallowEqual(node, opts);
  720. }
  721. }
  722. return false;
  723. }
  724. function isSwitchCase(node, opts) {
  725. if (!node) return false;
  726. var nodeType = node.type;
  727. if (nodeType === "SwitchCase") {
  728. if (typeof opts === "undefined") {
  729. return true;
  730. } else {
  731. return shallowEqual(node, opts);
  732. }
  733. }
  734. return false;
  735. }
  736. function isSwitchStatement(node, opts) {
  737. if (!node) return false;
  738. var nodeType = node.type;
  739. if (nodeType === "SwitchStatement") {
  740. if (typeof opts === "undefined") {
  741. return true;
  742. } else {
  743. return shallowEqual(node, opts);
  744. }
  745. }
  746. return false;
  747. }
  748. function isThisExpression(node, opts) {
  749. if (!node) return false;
  750. var nodeType = node.type;
  751. if (nodeType === "ThisExpression") {
  752. if (typeof opts === "undefined") {
  753. return true;
  754. } else {
  755. return shallowEqual(node, opts);
  756. }
  757. }
  758. return false;
  759. }
  760. function isThrowStatement(node, opts) {
  761. if (!node) return false;
  762. var nodeType = node.type;
  763. if (nodeType === "ThrowStatement") {
  764. if (typeof opts === "undefined") {
  765. return true;
  766. } else {
  767. return shallowEqual(node, opts);
  768. }
  769. }
  770. return false;
  771. }
  772. function isTryStatement(node, opts) {
  773. if (!node) return false;
  774. var nodeType = node.type;
  775. if (nodeType === "TryStatement") {
  776. if (typeof opts === "undefined") {
  777. return true;
  778. } else {
  779. return shallowEqual(node, opts);
  780. }
  781. }
  782. return false;
  783. }
  784. function isUnaryExpression(node, opts) {
  785. if (!node) return false;
  786. var nodeType = node.type;
  787. if (nodeType === "UnaryExpression") {
  788. if (typeof opts === "undefined") {
  789. return true;
  790. } else {
  791. return shallowEqual(node, opts);
  792. }
  793. }
  794. return false;
  795. }
  796. function isUpdateExpression(node, opts) {
  797. if (!node) return false;
  798. var nodeType = node.type;
  799. if (nodeType === "UpdateExpression") {
  800. if (typeof opts === "undefined") {
  801. return true;
  802. } else {
  803. return shallowEqual(node, opts);
  804. }
  805. }
  806. return false;
  807. }
  808. function isVariableDeclaration(node, opts) {
  809. if (!node) return false;
  810. var nodeType = node.type;
  811. if (nodeType === "VariableDeclaration") {
  812. if (typeof opts === "undefined") {
  813. return true;
  814. } else {
  815. return shallowEqual(node, opts);
  816. }
  817. }
  818. return false;
  819. }
  820. function isVariableDeclarator(node, opts) {
  821. if (!node) return false;
  822. var nodeType = node.type;
  823. if (nodeType === "VariableDeclarator") {
  824. if (typeof opts === "undefined") {
  825. return true;
  826. } else {
  827. return shallowEqual(node, opts);
  828. }
  829. }
  830. return false;
  831. }
  832. function isWhileStatement(node, opts) {
  833. if (!node) return false;
  834. var nodeType = node.type;
  835. if (nodeType === "WhileStatement") {
  836. if (typeof opts === "undefined") {
  837. return true;
  838. } else {
  839. return shallowEqual(node, opts);
  840. }
  841. }
  842. return false;
  843. }
  844. function isWithStatement(node, opts) {
  845. if (!node) return false;
  846. var nodeType = node.type;
  847. if (nodeType === "WithStatement") {
  848. if (typeof opts === "undefined") {
  849. return true;
  850. } else {
  851. return shallowEqual(node, opts);
  852. }
  853. }
  854. return false;
  855. }
  856. function isAssignmentPattern(node, opts) {
  857. if (!node) return false;
  858. var nodeType = node.type;
  859. if (nodeType === "AssignmentPattern") {
  860. if (typeof opts === "undefined") {
  861. return true;
  862. } else {
  863. return shallowEqual(node, opts);
  864. }
  865. }
  866. return false;
  867. }
  868. function isArrayPattern(node, opts) {
  869. if (!node) return false;
  870. var nodeType = node.type;
  871. if (nodeType === "ArrayPattern") {
  872. if (typeof opts === "undefined") {
  873. return true;
  874. } else {
  875. return shallowEqual(node, opts);
  876. }
  877. }
  878. return false;
  879. }
  880. function isArrowFunctionExpression(node, opts) {
  881. if (!node) return false;
  882. var nodeType = node.type;
  883. if (nodeType === "ArrowFunctionExpression") {
  884. if (typeof opts === "undefined") {
  885. return true;
  886. } else {
  887. return shallowEqual(node, opts);
  888. }
  889. }
  890. return false;
  891. }
  892. function isClassBody(node, opts) {
  893. if (!node) return false;
  894. var nodeType = node.type;
  895. if (nodeType === "ClassBody") {
  896. if (typeof opts === "undefined") {
  897. return true;
  898. } else {
  899. return shallowEqual(node, opts);
  900. }
  901. }
  902. return false;
  903. }
  904. function isClassExpression(node, opts) {
  905. if (!node) return false;
  906. var nodeType = node.type;
  907. if (nodeType === "ClassExpression") {
  908. if (typeof opts === "undefined") {
  909. return true;
  910. } else {
  911. return shallowEqual(node, opts);
  912. }
  913. }
  914. return false;
  915. }
  916. function isClassDeclaration(node, opts) {
  917. if (!node) return false;
  918. var nodeType = node.type;
  919. if (nodeType === "ClassDeclaration") {
  920. if (typeof opts === "undefined") {
  921. return true;
  922. } else {
  923. return shallowEqual(node, opts);
  924. }
  925. }
  926. return false;
  927. }
  928. function isExportAllDeclaration(node, opts) {
  929. if (!node) return false;
  930. var nodeType = node.type;
  931. if (nodeType === "ExportAllDeclaration") {
  932. if (typeof opts === "undefined") {
  933. return true;
  934. } else {
  935. return shallowEqual(node, opts);
  936. }
  937. }
  938. return false;
  939. }
  940. function isExportDefaultDeclaration(node, opts) {
  941. if (!node) return false;
  942. var nodeType = node.type;
  943. if (nodeType === "ExportDefaultDeclaration") {
  944. if (typeof opts === "undefined") {
  945. return true;
  946. } else {
  947. return shallowEqual(node, opts);
  948. }
  949. }
  950. return false;
  951. }
  952. function isExportNamedDeclaration(node, opts) {
  953. if (!node) return false;
  954. var nodeType = node.type;
  955. if (nodeType === "ExportNamedDeclaration") {
  956. if (typeof opts === "undefined") {
  957. return true;
  958. } else {
  959. return shallowEqual(node, opts);
  960. }
  961. }
  962. return false;
  963. }
  964. function isExportSpecifier(node, opts) {
  965. if (!node) return false;
  966. var nodeType = node.type;
  967. if (nodeType === "ExportSpecifier") {
  968. if (typeof opts === "undefined") {
  969. return true;
  970. } else {
  971. return shallowEqual(node, opts);
  972. }
  973. }
  974. return false;
  975. }
  976. function isForOfStatement(node, opts) {
  977. if (!node) return false;
  978. var nodeType = node.type;
  979. if (nodeType === "ForOfStatement") {
  980. if (typeof opts === "undefined") {
  981. return true;
  982. } else {
  983. return shallowEqual(node, opts);
  984. }
  985. }
  986. return false;
  987. }
  988. function isImportDeclaration(node, opts) {
  989. if (!node) return false;
  990. var nodeType = node.type;
  991. if (nodeType === "ImportDeclaration") {
  992. if (typeof opts === "undefined") {
  993. return true;
  994. } else {
  995. return shallowEqual(node, opts);
  996. }
  997. }
  998. return false;
  999. }
  1000. function isImportDefaultSpecifier(node, opts) {
  1001. if (!node) return false;
  1002. var nodeType = node.type;
  1003. if (nodeType === "ImportDefaultSpecifier") {
  1004. if (typeof opts === "undefined") {
  1005. return true;
  1006. } else {
  1007. return shallowEqual(node, opts);
  1008. }
  1009. }
  1010. return false;
  1011. }
  1012. function isImportNamespaceSpecifier(node, opts) {
  1013. if (!node) return false;
  1014. var nodeType = node.type;
  1015. if (nodeType === "ImportNamespaceSpecifier") {
  1016. if (typeof opts === "undefined") {
  1017. return true;
  1018. } else {
  1019. return shallowEqual(node, opts);
  1020. }
  1021. }
  1022. return false;
  1023. }
  1024. function isImportSpecifier(node, opts) {
  1025. if (!node) return false;
  1026. var nodeType = node.type;
  1027. if (nodeType === "ImportSpecifier") {
  1028. if (typeof opts === "undefined") {
  1029. return true;
  1030. } else {
  1031. return shallowEqual(node, opts);
  1032. }
  1033. }
  1034. return false;
  1035. }
  1036. function isMetaProperty(node, opts) {
  1037. if (!node) return false;
  1038. var nodeType = node.type;
  1039. if (nodeType === "MetaProperty") {
  1040. if (typeof opts === "undefined") {
  1041. return true;
  1042. } else {
  1043. return shallowEqual(node, opts);
  1044. }
  1045. }
  1046. return false;
  1047. }
  1048. function isClassMethod(node, opts) {
  1049. if (!node) return false;
  1050. var nodeType = node.type;
  1051. if (nodeType === "ClassMethod") {
  1052. if (typeof opts === "undefined") {
  1053. return true;
  1054. } else {
  1055. return shallowEqual(node, opts);
  1056. }
  1057. }
  1058. return false;
  1059. }
  1060. function isObjectPattern(node, opts) {
  1061. if (!node) return false;
  1062. var nodeType = node.type;
  1063. if (nodeType === "ObjectPattern") {
  1064. if (typeof opts === "undefined") {
  1065. return true;
  1066. } else {
  1067. return shallowEqual(node, opts);
  1068. }
  1069. }
  1070. return false;
  1071. }
  1072. function isSpreadElement(node, opts) {
  1073. if (!node) return false;
  1074. var nodeType = node.type;
  1075. if (nodeType === "SpreadElement") {
  1076. if (typeof opts === "undefined") {
  1077. return true;
  1078. } else {
  1079. return shallowEqual(node, opts);
  1080. }
  1081. }
  1082. return false;
  1083. }
  1084. function isSuper(node, opts) {
  1085. if (!node) return false;
  1086. var nodeType = node.type;
  1087. if (nodeType === "Super") {
  1088. if (typeof opts === "undefined") {
  1089. return true;
  1090. } else {
  1091. return shallowEqual(node, opts);
  1092. }
  1093. }
  1094. return false;
  1095. }
  1096. function isTaggedTemplateExpression(node, opts) {
  1097. if (!node) return false;
  1098. var nodeType = node.type;
  1099. if (nodeType === "TaggedTemplateExpression") {
  1100. if (typeof opts === "undefined") {
  1101. return true;
  1102. } else {
  1103. return shallowEqual(node, opts);
  1104. }
  1105. }
  1106. return false;
  1107. }
  1108. function isTemplateElement(node, opts) {
  1109. if (!node) return false;
  1110. var nodeType = node.type;
  1111. if (nodeType === "TemplateElement") {
  1112. if (typeof opts === "undefined") {
  1113. return true;
  1114. } else {
  1115. return shallowEqual(node, opts);
  1116. }
  1117. }
  1118. return false;
  1119. }
  1120. function isTemplateLiteral(node, opts) {
  1121. if (!node) return false;
  1122. var nodeType = node.type;
  1123. if (nodeType === "TemplateLiteral") {
  1124. if (typeof opts === "undefined") {
  1125. return true;
  1126. } else {
  1127. return shallowEqual(node, opts);
  1128. }
  1129. }
  1130. return false;
  1131. }
  1132. function isYieldExpression(node, opts) {
  1133. if (!node) return false;
  1134. var nodeType = node.type;
  1135. if (nodeType === "YieldExpression") {
  1136. if (typeof opts === "undefined") {
  1137. return true;
  1138. } else {
  1139. return shallowEqual(node, opts);
  1140. }
  1141. }
  1142. return false;
  1143. }
  1144. function isAwaitExpression(node, opts) {
  1145. if (!node) return false;
  1146. var nodeType = node.type;
  1147. if (nodeType === "AwaitExpression") {
  1148. if (typeof opts === "undefined") {
  1149. return true;
  1150. } else {
  1151. return shallowEqual(node, opts);
  1152. }
  1153. }
  1154. return false;
  1155. }
  1156. function isImport(node, opts) {
  1157. if (!node) return false;
  1158. var nodeType = node.type;
  1159. if (nodeType === "Import") {
  1160. if (typeof opts === "undefined") {
  1161. return true;
  1162. } else {
  1163. return shallowEqual(node, opts);
  1164. }
  1165. }
  1166. return false;
  1167. }
  1168. function isBigIntLiteral(node, opts) {
  1169. if (!node) return false;
  1170. var nodeType = node.type;
  1171. if (nodeType === "BigIntLiteral") {
  1172. if (typeof opts === "undefined") {
  1173. return true;
  1174. } else {
  1175. return shallowEqual(node, opts);
  1176. }
  1177. }
  1178. return false;
  1179. }
  1180. function isExportNamespaceSpecifier(node, opts) {
  1181. if (!node) return false;
  1182. var nodeType = node.type;
  1183. if (nodeType === "ExportNamespaceSpecifier") {
  1184. if (typeof opts === "undefined") {
  1185. return true;
  1186. } else {
  1187. return shallowEqual(node, opts);
  1188. }
  1189. }
  1190. return false;
  1191. }
  1192. function isOptionalMemberExpression(node, opts) {
  1193. if (!node) return false;
  1194. var nodeType = node.type;
  1195. if (nodeType === "OptionalMemberExpression") {
  1196. if (typeof opts === "undefined") {
  1197. return true;
  1198. } else {
  1199. return shallowEqual(node, opts);
  1200. }
  1201. }
  1202. return false;
  1203. }
  1204. function isOptionalCallExpression(node, opts) {
  1205. if (!node) return false;
  1206. var nodeType = node.type;
  1207. if (nodeType === "OptionalCallExpression") {
  1208. if (typeof opts === "undefined") {
  1209. return true;
  1210. } else {
  1211. return shallowEqual(node, opts);
  1212. }
  1213. }
  1214. return false;
  1215. }
  1216. function isAnyTypeAnnotation(node, opts) {
  1217. if (!node) return false;
  1218. var nodeType = node.type;
  1219. if (nodeType === "AnyTypeAnnotation") {
  1220. if (typeof opts === "undefined") {
  1221. return true;
  1222. } else {
  1223. return shallowEqual(node, opts);
  1224. }
  1225. }
  1226. return false;
  1227. }
  1228. function isArrayTypeAnnotation(node, opts) {
  1229. if (!node) return false;
  1230. var nodeType = node.type;
  1231. if (nodeType === "ArrayTypeAnnotation") {
  1232. if (typeof opts === "undefined") {
  1233. return true;
  1234. } else {
  1235. return shallowEqual(node, opts);
  1236. }
  1237. }
  1238. return false;
  1239. }
  1240. function isBooleanTypeAnnotation(node, opts) {
  1241. if (!node) return false;
  1242. var nodeType = node.type;
  1243. if (nodeType === "BooleanTypeAnnotation") {
  1244. if (typeof opts === "undefined") {
  1245. return true;
  1246. } else {
  1247. return shallowEqual(node, opts);
  1248. }
  1249. }
  1250. return false;
  1251. }
  1252. function isBooleanLiteralTypeAnnotation(node, opts) {
  1253. if (!node) return false;
  1254. var nodeType = node.type;
  1255. if (nodeType === "BooleanLiteralTypeAnnotation") {
  1256. if (typeof opts === "undefined") {
  1257. return true;
  1258. } else {
  1259. return shallowEqual(node, opts);
  1260. }
  1261. }
  1262. return false;
  1263. }
  1264. function isNullLiteralTypeAnnotation(node, opts) {
  1265. if (!node) return false;
  1266. var nodeType = node.type;
  1267. if (nodeType === "NullLiteralTypeAnnotation") {
  1268. if (typeof opts === "undefined") {
  1269. return true;
  1270. } else {
  1271. return shallowEqual(node, opts);
  1272. }
  1273. }
  1274. return false;
  1275. }
  1276. function isClassImplements(node, opts) {
  1277. if (!node) return false;
  1278. var nodeType = node.type;
  1279. if (nodeType === "ClassImplements") {
  1280. if (typeof opts === "undefined") {
  1281. return true;
  1282. } else {
  1283. return shallowEqual(node, opts);
  1284. }
  1285. }
  1286. return false;
  1287. }
  1288. function isDeclareClass(node, opts) {
  1289. if (!node) return false;
  1290. var nodeType = node.type;
  1291. if (nodeType === "DeclareClass") {
  1292. if (typeof opts === "undefined") {
  1293. return true;
  1294. } else {
  1295. return shallowEqual(node, opts);
  1296. }
  1297. }
  1298. return false;
  1299. }
  1300. function isDeclareFunction(node, opts) {
  1301. if (!node) return false;
  1302. var nodeType = node.type;
  1303. if (nodeType === "DeclareFunction") {
  1304. if (typeof opts === "undefined") {
  1305. return true;
  1306. } else {
  1307. return shallowEqual(node, opts);
  1308. }
  1309. }
  1310. return false;
  1311. }
  1312. function isDeclareInterface(node, opts) {
  1313. if (!node) return false;
  1314. var nodeType = node.type;
  1315. if (nodeType === "DeclareInterface") {
  1316. if (typeof opts === "undefined") {
  1317. return true;
  1318. } else {
  1319. return shallowEqual(node, opts);
  1320. }
  1321. }
  1322. return false;
  1323. }
  1324. function isDeclareModule(node, opts) {
  1325. if (!node) return false;
  1326. var nodeType = node.type;
  1327. if (nodeType === "DeclareModule") {
  1328. if (typeof opts === "undefined") {
  1329. return true;
  1330. } else {
  1331. return shallowEqual(node, opts);
  1332. }
  1333. }
  1334. return false;
  1335. }
  1336. function isDeclareModuleExports(node, opts) {
  1337. if (!node) return false;
  1338. var nodeType = node.type;
  1339. if (nodeType === "DeclareModuleExports") {
  1340. if (typeof opts === "undefined") {
  1341. return true;
  1342. } else {
  1343. return shallowEqual(node, opts);
  1344. }
  1345. }
  1346. return false;
  1347. }
  1348. function isDeclareTypeAlias(node, opts) {
  1349. if (!node) return false;
  1350. var nodeType = node.type;
  1351. if (nodeType === "DeclareTypeAlias") {
  1352. if (typeof opts === "undefined") {
  1353. return true;
  1354. } else {
  1355. return shallowEqual(node, opts);
  1356. }
  1357. }
  1358. return false;
  1359. }
  1360. function isDeclareOpaqueType(node, opts) {
  1361. if (!node) return false;
  1362. var nodeType = node.type;
  1363. if (nodeType === "DeclareOpaqueType") {
  1364. if (typeof opts === "undefined") {
  1365. return true;
  1366. } else {
  1367. return shallowEqual(node, opts);
  1368. }
  1369. }
  1370. return false;
  1371. }
  1372. function isDeclareVariable(node, opts) {
  1373. if (!node) return false;
  1374. var nodeType = node.type;
  1375. if (nodeType === "DeclareVariable") {
  1376. if (typeof opts === "undefined") {
  1377. return true;
  1378. } else {
  1379. return shallowEqual(node, opts);
  1380. }
  1381. }
  1382. return false;
  1383. }
  1384. function isDeclareExportDeclaration(node, opts) {
  1385. if (!node) return false;
  1386. var nodeType = node.type;
  1387. if (nodeType === "DeclareExportDeclaration") {
  1388. if (typeof opts === "undefined") {
  1389. return true;
  1390. } else {
  1391. return shallowEqual(node, opts);
  1392. }
  1393. }
  1394. return false;
  1395. }
  1396. function isDeclareExportAllDeclaration(node, opts) {
  1397. if (!node) return false;
  1398. var nodeType = node.type;
  1399. if (nodeType === "DeclareExportAllDeclaration") {
  1400. if (typeof opts === "undefined") {
  1401. return true;
  1402. } else {
  1403. return shallowEqual(node, opts);
  1404. }
  1405. }
  1406. return false;
  1407. }
  1408. function isDeclaredPredicate(node, opts) {
  1409. if (!node) return false;
  1410. var nodeType = node.type;
  1411. if (nodeType === "DeclaredPredicate") {
  1412. if (typeof opts === "undefined") {
  1413. return true;
  1414. } else {
  1415. return shallowEqual(node, opts);
  1416. }
  1417. }
  1418. return false;
  1419. }
  1420. function isExistsTypeAnnotation(node, opts) {
  1421. if (!node) return false;
  1422. var nodeType = node.type;
  1423. if (nodeType === "ExistsTypeAnnotation") {
  1424. if (typeof opts === "undefined") {
  1425. return true;
  1426. } else {
  1427. return shallowEqual(node, opts);
  1428. }
  1429. }
  1430. return false;
  1431. }
  1432. function isFunctionTypeAnnotation(node, opts) {
  1433. if (!node) return false;
  1434. var nodeType = node.type;
  1435. if (nodeType === "FunctionTypeAnnotation") {
  1436. if (typeof opts === "undefined") {
  1437. return true;
  1438. } else {
  1439. return shallowEqual(node, opts);
  1440. }
  1441. }
  1442. return false;
  1443. }
  1444. function isFunctionTypeParam(node, opts) {
  1445. if (!node) return false;
  1446. var nodeType = node.type;
  1447. if (nodeType === "FunctionTypeParam") {
  1448. if (typeof opts === "undefined") {
  1449. return true;
  1450. } else {
  1451. return shallowEqual(node, opts);
  1452. }
  1453. }
  1454. return false;
  1455. }
  1456. function isGenericTypeAnnotation(node, opts) {
  1457. if (!node) return false;
  1458. var nodeType = node.type;
  1459. if (nodeType === "GenericTypeAnnotation") {
  1460. if (typeof opts === "undefined") {
  1461. return true;
  1462. } else {
  1463. return shallowEqual(node, opts);
  1464. }
  1465. }
  1466. return false;
  1467. }
  1468. function isInferredPredicate(node, opts) {
  1469. if (!node) return false;
  1470. var nodeType = node.type;
  1471. if (nodeType === "InferredPredicate") {
  1472. if (typeof opts === "undefined") {
  1473. return true;
  1474. } else {
  1475. return shallowEqual(node, opts);
  1476. }
  1477. }
  1478. return false;
  1479. }
  1480. function isInterfaceExtends(node, opts) {
  1481. if (!node) return false;
  1482. var nodeType = node.type;
  1483. if (nodeType === "InterfaceExtends") {
  1484. if (typeof opts === "undefined") {
  1485. return true;
  1486. } else {
  1487. return shallowEqual(node, opts);
  1488. }
  1489. }
  1490. return false;
  1491. }
  1492. function isInterfaceDeclaration(node, opts) {
  1493. if (!node) return false;
  1494. var nodeType = node.type;
  1495. if (nodeType === "InterfaceDeclaration") {
  1496. if (typeof opts === "undefined") {
  1497. return true;
  1498. } else {
  1499. return shallowEqual(node, opts);
  1500. }
  1501. }
  1502. return false;
  1503. }
  1504. function isInterfaceTypeAnnotation(node, opts) {
  1505. if (!node) return false;
  1506. var nodeType = node.type;
  1507. if (nodeType === "InterfaceTypeAnnotation") {
  1508. if (typeof opts === "undefined") {
  1509. return true;
  1510. } else {
  1511. return shallowEqual(node, opts);
  1512. }
  1513. }
  1514. return false;
  1515. }
  1516. function isIntersectionTypeAnnotation(node, opts) {
  1517. if (!node) return false;
  1518. var nodeType = node.type;
  1519. if (nodeType === "IntersectionTypeAnnotation") {
  1520. if (typeof opts === "undefined") {
  1521. return true;
  1522. } else {
  1523. return shallowEqual(node, opts);
  1524. }
  1525. }
  1526. return false;
  1527. }
  1528. function isMixedTypeAnnotation(node, opts) {
  1529. if (!node) return false;
  1530. var nodeType = node.type;
  1531. if (nodeType === "MixedTypeAnnotation") {
  1532. if (typeof opts === "undefined") {
  1533. return true;
  1534. } else {
  1535. return shallowEqual(node, opts);
  1536. }
  1537. }
  1538. return false;
  1539. }
  1540. function isEmptyTypeAnnotation(node, opts) {
  1541. if (!node) return false;
  1542. var nodeType = node.type;
  1543. if (nodeType === "EmptyTypeAnnotation") {
  1544. if (typeof opts === "undefined") {
  1545. return true;
  1546. } else {
  1547. return shallowEqual(node, opts);
  1548. }
  1549. }
  1550. return false;
  1551. }
  1552. function isNullableTypeAnnotation(node, opts) {
  1553. if (!node) return false;
  1554. var nodeType = node.type;
  1555. if (nodeType === "NullableTypeAnnotation") {
  1556. if (typeof opts === "undefined") {
  1557. return true;
  1558. } else {
  1559. return shallowEqual(node, opts);
  1560. }
  1561. }
  1562. return false;
  1563. }
  1564. function isNumberLiteralTypeAnnotation(node, opts) {
  1565. if (!node) return false;
  1566. var nodeType = node.type;
  1567. if (nodeType === "NumberLiteralTypeAnnotation") {
  1568. if (typeof opts === "undefined") {
  1569. return true;
  1570. } else {
  1571. return shallowEqual(node, opts);
  1572. }
  1573. }
  1574. return false;
  1575. }
  1576. function isNumberTypeAnnotation(node, opts) {
  1577. if (!node) return false;
  1578. var nodeType = node.type;
  1579. if (nodeType === "NumberTypeAnnotation") {
  1580. if (typeof opts === "undefined") {
  1581. return true;
  1582. } else {
  1583. return shallowEqual(node, opts);
  1584. }
  1585. }
  1586. return false;
  1587. }
  1588. function isObjectTypeAnnotation(node, opts) {
  1589. if (!node) return false;
  1590. var nodeType = node.type;
  1591. if (nodeType === "ObjectTypeAnnotation") {
  1592. if (typeof opts === "undefined") {
  1593. return true;
  1594. } else {
  1595. return shallowEqual(node, opts);
  1596. }
  1597. }
  1598. return false;
  1599. }
  1600. function isObjectTypeInternalSlot(node, opts) {
  1601. if (!node) return false;
  1602. var nodeType = node.type;
  1603. if (nodeType === "ObjectTypeInternalSlot") {
  1604. if (typeof opts === "undefined") {
  1605. return true;
  1606. } else {
  1607. return shallowEqual(node, opts);
  1608. }
  1609. }
  1610. return false;
  1611. }
  1612. function isObjectTypeCallProperty(node, opts) {
  1613. if (!node) return false;
  1614. var nodeType = node.type;
  1615. if (nodeType === "ObjectTypeCallProperty") {
  1616. if (typeof opts === "undefined") {
  1617. return true;
  1618. } else {
  1619. return shallowEqual(node, opts);
  1620. }
  1621. }
  1622. return false;
  1623. }
  1624. function isObjectTypeIndexer(node, opts) {
  1625. if (!node) return false;
  1626. var nodeType = node.type;
  1627. if (nodeType === "ObjectTypeIndexer") {
  1628. if (typeof opts === "undefined") {
  1629. return true;
  1630. } else {
  1631. return shallowEqual(node, opts);
  1632. }
  1633. }
  1634. return false;
  1635. }
  1636. function isObjectTypeProperty(node, opts) {
  1637. if (!node) return false;
  1638. var nodeType = node.type;
  1639. if (nodeType === "ObjectTypeProperty") {
  1640. if (typeof opts === "undefined") {
  1641. return true;
  1642. } else {
  1643. return shallowEqual(node, opts);
  1644. }
  1645. }
  1646. return false;
  1647. }
  1648. function isObjectTypeSpreadProperty(node, opts) {
  1649. if (!node) return false;
  1650. var nodeType = node.type;
  1651. if (nodeType === "ObjectTypeSpreadProperty") {
  1652. if (typeof opts === "undefined") {
  1653. return true;
  1654. } else {
  1655. return shallowEqual(node, opts);
  1656. }
  1657. }
  1658. return false;
  1659. }
  1660. function isOpaqueType(node, opts) {
  1661. if (!node) return false;
  1662. var nodeType = node.type;
  1663. if (nodeType === "OpaqueType") {
  1664. if (typeof opts === "undefined") {
  1665. return true;
  1666. } else {
  1667. return shallowEqual(node, opts);
  1668. }
  1669. }
  1670. return false;
  1671. }
  1672. function isQualifiedTypeIdentifier(node, opts) {
  1673. if (!node) return false;
  1674. var nodeType = node.type;
  1675. if (nodeType === "QualifiedTypeIdentifier") {
  1676. if (typeof opts === "undefined") {
  1677. return true;
  1678. } else {
  1679. return shallowEqual(node, opts);
  1680. }
  1681. }
  1682. return false;
  1683. }
  1684. function isStringLiteralTypeAnnotation(node, opts) {
  1685. if (!node) return false;
  1686. var nodeType = node.type;
  1687. if (nodeType === "StringLiteralTypeAnnotation") {
  1688. if (typeof opts === "undefined") {
  1689. return true;
  1690. } else {
  1691. return shallowEqual(node, opts);
  1692. }
  1693. }
  1694. return false;
  1695. }
  1696. function isStringTypeAnnotation(node, opts) {
  1697. if (!node) return false;
  1698. var nodeType = node.type;
  1699. if (nodeType === "StringTypeAnnotation") {
  1700. if (typeof opts === "undefined") {
  1701. return true;
  1702. } else {
  1703. return shallowEqual(node, opts);
  1704. }
  1705. }
  1706. return false;
  1707. }
  1708. function isSymbolTypeAnnotation(node, opts) {
  1709. if (!node) return false;
  1710. var nodeType = node.type;
  1711. if (nodeType === "SymbolTypeAnnotation") {
  1712. if (typeof opts === "undefined") {
  1713. return true;
  1714. } else {
  1715. return shallowEqual(node, opts);
  1716. }
  1717. }
  1718. return false;
  1719. }
  1720. function isThisTypeAnnotation(node, opts) {
  1721. if (!node) return false;
  1722. var nodeType = node.type;
  1723. if (nodeType === "ThisTypeAnnotation") {
  1724. if (typeof opts === "undefined") {
  1725. return true;
  1726. } else {
  1727. return shallowEqual(node, opts);
  1728. }
  1729. }
  1730. return false;
  1731. }
  1732. function isTupleTypeAnnotation(node, opts) {
  1733. if (!node) return false;
  1734. var nodeType = node.type;
  1735. if (nodeType === "TupleTypeAnnotation") {
  1736. if (typeof opts === "undefined") {
  1737. return true;
  1738. } else {
  1739. return shallowEqual(node, opts);
  1740. }
  1741. }
  1742. return false;
  1743. }
  1744. function isTypeofTypeAnnotation(node, opts) {
  1745. if (!node) return false;
  1746. var nodeType = node.type;
  1747. if (nodeType === "TypeofTypeAnnotation") {
  1748. if (typeof opts === "undefined") {
  1749. return true;
  1750. } else {
  1751. return shallowEqual(node, opts);
  1752. }
  1753. }
  1754. return false;
  1755. }
  1756. function isTypeAlias(node, opts) {
  1757. if (!node) return false;
  1758. var nodeType = node.type;
  1759. if (nodeType === "TypeAlias") {
  1760. if (typeof opts === "undefined") {
  1761. return true;
  1762. } else {
  1763. return shallowEqual(node, opts);
  1764. }
  1765. }
  1766. return false;
  1767. }
  1768. function isTypeAnnotation(node, opts) {
  1769. if (!node) return false;
  1770. var nodeType = node.type;
  1771. if (nodeType === "TypeAnnotation") {
  1772. if (typeof opts === "undefined") {
  1773. return true;
  1774. } else {
  1775. return shallowEqual(node, opts);
  1776. }
  1777. }
  1778. return false;
  1779. }
  1780. function isTypeCastExpression(node, opts) {
  1781. if (!node) return false;
  1782. var nodeType = node.type;
  1783. if (nodeType === "TypeCastExpression") {
  1784. if (typeof opts === "undefined") {
  1785. return true;
  1786. } else {
  1787. return shallowEqual(node, opts);
  1788. }
  1789. }
  1790. return false;
  1791. }
  1792. function isTypeParameter(node, opts) {
  1793. if (!node) return false;
  1794. var nodeType = node.type;
  1795. if (nodeType === "TypeParameter") {
  1796. if (typeof opts === "undefined") {
  1797. return true;
  1798. } else {
  1799. return shallowEqual(node, opts);
  1800. }
  1801. }
  1802. return false;
  1803. }
  1804. function isTypeParameterDeclaration(node, opts) {
  1805. if (!node) return false;
  1806. var nodeType = node.type;
  1807. if (nodeType === "TypeParameterDeclaration") {
  1808. if (typeof opts === "undefined") {
  1809. return true;
  1810. } else {
  1811. return shallowEqual(node, opts);
  1812. }
  1813. }
  1814. return false;
  1815. }
  1816. function isTypeParameterInstantiation(node, opts) {
  1817. if (!node) return false;
  1818. var nodeType = node.type;
  1819. if (nodeType === "TypeParameterInstantiation") {
  1820. if (typeof opts === "undefined") {
  1821. return true;
  1822. } else {
  1823. return shallowEqual(node, opts);
  1824. }
  1825. }
  1826. return false;
  1827. }
  1828. function isUnionTypeAnnotation(node, opts) {
  1829. if (!node) return false;
  1830. var nodeType = node.type;
  1831. if (nodeType === "UnionTypeAnnotation") {
  1832. if (typeof opts === "undefined") {
  1833. return true;
  1834. } else {
  1835. return shallowEqual(node, opts);
  1836. }
  1837. }
  1838. return false;
  1839. }
  1840. function isVariance(node, opts) {
  1841. if (!node) return false;
  1842. var nodeType = node.type;
  1843. if (nodeType === "Variance") {
  1844. if (typeof opts === "undefined") {
  1845. return true;
  1846. } else {
  1847. return shallowEqual(node, opts);
  1848. }
  1849. }
  1850. return false;
  1851. }
  1852. function isVoidTypeAnnotation(node, opts) {
  1853. if (!node) return false;
  1854. var nodeType = node.type;
  1855. if (nodeType === "VoidTypeAnnotation") {
  1856. if (typeof opts === "undefined") {
  1857. return true;
  1858. } else {
  1859. return shallowEqual(node, opts);
  1860. }
  1861. }
  1862. return false;
  1863. }
  1864. function isEnumDeclaration(node, opts) {
  1865. if (!node) return false;
  1866. var nodeType = node.type;
  1867. if (nodeType === "EnumDeclaration") {
  1868. if (typeof opts === "undefined") {
  1869. return true;
  1870. } else {
  1871. return shallowEqual(node, opts);
  1872. }
  1873. }
  1874. return false;
  1875. }
  1876. function isEnumBooleanBody(node, opts) {
  1877. if (!node) return false;
  1878. var nodeType = node.type;
  1879. if (nodeType === "EnumBooleanBody") {
  1880. if (typeof opts === "undefined") {
  1881. return true;
  1882. } else {
  1883. return shallowEqual(node, opts);
  1884. }
  1885. }
  1886. return false;
  1887. }
  1888. function isEnumNumberBody(node, opts) {
  1889. if (!node) return false;
  1890. var nodeType = node.type;
  1891. if (nodeType === "EnumNumberBody") {
  1892. if (typeof opts === "undefined") {
  1893. return true;
  1894. } else {
  1895. return shallowEqual(node, opts);
  1896. }
  1897. }
  1898. return false;
  1899. }
  1900. function isEnumStringBody(node, opts) {
  1901. if (!node) return false;
  1902. var nodeType = node.type;
  1903. if (nodeType === "EnumStringBody") {
  1904. if (typeof opts === "undefined") {
  1905. return true;
  1906. } else {
  1907. return shallowEqual(node, opts);
  1908. }
  1909. }
  1910. return false;
  1911. }
  1912. function isEnumSymbolBody(node, opts) {
  1913. if (!node) return false;
  1914. var nodeType = node.type;
  1915. if (nodeType === "EnumSymbolBody") {
  1916. if (typeof opts === "undefined") {
  1917. return true;
  1918. } else {
  1919. return shallowEqual(node, opts);
  1920. }
  1921. }
  1922. return false;
  1923. }
  1924. function isEnumBooleanMember(node, opts) {
  1925. if (!node) return false;
  1926. var nodeType = node.type;
  1927. if (nodeType === "EnumBooleanMember") {
  1928. if (typeof opts === "undefined") {
  1929. return true;
  1930. } else {
  1931. return shallowEqual(node, opts);
  1932. }
  1933. }
  1934. return false;
  1935. }
  1936. function isEnumNumberMember(node, opts) {
  1937. if (!node) return false;
  1938. var nodeType = node.type;
  1939. if (nodeType === "EnumNumberMember") {
  1940. if (typeof opts === "undefined") {
  1941. return true;
  1942. } else {
  1943. return shallowEqual(node, opts);
  1944. }
  1945. }
  1946. return false;
  1947. }
  1948. function isEnumStringMember(node, opts) {
  1949. if (!node) return false;
  1950. var nodeType = node.type;
  1951. if (nodeType === "EnumStringMember") {
  1952. if (typeof opts === "undefined") {
  1953. return true;
  1954. } else {
  1955. return shallowEqual(node, opts);
  1956. }
  1957. }
  1958. return false;
  1959. }
  1960. function isEnumDefaultedMember(node, opts) {
  1961. if (!node) return false;
  1962. var nodeType = node.type;
  1963. if (nodeType === "EnumDefaultedMember") {
  1964. if (typeof opts === "undefined") {
  1965. return true;
  1966. } else {
  1967. return shallowEqual(node, opts);
  1968. }
  1969. }
  1970. return false;
  1971. }
  1972. function isIndexedAccessType(node, opts) {
  1973. if (!node) return false;
  1974. var nodeType = node.type;
  1975. if (nodeType === "IndexedAccessType") {
  1976. if (typeof opts === "undefined") {
  1977. return true;
  1978. } else {
  1979. return shallowEqual(node, opts);
  1980. }
  1981. }
  1982. return false;
  1983. }
  1984. function isOptionalIndexedAccessType(node, opts) {
  1985. if (!node) return false;
  1986. var nodeType = node.type;
  1987. if (nodeType === "OptionalIndexedAccessType") {
  1988. if (typeof opts === "undefined") {
  1989. return true;
  1990. } else {
  1991. return shallowEqual(node, opts);
  1992. }
  1993. }
  1994. return false;
  1995. }
  1996. function isJSXAttribute(node, opts) {
  1997. if (!node) return false;
  1998. var nodeType = node.type;
  1999. if (nodeType === "JSXAttribute") {
  2000. if (typeof opts === "undefined") {
  2001. return true;
  2002. } else {
  2003. return shallowEqual(node, opts);
  2004. }
  2005. }
  2006. return false;
  2007. }
  2008. function isJSXClosingElement(node, opts) {
  2009. if (!node) return false;
  2010. var nodeType = node.type;
  2011. if (nodeType === "JSXClosingElement") {
  2012. if (typeof opts === "undefined") {
  2013. return true;
  2014. } else {
  2015. return shallowEqual(node, opts);
  2016. }
  2017. }
  2018. return false;
  2019. }
  2020. function isJSXElement(node, opts) {
  2021. if (!node) return false;
  2022. var nodeType = node.type;
  2023. if (nodeType === "JSXElement") {
  2024. if (typeof opts === "undefined") {
  2025. return true;
  2026. } else {
  2027. return shallowEqual(node, opts);
  2028. }
  2029. }
  2030. return false;
  2031. }
  2032. function isJSXEmptyExpression(node, opts) {
  2033. if (!node) return false;
  2034. var nodeType = node.type;
  2035. if (nodeType === "JSXEmptyExpression") {
  2036. if (typeof opts === "undefined") {
  2037. return true;
  2038. } else {
  2039. return shallowEqual(node, opts);
  2040. }
  2041. }
  2042. return false;
  2043. }
  2044. function isJSXExpressionContainer(node, opts) {
  2045. if (!node) return false;
  2046. var nodeType = node.type;
  2047. if (nodeType === "JSXExpressionContainer") {
  2048. if (typeof opts === "undefined") {
  2049. return true;
  2050. } else {
  2051. return shallowEqual(node, opts);
  2052. }
  2053. }
  2054. return false;
  2055. }
  2056. function isJSXSpreadChild(node, opts) {
  2057. if (!node) return false;
  2058. var nodeType = node.type;
  2059. if (nodeType === "JSXSpreadChild") {
  2060. if (typeof opts === "undefined") {
  2061. return true;
  2062. } else {
  2063. return shallowEqual(node, opts);
  2064. }
  2065. }
  2066. return false;
  2067. }
  2068. function isJSXIdentifier(node, opts) {
  2069. if (!node) return false;
  2070. var nodeType = node.type;
  2071. if (nodeType === "JSXIdentifier") {
  2072. if (typeof opts === "undefined") {
  2073. return true;
  2074. } else {
  2075. return shallowEqual(node, opts);
  2076. }
  2077. }
  2078. return false;
  2079. }
  2080. function isJSXMemberExpression(node, opts) {
  2081. if (!node) return false;
  2082. var nodeType = node.type;
  2083. if (nodeType === "JSXMemberExpression") {
  2084. if (typeof opts === "undefined") {
  2085. return true;
  2086. } else {
  2087. return shallowEqual(node, opts);
  2088. }
  2089. }
  2090. return false;
  2091. }
  2092. function isJSXNamespacedName(node, opts) {
  2093. if (!node) return false;
  2094. var nodeType = node.type;
  2095. if (nodeType === "JSXNamespacedName") {
  2096. if (typeof opts === "undefined") {
  2097. return true;
  2098. } else {
  2099. return shallowEqual(node, opts);
  2100. }
  2101. }
  2102. return false;
  2103. }
  2104. function isJSXOpeningElement(node, opts) {
  2105. if (!node) return false;
  2106. var nodeType = node.type;
  2107. if (nodeType === "JSXOpeningElement") {
  2108. if (typeof opts === "undefined") {
  2109. return true;
  2110. } else {
  2111. return shallowEqual(node, opts);
  2112. }
  2113. }
  2114. return false;
  2115. }
  2116. function isJSXSpreadAttribute(node, opts) {
  2117. if (!node) return false;
  2118. var nodeType = node.type;
  2119. if (nodeType === "JSXSpreadAttribute") {
  2120. if (typeof opts === "undefined") {
  2121. return true;
  2122. } else {
  2123. return shallowEqual(node, opts);
  2124. }
  2125. }
  2126. return false;
  2127. }
  2128. function isJSXText(node, opts) {
  2129. if (!node) return false;
  2130. var nodeType = node.type;
  2131. if (nodeType === "JSXText") {
  2132. if (typeof opts === "undefined") {
  2133. return true;
  2134. } else {
  2135. return shallowEqual(node, opts);
  2136. }
  2137. }
  2138. return false;
  2139. }
  2140. function isJSXFragment(node, opts) {
  2141. if (!node) return false;
  2142. var nodeType = node.type;
  2143. if (nodeType === "JSXFragment") {
  2144. if (typeof opts === "undefined") {
  2145. return true;
  2146. } else {
  2147. return shallowEqual(node, opts);
  2148. }
  2149. }
  2150. return false;
  2151. }
  2152. function isJSXOpeningFragment(node, opts) {
  2153. if (!node) return false;
  2154. var nodeType = node.type;
  2155. if (nodeType === "JSXOpeningFragment") {
  2156. if (typeof opts === "undefined") {
  2157. return true;
  2158. } else {
  2159. return shallowEqual(node, opts);
  2160. }
  2161. }
  2162. return false;
  2163. }
  2164. function isJSXClosingFragment(node, opts) {
  2165. if (!node) return false;
  2166. var nodeType = node.type;
  2167. if (nodeType === "JSXClosingFragment") {
  2168. if (typeof opts === "undefined") {
  2169. return true;
  2170. } else {
  2171. return shallowEqual(node, opts);
  2172. }
  2173. }
  2174. return false;
  2175. }
  2176. function isNoop(node, opts) {
  2177. if (!node) return false;
  2178. var nodeType = node.type;
  2179. if (nodeType === "Noop") {
  2180. if (typeof opts === "undefined") {
  2181. return true;
  2182. } else {
  2183. return shallowEqual(node, opts);
  2184. }
  2185. }
  2186. return false;
  2187. }
  2188. function isPlaceholder(node, opts) {
  2189. if (!node) return false;
  2190. var nodeType = node.type;
  2191. if (nodeType === "Placeholder") {
  2192. if (typeof opts === "undefined") {
  2193. return true;
  2194. } else {
  2195. return shallowEqual(node, opts);
  2196. }
  2197. }
  2198. return false;
  2199. }
  2200. function isV8IntrinsicIdentifier(node, opts) {
  2201. if (!node) return false;
  2202. var nodeType = node.type;
  2203. if (nodeType === "V8IntrinsicIdentifier") {
  2204. if (typeof opts === "undefined") {
  2205. return true;
  2206. } else {
  2207. return shallowEqual(node, opts);
  2208. }
  2209. }
  2210. return false;
  2211. }
  2212. function isArgumentPlaceholder(node, opts) {
  2213. if (!node) return false;
  2214. var nodeType = node.type;
  2215. if (nodeType === "ArgumentPlaceholder") {
  2216. if (typeof opts === "undefined") {
  2217. return true;
  2218. } else {
  2219. return shallowEqual(node, opts);
  2220. }
  2221. }
  2222. return false;
  2223. }
  2224. function isBindExpression(node, opts) {
  2225. if (!node) return false;
  2226. var nodeType = node.type;
  2227. if (nodeType === "BindExpression") {
  2228. if (typeof opts === "undefined") {
  2229. return true;
  2230. } else {
  2231. return shallowEqual(node, opts);
  2232. }
  2233. }
  2234. return false;
  2235. }
  2236. function isClassProperty(node, opts) {
  2237. if (!node) return false;
  2238. var nodeType = node.type;
  2239. if (nodeType === "ClassProperty") {
  2240. if (typeof opts === "undefined") {
  2241. return true;
  2242. } else {
  2243. return shallowEqual(node, opts);
  2244. }
  2245. }
  2246. return false;
  2247. }
  2248. function isPipelineTopicExpression(node, opts) {
  2249. if (!node) return false;
  2250. var nodeType = node.type;
  2251. if (nodeType === "PipelineTopicExpression") {
  2252. if (typeof opts === "undefined") {
  2253. return true;
  2254. } else {
  2255. return shallowEqual(node, opts);
  2256. }
  2257. }
  2258. return false;
  2259. }
  2260. function isPipelineBareFunction(node, opts) {
  2261. if (!node) return false;
  2262. var nodeType = node.type;
  2263. if (nodeType === "PipelineBareFunction") {
  2264. if (typeof opts === "undefined") {
  2265. return true;
  2266. } else {
  2267. return shallowEqual(node, opts);
  2268. }
  2269. }
  2270. return false;
  2271. }
  2272. function isPipelinePrimaryTopicReference(node, opts) {
  2273. if (!node) return false;
  2274. var nodeType = node.type;
  2275. if (nodeType === "PipelinePrimaryTopicReference") {
  2276. if (typeof opts === "undefined") {
  2277. return true;
  2278. } else {
  2279. return shallowEqual(node, opts);
  2280. }
  2281. }
  2282. return false;
  2283. }
  2284. function isClassPrivateProperty(node, opts) {
  2285. if (!node) return false;
  2286. var nodeType = node.type;
  2287. if (nodeType === "ClassPrivateProperty") {
  2288. if (typeof opts === "undefined") {
  2289. return true;
  2290. } else {
  2291. return shallowEqual(node, opts);
  2292. }
  2293. }
  2294. return false;
  2295. }
  2296. function isClassPrivateMethod(node, opts) {
  2297. if (!node) return false;
  2298. var nodeType = node.type;
  2299. if (nodeType === "ClassPrivateMethod") {
  2300. if (typeof opts === "undefined") {
  2301. return true;
  2302. } else {
  2303. return shallowEqual(node, opts);
  2304. }
  2305. }
  2306. return false;
  2307. }
  2308. function isImportAttribute(node, opts) {
  2309. if (!node) return false;
  2310. var nodeType = node.type;
  2311. if (nodeType === "ImportAttribute") {
  2312. if (typeof opts === "undefined") {
  2313. return true;
  2314. } else {
  2315. return shallowEqual(node, opts);
  2316. }
  2317. }
  2318. return false;
  2319. }
  2320. function isDecorator(node, opts) {
  2321. if (!node) return false;
  2322. var nodeType = node.type;
  2323. if (nodeType === "Decorator") {
  2324. if (typeof opts === "undefined") {
  2325. return true;
  2326. } else {
  2327. return shallowEqual(node, opts);
  2328. }
  2329. }
  2330. return false;
  2331. }
  2332. function isDoExpression(node, opts) {
  2333. if (!node) return false;
  2334. var nodeType = node.type;
  2335. if (nodeType === "DoExpression") {
  2336. if (typeof opts === "undefined") {
  2337. return true;
  2338. } else {
  2339. return shallowEqual(node, opts);
  2340. }
  2341. }
  2342. return false;
  2343. }
  2344. function isExportDefaultSpecifier(node, opts) {
  2345. if (!node) return false;
  2346. var nodeType = node.type;
  2347. if (nodeType === "ExportDefaultSpecifier") {
  2348. if (typeof opts === "undefined") {
  2349. return true;
  2350. } else {
  2351. return shallowEqual(node, opts);
  2352. }
  2353. }
  2354. return false;
  2355. }
  2356. function isPrivateName(node, opts) {
  2357. if (!node) return false;
  2358. var nodeType = node.type;
  2359. if (nodeType === "PrivateName") {
  2360. if (typeof opts === "undefined") {
  2361. return true;
  2362. } else {
  2363. return shallowEqual(node, opts);
  2364. }
  2365. }
  2366. return false;
  2367. }
  2368. function isRecordExpression(node, opts) {
  2369. if (!node) return false;
  2370. var nodeType = node.type;
  2371. if (nodeType === "RecordExpression") {
  2372. if (typeof opts === "undefined") {
  2373. return true;
  2374. } else {
  2375. return shallowEqual(node, opts);
  2376. }
  2377. }
  2378. return false;
  2379. }
  2380. function isTupleExpression(node, opts) {
  2381. if (!node) return false;
  2382. var nodeType = node.type;
  2383. if (nodeType === "TupleExpression") {
  2384. if (typeof opts === "undefined") {
  2385. return true;
  2386. } else {
  2387. return shallowEqual(node, opts);
  2388. }
  2389. }
  2390. return false;
  2391. }
  2392. function isDecimalLiteral(node, opts) {
  2393. if (!node) return false;
  2394. var nodeType = node.type;
  2395. if (nodeType === "DecimalLiteral") {
  2396. if (typeof opts === "undefined") {
  2397. return true;
  2398. } else {
  2399. return shallowEqual(node, opts);
  2400. }
  2401. }
  2402. return false;
  2403. }
  2404. function isStaticBlock(node, opts) {
  2405. if (!node) return false;
  2406. var nodeType = node.type;
  2407. if (nodeType === "StaticBlock") {
  2408. if (typeof opts === "undefined") {
  2409. return true;
  2410. } else {
  2411. return shallowEqual(node, opts);
  2412. }
  2413. }
  2414. return false;
  2415. }
  2416. function isModuleExpression(node, opts) {
  2417. if (!node) return false;
  2418. var nodeType = node.type;
  2419. if (nodeType === "ModuleExpression") {
  2420. if (typeof opts === "undefined") {
  2421. return true;
  2422. } else {
  2423. return shallowEqual(node, opts);
  2424. }
  2425. }
  2426. return false;
  2427. }
  2428. function isTSParameterProperty(node, opts) {
  2429. if (!node) return false;
  2430. var nodeType = node.type;
  2431. if (nodeType === "TSParameterProperty") {
  2432. if (typeof opts === "undefined") {
  2433. return true;
  2434. } else {
  2435. return shallowEqual(node, opts);
  2436. }
  2437. }
  2438. return false;
  2439. }
  2440. function isTSDeclareFunction(node, opts) {
  2441. if (!node) return false;
  2442. var nodeType = node.type;
  2443. if (nodeType === "TSDeclareFunction") {
  2444. if (typeof opts === "undefined") {
  2445. return true;
  2446. } else {
  2447. return shallowEqual(node, opts);
  2448. }
  2449. }
  2450. return false;
  2451. }
  2452. function isTSDeclareMethod(node, opts) {
  2453. if (!node) return false;
  2454. var nodeType = node.type;
  2455. if (nodeType === "TSDeclareMethod") {
  2456. if (typeof opts === "undefined") {
  2457. return true;
  2458. } else {
  2459. return shallowEqual(node, opts);
  2460. }
  2461. }
  2462. return false;
  2463. }
  2464. function isTSQualifiedName(node, opts) {
  2465. if (!node) return false;
  2466. var nodeType = node.type;
  2467. if (nodeType === "TSQualifiedName") {
  2468. if (typeof opts === "undefined") {
  2469. return true;
  2470. } else {
  2471. return shallowEqual(node, opts);
  2472. }
  2473. }
  2474. return false;
  2475. }
  2476. function isTSCallSignatureDeclaration(node, opts) {
  2477. if (!node) return false;
  2478. var nodeType = node.type;
  2479. if (nodeType === "TSCallSignatureDeclaration") {
  2480. if (typeof opts === "undefined") {
  2481. return true;
  2482. } else {
  2483. return shallowEqual(node, opts);
  2484. }
  2485. }
  2486. return false;
  2487. }
  2488. function isTSConstructSignatureDeclaration(node, opts) {
  2489. if (!node) return false;
  2490. var nodeType = node.type;
  2491. if (nodeType === "TSConstructSignatureDeclaration") {
  2492. if (typeof opts === "undefined") {
  2493. return true;
  2494. } else {
  2495. return shallowEqual(node, opts);
  2496. }
  2497. }
  2498. return false;
  2499. }
  2500. function isTSPropertySignature(node, opts) {
  2501. if (!node) return false;
  2502. var nodeType = node.type;
  2503. if (nodeType === "TSPropertySignature") {
  2504. if (typeof opts === "undefined") {
  2505. return true;
  2506. } else {
  2507. return shallowEqual(node, opts);
  2508. }
  2509. }
  2510. return false;
  2511. }
  2512. function isTSMethodSignature(node, opts) {
  2513. if (!node) return false;
  2514. var nodeType = node.type;
  2515. if (nodeType === "TSMethodSignature") {
  2516. if (typeof opts === "undefined") {
  2517. return true;
  2518. } else {
  2519. return shallowEqual(node, opts);
  2520. }
  2521. }
  2522. return false;
  2523. }
  2524. function isTSIndexSignature(node, opts) {
  2525. if (!node) return false;
  2526. var nodeType = node.type;
  2527. if (nodeType === "TSIndexSignature") {
  2528. if (typeof opts === "undefined") {
  2529. return true;
  2530. } else {
  2531. return shallowEqual(node, opts);
  2532. }
  2533. }
  2534. return false;
  2535. }
  2536. function isTSAnyKeyword(node, opts) {
  2537. if (!node) return false;
  2538. var nodeType = node.type;
  2539. if (nodeType === "TSAnyKeyword") {
  2540. if (typeof opts === "undefined") {
  2541. return true;
  2542. } else {
  2543. return shallowEqual(node, opts);
  2544. }
  2545. }
  2546. return false;
  2547. }
  2548. function isTSBooleanKeyword(node, opts) {
  2549. if (!node) return false;
  2550. var nodeType = node.type;
  2551. if (nodeType === "TSBooleanKeyword") {
  2552. if (typeof opts === "undefined") {
  2553. return true;
  2554. } else {
  2555. return shallowEqual(node, opts);
  2556. }
  2557. }
  2558. return false;
  2559. }
  2560. function isTSBigIntKeyword(node, opts) {
  2561. if (!node) return false;
  2562. var nodeType = node.type;
  2563. if (nodeType === "TSBigIntKeyword") {
  2564. if (typeof opts === "undefined") {
  2565. return true;
  2566. } else {
  2567. return shallowEqual(node, opts);
  2568. }
  2569. }
  2570. return false;
  2571. }
  2572. function isTSIntrinsicKeyword(node, opts) {
  2573. if (!node) return false;
  2574. var nodeType = node.type;
  2575. if (nodeType === "TSIntrinsicKeyword") {
  2576. if (typeof opts === "undefined") {
  2577. return true;
  2578. } else {
  2579. return shallowEqual(node, opts);
  2580. }
  2581. }
  2582. return false;
  2583. }
  2584. function isTSNeverKeyword(node, opts) {
  2585. if (!node) return false;
  2586. var nodeType = node.type;
  2587. if (nodeType === "TSNeverKeyword") {
  2588. if (typeof opts === "undefined") {
  2589. return true;
  2590. } else {
  2591. return shallowEqual(node, opts);
  2592. }
  2593. }
  2594. return false;
  2595. }
  2596. function isTSNullKeyword(node, opts) {
  2597. if (!node) return false;
  2598. var nodeType = node.type;
  2599. if (nodeType === "TSNullKeyword") {
  2600. if (typeof opts === "undefined") {
  2601. return true;
  2602. } else {
  2603. return shallowEqual(node, opts);
  2604. }
  2605. }
  2606. return false;
  2607. }
  2608. function isTSNumberKeyword(node, opts) {
  2609. if (!node) return false;
  2610. var nodeType = node.type;
  2611. if (nodeType === "TSNumberKeyword") {
  2612. if (typeof opts === "undefined") {
  2613. return true;
  2614. } else {
  2615. return shallowEqual(node, opts);
  2616. }
  2617. }
  2618. return false;
  2619. }
  2620. function isTSObjectKeyword(node, opts) {
  2621. if (!node) return false;
  2622. var nodeType = node.type;
  2623. if (nodeType === "TSObjectKeyword") {
  2624. if (typeof opts === "undefined") {
  2625. return true;
  2626. } else {
  2627. return shallowEqual(node, opts);
  2628. }
  2629. }
  2630. return false;
  2631. }
  2632. function isTSStringKeyword(node, opts) {
  2633. if (!node) return false;
  2634. var nodeType = node.type;
  2635. if (nodeType === "TSStringKeyword") {
  2636. if (typeof opts === "undefined") {
  2637. return true;
  2638. } else {
  2639. return shallowEqual(node, opts);
  2640. }
  2641. }
  2642. return false;
  2643. }
  2644. function isTSSymbolKeyword(node, opts) {
  2645. if (!node) return false;
  2646. var nodeType = node.type;
  2647. if (nodeType === "TSSymbolKeyword") {
  2648. if (typeof opts === "undefined") {
  2649. return true;
  2650. } else {
  2651. return shallowEqual(node, opts);
  2652. }
  2653. }
  2654. return false;
  2655. }
  2656. function isTSUndefinedKeyword(node, opts) {
  2657. if (!node) return false;
  2658. var nodeType = node.type;
  2659. if (nodeType === "TSUndefinedKeyword") {
  2660. if (typeof opts === "undefined") {
  2661. return true;
  2662. } else {
  2663. return shallowEqual(node, opts);
  2664. }
  2665. }
  2666. return false;
  2667. }
  2668. function isTSUnknownKeyword(node, opts) {
  2669. if (!node) return false;
  2670. var nodeType = node.type;
  2671. if (nodeType === "TSUnknownKeyword") {
  2672. if (typeof opts === "undefined") {
  2673. return true;
  2674. } else {
  2675. return shallowEqual(node, opts);
  2676. }
  2677. }
  2678. return false;
  2679. }
  2680. function isTSVoidKeyword(node, opts) {
  2681. if (!node) return false;
  2682. var nodeType = node.type;
  2683. if (nodeType === "TSVoidKeyword") {
  2684. if (typeof opts === "undefined") {
  2685. return true;
  2686. } else {
  2687. return shallowEqual(node, opts);
  2688. }
  2689. }
  2690. return false;
  2691. }
  2692. function isTSThisType(node, opts) {
  2693. if (!node) return false;
  2694. var nodeType = node.type;
  2695. if (nodeType === "TSThisType") {
  2696. if (typeof opts === "undefined") {
  2697. return true;
  2698. } else {
  2699. return shallowEqual(node, opts);
  2700. }
  2701. }
  2702. return false;
  2703. }
  2704. function isTSFunctionType(node, opts) {
  2705. if (!node) return false;
  2706. var nodeType = node.type;
  2707. if (nodeType === "TSFunctionType") {
  2708. if (typeof opts === "undefined") {
  2709. return true;
  2710. } else {
  2711. return shallowEqual(node, opts);
  2712. }
  2713. }
  2714. return false;
  2715. }
  2716. function isTSConstructorType(node, opts) {
  2717. if (!node) return false;
  2718. var nodeType = node.type;
  2719. if (nodeType === "TSConstructorType") {
  2720. if (typeof opts === "undefined") {
  2721. return true;
  2722. } else {
  2723. return shallowEqual(node, opts);
  2724. }
  2725. }
  2726. return false;
  2727. }
  2728. function isTSTypeReference(node, opts) {
  2729. if (!node) return false;
  2730. var nodeType = node.type;
  2731. if (nodeType === "TSTypeReference") {
  2732. if (typeof opts === "undefined") {
  2733. return true;
  2734. } else {
  2735. return shallowEqual(node, opts);
  2736. }
  2737. }
  2738. return false;
  2739. }
  2740. function isTSTypePredicate(node, opts) {
  2741. if (!node) return false;
  2742. var nodeType = node.type;
  2743. if (nodeType === "TSTypePredicate") {
  2744. if (typeof opts === "undefined") {
  2745. return true;
  2746. } else {
  2747. return shallowEqual(node, opts);
  2748. }
  2749. }
  2750. return false;
  2751. }
  2752. function isTSTypeQuery(node, opts) {
  2753. if (!node) return false;
  2754. var nodeType = node.type;
  2755. if (nodeType === "TSTypeQuery") {
  2756. if (typeof opts === "undefined") {
  2757. return true;
  2758. } else {
  2759. return shallowEqual(node, opts);
  2760. }
  2761. }
  2762. return false;
  2763. }
  2764. function isTSTypeLiteral(node, opts) {
  2765. if (!node) return false;
  2766. var nodeType = node.type;
  2767. if (nodeType === "TSTypeLiteral") {
  2768. if (typeof opts === "undefined") {
  2769. return true;
  2770. } else {
  2771. return shallowEqual(node, opts);
  2772. }
  2773. }
  2774. return false;
  2775. }
  2776. function isTSArrayType(node, opts) {
  2777. if (!node) return false;
  2778. var nodeType = node.type;
  2779. if (nodeType === "TSArrayType") {
  2780. if (typeof opts === "undefined") {
  2781. return true;
  2782. } else {
  2783. return shallowEqual(node, opts);
  2784. }
  2785. }
  2786. return false;
  2787. }
  2788. function isTSTupleType(node, opts) {
  2789. if (!node) return false;
  2790. var nodeType = node.type;
  2791. if (nodeType === "TSTupleType") {
  2792. if (typeof opts === "undefined") {
  2793. return true;
  2794. } else {
  2795. return shallowEqual(node, opts);
  2796. }
  2797. }
  2798. return false;
  2799. }
  2800. function isTSOptionalType(node, opts) {
  2801. if (!node) return false;
  2802. var nodeType = node.type;
  2803. if (nodeType === "TSOptionalType") {
  2804. if (typeof opts === "undefined") {
  2805. return true;
  2806. } else {
  2807. return shallowEqual(node, opts);
  2808. }
  2809. }
  2810. return false;
  2811. }
  2812. function isTSRestType(node, opts) {
  2813. if (!node) return false;
  2814. var nodeType = node.type;
  2815. if (nodeType === "TSRestType") {
  2816. if (typeof opts === "undefined") {
  2817. return true;
  2818. } else {
  2819. return shallowEqual(node, opts);
  2820. }
  2821. }
  2822. return false;
  2823. }
  2824. function isTSNamedTupleMember(node, opts) {
  2825. if (!node) return false;
  2826. var nodeType = node.type;
  2827. if (nodeType === "TSNamedTupleMember") {
  2828. if (typeof opts === "undefined") {
  2829. return true;
  2830. } else {
  2831. return shallowEqual(node, opts);
  2832. }
  2833. }
  2834. return false;
  2835. }
  2836. function isTSUnionType(node, opts) {
  2837. if (!node) return false;
  2838. var nodeType = node.type;
  2839. if (nodeType === "TSUnionType") {
  2840. if (typeof opts === "undefined") {
  2841. return true;
  2842. } else {
  2843. return shallowEqual(node, opts);
  2844. }
  2845. }
  2846. return false;
  2847. }
  2848. function isTSIntersectionType(node, opts) {
  2849. if (!node) return false;
  2850. var nodeType = node.type;
  2851. if (nodeType === "TSIntersectionType") {
  2852. if (typeof opts === "undefined") {
  2853. return true;
  2854. } else {
  2855. return shallowEqual(node, opts);
  2856. }
  2857. }
  2858. return false;
  2859. }
  2860. function isTSConditionalType(node, opts) {
  2861. if (!node) return false;
  2862. var nodeType = node.type;
  2863. if (nodeType === "TSConditionalType") {
  2864. if (typeof opts === "undefined") {
  2865. return true;
  2866. } else {
  2867. return shallowEqual(node, opts);
  2868. }
  2869. }
  2870. return false;
  2871. }
  2872. function isTSInferType(node, opts) {
  2873. if (!node) return false;
  2874. var nodeType = node.type;
  2875. if (nodeType === "TSInferType") {
  2876. if (typeof opts === "undefined") {
  2877. return true;
  2878. } else {
  2879. return shallowEqual(node, opts);
  2880. }
  2881. }
  2882. return false;
  2883. }
  2884. function isTSParenthesizedType(node, opts) {
  2885. if (!node) return false;
  2886. var nodeType = node.type;
  2887. if (nodeType === "TSParenthesizedType") {
  2888. if (typeof opts === "undefined") {
  2889. return true;
  2890. } else {
  2891. return shallowEqual(node, opts);
  2892. }
  2893. }
  2894. return false;
  2895. }
  2896. function isTSTypeOperator(node, opts) {
  2897. if (!node) return false;
  2898. var nodeType = node.type;
  2899. if (nodeType === "TSTypeOperator") {
  2900. if (typeof opts === "undefined") {
  2901. return true;
  2902. } else {
  2903. return shallowEqual(node, opts);
  2904. }
  2905. }
  2906. return false;
  2907. }
  2908. function isTSIndexedAccessType(node, opts) {
  2909. if (!node) return false;
  2910. var nodeType = node.type;
  2911. if (nodeType === "TSIndexedAccessType") {
  2912. if (typeof opts === "undefined") {
  2913. return true;
  2914. } else {
  2915. return shallowEqual(node, opts);
  2916. }
  2917. }
  2918. return false;
  2919. }
  2920. function isTSMappedType(node, opts) {
  2921. if (!node) return false;
  2922. var nodeType = node.type;
  2923. if (nodeType === "TSMappedType") {
  2924. if (typeof opts === "undefined") {
  2925. return true;
  2926. } else {
  2927. return shallowEqual(node, opts);
  2928. }
  2929. }
  2930. return false;
  2931. }
  2932. function isTSLiteralType(node, opts) {
  2933. if (!node) return false;
  2934. var nodeType = node.type;
  2935. if (nodeType === "TSLiteralType") {
  2936. if (typeof opts === "undefined") {
  2937. return true;
  2938. } else {
  2939. return shallowEqual(node, opts);
  2940. }
  2941. }
  2942. return false;
  2943. }
  2944. function isTSExpressionWithTypeArguments(node, opts) {
  2945. if (!node) return false;
  2946. var nodeType = node.type;
  2947. if (nodeType === "TSExpressionWithTypeArguments") {
  2948. if (typeof opts === "undefined") {
  2949. return true;
  2950. } else {
  2951. return shallowEqual(node, opts);
  2952. }
  2953. }
  2954. return false;
  2955. }
  2956. function isTSInterfaceDeclaration(node, opts) {
  2957. if (!node) return false;
  2958. var nodeType = node.type;
  2959. if (nodeType === "TSInterfaceDeclaration") {
  2960. if (typeof opts === "undefined") {
  2961. return true;
  2962. } else {
  2963. return shallowEqual(node, opts);
  2964. }
  2965. }
  2966. return false;
  2967. }
  2968. function isTSInterfaceBody(node, opts) {
  2969. if (!node) return false;
  2970. var nodeType = node.type;
  2971. if (nodeType === "TSInterfaceBody") {
  2972. if (typeof opts === "undefined") {
  2973. return true;
  2974. } else {
  2975. return shallowEqual(node, opts);
  2976. }
  2977. }
  2978. return false;
  2979. }
  2980. function isTSTypeAliasDeclaration(node, opts) {
  2981. if (!node) return false;
  2982. var nodeType = node.type;
  2983. if (nodeType === "TSTypeAliasDeclaration") {
  2984. if (typeof opts === "undefined") {
  2985. return true;
  2986. } else {
  2987. return shallowEqual(node, opts);
  2988. }
  2989. }
  2990. return false;
  2991. }
  2992. function isTSAsExpression(node, opts) {
  2993. if (!node) return false;
  2994. var nodeType = node.type;
  2995. if (nodeType === "TSAsExpression") {
  2996. if (typeof opts === "undefined") {
  2997. return true;
  2998. } else {
  2999. return shallowEqual(node, opts);
  3000. }
  3001. }
  3002. return false;
  3003. }
  3004. function isTSTypeAssertion(node, opts) {
  3005. if (!node) return false;
  3006. var nodeType = node.type;
  3007. if (nodeType === "TSTypeAssertion") {
  3008. if (typeof opts === "undefined") {
  3009. return true;
  3010. } else {
  3011. return shallowEqual(node, opts);
  3012. }
  3013. }
  3014. return false;
  3015. }
  3016. function isTSEnumDeclaration(node, opts) {
  3017. if (!node) return false;
  3018. var nodeType = node.type;
  3019. if (nodeType === "TSEnumDeclaration") {
  3020. if (typeof opts === "undefined") {
  3021. return true;
  3022. } else {
  3023. return shallowEqual(node, opts);
  3024. }
  3025. }
  3026. return false;
  3027. }
  3028. function isTSEnumMember(node, opts) {
  3029. if (!node) return false;
  3030. var nodeType = node.type;
  3031. if (nodeType === "TSEnumMember") {
  3032. if (typeof opts === "undefined") {
  3033. return true;
  3034. } else {
  3035. return shallowEqual(node, opts);
  3036. }
  3037. }
  3038. return false;
  3039. }
  3040. function isTSModuleDeclaration(node, opts) {
  3041. if (!node) return false;
  3042. var nodeType = node.type;
  3043. if (nodeType === "TSModuleDeclaration") {
  3044. if (typeof opts === "undefined") {
  3045. return true;
  3046. } else {
  3047. return shallowEqual(node, opts);
  3048. }
  3049. }
  3050. return false;
  3051. }
  3052. function isTSModuleBlock(node, opts) {
  3053. if (!node) return false;
  3054. var nodeType = node.type;
  3055. if (nodeType === "TSModuleBlock") {
  3056. if (typeof opts === "undefined") {
  3057. return true;
  3058. } else {
  3059. return shallowEqual(node, opts);
  3060. }
  3061. }
  3062. return false;
  3063. }
  3064. function isTSImportType(node, opts) {
  3065. if (!node) return false;
  3066. var nodeType = node.type;
  3067. if (nodeType === "TSImportType") {
  3068. if (typeof opts === "undefined") {
  3069. return true;
  3070. } else {
  3071. return shallowEqual(node, opts);
  3072. }
  3073. }
  3074. return false;
  3075. }
  3076. function isTSImportEqualsDeclaration(node, opts) {
  3077. if (!node) return false;
  3078. var nodeType = node.type;
  3079. if (nodeType === "TSImportEqualsDeclaration") {
  3080. if (typeof opts === "undefined") {
  3081. return true;
  3082. } else {
  3083. return shallowEqual(node, opts);
  3084. }
  3085. }
  3086. return false;
  3087. }
  3088. function isTSExternalModuleReference(node, opts) {
  3089. if (!node) return false;
  3090. var nodeType = node.type;
  3091. if (nodeType === "TSExternalModuleReference") {
  3092. if (typeof opts === "undefined") {
  3093. return true;
  3094. } else {
  3095. return shallowEqual(node, opts);
  3096. }
  3097. }
  3098. return false;
  3099. }
  3100. function isTSNonNullExpression(node, opts) {
  3101. if (!node) return false;
  3102. var nodeType = node.type;
  3103. if (nodeType === "TSNonNullExpression") {
  3104. if (typeof opts === "undefined") {
  3105. return true;
  3106. } else {
  3107. return shallowEqual(node, opts);
  3108. }
  3109. }
  3110. return false;
  3111. }
  3112. function isTSExportAssignment(node, opts) {
  3113. if (!node) return false;
  3114. var nodeType = node.type;
  3115. if (nodeType === "TSExportAssignment") {
  3116. if (typeof opts === "undefined") {
  3117. return true;
  3118. } else {
  3119. return shallowEqual(node, opts);
  3120. }
  3121. }
  3122. return false;
  3123. }
  3124. function isTSNamespaceExportDeclaration(node, opts) {
  3125. if (!node) return false;
  3126. var nodeType = node.type;
  3127. if (nodeType === "TSNamespaceExportDeclaration") {
  3128. if (typeof opts === "undefined") {
  3129. return true;
  3130. } else {
  3131. return shallowEqual(node, opts);
  3132. }
  3133. }
  3134. return false;
  3135. }
  3136. function isTSTypeAnnotation(node, opts) {
  3137. if (!node) return false;
  3138. var nodeType = node.type;
  3139. if (nodeType === "TSTypeAnnotation") {
  3140. if (typeof opts === "undefined") {
  3141. return true;
  3142. } else {
  3143. return shallowEqual(node, opts);
  3144. }
  3145. }
  3146. return false;
  3147. }
  3148. function isTSTypeParameterInstantiation(node, opts) {
  3149. if (!node) return false;
  3150. var nodeType = node.type;
  3151. if (nodeType === "TSTypeParameterInstantiation") {
  3152. if (typeof opts === "undefined") {
  3153. return true;
  3154. } else {
  3155. return shallowEqual(node, opts);
  3156. }
  3157. }
  3158. return false;
  3159. }
  3160. function isTSTypeParameterDeclaration(node, opts) {
  3161. if (!node) return false;
  3162. var nodeType = node.type;
  3163. if (nodeType === "TSTypeParameterDeclaration") {
  3164. if (typeof opts === "undefined") {
  3165. return true;
  3166. } else {
  3167. return shallowEqual(node, opts);
  3168. }
  3169. }
  3170. return false;
  3171. }
  3172. function isTSTypeParameter(node, opts) {
  3173. if (!node) return false;
  3174. var nodeType = node.type;
  3175. if (nodeType === "TSTypeParameter") {
  3176. if (typeof opts === "undefined") {
  3177. return true;
  3178. } else {
  3179. return shallowEqual(node, opts);
  3180. }
  3181. }
  3182. return false;
  3183. }
  3184. function isExpression(node, opts) {
  3185. if (!node) return false;
  3186. var nodeType = node.type;
  3187. if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
  3188. if (typeof opts === "undefined") {
  3189. return true;
  3190. } else {
  3191. return shallowEqual(node, opts);
  3192. }
  3193. }
  3194. return false;
  3195. }
  3196. function isBinary(node, opts) {
  3197. if (!node) return false;
  3198. var nodeType = node.type;
  3199. if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
  3200. if (typeof opts === "undefined") {
  3201. return true;
  3202. } else {
  3203. return shallowEqual(node, opts);
  3204. }
  3205. }
  3206. return false;
  3207. }
  3208. function isScopable(node, opts) {
  3209. if (!node) return false;
  3210. var nodeType = node.type;
  3211. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3212. if (typeof opts === "undefined") {
  3213. return true;
  3214. } else {
  3215. return shallowEqual(node, opts);
  3216. }
  3217. }
  3218. return false;
  3219. }
  3220. function isBlockParent(node, opts) {
  3221. if (!node) return false;
  3222. var nodeType = node.type;
  3223. if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3224. if (typeof opts === "undefined") {
  3225. return true;
  3226. } else {
  3227. return shallowEqual(node, opts);
  3228. }
  3229. }
  3230. return false;
  3231. }
  3232. function isBlock(node, opts) {
  3233. if (!node) return false;
  3234. var nodeType = node.type;
  3235. if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
  3236. if (typeof opts === "undefined") {
  3237. return true;
  3238. } else {
  3239. return shallowEqual(node, opts);
  3240. }
  3241. }
  3242. return false;
  3243. }
  3244. function isStatement(node, opts) {
  3245. if (!node) return false;
  3246. var nodeType = node.type;
  3247. if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
  3248. if (typeof opts === "undefined") {
  3249. return true;
  3250. } else {
  3251. return shallowEqual(node, opts);
  3252. }
  3253. }
  3254. return false;
  3255. }
  3256. function isTerminatorless(node, opts) {
  3257. if (!node) return false;
  3258. var nodeType = node.type;
  3259. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
  3260. if (typeof opts === "undefined") {
  3261. return true;
  3262. } else {
  3263. return shallowEqual(node, opts);
  3264. }
  3265. }
  3266. return false;
  3267. }
  3268. function isCompletionStatement(node, opts) {
  3269. if (!node) return false;
  3270. var nodeType = node.type;
  3271. if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
  3272. if (typeof opts === "undefined") {
  3273. return true;
  3274. } else {
  3275. return shallowEqual(node, opts);
  3276. }
  3277. }
  3278. return false;
  3279. }
  3280. function isConditional(node, opts) {
  3281. if (!node) return false;
  3282. var nodeType = node.type;
  3283. if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
  3284. if (typeof opts === "undefined") {
  3285. return true;
  3286. } else {
  3287. return shallowEqual(node, opts);
  3288. }
  3289. }
  3290. return false;
  3291. }
  3292. function isLoop$1(node, opts) {
  3293. if (!node) return false;
  3294. var nodeType = node.type;
  3295. if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
  3296. if (typeof opts === "undefined") {
  3297. return true;
  3298. } else {
  3299. return shallowEqual(node, opts);
  3300. }
  3301. }
  3302. return false;
  3303. }
  3304. function isWhile(node, opts) {
  3305. if (!node) return false;
  3306. var nodeType = node.type;
  3307. if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
  3308. if (typeof opts === "undefined") {
  3309. return true;
  3310. } else {
  3311. return shallowEqual(node, opts);
  3312. }
  3313. }
  3314. return false;
  3315. }
  3316. function isExpressionWrapper(node, opts) {
  3317. if (!node) return false;
  3318. var nodeType = node.type;
  3319. if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
  3320. if (typeof opts === "undefined") {
  3321. return true;
  3322. } else {
  3323. return shallowEqual(node, opts);
  3324. }
  3325. }
  3326. return false;
  3327. }
  3328. function isFor(node, opts) {
  3329. if (!node) return false;
  3330. var nodeType = node.type;
  3331. if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
  3332. if (typeof opts === "undefined") {
  3333. return true;
  3334. } else {
  3335. return shallowEqual(node, opts);
  3336. }
  3337. }
  3338. return false;
  3339. }
  3340. function isForXStatement(node, opts) {
  3341. if (!node) return false;
  3342. var nodeType = node.type;
  3343. if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
  3344. if (typeof opts === "undefined") {
  3345. return true;
  3346. } else {
  3347. return shallowEqual(node, opts);
  3348. }
  3349. }
  3350. return false;
  3351. }
  3352. function isFunction$1(node, opts) {
  3353. if (!node) return false;
  3354. var nodeType = node.type;
  3355. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3356. if (typeof opts === "undefined") {
  3357. return true;
  3358. } else {
  3359. return shallowEqual(node, opts);
  3360. }
  3361. }
  3362. return false;
  3363. }
  3364. function isFunctionParent(node, opts) {
  3365. if (!node) return false;
  3366. var nodeType = node.type;
  3367. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3368. if (typeof opts === "undefined") {
  3369. return true;
  3370. } else {
  3371. return shallowEqual(node, opts);
  3372. }
  3373. }
  3374. return false;
  3375. }
  3376. function isPureish(node, opts) {
  3377. if (!node) return false;
  3378. var nodeType = node.type;
  3379. if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3380. if (typeof opts === "undefined") {
  3381. return true;
  3382. } else {
  3383. return shallowEqual(node, opts);
  3384. }
  3385. }
  3386. return false;
  3387. }
  3388. function isDeclaration(node, opts) {
  3389. if (!node) return false;
  3390. var nodeType = node.type;
  3391. if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
  3392. if (typeof opts === "undefined") {
  3393. return true;
  3394. } else {
  3395. return shallowEqual(node, opts);
  3396. }
  3397. }
  3398. return false;
  3399. }
  3400. function isPatternLike(node, opts) {
  3401. if (!node) return false;
  3402. var nodeType = node.type;
  3403. if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3404. if (typeof opts === "undefined") {
  3405. return true;
  3406. } else {
  3407. return shallowEqual(node, opts);
  3408. }
  3409. }
  3410. return false;
  3411. }
  3412. function isLVal(node, opts) {
  3413. if (!node) return false;
  3414. var nodeType = node.type;
  3415. if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
  3416. if (typeof opts === "undefined") {
  3417. return true;
  3418. } else {
  3419. return shallowEqual(node, opts);
  3420. }
  3421. }
  3422. return false;
  3423. }
  3424. function isTSEntityName(node, opts) {
  3425. if (!node) return false;
  3426. var nodeType = node.type;
  3427. if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
  3428. if (typeof opts === "undefined") {
  3429. return true;
  3430. } else {
  3431. return shallowEqual(node, opts);
  3432. }
  3433. }
  3434. return false;
  3435. }
  3436. function isLiteral(node, opts) {
  3437. if (!node) return false;
  3438. var nodeType = node.type;
  3439. if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
  3440. if (typeof opts === "undefined") {
  3441. return true;
  3442. } else {
  3443. return shallowEqual(node, opts);
  3444. }
  3445. }
  3446. return false;
  3447. }
  3448. function isUserWhitespacable(node, opts) {
  3449. if (!node) return false;
  3450. var nodeType = node.type;
  3451. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
  3452. if (typeof opts === "undefined") {
  3453. return true;
  3454. } else {
  3455. return shallowEqual(node, opts);
  3456. }
  3457. }
  3458. return false;
  3459. }
  3460. function isMethod(node, opts) {
  3461. if (!node) return false;
  3462. var nodeType = node.type;
  3463. if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
  3464. if (typeof opts === "undefined") {
  3465. return true;
  3466. } else {
  3467. return shallowEqual(node, opts);
  3468. }
  3469. }
  3470. return false;
  3471. }
  3472. function isObjectMember(node, opts) {
  3473. if (!node) return false;
  3474. var nodeType = node.type;
  3475. if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
  3476. if (typeof opts === "undefined") {
  3477. return true;
  3478. } else {
  3479. return shallowEqual(node, opts);
  3480. }
  3481. }
  3482. return false;
  3483. }
  3484. function isProperty(node, opts) {
  3485. if (!node) return false;
  3486. var nodeType = node.type;
  3487. if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
  3488. if (typeof opts === "undefined") {
  3489. return true;
  3490. } else {
  3491. return shallowEqual(node, opts);
  3492. }
  3493. }
  3494. return false;
  3495. }
  3496. function isUnaryLike(node, opts) {
  3497. if (!node) return false;
  3498. var nodeType = node.type;
  3499. if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
  3500. if (typeof opts === "undefined") {
  3501. return true;
  3502. } else {
  3503. return shallowEqual(node, opts);
  3504. }
  3505. }
  3506. return false;
  3507. }
  3508. function isPattern(node, opts) {
  3509. if (!node) return false;
  3510. var nodeType = node.type;
  3511. if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
  3512. if (typeof opts === "undefined") {
  3513. return true;
  3514. } else {
  3515. return shallowEqual(node, opts);
  3516. }
  3517. }
  3518. return false;
  3519. }
  3520. function isClass(node, opts) {
  3521. if (!node) return false;
  3522. var nodeType = node.type;
  3523. if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
  3524. if (typeof opts === "undefined") {
  3525. return true;
  3526. } else {
  3527. return shallowEqual(node, opts);
  3528. }
  3529. }
  3530. return false;
  3531. }
  3532. function isModuleDeclaration(node, opts) {
  3533. if (!node) return false;
  3534. var nodeType = node.type;
  3535. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
  3536. if (typeof opts === "undefined") {
  3537. return true;
  3538. } else {
  3539. return shallowEqual(node, opts);
  3540. }
  3541. }
  3542. return false;
  3543. }
  3544. function isExportDeclaration(node, opts) {
  3545. if (!node) return false;
  3546. var nodeType = node.type;
  3547. if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
  3548. if (typeof opts === "undefined") {
  3549. return true;
  3550. } else {
  3551. return shallowEqual(node, opts);
  3552. }
  3553. }
  3554. return false;
  3555. }
  3556. function isModuleSpecifier(node, opts) {
  3557. if (!node) return false;
  3558. var nodeType = node.type;
  3559. if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
  3560. if (typeof opts === "undefined") {
  3561. return true;
  3562. } else {
  3563. return shallowEqual(node, opts);
  3564. }
  3565. }
  3566. return false;
  3567. }
  3568. function isFlow(node, opts) {
  3569. if (!node) return false;
  3570. var nodeType = node.type;
  3571. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  3572. if (typeof opts === "undefined") {
  3573. return true;
  3574. } else {
  3575. return shallowEqual(node, opts);
  3576. }
  3577. }
  3578. return false;
  3579. }
  3580. function isFlowType(node, opts) {
  3581. if (!node) return false;
  3582. var nodeType = node.type;
  3583. if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
  3584. if (typeof opts === "undefined") {
  3585. return true;
  3586. } else {
  3587. return shallowEqual(node, opts);
  3588. }
  3589. }
  3590. return false;
  3591. }
  3592. function isFlowBaseAnnotation(node, opts) {
  3593. if (!node) return false;
  3594. var nodeType = node.type;
  3595. if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
  3596. if (typeof opts === "undefined") {
  3597. return true;
  3598. } else {
  3599. return shallowEqual(node, opts);
  3600. }
  3601. }
  3602. return false;
  3603. }
  3604. function isFlowDeclaration(node, opts) {
  3605. if (!node) return false;
  3606. var nodeType = node.type;
  3607. if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
  3608. if (typeof opts === "undefined") {
  3609. return true;
  3610. } else {
  3611. return shallowEqual(node, opts);
  3612. }
  3613. }
  3614. return false;
  3615. }
  3616. function isFlowPredicate(node, opts) {
  3617. if (!node) return false;
  3618. var nodeType = node.type;
  3619. if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
  3620. if (typeof opts === "undefined") {
  3621. return true;
  3622. } else {
  3623. return shallowEqual(node, opts);
  3624. }
  3625. }
  3626. return false;
  3627. }
  3628. function isEnumBody(node, opts) {
  3629. if (!node) return false;
  3630. var nodeType = node.type;
  3631. if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
  3632. if (typeof opts === "undefined") {
  3633. return true;
  3634. } else {
  3635. return shallowEqual(node, opts);
  3636. }
  3637. }
  3638. return false;
  3639. }
  3640. function isEnumMember(node, opts) {
  3641. if (!node) return false;
  3642. var nodeType = node.type;
  3643. if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
  3644. if (typeof opts === "undefined") {
  3645. return true;
  3646. } else {
  3647. return shallowEqual(node, opts);
  3648. }
  3649. }
  3650. return false;
  3651. }
  3652. function isJSX(node, opts) {
  3653. if (!node) return false;
  3654. var nodeType = node.type;
  3655. if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
  3656. if (typeof opts === "undefined") {
  3657. return true;
  3658. } else {
  3659. return shallowEqual(node, opts);
  3660. }
  3661. }
  3662. return false;
  3663. }
  3664. function isPrivate(node, opts) {
  3665. if (!node) return false;
  3666. var nodeType = node.type;
  3667. if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
  3668. if (typeof opts === "undefined") {
  3669. return true;
  3670. } else {
  3671. return shallowEqual(node, opts);
  3672. }
  3673. }
  3674. return false;
  3675. }
  3676. function isTSTypeElement(node, opts) {
  3677. if (!node) return false;
  3678. var nodeType = node.type;
  3679. if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
  3680. if (typeof opts === "undefined") {
  3681. return true;
  3682. } else {
  3683. return shallowEqual(node, opts);
  3684. }
  3685. }
  3686. return false;
  3687. }
  3688. function isTSType(node, opts) {
  3689. if (!node) return false;
  3690. var nodeType = node.type;
  3691. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
  3692. if (typeof opts === "undefined") {
  3693. return true;
  3694. } else {
  3695. return shallowEqual(node, opts);
  3696. }
  3697. }
  3698. return false;
  3699. }
  3700. function isTSBaseType(node, opts) {
  3701. if (!node) return false;
  3702. var nodeType = node.type;
  3703. if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
  3704. if (typeof opts === "undefined") {
  3705. return true;
  3706. } else {
  3707. return shallowEqual(node, opts);
  3708. }
  3709. }
  3710. return false;
  3711. }
  3712. function isNumberLiteral(node, opts) {
  3713. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  3714. if (!node) return false;
  3715. var nodeType = node.type;
  3716. if (nodeType === "NumberLiteral") {
  3717. if (typeof opts === "undefined") {
  3718. return true;
  3719. } else {
  3720. return shallowEqual(node, opts);
  3721. }
  3722. }
  3723. return false;
  3724. }
  3725. function isRegexLiteral(node, opts) {
  3726. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  3727. if (!node) return false;
  3728. var nodeType = node.type;
  3729. if (nodeType === "RegexLiteral") {
  3730. if (typeof opts === "undefined") {
  3731. return true;
  3732. } else {
  3733. return shallowEqual(node, opts);
  3734. }
  3735. }
  3736. return false;
  3737. }
  3738. function isRestProperty(node, opts) {
  3739. console.trace("The node type RestProperty has been renamed to RestElement");
  3740. if (!node) return false;
  3741. var nodeType = node.type;
  3742. if (nodeType === "RestProperty") {
  3743. if (typeof opts === "undefined") {
  3744. return true;
  3745. } else {
  3746. return shallowEqual(node, opts);
  3747. }
  3748. }
  3749. return false;
  3750. }
  3751. function isSpreadProperty(node, opts) {
  3752. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  3753. if (!node) return false;
  3754. var nodeType = node.type;
  3755. if (nodeType === "SpreadProperty") {
  3756. if (typeof opts === "undefined") {
  3757. return true;
  3758. } else {
  3759. return shallowEqual(node, opts);
  3760. }
  3761. }
  3762. return false;
  3763. }
  3764. function matchesPattern$1(member, match, allowPartial) {
  3765. if (!isMemberExpression(member)) return false;
  3766. var parts = Array.isArray(match) ? match : match.split(".");
  3767. var nodes = [];
  3768. var node;
  3769. for (node = member; isMemberExpression(node); node = node.object) {
  3770. nodes.push(node.property);
  3771. }
  3772. nodes.push(node);
  3773. if (nodes.length < parts.length) return false;
  3774. if (!allowPartial && nodes.length > parts.length) return false;
  3775. for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
  3776. var _node = nodes[j];
  3777. var value = void 0;
  3778. if (isIdentifier(_node)) {
  3779. value = _node.name;
  3780. } else if (isStringLiteral(_node)) {
  3781. value = _node.value;
  3782. } else if (isThisExpression(_node)) {
  3783. value = "this";
  3784. } else {
  3785. return false;
  3786. }
  3787. if (parts[i] !== value) return false;
  3788. }
  3789. return true;
  3790. }
  3791. function buildMatchMemberExpression(match, allowPartial) {
  3792. var parts = match.split(".");
  3793. return function (member) {
  3794. return matchesPattern$1(member, parts, allowPartial);
  3795. };
  3796. }
  3797. var isReactComponent = buildMatchMemberExpression("React.Component");
  3798. function isCompatTag(tagName) {
  3799. return !!tagName && /^[a-z]/.test(tagName);
  3800. }
  3801. var fastProto = null;
  3802. function FastObject(o) {
  3803. if (fastProto !== null && typeof fastProto.property) {
  3804. var result = fastProto;
  3805. fastProto = FastObject.prototype = null;
  3806. return result;
  3807. }
  3808. fastProto = FastObject.prototype = o == null ? Object.create(null) : o;
  3809. return new FastObject();
  3810. }
  3811. FastObject();
  3812. var toFastProperties = function toFastproperties(o) {
  3813. return FastObject(o);
  3814. };
  3815. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  3816. function getAugmentedNamespace(n) {
  3817. if (n.__esModule) return n;
  3818. var a = Object.defineProperty({}, '__esModule', {value: true});
  3819. Object.keys(n).forEach(function (k) {
  3820. var d = Object.getOwnPropertyDescriptor(n, k);
  3821. Object.defineProperty(a, k, d.get ? d : {
  3822. enumerable: true,
  3823. get: function () {
  3824. return n[k];
  3825. }
  3826. });
  3827. });
  3828. return a;
  3829. }
  3830. function createCommonjsModule(fn, basedir, module) {
  3831. return module = {
  3832. path: basedir,
  3833. exports: {},
  3834. require: function (path, base) {
  3835. return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
  3836. }
  3837. }, fn(module, module.exports), module.exports;
  3838. }
  3839. const DYNAMIC_REQUIRE_LOADERS = Object.create(null);
  3840. const DYNAMIC_REQUIRE_CACHE = Object.create(null);
  3841. const DEFAULT_PARENT_MODULE = {
  3842. id: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []
  3843. };
  3844. const CHECKED_EXTENSIONS = ['', '.js', '.json'];
  3845. function normalize$2 (path) {
  3846. path = path.replace(/\\/g, '/');
  3847. const parts = path.split('/');
  3848. const slashed = parts[0] === '';
  3849. for (let i = 1; i < parts.length; i++) {
  3850. if (parts[i] === '.' || parts[i] === '') {
  3851. parts.splice(i--, 1);
  3852. }
  3853. }
  3854. for (let i = 1; i < parts.length; i++) {
  3855. if (parts[i] !== '..') continue;
  3856. if (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {
  3857. parts.splice(--i, 2);
  3858. i--;
  3859. }
  3860. }
  3861. path = parts.join('/');
  3862. if (slashed && path[0] !== '/')
  3863. path = '/' + path;
  3864. else if (path.length === 0)
  3865. path = '.';
  3866. return path;
  3867. }
  3868. function join$1 () {
  3869. if (arguments.length === 0)
  3870. return '.';
  3871. let joined;
  3872. for (let i = 0; i < arguments.length; ++i) {
  3873. let arg = arguments[i];
  3874. if (arg.length > 0) {
  3875. if (joined === undefined)
  3876. joined = arg;
  3877. else
  3878. joined += '/' + arg;
  3879. }
  3880. }
  3881. if (joined === undefined)
  3882. return '.';
  3883. return joined;
  3884. }
  3885. function isPossibleNodeModulesPath (modulePath) {
  3886. let c0 = modulePath[0];
  3887. if (c0 === '/' || c0 === '\\') return false;
  3888. let c1 = modulePath[1], c2 = modulePath[2];
  3889. if ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\')) ||
  3890. (c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\'))) return false;
  3891. if (c1 === ':' && (c2 === '/' || c2 === '\\'))
  3892. return false;
  3893. return true;
  3894. }
  3895. function dirname$1 (path) {
  3896. if (path.length === 0)
  3897. return '.';
  3898. let i = path.length - 1;
  3899. while (i > 0) {
  3900. const c = path.charCodeAt(i);
  3901. if ((c === 47 || c === 92) && i !== path.length - 1)
  3902. break;
  3903. i--;
  3904. }
  3905. if (i > 0)
  3906. return path.substr(0, i);
  3907. if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)
  3908. return path.charAt(0);
  3909. return '.';
  3910. }
  3911. function commonjsResolveImpl (path, originalModuleDir, testCache) {
  3912. const shouldTryNodeModules = isPossibleNodeModulesPath(path);
  3913. path = normalize$2(path);
  3914. let relPath;
  3915. if (path[0] === '/') {
  3916. originalModuleDir = '/';
  3917. }
  3918. while (true) {
  3919. if (!shouldTryNodeModules) {
  3920. relPath = originalModuleDir ? normalize$2(originalModuleDir + '/' + path) : path;
  3921. } else if (originalModuleDir) {
  3922. relPath = normalize$2(originalModuleDir + '/node_modules/' + path);
  3923. } else {
  3924. relPath = normalize$2(join$1('node_modules', path));
  3925. }
  3926. if (relPath.endsWith('/..')) {
  3927. break; // Travelled too far up, avoid infinite loop
  3928. }
  3929. for (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {
  3930. const resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];
  3931. if (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {
  3932. return resolvedPath;
  3933. } if (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {
  3934. return resolvedPath;
  3935. } }
  3936. if (!shouldTryNodeModules) break;
  3937. const nextDir = normalize$2(originalModuleDir + '/..');
  3938. if (nextDir === originalModuleDir) break;
  3939. originalModuleDir = nextDir;
  3940. }
  3941. return null;
  3942. }
  3943. function commonjsResolve (path, originalModuleDir) {
  3944. const resolvedPath = commonjsResolveImpl(path, originalModuleDir);
  3945. if (resolvedPath !== null) {
  3946. return resolvedPath;
  3947. }
  3948. return require.resolve(path);
  3949. }
  3950. function commonjsRequire (path, originalModuleDir) {
  3951. const resolvedPath = commonjsResolveImpl(path, originalModuleDir);
  3952. if (resolvedPath !== null) {
  3953. let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];
  3954. if (cachedModule) return cachedModule.exports;
  3955. const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];
  3956. if (loader) {
  3957. DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {
  3958. id: resolvedPath,
  3959. filename: resolvedPath,
  3960. path: dirname$1(resolvedPath),
  3961. exports: {},
  3962. parent: DEFAULT_PARENT_MODULE,
  3963. loaded: false,
  3964. children: [],
  3965. paths: [],
  3966. require: function (path, base) {
  3967. return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);
  3968. }
  3969. };
  3970. try {
  3971. loader.call(commonjsGlobal, cachedModule, cachedModule.exports);
  3972. } catch (error) {
  3973. delete DYNAMIC_REQUIRE_CACHE[resolvedPath];
  3974. throw error;
  3975. }
  3976. cachedModule.loaded = true;
  3977. return cachedModule.exports;
  3978. } }
  3979. return require(path);
  3980. }
  3981. commonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;
  3982. commonjsRequire.resolve = commonjsResolve;
  3983. var browser$6 = createCommonjsModule(function (module) {
  3984. var process = module.exports = {};
  3985. var cachedSetTimeout;
  3986. var cachedClearTimeout;
  3987. function defaultSetTimout() {
  3988. throw new Error('setTimeout has not been defined');
  3989. }
  3990. function defaultClearTimeout() {
  3991. throw new Error('clearTimeout has not been defined');
  3992. }
  3993. (function () {
  3994. try {
  3995. if (typeof setTimeout === 'function') {
  3996. cachedSetTimeout = setTimeout;
  3997. } else {
  3998. cachedSetTimeout = defaultSetTimout;
  3999. }
  4000. } catch (e) {
  4001. cachedSetTimeout = defaultSetTimout;
  4002. }
  4003. try {
  4004. if (typeof clearTimeout === 'function') {
  4005. cachedClearTimeout = clearTimeout;
  4006. } else {
  4007. cachedClearTimeout = defaultClearTimeout;
  4008. }
  4009. } catch (e) {
  4010. cachedClearTimeout = defaultClearTimeout;
  4011. }
  4012. })();
  4013. function runTimeout(fun) {
  4014. if (cachedSetTimeout === setTimeout) {
  4015. return setTimeout(fun, 0);
  4016. }
  4017. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  4018. cachedSetTimeout = setTimeout;
  4019. return setTimeout(fun, 0);
  4020. }
  4021. try {
  4022. return cachedSetTimeout(fun, 0);
  4023. } catch (e) {
  4024. try {
  4025. return cachedSetTimeout.call(null, fun, 0);
  4026. } catch (e) {
  4027. return cachedSetTimeout.call(this, fun, 0);
  4028. }
  4029. }
  4030. }
  4031. function runClearTimeout(marker) {
  4032. if (cachedClearTimeout === clearTimeout) {
  4033. return clearTimeout(marker);
  4034. }
  4035. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  4036. cachedClearTimeout = clearTimeout;
  4037. return clearTimeout(marker);
  4038. }
  4039. try {
  4040. return cachedClearTimeout(marker);
  4041. } catch (e) {
  4042. try {
  4043. return cachedClearTimeout.call(null, marker);
  4044. } catch (e) {
  4045. return cachedClearTimeout.call(this, marker);
  4046. }
  4047. }
  4048. }
  4049. var queue = [];
  4050. var draining = false;
  4051. var currentQueue;
  4052. var queueIndex = -1;
  4053. function cleanUpNextTick() {
  4054. if (!draining || !currentQueue) {
  4055. return;
  4056. }
  4057. draining = false;
  4058. if (currentQueue.length) {
  4059. queue = currentQueue.concat(queue);
  4060. } else {
  4061. queueIndex = -1;
  4062. }
  4063. if (queue.length) {
  4064. drainQueue();
  4065. }
  4066. }
  4067. function drainQueue() {
  4068. if (draining) {
  4069. return;
  4070. }
  4071. var timeout = runTimeout(cleanUpNextTick);
  4072. draining = true;
  4073. var len = queue.length;
  4074. while (len) {
  4075. currentQueue = queue;
  4076. queue = [];
  4077. while (++queueIndex < len) {
  4078. if (currentQueue) {
  4079. currentQueue[queueIndex].run();
  4080. }
  4081. }
  4082. queueIndex = -1;
  4083. len = queue.length;
  4084. }
  4085. currentQueue = null;
  4086. draining = false;
  4087. runClearTimeout(timeout);
  4088. }
  4089. process.nextTick = function (fun) {
  4090. var args = new Array(arguments.length - 1);
  4091. if (arguments.length > 1) {
  4092. for (var i = 1; i < arguments.length; i++) {
  4093. args[i - 1] = arguments[i];
  4094. }
  4095. }
  4096. queue.push(new Item(fun, args));
  4097. if (queue.length === 1 && !draining) {
  4098. runTimeout(drainQueue);
  4099. }
  4100. };
  4101. function Item(fun, array) {
  4102. this.fun = fun;
  4103. this.array = array;
  4104. }
  4105. Item.prototype.run = function () {
  4106. this.fun.apply(null, this.array);
  4107. };
  4108. process.title = 'browser';
  4109. process.browser = true;
  4110. process.env = {};
  4111. process.argv = [];
  4112. process.version = '';
  4113. process.versions = {};
  4114. function noop() {}
  4115. process.on = noop;
  4116. process.addListener = noop;
  4117. process.once = noop;
  4118. process.off = noop;
  4119. process.removeListener = noop;
  4120. process.removeAllListeners = noop;
  4121. process.emit = noop;
  4122. process.prependListener = noop;
  4123. process.prependOnceListener = noop;
  4124. process.listeners = function (name) {
  4125. return [];
  4126. };
  4127. process.binding = function (name) {
  4128. throw new Error('process.binding is not supported');
  4129. };
  4130. process.cwd = function () {
  4131. return '/';
  4132. };
  4133. process.chdir = function (dir) {
  4134. throw new Error('process.chdir is not supported');
  4135. };
  4136. process.umask = function () {
  4137. return 0;
  4138. };
  4139. }, "/$$rollup_base$$/node_modules/process");
  4140. function isType$1(nodeType, targetType) {
  4141. if (nodeType === targetType) return true;
  4142. if (ALIAS_KEYS[targetType]) return false;
  4143. var aliases = FLIPPED_ALIAS_KEYS[targetType];
  4144. if (aliases) {
  4145. if (aliases[0] === nodeType) return true;
  4146. for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {
  4147. var alias = _step.value;
  4148. if (nodeType === alias) return true;
  4149. }
  4150. }
  4151. return false;
  4152. }
  4153. function isPlaceholderType(placeholderType, targetType) {
  4154. if (placeholderType === targetType) return true;
  4155. var aliases = PLACEHOLDERS_ALIAS[placeholderType];
  4156. if (aliases) {
  4157. for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {
  4158. var alias = _step.value;
  4159. if (targetType === alias) return true;
  4160. }
  4161. }
  4162. return false;
  4163. }
  4164. function is$1(type, node, opts) {
  4165. if (!node) return false;
  4166. var matches = isType$1(node.type, type);
  4167. if (!matches) {
  4168. if (!opts && node.type === "Placeholder" && type in FLIPPED_ALIAS_KEYS) {
  4169. return isPlaceholderType(node.expectedNode, type);
  4170. }
  4171. return false;
  4172. }
  4173. if (typeof opts === "undefined") {
  4174. return true;
  4175. } else {
  4176. return shallowEqual(node, opts);
  4177. }
  4178. }
  4179. var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
  4180. var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
  4181. var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
  4182. var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
  4183. nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
  4184. var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 107, 20, 28, 22, 13, 52, 76, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 230, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8952, 286, 50, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 2357, 44, 11, 6, 17, 0, 370, 43, 1301, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42717, 35, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
  4185. var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 419, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
  4186. function isInAstralSet(code, set) {
  4187. var pos = 0x10000;
  4188. for (var i = 0, length = set.length; i < length; i += 2) {
  4189. pos += set[i];
  4190. if (pos > code) return false;
  4191. pos += set[i + 1];
  4192. if (pos >= code) return true;
  4193. }
  4194. return false;
  4195. }
  4196. function isIdentifierStart(code) {
  4197. if (code < 65) return code === 36;
  4198. if (code <= 90) return true;
  4199. if (code < 97) return code === 95;
  4200. if (code <= 122) return true;
  4201. if (code <= 0xffff) {
  4202. return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
  4203. }
  4204. return isInAstralSet(code, astralIdentifierStartCodes);
  4205. }
  4206. function isIdentifierChar(code) {
  4207. if (code < 48) return code === 36;
  4208. if (code < 58) return true;
  4209. if (code < 65) return false;
  4210. if (code <= 90) return true;
  4211. if (code < 97) return code === 95;
  4212. if (code <= 122) return true;
  4213. if (code <= 0xffff) {
  4214. return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
  4215. }
  4216. return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
  4217. }
  4218. function isIdentifierName(name) {
  4219. var isFirst = true;
  4220. for (var i = 0; i < name.length; i++) {
  4221. var cp = name.charCodeAt(i);
  4222. if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
  4223. var trail = name.charCodeAt(++i);
  4224. if ((trail & 0xfc00) === 0xdc00) {
  4225. cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
  4226. }
  4227. }
  4228. if (isFirst) {
  4229. isFirst = false;
  4230. if (!isIdentifierStart(cp)) {
  4231. return false;
  4232. }
  4233. } else if (!isIdentifierChar(cp)) {
  4234. return false;
  4235. }
  4236. }
  4237. return !isFirst;
  4238. }
  4239. var reservedWords = {
  4240. keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
  4241. strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
  4242. strictBind: ["eval", "arguments"]
  4243. };
  4244. var keywords$1 = new Set(reservedWords.keyword);
  4245. var reservedWordsStrictSet = new Set(reservedWords.strict);
  4246. var reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
  4247. function isReservedWord(word, inModule) {
  4248. return inModule && word === "await" || word === "enum";
  4249. }
  4250. function isStrictReservedWord(word, inModule) {
  4251. return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
  4252. }
  4253. function isStrictBindOnlyReservedWord(word) {
  4254. return reservedWordsStrictBindSet.has(word);
  4255. }
  4256. function isStrictBindReservedWord(word, inModule) {
  4257. return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
  4258. }
  4259. function isKeyword(word) {
  4260. return keywords$1.has(word);
  4261. }
  4262. function isValidIdentifier(name, reserved) {
  4263. if (reserved === void 0) {
  4264. reserved = true;
  4265. }
  4266. if (typeof name !== "string") return false;
  4267. if (reserved) {
  4268. if (isKeyword(name) || isStrictReservedWord(name, true)) {
  4269. return false;
  4270. }
  4271. }
  4272. return isIdentifierName(name);
  4273. }
  4274. var STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
  4275. var FLATTENABLE_KEYS = ["body", "expressions"];
  4276. var FOR_INIT_KEYS = ["left", "init"];
  4277. var COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
  4278. var LOGICAL_OPERATORS = ["||", "&&", "??"];
  4279. var UPDATE_OPERATORS = ["++", "--"];
  4280. var BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
  4281. var EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
  4282. var COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, ["in", "instanceof"]);
  4283. var BOOLEAN_BINARY_OPERATORS = [].concat(_toConsumableArray(COMPARISON_BINARY_OPERATORS), BOOLEAN_NUMBER_BINARY_OPERATORS);
  4284. var NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
  4285. var BINARY_OPERATORS = ["+"].concat(NUMBER_BINARY_OPERATORS, _toConsumableArray(BOOLEAN_BINARY_OPERATORS));
  4286. var ASSIGNMENT_OPERATORS = ["=", "+="].concat(_toConsumableArray(NUMBER_BINARY_OPERATORS.map(function (op) {
  4287. return op + "=";
  4288. })), _toConsumableArray(LOGICAL_OPERATORS.map(function (op) {
  4289. return op + "=";
  4290. })));
  4291. var BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
  4292. var NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
  4293. var STRING_UNARY_OPERATORS = ["typeof"];
  4294. var UNARY_OPERATORS = ["void", "throw"].concat(BOOLEAN_UNARY_OPERATORS, NUMBER_UNARY_OPERATORS, STRING_UNARY_OPERATORS);
  4295. var INHERIT_KEYS = {
  4296. optional: ["typeAnnotation", "typeParameters", "returnType"],
  4297. force: ["start", "loc", "end"]
  4298. };
  4299. var BLOCK_SCOPED_SYMBOL = Symbol["for"]("var used to be block scoped");
  4300. var NOT_LOCAL_BINDING = Symbol["for"]("should not be considered a local binding");
  4301. function validate$3(node, key, val) {
  4302. if (!node) return;
  4303. var fields = NODE_FIELDS[node.type];
  4304. if (!fields) return;
  4305. var field = fields[key];
  4306. validateField(node, key, val, field);
  4307. validateChild(node, key, val);
  4308. }
  4309. function validateField(node, key, val, field) {
  4310. if (!(field != null && field.validate)) return;
  4311. if (field.optional && val == null) return;
  4312. field.validate(node, key, val);
  4313. }
  4314. function validateChild(node, key, val) {
  4315. if (val == null) return;
  4316. var validate = NODE_PARENT_VALIDATIONS[val.type];
  4317. if (!validate) return;
  4318. validate(node, key, val);
  4319. }
  4320. var VISITOR_KEYS = {};
  4321. var ALIAS_KEYS = {};
  4322. var FLIPPED_ALIAS_KEYS = {};
  4323. var NODE_FIELDS = {};
  4324. var BUILDER_KEYS = {};
  4325. var DEPRECATED_KEYS = {};
  4326. var NODE_PARENT_VALIDATIONS = {};
  4327. function getType$2(val) {
  4328. if (Array.isArray(val)) {
  4329. return "array";
  4330. } else if (val === null) {
  4331. return "null";
  4332. } else {
  4333. return typeof val;
  4334. }
  4335. }
  4336. function validate$2(validate) {
  4337. return {
  4338. validate: validate
  4339. };
  4340. }
  4341. function typeIs(typeName) {
  4342. return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType.apply(void 0, _toConsumableArray(typeName));
  4343. }
  4344. function validateType(typeName) {
  4345. return validate$2(typeIs(typeName));
  4346. }
  4347. function validateOptional(validate) {
  4348. return {
  4349. validate: validate,
  4350. optional: true
  4351. };
  4352. }
  4353. function validateOptionalType(typeName) {
  4354. return {
  4355. validate: typeIs(typeName),
  4356. optional: true
  4357. };
  4358. }
  4359. function arrayOf(elementType) {
  4360. return chain$1(assertValueType("array"), assertEach(elementType));
  4361. }
  4362. function arrayOfType(typeName) {
  4363. return arrayOf(typeIs(typeName));
  4364. }
  4365. function validateArrayOfType(typeName) {
  4366. return validate$2(arrayOfType(typeName));
  4367. }
  4368. function assertEach(callback) {
  4369. function validator(node, key, val) {
  4370. if (!Array.isArray(val)) return;
  4371. for (var i = 0; i < val.length; i++) {
  4372. var subkey = key + "[" + i + "]";
  4373. var v = val[i];
  4374. callback(node, subkey, v);
  4375. if (browser$6.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);
  4376. }
  4377. }
  4378. validator.each = callback;
  4379. return validator;
  4380. }
  4381. function assertOneOf() {
  4382. for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
  4383. values[_key] = arguments[_key];
  4384. }
  4385. function validate(node, key, val) {
  4386. if (values.indexOf(val) < 0) {
  4387. throw new TypeError("Property " + key + " expected value to be one of " + JSON.stringify(values) + " but got " + JSON.stringify(val));
  4388. }
  4389. }
  4390. validate.oneOf = values;
  4391. return validate;
  4392. }
  4393. function assertNodeType() {
  4394. for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  4395. types[_key2] = arguments[_key2];
  4396. }
  4397. function validate(node, key, val) {
  4398. for (var _iterator = _createForOfIteratorHelperLoose(types), _step; !(_step = _iterator()).done;) {
  4399. var type = _step.value;
  4400. if (is$1(type, val)) {
  4401. validateChild(node, key, val);
  4402. return;
  4403. }
  4404. }
  4405. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val == null ? void 0 : val.type));
  4406. }
  4407. validate.oneOfNodeTypes = types;
  4408. return validate;
  4409. }
  4410. function assertNodeOrValueType() {
  4411. for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  4412. types[_key3] = arguments[_key3];
  4413. }
  4414. function validate(node, key, val) {
  4415. for (var _iterator2 = _createForOfIteratorHelperLoose(types), _step2; !(_step2 = _iterator2()).done;) {
  4416. var type = _step2.value;
  4417. if (getType$2(val) === type || is$1(type, val)) {
  4418. validateChild(node, key, val);
  4419. return;
  4420. }
  4421. }
  4422. throw new TypeError("Property " + key + " of " + node.type + " expected node to be of a type " + JSON.stringify(types) + " but instead got " + JSON.stringify(val == null ? void 0 : val.type));
  4423. }
  4424. validate.oneOfNodeOrValueTypes = types;
  4425. return validate;
  4426. }
  4427. function assertValueType(type) {
  4428. function validate(node, key, val) {
  4429. var valid = getType$2(val) === type;
  4430. if (!valid) {
  4431. throw new TypeError("Property " + key + " expected type of " + type + " but got " + getType$2(val));
  4432. }
  4433. }
  4434. validate.type = type;
  4435. return validate;
  4436. }
  4437. function assertShape(shape) {
  4438. function validate(node, key, val) {
  4439. var errors = [];
  4440. for (var _i = 0, _Object$keys = Object.keys(shape); _i < _Object$keys.length; _i++) {
  4441. var property = _Object$keys[_i];
  4442. try {
  4443. validateField(node, property, val[property], shape[property]);
  4444. } catch (error) {
  4445. if (error instanceof TypeError) {
  4446. errors.push(error.message);
  4447. continue;
  4448. }
  4449. throw error;
  4450. }
  4451. }
  4452. if (errors.length) {
  4453. throw new TypeError("Property " + key + " of " + node.type + " expected to have the following:\n" + errors.join("\n"));
  4454. }
  4455. }
  4456. validate.shapeOf = shape;
  4457. return validate;
  4458. }
  4459. function assertOptionalChainStart() {
  4460. function validate(node) {
  4461. var _current2;
  4462. var current = node;
  4463. while (node) {
  4464. var _current = current,
  4465. type = _current.type;
  4466. if (type === "OptionalCallExpression") {
  4467. if (current.optional) return;
  4468. current = current.callee;
  4469. continue;
  4470. }
  4471. if (type === "OptionalMemberExpression") {
  4472. if (current.optional) return;
  4473. current = current.object;
  4474. continue;
  4475. }
  4476. break;
  4477. }
  4478. throw new TypeError("Non-optional " + node.type + " must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from " + ((_current2 = current) == null ? void 0 : _current2.type));
  4479. }
  4480. return validate;
  4481. }
  4482. function chain$1() {
  4483. for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  4484. fns[_key4] = arguments[_key4];
  4485. }
  4486. function validate() {
  4487. for (var _iterator3 = _createForOfIteratorHelperLoose(fns), _step3; !(_step3 = _iterator3()).done;) {
  4488. var fn = _step3.value;
  4489. fn.apply(void 0, arguments);
  4490. }
  4491. }
  4492. validate.chainOf = fns;
  4493. if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
  4494. throw new Error("An assertValueType(\"array\") validator can only be followed by an assertEach(...) validator.");
  4495. }
  4496. return validate;
  4497. }
  4498. var validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
  4499. var validFieldKeys = ["default", "optional", "validate"];
  4500. function defineType(type, opts) {
  4501. if (opts === void 0) {
  4502. opts = {};
  4503. }
  4504. var inherits = opts.inherits && store[opts.inherits] || {};
  4505. var fields = opts.fields;
  4506. if (!fields) {
  4507. fields = {};
  4508. if (inherits.fields) {
  4509. var keys = Object.getOwnPropertyNames(inherits.fields);
  4510. for (var _iterator4 = _createForOfIteratorHelperLoose(keys), _step4; !(_step4 = _iterator4()).done;) {
  4511. var _key5 = _step4.value;
  4512. var field = inherits.fields[_key5];
  4513. var def = field["default"];
  4514. if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
  4515. throw new Error("field defaults can only be primitives or empty arrays currently");
  4516. }
  4517. fields[_key5] = {
  4518. "default": Array.isArray(def) ? [] : def,
  4519. optional: field.optional,
  4520. validate: field.validate
  4521. };
  4522. }
  4523. }
  4524. }
  4525. var visitor = opts.visitor || inherits.visitor || [];
  4526. var aliases = opts.aliases || inherits.aliases || [];
  4527. var builder = opts.builder || inherits.builder || opts.visitor || [];
  4528. for (var _i2 = 0, _Object$keys2 = Object.keys(opts); _i2 < _Object$keys2.length; _i2++) {
  4529. var k = _Object$keys2[_i2];
  4530. if (validTypeOpts.indexOf(k) === -1) {
  4531. throw new Error("Unknown type option \"" + k + "\" on " + type);
  4532. }
  4533. }
  4534. if (opts.deprecatedAlias) {
  4535. DEPRECATED_KEYS[opts.deprecatedAlias] = type;
  4536. }
  4537. for (var _iterator5 = _createForOfIteratorHelperLoose(visitor.concat(builder)), _step5; !(_step5 = _iterator5()).done;) {
  4538. var _key7 = _step5.value;
  4539. fields[_key7] = fields[_key7] || {};
  4540. }
  4541. for (var _i3 = 0, _Object$keys3 = Object.keys(fields); _i3 < _Object$keys3.length; _i3++) {
  4542. var _key6 = _Object$keys3[_i3];
  4543. var _field = fields[_key6];
  4544. if (_field["default"] !== undefined && builder.indexOf(_key6) === -1) {
  4545. _field.optional = true;
  4546. }
  4547. if (_field["default"] === undefined) {
  4548. _field["default"] = null;
  4549. } else if (!_field.validate && _field["default"] != null) {
  4550. _field.validate = assertValueType(getType$2(_field["default"]));
  4551. }
  4552. for (var _i4 = 0, _Object$keys4 = Object.keys(_field); _i4 < _Object$keys4.length; _i4++) {
  4553. var _k = _Object$keys4[_i4];
  4554. if (validFieldKeys.indexOf(_k) === -1) {
  4555. throw new Error("Unknown field key \"" + _k + "\" on " + type + "." + _key6);
  4556. }
  4557. }
  4558. }
  4559. VISITOR_KEYS[type] = opts.visitor = visitor;
  4560. BUILDER_KEYS[type] = opts.builder = builder;
  4561. NODE_FIELDS[type] = opts.fields = fields;
  4562. ALIAS_KEYS[type] = opts.aliases = aliases;
  4563. aliases.forEach(function (alias) {
  4564. FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
  4565. FLIPPED_ALIAS_KEYS[alias].push(type);
  4566. });
  4567. if (opts.validate) {
  4568. NODE_PARENT_VALIDATIONS[type] = opts.validate;
  4569. }
  4570. store[type] = opts;
  4571. }
  4572. var store = {};
  4573. defineType("ArrayExpression", {
  4574. fields: {
  4575. elements: {
  4576. validate: chain$1(assertValueType("array"), assertEach(assertNodeOrValueType("null", "Expression", "SpreadElement"))),
  4577. "default": !browser$6.env.BABEL_TYPES_8_BREAKING ? [] : undefined
  4578. }
  4579. },
  4580. visitor: ["elements"],
  4581. aliases: ["Expression"]
  4582. });
  4583. defineType("AssignmentExpression", {
  4584. fields: {
  4585. operator: {
  4586. validate: function () {
  4587. if (!browser$6.env.BABEL_TYPES_8_BREAKING) {
  4588. return assertValueType("string");
  4589. }
  4590. var identifier = assertOneOf.apply(void 0, _toConsumableArray(ASSIGNMENT_OPERATORS));
  4591. var pattern = assertOneOf("=");
  4592. return function (node, key, val) {
  4593. var validator = is$1("Pattern", node.left) ? pattern : identifier;
  4594. validator(node, key, val);
  4595. };
  4596. }()
  4597. },
  4598. left: {
  4599. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  4600. },
  4601. right: {
  4602. validate: assertNodeType("Expression")
  4603. }
  4604. },
  4605. builder: ["operator", "left", "right"],
  4606. visitor: ["left", "right"],
  4607. aliases: ["Expression"]
  4608. });
  4609. defineType("BinaryExpression", {
  4610. builder: ["operator", "left", "right"],
  4611. fields: {
  4612. operator: {
  4613. validate: assertOneOf.apply(void 0, _toConsumableArray(BINARY_OPERATORS))
  4614. },
  4615. left: {
  4616. validate: function () {
  4617. var expression = assertNodeType("Expression");
  4618. var inOp = assertNodeType("Expression", "PrivateName");
  4619. var validator = function validator(node, key, val) {
  4620. var validator = node.operator === "in" ? inOp : expression;
  4621. validator(node, key, val);
  4622. };
  4623. validator.oneOfNodeTypes = ["Expression", "PrivateName"];
  4624. return validator;
  4625. }()
  4626. },
  4627. right: {
  4628. validate: assertNodeType("Expression")
  4629. }
  4630. },
  4631. visitor: ["left", "right"],
  4632. aliases: ["Binary", "Expression"]
  4633. });
  4634. defineType("InterpreterDirective", {
  4635. builder: ["value"],
  4636. fields: {
  4637. value: {
  4638. validate: assertValueType("string")
  4639. }
  4640. }
  4641. });
  4642. defineType("Directive", {
  4643. visitor: ["value"],
  4644. fields: {
  4645. value: {
  4646. validate: assertNodeType("DirectiveLiteral")
  4647. }
  4648. }
  4649. });
  4650. defineType("DirectiveLiteral", {
  4651. builder: ["value"],
  4652. fields: {
  4653. value: {
  4654. validate: assertValueType("string")
  4655. }
  4656. }
  4657. });
  4658. defineType("BlockStatement", {
  4659. builder: ["body", "directives"],
  4660. visitor: ["directives", "body"],
  4661. fields: {
  4662. directives: {
  4663. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Directive"))),
  4664. "default": []
  4665. },
  4666. body: {
  4667. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement")))
  4668. }
  4669. },
  4670. aliases: ["Scopable", "BlockParent", "Block", "Statement"]
  4671. });
  4672. defineType("BreakStatement", {
  4673. visitor: ["label"],
  4674. fields: {
  4675. label: {
  4676. validate: assertNodeType("Identifier"),
  4677. optional: true
  4678. }
  4679. },
  4680. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  4681. });
  4682. defineType("CallExpression", {
  4683. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  4684. builder: ["callee", "arguments"],
  4685. aliases: ["Expression"],
  4686. fields: Object.assign({
  4687. callee: {
  4688. validate: assertNodeType("Expression", "V8IntrinsicIdentifier")
  4689. },
  4690. arguments: {
  4691. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  4692. }
  4693. }, !browser$6.env.BABEL_TYPES_8_BREAKING ? {
  4694. optional: {
  4695. validate: assertOneOf(true, false),
  4696. optional: true
  4697. }
  4698. } : {}, {
  4699. typeArguments: {
  4700. validate: assertNodeType("TypeParameterInstantiation"),
  4701. optional: true
  4702. },
  4703. typeParameters: {
  4704. validate: assertNodeType("TSTypeParameterInstantiation"),
  4705. optional: true
  4706. }
  4707. })
  4708. });
  4709. defineType("CatchClause", {
  4710. visitor: ["param", "body"],
  4711. fields: {
  4712. param: {
  4713. validate: assertNodeType("Identifier", "ArrayPattern", "ObjectPattern"),
  4714. optional: true
  4715. },
  4716. body: {
  4717. validate: assertNodeType("BlockStatement")
  4718. }
  4719. },
  4720. aliases: ["Scopable", "BlockParent"]
  4721. });
  4722. defineType("ConditionalExpression", {
  4723. visitor: ["test", "consequent", "alternate"],
  4724. fields: {
  4725. test: {
  4726. validate: assertNodeType("Expression")
  4727. },
  4728. consequent: {
  4729. validate: assertNodeType("Expression")
  4730. },
  4731. alternate: {
  4732. validate: assertNodeType("Expression")
  4733. }
  4734. },
  4735. aliases: ["Expression", "Conditional"]
  4736. });
  4737. defineType("ContinueStatement", {
  4738. visitor: ["label"],
  4739. fields: {
  4740. label: {
  4741. validate: assertNodeType("Identifier"),
  4742. optional: true
  4743. }
  4744. },
  4745. aliases: ["Statement", "Terminatorless", "CompletionStatement"]
  4746. });
  4747. defineType("DebuggerStatement", {
  4748. aliases: ["Statement"]
  4749. });
  4750. defineType("DoWhileStatement", {
  4751. visitor: ["test", "body"],
  4752. fields: {
  4753. test: {
  4754. validate: assertNodeType("Expression")
  4755. },
  4756. body: {
  4757. validate: assertNodeType("Statement")
  4758. }
  4759. },
  4760. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
  4761. });
  4762. defineType("EmptyStatement", {
  4763. aliases: ["Statement"]
  4764. });
  4765. defineType("ExpressionStatement", {
  4766. visitor: ["expression"],
  4767. fields: {
  4768. expression: {
  4769. validate: assertNodeType("Expression")
  4770. }
  4771. },
  4772. aliases: ["Statement", "ExpressionWrapper"]
  4773. });
  4774. defineType("File", {
  4775. builder: ["program", "comments", "tokens"],
  4776. visitor: ["program"],
  4777. fields: {
  4778. program: {
  4779. validate: assertNodeType("Program")
  4780. },
  4781. comments: {
  4782. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? Object.assign(function () {}, {
  4783. each: {
  4784. oneOfNodeTypes: ["CommentBlock", "CommentLine"]
  4785. }
  4786. }) : assertEach(assertNodeType("CommentBlock", "CommentLine")),
  4787. optional: true
  4788. },
  4789. tokens: {
  4790. validate: assertEach(Object.assign(function () {}, {
  4791. type: "any"
  4792. })),
  4793. optional: true
  4794. }
  4795. }
  4796. });
  4797. defineType("ForInStatement", {
  4798. visitor: ["left", "right", "body"],
  4799. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  4800. fields: {
  4801. left: {
  4802. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertNodeType("VariableDeclaration", "LVal") : assertNodeType("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
  4803. },
  4804. right: {
  4805. validate: assertNodeType("Expression")
  4806. },
  4807. body: {
  4808. validate: assertNodeType("Statement")
  4809. }
  4810. }
  4811. });
  4812. defineType("ForStatement", {
  4813. visitor: ["init", "test", "update", "body"],
  4814. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
  4815. fields: {
  4816. init: {
  4817. validate: assertNodeType("VariableDeclaration", "Expression"),
  4818. optional: true
  4819. },
  4820. test: {
  4821. validate: assertNodeType("Expression"),
  4822. optional: true
  4823. },
  4824. update: {
  4825. validate: assertNodeType("Expression"),
  4826. optional: true
  4827. },
  4828. body: {
  4829. validate: assertNodeType("Statement")
  4830. }
  4831. }
  4832. });
  4833. var functionCommon = {
  4834. params: {
  4835. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Identifier", "Pattern", "RestElement")))
  4836. },
  4837. generator: {
  4838. "default": false
  4839. },
  4840. async: {
  4841. "default": false
  4842. }
  4843. };
  4844. var functionTypeAnnotationCommon = {
  4845. returnType: {
  4846. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  4847. optional: true
  4848. },
  4849. typeParameters: {
  4850. validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  4851. optional: true
  4852. }
  4853. };
  4854. var functionDeclarationCommon = Object.assign({}, functionCommon, {
  4855. declare: {
  4856. validate: assertValueType("boolean"),
  4857. optional: true
  4858. },
  4859. id: {
  4860. validate: assertNodeType("Identifier"),
  4861. optional: true
  4862. }
  4863. });
  4864. defineType("FunctionDeclaration", {
  4865. builder: ["id", "params", "body", "generator", "async"],
  4866. visitor: ["id", "params", "body", "returnType", "typeParameters"],
  4867. fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
  4868. body: {
  4869. validate: assertNodeType("BlockStatement")
  4870. }
  4871. }),
  4872. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
  4873. validate: function () {
  4874. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return function () {};
  4875. var identifier = assertNodeType("Identifier");
  4876. return function (parent, key, node) {
  4877. if (!is$1("ExportDefaultDeclaration", parent)) {
  4878. identifier(node, "id", node.id);
  4879. }
  4880. };
  4881. }()
  4882. });
  4883. defineType("FunctionExpression", {
  4884. inherits: "FunctionDeclaration",
  4885. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  4886. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  4887. id: {
  4888. validate: assertNodeType("Identifier"),
  4889. optional: true
  4890. },
  4891. body: {
  4892. validate: assertNodeType("BlockStatement")
  4893. }
  4894. })
  4895. });
  4896. var patternLikeCommon = {
  4897. typeAnnotation: {
  4898. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  4899. optional: true
  4900. },
  4901. decorators: {
  4902. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator")))
  4903. }
  4904. };
  4905. defineType("Identifier", {
  4906. builder: ["name"],
  4907. visitor: ["typeAnnotation", "decorators"],
  4908. aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
  4909. fields: Object.assign({}, patternLikeCommon, {
  4910. name: {
  4911. validate: chain$1(assertValueType("string"), Object.assign(function (node, key, val) {
  4912. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  4913. if (!isValidIdentifier(val, false)) {
  4914. throw new TypeError("\"" + val + "\" is not a valid identifier name");
  4915. }
  4916. }, {
  4917. type: "string"
  4918. }))
  4919. },
  4920. optional: {
  4921. validate: assertValueType("boolean"),
  4922. optional: true
  4923. }
  4924. }),
  4925. validate: function validate(parent, key, node) {
  4926. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  4927. var match = /\.(\w+)$/.exec(key);
  4928. if (!match) return;
  4929. var _match = _slicedToArray$2(match, 2),
  4930. parentKey = _match[1];
  4931. var nonComp = {
  4932. computed: false
  4933. };
  4934. if (parentKey === "property") {
  4935. if (is$1("MemberExpression", parent, nonComp)) return;
  4936. if (is$1("OptionalMemberExpression", parent, nonComp)) return;
  4937. } else if (parentKey === "key") {
  4938. if (is$1("Property", parent, nonComp)) return;
  4939. if (is$1("Method", parent, nonComp)) return;
  4940. } else if (parentKey === "exported") {
  4941. if (is$1("ExportSpecifier", parent)) return;
  4942. } else if (parentKey === "imported") {
  4943. if (is$1("ImportSpecifier", parent, {
  4944. imported: node
  4945. })) return;
  4946. } else if (parentKey === "meta") {
  4947. if (is$1("MetaProperty", parent, {
  4948. meta: node
  4949. })) return;
  4950. }
  4951. if ((isKeyword(node.name) || isReservedWord(node.name, false)) && node.name !== "this") {
  4952. throw new TypeError("\"" + node.name + "\" is not a valid identifier");
  4953. }
  4954. }
  4955. });
  4956. defineType("IfStatement", {
  4957. visitor: ["test", "consequent", "alternate"],
  4958. aliases: ["Statement", "Conditional"],
  4959. fields: {
  4960. test: {
  4961. validate: assertNodeType("Expression")
  4962. },
  4963. consequent: {
  4964. validate: assertNodeType("Statement")
  4965. },
  4966. alternate: {
  4967. optional: true,
  4968. validate: assertNodeType("Statement")
  4969. }
  4970. }
  4971. });
  4972. defineType("LabeledStatement", {
  4973. visitor: ["label", "body"],
  4974. aliases: ["Statement"],
  4975. fields: {
  4976. label: {
  4977. validate: assertNodeType("Identifier")
  4978. },
  4979. body: {
  4980. validate: assertNodeType("Statement")
  4981. }
  4982. }
  4983. });
  4984. defineType("StringLiteral", {
  4985. builder: ["value"],
  4986. fields: {
  4987. value: {
  4988. validate: assertValueType("string")
  4989. }
  4990. },
  4991. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  4992. });
  4993. defineType("NumericLiteral", {
  4994. builder: ["value"],
  4995. deprecatedAlias: "NumberLiteral",
  4996. fields: {
  4997. value: {
  4998. validate: assertValueType("number")
  4999. }
  5000. },
  5001. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5002. });
  5003. defineType("NullLiteral", {
  5004. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5005. });
  5006. defineType("BooleanLiteral", {
  5007. builder: ["value"],
  5008. fields: {
  5009. value: {
  5010. validate: assertValueType("boolean")
  5011. }
  5012. },
  5013. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5014. });
  5015. defineType("RegExpLiteral", {
  5016. builder: ["pattern", "flags"],
  5017. deprecatedAlias: "RegexLiteral",
  5018. aliases: ["Expression", "Pureish", "Literal"],
  5019. fields: {
  5020. pattern: {
  5021. validate: assertValueType("string")
  5022. },
  5023. flags: {
  5024. validate: chain$1(assertValueType("string"), Object.assign(function (node, key, val) {
  5025. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5026. var invalid = /[^gimsuy]/.exec(val);
  5027. if (invalid) {
  5028. throw new TypeError("\"" + invalid[0] + "\" is not a valid RegExp flag");
  5029. }
  5030. }, {
  5031. type: "string"
  5032. })),
  5033. "default": ""
  5034. }
  5035. }
  5036. });
  5037. defineType("LogicalExpression", {
  5038. builder: ["operator", "left", "right"],
  5039. visitor: ["left", "right"],
  5040. aliases: ["Binary", "Expression"],
  5041. fields: {
  5042. operator: {
  5043. validate: assertOneOf.apply(void 0, _toConsumableArray(LOGICAL_OPERATORS))
  5044. },
  5045. left: {
  5046. validate: assertNodeType("Expression")
  5047. },
  5048. right: {
  5049. validate: assertNodeType("Expression")
  5050. }
  5051. }
  5052. });
  5053. defineType("MemberExpression", {
  5054. builder: ["object", "property", "computed"].concat(_toConsumableArray(!browser$6.env.BABEL_TYPES_8_BREAKING ? ["optional"] : [])),
  5055. visitor: ["object", "property"],
  5056. aliases: ["Expression", "LVal"],
  5057. fields: Object.assign({
  5058. object: {
  5059. validate: assertNodeType("Expression")
  5060. },
  5061. property: {
  5062. validate: function () {
  5063. var normal = assertNodeType("Identifier", "PrivateName");
  5064. var computed = assertNodeType("Expression");
  5065. var validator = function validator(node, key, val) {
  5066. var validator = node.computed ? computed : normal;
  5067. validator(node, key, val);
  5068. };
  5069. validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
  5070. return validator;
  5071. }()
  5072. },
  5073. computed: {
  5074. "default": false
  5075. }
  5076. }, !browser$6.env.BABEL_TYPES_8_BREAKING ? {
  5077. optional: {
  5078. validate: assertOneOf(true, false),
  5079. optional: true
  5080. }
  5081. } : {})
  5082. });
  5083. defineType("NewExpression", {
  5084. inherits: "CallExpression"
  5085. });
  5086. defineType("Program", {
  5087. visitor: ["directives", "body"],
  5088. builder: ["body", "directives", "sourceType", "interpreter"],
  5089. fields: {
  5090. sourceFile: {
  5091. validate: assertValueType("string")
  5092. },
  5093. sourceType: {
  5094. validate: assertOneOf("script", "module"),
  5095. "default": "script"
  5096. },
  5097. interpreter: {
  5098. validate: assertNodeType("InterpreterDirective"),
  5099. "default": null,
  5100. optional: true
  5101. },
  5102. directives: {
  5103. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Directive"))),
  5104. "default": []
  5105. },
  5106. body: {
  5107. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement")))
  5108. }
  5109. },
  5110. aliases: ["Scopable", "BlockParent", "Block"]
  5111. });
  5112. defineType("ObjectExpression", {
  5113. visitor: ["properties"],
  5114. aliases: ["Expression"],
  5115. fields: {
  5116. properties: {
  5117. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ObjectMethod", "ObjectProperty", "SpreadElement")))
  5118. }
  5119. }
  5120. });
  5121. defineType("ObjectMethod", {
  5122. builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
  5123. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5124. kind: Object.assign({
  5125. validate: assertOneOf("method", "get", "set")
  5126. }, !browser$6.env.BABEL_TYPES_8_BREAKING ? {
  5127. "default": "method"
  5128. } : {}),
  5129. computed: {
  5130. "default": false
  5131. },
  5132. key: {
  5133. validate: function () {
  5134. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  5135. var computed = assertNodeType("Expression");
  5136. var validator = function validator(node, key, val) {
  5137. var validator = node.computed ? computed : normal;
  5138. validator(node, key, val);
  5139. };
  5140. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5141. return validator;
  5142. }()
  5143. },
  5144. decorators: {
  5145. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5146. optional: true
  5147. },
  5148. body: {
  5149. validate: assertNodeType("BlockStatement")
  5150. }
  5151. }),
  5152. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  5153. aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
  5154. });
  5155. defineType("ObjectProperty", {
  5156. builder: ["key", "value", "computed", "shorthand"].concat(_toConsumableArray(!browser$6.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])),
  5157. fields: {
  5158. computed: {
  5159. "default": false
  5160. },
  5161. key: {
  5162. validate: function () {
  5163. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  5164. var computed = assertNodeType("Expression");
  5165. var validator = function validator(node, key, val) {
  5166. var validator = node.computed ? computed : normal;
  5167. validator(node, key, val);
  5168. };
  5169. validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
  5170. return validator;
  5171. }()
  5172. },
  5173. value: {
  5174. validate: assertNodeType("Expression", "PatternLike")
  5175. },
  5176. shorthand: {
  5177. validate: chain$1(assertValueType("boolean"), Object.assign(function (node, key, val) {
  5178. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5179. if (val && node.computed) {
  5180. throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
  5181. }
  5182. }, {
  5183. type: "boolean"
  5184. }), function (node, key, val) {
  5185. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5186. if (val && !is$1("Identifier", node.key)) {
  5187. throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
  5188. }
  5189. }),
  5190. "default": false
  5191. },
  5192. decorators: {
  5193. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5194. optional: true
  5195. }
  5196. },
  5197. visitor: ["key", "value", "decorators"],
  5198. aliases: ["UserWhitespacable", "Property", "ObjectMember"],
  5199. validate: function () {
  5200. var pattern = assertNodeType("Identifier", "Pattern");
  5201. var expression = assertNodeType("Expression");
  5202. return function (parent, key, node) {
  5203. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5204. var validator = is$1("ObjectPattern", parent) ? pattern : expression;
  5205. validator(node, "value", node.value);
  5206. };
  5207. }()
  5208. });
  5209. defineType("RestElement", {
  5210. visitor: ["argument", "typeAnnotation"],
  5211. builder: ["argument"],
  5212. aliases: ["LVal", "PatternLike"],
  5213. deprecatedAlias: "RestProperty",
  5214. fields: Object.assign({}, patternLikeCommon, {
  5215. argument: {
  5216. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertNodeType("LVal") : assertNodeType("Identifier", "Pattern", "MemberExpression")
  5217. }
  5218. }),
  5219. validate: function validate(parent, key) {
  5220. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5221. var match = /(\w+)\[(\d+)\]/.exec(key);
  5222. if (!match) throw new Error("Internal Babel error: malformed key.");
  5223. var _match2 = _slicedToArray$2(match, 3),
  5224. listKey = _match2[1],
  5225. index = _match2[2];
  5226. if (parent[listKey].length > index + 1) {
  5227. throw new TypeError("RestElement must be last element of " + listKey);
  5228. }
  5229. }
  5230. });
  5231. defineType("ReturnStatement", {
  5232. visitor: ["argument"],
  5233. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5234. fields: {
  5235. argument: {
  5236. validate: assertNodeType("Expression"),
  5237. optional: true
  5238. }
  5239. }
  5240. });
  5241. defineType("SequenceExpression", {
  5242. visitor: ["expressions"],
  5243. fields: {
  5244. expressions: {
  5245. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression")))
  5246. }
  5247. },
  5248. aliases: ["Expression"]
  5249. });
  5250. defineType("ParenthesizedExpression", {
  5251. visitor: ["expression"],
  5252. aliases: ["Expression", "ExpressionWrapper"],
  5253. fields: {
  5254. expression: {
  5255. validate: assertNodeType("Expression")
  5256. }
  5257. }
  5258. });
  5259. defineType("SwitchCase", {
  5260. visitor: ["test", "consequent"],
  5261. fields: {
  5262. test: {
  5263. validate: assertNodeType("Expression"),
  5264. optional: true
  5265. },
  5266. consequent: {
  5267. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement")))
  5268. }
  5269. }
  5270. });
  5271. defineType("SwitchStatement", {
  5272. visitor: ["discriminant", "cases"],
  5273. aliases: ["Statement", "BlockParent", "Scopable"],
  5274. fields: {
  5275. discriminant: {
  5276. validate: assertNodeType("Expression")
  5277. },
  5278. cases: {
  5279. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("SwitchCase")))
  5280. }
  5281. }
  5282. });
  5283. defineType("ThisExpression", {
  5284. aliases: ["Expression"]
  5285. });
  5286. defineType("ThrowStatement", {
  5287. visitor: ["argument"],
  5288. aliases: ["Statement", "Terminatorless", "CompletionStatement"],
  5289. fields: {
  5290. argument: {
  5291. validate: assertNodeType("Expression")
  5292. }
  5293. }
  5294. });
  5295. defineType("TryStatement", {
  5296. visitor: ["block", "handler", "finalizer"],
  5297. aliases: ["Statement"],
  5298. fields: {
  5299. block: {
  5300. validate: chain$1(assertNodeType("BlockStatement"), Object.assign(function (node) {
  5301. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5302. if (!node.handler && !node.finalizer) {
  5303. throw new TypeError("TryStatement expects either a handler or finalizer, or both");
  5304. }
  5305. }, {
  5306. oneOfNodeTypes: ["BlockStatement"]
  5307. }))
  5308. },
  5309. handler: {
  5310. optional: true,
  5311. validate: assertNodeType("CatchClause")
  5312. },
  5313. finalizer: {
  5314. optional: true,
  5315. validate: assertNodeType("BlockStatement")
  5316. }
  5317. }
  5318. });
  5319. defineType("UnaryExpression", {
  5320. builder: ["operator", "argument", "prefix"],
  5321. fields: {
  5322. prefix: {
  5323. "default": true
  5324. },
  5325. argument: {
  5326. validate: assertNodeType("Expression")
  5327. },
  5328. operator: {
  5329. validate: assertOneOf.apply(void 0, _toConsumableArray(UNARY_OPERATORS))
  5330. }
  5331. },
  5332. visitor: ["argument"],
  5333. aliases: ["UnaryLike", "Expression"]
  5334. });
  5335. defineType("UpdateExpression", {
  5336. builder: ["operator", "argument", "prefix"],
  5337. fields: {
  5338. prefix: {
  5339. "default": false
  5340. },
  5341. argument: {
  5342. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertNodeType("Expression") : assertNodeType("Identifier", "MemberExpression")
  5343. },
  5344. operator: {
  5345. validate: assertOneOf.apply(void 0, _toConsumableArray(UPDATE_OPERATORS))
  5346. }
  5347. },
  5348. visitor: ["argument"],
  5349. aliases: ["Expression"]
  5350. });
  5351. defineType("VariableDeclaration", {
  5352. builder: ["kind", "declarations"],
  5353. visitor: ["declarations"],
  5354. aliases: ["Statement", "Declaration"],
  5355. fields: {
  5356. declare: {
  5357. validate: assertValueType("boolean"),
  5358. optional: true
  5359. },
  5360. kind: {
  5361. validate: assertOneOf("var", "let", "const")
  5362. },
  5363. declarations: {
  5364. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("VariableDeclarator")))
  5365. }
  5366. },
  5367. validate: function validate(parent, key, node) {
  5368. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5369. if (!is$1("ForXStatement", parent, {
  5370. left: node
  5371. })) return;
  5372. if (node.declarations.length !== 1) {
  5373. throw new TypeError("Exactly one VariableDeclarator is required in the VariableDeclaration of a " + parent.type);
  5374. }
  5375. }
  5376. });
  5377. defineType("VariableDeclarator", {
  5378. visitor: ["id", "init"],
  5379. fields: {
  5380. id: {
  5381. validate: function () {
  5382. if (!browser$6.env.BABEL_TYPES_8_BREAKING) {
  5383. return assertNodeType("LVal");
  5384. }
  5385. var normal = assertNodeType("Identifier", "ArrayPattern", "ObjectPattern");
  5386. var without = assertNodeType("Identifier");
  5387. return function (node, key, val) {
  5388. var validator = node.init ? normal : without;
  5389. validator(node, key, val);
  5390. };
  5391. }()
  5392. },
  5393. definite: {
  5394. optional: true,
  5395. validate: assertValueType("boolean")
  5396. },
  5397. init: {
  5398. optional: true,
  5399. validate: assertNodeType("Expression")
  5400. }
  5401. }
  5402. });
  5403. defineType("WhileStatement", {
  5404. visitor: ["test", "body"],
  5405. aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
  5406. fields: {
  5407. test: {
  5408. validate: assertNodeType("Expression")
  5409. },
  5410. body: {
  5411. validate: assertNodeType("Statement")
  5412. }
  5413. }
  5414. });
  5415. defineType("WithStatement", {
  5416. visitor: ["object", "body"],
  5417. aliases: ["Statement"],
  5418. fields: {
  5419. object: {
  5420. validate: assertNodeType("Expression")
  5421. },
  5422. body: {
  5423. validate: assertNodeType("Statement")
  5424. }
  5425. }
  5426. });
  5427. defineType("AssignmentPattern", {
  5428. visitor: ["left", "right", "decorators"],
  5429. builder: ["left", "right"],
  5430. aliases: ["Pattern", "PatternLike", "LVal"],
  5431. fields: Object.assign({}, patternLikeCommon, {
  5432. left: {
  5433. validate: assertNodeType("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
  5434. },
  5435. right: {
  5436. validate: assertNodeType("Expression")
  5437. },
  5438. decorators: {
  5439. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5440. optional: true
  5441. }
  5442. })
  5443. });
  5444. defineType("ArrayPattern", {
  5445. visitor: ["elements", "typeAnnotation"],
  5446. builder: ["elements"],
  5447. aliases: ["Pattern", "PatternLike", "LVal"],
  5448. fields: Object.assign({}, patternLikeCommon, {
  5449. elements: {
  5450. validate: chain$1(assertValueType("array"), assertEach(assertNodeOrValueType("null", "PatternLike")))
  5451. },
  5452. decorators: {
  5453. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5454. optional: true
  5455. }
  5456. })
  5457. });
  5458. defineType("ArrowFunctionExpression", {
  5459. builder: ["params", "body", "async"],
  5460. visitor: ["params", "body", "returnType", "typeParameters"],
  5461. aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
  5462. fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
  5463. expression: {
  5464. validate: assertValueType("boolean")
  5465. },
  5466. body: {
  5467. validate: assertNodeType("BlockStatement", "Expression")
  5468. }
  5469. })
  5470. });
  5471. defineType("ClassBody", {
  5472. visitor: ["body"],
  5473. fields: {
  5474. body: {
  5475. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature")))
  5476. }
  5477. }
  5478. });
  5479. defineType("ClassExpression", {
  5480. builder: ["id", "superClass", "body", "decorators"],
  5481. visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
  5482. aliases: ["Scopable", "Class", "Expression"],
  5483. fields: {
  5484. id: {
  5485. validate: assertNodeType("Identifier"),
  5486. optional: true
  5487. },
  5488. typeParameters: {
  5489. validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5490. optional: true
  5491. },
  5492. body: {
  5493. validate: assertNodeType("ClassBody")
  5494. },
  5495. superClass: {
  5496. optional: true,
  5497. validate: assertNodeType("Expression")
  5498. },
  5499. superTypeParameters: {
  5500. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5501. optional: true
  5502. },
  5503. "implements": {
  5504. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSExpressionWithTypeArguments", "ClassImplements"))),
  5505. optional: true
  5506. },
  5507. decorators: {
  5508. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5509. optional: true
  5510. },
  5511. mixins: {
  5512. validate: assertNodeType("InterfaceExtends"),
  5513. optional: true
  5514. }
  5515. }
  5516. });
  5517. defineType("ClassDeclaration", {
  5518. inherits: "ClassExpression",
  5519. aliases: ["Scopable", "Class", "Statement", "Declaration"],
  5520. fields: {
  5521. id: {
  5522. validate: assertNodeType("Identifier")
  5523. },
  5524. typeParameters: {
  5525. validate: assertNodeType("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
  5526. optional: true
  5527. },
  5528. body: {
  5529. validate: assertNodeType("ClassBody")
  5530. },
  5531. superClass: {
  5532. optional: true,
  5533. validate: assertNodeType("Expression")
  5534. },
  5535. superTypeParameters: {
  5536. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5537. optional: true
  5538. },
  5539. "implements": {
  5540. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSExpressionWithTypeArguments", "ClassImplements"))),
  5541. optional: true
  5542. },
  5543. decorators: {
  5544. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5545. optional: true
  5546. },
  5547. mixins: {
  5548. validate: assertNodeType("InterfaceExtends"),
  5549. optional: true
  5550. },
  5551. declare: {
  5552. validate: assertValueType("boolean"),
  5553. optional: true
  5554. },
  5555. "abstract": {
  5556. validate: assertValueType("boolean"),
  5557. optional: true
  5558. }
  5559. },
  5560. validate: function () {
  5561. var identifier = assertNodeType("Identifier");
  5562. return function (parent, key, node) {
  5563. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5564. if (!is$1("ExportDefaultDeclaration", parent)) {
  5565. identifier(node, "id", node.id);
  5566. }
  5567. };
  5568. }()
  5569. });
  5570. defineType("ExportAllDeclaration", {
  5571. visitor: ["source"],
  5572. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5573. fields: {
  5574. source: {
  5575. validate: assertNodeType("StringLiteral")
  5576. },
  5577. exportKind: validateOptional(assertOneOf("type", "value")),
  5578. assertions: {
  5579. optional: true,
  5580. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute")))
  5581. }
  5582. }
  5583. });
  5584. defineType("ExportDefaultDeclaration", {
  5585. visitor: ["declaration"],
  5586. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5587. fields: {
  5588. declaration: {
  5589. validate: assertNodeType("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
  5590. }
  5591. }
  5592. });
  5593. defineType("ExportNamedDeclaration", {
  5594. visitor: ["declaration", "specifiers", "source"],
  5595. aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
  5596. fields: {
  5597. declaration: {
  5598. optional: true,
  5599. validate: chain$1(assertNodeType("Declaration"), Object.assign(function (node, key, val) {
  5600. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5601. if (val && node.specifiers.length) {
  5602. throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
  5603. }
  5604. }, {
  5605. oneOfNodeTypes: ["Declaration"]
  5606. }), function (node, key, val) {
  5607. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5608. if (val && node.source) {
  5609. throw new TypeError("Cannot export a declaration from a source");
  5610. }
  5611. })
  5612. },
  5613. assertions: {
  5614. optional: true,
  5615. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute")))
  5616. },
  5617. specifiers: {
  5618. "default": [],
  5619. validate: chain$1(assertValueType("array"), assertEach(function () {
  5620. var sourced = assertNodeType("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
  5621. var sourceless = assertNodeType("ExportSpecifier");
  5622. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return sourced;
  5623. return function (node, key, val) {
  5624. var validator = node.source ? sourced : sourceless;
  5625. validator(node, key, val);
  5626. };
  5627. }()))
  5628. },
  5629. source: {
  5630. validate: assertNodeType("StringLiteral"),
  5631. optional: true
  5632. },
  5633. exportKind: validateOptional(assertOneOf("type", "value"))
  5634. }
  5635. });
  5636. defineType("ExportSpecifier", {
  5637. visitor: ["local", "exported"],
  5638. aliases: ["ModuleSpecifier"],
  5639. fields: {
  5640. local: {
  5641. validate: assertNodeType("Identifier")
  5642. },
  5643. exported: {
  5644. validate: assertNodeType("Identifier", "StringLiteral")
  5645. }
  5646. }
  5647. });
  5648. defineType("ForOfStatement", {
  5649. visitor: ["left", "right", "body"],
  5650. builder: ["left", "right", "body", "await"],
  5651. aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
  5652. fields: {
  5653. left: {
  5654. validate: function () {
  5655. if (!browser$6.env.BABEL_TYPES_8_BREAKING) {
  5656. return assertNodeType("VariableDeclaration", "LVal");
  5657. }
  5658. var declaration = assertNodeType("VariableDeclaration");
  5659. var lval = assertNodeType("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
  5660. return function (node, key, val) {
  5661. if (is$1("VariableDeclaration", val)) {
  5662. declaration(node, key, val);
  5663. } else {
  5664. lval(node, key, val);
  5665. }
  5666. };
  5667. }()
  5668. },
  5669. right: {
  5670. validate: assertNodeType("Expression")
  5671. },
  5672. body: {
  5673. validate: assertNodeType("Statement")
  5674. },
  5675. "await": {
  5676. "default": false
  5677. }
  5678. }
  5679. });
  5680. defineType("ImportDeclaration", {
  5681. visitor: ["specifiers", "source"],
  5682. aliases: ["Statement", "Declaration", "ModuleDeclaration"],
  5683. fields: {
  5684. assertions: {
  5685. optional: true,
  5686. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportAttribute")))
  5687. },
  5688. specifiers: {
  5689. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
  5690. },
  5691. source: {
  5692. validate: assertNodeType("StringLiteral")
  5693. },
  5694. importKind: {
  5695. validate: assertOneOf("type", "typeof", "value"),
  5696. optional: true
  5697. }
  5698. }
  5699. });
  5700. defineType("ImportDefaultSpecifier", {
  5701. visitor: ["local"],
  5702. aliases: ["ModuleSpecifier"],
  5703. fields: {
  5704. local: {
  5705. validate: assertNodeType("Identifier")
  5706. }
  5707. }
  5708. });
  5709. defineType("ImportNamespaceSpecifier", {
  5710. visitor: ["local"],
  5711. aliases: ["ModuleSpecifier"],
  5712. fields: {
  5713. local: {
  5714. validate: assertNodeType("Identifier")
  5715. }
  5716. }
  5717. });
  5718. defineType("ImportSpecifier", {
  5719. visitor: ["local", "imported"],
  5720. aliases: ["ModuleSpecifier"],
  5721. fields: {
  5722. local: {
  5723. validate: assertNodeType("Identifier")
  5724. },
  5725. imported: {
  5726. validate: assertNodeType("Identifier", "StringLiteral")
  5727. },
  5728. importKind: {
  5729. validate: assertOneOf("type", "typeof"),
  5730. optional: true
  5731. }
  5732. }
  5733. });
  5734. defineType("MetaProperty", {
  5735. visitor: ["meta", "property"],
  5736. aliases: ["Expression"],
  5737. fields: {
  5738. meta: {
  5739. validate: chain$1(assertNodeType("Identifier"), Object.assign(function (node, key, val) {
  5740. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5741. var property;
  5742. switch (val.name) {
  5743. case "function":
  5744. property = "sent";
  5745. break;
  5746. case "new":
  5747. property = "target";
  5748. break;
  5749. case "import":
  5750. property = "meta";
  5751. break;
  5752. }
  5753. if (!is$1("Identifier", node.property, {
  5754. name: property
  5755. })) {
  5756. throw new TypeError("Unrecognised MetaProperty");
  5757. }
  5758. }, {
  5759. oneOfNodeTypes: ["Identifier"]
  5760. }))
  5761. },
  5762. property: {
  5763. validate: assertNodeType("Identifier")
  5764. }
  5765. }
  5766. });
  5767. var classMethodOrPropertyCommon = {
  5768. "abstract": {
  5769. validate: assertValueType("boolean"),
  5770. optional: true
  5771. },
  5772. accessibility: {
  5773. validate: assertOneOf("public", "private", "protected"),
  5774. optional: true
  5775. },
  5776. "static": {
  5777. "default": false
  5778. },
  5779. override: {
  5780. "default": false
  5781. },
  5782. computed: {
  5783. "default": false
  5784. },
  5785. optional: {
  5786. validate: assertValueType("boolean"),
  5787. optional: true
  5788. },
  5789. key: {
  5790. validate: chain$1(function () {
  5791. var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral");
  5792. var computed = assertNodeType("Expression");
  5793. return function (node, key, val) {
  5794. var validator = node.computed ? computed : normal;
  5795. validator(node, key, val);
  5796. };
  5797. }(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
  5798. }
  5799. };
  5800. var classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
  5801. params: {
  5802. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
  5803. },
  5804. kind: {
  5805. validate: assertOneOf("get", "set", "method", "constructor"),
  5806. "default": "method"
  5807. },
  5808. access: {
  5809. validate: chain$1(assertValueType("string"), assertOneOf("public", "private", "protected")),
  5810. optional: true
  5811. },
  5812. decorators: {
  5813. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  5814. optional: true
  5815. }
  5816. });
  5817. defineType("ClassMethod", {
  5818. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
  5819. builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
  5820. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  5821. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  5822. body: {
  5823. validate: assertNodeType("BlockStatement")
  5824. }
  5825. })
  5826. });
  5827. defineType("ObjectPattern", {
  5828. visitor: ["properties", "typeAnnotation", "decorators"],
  5829. builder: ["properties"],
  5830. aliases: ["Pattern", "PatternLike", "LVal"],
  5831. fields: Object.assign({}, patternLikeCommon, {
  5832. properties: {
  5833. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("RestElement", "ObjectProperty")))
  5834. }
  5835. })
  5836. });
  5837. defineType("SpreadElement", {
  5838. visitor: ["argument"],
  5839. aliases: ["UnaryLike"],
  5840. deprecatedAlias: "SpreadProperty",
  5841. fields: {
  5842. argument: {
  5843. validate: assertNodeType("Expression")
  5844. }
  5845. }
  5846. });
  5847. defineType("Super", {
  5848. aliases: ["Expression"]
  5849. });
  5850. defineType("TaggedTemplateExpression", {
  5851. visitor: ["tag", "quasi"],
  5852. aliases: ["Expression"],
  5853. fields: {
  5854. tag: {
  5855. validate: assertNodeType("Expression")
  5856. },
  5857. quasi: {
  5858. validate: assertNodeType("TemplateLiteral")
  5859. },
  5860. typeParameters: {
  5861. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  5862. optional: true
  5863. }
  5864. }
  5865. });
  5866. defineType("TemplateElement", {
  5867. builder: ["value", "tail"],
  5868. fields: {
  5869. value: {
  5870. validate: assertShape({
  5871. raw: {
  5872. validate: assertValueType("string")
  5873. },
  5874. cooked: {
  5875. validate: assertValueType("string"),
  5876. optional: true
  5877. }
  5878. })
  5879. },
  5880. tail: {
  5881. "default": false
  5882. }
  5883. }
  5884. });
  5885. defineType("TemplateLiteral", {
  5886. visitor: ["quasis", "expressions"],
  5887. aliases: ["Expression", "Literal"],
  5888. fields: {
  5889. quasis: {
  5890. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TemplateElement")))
  5891. },
  5892. expressions: {
  5893. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "TSType")), function (node, key, val) {
  5894. if (node.quasis.length !== val.length + 1) {
  5895. throw new TypeError("Number of " + node.type + " quasis should be exactly one more than the number of expressions.\nExpected " + (val.length + 1) + " quasis but got " + node.quasis.length);
  5896. }
  5897. })
  5898. }
  5899. }
  5900. });
  5901. defineType("YieldExpression", {
  5902. builder: ["argument", "delegate"],
  5903. visitor: ["argument"],
  5904. aliases: ["Expression", "Terminatorless"],
  5905. fields: {
  5906. delegate: {
  5907. validate: chain$1(assertValueType("boolean"), Object.assign(function (node, key, val) {
  5908. if (!browser$6.env.BABEL_TYPES_8_BREAKING) return;
  5909. if (val && !node.argument) {
  5910. throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
  5911. }
  5912. }, {
  5913. type: "boolean"
  5914. })),
  5915. "default": false
  5916. },
  5917. argument: {
  5918. optional: true,
  5919. validate: assertNodeType("Expression")
  5920. }
  5921. }
  5922. });
  5923. defineType("AwaitExpression", {
  5924. builder: ["argument"],
  5925. visitor: ["argument"],
  5926. aliases: ["Expression", "Terminatorless"],
  5927. fields: {
  5928. argument: {
  5929. validate: assertNodeType("Expression")
  5930. }
  5931. }
  5932. });
  5933. defineType("Import", {
  5934. aliases: ["Expression"]
  5935. });
  5936. defineType("BigIntLiteral", {
  5937. builder: ["value"],
  5938. fields: {
  5939. value: {
  5940. validate: assertValueType("string")
  5941. }
  5942. },
  5943. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  5944. });
  5945. defineType("ExportNamespaceSpecifier", {
  5946. visitor: ["exported"],
  5947. aliases: ["ModuleSpecifier"],
  5948. fields: {
  5949. exported: {
  5950. validate: assertNodeType("Identifier")
  5951. }
  5952. }
  5953. });
  5954. defineType("OptionalMemberExpression", {
  5955. builder: ["object", "property", "computed", "optional"],
  5956. visitor: ["object", "property"],
  5957. aliases: ["Expression"],
  5958. fields: {
  5959. object: {
  5960. validate: assertNodeType("Expression")
  5961. },
  5962. property: {
  5963. validate: function () {
  5964. var normal = assertNodeType("Identifier");
  5965. var computed = assertNodeType("Expression");
  5966. var validator = function validator(node, key, val) {
  5967. var validator = node.computed ? computed : normal;
  5968. validator(node, key, val);
  5969. };
  5970. validator.oneOfNodeTypes = ["Expression", "Identifier"];
  5971. return validator;
  5972. }()
  5973. },
  5974. computed: {
  5975. "default": false
  5976. },
  5977. optional: {
  5978. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain$1(assertValueType("boolean"), assertOptionalChainStart())
  5979. }
  5980. }
  5981. });
  5982. defineType("OptionalCallExpression", {
  5983. visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
  5984. builder: ["callee", "arguments", "optional"],
  5985. aliases: ["Expression"],
  5986. fields: {
  5987. callee: {
  5988. validate: assertNodeType("Expression")
  5989. },
  5990. arguments: {
  5991. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
  5992. },
  5993. optional: {
  5994. validate: !browser$6.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain$1(assertValueType("boolean"), assertOptionalChainStart())
  5995. },
  5996. typeArguments: {
  5997. validate: assertNodeType("TypeParameterInstantiation"),
  5998. optional: true
  5999. },
  6000. typeParameters: {
  6001. validate: assertNodeType("TSTypeParameterInstantiation"),
  6002. optional: true
  6003. }
  6004. }
  6005. });
  6006. var defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) {
  6007. if (typeParameterType === void 0) {
  6008. typeParameterType = "TypeParameterDeclaration";
  6009. }
  6010. defineType(name, {
  6011. builder: ["id", "typeParameters", "extends", "body"],
  6012. visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
  6013. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6014. fields: {
  6015. id: validateType("Identifier"),
  6016. typeParameters: validateOptionalType(typeParameterType),
  6017. "extends": validateOptional(arrayOfType("InterfaceExtends")),
  6018. mixins: validateOptional(arrayOfType("InterfaceExtends")),
  6019. "implements": validateOptional(arrayOfType("ClassImplements")),
  6020. body: validateType("ObjectTypeAnnotation")
  6021. }
  6022. });
  6023. };
  6024. defineType("AnyTypeAnnotation", {
  6025. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6026. });
  6027. defineType("ArrayTypeAnnotation", {
  6028. visitor: ["elementType"],
  6029. aliases: ["Flow", "FlowType"],
  6030. fields: {
  6031. elementType: validateType("FlowType")
  6032. }
  6033. });
  6034. defineType("BooleanTypeAnnotation", {
  6035. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6036. });
  6037. defineType("BooleanLiteralTypeAnnotation", {
  6038. builder: ["value"],
  6039. aliases: ["Flow", "FlowType"],
  6040. fields: {
  6041. value: validate$2(assertValueType("boolean"))
  6042. }
  6043. });
  6044. defineType("NullLiteralTypeAnnotation", {
  6045. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6046. });
  6047. defineType("ClassImplements", {
  6048. visitor: ["id", "typeParameters"],
  6049. aliases: ["Flow"],
  6050. fields: {
  6051. id: validateType("Identifier"),
  6052. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6053. }
  6054. });
  6055. defineInterfaceishType("DeclareClass");
  6056. defineType("DeclareFunction", {
  6057. visitor: ["id"],
  6058. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6059. fields: {
  6060. id: validateType("Identifier"),
  6061. predicate: validateOptionalType("DeclaredPredicate")
  6062. }
  6063. });
  6064. defineInterfaceishType("DeclareInterface");
  6065. defineType("DeclareModule", {
  6066. builder: ["id", "body", "kind"],
  6067. visitor: ["id", "body"],
  6068. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6069. fields: {
  6070. id: validateType(["Identifier", "StringLiteral"]),
  6071. body: validateType("BlockStatement"),
  6072. kind: validateOptional(assertOneOf("CommonJS", "ES"))
  6073. }
  6074. });
  6075. defineType("DeclareModuleExports", {
  6076. visitor: ["typeAnnotation"],
  6077. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6078. fields: {
  6079. typeAnnotation: validateType("TypeAnnotation")
  6080. }
  6081. });
  6082. defineType("DeclareTypeAlias", {
  6083. visitor: ["id", "typeParameters", "right"],
  6084. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6085. fields: {
  6086. id: validateType("Identifier"),
  6087. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6088. right: validateType("FlowType")
  6089. }
  6090. });
  6091. defineType("DeclareOpaqueType", {
  6092. visitor: ["id", "typeParameters", "supertype"],
  6093. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6094. fields: {
  6095. id: validateType("Identifier"),
  6096. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6097. supertype: validateOptionalType("FlowType")
  6098. }
  6099. });
  6100. defineType("DeclareVariable", {
  6101. visitor: ["id"],
  6102. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6103. fields: {
  6104. id: validateType("Identifier")
  6105. }
  6106. });
  6107. defineType("DeclareExportDeclaration", {
  6108. visitor: ["declaration", "specifiers", "source"],
  6109. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6110. fields: {
  6111. declaration: validateOptionalType("Flow"),
  6112. specifiers: validateOptional(arrayOfType(["ExportSpecifier", "ExportNamespaceSpecifier"])),
  6113. source: validateOptionalType("StringLiteral"),
  6114. "default": validateOptional(assertValueType("boolean"))
  6115. }
  6116. });
  6117. defineType("DeclareExportAllDeclaration", {
  6118. visitor: ["source"],
  6119. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6120. fields: {
  6121. source: validateType("StringLiteral"),
  6122. exportKind: validateOptional(assertOneOf("type", "value"))
  6123. }
  6124. });
  6125. defineType("DeclaredPredicate", {
  6126. visitor: ["value"],
  6127. aliases: ["Flow", "FlowPredicate"],
  6128. fields: {
  6129. value: validateType("Flow")
  6130. }
  6131. });
  6132. defineType("ExistsTypeAnnotation", {
  6133. aliases: ["Flow", "FlowType"]
  6134. });
  6135. defineType("FunctionTypeAnnotation", {
  6136. visitor: ["typeParameters", "params", "rest", "returnType"],
  6137. aliases: ["Flow", "FlowType"],
  6138. fields: {
  6139. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6140. params: validate$2(arrayOfType("FunctionTypeParam")),
  6141. rest: validateOptionalType("FunctionTypeParam"),
  6142. "this": validateOptionalType("FunctionTypeParam"),
  6143. returnType: validateType("FlowType")
  6144. }
  6145. });
  6146. defineType("FunctionTypeParam", {
  6147. visitor: ["name", "typeAnnotation"],
  6148. aliases: ["Flow"],
  6149. fields: {
  6150. name: validateOptionalType("Identifier"),
  6151. typeAnnotation: validateType("FlowType"),
  6152. optional: validateOptional(assertValueType("boolean"))
  6153. }
  6154. });
  6155. defineType("GenericTypeAnnotation", {
  6156. visitor: ["id", "typeParameters"],
  6157. aliases: ["Flow", "FlowType"],
  6158. fields: {
  6159. id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
  6160. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6161. }
  6162. });
  6163. defineType("InferredPredicate", {
  6164. aliases: ["Flow", "FlowPredicate"]
  6165. });
  6166. defineType("InterfaceExtends", {
  6167. visitor: ["id", "typeParameters"],
  6168. aliases: ["Flow"],
  6169. fields: {
  6170. id: validateType(["Identifier", "QualifiedTypeIdentifier"]),
  6171. typeParameters: validateOptionalType("TypeParameterInstantiation")
  6172. }
  6173. });
  6174. defineInterfaceishType("InterfaceDeclaration");
  6175. defineType("InterfaceTypeAnnotation", {
  6176. visitor: ["extends", "body"],
  6177. aliases: ["Flow", "FlowType"],
  6178. fields: {
  6179. "extends": validateOptional(arrayOfType("InterfaceExtends")),
  6180. body: validateType("ObjectTypeAnnotation")
  6181. }
  6182. });
  6183. defineType("IntersectionTypeAnnotation", {
  6184. visitor: ["types"],
  6185. aliases: ["Flow", "FlowType"],
  6186. fields: {
  6187. types: validate$2(arrayOfType("FlowType"))
  6188. }
  6189. });
  6190. defineType("MixedTypeAnnotation", {
  6191. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6192. });
  6193. defineType("EmptyTypeAnnotation", {
  6194. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6195. });
  6196. defineType("NullableTypeAnnotation", {
  6197. visitor: ["typeAnnotation"],
  6198. aliases: ["Flow", "FlowType"],
  6199. fields: {
  6200. typeAnnotation: validateType("FlowType")
  6201. }
  6202. });
  6203. defineType("NumberLiteralTypeAnnotation", {
  6204. builder: ["value"],
  6205. aliases: ["Flow", "FlowType"],
  6206. fields: {
  6207. value: validate$2(assertValueType("number"))
  6208. }
  6209. });
  6210. defineType("NumberTypeAnnotation", {
  6211. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6212. });
  6213. defineType("ObjectTypeAnnotation", {
  6214. visitor: ["properties", "indexers", "callProperties", "internalSlots"],
  6215. aliases: ["Flow", "FlowType"],
  6216. builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
  6217. fields: {
  6218. properties: validate$2(arrayOfType(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
  6219. indexers: validateOptional(arrayOfType("ObjectTypeIndexer")),
  6220. callProperties: validateOptional(arrayOfType("ObjectTypeCallProperty")),
  6221. internalSlots: validateOptional(arrayOfType("ObjectTypeInternalSlot")),
  6222. exact: {
  6223. validate: assertValueType("boolean"),
  6224. "default": false
  6225. },
  6226. inexact: validateOptional(assertValueType("boolean"))
  6227. }
  6228. });
  6229. defineType("ObjectTypeInternalSlot", {
  6230. visitor: ["id", "value", "optional", "static", "method"],
  6231. aliases: ["Flow", "UserWhitespacable"],
  6232. fields: {
  6233. id: validateType("Identifier"),
  6234. value: validateType("FlowType"),
  6235. optional: validate$2(assertValueType("boolean")),
  6236. "static": validate$2(assertValueType("boolean")),
  6237. method: validate$2(assertValueType("boolean"))
  6238. }
  6239. });
  6240. defineType("ObjectTypeCallProperty", {
  6241. visitor: ["value"],
  6242. aliases: ["Flow", "UserWhitespacable"],
  6243. fields: {
  6244. value: validateType("FlowType"),
  6245. "static": validate$2(assertValueType("boolean"))
  6246. }
  6247. });
  6248. defineType("ObjectTypeIndexer", {
  6249. visitor: ["id", "key", "value", "variance"],
  6250. aliases: ["Flow", "UserWhitespacable"],
  6251. fields: {
  6252. id: validateOptionalType("Identifier"),
  6253. key: validateType("FlowType"),
  6254. value: validateType("FlowType"),
  6255. "static": validate$2(assertValueType("boolean")),
  6256. variance: validateOptionalType("Variance")
  6257. }
  6258. });
  6259. defineType("ObjectTypeProperty", {
  6260. visitor: ["key", "value", "variance"],
  6261. aliases: ["Flow", "UserWhitespacable"],
  6262. fields: {
  6263. key: validateType(["Identifier", "StringLiteral"]),
  6264. value: validateType("FlowType"),
  6265. kind: validate$2(assertOneOf("init", "get", "set")),
  6266. "static": validate$2(assertValueType("boolean")),
  6267. proto: validate$2(assertValueType("boolean")),
  6268. optional: validate$2(assertValueType("boolean")),
  6269. variance: validateOptionalType("Variance"),
  6270. method: validate$2(assertValueType("boolean"))
  6271. }
  6272. });
  6273. defineType("ObjectTypeSpreadProperty", {
  6274. visitor: ["argument"],
  6275. aliases: ["Flow", "UserWhitespacable"],
  6276. fields: {
  6277. argument: validateType("FlowType")
  6278. }
  6279. });
  6280. defineType("OpaqueType", {
  6281. visitor: ["id", "typeParameters", "supertype", "impltype"],
  6282. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6283. fields: {
  6284. id: validateType("Identifier"),
  6285. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6286. supertype: validateOptionalType("FlowType"),
  6287. impltype: validateType("FlowType")
  6288. }
  6289. });
  6290. defineType("QualifiedTypeIdentifier", {
  6291. visitor: ["id", "qualification"],
  6292. aliases: ["Flow"],
  6293. fields: {
  6294. id: validateType("Identifier"),
  6295. qualification: validateType(["Identifier", "QualifiedTypeIdentifier"])
  6296. }
  6297. });
  6298. defineType("StringLiteralTypeAnnotation", {
  6299. builder: ["value"],
  6300. aliases: ["Flow", "FlowType"],
  6301. fields: {
  6302. value: validate$2(assertValueType("string"))
  6303. }
  6304. });
  6305. defineType("StringTypeAnnotation", {
  6306. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6307. });
  6308. defineType("SymbolTypeAnnotation", {
  6309. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6310. });
  6311. defineType("ThisTypeAnnotation", {
  6312. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6313. });
  6314. defineType("TupleTypeAnnotation", {
  6315. visitor: ["types"],
  6316. aliases: ["Flow", "FlowType"],
  6317. fields: {
  6318. types: validate$2(arrayOfType("FlowType"))
  6319. }
  6320. });
  6321. defineType("TypeofTypeAnnotation", {
  6322. visitor: ["argument"],
  6323. aliases: ["Flow", "FlowType"],
  6324. fields: {
  6325. argument: validateType("FlowType")
  6326. }
  6327. });
  6328. defineType("TypeAlias", {
  6329. visitor: ["id", "typeParameters", "right"],
  6330. aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
  6331. fields: {
  6332. id: validateType("Identifier"),
  6333. typeParameters: validateOptionalType("TypeParameterDeclaration"),
  6334. right: validateType("FlowType")
  6335. }
  6336. });
  6337. defineType("TypeAnnotation", {
  6338. aliases: ["Flow"],
  6339. visitor: ["typeAnnotation"],
  6340. fields: {
  6341. typeAnnotation: validateType("FlowType")
  6342. }
  6343. });
  6344. defineType("TypeCastExpression", {
  6345. visitor: ["expression", "typeAnnotation"],
  6346. aliases: ["Flow", "ExpressionWrapper", "Expression"],
  6347. fields: {
  6348. expression: validateType("Expression"),
  6349. typeAnnotation: validateType("TypeAnnotation")
  6350. }
  6351. });
  6352. defineType("TypeParameter", {
  6353. aliases: ["Flow"],
  6354. visitor: ["bound", "default", "variance"],
  6355. fields: {
  6356. name: validate$2(assertValueType("string")),
  6357. bound: validateOptionalType("TypeAnnotation"),
  6358. "default": validateOptionalType("FlowType"),
  6359. variance: validateOptionalType("Variance")
  6360. }
  6361. });
  6362. defineType("TypeParameterDeclaration", {
  6363. aliases: ["Flow"],
  6364. visitor: ["params"],
  6365. fields: {
  6366. params: validate$2(arrayOfType("TypeParameter"))
  6367. }
  6368. });
  6369. defineType("TypeParameterInstantiation", {
  6370. aliases: ["Flow"],
  6371. visitor: ["params"],
  6372. fields: {
  6373. params: validate$2(arrayOfType("FlowType"))
  6374. }
  6375. });
  6376. defineType("UnionTypeAnnotation", {
  6377. visitor: ["types"],
  6378. aliases: ["Flow", "FlowType"],
  6379. fields: {
  6380. types: validate$2(arrayOfType("FlowType"))
  6381. }
  6382. });
  6383. defineType("Variance", {
  6384. aliases: ["Flow"],
  6385. builder: ["kind"],
  6386. fields: {
  6387. kind: validate$2(assertOneOf("minus", "plus"))
  6388. }
  6389. });
  6390. defineType("VoidTypeAnnotation", {
  6391. aliases: ["Flow", "FlowType", "FlowBaseAnnotation"]
  6392. });
  6393. defineType("EnumDeclaration", {
  6394. aliases: ["Statement", "Declaration"],
  6395. visitor: ["id", "body"],
  6396. fields: {
  6397. id: validateType("Identifier"),
  6398. body: validateType(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
  6399. }
  6400. });
  6401. defineType("EnumBooleanBody", {
  6402. aliases: ["EnumBody"],
  6403. visitor: ["members"],
  6404. fields: {
  6405. explicitType: validate$2(assertValueType("boolean")),
  6406. members: validateArrayOfType("EnumBooleanMember"),
  6407. hasUnknownMembers: validate$2(assertValueType("boolean"))
  6408. }
  6409. });
  6410. defineType("EnumNumberBody", {
  6411. aliases: ["EnumBody"],
  6412. visitor: ["members"],
  6413. fields: {
  6414. explicitType: validate$2(assertValueType("boolean")),
  6415. members: validateArrayOfType("EnumNumberMember"),
  6416. hasUnknownMembers: validate$2(assertValueType("boolean"))
  6417. }
  6418. });
  6419. defineType("EnumStringBody", {
  6420. aliases: ["EnumBody"],
  6421. visitor: ["members"],
  6422. fields: {
  6423. explicitType: validate$2(assertValueType("boolean")),
  6424. members: validateArrayOfType(["EnumStringMember", "EnumDefaultedMember"]),
  6425. hasUnknownMembers: validate$2(assertValueType("boolean"))
  6426. }
  6427. });
  6428. defineType("EnumSymbolBody", {
  6429. aliases: ["EnumBody"],
  6430. visitor: ["members"],
  6431. fields: {
  6432. members: validateArrayOfType("EnumDefaultedMember"),
  6433. hasUnknownMembers: validate$2(assertValueType("boolean"))
  6434. }
  6435. });
  6436. defineType("EnumBooleanMember", {
  6437. aliases: ["EnumMember"],
  6438. visitor: ["id"],
  6439. fields: {
  6440. id: validateType("Identifier"),
  6441. init: validateType("BooleanLiteral")
  6442. }
  6443. });
  6444. defineType("EnumNumberMember", {
  6445. aliases: ["EnumMember"],
  6446. visitor: ["id", "init"],
  6447. fields: {
  6448. id: validateType("Identifier"),
  6449. init: validateType("NumericLiteral")
  6450. }
  6451. });
  6452. defineType("EnumStringMember", {
  6453. aliases: ["EnumMember"],
  6454. visitor: ["id", "init"],
  6455. fields: {
  6456. id: validateType("Identifier"),
  6457. init: validateType("StringLiteral")
  6458. }
  6459. });
  6460. defineType("EnumDefaultedMember", {
  6461. aliases: ["EnumMember"],
  6462. visitor: ["id"],
  6463. fields: {
  6464. id: validateType("Identifier")
  6465. }
  6466. });
  6467. defineType("IndexedAccessType", {
  6468. visitor: ["objectType", "indexType"],
  6469. aliases: ["Flow", "FlowType"],
  6470. fields: {
  6471. objectType: validateType("FlowType"),
  6472. indexType: validateType("FlowType")
  6473. }
  6474. });
  6475. defineType("OptionalIndexedAccessType", {
  6476. visitor: ["objectType", "indexType"],
  6477. aliases: ["Flow", "FlowType"],
  6478. fields: {
  6479. objectType: validateType("FlowType"),
  6480. indexType: validateType("FlowType"),
  6481. optional: validate$2(assertValueType("boolean"))
  6482. }
  6483. });
  6484. defineType("JSXAttribute", {
  6485. visitor: ["name", "value"],
  6486. aliases: ["JSX", "Immutable"],
  6487. fields: {
  6488. name: {
  6489. validate: assertNodeType("JSXIdentifier", "JSXNamespacedName")
  6490. },
  6491. value: {
  6492. optional: true,
  6493. validate: assertNodeType("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
  6494. }
  6495. }
  6496. });
  6497. defineType("JSXClosingElement", {
  6498. visitor: ["name"],
  6499. aliases: ["JSX", "Immutable"],
  6500. fields: {
  6501. name: {
  6502. validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  6503. }
  6504. }
  6505. });
  6506. defineType("JSXElement", {
  6507. builder: ["openingElement", "closingElement", "children", "selfClosing"],
  6508. visitor: ["openingElement", "children", "closingElement"],
  6509. aliases: ["JSX", "Immutable", "Expression"],
  6510. fields: {
  6511. openingElement: {
  6512. validate: assertNodeType("JSXOpeningElement")
  6513. },
  6514. closingElement: {
  6515. optional: true,
  6516. validate: assertNodeType("JSXClosingElement")
  6517. },
  6518. children: {
  6519. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  6520. },
  6521. selfClosing: {
  6522. validate: assertValueType("boolean"),
  6523. optional: true
  6524. }
  6525. }
  6526. });
  6527. defineType("JSXEmptyExpression", {
  6528. aliases: ["JSX"]
  6529. });
  6530. defineType("JSXExpressionContainer", {
  6531. visitor: ["expression"],
  6532. aliases: ["JSX", "Immutable"],
  6533. fields: {
  6534. expression: {
  6535. validate: assertNodeType("Expression", "JSXEmptyExpression")
  6536. }
  6537. }
  6538. });
  6539. defineType("JSXSpreadChild", {
  6540. visitor: ["expression"],
  6541. aliases: ["JSX", "Immutable"],
  6542. fields: {
  6543. expression: {
  6544. validate: assertNodeType("Expression")
  6545. }
  6546. }
  6547. });
  6548. defineType("JSXIdentifier", {
  6549. builder: ["name"],
  6550. aliases: ["JSX"],
  6551. fields: {
  6552. name: {
  6553. validate: assertValueType("string")
  6554. }
  6555. }
  6556. });
  6557. defineType("JSXMemberExpression", {
  6558. visitor: ["object", "property"],
  6559. aliases: ["JSX"],
  6560. fields: {
  6561. object: {
  6562. validate: assertNodeType("JSXMemberExpression", "JSXIdentifier")
  6563. },
  6564. property: {
  6565. validate: assertNodeType("JSXIdentifier")
  6566. }
  6567. }
  6568. });
  6569. defineType("JSXNamespacedName", {
  6570. visitor: ["namespace", "name"],
  6571. aliases: ["JSX"],
  6572. fields: {
  6573. namespace: {
  6574. validate: assertNodeType("JSXIdentifier")
  6575. },
  6576. name: {
  6577. validate: assertNodeType("JSXIdentifier")
  6578. }
  6579. }
  6580. });
  6581. defineType("JSXOpeningElement", {
  6582. builder: ["name", "attributes", "selfClosing"],
  6583. visitor: ["name", "attributes"],
  6584. aliases: ["JSX", "Immutable"],
  6585. fields: {
  6586. name: {
  6587. validate: assertNodeType("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
  6588. },
  6589. selfClosing: {
  6590. "default": false
  6591. },
  6592. attributes: {
  6593. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXAttribute", "JSXSpreadAttribute")))
  6594. },
  6595. typeParameters: {
  6596. validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
  6597. optional: true
  6598. }
  6599. }
  6600. });
  6601. defineType("JSXSpreadAttribute", {
  6602. visitor: ["argument"],
  6603. aliases: ["JSX"],
  6604. fields: {
  6605. argument: {
  6606. validate: assertNodeType("Expression")
  6607. }
  6608. }
  6609. });
  6610. defineType("JSXText", {
  6611. aliases: ["JSX", "Immutable"],
  6612. builder: ["value"],
  6613. fields: {
  6614. value: {
  6615. validate: assertValueType("string")
  6616. }
  6617. }
  6618. });
  6619. defineType("JSXFragment", {
  6620. builder: ["openingFragment", "closingFragment", "children"],
  6621. visitor: ["openingFragment", "children", "closingFragment"],
  6622. aliases: ["JSX", "Immutable", "Expression"],
  6623. fields: {
  6624. openingFragment: {
  6625. validate: assertNodeType("JSXOpeningFragment")
  6626. },
  6627. closingFragment: {
  6628. validate: assertNodeType("JSXClosingFragment")
  6629. },
  6630. children: {
  6631. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
  6632. }
  6633. }
  6634. });
  6635. defineType("JSXOpeningFragment", {
  6636. aliases: ["JSX", "Immutable"]
  6637. });
  6638. defineType("JSXClosingFragment", {
  6639. aliases: ["JSX", "Immutable"]
  6640. });
  6641. var PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
  6642. var PLACEHOLDERS_ALIAS = {
  6643. Declaration: ["Statement"],
  6644. Pattern: ["PatternLike", "LVal"]
  6645. };
  6646. for (var _i$3 = 0, _PLACEHOLDERS = PLACEHOLDERS; _i$3 < _PLACEHOLDERS.length; _i$3++) {
  6647. var type$2 = _PLACEHOLDERS[_i$3];
  6648. var alias = ALIAS_KEYS[type$2];
  6649. if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type$2] = alias;
  6650. }
  6651. var PLACEHOLDERS_FLIPPED_ALIAS = {};
  6652. Object.keys(PLACEHOLDERS_ALIAS).forEach(function (type) {
  6653. PLACEHOLDERS_ALIAS[type].forEach(function (alias) {
  6654. if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
  6655. PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
  6656. }
  6657. PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
  6658. });
  6659. });
  6660. {
  6661. defineType("Noop", {
  6662. visitor: []
  6663. });
  6664. }
  6665. defineType("Placeholder", {
  6666. visitor: [],
  6667. builder: ["expectedNode", "name"],
  6668. fields: {
  6669. name: {
  6670. validate: assertNodeType("Identifier")
  6671. },
  6672. expectedNode: {
  6673. validate: assertOneOf.apply(void 0, _toConsumableArray(PLACEHOLDERS))
  6674. }
  6675. }
  6676. });
  6677. defineType("V8IntrinsicIdentifier", {
  6678. builder: ["name"],
  6679. fields: {
  6680. name: {
  6681. validate: assertValueType("string")
  6682. }
  6683. }
  6684. });
  6685. defineType("ArgumentPlaceholder", {});
  6686. defineType("BindExpression", {
  6687. visitor: ["object", "callee"],
  6688. aliases: ["Expression"],
  6689. fields: !browser$6.env.BABEL_TYPES_8_BREAKING ? {
  6690. object: {
  6691. validate: Object.assign(function () {}, {
  6692. oneOfNodeTypes: ["Expression"]
  6693. })
  6694. },
  6695. callee: {
  6696. validate: Object.assign(function () {}, {
  6697. oneOfNodeTypes: ["Expression"]
  6698. })
  6699. }
  6700. } : {
  6701. object: {
  6702. validate: assertNodeType("Expression")
  6703. },
  6704. callee: {
  6705. validate: assertNodeType("Expression")
  6706. }
  6707. }
  6708. });
  6709. defineType("ClassProperty", {
  6710. visitor: ["key", "value", "typeAnnotation", "decorators"],
  6711. builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
  6712. aliases: ["Property"],
  6713. fields: Object.assign({}, classMethodOrPropertyCommon, {
  6714. value: {
  6715. validate: assertNodeType("Expression"),
  6716. optional: true
  6717. },
  6718. definite: {
  6719. validate: assertValueType("boolean"),
  6720. optional: true
  6721. },
  6722. typeAnnotation: {
  6723. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6724. optional: true
  6725. },
  6726. decorators: {
  6727. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6728. optional: true
  6729. },
  6730. readonly: {
  6731. validate: assertValueType("boolean"),
  6732. optional: true
  6733. },
  6734. declare: {
  6735. validate: assertValueType("boolean"),
  6736. optional: true
  6737. }
  6738. })
  6739. });
  6740. defineType("PipelineTopicExpression", {
  6741. builder: ["expression"],
  6742. visitor: ["expression"],
  6743. fields: {
  6744. expression: {
  6745. validate: assertNodeType("Expression")
  6746. }
  6747. }
  6748. });
  6749. defineType("PipelineBareFunction", {
  6750. builder: ["callee"],
  6751. visitor: ["callee"],
  6752. fields: {
  6753. callee: {
  6754. validate: assertNodeType("Expression")
  6755. }
  6756. }
  6757. });
  6758. defineType("PipelinePrimaryTopicReference", {
  6759. aliases: ["Expression"]
  6760. });
  6761. defineType("ClassPrivateProperty", {
  6762. visitor: ["key", "value", "decorators"],
  6763. builder: ["key", "value", "decorators", "static"],
  6764. aliases: ["Property", "Private"],
  6765. fields: {
  6766. key: {
  6767. validate: assertNodeType("PrivateName")
  6768. },
  6769. value: {
  6770. validate: assertNodeType("Expression"),
  6771. optional: true
  6772. },
  6773. typeAnnotation: {
  6774. validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
  6775. optional: true
  6776. },
  6777. decorators: {
  6778. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Decorator"))),
  6779. optional: true
  6780. }
  6781. }
  6782. });
  6783. defineType("ClassPrivateMethod", {
  6784. builder: ["kind", "key", "params", "body", "static"],
  6785. visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
  6786. aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
  6787. fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
  6788. key: {
  6789. validate: assertNodeType("PrivateName")
  6790. },
  6791. body: {
  6792. validate: assertNodeType("BlockStatement")
  6793. }
  6794. })
  6795. });
  6796. defineType("ImportAttribute", {
  6797. visitor: ["key", "value"],
  6798. fields: {
  6799. key: {
  6800. validate: assertNodeType("Identifier", "StringLiteral")
  6801. },
  6802. value: {
  6803. validate: assertNodeType("StringLiteral")
  6804. }
  6805. }
  6806. });
  6807. defineType("Decorator", {
  6808. visitor: ["expression"],
  6809. fields: {
  6810. expression: {
  6811. validate: assertNodeType("Expression")
  6812. }
  6813. }
  6814. });
  6815. defineType("DoExpression", {
  6816. visitor: ["body"],
  6817. builder: ["body", "async"],
  6818. aliases: ["Expression"],
  6819. fields: {
  6820. body: {
  6821. validate: assertNodeType("BlockStatement")
  6822. },
  6823. async: {
  6824. validate: assertValueType("boolean"),
  6825. "default": false
  6826. }
  6827. }
  6828. });
  6829. defineType("ExportDefaultSpecifier", {
  6830. visitor: ["exported"],
  6831. aliases: ["ModuleSpecifier"],
  6832. fields: {
  6833. exported: {
  6834. validate: assertNodeType("Identifier")
  6835. }
  6836. }
  6837. });
  6838. defineType("PrivateName", {
  6839. visitor: ["id"],
  6840. aliases: ["Private"],
  6841. fields: {
  6842. id: {
  6843. validate: assertNodeType("Identifier")
  6844. }
  6845. }
  6846. });
  6847. defineType("RecordExpression", {
  6848. visitor: ["properties"],
  6849. aliases: ["Expression"],
  6850. fields: {
  6851. properties: {
  6852. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("ObjectProperty", "SpreadElement")))
  6853. }
  6854. }
  6855. });
  6856. defineType("TupleExpression", {
  6857. fields: {
  6858. elements: {
  6859. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Expression", "SpreadElement"))),
  6860. "default": []
  6861. }
  6862. },
  6863. visitor: ["elements"],
  6864. aliases: ["Expression"]
  6865. });
  6866. defineType("DecimalLiteral", {
  6867. builder: ["value"],
  6868. fields: {
  6869. value: {
  6870. validate: assertValueType("string")
  6871. }
  6872. },
  6873. aliases: ["Expression", "Pureish", "Literal", "Immutable"]
  6874. });
  6875. defineType("StaticBlock", {
  6876. visitor: ["body"],
  6877. fields: {
  6878. body: {
  6879. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("Statement")))
  6880. }
  6881. },
  6882. aliases: ["Scopable", "BlockParent"]
  6883. });
  6884. defineType("ModuleExpression", {
  6885. visitor: ["body"],
  6886. fields: {
  6887. body: {
  6888. validate: assertNodeType("Program")
  6889. }
  6890. },
  6891. aliases: ["Expression"]
  6892. });
  6893. var bool = assertValueType("boolean");
  6894. var tSFunctionTypeAnnotationCommon = {
  6895. returnType: {
  6896. validate: assertNodeType("TSTypeAnnotation", "Noop"),
  6897. optional: true
  6898. },
  6899. typeParameters: {
  6900. validate: assertNodeType("TSTypeParameterDeclaration", "Noop"),
  6901. optional: true
  6902. }
  6903. };
  6904. defineType("TSParameterProperty", {
  6905. aliases: ["LVal"],
  6906. visitor: ["parameter"],
  6907. fields: {
  6908. accessibility: {
  6909. validate: assertOneOf("public", "private", "protected"),
  6910. optional: true
  6911. },
  6912. readonly: {
  6913. validate: assertValueType("boolean"),
  6914. optional: true
  6915. },
  6916. parameter: {
  6917. validate: assertNodeType("Identifier", "AssignmentPattern")
  6918. }
  6919. }
  6920. });
  6921. defineType("TSDeclareFunction", {
  6922. aliases: ["Statement", "Declaration"],
  6923. visitor: ["id", "typeParameters", "params", "returnType"],
  6924. fields: Object.assign({}, functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
  6925. });
  6926. defineType("TSDeclareMethod", {
  6927. visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
  6928. fields: Object.assign({}, classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
  6929. });
  6930. defineType("TSQualifiedName", {
  6931. aliases: ["TSEntityName"],
  6932. visitor: ["left", "right"],
  6933. fields: {
  6934. left: validateType("TSEntityName"),
  6935. right: validateType("Identifier")
  6936. }
  6937. });
  6938. var signatureDeclarationCommon = {
  6939. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  6940. parameters: validateArrayOfType(["Identifier", "RestElement"]),
  6941. typeAnnotation: validateOptionalType("TSTypeAnnotation")
  6942. };
  6943. var callConstructSignatureDeclaration = {
  6944. aliases: ["TSTypeElement"],
  6945. visitor: ["typeParameters", "parameters", "typeAnnotation"],
  6946. fields: signatureDeclarationCommon
  6947. };
  6948. defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
  6949. defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
  6950. var namedTypeElementCommon = {
  6951. key: validateType("Expression"),
  6952. computed: validate$2(bool),
  6953. optional: validateOptional(bool)
  6954. };
  6955. defineType("TSPropertySignature", {
  6956. aliases: ["TSTypeElement"],
  6957. visitor: ["key", "typeAnnotation", "initializer"],
  6958. fields: Object.assign({}, namedTypeElementCommon, {
  6959. readonly: validateOptional(bool),
  6960. typeAnnotation: validateOptionalType("TSTypeAnnotation"),
  6961. initializer: validateOptionalType("Expression")
  6962. })
  6963. });
  6964. defineType("TSMethodSignature", {
  6965. aliases: ["TSTypeElement"],
  6966. visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
  6967. fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
  6968. kind: {
  6969. validate: assertOneOf("method", "get", "set")
  6970. }
  6971. })
  6972. });
  6973. defineType("TSIndexSignature", {
  6974. aliases: ["TSTypeElement"],
  6975. visitor: ["parameters", "typeAnnotation"],
  6976. fields: {
  6977. readonly: validateOptional(bool),
  6978. "static": validateOptional(bool),
  6979. parameters: validateArrayOfType("Identifier"),
  6980. typeAnnotation: validateOptionalType("TSTypeAnnotation")
  6981. }
  6982. });
  6983. var tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
  6984. for (var _i$2 = 0, _tsKeywordTypes = tsKeywordTypes; _i$2 < _tsKeywordTypes.length; _i$2++) {
  6985. var type$1 = _tsKeywordTypes[_i$2];
  6986. defineType(type$1, {
  6987. aliases: ["TSType", "TSBaseType"],
  6988. visitor: [],
  6989. fields: {}
  6990. });
  6991. }
  6992. defineType("TSThisType", {
  6993. aliases: ["TSType", "TSBaseType"],
  6994. visitor: [],
  6995. fields: {}
  6996. });
  6997. var fnOrCtrBase = {
  6998. aliases: ["TSType"],
  6999. visitor: ["typeParameters", "parameters", "typeAnnotation"]
  7000. };
  7001. defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, {
  7002. fields: signatureDeclarationCommon
  7003. }));
  7004. defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, {
  7005. fields: Object.assign({}, signatureDeclarationCommon, {
  7006. "abstract": validateOptional(bool)
  7007. })
  7008. }));
  7009. defineType("TSTypeReference", {
  7010. aliases: ["TSType"],
  7011. visitor: ["typeName", "typeParameters"],
  7012. fields: {
  7013. typeName: validateType("TSEntityName"),
  7014. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7015. }
  7016. });
  7017. defineType("TSTypePredicate", {
  7018. aliases: ["TSType"],
  7019. visitor: ["parameterName", "typeAnnotation"],
  7020. builder: ["parameterName", "typeAnnotation", "asserts"],
  7021. fields: {
  7022. parameterName: validateType(["Identifier", "TSThisType"]),
  7023. typeAnnotation: validateOptionalType("TSTypeAnnotation"),
  7024. asserts: validateOptional(bool)
  7025. }
  7026. });
  7027. defineType("TSTypeQuery", {
  7028. aliases: ["TSType"],
  7029. visitor: ["exprName"],
  7030. fields: {
  7031. exprName: validateType(["TSEntityName", "TSImportType"])
  7032. }
  7033. });
  7034. defineType("TSTypeLiteral", {
  7035. aliases: ["TSType"],
  7036. visitor: ["members"],
  7037. fields: {
  7038. members: validateArrayOfType("TSTypeElement")
  7039. }
  7040. });
  7041. defineType("TSArrayType", {
  7042. aliases: ["TSType"],
  7043. visitor: ["elementType"],
  7044. fields: {
  7045. elementType: validateType("TSType")
  7046. }
  7047. });
  7048. defineType("TSTupleType", {
  7049. aliases: ["TSType"],
  7050. visitor: ["elementTypes"],
  7051. fields: {
  7052. elementTypes: validateArrayOfType(["TSType", "TSNamedTupleMember"])
  7053. }
  7054. });
  7055. defineType("TSOptionalType", {
  7056. aliases: ["TSType"],
  7057. visitor: ["typeAnnotation"],
  7058. fields: {
  7059. typeAnnotation: validateType("TSType")
  7060. }
  7061. });
  7062. defineType("TSRestType", {
  7063. aliases: ["TSType"],
  7064. visitor: ["typeAnnotation"],
  7065. fields: {
  7066. typeAnnotation: validateType("TSType")
  7067. }
  7068. });
  7069. defineType("TSNamedTupleMember", {
  7070. visitor: ["label", "elementType"],
  7071. builder: ["label", "elementType", "optional"],
  7072. fields: {
  7073. label: validateType("Identifier"),
  7074. optional: {
  7075. validate: bool,
  7076. "default": false
  7077. },
  7078. elementType: validateType("TSType")
  7079. }
  7080. });
  7081. var unionOrIntersection = {
  7082. aliases: ["TSType"],
  7083. visitor: ["types"],
  7084. fields: {
  7085. types: validateArrayOfType("TSType")
  7086. }
  7087. };
  7088. defineType("TSUnionType", unionOrIntersection);
  7089. defineType("TSIntersectionType", unionOrIntersection);
  7090. defineType("TSConditionalType", {
  7091. aliases: ["TSType"],
  7092. visitor: ["checkType", "extendsType", "trueType", "falseType"],
  7093. fields: {
  7094. checkType: validateType("TSType"),
  7095. extendsType: validateType("TSType"),
  7096. trueType: validateType("TSType"),
  7097. falseType: validateType("TSType")
  7098. }
  7099. });
  7100. defineType("TSInferType", {
  7101. aliases: ["TSType"],
  7102. visitor: ["typeParameter"],
  7103. fields: {
  7104. typeParameter: validateType("TSTypeParameter")
  7105. }
  7106. });
  7107. defineType("TSParenthesizedType", {
  7108. aliases: ["TSType"],
  7109. visitor: ["typeAnnotation"],
  7110. fields: {
  7111. typeAnnotation: validateType("TSType")
  7112. }
  7113. });
  7114. defineType("TSTypeOperator", {
  7115. aliases: ["TSType"],
  7116. visitor: ["typeAnnotation"],
  7117. fields: {
  7118. operator: validate$2(assertValueType("string")),
  7119. typeAnnotation: validateType("TSType")
  7120. }
  7121. });
  7122. defineType("TSIndexedAccessType", {
  7123. aliases: ["TSType"],
  7124. visitor: ["objectType", "indexType"],
  7125. fields: {
  7126. objectType: validateType("TSType"),
  7127. indexType: validateType("TSType")
  7128. }
  7129. });
  7130. defineType("TSMappedType", {
  7131. aliases: ["TSType"],
  7132. visitor: ["typeParameter", "typeAnnotation", "nameType"],
  7133. fields: {
  7134. readonly: validateOptional(bool),
  7135. typeParameter: validateType("TSTypeParameter"),
  7136. optional: validateOptional(bool),
  7137. typeAnnotation: validateOptionalType("TSType"),
  7138. nameType: validateOptionalType("TSType")
  7139. }
  7140. });
  7141. defineType("TSLiteralType", {
  7142. aliases: ["TSType", "TSBaseType"],
  7143. visitor: ["literal"],
  7144. fields: {
  7145. literal: validateType(["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral"])
  7146. }
  7147. });
  7148. defineType("TSExpressionWithTypeArguments", {
  7149. aliases: ["TSType"],
  7150. visitor: ["expression", "typeParameters"],
  7151. fields: {
  7152. expression: validateType("TSEntityName"),
  7153. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7154. }
  7155. });
  7156. defineType("TSInterfaceDeclaration", {
  7157. aliases: ["Statement", "Declaration"],
  7158. visitor: ["id", "typeParameters", "extends", "body"],
  7159. fields: {
  7160. declare: validateOptional(bool),
  7161. id: validateType("Identifier"),
  7162. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  7163. "extends": validateOptional(arrayOfType("TSExpressionWithTypeArguments")),
  7164. body: validateType("TSInterfaceBody")
  7165. }
  7166. });
  7167. defineType("TSInterfaceBody", {
  7168. visitor: ["body"],
  7169. fields: {
  7170. body: validateArrayOfType("TSTypeElement")
  7171. }
  7172. });
  7173. defineType("TSTypeAliasDeclaration", {
  7174. aliases: ["Statement", "Declaration"],
  7175. visitor: ["id", "typeParameters", "typeAnnotation"],
  7176. fields: {
  7177. declare: validateOptional(bool),
  7178. id: validateType("Identifier"),
  7179. typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
  7180. typeAnnotation: validateType("TSType")
  7181. }
  7182. });
  7183. defineType("TSAsExpression", {
  7184. aliases: ["Expression"],
  7185. visitor: ["expression", "typeAnnotation"],
  7186. fields: {
  7187. expression: validateType("Expression"),
  7188. typeAnnotation: validateType("TSType")
  7189. }
  7190. });
  7191. defineType("TSTypeAssertion", {
  7192. aliases: ["Expression"],
  7193. visitor: ["typeAnnotation", "expression"],
  7194. fields: {
  7195. typeAnnotation: validateType("TSType"),
  7196. expression: validateType("Expression")
  7197. }
  7198. });
  7199. defineType("TSEnumDeclaration", {
  7200. aliases: ["Statement", "Declaration"],
  7201. visitor: ["id", "members"],
  7202. fields: {
  7203. declare: validateOptional(bool),
  7204. "const": validateOptional(bool),
  7205. id: validateType("Identifier"),
  7206. members: validateArrayOfType("TSEnumMember"),
  7207. initializer: validateOptionalType("Expression")
  7208. }
  7209. });
  7210. defineType("TSEnumMember", {
  7211. visitor: ["id", "initializer"],
  7212. fields: {
  7213. id: validateType(["Identifier", "StringLiteral"]),
  7214. initializer: validateOptionalType("Expression")
  7215. }
  7216. });
  7217. defineType("TSModuleDeclaration", {
  7218. aliases: ["Statement", "Declaration"],
  7219. visitor: ["id", "body"],
  7220. fields: {
  7221. declare: validateOptional(bool),
  7222. global: validateOptional(bool),
  7223. id: validateType(["Identifier", "StringLiteral"]),
  7224. body: validateType(["TSModuleBlock", "TSModuleDeclaration"])
  7225. }
  7226. });
  7227. defineType("TSModuleBlock", {
  7228. aliases: ["Scopable", "Block", "BlockParent"],
  7229. visitor: ["body"],
  7230. fields: {
  7231. body: validateArrayOfType("Statement")
  7232. }
  7233. });
  7234. defineType("TSImportType", {
  7235. aliases: ["TSType"],
  7236. visitor: ["argument", "qualifier", "typeParameters"],
  7237. fields: {
  7238. argument: validateType("StringLiteral"),
  7239. qualifier: validateOptionalType("TSEntityName"),
  7240. typeParameters: validateOptionalType("TSTypeParameterInstantiation")
  7241. }
  7242. });
  7243. defineType("TSImportEqualsDeclaration", {
  7244. aliases: ["Statement"],
  7245. visitor: ["id", "moduleReference"],
  7246. fields: {
  7247. isExport: validate$2(bool),
  7248. id: validateType("Identifier"),
  7249. moduleReference: validateType(["TSEntityName", "TSExternalModuleReference"])
  7250. }
  7251. });
  7252. defineType("TSExternalModuleReference", {
  7253. visitor: ["expression"],
  7254. fields: {
  7255. expression: validateType("StringLiteral")
  7256. }
  7257. });
  7258. defineType("TSNonNullExpression", {
  7259. aliases: ["Expression"],
  7260. visitor: ["expression"],
  7261. fields: {
  7262. expression: validateType("Expression")
  7263. }
  7264. });
  7265. defineType("TSExportAssignment", {
  7266. aliases: ["Statement"],
  7267. visitor: ["expression"],
  7268. fields: {
  7269. expression: validateType("Expression")
  7270. }
  7271. });
  7272. defineType("TSNamespaceExportDeclaration", {
  7273. aliases: ["Statement"],
  7274. visitor: ["id"],
  7275. fields: {
  7276. id: validateType("Identifier")
  7277. }
  7278. });
  7279. defineType("TSTypeAnnotation", {
  7280. visitor: ["typeAnnotation"],
  7281. fields: {
  7282. typeAnnotation: {
  7283. validate: assertNodeType("TSType")
  7284. }
  7285. }
  7286. });
  7287. defineType("TSTypeParameterInstantiation", {
  7288. visitor: ["params"],
  7289. fields: {
  7290. params: {
  7291. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSType")))
  7292. }
  7293. }
  7294. });
  7295. defineType("TSTypeParameterDeclaration", {
  7296. visitor: ["params"],
  7297. fields: {
  7298. params: {
  7299. validate: chain$1(assertValueType("array"), assertEach(assertNodeType("TSTypeParameter")))
  7300. }
  7301. }
  7302. });
  7303. defineType("TSTypeParameter", {
  7304. builder: ["constraint", "default", "name"],
  7305. visitor: ["constraint", "default"],
  7306. fields: {
  7307. name: {
  7308. validate: assertValueType("string")
  7309. },
  7310. constraint: {
  7311. validate: assertNodeType("TSType"),
  7312. optional: true
  7313. },
  7314. "default": {
  7315. validate: assertNodeType("TSType"),
  7316. optional: true
  7317. }
  7318. }
  7319. });
  7320. toFastProperties(VISITOR_KEYS);
  7321. toFastProperties(ALIAS_KEYS);
  7322. toFastProperties(FLIPPED_ALIAS_KEYS);
  7323. toFastProperties(NODE_FIELDS);
  7324. toFastProperties(BUILDER_KEYS);
  7325. toFastProperties(DEPRECATED_KEYS);
  7326. toFastProperties(PLACEHOLDERS_ALIAS);
  7327. toFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);
  7328. var TYPES = Object.keys(VISITOR_KEYS).concat(Object.keys(FLIPPED_ALIAS_KEYS)).concat(Object.keys(DEPRECATED_KEYS));
  7329. function builder(type) {
  7330. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  7331. args[_key - 1] = arguments[_key];
  7332. }
  7333. var keys = BUILDER_KEYS[type];
  7334. var countArgs = args.length;
  7335. if (countArgs > keys.length) {
  7336. throw new Error(type + ": Too many arguments passed. Received " + countArgs + " but can receive no more than " + keys.length);
  7337. }
  7338. var node = {
  7339. type: type
  7340. };
  7341. var i = 0;
  7342. keys.forEach(function (key) {
  7343. var field = NODE_FIELDS[type][key];
  7344. var arg;
  7345. if (i < countArgs) arg = args[i];
  7346. if (arg === undefined) {
  7347. arg = Array.isArray(field["default"]) ? [] : field["default"];
  7348. }
  7349. node[key] = arg;
  7350. i++;
  7351. });
  7352. for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {
  7353. var key = _Object$keys[_i];
  7354. validate$3(node, key, node[key]);
  7355. }
  7356. return node;
  7357. }
  7358. function arrayExpression(elements) {
  7359. return builder.apply(void 0, ["ArrayExpression"].concat(Array.prototype.slice.call(arguments)));
  7360. }
  7361. function assignmentExpression(operator, left, right) {
  7362. return builder.apply(void 0, ["AssignmentExpression"].concat(Array.prototype.slice.call(arguments)));
  7363. }
  7364. function binaryExpression(operator, left, right) {
  7365. return builder.apply(void 0, ["BinaryExpression"].concat(Array.prototype.slice.call(arguments)));
  7366. }
  7367. function interpreterDirective(value) {
  7368. return builder.apply(void 0, ["InterpreterDirective"].concat(Array.prototype.slice.call(arguments)));
  7369. }
  7370. function directive(value) {
  7371. return builder.apply(void 0, ["Directive"].concat(Array.prototype.slice.call(arguments)));
  7372. }
  7373. function directiveLiteral(value) {
  7374. return builder.apply(void 0, ["DirectiveLiteral"].concat(Array.prototype.slice.call(arguments)));
  7375. }
  7376. function blockStatement(body, directives) {
  7377. return builder.apply(void 0, ["BlockStatement"].concat(Array.prototype.slice.call(arguments)));
  7378. }
  7379. function breakStatement(label) {
  7380. return builder.apply(void 0, ["BreakStatement"].concat(Array.prototype.slice.call(arguments)));
  7381. }
  7382. function callExpression(callee, _arguments) {
  7383. return builder.apply(void 0, ["CallExpression"].concat(Array.prototype.slice.call(arguments)));
  7384. }
  7385. function catchClause(param, body) {
  7386. return builder.apply(void 0, ["CatchClause"].concat(Array.prototype.slice.call(arguments)));
  7387. }
  7388. function conditionalExpression(test, consequent, alternate) {
  7389. return builder.apply(void 0, ["ConditionalExpression"].concat(Array.prototype.slice.call(arguments)));
  7390. }
  7391. function continueStatement(label) {
  7392. return builder.apply(void 0, ["ContinueStatement"].concat(Array.prototype.slice.call(arguments)));
  7393. }
  7394. function debuggerStatement() {
  7395. return builder.apply(void 0, ["DebuggerStatement"].concat(Array.prototype.slice.call(arguments)));
  7396. }
  7397. function doWhileStatement(test, body) {
  7398. return builder.apply(void 0, ["DoWhileStatement"].concat(Array.prototype.slice.call(arguments)));
  7399. }
  7400. function emptyStatement() {
  7401. return builder.apply(void 0, ["EmptyStatement"].concat(Array.prototype.slice.call(arguments)));
  7402. }
  7403. function expressionStatement(expression) {
  7404. return builder.apply(void 0, ["ExpressionStatement"].concat(Array.prototype.slice.call(arguments)));
  7405. }
  7406. function file(program, comments, tokens) {
  7407. return builder.apply(void 0, ["File"].concat(Array.prototype.slice.call(arguments)));
  7408. }
  7409. function forInStatement(left, right, body) {
  7410. return builder.apply(void 0, ["ForInStatement"].concat(Array.prototype.slice.call(arguments)));
  7411. }
  7412. function forStatement(init, test, update, body) {
  7413. return builder.apply(void 0, ["ForStatement"].concat(Array.prototype.slice.call(arguments)));
  7414. }
  7415. function functionDeclaration(id, params, body, generator, async) {
  7416. return builder.apply(void 0, ["FunctionDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7417. }
  7418. function functionExpression(id, params, body, generator, async) {
  7419. return builder.apply(void 0, ["FunctionExpression"].concat(Array.prototype.slice.call(arguments)));
  7420. }
  7421. function identifier(name) {
  7422. return builder.apply(void 0, ["Identifier"].concat(Array.prototype.slice.call(arguments)));
  7423. }
  7424. function ifStatement(test, consequent, alternate) {
  7425. return builder.apply(void 0, ["IfStatement"].concat(Array.prototype.slice.call(arguments)));
  7426. }
  7427. function labeledStatement(label, body) {
  7428. return builder.apply(void 0, ["LabeledStatement"].concat(Array.prototype.slice.call(arguments)));
  7429. }
  7430. function stringLiteral(value) {
  7431. return builder.apply(void 0, ["StringLiteral"].concat(Array.prototype.slice.call(arguments)));
  7432. }
  7433. function numericLiteral(value) {
  7434. return builder.apply(void 0, ["NumericLiteral"].concat(Array.prototype.slice.call(arguments)));
  7435. }
  7436. function nullLiteral() {
  7437. return builder.apply(void 0, ["NullLiteral"].concat(Array.prototype.slice.call(arguments)));
  7438. }
  7439. function booleanLiteral(value) {
  7440. return builder.apply(void 0, ["BooleanLiteral"].concat(Array.prototype.slice.call(arguments)));
  7441. }
  7442. function regExpLiteral(pattern, flags) {
  7443. return builder.apply(void 0, ["RegExpLiteral"].concat(Array.prototype.slice.call(arguments)));
  7444. }
  7445. function logicalExpression(operator, left, right) {
  7446. return builder.apply(void 0, ["LogicalExpression"].concat(Array.prototype.slice.call(arguments)));
  7447. }
  7448. function memberExpression(object, property, computed, optional) {
  7449. return builder.apply(void 0, ["MemberExpression"].concat(Array.prototype.slice.call(arguments)));
  7450. }
  7451. function newExpression(callee, _arguments) {
  7452. return builder.apply(void 0, ["NewExpression"].concat(Array.prototype.slice.call(arguments)));
  7453. }
  7454. function program$2(body, directives, sourceType, interpreter) {
  7455. return builder.apply(void 0, ["Program"].concat(Array.prototype.slice.call(arguments)));
  7456. }
  7457. function objectExpression(properties) {
  7458. return builder.apply(void 0, ["ObjectExpression"].concat(Array.prototype.slice.call(arguments)));
  7459. }
  7460. function objectMethod(kind, key, params, body, computed, generator, async) {
  7461. return builder.apply(void 0, ["ObjectMethod"].concat(Array.prototype.slice.call(arguments)));
  7462. }
  7463. function objectProperty(key, value, computed, shorthand, decorators) {
  7464. return builder.apply(void 0, ["ObjectProperty"].concat(Array.prototype.slice.call(arguments)));
  7465. }
  7466. function restElement(argument) {
  7467. return builder.apply(void 0, ["RestElement"].concat(Array.prototype.slice.call(arguments)));
  7468. }
  7469. function returnStatement(argument) {
  7470. return builder.apply(void 0, ["ReturnStatement"].concat(Array.prototype.slice.call(arguments)));
  7471. }
  7472. function sequenceExpression(expressions) {
  7473. return builder.apply(void 0, ["SequenceExpression"].concat(Array.prototype.slice.call(arguments)));
  7474. }
  7475. function parenthesizedExpression(expression) {
  7476. return builder.apply(void 0, ["ParenthesizedExpression"].concat(Array.prototype.slice.call(arguments)));
  7477. }
  7478. function switchCase(test, consequent) {
  7479. return builder.apply(void 0, ["SwitchCase"].concat(Array.prototype.slice.call(arguments)));
  7480. }
  7481. function switchStatement(discriminant, cases) {
  7482. return builder.apply(void 0, ["SwitchStatement"].concat(Array.prototype.slice.call(arguments)));
  7483. }
  7484. function thisExpression() {
  7485. return builder.apply(void 0, ["ThisExpression"].concat(Array.prototype.slice.call(arguments)));
  7486. }
  7487. function throwStatement(argument) {
  7488. return builder.apply(void 0, ["ThrowStatement"].concat(Array.prototype.slice.call(arguments)));
  7489. }
  7490. function tryStatement(block, handler, finalizer) {
  7491. return builder.apply(void 0, ["TryStatement"].concat(Array.prototype.slice.call(arguments)));
  7492. }
  7493. function unaryExpression(operator, argument, prefix) {
  7494. return builder.apply(void 0, ["UnaryExpression"].concat(Array.prototype.slice.call(arguments)));
  7495. }
  7496. function updateExpression(operator, argument, prefix) {
  7497. return builder.apply(void 0, ["UpdateExpression"].concat(Array.prototype.slice.call(arguments)));
  7498. }
  7499. function variableDeclaration(kind, declarations) {
  7500. return builder.apply(void 0, ["VariableDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7501. }
  7502. function variableDeclarator(id, init) {
  7503. return builder.apply(void 0, ["VariableDeclarator"].concat(Array.prototype.slice.call(arguments)));
  7504. }
  7505. function whileStatement(test, body) {
  7506. return builder.apply(void 0, ["WhileStatement"].concat(Array.prototype.slice.call(arguments)));
  7507. }
  7508. function withStatement(object, body) {
  7509. return builder.apply(void 0, ["WithStatement"].concat(Array.prototype.slice.call(arguments)));
  7510. }
  7511. function assignmentPattern(left, right) {
  7512. return builder.apply(void 0, ["AssignmentPattern"].concat(Array.prototype.slice.call(arguments)));
  7513. }
  7514. function arrayPattern(elements) {
  7515. return builder.apply(void 0, ["ArrayPattern"].concat(Array.prototype.slice.call(arguments)));
  7516. }
  7517. function arrowFunctionExpression(params, body, async) {
  7518. return builder.apply(void 0, ["ArrowFunctionExpression"].concat(Array.prototype.slice.call(arguments)));
  7519. }
  7520. function classBody(body) {
  7521. return builder.apply(void 0, ["ClassBody"].concat(Array.prototype.slice.call(arguments)));
  7522. }
  7523. function classExpression(id, superClass, body, decorators) {
  7524. return builder.apply(void 0, ["ClassExpression"].concat(Array.prototype.slice.call(arguments)));
  7525. }
  7526. function classDeclaration(id, superClass, body, decorators) {
  7527. return builder.apply(void 0, ["ClassDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7528. }
  7529. function exportAllDeclaration(source) {
  7530. return builder.apply(void 0, ["ExportAllDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7531. }
  7532. function exportDefaultDeclaration(declaration) {
  7533. return builder.apply(void 0, ["ExportDefaultDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7534. }
  7535. function exportNamedDeclaration(declaration, specifiers, source) {
  7536. return builder.apply(void 0, ["ExportNamedDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7537. }
  7538. function exportSpecifier(local, exported) {
  7539. return builder.apply(void 0, ["ExportSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7540. }
  7541. function forOfStatement(left, right, body, _await) {
  7542. return builder.apply(void 0, ["ForOfStatement"].concat(Array.prototype.slice.call(arguments)));
  7543. }
  7544. function importDeclaration(specifiers, source) {
  7545. return builder.apply(void 0, ["ImportDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7546. }
  7547. function importDefaultSpecifier(local) {
  7548. return builder.apply(void 0, ["ImportDefaultSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7549. }
  7550. function importNamespaceSpecifier(local) {
  7551. return builder.apply(void 0, ["ImportNamespaceSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7552. }
  7553. function importSpecifier(local, imported) {
  7554. return builder.apply(void 0, ["ImportSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7555. }
  7556. function metaProperty(meta, property) {
  7557. return builder.apply(void 0, ["MetaProperty"].concat(Array.prototype.slice.call(arguments)));
  7558. }
  7559. function classMethod(kind, key, params, body, computed, _static, generator, async) {
  7560. return builder.apply(void 0, ["ClassMethod"].concat(Array.prototype.slice.call(arguments)));
  7561. }
  7562. function objectPattern(properties) {
  7563. return builder.apply(void 0, ["ObjectPattern"].concat(Array.prototype.slice.call(arguments)));
  7564. }
  7565. function spreadElement(argument) {
  7566. return builder.apply(void 0, ["SpreadElement"].concat(Array.prototype.slice.call(arguments)));
  7567. }
  7568. function _super() {
  7569. return builder.apply(void 0, ["Super"].concat(Array.prototype.slice.call(arguments)));
  7570. }
  7571. function taggedTemplateExpression(tag, quasi) {
  7572. return builder.apply(void 0, ["TaggedTemplateExpression"].concat(Array.prototype.slice.call(arguments)));
  7573. }
  7574. function templateElement(value, tail) {
  7575. return builder.apply(void 0, ["TemplateElement"].concat(Array.prototype.slice.call(arguments)));
  7576. }
  7577. function templateLiteral(quasis, expressions) {
  7578. return builder.apply(void 0, ["TemplateLiteral"].concat(Array.prototype.slice.call(arguments)));
  7579. }
  7580. function yieldExpression(argument, delegate) {
  7581. return builder.apply(void 0, ["YieldExpression"].concat(Array.prototype.slice.call(arguments)));
  7582. }
  7583. function awaitExpression(argument) {
  7584. return builder.apply(void 0, ["AwaitExpression"].concat(Array.prototype.slice.call(arguments)));
  7585. }
  7586. function _import() {
  7587. return builder.apply(void 0, ["Import"].concat(Array.prototype.slice.call(arguments)));
  7588. }
  7589. function bigIntLiteral(value) {
  7590. return builder.apply(void 0, ["BigIntLiteral"].concat(Array.prototype.slice.call(arguments)));
  7591. }
  7592. function exportNamespaceSpecifier(exported) {
  7593. return builder.apply(void 0, ["ExportNamespaceSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7594. }
  7595. function optionalMemberExpression(object, property, computed, optional) {
  7596. return builder.apply(void 0, ["OptionalMemberExpression"].concat(Array.prototype.slice.call(arguments)));
  7597. }
  7598. function optionalCallExpression(callee, _arguments, optional) {
  7599. return builder.apply(void 0, ["OptionalCallExpression"].concat(Array.prototype.slice.call(arguments)));
  7600. }
  7601. function anyTypeAnnotation() {
  7602. return builder.apply(void 0, ["AnyTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7603. }
  7604. function arrayTypeAnnotation(elementType) {
  7605. return builder.apply(void 0, ["ArrayTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7606. }
  7607. function booleanTypeAnnotation() {
  7608. return builder.apply(void 0, ["BooleanTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7609. }
  7610. function booleanLiteralTypeAnnotation(value) {
  7611. return builder.apply(void 0, ["BooleanLiteralTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7612. }
  7613. function nullLiteralTypeAnnotation() {
  7614. return builder.apply(void 0, ["NullLiteralTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7615. }
  7616. function classImplements(id, typeParameters) {
  7617. return builder.apply(void 0, ["ClassImplements"].concat(Array.prototype.slice.call(arguments)));
  7618. }
  7619. function declareClass(id, typeParameters, _extends, body) {
  7620. return builder.apply(void 0, ["DeclareClass"].concat(Array.prototype.slice.call(arguments)));
  7621. }
  7622. function declareFunction(id) {
  7623. return builder.apply(void 0, ["DeclareFunction"].concat(Array.prototype.slice.call(arguments)));
  7624. }
  7625. function declareInterface(id, typeParameters, _extends, body) {
  7626. return builder.apply(void 0, ["DeclareInterface"].concat(Array.prototype.slice.call(arguments)));
  7627. }
  7628. function declareModule(id, body, kind) {
  7629. return builder.apply(void 0, ["DeclareModule"].concat(Array.prototype.slice.call(arguments)));
  7630. }
  7631. function declareModuleExports(typeAnnotation) {
  7632. return builder.apply(void 0, ["DeclareModuleExports"].concat(Array.prototype.slice.call(arguments)));
  7633. }
  7634. function declareTypeAlias(id, typeParameters, right) {
  7635. return builder.apply(void 0, ["DeclareTypeAlias"].concat(Array.prototype.slice.call(arguments)));
  7636. }
  7637. function declareOpaqueType(id, typeParameters, supertype) {
  7638. return builder.apply(void 0, ["DeclareOpaqueType"].concat(Array.prototype.slice.call(arguments)));
  7639. }
  7640. function declareVariable(id) {
  7641. return builder.apply(void 0, ["DeclareVariable"].concat(Array.prototype.slice.call(arguments)));
  7642. }
  7643. function declareExportDeclaration(declaration, specifiers, source) {
  7644. return builder.apply(void 0, ["DeclareExportDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7645. }
  7646. function declareExportAllDeclaration(source) {
  7647. return builder.apply(void 0, ["DeclareExportAllDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7648. }
  7649. function declaredPredicate(value) {
  7650. return builder.apply(void 0, ["DeclaredPredicate"].concat(Array.prototype.slice.call(arguments)));
  7651. }
  7652. function existsTypeAnnotation() {
  7653. return builder.apply(void 0, ["ExistsTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7654. }
  7655. function functionTypeAnnotation(typeParameters, params, rest, returnType) {
  7656. return builder.apply(void 0, ["FunctionTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7657. }
  7658. function functionTypeParam(name, typeAnnotation) {
  7659. return builder.apply(void 0, ["FunctionTypeParam"].concat(Array.prototype.slice.call(arguments)));
  7660. }
  7661. function genericTypeAnnotation(id, typeParameters) {
  7662. return builder.apply(void 0, ["GenericTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7663. }
  7664. function inferredPredicate() {
  7665. return builder.apply(void 0, ["InferredPredicate"].concat(Array.prototype.slice.call(arguments)));
  7666. }
  7667. function interfaceExtends(id, typeParameters) {
  7668. return builder.apply(void 0, ["InterfaceExtends"].concat(Array.prototype.slice.call(arguments)));
  7669. }
  7670. function interfaceDeclaration(id, typeParameters, _extends, body) {
  7671. return builder.apply(void 0, ["InterfaceDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7672. }
  7673. function interfaceTypeAnnotation(_extends, body) {
  7674. return builder.apply(void 0, ["InterfaceTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7675. }
  7676. function intersectionTypeAnnotation(types) {
  7677. return builder.apply(void 0, ["IntersectionTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7678. }
  7679. function mixedTypeAnnotation() {
  7680. return builder.apply(void 0, ["MixedTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7681. }
  7682. function emptyTypeAnnotation() {
  7683. return builder.apply(void 0, ["EmptyTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7684. }
  7685. function nullableTypeAnnotation(typeAnnotation) {
  7686. return builder.apply(void 0, ["NullableTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7687. }
  7688. function numberLiteralTypeAnnotation(value) {
  7689. return builder.apply(void 0, ["NumberLiteralTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7690. }
  7691. function numberTypeAnnotation() {
  7692. return builder.apply(void 0, ["NumberTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7693. }
  7694. function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
  7695. return builder.apply(void 0, ["ObjectTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7696. }
  7697. function objectTypeInternalSlot(id, value, optional, _static, method) {
  7698. return builder.apply(void 0, ["ObjectTypeInternalSlot"].concat(Array.prototype.slice.call(arguments)));
  7699. }
  7700. function objectTypeCallProperty(value) {
  7701. return builder.apply(void 0, ["ObjectTypeCallProperty"].concat(Array.prototype.slice.call(arguments)));
  7702. }
  7703. function objectTypeIndexer(id, key, value, variance) {
  7704. return builder.apply(void 0, ["ObjectTypeIndexer"].concat(Array.prototype.slice.call(arguments)));
  7705. }
  7706. function objectTypeProperty(key, value, variance) {
  7707. return builder.apply(void 0, ["ObjectTypeProperty"].concat(Array.prototype.slice.call(arguments)));
  7708. }
  7709. function objectTypeSpreadProperty(argument) {
  7710. return builder.apply(void 0, ["ObjectTypeSpreadProperty"].concat(Array.prototype.slice.call(arguments)));
  7711. }
  7712. function opaqueType(id, typeParameters, supertype, impltype) {
  7713. return builder.apply(void 0, ["OpaqueType"].concat(Array.prototype.slice.call(arguments)));
  7714. }
  7715. function qualifiedTypeIdentifier(id, qualification) {
  7716. return builder.apply(void 0, ["QualifiedTypeIdentifier"].concat(Array.prototype.slice.call(arguments)));
  7717. }
  7718. function stringLiteralTypeAnnotation(value) {
  7719. return builder.apply(void 0, ["StringLiteralTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7720. }
  7721. function stringTypeAnnotation() {
  7722. return builder.apply(void 0, ["StringTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7723. }
  7724. function symbolTypeAnnotation() {
  7725. return builder.apply(void 0, ["SymbolTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7726. }
  7727. function thisTypeAnnotation() {
  7728. return builder.apply(void 0, ["ThisTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7729. }
  7730. function tupleTypeAnnotation(types) {
  7731. return builder.apply(void 0, ["TupleTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7732. }
  7733. function typeofTypeAnnotation(argument) {
  7734. return builder.apply(void 0, ["TypeofTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7735. }
  7736. function typeAlias(id, typeParameters, right) {
  7737. return builder.apply(void 0, ["TypeAlias"].concat(Array.prototype.slice.call(arguments)));
  7738. }
  7739. function typeAnnotation(typeAnnotation) {
  7740. return builder.apply(void 0, ["TypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7741. }
  7742. function typeCastExpression(expression, typeAnnotation) {
  7743. return builder.apply(void 0, ["TypeCastExpression"].concat(Array.prototype.slice.call(arguments)));
  7744. }
  7745. function typeParameter(bound, _default, variance) {
  7746. return builder.apply(void 0, ["TypeParameter"].concat(Array.prototype.slice.call(arguments)));
  7747. }
  7748. function typeParameterDeclaration(params) {
  7749. return builder.apply(void 0, ["TypeParameterDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7750. }
  7751. function typeParameterInstantiation(params) {
  7752. return builder.apply(void 0, ["TypeParameterInstantiation"].concat(Array.prototype.slice.call(arguments)));
  7753. }
  7754. function unionTypeAnnotation(types) {
  7755. return builder.apply(void 0, ["UnionTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7756. }
  7757. function variance(kind) {
  7758. return builder.apply(void 0, ["Variance"].concat(Array.prototype.slice.call(arguments)));
  7759. }
  7760. function voidTypeAnnotation() {
  7761. return builder.apply(void 0, ["VoidTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  7762. }
  7763. function enumDeclaration(id, body) {
  7764. return builder.apply(void 0, ["EnumDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7765. }
  7766. function enumBooleanBody(members) {
  7767. return builder.apply(void 0, ["EnumBooleanBody"].concat(Array.prototype.slice.call(arguments)));
  7768. }
  7769. function enumNumberBody(members) {
  7770. return builder.apply(void 0, ["EnumNumberBody"].concat(Array.prototype.slice.call(arguments)));
  7771. }
  7772. function enumStringBody(members) {
  7773. return builder.apply(void 0, ["EnumStringBody"].concat(Array.prototype.slice.call(arguments)));
  7774. }
  7775. function enumSymbolBody(members) {
  7776. return builder.apply(void 0, ["EnumSymbolBody"].concat(Array.prototype.slice.call(arguments)));
  7777. }
  7778. function enumBooleanMember(id) {
  7779. return builder.apply(void 0, ["EnumBooleanMember"].concat(Array.prototype.slice.call(arguments)));
  7780. }
  7781. function enumNumberMember(id, init) {
  7782. return builder.apply(void 0, ["EnumNumberMember"].concat(Array.prototype.slice.call(arguments)));
  7783. }
  7784. function enumStringMember(id, init) {
  7785. return builder.apply(void 0, ["EnumStringMember"].concat(Array.prototype.slice.call(arguments)));
  7786. }
  7787. function enumDefaultedMember(id) {
  7788. return builder.apply(void 0, ["EnumDefaultedMember"].concat(Array.prototype.slice.call(arguments)));
  7789. }
  7790. function indexedAccessType(objectType, indexType) {
  7791. return builder.apply(void 0, ["IndexedAccessType"].concat(Array.prototype.slice.call(arguments)));
  7792. }
  7793. function optionalIndexedAccessType(objectType, indexType) {
  7794. return builder.apply(void 0, ["OptionalIndexedAccessType"].concat(Array.prototype.slice.call(arguments)));
  7795. }
  7796. function jsxAttribute(name, value) {
  7797. return builder.apply(void 0, ["JSXAttribute"].concat(Array.prototype.slice.call(arguments)));
  7798. }
  7799. function jsxClosingElement(name) {
  7800. return builder.apply(void 0, ["JSXClosingElement"].concat(Array.prototype.slice.call(arguments)));
  7801. }
  7802. function jsxElement(openingElement, closingElement, children, selfClosing) {
  7803. return builder.apply(void 0, ["JSXElement"].concat(Array.prototype.slice.call(arguments)));
  7804. }
  7805. function jsxEmptyExpression() {
  7806. return builder.apply(void 0, ["JSXEmptyExpression"].concat(Array.prototype.slice.call(arguments)));
  7807. }
  7808. function jsxExpressionContainer(expression) {
  7809. return builder.apply(void 0, ["JSXExpressionContainer"].concat(Array.prototype.slice.call(arguments)));
  7810. }
  7811. function jsxSpreadChild(expression) {
  7812. return builder.apply(void 0, ["JSXSpreadChild"].concat(Array.prototype.slice.call(arguments)));
  7813. }
  7814. function jsxIdentifier(name) {
  7815. return builder.apply(void 0, ["JSXIdentifier"].concat(Array.prototype.slice.call(arguments)));
  7816. }
  7817. function jsxMemberExpression(object, property) {
  7818. return builder.apply(void 0, ["JSXMemberExpression"].concat(Array.prototype.slice.call(arguments)));
  7819. }
  7820. function jsxNamespacedName(namespace, name) {
  7821. return builder.apply(void 0, ["JSXNamespacedName"].concat(Array.prototype.slice.call(arguments)));
  7822. }
  7823. function jsxOpeningElement(name, attributes, selfClosing) {
  7824. return builder.apply(void 0, ["JSXOpeningElement"].concat(Array.prototype.slice.call(arguments)));
  7825. }
  7826. function jsxSpreadAttribute(argument) {
  7827. return builder.apply(void 0, ["JSXSpreadAttribute"].concat(Array.prototype.slice.call(arguments)));
  7828. }
  7829. function jsxText(value) {
  7830. return builder.apply(void 0, ["JSXText"].concat(Array.prototype.slice.call(arguments)));
  7831. }
  7832. function jsxFragment(openingFragment, closingFragment, children) {
  7833. return builder.apply(void 0, ["JSXFragment"].concat(Array.prototype.slice.call(arguments)));
  7834. }
  7835. function jsxOpeningFragment() {
  7836. return builder.apply(void 0, ["JSXOpeningFragment"].concat(Array.prototype.slice.call(arguments)));
  7837. }
  7838. function jsxClosingFragment() {
  7839. return builder.apply(void 0, ["JSXClosingFragment"].concat(Array.prototype.slice.call(arguments)));
  7840. }
  7841. function noop$1() {
  7842. return builder.apply(void 0, ["Noop"].concat(Array.prototype.slice.call(arguments)));
  7843. }
  7844. function placeholder(expectedNode, name) {
  7845. return builder.apply(void 0, ["Placeholder"].concat(Array.prototype.slice.call(arguments)));
  7846. }
  7847. function v8IntrinsicIdentifier(name) {
  7848. return builder.apply(void 0, ["V8IntrinsicIdentifier"].concat(Array.prototype.slice.call(arguments)));
  7849. }
  7850. function argumentPlaceholder() {
  7851. return builder.apply(void 0, ["ArgumentPlaceholder"].concat(Array.prototype.slice.call(arguments)));
  7852. }
  7853. function bindExpression(object, callee) {
  7854. return builder.apply(void 0, ["BindExpression"].concat(Array.prototype.slice.call(arguments)));
  7855. }
  7856. function classProperty(key, value, typeAnnotation, decorators, computed, _static) {
  7857. return builder.apply(void 0, ["ClassProperty"].concat(Array.prototype.slice.call(arguments)));
  7858. }
  7859. function pipelineTopicExpression(expression) {
  7860. return builder.apply(void 0, ["PipelineTopicExpression"].concat(Array.prototype.slice.call(arguments)));
  7861. }
  7862. function pipelineBareFunction(callee) {
  7863. return builder.apply(void 0, ["PipelineBareFunction"].concat(Array.prototype.slice.call(arguments)));
  7864. }
  7865. function pipelinePrimaryTopicReference() {
  7866. return builder.apply(void 0, ["PipelinePrimaryTopicReference"].concat(Array.prototype.slice.call(arguments)));
  7867. }
  7868. function classPrivateProperty(key, value, decorators, _static) {
  7869. return builder.apply(void 0, ["ClassPrivateProperty"].concat(Array.prototype.slice.call(arguments)));
  7870. }
  7871. function classPrivateMethod(kind, key, params, body, _static) {
  7872. return builder.apply(void 0, ["ClassPrivateMethod"].concat(Array.prototype.slice.call(arguments)));
  7873. }
  7874. function importAttribute(key, value) {
  7875. return builder.apply(void 0, ["ImportAttribute"].concat(Array.prototype.slice.call(arguments)));
  7876. }
  7877. function decorator(expression) {
  7878. return builder.apply(void 0, ["Decorator"].concat(Array.prototype.slice.call(arguments)));
  7879. }
  7880. function doExpression(body, async) {
  7881. return builder.apply(void 0, ["DoExpression"].concat(Array.prototype.slice.call(arguments)));
  7882. }
  7883. function exportDefaultSpecifier(exported) {
  7884. return builder.apply(void 0, ["ExportDefaultSpecifier"].concat(Array.prototype.slice.call(arguments)));
  7885. }
  7886. function privateName(id) {
  7887. return builder.apply(void 0, ["PrivateName"].concat(Array.prototype.slice.call(arguments)));
  7888. }
  7889. function recordExpression(properties) {
  7890. return builder.apply(void 0, ["RecordExpression"].concat(Array.prototype.slice.call(arguments)));
  7891. }
  7892. function tupleExpression(elements) {
  7893. return builder.apply(void 0, ["TupleExpression"].concat(Array.prototype.slice.call(arguments)));
  7894. }
  7895. function decimalLiteral(value) {
  7896. return builder.apply(void 0, ["DecimalLiteral"].concat(Array.prototype.slice.call(arguments)));
  7897. }
  7898. function staticBlock(body) {
  7899. return builder.apply(void 0, ["StaticBlock"].concat(Array.prototype.slice.call(arguments)));
  7900. }
  7901. function moduleExpression(body) {
  7902. return builder.apply(void 0, ["ModuleExpression"].concat(Array.prototype.slice.call(arguments)));
  7903. }
  7904. function tsParameterProperty(parameter) {
  7905. return builder.apply(void 0, ["TSParameterProperty"].concat(Array.prototype.slice.call(arguments)));
  7906. }
  7907. function tsDeclareFunction(id, typeParameters, params, returnType) {
  7908. return builder.apply(void 0, ["TSDeclareFunction"].concat(Array.prototype.slice.call(arguments)));
  7909. }
  7910. function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
  7911. return builder.apply(void 0, ["TSDeclareMethod"].concat(Array.prototype.slice.call(arguments)));
  7912. }
  7913. function tsQualifiedName(left, right) {
  7914. return builder.apply(void 0, ["TSQualifiedName"].concat(Array.prototype.slice.call(arguments)));
  7915. }
  7916. function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) {
  7917. return builder.apply(void 0, ["TSCallSignatureDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7918. }
  7919. function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) {
  7920. return builder.apply(void 0, ["TSConstructSignatureDeclaration"].concat(Array.prototype.slice.call(arguments)));
  7921. }
  7922. function tsPropertySignature(key, typeAnnotation, initializer) {
  7923. return builder.apply(void 0, ["TSPropertySignature"].concat(Array.prototype.slice.call(arguments)));
  7924. }
  7925. function tsMethodSignature(key, typeParameters, parameters, typeAnnotation) {
  7926. return builder.apply(void 0, ["TSMethodSignature"].concat(Array.prototype.slice.call(arguments)));
  7927. }
  7928. function tsIndexSignature(parameters, typeAnnotation) {
  7929. return builder.apply(void 0, ["TSIndexSignature"].concat(Array.prototype.slice.call(arguments)));
  7930. }
  7931. function tsAnyKeyword() {
  7932. return builder.apply(void 0, ["TSAnyKeyword"].concat(Array.prototype.slice.call(arguments)));
  7933. }
  7934. function tsBooleanKeyword() {
  7935. return builder.apply(void 0, ["TSBooleanKeyword"].concat(Array.prototype.slice.call(arguments)));
  7936. }
  7937. function tsBigIntKeyword() {
  7938. return builder.apply(void 0, ["TSBigIntKeyword"].concat(Array.prototype.slice.call(arguments)));
  7939. }
  7940. function tsIntrinsicKeyword() {
  7941. return builder.apply(void 0, ["TSIntrinsicKeyword"].concat(Array.prototype.slice.call(arguments)));
  7942. }
  7943. function tsNeverKeyword() {
  7944. return builder.apply(void 0, ["TSNeverKeyword"].concat(Array.prototype.slice.call(arguments)));
  7945. }
  7946. function tsNullKeyword() {
  7947. return builder.apply(void 0, ["TSNullKeyword"].concat(Array.prototype.slice.call(arguments)));
  7948. }
  7949. function tsNumberKeyword() {
  7950. return builder.apply(void 0, ["TSNumberKeyword"].concat(Array.prototype.slice.call(arguments)));
  7951. }
  7952. function tsObjectKeyword() {
  7953. return builder.apply(void 0, ["TSObjectKeyword"].concat(Array.prototype.slice.call(arguments)));
  7954. }
  7955. function tsStringKeyword() {
  7956. return builder.apply(void 0, ["TSStringKeyword"].concat(Array.prototype.slice.call(arguments)));
  7957. }
  7958. function tsSymbolKeyword() {
  7959. return builder.apply(void 0, ["TSSymbolKeyword"].concat(Array.prototype.slice.call(arguments)));
  7960. }
  7961. function tsUndefinedKeyword() {
  7962. return builder.apply(void 0, ["TSUndefinedKeyword"].concat(Array.prototype.slice.call(arguments)));
  7963. }
  7964. function tsUnknownKeyword() {
  7965. return builder.apply(void 0, ["TSUnknownKeyword"].concat(Array.prototype.slice.call(arguments)));
  7966. }
  7967. function tsVoidKeyword() {
  7968. return builder.apply(void 0, ["TSVoidKeyword"].concat(Array.prototype.slice.call(arguments)));
  7969. }
  7970. function tsThisType() {
  7971. return builder.apply(void 0, ["TSThisType"].concat(Array.prototype.slice.call(arguments)));
  7972. }
  7973. function tsFunctionType(typeParameters, parameters, typeAnnotation) {
  7974. return builder.apply(void 0, ["TSFunctionType"].concat(Array.prototype.slice.call(arguments)));
  7975. }
  7976. function tsConstructorType(typeParameters, parameters, typeAnnotation) {
  7977. return builder.apply(void 0, ["TSConstructorType"].concat(Array.prototype.slice.call(arguments)));
  7978. }
  7979. function tsTypeReference(typeName, typeParameters) {
  7980. return builder.apply(void 0, ["TSTypeReference"].concat(Array.prototype.slice.call(arguments)));
  7981. }
  7982. function tsTypePredicate(parameterName, typeAnnotation, asserts) {
  7983. return builder.apply(void 0, ["TSTypePredicate"].concat(Array.prototype.slice.call(arguments)));
  7984. }
  7985. function tsTypeQuery(exprName) {
  7986. return builder.apply(void 0, ["TSTypeQuery"].concat(Array.prototype.slice.call(arguments)));
  7987. }
  7988. function tsTypeLiteral(members) {
  7989. return builder.apply(void 0, ["TSTypeLiteral"].concat(Array.prototype.slice.call(arguments)));
  7990. }
  7991. function tsArrayType(elementType) {
  7992. return builder.apply(void 0, ["TSArrayType"].concat(Array.prototype.slice.call(arguments)));
  7993. }
  7994. function tsTupleType(elementTypes) {
  7995. return builder.apply(void 0, ["TSTupleType"].concat(Array.prototype.slice.call(arguments)));
  7996. }
  7997. function tsOptionalType(typeAnnotation) {
  7998. return builder.apply(void 0, ["TSOptionalType"].concat(Array.prototype.slice.call(arguments)));
  7999. }
  8000. function tsRestType(typeAnnotation) {
  8001. return builder.apply(void 0, ["TSRestType"].concat(Array.prototype.slice.call(arguments)));
  8002. }
  8003. function tsNamedTupleMember(label, elementType, optional) {
  8004. return builder.apply(void 0, ["TSNamedTupleMember"].concat(Array.prototype.slice.call(arguments)));
  8005. }
  8006. function tsUnionType(types) {
  8007. return builder.apply(void 0, ["TSUnionType"].concat(Array.prototype.slice.call(arguments)));
  8008. }
  8009. function tsIntersectionType(types) {
  8010. return builder.apply(void 0, ["TSIntersectionType"].concat(Array.prototype.slice.call(arguments)));
  8011. }
  8012. function tsConditionalType(checkType, extendsType, trueType, falseType) {
  8013. return builder.apply(void 0, ["TSConditionalType"].concat(Array.prototype.slice.call(arguments)));
  8014. }
  8015. function tsInferType(typeParameter) {
  8016. return builder.apply(void 0, ["TSInferType"].concat(Array.prototype.slice.call(arguments)));
  8017. }
  8018. function tsParenthesizedType(typeAnnotation) {
  8019. return builder.apply(void 0, ["TSParenthesizedType"].concat(Array.prototype.slice.call(arguments)));
  8020. }
  8021. function tsTypeOperator(typeAnnotation) {
  8022. return builder.apply(void 0, ["TSTypeOperator"].concat(Array.prototype.slice.call(arguments)));
  8023. }
  8024. function tsIndexedAccessType(objectType, indexType) {
  8025. return builder.apply(void 0, ["TSIndexedAccessType"].concat(Array.prototype.slice.call(arguments)));
  8026. }
  8027. function tsMappedType(typeParameter, typeAnnotation, nameType) {
  8028. return builder.apply(void 0, ["TSMappedType"].concat(Array.prototype.slice.call(arguments)));
  8029. }
  8030. function tsLiteralType(literal) {
  8031. return builder.apply(void 0, ["TSLiteralType"].concat(Array.prototype.slice.call(arguments)));
  8032. }
  8033. function tsExpressionWithTypeArguments(expression, typeParameters) {
  8034. return builder.apply(void 0, ["TSExpressionWithTypeArguments"].concat(Array.prototype.slice.call(arguments)));
  8035. }
  8036. function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
  8037. return builder.apply(void 0, ["TSInterfaceDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8038. }
  8039. function tsInterfaceBody(body) {
  8040. return builder.apply(void 0, ["TSInterfaceBody"].concat(Array.prototype.slice.call(arguments)));
  8041. }
  8042. function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) {
  8043. return builder.apply(void 0, ["TSTypeAliasDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8044. }
  8045. function tsAsExpression(expression, typeAnnotation) {
  8046. return builder.apply(void 0, ["TSAsExpression"].concat(Array.prototype.slice.call(arguments)));
  8047. }
  8048. function tsTypeAssertion(typeAnnotation, expression) {
  8049. return builder.apply(void 0, ["TSTypeAssertion"].concat(Array.prototype.slice.call(arguments)));
  8050. }
  8051. function tsEnumDeclaration(id, members) {
  8052. return builder.apply(void 0, ["TSEnumDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8053. }
  8054. function tsEnumMember(id, initializer) {
  8055. return builder.apply(void 0, ["TSEnumMember"].concat(Array.prototype.slice.call(arguments)));
  8056. }
  8057. function tsModuleDeclaration(id, body) {
  8058. return builder.apply(void 0, ["TSModuleDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8059. }
  8060. function tsModuleBlock(body) {
  8061. return builder.apply(void 0, ["TSModuleBlock"].concat(Array.prototype.slice.call(arguments)));
  8062. }
  8063. function tsImportType(argument, qualifier, typeParameters) {
  8064. return builder.apply(void 0, ["TSImportType"].concat(Array.prototype.slice.call(arguments)));
  8065. }
  8066. function tsImportEqualsDeclaration(id, moduleReference) {
  8067. return builder.apply(void 0, ["TSImportEqualsDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8068. }
  8069. function tsExternalModuleReference(expression) {
  8070. return builder.apply(void 0, ["TSExternalModuleReference"].concat(Array.prototype.slice.call(arguments)));
  8071. }
  8072. function tsNonNullExpression(expression) {
  8073. return builder.apply(void 0, ["TSNonNullExpression"].concat(Array.prototype.slice.call(arguments)));
  8074. }
  8075. function tsExportAssignment(expression) {
  8076. return builder.apply(void 0, ["TSExportAssignment"].concat(Array.prototype.slice.call(arguments)));
  8077. }
  8078. function tsNamespaceExportDeclaration(id) {
  8079. return builder.apply(void 0, ["TSNamespaceExportDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8080. }
  8081. function tsTypeAnnotation(typeAnnotation) {
  8082. return builder.apply(void 0, ["TSTypeAnnotation"].concat(Array.prototype.slice.call(arguments)));
  8083. }
  8084. function tsTypeParameterInstantiation(params) {
  8085. return builder.apply(void 0, ["TSTypeParameterInstantiation"].concat(Array.prototype.slice.call(arguments)));
  8086. }
  8087. function tsTypeParameterDeclaration(params) {
  8088. return builder.apply(void 0, ["TSTypeParameterDeclaration"].concat(Array.prototype.slice.call(arguments)));
  8089. }
  8090. function tsTypeParameter(constraint, _default, name) {
  8091. return builder.apply(void 0, ["TSTypeParameter"].concat(Array.prototype.slice.call(arguments)));
  8092. }
  8093. function NumberLiteral() {
  8094. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  8095. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  8096. args[_key] = arguments[_key];
  8097. }
  8098. return builder.apply(void 0, ["NumberLiteral"].concat(args));
  8099. }
  8100. function RegexLiteral() {
  8101. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  8102. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  8103. args[_key2] = arguments[_key2];
  8104. }
  8105. return builder.apply(void 0, ["RegexLiteral"].concat(args));
  8106. }
  8107. function RestProperty$1() {
  8108. console.trace("The node type RestProperty has been renamed to RestElement");
  8109. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  8110. args[_key3] = arguments[_key3];
  8111. }
  8112. return builder.apply(void 0, ["RestProperty"].concat(args));
  8113. }
  8114. function SpreadProperty$1() {
  8115. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  8116. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  8117. args[_key4] = arguments[_key4];
  8118. }
  8119. return builder.apply(void 0, ["SpreadProperty"].concat(args));
  8120. }
  8121. function cleanJSXElementLiteralChild(child, args) {
  8122. var lines = child.value.split(/\r\n|\n|\r/);
  8123. var lastNonEmptyLine = 0;
  8124. for (var i = 0; i < lines.length; i++) {
  8125. if (lines[i].match(/[^ \t]/)) {
  8126. lastNonEmptyLine = i;
  8127. }
  8128. }
  8129. var str = "";
  8130. for (var _i = 0; _i < lines.length; _i++) {
  8131. var line = lines[_i];
  8132. var isFirstLine = _i === 0;
  8133. var isLastLine = _i === lines.length - 1;
  8134. var isLastNonEmptyLine = _i === lastNonEmptyLine;
  8135. var trimmedLine = line.replace(/\t/g, " ");
  8136. if (!isFirstLine) {
  8137. trimmedLine = trimmedLine.replace(/^[ ]+/, "");
  8138. }
  8139. if (!isLastLine) {
  8140. trimmedLine = trimmedLine.replace(/[ ]+$/, "");
  8141. }
  8142. if (trimmedLine) {
  8143. if (!isLastNonEmptyLine) {
  8144. trimmedLine += " ";
  8145. }
  8146. str += trimmedLine;
  8147. }
  8148. }
  8149. if (str) args.push(stringLiteral(str));
  8150. }
  8151. function buildChildren(node) {
  8152. var elements = [];
  8153. for (var i = 0; i < node.children.length; i++) {
  8154. var child = node.children[i];
  8155. if (isJSXText(child)) {
  8156. cleanJSXElementLiteralChild(child, elements);
  8157. continue;
  8158. }
  8159. if (isJSXExpressionContainer(child)) child = child.expression;
  8160. if (isJSXEmptyExpression(child)) continue;
  8161. elements.push(child);
  8162. }
  8163. return elements;
  8164. }
  8165. function isNode(node) {
  8166. return !!(node && VISITOR_KEYS[node.type]);
  8167. }
  8168. function assertNode(node) {
  8169. if (!isNode(node)) {
  8170. var _node$type;
  8171. var type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
  8172. throw new TypeError("Not a valid node of type \"" + type + "\"");
  8173. }
  8174. }
  8175. function assert$1(type, node, opts) {
  8176. if (!is$1(type, node, opts)) {
  8177. throw new Error("Expected type \"" + type + "\" with option " + JSON.stringify(opts) + ", " + ("but instead got \"" + node.type + "\"."));
  8178. }
  8179. }
  8180. function assertArrayExpression(node, opts) {
  8181. assert$1("ArrayExpression", node, opts);
  8182. }
  8183. function assertAssignmentExpression(node, opts) {
  8184. assert$1("AssignmentExpression", node, opts);
  8185. }
  8186. function assertBinaryExpression(node, opts) {
  8187. assert$1("BinaryExpression", node, opts);
  8188. }
  8189. function assertInterpreterDirective(node, opts) {
  8190. assert$1("InterpreterDirective", node, opts);
  8191. }
  8192. function assertDirective(node, opts) {
  8193. assert$1("Directive", node, opts);
  8194. }
  8195. function assertDirectiveLiteral(node, opts) {
  8196. assert$1("DirectiveLiteral", node, opts);
  8197. }
  8198. function assertBlockStatement(node, opts) {
  8199. assert$1("BlockStatement", node, opts);
  8200. }
  8201. function assertBreakStatement(node, opts) {
  8202. assert$1("BreakStatement", node, opts);
  8203. }
  8204. function assertCallExpression(node, opts) {
  8205. assert$1("CallExpression", node, opts);
  8206. }
  8207. function assertCatchClause(node, opts) {
  8208. assert$1("CatchClause", node, opts);
  8209. }
  8210. function assertConditionalExpression(node, opts) {
  8211. assert$1("ConditionalExpression", node, opts);
  8212. }
  8213. function assertContinueStatement(node, opts) {
  8214. assert$1("ContinueStatement", node, opts);
  8215. }
  8216. function assertDebuggerStatement(node, opts) {
  8217. assert$1("DebuggerStatement", node, opts);
  8218. }
  8219. function assertDoWhileStatement(node, opts) {
  8220. assert$1("DoWhileStatement", node, opts);
  8221. }
  8222. function assertEmptyStatement(node, opts) {
  8223. assert$1("EmptyStatement", node, opts);
  8224. }
  8225. function assertExpressionStatement(node, opts) {
  8226. assert$1("ExpressionStatement", node, opts);
  8227. }
  8228. function assertFile(node, opts) {
  8229. assert$1("File", node, opts);
  8230. }
  8231. function assertForInStatement(node, opts) {
  8232. assert$1("ForInStatement", node, opts);
  8233. }
  8234. function assertForStatement(node, opts) {
  8235. assert$1("ForStatement", node, opts);
  8236. }
  8237. function assertFunctionDeclaration(node, opts) {
  8238. assert$1("FunctionDeclaration", node, opts);
  8239. }
  8240. function assertFunctionExpression(node, opts) {
  8241. assert$1("FunctionExpression", node, opts);
  8242. }
  8243. function assertIdentifier(node, opts) {
  8244. assert$1("Identifier", node, opts);
  8245. }
  8246. function assertIfStatement(node, opts) {
  8247. assert$1("IfStatement", node, opts);
  8248. }
  8249. function assertLabeledStatement(node, opts) {
  8250. assert$1("LabeledStatement", node, opts);
  8251. }
  8252. function assertStringLiteral(node, opts) {
  8253. assert$1("StringLiteral", node, opts);
  8254. }
  8255. function assertNumericLiteral(node, opts) {
  8256. assert$1("NumericLiteral", node, opts);
  8257. }
  8258. function assertNullLiteral(node, opts) {
  8259. assert$1("NullLiteral", node, opts);
  8260. }
  8261. function assertBooleanLiteral(node, opts) {
  8262. assert$1("BooleanLiteral", node, opts);
  8263. }
  8264. function assertRegExpLiteral(node, opts) {
  8265. assert$1("RegExpLiteral", node, opts);
  8266. }
  8267. function assertLogicalExpression(node, opts) {
  8268. assert$1("LogicalExpression", node, opts);
  8269. }
  8270. function assertMemberExpression(node, opts) {
  8271. assert$1("MemberExpression", node, opts);
  8272. }
  8273. function assertNewExpression(node, opts) {
  8274. assert$1("NewExpression", node, opts);
  8275. }
  8276. function assertProgram(node, opts) {
  8277. assert$1("Program", node, opts);
  8278. }
  8279. function assertObjectExpression(node, opts) {
  8280. assert$1("ObjectExpression", node, opts);
  8281. }
  8282. function assertObjectMethod(node, opts) {
  8283. assert$1("ObjectMethod", node, opts);
  8284. }
  8285. function assertObjectProperty(node, opts) {
  8286. assert$1("ObjectProperty", node, opts);
  8287. }
  8288. function assertRestElement(node, opts) {
  8289. assert$1("RestElement", node, opts);
  8290. }
  8291. function assertReturnStatement(node, opts) {
  8292. assert$1("ReturnStatement", node, opts);
  8293. }
  8294. function assertSequenceExpression(node, opts) {
  8295. assert$1("SequenceExpression", node, opts);
  8296. }
  8297. function assertParenthesizedExpression(node, opts) {
  8298. assert$1("ParenthesizedExpression", node, opts);
  8299. }
  8300. function assertSwitchCase(node, opts) {
  8301. assert$1("SwitchCase", node, opts);
  8302. }
  8303. function assertSwitchStatement(node, opts) {
  8304. assert$1("SwitchStatement", node, opts);
  8305. }
  8306. function assertThisExpression(node, opts) {
  8307. assert$1("ThisExpression", node, opts);
  8308. }
  8309. function assertThrowStatement(node, opts) {
  8310. assert$1("ThrowStatement", node, opts);
  8311. }
  8312. function assertTryStatement(node, opts) {
  8313. assert$1("TryStatement", node, opts);
  8314. }
  8315. function assertUnaryExpression(node, opts) {
  8316. assert$1("UnaryExpression", node, opts);
  8317. }
  8318. function assertUpdateExpression(node, opts) {
  8319. assert$1("UpdateExpression", node, opts);
  8320. }
  8321. function assertVariableDeclaration(node, opts) {
  8322. assert$1("VariableDeclaration", node, opts);
  8323. }
  8324. function assertVariableDeclarator(node, opts) {
  8325. assert$1("VariableDeclarator", node, opts);
  8326. }
  8327. function assertWhileStatement(node, opts) {
  8328. assert$1("WhileStatement", node, opts);
  8329. }
  8330. function assertWithStatement(node, opts) {
  8331. assert$1("WithStatement", node, opts);
  8332. }
  8333. function assertAssignmentPattern(node, opts) {
  8334. assert$1("AssignmentPattern", node, opts);
  8335. }
  8336. function assertArrayPattern(node, opts) {
  8337. assert$1("ArrayPattern", node, opts);
  8338. }
  8339. function assertArrowFunctionExpression(node, opts) {
  8340. assert$1("ArrowFunctionExpression", node, opts);
  8341. }
  8342. function assertClassBody(node, opts) {
  8343. assert$1("ClassBody", node, opts);
  8344. }
  8345. function assertClassExpression(node, opts) {
  8346. assert$1("ClassExpression", node, opts);
  8347. }
  8348. function assertClassDeclaration(node, opts) {
  8349. assert$1("ClassDeclaration", node, opts);
  8350. }
  8351. function assertExportAllDeclaration(node, opts) {
  8352. assert$1("ExportAllDeclaration", node, opts);
  8353. }
  8354. function assertExportDefaultDeclaration(node, opts) {
  8355. assert$1("ExportDefaultDeclaration", node, opts);
  8356. }
  8357. function assertExportNamedDeclaration(node, opts) {
  8358. assert$1("ExportNamedDeclaration", node, opts);
  8359. }
  8360. function assertExportSpecifier$1(node, opts) {
  8361. assert$1("ExportSpecifier", node, opts);
  8362. }
  8363. function assertForOfStatement(node, opts) {
  8364. assert$1("ForOfStatement", node, opts);
  8365. }
  8366. function assertImportDeclaration(node, opts) {
  8367. assert$1("ImportDeclaration", node, opts);
  8368. }
  8369. function assertImportDefaultSpecifier(node, opts) {
  8370. assert$1("ImportDefaultSpecifier", node, opts);
  8371. }
  8372. function assertImportNamespaceSpecifier(node, opts) {
  8373. assert$1("ImportNamespaceSpecifier", node, opts);
  8374. }
  8375. function assertImportSpecifier(node, opts) {
  8376. assert$1("ImportSpecifier", node, opts);
  8377. }
  8378. function assertMetaProperty(node, opts) {
  8379. assert$1("MetaProperty", node, opts);
  8380. }
  8381. function assertClassMethod(node, opts) {
  8382. assert$1("ClassMethod", node, opts);
  8383. }
  8384. function assertObjectPattern(node, opts) {
  8385. assert$1("ObjectPattern", node, opts);
  8386. }
  8387. function assertSpreadElement(node, opts) {
  8388. assert$1("SpreadElement", node, opts);
  8389. }
  8390. function assertSuper(node, opts) {
  8391. assert$1("Super", node, opts);
  8392. }
  8393. function assertTaggedTemplateExpression(node, opts) {
  8394. assert$1("TaggedTemplateExpression", node, opts);
  8395. }
  8396. function assertTemplateElement(node, opts) {
  8397. assert$1("TemplateElement", node, opts);
  8398. }
  8399. function assertTemplateLiteral(node, opts) {
  8400. assert$1("TemplateLiteral", node, opts);
  8401. }
  8402. function assertYieldExpression(node, opts) {
  8403. assert$1("YieldExpression", node, opts);
  8404. }
  8405. function assertAwaitExpression(node, opts) {
  8406. assert$1("AwaitExpression", node, opts);
  8407. }
  8408. function assertImport(node, opts) {
  8409. assert$1("Import", node, opts);
  8410. }
  8411. function assertBigIntLiteral(node, opts) {
  8412. assert$1("BigIntLiteral", node, opts);
  8413. }
  8414. function assertExportNamespaceSpecifier(node, opts) {
  8415. assert$1("ExportNamespaceSpecifier", node, opts);
  8416. }
  8417. function assertOptionalMemberExpression(node, opts) {
  8418. assert$1("OptionalMemberExpression", node, opts);
  8419. }
  8420. function assertOptionalCallExpression(node, opts) {
  8421. assert$1("OptionalCallExpression", node, opts);
  8422. }
  8423. function assertAnyTypeAnnotation(node, opts) {
  8424. assert$1("AnyTypeAnnotation", node, opts);
  8425. }
  8426. function assertArrayTypeAnnotation(node, opts) {
  8427. assert$1("ArrayTypeAnnotation", node, opts);
  8428. }
  8429. function assertBooleanTypeAnnotation(node, opts) {
  8430. assert$1("BooleanTypeAnnotation", node, opts);
  8431. }
  8432. function assertBooleanLiteralTypeAnnotation(node, opts) {
  8433. assert$1("BooleanLiteralTypeAnnotation", node, opts);
  8434. }
  8435. function assertNullLiteralTypeAnnotation(node, opts) {
  8436. assert$1("NullLiteralTypeAnnotation", node, opts);
  8437. }
  8438. function assertClassImplements(node, opts) {
  8439. assert$1("ClassImplements", node, opts);
  8440. }
  8441. function assertDeclareClass(node, opts) {
  8442. assert$1("DeclareClass", node, opts);
  8443. }
  8444. function assertDeclareFunction(node, opts) {
  8445. assert$1("DeclareFunction", node, opts);
  8446. }
  8447. function assertDeclareInterface(node, opts) {
  8448. assert$1("DeclareInterface", node, opts);
  8449. }
  8450. function assertDeclareModule(node, opts) {
  8451. assert$1("DeclareModule", node, opts);
  8452. }
  8453. function assertDeclareModuleExports(node, opts) {
  8454. assert$1("DeclareModuleExports", node, opts);
  8455. }
  8456. function assertDeclareTypeAlias(node, opts) {
  8457. assert$1("DeclareTypeAlias", node, opts);
  8458. }
  8459. function assertDeclareOpaqueType(node, opts) {
  8460. assert$1("DeclareOpaqueType", node, opts);
  8461. }
  8462. function assertDeclareVariable(node, opts) {
  8463. assert$1("DeclareVariable", node, opts);
  8464. }
  8465. function assertDeclareExportDeclaration(node, opts) {
  8466. assert$1("DeclareExportDeclaration", node, opts);
  8467. }
  8468. function assertDeclareExportAllDeclaration(node, opts) {
  8469. assert$1("DeclareExportAllDeclaration", node, opts);
  8470. }
  8471. function assertDeclaredPredicate(node, opts) {
  8472. assert$1("DeclaredPredicate", node, opts);
  8473. }
  8474. function assertExistsTypeAnnotation(node, opts) {
  8475. assert$1("ExistsTypeAnnotation", node, opts);
  8476. }
  8477. function assertFunctionTypeAnnotation(node, opts) {
  8478. assert$1("FunctionTypeAnnotation", node, opts);
  8479. }
  8480. function assertFunctionTypeParam(node, opts) {
  8481. assert$1("FunctionTypeParam", node, opts);
  8482. }
  8483. function assertGenericTypeAnnotation(node, opts) {
  8484. assert$1("GenericTypeAnnotation", node, opts);
  8485. }
  8486. function assertInferredPredicate(node, opts) {
  8487. assert$1("InferredPredicate", node, opts);
  8488. }
  8489. function assertInterfaceExtends(node, opts) {
  8490. assert$1("InterfaceExtends", node, opts);
  8491. }
  8492. function assertInterfaceDeclaration(node, opts) {
  8493. assert$1("InterfaceDeclaration", node, opts);
  8494. }
  8495. function assertInterfaceTypeAnnotation(node, opts) {
  8496. assert$1("InterfaceTypeAnnotation", node, opts);
  8497. }
  8498. function assertIntersectionTypeAnnotation(node, opts) {
  8499. assert$1("IntersectionTypeAnnotation", node, opts);
  8500. }
  8501. function assertMixedTypeAnnotation(node, opts) {
  8502. assert$1("MixedTypeAnnotation", node, opts);
  8503. }
  8504. function assertEmptyTypeAnnotation(node, opts) {
  8505. assert$1("EmptyTypeAnnotation", node, opts);
  8506. }
  8507. function assertNullableTypeAnnotation(node, opts) {
  8508. assert$1("NullableTypeAnnotation", node, opts);
  8509. }
  8510. function assertNumberLiteralTypeAnnotation(node, opts) {
  8511. assert$1("NumberLiteralTypeAnnotation", node, opts);
  8512. }
  8513. function assertNumberTypeAnnotation(node, opts) {
  8514. assert$1("NumberTypeAnnotation", node, opts);
  8515. }
  8516. function assertObjectTypeAnnotation(node, opts) {
  8517. assert$1("ObjectTypeAnnotation", node, opts);
  8518. }
  8519. function assertObjectTypeInternalSlot(node, opts) {
  8520. assert$1("ObjectTypeInternalSlot", node, opts);
  8521. }
  8522. function assertObjectTypeCallProperty(node, opts) {
  8523. assert$1("ObjectTypeCallProperty", node, opts);
  8524. }
  8525. function assertObjectTypeIndexer(node, opts) {
  8526. assert$1("ObjectTypeIndexer", node, opts);
  8527. }
  8528. function assertObjectTypeProperty(node, opts) {
  8529. assert$1("ObjectTypeProperty", node, opts);
  8530. }
  8531. function assertObjectTypeSpreadProperty(node, opts) {
  8532. assert$1("ObjectTypeSpreadProperty", node, opts);
  8533. }
  8534. function assertOpaqueType(node, opts) {
  8535. assert$1("OpaqueType", node, opts);
  8536. }
  8537. function assertQualifiedTypeIdentifier(node, opts) {
  8538. assert$1("QualifiedTypeIdentifier", node, opts);
  8539. }
  8540. function assertStringLiteralTypeAnnotation(node, opts) {
  8541. assert$1("StringLiteralTypeAnnotation", node, opts);
  8542. }
  8543. function assertStringTypeAnnotation(node, opts) {
  8544. assert$1("StringTypeAnnotation", node, opts);
  8545. }
  8546. function assertSymbolTypeAnnotation(node, opts) {
  8547. assert$1("SymbolTypeAnnotation", node, opts);
  8548. }
  8549. function assertThisTypeAnnotation(node, opts) {
  8550. assert$1("ThisTypeAnnotation", node, opts);
  8551. }
  8552. function assertTupleTypeAnnotation(node, opts) {
  8553. assert$1("TupleTypeAnnotation", node, opts);
  8554. }
  8555. function assertTypeofTypeAnnotation(node, opts) {
  8556. assert$1("TypeofTypeAnnotation", node, opts);
  8557. }
  8558. function assertTypeAlias(node, opts) {
  8559. assert$1("TypeAlias", node, opts);
  8560. }
  8561. function assertTypeAnnotation(node, opts) {
  8562. assert$1("TypeAnnotation", node, opts);
  8563. }
  8564. function assertTypeCastExpression(node, opts) {
  8565. assert$1("TypeCastExpression", node, opts);
  8566. }
  8567. function assertTypeParameter(node, opts) {
  8568. assert$1("TypeParameter", node, opts);
  8569. }
  8570. function assertTypeParameterDeclaration(node, opts) {
  8571. assert$1("TypeParameterDeclaration", node, opts);
  8572. }
  8573. function assertTypeParameterInstantiation(node, opts) {
  8574. assert$1("TypeParameterInstantiation", node, opts);
  8575. }
  8576. function assertUnionTypeAnnotation(node, opts) {
  8577. assert$1("UnionTypeAnnotation", node, opts);
  8578. }
  8579. function assertVariance(node, opts) {
  8580. assert$1("Variance", node, opts);
  8581. }
  8582. function assertVoidTypeAnnotation(node, opts) {
  8583. assert$1("VoidTypeAnnotation", node, opts);
  8584. }
  8585. function assertEnumDeclaration(node, opts) {
  8586. assert$1("EnumDeclaration", node, opts);
  8587. }
  8588. function assertEnumBooleanBody(node, opts) {
  8589. assert$1("EnumBooleanBody", node, opts);
  8590. }
  8591. function assertEnumNumberBody(node, opts) {
  8592. assert$1("EnumNumberBody", node, opts);
  8593. }
  8594. function assertEnumStringBody(node, opts) {
  8595. assert$1("EnumStringBody", node, opts);
  8596. }
  8597. function assertEnumSymbolBody(node, opts) {
  8598. assert$1("EnumSymbolBody", node, opts);
  8599. }
  8600. function assertEnumBooleanMember(node, opts) {
  8601. assert$1("EnumBooleanMember", node, opts);
  8602. }
  8603. function assertEnumNumberMember(node, opts) {
  8604. assert$1("EnumNumberMember", node, opts);
  8605. }
  8606. function assertEnumStringMember(node, opts) {
  8607. assert$1("EnumStringMember", node, opts);
  8608. }
  8609. function assertEnumDefaultedMember(node, opts) {
  8610. assert$1("EnumDefaultedMember", node, opts);
  8611. }
  8612. function assertIndexedAccessType(node, opts) {
  8613. assert$1("IndexedAccessType", node, opts);
  8614. }
  8615. function assertOptionalIndexedAccessType(node, opts) {
  8616. assert$1("OptionalIndexedAccessType", node, opts);
  8617. }
  8618. function assertJSXAttribute(node, opts) {
  8619. assert$1("JSXAttribute", node, opts);
  8620. }
  8621. function assertJSXClosingElement(node, opts) {
  8622. assert$1("JSXClosingElement", node, opts);
  8623. }
  8624. function assertJSXElement(node, opts) {
  8625. assert$1("JSXElement", node, opts);
  8626. }
  8627. function assertJSXEmptyExpression(node, opts) {
  8628. assert$1("JSXEmptyExpression", node, opts);
  8629. }
  8630. function assertJSXExpressionContainer(node, opts) {
  8631. assert$1("JSXExpressionContainer", node, opts);
  8632. }
  8633. function assertJSXSpreadChild(node, opts) {
  8634. assert$1("JSXSpreadChild", node, opts);
  8635. }
  8636. function assertJSXIdentifier(node, opts) {
  8637. assert$1("JSXIdentifier", node, opts);
  8638. }
  8639. function assertJSXMemberExpression(node, opts) {
  8640. assert$1("JSXMemberExpression", node, opts);
  8641. }
  8642. function assertJSXNamespacedName(node, opts) {
  8643. assert$1("JSXNamespacedName", node, opts);
  8644. }
  8645. function assertJSXOpeningElement(node, opts) {
  8646. assert$1("JSXOpeningElement", node, opts);
  8647. }
  8648. function assertJSXSpreadAttribute(node, opts) {
  8649. assert$1("JSXSpreadAttribute", node, opts);
  8650. }
  8651. function assertJSXText(node, opts) {
  8652. assert$1("JSXText", node, opts);
  8653. }
  8654. function assertJSXFragment(node, opts) {
  8655. assert$1("JSXFragment", node, opts);
  8656. }
  8657. function assertJSXOpeningFragment(node, opts) {
  8658. assert$1("JSXOpeningFragment", node, opts);
  8659. }
  8660. function assertJSXClosingFragment(node, opts) {
  8661. assert$1("JSXClosingFragment", node, opts);
  8662. }
  8663. function assertNoop(node, opts) {
  8664. assert$1("Noop", node, opts);
  8665. }
  8666. function assertPlaceholder(node, opts) {
  8667. assert$1("Placeholder", node, opts);
  8668. }
  8669. function assertV8IntrinsicIdentifier(node, opts) {
  8670. assert$1("V8IntrinsicIdentifier", node, opts);
  8671. }
  8672. function assertArgumentPlaceholder(node, opts) {
  8673. assert$1("ArgumentPlaceholder", node, opts);
  8674. }
  8675. function assertBindExpression(node, opts) {
  8676. assert$1("BindExpression", node, opts);
  8677. }
  8678. function assertClassProperty(node, opts) {
  8679. assert$1("ClassProperty", node, opts);
  8680. }
  8681. function assertPipelineTopicExpression(node, opts) {
  8682. assert$1("PipelineTopicExpression", node, opts);
  8683. }
  8684. function assertPipelineBareFunction(node, opts) {
  8685. assert$1("PipelineBareFunction", node, opts);
  8686. }
  8687. function assertPipelinePrimaryTopicReference(node, opts) {
  8688. assert$1("PipelinePrimaryTopicReference", node, opts);
  8689. }
  8690. function assertClassPrivateProperty(node, opts) {
  8691. assert$1("ClassPrivateProperty", node, opts);
  8692. }
  8693. function assertClassPrivateMethod(node, opts) {
  8694. assert$1("ClassPrivateMethod", node, opts);
  8695. }
  8696. function assertImportAttribute(node, opts) {
  8697. assert$1("ImportAttribute", node, opts);
  8698. }
  8699. function assertDecorator(node, opts) {
  8700. assert$1("Decorator", node, opts);
  8701. }
  8702. function assertDoExpression(node, opts) {
  8703. assert$1("DoExpression", node, opts);
  8704. }
  8705. function assertExportDefaultSpecifier(node, opts) {
  8706. assert$1("ExportDefaultSpecifier", node, opts);
  8707. }
  8708. function assertPrivateName(node, opts) {
  8709. assert$1("PrivateName", node, opts);
  8710. }
  8711. function assertRecordExpression(node, opts) {
  8712. assert$1("RecordExpression", node, opts);
  8713. }
  8714. function assertTupleExpression(node, opts) {
  8715. assert$1("TupleExpression", node, opts);
  8716. }
  8717. function assertDecimalLiteral(node, opts) {
  8718. assert$1("DecimalLiteral", node, opts);
  8719. }
  8720. function assertStaticBlock(node, opts) {
  8721. assert$1("StaticBlock", node, opts);
  8722. }
  8723. function assertModuleExpression(node, opts) {
  8724. assert$1("ModuleExpression", node, opts);
  8725. }
  8726. function assertTSParameterProperty(node, opts) {
  8727. assert$1("TSParameterProperty", node, opts);
  8728. }
  8729. function assertTSDeclareFunction(node, opts) {
  8730. assert$1("TSDeclareFunction", node, opts);
  8731. }
  8732. function assertTSDeclareMethod(node, opts) {
  8733. assert$1("TSDeclareMethod", node, opts);
  8734. }
  8735. function assertTSQualifiedName(node, opts) {
  8736. assert$1("TSQualifiedName", node, opts);
  8737. }
  8738. function assertTSCallSignatureDeclaration(node, opts) {
  8739. assert$1("TSCallSignatureDeclaration", node, opts);
  8740. }
  8741. function assertTSConstructSignatureDeclaration(node, opts) {
  8742. assert$1("TSConstructSignatureDeclaration", node, opts);
  8743. }
  8744. function assertTSPropertySignature(node, opts) {
  8745. assert$1("TSPropertySignature", node, opts);
  8746. }
  8747. function assertTSMethodSignature(node, opts) {
  8748. assert$1("TSMethodSignature", node, opts);
  8749. }
  8750. function assertTSIndexSignature(node, opts) {
  8751. assert$1("TSIndexSignature", node, opts);
  8752. }
  8753. function assertTSAnyKeyword(node, opts) {
  8754. assert$1("TSAnyKeyword", node, opts);
  8755. }
  8756. function assertTSBooleanKeyword(node, opts) {
  8757. assert$1("TSBooleanKeyword", node, opts);
  8758. }
  8759. function assertTSBigIntKeyword(node, opts) {
  8760. assert$1("TSBigIntKeyword", node, opts);
  8761. }
  8762. function assertTSIntrinsicKeyword(node, opts) {
  8763. assert$1("TSIntrinsicKeyword", node, opts);
  8764. }
  8765. function assertTSNeverKeyword(node, opts) {
  8766. assert$1("TSNeverKeyword", node, opts);
  8767. }
  8768. function assertTSNullKeyword(node, opts) {
  8769. assert$1("TSNullKeyword", node, opts);
  8770. }
  8771. function assertTSNumberKeyword(node, opts) {
  8772. assert$1("TSNumberKeyword", node, opts);
  8773. }
  8774. function assertTSObjectKeyword(node, opts) {
  8775. assert$1("TSObjectKeyword", node, opts);
  8776. }
  8777. function assertTSStringKeyword(node, opts) {
  8778. assert$1("TSStringKeyword", node, opts);
  8779. }
  8780. function assertTSSymbolKeyword(node, opts) {
  8781. assert$1("TSSymbolKeyword", node, opts);
  8782. }
  8783. function assertTSUndefinedKeyword(node, opts) {
  8784. assert$1("TSUndefinedKeyword", node, opts);
  8785. }
  8786. function assertTSUnknownKeyword(node, opts) {
  8787. assert$1("TSUnknownKeyword", node, opts);
  8788. }
  8789. function assertTSVoidKeyword(node, opts) {
  8790. assert$1("TSVoidKeyword", node, opts);
  8791. }
  8792. function assertTSThisType(node, opts) {
  8793. assert$1("TSThisType", node, opts);
  8794. }
  8795. function assertTSFunctionType(node, opts) {
  8796. assert$1("TSFunctionType", node, opts);
  8797. }
  8798. function assertTSConstructorType(node, opts) {
  8799. assert$1("TSConstructorType", node, opts);
  8800. }
  8801. function assertTSTypeReference(node, opts) {
  8802. assert$1("TSTypeReference", node, opts);
  8803. }
  8804. function assertTSTypePredicate(node, opts) {
  8805. assert$1("TSTypePredicate", node, opts);
  8806. }
  8807. function assertTSTypeQuery(node, opts) {
  8808. assert$1("TSTypeQuery", node, opts);
  8809. }
  8810. function assertTSTypeLiteral(node, opts) {
  8811. assert$1("TSTypeLiteral", node, opts);
  8812. }
  8813. function assertTSArrayType(node, opts) {
  8814. assert$1("TSArrayType", node, opts);
  8815. }
  8816. function assertTSTupleType(node, opts) {
  8817. assert$1("TSTupleType", node, opts);
  8818. }
  8819. function assertTSOptionalType(node, opts) {
  8820. assert$1("TSOptionalType", node, opts);
  8821. }
  8822. function assertTSRestType(node, opts) {
  8823. assert$1("TSRestType", node, opts);
  8824. }
  8825. function assertTSNamedTupleMember(node, opts) {
  8826. assert$1("TSNamedTupleMember", node, opts);
  8827. }
  8828. function assertTSUnionType(node, opts) {
  8829. assert$1("TSUnionType", node, opts);
  8830. }
  8831. function assertTSIntersectionType(node, opts) {
  8832. assert$1("TSIntersectionType", node, opts);
  8833. }
  8834. function assertTSConditionalType(node, opts) {
  8835. assert$1("TSConditionalType", node, opts);
  8836. }
  8837. function assertTSInferType(node, opts) {
  8838. assert$1("TSInferType", node, opts);
  8839. }
  8840. function assertTSParenthesizedType(node, opts) {
  8841. assert$1("TSParenthesizedType", node, opts);
  8842. }
  8843. function assertTSTypeOperator(node, opts) {
  8844. assert$1("TSTypeOperator", node, opts);
  8845. }
  8846. function assertTSIndexedAccessType(node, opts) {
  8847. assert$1("TSIndexedAccessType", node, opts);
  8848. }
  8849. function assertTSMappedType(node, opts) {
  8850. assert$1("TSMappedType", node, opts);
  8851. }
  8852. function assertTSLiteralType(node, opts) {
  8853. assert$1("TSLiteralType", node, opts);
  8854. }
  8855. function assertTSExpressionWithTypeArguments(node, opts) {
  8856. assert$1("TSExpressionWithTypeArguments", node, opts);
  8857. }
  8858. function assertTSInterfaceDeclaration(node, opts) {
  8859. assert$1("TSInterfaceDeclaration", node, opts);
  8860. }
  8861. function assertTSInterfaceBody(node, opts) {
  8862. assert$1("TSInterfaceBody", node, opts);
  8863. }
  8864. function assertTSTypeAliasDeclaration(node, opts) {
  8865. assert$1("TSTypeAliasDeclaration", node, opts);
  8866. }
  8867. function assertTSAsExpression(node, opts) {
  8868. assert$1("TSAsExpression", node, opts);
  8869. }
  8870. function assertTSTypeAssertion(node, opts) {
  8871. assert$1("TSTypeAssertion", node, opts);
  8872. }
  8873. function assertTSEnumDeclaration(node, opts) {
  8874. assert$1("TSEnumDeclaration", node, opts);
  8875. }
  8876. function assertTSEnumMember(node, opts) {
  8877. assert$1("TSEnumMember", node, opts);
  8878. }
  8879. function assertTSModuleDeclaration(node, opts) {
  8880. assert$1("TSModuleDeclaration", node, opts);
  8881. }
  8882. function assertTSModuleBlock(node, opts) {
  8883. assert$1("TSModuleBlock", node, opts);
  8884. }
  8885. function assertTSImportType(node, opts) {
  8886. assert$1("TSImportType", node, opts);
  8887. }
  8888. function assertTSImportEqualsDeclaration(node, opts) {
  8889. assert$1("TSImportEqualsDeclaration", node, opts);
  8890. }
  8891. function assertTSExternalModuleReference(node, opts) {
  8892. assert$1("TSExternalModuleReference", node, opts);
  8893. }
  8894. function assertTSNonNullExpression(node, opts) {
  8895. assert$1("TSNonNullExpression", node, opts);
  8896. }
  8897. function assertTSExportAssignment(node, opts) {
  8898. assert$1("TSExportAssignment", node, opts);
  8899. }
  8900. function assertTSNamespaceExportDeclaration(node, opts) {
  8901. assert$1("TSNamespaceExportDeclaration", node, opts);
  8902. }
  8903. function assertTSTypeAnnotation(node, opts) {
  8904. assert$1("TSTypeAnnotation", node, opts);
  8905. }
  8906. function assertTSTypeParameterInstantiation(node, opts) {
  8907. assert$1("TSTypeParameterInstantiation", node, opts);
  8908. }
  8909. function assertTSTypeParameterDeclaration(node, opts) {
  8910. assert$1("TSTypeParameterDeclaration", node, opts);
  8911. }
  8912. function assertTSTypeParameter(node, opts) {
  8913. assert$1("TSTypeParameter", node, opts);
  8914. }
  8915. function assertExpression(node, opts) {
  8916. assert$1("Expression", node, opts);
  8917. }
  8918. function assertBinary(node, opts) {
  8919. assert$1("Binary", node, opts);
  8920. }
  8921. function assertScopable(node, opts) {
  8922. assert$1("Scopable", node, opts);
  8923. }
  8924. function assertBlockParent(node, opts) {
  8925. assert$1("BlockParent", node, opts);
  8926. }
  8927. function assertBlock(node, opts) {
  8928. assert$1("Block", node, opts);
  8929. }
  8930. function assertStatement(node, opts) {
  8931. assert$1("Statement", node, opts);
  8932. }
  8933. function assertTerminatorless(node, opts) {
  8934. assert$1("Terminatorless", node, opts);
  8935. }
  8936. function assertCompletionStatement(node, opts) {
  8937. assert$1("CompletionStatement", node, opts);
  8938. }
  8939. function assertConditional(node, opts) {
  8940. assert$1("Conditional", node, opts);
  8941. }
  8942. function assertLoop(node, opts) {
  8943. assert$1("Loop", node, opts);
  8944. }
  8945. function assertWhile(node, opts) {
  8946. assert$1("While", node, opts);
  8947. }
  8948. function assertExpressionWrapper(node, opts) {
  8949. assert$1("ExpressionWrapper", node, opts);
  8950. }
  8951. function assertFor(node, opts) {
  8952. assert$1("For", node, opts);
  8953. }
  8954. function assertForXStatement(node, opts) {
  8955. assert$1("ForXStatement", node, opts);
  8956. }
  8957. function assertFunction$1(node, opts) {
  8958. assert$1("Function", node, opts);
  8959. }
  8960. function assertFunctionParent(node, opts) {
  8961. assert$1("FunctionParent", node, opts);
  8962. }
  8963. function assertPureish(node, opts) {
  8964. assert$1("Pureish", node, opts);
  8965. }
  8966. function assertDeclaration(node, opts) {
  8967. assert$1("Declaration", node, opts);
  8968. }
  8969. function assertPatternLike(node, opts) {
  8970. assert$1("PatternLike", node, opts);
  8971. }
  8972. function assertLVal(node, opts) {
  8973. assert$1("LVal", node, opts);
  8974. }
  8975. function assertTSEntityName(node, opts) {
  8976. assert$1("TSEntityName", node, opts);
  8977. }
  8978. function assertLiteral(node, opts) {
  8979. assert$1("Literal", node, opts);
  8980. }
  8981. function assertImmutable(node, opts) {
  8982. assert$1("Immutable", node, opts);
  8983. }
  8984. function assertUserWhitespacable(node, opts) {
  8985. assert$1("UserWhitespacable", node, opts);
  8986. }
  8987. function assertMethod(node, opts) {
  8988. assert$1("Method", node, opts);
  8989. }
  8990. function assertObjectMember(node, opts) {
  8991. assert$1("ObjectMember", node, opts);
  8992. }
  8993. function assertProperty(node, opts) {
  8994. assert$1("Property", node, opts);
  8995. }
  8996. function assertUnaryLike(node, opts) {
  8997. assert$1("UnaryLike", node, opts);
  8998. }
  8999. function assertPattern(node, opts) {
  9000. assert$1("Pattern", node, opts);
  9001. }
  9002. function assertClass(node, opts) {
  9003. assert$1("Class", node, opts);
  9004. }
  9005. function assertModuleDeclaration(node, opts) {
  9006. assert$1("ModuleDeclaration", node, opts);
  9007. }
  9008. function assertExportDeclaration(node, opts) {
  9009. assert$1("ExportDeclaration", node, opts);
  9010. }
  9011. function assertModuleSpecifier(node, opts) {
  9012. assert$1("ModuleSpecifier", node, opts);
  9013. }
  9014. function assertFlow(node, opts) {
  9015. assert$1("Flow", node, opts);
  9016. }
  9017. function assertFlowType(node, opts) {
  9018. assert$1("FlowType", node, opts);
  9019. }
  9020. function assertFlowBaseAnnotation(node, opts) {
  9021. assert$1("FlowBaseAnnotation", node, opts);
  9022. }
  9023. function assertFlowDeclaration(node, opts) {
  9024. assert$1("FlowDeclaration", node, opts);
  9025. }
  9026. function assertFlowPredicate(node, opts) {
  9027. assert$1("FlowPredicate", node, opts);
  9028. }
  9029. function assertEnumBody(node, opts) {
  9030. assert$1("EnumBody", node, opts);
  9031. }
  9032. function assertEnumMember(node, opts) {
  9033. assert$1("EnumMember", node, opts);
  9034. }
  9035. function assertJSX(node, opts) {
  9036. assert$1("JSX", node, opts);
  9037. }
  9038. function assertPrivate(node, opts) {
  9039. assert$1("Private", node, opts);
  9040. }
  9041. function assertTSTypeElement(node, opts) {
  9042. assert$1("TSTypeElement", node, opts);
  9043. }
  9044. function assertTSType(node, opts) {
  9045. assert$1("TSType", node, opts);
  9046. }
  9047. function assertTSBaseType(node, opts) {
  9048. assert$1("TSBaseType", node, opts);
  9049. }
  9050. function assertNumberLiteral(node, opts) {
  9051. console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
  9052. assert$1("NumberLiteral", node, opts);
  9053. }
  9054. function assertRegexLiteral(node, opts) {
  9055. console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
  9056. assert$1("RegexLiteral", node, opts);
  9057. }
  9058. function assertRestProperty(node, opts) {
  9059. console.trace("The node type RestProperty has been renamed to RestElement");
  9060. assert$1("RestProperty", node, opts);
  9061. }
  9062. function assertSpreadProperty(node, opts) {
  9063. console.trace("The node type SpreadProperty has been renamed to SpreadElement");
  9064. assert$1("SpreadProperty", node, opts);
  9065. }
  9066. function createTypeAnnotationBasedOnTypeof(type) {
  9067. if (type === "string") {
  9068. return stringTypeAnnotation();
  9069. } else if (type === "number") {
  9070. return numberTypeAnnotation();
  9071. } else if (type === "undefined") {
  9072. return voidTypeAnnotation();
  9073. } else if (type === "boolean") {
  9074. return booleanTypeAnnotation();
  9075. } else if (type === "function") {
  9076. return genericTypeAnnotation(identifier("Function"));
  9077. } else if (type === "object") {
  9078. return genericTypeAnnotation(identifier("Object"));
  9079. } else if (type === "symbol") {
  9080. return genericTypeAnnotation(identifier("Symbol"));
  9081. } else if (type === "bigint") {
  9082. return anyTypeAnnotation();
  9083. } else {
  9084. throw new Error("Invalid typeof value: " + type);
  9085. }
  9086. }
  9087. function getQualifiedName(node) {
  9088. return isIdentifier(node) ? node.name : node.id.name + "." + getQualifiedName(node.qualification);
  9089. }
  9090. function removeTypeDuplicates$1(nodes) {
  9091. var generics = {};
  9092. var bases = {};
  9093. var typeGroups = [];
  9094. var types = [];
  9095. for (var i = 0; i < nodes.length; i++) {
  9096. var node = nodes[i];
  9097. if (!node) continue;
  9098. if (types.indexOf(node) >= 0) {
  9099. continue;
  9100. }
  9101. if (isAnyTypeAnnotation(node)) {
  9102. return [node];
  9103. }
  9104. if (isFlowBaseAnnotation(node)) {
  9105. bases[node.type] = node;
  9106. continue;
  9107. }
  9108. if (isUnionTypeAnnotation(node)) {
  9109. if (typeGroups.indexOf(node.types) < 0) {
  9110. nodes = nodes.concat(node.types);
  9111. typeGroups.push(node.types);
  9112. }
  9113. continue;
  9114. }
  9115. if (isGenericTypeAnnotation(node)) {
  9116. var name = getQualifiedName(node.id);
  9117. if (generics[name]) {
  9118. var existing = generics[name];
  9119. if (existing.typeParameters) {
  9120. if (node.typeParameters) {
  9121. existing.typeParameters.params = removeTypeDuplicates$1(existing.typeParameters.params.concat(node.typeParameters.params));
  9122. }
  9123. } else {
  9124. existing = node.typeParameters;
  9125. }
  9126. } else {
  9127. generics[name] = node;
  9128. }
  9129. continue;
  9130. }
  9131. types.push(node);
  9132. }
  9133. for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {
  9134. var type = _Object$keys[_i];
  9135. types.push(bases[type]);
  9136. }
  9137. for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {
  9138. var _name = _Object$keys2[_i2];
  9139. types.push(generics[_name]);
  9140. }
  9141. return types;
  9142. }
  9143. function createFlowUnionType(types) {
  9144. var flattened = removeTypeDuplicates$1(types);
  9145. if (flattened.length === 1) {
  9146. return flattened[0];
  9147. } else {
  9148. return unionTypeAnnotation(flattened);
  9149. }
  9150. }
  9151. function removeTypeDuplicates(nodes) {
  9152. var generics = {};
  9153. var bases = {};
  9154. var typeGroups = [];
  9155. var types = [];
  9156. for (var i = 0; i < nodes.length; i++) {
  9157. var node = nodes[i];
  9158. if (!node) continue;
  9159. if (types.indexOf(node) >= 0) {
  9160. continue;
  9161. }
  9162. if (isTSAnyKeyword(node)) {
  9163. return [node];
  9164. }
  9165. if (isTSBaseType(node)) {
  9166. bases[node.type] = node;
  9167. continue;
  9168. }
  9169. if (isTSUnionType(node)) {
  9170. if (typeGroups.indexOf(node.types) < 0) {
  9171. nodes = nodes.concat(node.types);
  9172. typeGroups.push(node.types);
  9173. }
  9174. continue;
  9175. }
  9176. types.push(node);
  9177. }
  9178. for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {
  9179. var type = _Object$keys[_i];
  9180. types.push(bases[type]);
  9181. }
  9182. for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {
  9183. var name = _Object$keys2[_i2];
  9184. types.push(generics[name]);
  9185. }
  9186. return types;
  9187. }
  9188. function createTSUnionType(typeAnnotations) {
  9189. var types = typeAnnotations.map(function (type) {
  9190. return type.typeAnnotation;
  9191. });
  9192. var flattened = removeTypeDuplicates(types);
  9193. if (flattened.length === 1) {
  9194. return flattened[0];
  9195. } else {
  9196. return tsUnionType(flattened);
  9197. }
  9198. }
  9199. var has$d = Function.call.bind(Object.prototype.hasOwnProperty);
  9200. function cloneIfNode(obj, deep, withoutLoc) {
  9201. if (obj && typeof obj.type === "string") {
  9202. return cloneNode(obj, deep, withoutLoc);
  9203. }
  9204. return obj;
  9205. }
  9206. function cloneIfNodeOrArray(obj, deep, withoutLoc) {
  9207. if (Array.isArray(obj)) {
  9208. return obj.map(function (node) {
  9209. return cloneIfNode(node, deep, withoutLoc);
  9210. });
  9211. }
  9212. return cloneIfNode(obj, deep, withoutLoc);
  9213. }
  9214. function cloneNode(node, deep, withoutLoc) {
  9215. if (deep === void 0) {
  9216. deep = true;
  9217. }
  9218. if (withoutLoc === void 0) {
  9219. withoutLoc = false;
  9220. }
  9221. if (!node) return node;
  9222. var type = node.type;
  9223. var newNode = {
  9224. type: node.type
  9225. };
  9226. if (isIdentifier(node)) {
  9227. newNode.name = node.name;
  9228. if (has$d(node, "optional") && typeof node.optional === "boolean") {
  9229. newNode.optional = node.optional;
  9230. }
  9231. if (has$d(node, "typeAnnotation")) {
  9232. newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
  9233. }
  9234. } else if (!has$d(NODE_FIELDS, type)) {
  9235. throw new Error("Unknown node type: \"" + type + "\"");
  9236. } else {
  9237. for (var _i = 0, _Object$keys = Object.keys(NODE_FIELDS[type]); _i < _Object$keys.length; _i++) {
  9238. var field = _Object$keys[_i];
  9239. if (has$d(node, field)) {
  9240. if (deep) {
  9241. newNode[field] = isFile(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
  9242. } else {
  9243. newNode[field] = node[field];
  9244. }
  9245. }
  9246. }
  9247. }
  9248. if (has$d(node, "loc")) {
  9249. if (withoutLoc) {
  9250. newNode.loc = null;
  9251. } else {
  9252. newNode.loc = node.loc;
  9253. }
  9254. }
  9255. if (has$d(node, "leadingComments")) {
  9256. newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
  9257. }
  9258. if (has$d(node, "innerComments")) {
  9259. newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
  9260. }
  9261. if (has$d(node, "trailingComments")) {
  9262. newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
  9263. }
  9264. if (has$d(node, "extra")) {
  9265. newNode.extra = Object.assign({}, node.extra);
  9266. }
  9267. return newNode;
  9268. }
  9269. function maybeCloneComments(comments, deep, withoutLoc) {
  9270. if (!comments || !deep) {
  9271. return comments;
  9272. }
  9273. return comments.map(function (_ref) {
  9274. var type = _ref.type,
  9275. value = _ref.value,
  9276. loc = _ref.loc;
  9277. if (withoutLoc) {
  9278. return {
  9279. type: type,
  9280. value: value,
  9281. loc: null
  9282. };
  9283. }
  9284. return {
  9285. type: type,
  9286. value: value,
  9287. loc: loc
  9288. };
  9289. });
  9290. }
  9291. function clone(node) {
  9292. return cloneNode(node, false);
  9293. }
  9294. function cloneDeep$1(node) {
  9295. return cloneNode(node);
  9296. }
  9297. function cloneDeepWithoutLoc(node) {
  9298. return cloneNode(node, true, true);
  9299. }
  9300. function cloneWithoutLoc(node) {
  9301. return cloneNode(node, false, true);
  9302. }
  9303. function addComments$1(node, type, comments) {
  9304. if (!comments || !node) return node;
  9305. var key = type + "Comments";
  9306. if (node[key]) {
  9307. if (type === "leading") {
  9308. node[key] = comments.concat(node[key]);
  9309. } else {
  9310. node[key] = node[key].concat(comments);
  9311. }
  9312. } else {
  9313. node[key] = comments;
  9314. }
  9315. return node;
  9316. }
  9317. function addComment$1(node, type, content, line) {
  9318. return addComments$1(node, type, [{
  9319. type: line ? "CommentLine" : "CommentBlock",
  9320. value: content
  9321. }]);
  9322. }
  9323. function inherit(key, child, parent) {
  9324. if (child && parent) {
  9325. child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
  9326. }
  9327. }
  9328. function inheritInnerComments(child, parent) {
  9329. inherit("innerComments", child, parent);
  9330. }
  9331. function inheritLeadingComments(child, parent) {
  9332. inherit("leadingComments", child, parent);
  9333. }
  9334. function inheritTrailingComments(child, parent) {
  9335. inherit("trailingComments", child, parent);
  9336. }
  9337. function inheritsComments(child, parent) {
  9338. inheritTrailingComments(child, parent);
  9339. inheritLeadingComments(child, parent);
  9340. inheritInnerComments(child, parent);
  9341. return child;
  9342. }
  9343. function removeComments(node) {
  9344. COMMENT_KEYS.forEach(function (key) {
  9345. node[key] = null;
  9346. });
  9347. return node;
  9348. }
  9349. var EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS["Expression"];
  9350. var BINARY_TYPES = FLIPPED_ALIAS_KEYS["Binary"];
  9351. var SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS["Scopable"];
  9352. var BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS["BlockParent"];
  9353. var BLOCK_TYPES = FLIPPED_ALIAS_KEYS["Block"];
  9354. var STATEMENT_TYPES = FLIPPED_ALIAS_KEYS["Statement"];
  9355. var TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS["Terminatorless"];
  9356. var COMPLETIONSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS["CompletionStatement"];
  9357. var CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS["Conditional"];
  9358. var LOOP_TYPES = FLIPPED_ALIAS_KEYS["Loop"];
  9359. var WHILE_TYPES = FLIPPED_ALIAS_KEYS["While"];
  9360. var EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
  9361. var FOR_TYPES = FLIPPED_ALIAS_KEYS["For"];
  9362. var FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS["ForXStatement"];
  9363. var FUNCTION_TYPES = FLIPPED_ALIAS_KEYS["Function"];
  9364. var FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS["FunctionParent"];
  9365. var PUREISH_TYPES = FLIPPED_ALIAS_KEYS["Pureish"];
  9366. var DECLARATION_TYPES = FLIPPED_ALIAS_KEYS["Declaration"];
  9367. var PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS["PatternLike"];
  9368. var LVAL_TYPES = FLIPPED_ALIAS_KEYS["LVal"];
  9369. var TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS["TSEntityName"];
  9370. var LITERAL_TYPES = FLIPPED_ALIAS_KEYS["Literal"];
  9371. var IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS["Immutable"];
  9372. var USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS["UserWhitespacable"];
  9373. var METHOD_TYPES = FLIPPED_ALIAS_KEYS["Method"];
  9374. var OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS["ObjectMember"];
  9375. var PROPERTY_TYPES = FLIPPED_ALIAS_KEYS["Property"];
  9376. var UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS["UnaryLike"];
  9377. var PATTERN_TYPES = FLIPPED_ALIAS_KEYS["Pattern"];
  9378. var CLASS_TYPES = FLIPPED_ALIAS_KEYS["Class"];
  9379. var MODULEDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
  9380. var EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ExportDeclaration"];
  9381. var MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
  9382. var FLOW_TYPES = FLIPPED_ALIAS_KEYS["Flow"];
  9383. var FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS["FlowType"];
  9384. var FLOWBASEANNOTATION_TYPES = FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
  9385. var FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["FlowDeclaration"];
  9386. var FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS["FlowPredicate"];
  9387. var ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS["EnumBody"];
  9388. var ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS["EnumMember"];
  9389. var JSX_TYPES = FLIPPED_ALIAS_KEYS["JSX"];
  9390. var PRIVATE_TYPES = FLIPPED_ALIAS_KEYS["Private"];
  9391. var TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS["TSTypeElement"];
  9392. var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS["TSType"];
  9393. var TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS["TSBaseType"];
  9394. function toBlock(node, parent) {
  9395. if (isBlockStatement(node)) {
  9396. return node;
  9397. }
  9398. var blockNodes = [];
  9399. if (isEmptyStatement(node)) {
  9400. blockNodes = [];
  9401. } else {
  9402. if (!isStatement(node)) {
  9403. if (isFunction$1(parent)) {
  9404. node = returnStatement(node);
  9405. } else {
  9406. node = expressionStatement(node);
  9407. }
  9408. }
  9409. blockNodes = [node];
  9410. }
  9411. return blockStatement(blockNodes);
  9412. }
  9413. function ensureBlock$1(node, key) {
  9414. if (key === void 0) {
  9415. key = "body";
  9416. }
  9417. return node[key] = toBlock(node[key], node);
  9418. }
  9419. function toIdentifier(input) {
  9420. input = input + "";
  9421. var name = "";
  9422. for (var _iterator = _createForOfIteratorHelperLoose(input), _step; !(_step = _iterator()).done;) {
  9423. var c = _step.value;
  9424. name += isIdentifierChar(c.codePointAt(0)) ? c : "-";
  9425. }
  9426. name = name.replace(/^[-0-9]+/, "");
  9427. name = name.replace(/[-\s]+(.)?/g, function (match, c) {
  9428. return c ? c.toUpperCase() : "";
  9429. });
  9430. if (!isValidIdentifier(name)) {
  9431. name = "_" + name;
  9432. }
  9433. return name || "_";
  9434. }
  9435. function toBindingIdentifierName(name) {
  9436. name = toIdentifier(name);
  9437. if (name === "eval" || name === "arguments") name = "_" + name;
  9438. return name;
  9439. }
  9440. function toComputedKey$1(node, key) {
  9441. if (key === void 0) {
  9442. key = node.key || node.property;
  9443. }
  9444. if (!node.computed && isIdentifier(key)) key = stringLiteral(key.name);
  9445. return key;
  9446. }
  9447. function toExpression(node) {
  9448. if (isExpressionStatement(node)) {
  9449. node = node.expression;
  9450. }
  9451. if (isExpression(node)) {
  9452. return node;
  9453. }
  9454. if (isClass(node)) {
  9455. node.type = "ClassExpression";
  9456. } else if (isFunction$1(node)) {
  9457. node.type = "FunctionExpression";
  9458. }
  9459. if (!isExpression(node)) {
  9460. throw new Error("cannot turn " + node.type + " to an expression");
  9461. }
  9462. return node;
  9463. }
  9464. function traverseFast(node, enter, opts) {
  9465. if (!node) return;
  9466. var keys = VISITOR_KEYS[node.type];
  9467. if (!keys) return;
  9468. opts = opts || {};
  9469. enter(node, opts);
  9470. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  9471. var key = _step.value;
  9472. var subNode = node[key];
  9473. if (Array.isArray(subNode)) {
  9474. for (var _iterator2 = _createForOfIteratorHelperLoose(subNode), _step2; !(_step2 = _iterator2()).done;) {
  9475. var _node = _step2.value;
  9476. traverseFast(_node, enter, opts);
  9477. }
  9478. } else {
  9479. traverseFast(subNode, enter, opts);
  9480. }
  9481. }
  9482. }
  9483. var CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
  9484. var CLEAR_KEYS_PLUS_COMMENTS = COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
  9485. function removeProperties(node, opts) {
  9486. if (opts === void 0) {
  9487. opts = {};
  9488. }
  9489. var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
  9490. for (var _iterator = _createForOfIteratorHelperLoose(map), _step; !(_step = _iterator()).done;) {
  9491. var _key = _step.value;
  9492. if (node[_key] != null) node[_key] = undefined;
  9493. }
  9494. for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {
  9495. var key = _Object$keys[_i];
  9496. if (key[0] === "_" && node[key] != null) node[key] = undefined;
  9497. }
  9498. var symbols = Object.getOwnPropertySymbols(node);
  9499. for (var _iterator2 = _createForOfIteratorHelperLoose(symbols), _step2; !(_step2 = _iterator2()).done;) {
  9500. var sym = _step2.value;
  9501. node[sym] = null;
  9502. }
  9503. }
  9504. function removePropertiesDeep(tree, opts) {
  9505. traverseFast(tree, removeProperties, opts);
  9506. return tree;
  9507. }
  9508. function toKeyAlias(node, key) {
  9509. if (key === void 0) {
  9510. key = node.key;
  9511. }
  9512. var alias;
  9513. if (node.kind === "method") {
  9514. return toKeyAlias.increment() + "";
  9515. } else if (isIdentifier(key)) {
  9516. alias = key.name;
  9517. } else if (isStringLiteral(key)) {
  9518. alias = JSON.stringify(key.value);
  9519. } else {
  9520. alias = JSON.stringify(removePropertiesDeep(cloneNode(key)));
  9521. }
  9522. if (node.computed) {
  9523. alias = "[" + alias + "]";
  9524. }
  9525. if (node["static"]) {
  9526. alias = "static:" + alias;
  9527. }
  9528. return alias;
  9529. }
  9530. toKeyAlias.uid = 0;
  9531. toKeyAlias.increment = function () {
  9532. if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
  9533. return toKeyAlias.uid = 0;
  9534. } else {
  9535. return toKeyAlias.uid++;
  9536. }
  9537. };
  9538. function getBindingIdentifiers$1(node, duplicates, outerOnly) {
  9539. var search = [].concat(node);
  9540. var ids = Object.create(null);
  9541. while (search.length) {
  9542. var id = search.shift();
  9543. if (!id) continue;
  9544. var keys = getBindingIdentifiers$1.keys[id.type];
  9545. if (isIdentifier(id)) {
  9546. if (duplicates) {
  9547. var _ids = ids[id.name] = ids[id.name] || [];
  9548. _ids.push(id);
  9549. } else {
  9550. ids[id.name] = id;
  9551. }
  9552. continue;
  9553. }
  9554. if (isExportDeclaration(id) && !isExportAllDeclaration(id)) {
  9555. if (isDeclaration(id.declaration)) {
  9556. search.push(id.declaration);
  9557. }
  9558. continue;
  9559. }
  9560. if (outerOnly) {
  9561. if (isFunctionDeclaration(id)) {
  9562. search.push(id.id);
  9563. continue;
  9564. }
  9565. if (isFunctionExpression(id)) {
  9566. continue;
  9567. }
  9568. }
  9569. if (keys) {
  9570. for (var i = 0; i < keys.length; i++) {
  9571. var key = keys[i];
  9572. if (id[key]) {
  9573. search = search.concat(id[key]);
  9574. }
  9575. }
  9576. }
  9577. }
  9578. return ids;
  9579. }
  9580. getBindingIdentifiers$1.keys = {
  9581. DeclareClass: ["id"],
  9582. DeclareFunction: ["id"],
  9583. DeclareModule: ["id"],
  9584. DeclareVariable: ["id"],
  9585. DeclareInterface: ["id"],
  9586. DeclareTypeAlias: ["id"],
  9587. DeclareOpaqueType: ["id"],
  9588. InterfaceDeclaration: ["id"],
  9589. TypeAlias: ["id"],
  9590. OpaqueType: ["id"],
  9591. CatchClause: ["param"],
  9592. LabeledStatement: ["label"],
  9593. UnaryExpression: ["argument"],
  9594. AssignmentExpression: ["left"],
  9595. ImportSpecifier: ["local"],
  9596. ImportNamespaceSpecifier: ["local"],
  9597. ImportDefaultSpecifier: ["local"],
  9598. ImportDeclaration: ["specifiers"],
  9599. ExportSpecifier: ["exported"],
  9600. ExportNamespaceSpecifier: ["exported"],
  9601. ExportDefaultSpecifier: ["exported"],
  9602. FunctionDeclaration: ["id", "params"],
  9603. FunctionExpression: ["id", "params"],
  9604. ArrowFunctionExpression: ["params"],
  9605. ObjectMethod: ["params"],
  9606. ClassMethod: ["params"],
  9607. ForInStatement: ["left"],
  9608. ForOfStatement: ["left"],
  9609. ClassDeclaration: ["id"],
  9610. ClassExpression: ["id"],
  9611. RestElement: ["argument"],
  9612. UpdateExpression: ["argument"],
  9613. ObjectProperty: ["value"],
  9614. AssignmentPattern: ["left"],
  9615. ArrayPattern: ["elements"],
  9616. ObjectPattern: ["properties"],
  9617. VariableDeclaration: ["declarations"],
  9618. VariableDeclarator: ["id"]
  9619. };
  9620. function gatherSequenceExpressions(nodes, scope, declars) {
  9621. var exprs = [];
  9622. var ensureLastUndefined = true;
  9623. for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {
  9624. var node = _step.value;
  9625. if (!isEmptyStatement(node)) {
  9626. ensureLastUndefined = false;
  9627. }
  9628. if (isExpression(node)) {
  9629. exprs.push(node);
  9630. } else if (isExpressionStatement(node)) {
  9631. exprs.push(node.expression);
  9632. } else if (isVariableDeclaration(node)) {
  9633. if (node.kind !== "var") return;
  9634. for (var _iterator2 = _createForOfIteratorHelperLoose(node.declarations), _step2; !(_step2 = _iterator2()).done;) {
  9635. var declar = _step2.value;
  9636. var bindings = getBindingIdentifiers$1(declar);
  9637. for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) {
  9638. var key = _Object$keys[_i];
  9639. declars.push({
  9640. kind: node.kind,
  9641. id: cloneNode(bindings[key])
  9642. });
  9643. }
  9644. if (declar.init) {
  9645. exprs.push(assignmentExpression("=", declar.id, declar.init));
  9646. }
  9647. }
  9648. ensureLastUndefined = true;
  9649. } else if (isIfStatement(node)) {
  9650. var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
  9651. var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
  9652. if (!consequent || !alternate) return;
  9653. exprs.push(conditionalExpression(node.test, consequent, alternate));
  9654. } else if (isBlockStatement(node)) {
  9655. var body = gatherSequenceExpressions(node.body, scope, declars);
  9656. if (!body) return;
  9657. exprs.push(body);
  9658. } else if (isEmptyStatement(node)) {
  9659. if (nodes.indexOf(node) === 0) {
  9660. ensureLastUndefined = true;
  9661. }
  9662. } else {
  9663. return;
  9664. }
  9665. }
  9666. if (ensureLastUndefined) {
  9667. exprs.push(scope.buildUndefinedNode());
  9668. }
  9669. if (exprs.length === 1) {
  9670. return exprs[0];
  9671. } else {
  9672. return sequenceExpression(exprs);
  9673. }
  9674. }
  9675. function toSequenceExpression(nodes, scope) {
  9676. if (!(nodes != null && nodes.length)) return;
  9677. var declars = [];
  9678. var result = gatherSequenceExpressions(nodes, scope, declars);
  9679. if (!result) return;
  9680. for (var _i = 0, _declars = declars; _i < _declars.length; _i++) {
  9681. var declar = _declars[_i];
  9682. scope.push(declar);
  9683. }
  9684. return result;
  9685. }
  9686. function toStatement(node, ignore) {
  9687. if (isStatement(node)) {
  9688. return node;
  9689. }
  9690. var mustHaveId = false;
  9691. var newType;
  9692. if (isClass(node)) {
  9693. mustHaveId = true;
  9694. newType = "ClassDeclaration";
  9695. } else if (isFunction$1(node)) {
  9696. mustHaveId = true;
  9697. newType = "FunctionDeclaration";
  9698. } else if (isAssignmentExpression(node)) {
  9699. return expressionStatement(node);
  9700. }
  9701. if (mustHaveId && !node.id) {
  9702. newType = false;
  9703. }
  9704. if (!newType) {
  9705. if (ignore) {
  9706. return false;
  9707. } else {
  9708. throw new Error("cannot turn " + node.type + " to a statement");
  9709. }
  9710. }
  9711. node.type = newType;
  9712. return node;
  9713. }
  9714. var objectToString = Function.call.bind(Object.prototype.toString);
  9715. function isRegExp(value) {
  9716. return objectToString(value) === "[object RegExp]";
  9717. }
  9718. function isPlainObject(value) {
  9719. if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
  9720. return false;
  9721. }
  9722. var proto = Object.getPrototypeOf(value);
  9723. return proto === null || Object.getPrototypeOf(proto) === null;
  9724. }
  9725. function valueToNode(value) {
  9726. if (value === undefined) {
  9727. return identifier("undefined");
  9728. }
  9729. if (value === true || value === false) {
  9730. return booleanLiteral(value);
  9731. }
  9732. if (value === null) {
  9733. return nullLiteral();
  9734. }
  9735. if (typeof value === "string") {
  9736. return stringLiteral(value);
  9737. }
  9738. if (typeof value === "number") {
  9739. var result;
  9740. if (Number.isFinite(value)) {
  9741. result = numericLiteral(Math.abs(value));
  9742. } else {
  9743. var numerator;
  9744. if (Number.isNaN(value)) {
  9745. numerator = numericLiteral(0);
  9746. } else {
  9747. numerator = numericLiteral(1);
  9748. }
  9749. result = binaryExpression("/", numerator, numericLiteral(0));
  9750. }
  9751. if (value < 0 || Object.is(value, -0)) {
  9752. result = unaryExpression("-", result);
  9753. }
  9754. return result;
  9755. }
  9756. if (isRegExp(value)) {
  9757. var pattern = value.source;
  9758. var flags = value.toString().match(/\/([a-z]+|)$/)[1];
  9759. return regExpLiteral(pattern, flags);
  9760. }
  9761. if (Array.isArray(value)) {
  9762. return arrayExpression(value.map(valueToNode));
  9763. }
  9764. if (isPlainObject(value)) {
  9765. var props = [];
  9766. for (var _i = 0, _Object$keys = Object.keys(value); _i < _Object$keys.length; _i++) {
  9767. var key = _Object$keys[_i];
  9768. var nodeKey = void 0;
  9769. if (isValidIdentifier(key)) {
  9770. nodeKey = identifier(key);
  9771. } else {
  9772. nodeKey = stringLiteral(key);
  9773. }
  9774. props.push(objectProperty(nodeKey, valueToNode(value[key])));
  9775. }
  9776. return objectExpression(props);
  9777. }
  9778. throw new Error("don't know how to turn this value into a node");
  9779. }
  9780. function appendToMemberExpression(member, append, computed) {
  9781. if (computed === void 0) {
  9782. computed = false;
  9783. }
  9784. member.object = memberExpression(member.object, member.property, member.computed);
  9785. member.property = append;
  9786. member.computed = !!computed;
  9787. return member;
  9788. }
  9789. function inherits(child, parent) {
  9790. if (!child || !parent) return child;
  9791. for (var _iterator = _createForOfIteratorHelperLoose(INHERIT_KEYS.optional), _step; !(_step = _iterator()).done;) {
  9792. var _key = _step.value;
  9793. if (child[_key] == null) {
  9794. child[_key] = parent[_key];
  9795. }
  9796. }
  9797. for (var _i = 0, _Object$keys = Object.keys(parent); _i < _Object$keys.length; _i++) {
  9798. var key = _Object$keys[_i];
  9799. if (key[0] === "_" && key !== "__clone") child[key] = parent[key];
  9800. }
  9801. for (var _iterator2 = _createForOfIteratorHelperLoose(INHERIT_KEYS.force), _step2; !(_step2 = _iterator2()).done;) {
  9802. var _key2 = _step2.value;
  9803. child[_key2] = parent[_key2];
  9804. }
  9805. inheritsComments(child, parent);
  9806. return child;
  9807. }
  9808. function prependToMemberExpression(member, prepend) {
  9809. member.object = memberExpression(prepend, member.object);
  9810. return member;
  9811. }
  9812. function getOuterBindingIdentifiers$1(node, duplicates) {
  9813. return getBindingIdentifiers$1(node, duplicates, true);
  9814. }
  9815. function traverse$1(node, handlers, state) {
  9816. if (typeof handlers === "function") {
  9817. handlers = {
  9818. enter: handlers
  9819. };
  9820. }
  9821. var _ref = handlers,
  9822. enter = _ref.enter,
  9823. exit = _ref.exit;
  9824. traverseSimpleImpl(node, enter, exit, state, []);
  9825. }
  9826. function traverseSimpleImpl(node, enter, exit, state, ancestors) {
  9827. var keys = VISITOR_KEYS[node.type];
  9828. if (!keys) return;
  9829. if (enter) enter(node, ancestors, state);
  9830. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  9831. var key = _step.value;
  9832. var subNode = node[key];
  9833. if (Array.isArray(subNode)) {
  9834. for (var i = 0; i < subNode.length; i++) {
  9835. var child = subNode[i];
  9836. if (!child) continue;
  9837. ancestors.push({
  9838. node: node,
  9839. key: key,
  9840. index: i
  9841. });
  9842. traverseSimpleImpl(child, enter, exit, state, ancestors);
  9843. ancestors.pop();
  9844. }
  9845. } else if (subNode) {
  9846. ancestors.push({
  9847. node: node,
  9848. key: key
  9849. });
  9850. traverseSimpleImpl(subNode, enter, exit, state, ancestors);
  9851. ancestors.pop();
  9852. }
  9853. }
  9854. if (exit) exit(node, ancestors, state);
  9855. }
  9856. function isBinding(node, parent, grandparent) {
  9857. if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
  9858. return false;
  9859. }
  9860. var keys = getBindingIdentifiers$1.keys[parent.type];
  9861. if (keys) {
  9862. for (var i = 0; i < keys.length; i++) {
  9863. var key = keys[i];
  9864. var val = parent[key];
  9865. if (Array.isArray(val)) {
  9866. if (val.indexOf(node) >= 0) return true;
  9867. } else {
  9868. if (val === node) return true;
  9869. }
  9870. }
  9871. }
  9872. return false;
  9873. }
  9874. function isLet(node) {
  9875. return isVariableDeclaration(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
  9876. }
  9877. function isBlockScoped$1(node) {
  9878. return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);
  9879. }
  9880. function isImmutable(node) {
  9881. if (isType$1(node.type, "Immutable")) return true;
  9882. if (isIdentifier(node)) {
  9883. if (node.name === "undefined") {
  9884. return true;
  9885. } else {
  9886. return false;
  9887. }
  9888. }
  9889. return false;
  9890. }
  9891. function isNodesEquivalent(a, b) {
  9892. if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
  9893. return a === b;
  9894. }
  9895. if (a.type !== b.type) {
  9896. return false;
  9897. }
  9898. var fields = Object.keys(NODE_FIELDS[a.type] || a.type);
  9899. var visitorKeys = VISITOR_KEYS[a.type];
  9900. for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {
  9901. var field = _fields[_i];
  9902. if (typeof a[field] !== typeof b[field]) {
  9903. return false;
  9904. }
  9905. if (a[field] == null && b[field] == null) {
  9906. continue;
  9907. } else if (a[field] == null || b[field] == null) {
  9908. return false;
  9909. }
  9910. if (Array.isArray(a[field])) {
  9911. if (!Array.isArray(b[field])) {
  9912. return false;
  9913. }
  9914. if (a[field].length !== b[field].length) {
  9915. return false;
  9916. }
  9917. for (var i = 0; i < a[field].length; i++) {
  9918. if (!isNodesEquivalent(a[field][i], b[field][i])) {
  9919. return false;
  9920. }
  9921. }
  9922. continue;
  9923. }
  9924. if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
  9925. for (var _i2 = 0, _Object$keys = Object.keys(a[field]); _i2 < _Object$keys.length; _i2++) {
  9926. var key = _Object$keys[_i2];
  9927. if (a[field][key] !== b[field][key]) {
  9928. return false;
  9929. }
  9930. }
  9931. continue;
  9932. }
  9933. if (!isNodesEquivalent(a[field], b[field])) {
  9934. return false;
  9935. }
  9936. }
  9937. return true;
  9938. }
  9939. function isReferenced(node, parent, grandparent) {
  9940. switch (parent.type) {
  9941. case "MemberExpression":
  9942. case "JSXMemberExpression":
  9943. case "OptionalMemberExpression":
  9944. if (parent.property === node) {
  9945. return !!parent.computed;
  9946. }
  9947. return parent.object === node;
  9948. case "VariableDeclarator":
  9949. return parent.init === node;
  9950. case "ArrowFunctionExpression":
  9951. return parent.body === node;
  9952. case "PrivateName":
  9953. return false;
  9954. case "ClassMethod":
  9955. case "ClassPrivateMethod":
  9956. case "ObjectMethod":
  9957. if (parent.params.includes(node)) {
  9958. return false;
  9959. }
  9960. case "ObjectProperty":
  9961. case "ClassProperty":
  9962. case "ClassPrivateProperty":
  9963. if (parent.key === node) {
  9964. return !!parent.computed;
  9965. }
  9966. if (parent.value === node) {
  9967. return !grandparent || grandparent.type !== "ObjectPattern";
  9968. }
  9969. return true;
  9970. case "ClassDeclaration":
  9971. case "ClassExpression":
  9972. return parent.superClass === node;
  9973. case "AssignmentExpression":
  9974. return parent.right === node;
  9975. case "AssignmentPattern":
  9976. return parent.right === node;
  9977. case "LabeledStatement":
  9978. return false;
  9979. case "CatchClause":
  9980. return false;
  9981. case "RestElement":
  9982. return false;
  9983. case "BreakStatement":
  9984. case "ContinueStatement":
  9985. return false;
  9986. case "FunctionDeclaration":
  9987. case "FunctionExpression":
  9988. return false;
  9989. case "ExportNamespaceSpecifier":
  9990. case "ExportDefaultSpecifier":
  9991. return false;
  9992. case "ExportSpecifier":
  9993. if (grandparent != null && grandparent.source) {
  9994. return false;
  9995. }
  9996. return parent.local === node;
  9997. case "ImportDefaultSpecifier":
  9998. case "ImportNamespaceSpecifier":
  9999. case "ImportSpecifier":
  10000. return false;
  10001. case "JSXAttribute":
  10002. return false;
  10003. case "ObjectPattern":
  10004. case "ArrayPattern":
  10005. return false;
  10006. case "MetaProperty":
  10007. return false;
  10008. case "ObjectTypeProperty":
  10009. return parent.key !== node;
  10010. case "TSEnumMember":
  10011. return parent.id !== node;
  10012. case "TSPropertySignature":
  10013. if (parent.key === node) {
  10014. return !!parent.computed;
  10015. }
  10016. return true;
  10017. }
  10018. return true;
  10019. }
  10020. function isScope(node, parent) {
  10021. if (isBlockStatement(node) && (isFunction$1(parent) || isCatchClause(parent))) {
  10022. return false;
  10023. }
  10024. if (isPattern(node) && (isFunction$1(parent) || isCatchClause(parent))) {
  10025. return true;
  10026. }
  10027. return isScopable(node);
  10028. }
  10029. function isSpecifierDefault(specifier) {
  10030. return isImportDefaultSpecifier(specifier) || isIdentifier(specifier.imported || specifier.exported, {
  10031. name: "default"
  10032. });
  10033. }
  10034. var RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
  10035. function isValidES3Identifier(name) {
  10036. return isValidIdentifier(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
  10037. }
  10038. function isVar$1(node) {
  10039. return isVariableDeclaration(node, {
  10040. kind: "var"
  10041. }) && !node[BLOCK_SCOPED_SYMBOL];
  10042. }
  10043. var react = {
  10044. isReactComponent: isReactComponent,
  10045. isCompatTag: isCompatTag,
  10046. buildChildren: buildChildren
  10047. };
  10048. var t$p = /*#__PURE__*/Object.freeze({
  10049. __proto__: null,
  10050. react: react,
  10051. assertNode: assertNode,
  10052. createTypeAnnotationBasedOnTypeof: createTypeAnnotationBasedOnTypeof,
  10053. createUnionTypeAnnotation: createFlowUnionType,
  10054. createFlowUnionType: createFlowUnionType,
  10055. createTSUnionType: createTSUnionType,
  10056. cloneNode: cloneNode,
  10057. clone: clone,
  10058. cloneDeep: cloneDeep$1,
  10059. cloneDeepWithoutLoc: cloneDeepWithoutLoc,
  10060. cloneWithoutLoc: cloneWithoutLoc,
  10061. addComment: addComment$1,
  10062. addComments: addComments$1,
  10063. inheritInnerComments: inheritInnerComments,
  10064. inheritLeadingComments: inheritLeadingComments,
  10065. inheritsComments: inheritsComments,
  10066. inheritTrailingComments: inheritTrailingComments,
  10067. removeComments: removeComments,
  10068. ensureBlock: ensureBlock$1,
  10069. toBindingIdentifierName: toBindingIdentifierName,
  10070. toBlock: toBlock,
  10071. toComputedKey: toComputedKey$1,
  10072. toExpression: toExpression,
  10073. toIdentifier: toIdentifier,
  10074. toKeyAlias: toKeyAlias,
  10075. toSequenceExpression: toSequenceExpression,
  10076. toStatement: toStatement,
  10077. valueToNode: valueToNode,
  10078. appendToMemberExpression: appendToMemberExpression,
  10079. inherits: inherits,
  10080. prependToMemberExpression: prependToMemberExpression,
  10081. removeProperties: removeProperties,
  10082. removePropertiesDeep: removePropertiesDeep,
  10083. removeTypeDuplicates: removeTypeDuplicates$1,
  10084. getBindingIdentifiers: getBindingIdentifiers$1,
  10085. getOuterBindingIdentifiers: getOuterBindingIdentifiers$1,
  10086. traverse: traverse$1,
  10087. traverseFast: traverseFast,
  10088. shallowEqual: shallowEqual,
  10089. is: is$1,
  10090. isBinding: isBinding,
  10091. isBlockScoped: isBlockScoped$1,
  10092. isImmutable: isImmutable,
  10093. isLet: isLet,
  10094. isNode: isNode,
  10095. isNodesEquivalent: isNodesEquivalent,
  10096. isPlaceholderType: isPlaceholderType,
  10097. isReferenced: isReferenced,
  10098. isScope: isScope,
  10099. isSpecifierDefault: isSpecifierDefault,
  10100. isType: isType$1,
  10101. isValidES3Identifier: isValidES3Identifier,
  10102. isValidIdentifier: isValidIdentifier,
  10103. isVar: isVar$1,
  10104. matchesPattern: matchesPattern$1,
  10105. validate: validate$3,
  10106. buildMatchMemberExpression: buildMatchMemberExpression,
  10107. assertArrayExpression: assertArrayExpression,
  10108. assertAssignmentExpression: assertAssignmentExpression,
  10109. assertBinaryExpression: assertBinaryExpression,
  10110. assertInterpreterDirective: assertInterpreterDirective,
  10111. assertDirective: assertDirective,
  10112. assertDirectiveLiteral: assertDirectiveLiteral,
  10113. assertBlockStatement: assertBlockStatement,
  10114. assertBreakStatement: assertBreakStatement,
  10115. assertCallExpression: assertCallExpression,
  10116. assertCatchClause: assertCatchClause,
  10117. assertConditionalExpression: assertConditionalExpression,
  10118. assertContinueStatement: assertContinueStatement,
  10119. assertDebuggerStatement: assertDebuggerStatement,
  10120. assertDoWhileStatement: assertDoWhileStatement,
  10121. assertEmptyStatement: assertEmptyStatement,
  10122. assertExpressionStatement: assertExpressionStatement,
  10123. assertFile: assertFile,
  10124. assertForInStatement: assertForInStatement,
  10125. assertForStatement: assertForStatement,
  10126. assertFunctionDeclaration: assertFunctionDeclaration,
  10127. assertFunctionExpression: assertFunctionExpression,
  10128. assertIdentifier: assertIdentifier,
  10129. assertIfStatement: assertIfStatement,
  10130. assertLabeledStatement: assertLabeledStatement,
  10131. assertStringLiteral: assertStringLiteral,
  10132. assertNumericLiteral: assertNumericLiteral,
  10133. assertNullLiteral: assertNullLiteral,
  10134. assertBooleanLiteral: assertBooleanLiteral,
  10135. assertRegExpLiteral: assertRegExpLiteral,
  10136. assertLogicalExpression: assertLogicalExpression,
  10137. assertMemberExpression: assertMemberExpression,
  10138. assertNewExpression: assertNewExpression,
  10139. assertProgram: assertProgram,
  10140. assertObjectExpression: assertObjectExpression,
  10141. assertObjectMethod: assertObjectMethod,
  10142. assertObjectProperty: assertObjectProperty,
  10143. assertRestElement: assertRestElement,
  10144. assertReturnStatement: assertReturnStatement,
  10145. assertSequenceExpression: assertSequenceExpression,
  10146. assertParenthesizedExpression: assertParenthesizedExpression,
  10147. assertSwitchCase: assertSwitchCase,
  10148. assertSwitchStatement: assertSwitchStatement,
  10149. assertThisExpression: assertThisExpression,
  10150. assertThrowStatement: assertThrowStatement,
  10151. assertTryStatement: assertTryStatement,
  10152. assertUnaryExpression: assertUnaryExpression,
  10153. assertUpdateExpression: assertUpdateExpression,
  10154. assertVariableDeclaration: assertVariableDeclaration,
  10155. assertVariableDeclarator: assertVariableDeclarator,
  10156. assertWhileStatement: assertWhileStatement,
  10157. assertWithStatement: assertWithStatement,
  10158. assertAssignmentPattern: assertAssignmentPattern,
  10159. assertArrayPattern: assertArrayPattern,
  10160. assertArrowFunctionExpression: assertArrowFunctionExpression,
  10161. assertClassBody: assertClassBody,
  10162. assertClassExpression: assertClassExpression,
  10163. assertClassDeclaration: assertClassDeclaration,
  10164. assertExportAllDeclaration: assertExportAllDeclaration,
  10165. assertExportDefaultDeclaration: assertExportDefaultDeclaration,
  10166. assertExportNamedDeclaration: assertExportNamedDeclaration,
  10167. assertExportSpecifier: assertExportSpecifier$1,
  10168. assertForOfStatement: assertForOfStatement,
  10169. assertImportDeclaration: assertImportDeclaration,
  10170. assertImportDefaultSpecifier: assertImportDefaultSpecifier,
  10171. assertImportNamespaceSpecifier: assertImportNamespaceSpecifier,
  10172. assertImportSpecifier: assertImportSpecifier,
  10173. assertMetaProperty: assertMetaProperty,
  10174. assertClassMethod: assertClassMethod,
  10175. assertObjectPattern: assertObjectPattern,
  10176. assertSpreadElement: assertSpreadElement,
  10177. assertSuper: assertSuper,
  10178. assertTaggedTemplateExpression: assertTaggedTemplateExpression,
  10179. assertTemplateElement: assertTemplateElement,
  10180. assertTemplateLiteral: assertTemplateLiteral,
  10181. assertYieldExpression: assertYieldExpression,
  10182. assertAwaitExpression: assertAwaitExpression,
  10183. assertImport: assertImport,
  10184. assertBigIntLiteral: assertBigIntLiteral,
  10185. assertExportNamespaceSpecifier: assertExportNamespaceSpecifier,
  10186. assertOptionalMemberExpression: assertOptionalMemberExpression,
  10187. assertOptionalCallExpression: assertOptionalCallExpression,
  10188. assertAnyTypeAnnotation: assertAnyTypeAnnotation,
  10189. assertArrayTypeAnnotation: assertArrayTypeAnnotation,
  10190. assertBooleanTypeAnnotation: assertBooleanTypeAnnotation,
  10191. assertBooleanLiteralTypeAnnotation: assertBooleanLiteralTypeAnnotation,
  10192. assertNullLiteralTypeAnnotation: assertNullLiteralTypeAnnotation,
  10193. assertClassImplements: assertClassImplements,
  10194. assertDeclareClass: assertDeclareClass,
  10195. assertDeclareFunction: assertDeclareFunction,
  10196. assertDeclareInterface: assertDeclareInterface,
  10197. assertDeclareModule: assertDeclareModule,
  10198. assertDeclareModuleExports: assertDeclareModuleExports,
  10199. assertDeclareTypeAlias: assertDeclareTypeAlias,
  10200. assertDeclareOpaqueType: assertDeclareOpaqueType,
  10201. assertDeclareVariable: assertDeclareVariable,
  10202. assertDeclareExportDeclaration: assertDeclareExportDeclaration,
  10203. assertDeclareExportAllDeclaration: assertDeclareExportAllDeclaration,
  10204. assertDeclaredPredicate: assertDeclaredPredicate,
  10205. assertExistsTypeAnnotation: assertExistsTypeAnnotation,
  10206. assertFunctionTypeAnnotation: assertFunctionTypeAnnotation,
  10207. assertFunctionTypeParam: assertFunctionTypeParam,
  10208. assertGenericTypeAnnotation: assertGenericTypeAnnotation,
  10209. assertInferredPredicate: assertInferredPredicate,
  10210. assertInterfaceExtends: assertInterfaceExtends,
  10211. assertInterfaceDeclaration: assertInterfaceDeclaration,
  10212. assertInterfaceTypeAnnotation: assertInterfaceTypeAnnotation,
  10213. assertIntersectionTypeAnnotation: assertIntersectionTypeAnnotation,
  10214. assertMixedTypeAnnotation: assertMixedTypeAnnotation,
  10215. assertEmptyTypeAnnotation: assertEmptyTypeAnnotation,
  10216. assertNullableTypeAnnotation: assertNullableTypeAnnotation,
  10217. assertNumberLiteralTypeAnnotation: assertNumberLiteralTypeAnnotation,
  10218. assertNumberTypeAnnotation: assertNumberTypeAnnotation,
  10219. assertObjectTypeAnnotation: assertObjectTypeAnnotation,
  10220. assertObjectTypeInternalSlot: assertObjectTypeInternalSlot,
  10221. assertObjectTypeCallProperty: assertObjectTypeCallProperty,
  10222. assertObjectTypeIndexer: assertObjectTypeIndexer,
  10223. assertObjectTypeProperty: assertObjectTypeProperty,
  10224. assertObjectTypeSpreadProperty: assertObjectTypeSpreadProperty,
  10225. assertOpaqueType: assertOpaqueType,
  10226. assertQualifiedTypeIdentifier: assertQualifiedTypeIdentifier,
  10227. assertStringLiteralTypeAnnotation: assertStringLiteralTypeAnnotation,
  10228. assertStringTypeAnnotation: assertStringTypeAnnotation,
  10229. assertSymbolTypeAnnotation: assertSymbolTypeAnnotation,
  10230. assertThisTypeAnnotation: assertThisTypeAnnotation,
  10231. assertTupleTypeAnnotation: assertTupleTypeAnnotation,
  10232. assertTypeofTypeAnnotation: assertTypeofTypeAnnotation,
  10233. assertTypeAlias: assertTypeAlias,
  10234. assertTypeAnnotation: assertTypeAnnotation,
  10235. assertTypeCastExpression: assertTypeCastExpression,
  10236. assertTypeParameter: assertTypeParameter,
  10237. assertTypeParameterDeclaration: assertTypeParameterDeclaration,
  10238. assertTypeParameterInstantiation: assertTypeParameterInstantiation,
  10239. assertUnionTypeAnnotation: assertUnionTypeAnnotation,
  10240. assertVariance: assertVariance,
  10241. assertVoidTypeAnnotation: assertVoidTypeAnnotation,
  10242. assertEnumDeclaration: assertEnumDeclaration,
  10243. assertEnumBooleanBody: assertEnumBooleanBody,
  10244. assertEnumNumberBody: assertEnumNumberBody,
  10245. assertEnumStringBody: assertEnumStringBody,
  10246. assertEnumSymbolBody: assertEnumSymbolBody,
  10247. assertEnumBooleanMember: assertEnumBooleanMember,
  10248. assertEnumNumberMember: assertEnumNumberMember,
  10249. assertEnumStringMember: assertEnumStringMember,
  10250. assertEnumDefaultedMember: assertEnumDefaultedMember,
  10251. assertIndexedAccessType: assertIndexedAccessType,
  10252. assertOptionalIndexedAccessType: assertOptionalIndexedAccessType,
  10253. assertJSXAttribute: assertJSXAttribute,
  10254. assertJSXClosingElement: assertJSXClosingElement,
  10255. assertJSXElement: assertJSXElement,
  10256. assertJSXEmptyExpression: assertJSXEmptyExpression,
  10257. assertJSXExpressionContainer: assertJSXExpressionContainer,
  10258. assertJSXSpreadChild: assertJSXSpreadChild,
  10259. assertJSXIdentifier: assertJSXIdentifier,
  10260. assertJSXMemberExpression: assertJSXMemberExpression,
  10261. assertJSXNamespacedName: assertJSXNamespacedName,
  10262. assertJSXOpeningElement: assertJSXOpeningElement,
  10263. assertJSXSpreadAttribute: assertJSXSpreadAttribute,
  10264. assertJSXText: assertJSXText,
  10265. assertJSXFragment: assertJSXFragment,
  10266. assertJSXOpeningFragment: assertJSXOpeningFragment,
  10267. assertJSXClosingFragment: assertJSXClosingFragment,
  10268. assertNoop: assertNoop,
  10269. assertPlaceholder: assertPlaceholder,
  10270. assertV8IntrinsicIdentifier: assertV8IntrinsicIdentifier,
  10271. assertArgumentPlaceholder: assertArgumentPlaceholder,
  10272. assertBindExpression: assertBindExpression,
  10273. assertClassProperty: assertClassProperty,
  10274. assertPipelineTopicExpression: assertPipelineTopicExpression,
  10275. assertPipelineBareFunction: assertPipelineBareFunction,
  10276. assertPipelinePrimaryTopicReference: assertPipelinePrimaryTopicReference,
  10277. assertClassPrivateProperty: assertClassPrivateProperty,
  10278. assertClassPrivateMethod: assertClassPrivateMethod,
  10279. assertImportAttribute: assertImportAttribute,
  10280. assertDecorator: assertDecorator,
  10281. assertDoExpression: assertDoExpression,
  10282. assertExportDefaultSpecifier: assertExportDefaultSpecifier,
  10283. assertPrivateName: assertPrivateName,
  10284. assertRecordExpression: assertRecordExpression,
  10285. assertTupleExpression: assertTupleExpression,
  10286. assertDecimalLiteral: assertDecimalLiteral,
  10287. assertStaticBlock: assertStaticBlock,
  10288. assertModuleExpression: assertModuleExpression,
  10289. assertTSParameterProperty: assertTSParameterProperty,
  10290. assertTSDeclareFunction: assertTSDeclareFunction,
  10291. assertTSDeclareMethod: assertTSDeclareMethod,
  10292. assertTSQualifiedName: assertTSQualifiedName,
  10293. assertTSCallSignatureDeclaration: assertTSCallSignatureDeclaration,
  10294. assertTSConstructSignatureDeclaration: assertTSConstructSignatureDeclaration,
  10295. assertTSPropertySignature: assertTSPropertySignature,
  10296. assertTSMethodSignature: assertTSMethodSignature,
  10297. assertTSIndexSignature: assertTSIndexSignature,
  10298. assertTSAnyKeyword: assertTSAnyKeyword,
  10299. assertTSBooleanKeyword: assertTSBooleanKeyword,
  10300. assertTSBigIntKeyword: assertTSBigIntKeyword,
  10301. assertTSIntrinsicKeyword: assertTSIntrinsicKeyword,
  10302. assertTSNeverKeyword: assertTSNeverKeyword,
  10303. assertTSNullKeyword: assertTSNullKeyword,
  10304. assertTSNumberKeyword: assertTSNumberKeyword,
  10305. assertTSObjectKeyword: assertTSObjectKeyword,
  10306. assertTSStringKeyword: assertTSStringKeyword,
  10307. assertTSSymbolKeyword: assertTSSymbolKeyword,
  10308. assertTSUndefinedKeyword: assertTSUndefinedKeyword,
  10309. assertTSUnknownKeyword: assertTSUnknownKeyword,
  10310. assertTSVoidKeyword: assertTSVoidKeyword,
  10311. assertTSThisType: assertTSThisType,
  10312. assertTSFunctionType: assertTSFunctionType,
  10313. assertTSConstructorType: assertTSConstructorType,
  10314. assertTSTypeReference: assertTSTypeReference,
  10315. assertTSTypePredicate: assertTSTypePredicate,
  10316. assertTSTypeQuery: assertTSTypeQuery,
  10317. assertTSTypeLiteral: assertTSTypeLiteral,
  10318. assertTSArrayType: assertTSArrayType,
  10319. assertTSTupleType: assertTSTupleType,
  10320. assertTSOptionalType: assertTSOptionalType,
  10321. assertTSRestType: assertTSRestType,
  10322. assertTSNamedTupleMember: assertTSNamedTupleMember,
  10323. assertTSUnionType: assertTSUnionType,
  10324. assertTSIntersectionType: assertTSIntersectionType,
  10325. assertTSConditionalType: assertTSConditionalType,
  10326. assertTSInferType: assertTSInferType,
  10327. assertTSParenthesizedType: assertTSParenthesizedType,
  10328. assertTSTypeOperator: assertTSTypeOperator,
  10329. assertTSIndexedAccessType: assertTSIndexedAccessType,
  10330. assertTSMappedType: assertTSMappedType,
  10331. assertTSLiteralType: assertTSLiteralType,
  10332. assertTSExpressionWithTypeArguments: assertTSExpressionWithTypeArguments,
  10333. assertTSInterfaceDeclaration: assertTSInterfaceDeclaration,
  10334. assertTSInterfaceBody: assertTSInterfaceBody,
  10335. assertTSTypeAliasDeclaration: assertTSTypeAliasDeclaration,
  10336. assertTSAsExpression: assertTSAsExpression,
  10337. assertTSTypeAssertion: assertTSTypeAssertion,
  10338. assertTSEnumDeclaration: assertTSEnumDeclaration,
  10339. assertTSEnumMember: assertTSEnumMember,
  10340. assertTSModuleDeclaration: assertTSModuleDeclaration,
  10341. assertTSModuleBlock: assertTSModuleBlock,
  10342. assertTSImportType: assertTSImportType,
  10343. assertTSImportEqualsDeclaration: assertTSImportEqualsDeclaration,
  10344. assertTSExternalModuleReference: assertTSExternalModuleReference,
  10345. assertTSNonNullExpression: assertTSNonNullExpression,
  10346. assertTSExportAssignment: assertTSExportAssignment,
  10347. assertTSNamespaceExportDeclaration: assertTSNamespaceExportDeclaration,
  10348. assertTSTypeAnnotation: assertTSTypeAnnotation,
  10349. assertTSTypeParameterInstantiation: assertTSTypeParameterInstantiation,
  10350. assertTSTypeParameterDeclaration: assertTSTypeParameterDeclaration,
  10351. assertTSTypeParameter: assertTSTypeParameter,
  10352. assertExpression: assertExpression,
  10353. assertBinary: assertBinary,
  10354. assertScopable: assertScopable,
  10355. assertBlockParent: assertBlockParent,
  10356. assertBlock: assertBlock,
  10357. assertStatement: assertStatement,
  10358. assertTerminatorless: assertTerminatorless,
  10359. assertCompletionStatement: assertCompletionStatement,
  10360. assertConditional: assertConditional,
  10361. assertLoop: assertLoop,
  10362. assertWhile: assertWhile,
  10363. assertExpressionWrapper: assertExpressionWrapper,
  10364. assertFor: assertFor,
  10365. assertForXStatement: assertForXStatement,
  10366. assertFunction: assertFunction$1,
  10367. assertFunctionParent: assertFunctionParent,
  10368. assertPureish: assertPureish,
  10369. assertDeclaration: assertDeclaration,
  10370. assertPatternLike: assertPatternLike,
  10371. assertLVal: assertLVal,
  10372. assertTSEntityName: assertTSEntityName,
  10373. assertLiteral: assertLiteral,
  10374. assertImmutable: assertImmutable,
  10375. assertUserWhitespacable: assertUserWhitespacable,
  10376. assertMethod: assertMethod,
  10377. assertObjectMember: assertObjectMember,
  10378. assertProperty: assertProperty,
  10379. assertUnaryLike: assertUnaryLike,
  10380. assertPattern: assertPattern,
  10381. assertClass: assertClass,
  10382. assertModuleDeclaration: assertModuleDeclaration,
  10383. assertExportDeclaration: assertExportDeclaration,
  10384. assertModuleSpecifier: assertModuleSpecifier,
  10385. assertFlow: assertFlow,
  10386. assertFlowType: assertFlowType,
  10387. assertFlowBaseAnnotation: assertFlowBaseAnnotation,
  10388. assertFlowDeclaration: assertFlowDeclaration,
  10389. assertFlowPredicate: assertFlowPredicate,
  10390. assertEnumBody: assertEnumBody,
  10391. assertEnumMember: assertEnumMember,
  10392. assertJSX: assertJSX,
  10393. assertPrivate: assertPrivate,
  10394. assertTSTypeElement: assertTSTypeElement,
  10395. assertTSType: assertTSType,
  10396. assertTSBaseType: assertTSBaseType,
  10397. assertNumberLiteral: assertNumberLiteral,
  10398. assertRegexLiteral: assertRegexLiteral,
  10399. assertRestProperty: assertRestProperty,
  10400. assertSpreadProperty: assertSpreadProperty,
  10401. arrayExpression: arrayExpression,
  10402. assignmentExpression: assignmentExpression,
  10403. binaryExpression: binaryExpression,
  10404. interpreterDirective: interpreterDirective,
  10405. directive: directive,
  10406. directiveLiteral: directiveLiteral,
  10407. blockStatement: blockStatement,
  10408. breakStatement: breakStatement,
  10409. callExpression: callExpression,
  10410. catchClause: catchClause,
  10411. conditionalExpression: conditionalExpression,
  10412. continueStatement: continueStatement,
  10413. debuggerStatement: debuggerStatement,
  10414. doWhileStatement: doWhileStatement,
  10415. emptyStatement: emptyStatement,
  10416. expressionStatement: expressionStatement,
  10417. file: file,
  10418. forInStatement: forInStatement,
  10419. forStatement: forStatement,
  10420. functionDeclaration: functionDeclaration,
  10421. functionExpression: functionExpression,
  10422. identifier: identifier,
  10423. ifStatement: ifStatement,
  10424. labeledStatement: labeledStatement,
  10425. stringLiteral: stringLiteral,
  10426. numericLiteral: numericLiteral,
  10427. nullLiteral: nullLiteral,
  10428. booleanLiteral: booleanLiteral,
  10429. regExpLiteral: regExpLiteral,
  10430. logicalExpression: logicalExpression,
  10431. memberExpression: memberExpression,
  10432. newExpression: newExpression,
  10433. program: program$2,
  10434. objectExpression: objectExpression,
  10435. objectMethod: objectMethod,
  10436. objectProperty: objectProperty,
  10437. restElement: restElement,
  10438. returnStatement: returnStatement,
  10439. sequenceExpression: sequenceExpression,
  10440. parenthesizedExpression: parenthesizedExpression,
  10441. switchCase: switchCase,
  10442. switchStatement: switchStatement,
  10443. thisExpression: thisExpression,
  10444. throwStatement: throwStatement,
  10445. tryStatement: tryStatement,
  10446. unaryExpression: unaryExpression,
  10447. updateExpression: updateExpression,
  10448. variableDeclaration: variableDeclaration,
  10449. variableDeclarator: variableDeclarator,
  10450. whileStatement: whileStatement,
  10451. withStatement: withStatement,
  10452. assignmentPattern: assignmentPattern,
  10453. arrayPattern: arrayPattern,
  10454. arrowFunctionExpression: arrowFunctionExpression,
  10455. classBody: classBody,
  10456. classExpression: classExpression,
  10457. classDeclaration: classDeclaration,
  10458. exportAllDeclaration: exportAllDeclaration,
  10459. exportDefaultDeclaration: exportDefaultDeclaration,
  10460. exportNamedDeclaration: exportNamedDeclaration,
  10461. exportSpecifier: exportSpecifier,
  10462. forOfStatement: forOfStatement,
  10463. importDeclaration: importDeclaration,
  10464. importDefaultSpecifier: importDefaultSpecifier,
  10465. importNamespaceSpecifier: importNamespaceSpecifier,
  10466. importSpecifier: importSpecifier,
  10467. metaProperty: metaProperty,
  10468. classMethod: classMethod,
  10469. objectPattern: objectPattern,
  10470. spreadElement: spreadElement,
  10471. 'super': _super,
  10472. taggedTemplateExpression: taggedTemplateExpression,
  10473. templateElement: templateElement,
  10474. templateLiteral: templateLiteral,
  10475. yieldExpression: yieldExpression,
  10476. awaitExpression: awaitExpression,
  10477. 'import': _import,
  10478. bigIntLiteral: bigIntLiteral,
  10479. exportNamespaceSpecifier: exportNamespaceSpecifier,
  10480. optionalMemberExpression: optionalMemberExpression,
  10481. optionalCallExpression: optionalCallExpression,
  10482. anyTypeAnnotation: anyTypeAnnotation,
  10483. arrayTypeAnnotation: arrayTypeAnnotation,
  10484. booleanTypeAnnotation: booleanTypeAnnotation,
  10485. booleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,
  10486. nullLiteralTypeAnnotation: nullLiteralTypeAnnotation,
  10487. classImplements: classImplements,
  10488. declareClass: declareClass,
  10489. declareFunction: declareFunction,
  10490. declareInterface: declareInterface,
  10491. declareModule: declareModule,
  10492. declareModuleExports: declareModuleExports,
  10493. declareTypeAlias: declareTypeAlias,
  10494. declareOpaqueType: declareOpaqueType,
  10495. declareVariable: declareVariable,
  10496. declareExportDeclaration: declareExportDeclaration,
  10497. declareExportAllDeclaration: declareExportAllDeclaration,
  10498. declaredPredicate: declaredPredicate,
  10499. existsTypeAnnotation: existsTypeAnnotation,
  10500. functionTypeAnnotation: functionTypeAnnotation,
  10501. functionTypeParam: functionTypeParam,
  10502. genericTypeAnnotation: genericTypeAnnotation,
  10503. inferredPredicate: inferredPredicate,
  10504. interfaceExtends: interfaceExtends,
  10505. interfaceDeclaration: interfaceDeclaration,
  10506. interfaceTypeAnnotation: interfaceTypeAnnotation,
  10507. intersectionTypeAnnotation: intersectionTypeAnnotation,
  10508. mixedTypeAnnotation: mixedTypeAnnotation,
  10509. emptyTypeAnnotation: emptyTypeAnnotation,
  10510. nullableTypeAnnotation: nullableTypeAnnotation,
  10511. numberLiteralTypeAnnotation: numberLiteralTypeAnnotation,
  10512. numberTypeAnnotation: numberTypeAnnotation,
  10513. objectTypeAnnotation: objectTypeAnnotation,
  10514. objectTypeInternalSlot: objectTypeInternalSlot,
  10515. objectTypeCallProperty: objectTypeCallProperty,
  10516. objectTypeIndexer: objectTypeIndexer,
  10517. objectTypeProperty: objectTypeProperty,
  10518. objectTypeSpreadProperty: objectTypeSpreadProperty,
  10519. opaqueType: opaqueType,
  10520. qualifiedTypeIdentifier: qualifiedTypeIdentifier,
  10521. stringLiteralTypeAnnotation: stringLiteralTypeAnnotation,
  10522. stringTypeAnnotation: stringTypeAnnotation,
  10523. symbolTypeAnnotation: symbolTypeAnnotation,
  10524. thisTypeAnnotation: thisTypeAnnotation,
  10525. tupleTypeAnnotation: tupleTypeAnnotation,
  10526. typeofTypeAnnotation: typeofTypeAnnotation,
  10527. typeAlias: typeAlias,
  10528. typeAnnotation: typeAnnotation,
  10529. typeCastExpression: typeCastExpression,
  10530. typeParameter: typeParameter,
  10531. typeParameterDeclaration: typeParameterDeclaration,
  10532. typeParameterInstantiation: typeParameterInstantiation,
  10533. unionTypeAnnotation: unionTypeAnnotation,
  10534. variance: variance,
  10535. voidTypeAnnotation: voidTypeAnnotation,
  10536. enumDeclaration: enumDeclaration,
  10537. enumBooleanBody: enumBooleanBody,
  10538. enumNumberBody: enumNumberBody,
  10539. enumStringBody: enumStringBody,
  10540. enumSymbolBody: enumSymbolBody,
  10541. enumBooleanMember: enumBooleanMember,
  10542. enumNumberMember: enumNumberMember,
  10543. enumStringMember: enumStringMember,
  10544. enumDefaultedMember: enumDefaultedMember,
  10545. indexedAccessType: indexedAccessType,
  10546. optionalIndexedAccessType: optionalIndexedAccessType,
  10547. jsxAttribute: jsxAttribute,
  10548. jSXAttribute: jsxAttribute,
  10549. jsxClosingElement: jsxClosingElement,
  10550. jSXClosingElement: jsxClosingElement,
  10551. jsxElement: jsxElement,
  10552. jSXElement: jsxElement,
  10553. jsxEmptyExpression: jsxEmptyExpression,
  10554. jSXEmptyExpression: jsxEmptyExpression,
  10555. jsxExpressionContainer: jsxExpressionContainer,
  10556. jSXExpressionContainer: jsxExpressionContainer,
  10557. jsxSpreadChild: jsxSpreadChild,
  10558. jSXSpreadChild: jsxSpreadChild,
  10559. jsxIdentifier: jsxIdentifier,
  10560. jSXIdentifier: jsxIdentifier,
  10561. jsxMemberExpression: jsxMemberExpression,
  10562. jSXMemberExpression: jsxMemberExpression,
  10563. jsxNamespacedName: jsxNamespacedName,
  10564. jSXNamespacedName: jsxNamespacedName,
  10565. jsxOpeningElement: jsxOpeningElement,
  10566. jSXOpeningElement: jsxOpeningElement,
  10567. jsxSpreadAttribute: jsxSpreadAttribute,
  10568. jSXSpreadAttribute: jsxSpreadAttribute,
  10569. jsxText: jsxText,
  10570. jSXText: jsxText,
  10571. jsxFragment: jsxFragment,
  10572. jSXFragment: jsxFragment,
  10573. jsxOpeningFragment: jsxOpeningFragment,
  10574. jSXOpeningFragment: jsxOpeningFragment,
  10575. jsxClosingFragment: jsxClosingFragment,
  10576. jSXClosingFragment: jsxClosingFragment,
  10577. noop: noop$1,
  10578. placeholder: placeholder,
  10579. v8IntrinsicIdentifier: v8IntrinsicIdentifier,
  10580. argumentPlaceholder: argumentPlaceholder,
  10581. bindExpression: bindExpression,
  10582. classProperty: classProperty,
  10583. pipelineTopicExpression: pipelineTopicExpression,
  10584. pipelineBareFunction: pipelineBareFunction,
  10585. pipelinePrimaryTopicReference: pipelinePrimaryTopicReference,
  10586. classPrivateProperty: classPrivateProperty,
  10587. classPrivateMethod: classPrivateMethod,
  10588. importAttribute: importAttribute,
  10589. decorator: decorator,
  10590. doExpression: doExpression,
  10591. exportDefaultSpecifier: exportDefaultSpecifier,
  10592. privateName: privateName,
  10593. recordExpression: recordExpression,
  10594. tupleExpression: tupleExpression,
  10595. decimalLiteral: decimalLiteral,
  10596. staticBlock: staticBlock,
  10597. moduleExpression: moduleExpression,
  10598. tsParameterProperty: tsParameterProperty,
  10599. tSParameterProperty: tsParameterProperty,
  10600. tsDeclareFunction: tsDeclareFunction,
  10601. tSDeclareFunction: tsDeclareFunction,
  10602. tsDeclareMethod: tsDeclareMethod,
  10603. tSDeclareMethod: tsDeclareMethod,
  10604. tsQualifiedName: tsQualifiedName,
  10605. tSQualifiedName: tsQualifiedName,
  10606. tsCallSignatureDeclaration: tsCallSignatureDeclaration,
  10607. tSCallSignatureDeclaration: tsCallSignatureDeclaration,
  10608. tsConstructSignatureDeclaration: tsConstructSignatureDeclaration,
  10609. tSConstructSignatureDeclaration: tsConstructSignatureDeclaration,
  10610. tsPropertySignature: tsPropertySignature,
  10611. tSPropertySignature: tsPropertySignature,
  10612. tsMethodSignature: tsMethodSignature,
  10613. tSMethodSignature: tsMethodSignature,
  10614. tsIndexSignature: tsIndexSignature,
  10615. tSIndexSignature: tsIndexSignature,
  10616. tsAnyKeyword: tsAnyKeyword,
  10617. tSAnyKeyword: tsAnyKeyword,
  10618. tsBooleanKeyword: tsBooleanKeyword,
  10619. tSBooleanKeyword: tsBooleanKeyword,
  10620. tsBigIntKeyword: tsBigIntKeyword,
  10621. tSBigIntKeyword: tsBigIntKeyword,
  10622. tsIntrinsicKeyword: tsIntrinsicKeyword,
  10623. tSIntrinsicKeyword: tsIntrinsicKeyword,
  10624. tsNeverKeyword: tsNeverKeyword,
  10625. tSNeverKeyword: tsNeverKeyword,
  10626. tsNullKeyword: tsNullKeyword,
  10627. tSNullKeyword: tsNullKeyword,
  10628. tsNumberKeyword: tsNumberKeyword,
  10629. tSNumberKeyword: tsNumberKeyword,
  10630. tsObjectKeyword: tsObjectKeyword,
  10631. tSObjectKeyword: tsObjectKeyword,
  10632. tsStringKeyword: tsStringKeyword,
  10633. tSStringKeyword: tsStringKeyword,
  10634. tsSymbolKeyword: tsSymbolKeyword,
  10635. tSSymbolKeyword: tsSymbolKeyword,
  10636. tsUndefinedKeyword: tsUndefinedKeyword,
  10637. tSUndefinedKeyword: tsUndefinedKeyword,
  10638. tsUnknownKeyword: tsUnknownKeyword,
  10639. tSUnknownKeyword: tsUnknownKeyword,
  10640. tsVoidKeyword: tsVoidKeyword,
  10641. tSVoidKeyword: tsVoidKeyword,
  10642. tsThisType: tsThisType,
  10643. tSThisType: tsThisType,
  10644. tsFunctionType: tsFunctionType,
  10645. tSFunctionType: tsFunctionType,
  10646. tsConstructorType: tsConstructorType,
  10647. tSConstructorType: tsConstructorType,
  10648. tsTypeReference: tsTypeReference,
  10649. tSTypeReference: tsTypeReference,
  10650. tsTypePredicate: tsTypePredicate,
  10651. tSTypePredicate: tsTypePredicate,
  10652. tsTypeQuery: tsTypeQuery,
  10653. tSTypeQuery: tsTypeQuery,
  10654. tsTypeLiteral: tsTypeLiteral,
  10655. tSTypeLiteral: tsTypeLiteral,
  10656. tsArrayType: tsArrayType,
  10657. tSArrayType: tsArrayType,
  10658. tsTupleType: tsTupleType,
  10659. tSTupleType: tsTupleType,
  10660. tsOptionalType: tsOptionalType,
  10661. tSOptionalType: tsOptionalType,
  10662. tsRestType: tsRestType,
  10663. tSRestType: tsRestType,
  10664. tsNamedTupleMember: tsNamedTupleMember,
  10665. tSNamedTupleMember: tsNamedTupleMember,
  10666. tsUnionType: tsUnionType,
  10667. tSUnionType: tsUnionType,
  10668. tsIntersectionType: tsIntersectionType,
  10669. tSIntersectionType: tsIntersectionType,
  10670. tsConditionalType: tsConditionalType,
  10671. tSConditionalType: tsConditionalType,
  10672. tsInferType: tsInferType,
  10673. tSInferType: tsInferType,
  10674. tsParenthesizedType: tsParenthesizedType,
  10675. tSParenthesizedType: tsParenthesizedType,
  10676. tsTypeOperator: tsTypeOperator,
  10677. tSTypeOperator: tsTypeOperator,
  10678. tsIndexedAccessType: tsIndexedAccessType,
  10679. tSIndexedAccessType: tsIndexedAccessType,
  10680. tsMappedType: tsMappedType,
  10681. tSMappedType: tsMappedType,
  10682. tsLiteralType: tsLiteralType,
  10683. tSLiteralType: tsLiteralType,
  10684. tsExpressionWithTypeArguments: tsExpressionWithTypeArguments,
  10685. tSExpressionWithTypeArguments: tsExpressionWithTypeArguments,
  10686. tsInterfaceDeclaration: tsInterfaceDeclaration,
  10687. tSInterfaceDeclaration: tsInterfaceDeclaration,
  10688. tsInterfaceBody: tsInterfaceBody,
  10689. tSInterfaceBody: tsInterfaceBody,
  10690. tsTypeAliasDeclaration: tsTypeAliasDeclaration,
  10691. tSTypeAliasDeclaration: tsTypeAliasDeclaration,
  10692. tsAsExpression: tsAsExpression,
  10693. tSAsExpression: tsAsExpression,
  10694. tsTypeAssertion: tsTypeAssertion,
  10695. tSTypeAssertion: tsTypeAssertion,
  10696. tsEnumDeclaration: tsEnumDeclaration,
  10697. tSEnumDeclaration: tsEnumDeclaration,
  10698. tsEnumMember: tsEnumMember,
  10699. tSEnumMember: tsEnumMember,
  10700. tsModuleDeclaration: tsModuleDeclaration,
  10701. tSModuleDeclaration: tsModuleDeclaration,
  10702. tsModuleBlock: tsModuleBlock,
  10703. tSModuleBlock: tsModuleBlock,
  10704. tsImportType: tsImportType,
  10705. tSImportType: tsImportType,
  10706. tsImportEqualsDeclaration: tsImportEqualsDeclaration,
  10707. tSImportEqualsDeclaration: tsImportEqualsDeclaration,
  10708. tsExternalModuleReference: tsExternalModuleReference,
  10709. tSExternalModuleReference: tsExternalModuleReference,
  10710. tsNonNullExpression: tsNonNullExpression,
  10711. tSNonNullExpression: tsNonNullExpression,
  10712. tsExportAssignment: tsExportAssignment,
  10713. tSExportAssignment: tsExportAssignment,
  10714. tsNamespaceExportDeclaration: tsNamespaceExportDeclaration,
  10715. tSNamespaceExportDeclaration: tsNamespaceExportDeclaration,
  10716. tsTypeAnnotation: tsTypeAnnotation,
  10717. tSTypeAnnotation: tsTypeAnnotation,
  10718. tsTypeParameterInstantiation: tsTypeParameterInstantiation,
  10719. tSTypeParameterInstantiation: tsTypeParameterInstantiation,
  10720. tsTypeParameterDeclaration: tsTypeParameterDeclaration,
  10721. tSTypeParameterDeclaration: tsTypeParameterDeclaration,
  10722. tsTypeParameter: tsTypeParameter,
  10723. tSTypeParameter: tsTypeParameter,
  10724. numberLiteral: NumberLiteral,
  10725. regexLiteral: RegexLiteral,
  10726. restProperty: RestProperty$1,
  10727. spreadProperty: SpreadProperty$1,
  10728. ArrayExpression: arrayExpression,
  10729. AssignmentExpression: assignmentExpression,
  10730. BinaryExpression: binaryExpression,
  10731. InterpreterDirective: interpreterDirective,
  10732. Directive: directive,
  10733. DirectiveLiteral: directiveLiteral,
  10734. BlockStatement: blockStatement,
  10735. BreakStatement: breakStatement,
  10736. CallExpression: callExpression,
  10737. CatchClause: catchClause,
  10738. ConditionalExpression: conditionalExpression,
  10739. ContinueStatement: continueStatement,
  10740. DebuggerStatement: debuggerStatement,
  10741. DoWhileStatement: doWhileStatement,
  10742. EmptyStatement: emptyStatement,
  10743. ExpressionStatement: expressionStatement,
  10744. File: file,
  10745. ForInStatement: forInStatement,
  10746. ForStatement: forStatement,
  10747. FunctionDeclaration: functionDeclaration,
  10748. FunctionExpression: functionExpression,
  10749. Identifier: identifier,
  10750. IfStatement: ifStatement,
  10751. LabeledStatement: labeledStatement,
  10752. StringLiteral: stringLiteral,
  10753. NumericLiteral: numericLiteral,
  10754. NullLiteral: nullLiteral,
  10755. BooleanLiteral: booleanLiteral,
  10756. RegExpLiteral: regExpLiteral,
  10757. LogicalExpression: logicalExpression,
  10758. MemberExpression: memberExpression,
  10759. NewExpression: newExpression,
  10760. Program: program$2,
  10761. ObjectExpression: objectExpression,
  10762. ObjectMethod: objectMethod,
  10763. ObjectProperty: objectProperty,
  10764. RestElement: restElement,
  10765. ReturnStatement: returnStatement,
  10766. SequenceExpression: sequenceExpression,
  10767. ParenthesizedExpression: parenthesizedExpression,
  10768. SwitchCase: switchCase,
  10769. SwitchStatement: switchStatement,
  10770. ThisExpression: thisExpression,
  10771. ThrowStatement: throwStatement,
  10772. TryStatement: tryStatement,
  10773. UnaryExpression: unaryExpression,
  10774. UpdateExpression: updateExpression,
  10775. VariableDeclaration: variableDeclaration,
  10776. VariableDeclarator: variableDeclarator,
  10777. WhileStatement: whileStatement,
  10778. WithStatement: withStatement,
  10779. AssignmentPattern: assignmentPattern,
  10780. ArrayPattern: arrayPattern,
  10781. ArrowFunctionExpression: arrowFunctionExpression,
  10782. ClassBody: classBody,
  10783. ClassExpression: classExpression,
  10784. ClassDeclaration: classDeclaration,
  10785. ExportAllDeclaration: exportAllDeclaration,
  10786. ExportDefaultDeclaration: exportDefaultDeclaration,
  10787. ExportNamedDeclaration: exportNamedDeclaration,
  10788. ExportSpecifier: exportSpecifier,
  10789. ForOfStatement: forOfStatement,
  10790. ImportDeclaration: importDeclaration,
  10791. ImportDefaultSpecifier: importDefaultSpecifier,
  10792. ImportNamespaceSpecifier: importNamespaceSpecifier,
  10793. ImportSpecifier: importSpecifier,
  10794. MetaProperty: metaProperty,
  10795. ClassMethod: classMethod,
  10796. ObjectPattern: objectPattern,
  10797. SpreadElement: spreadElement,
  10798. Super: _super,
  10799. TaggedTemplateExpression: taggedTemplateExpression,
  10800. TemplateElement: templateElement,
  10801. TemplateLiteral: templateLiteral,
  10802. YieldExpression: yieldExpression,
  10803. AwaitExpression: awaitExpression,
  10804. Import: _import,
  10805. BigIntLiteral: bigIntLiteral,
  10806. ExportNamespaceSpecifier: exportNamespaceSpecifier,
  10807. OptionalMemberExpression: optionalMemberExpression,
  10808. OptionalCallExpression: optionalCallExpression,
  10809. AnyTypeAnnotation: anyTypeAnnotation,
  10810. ArrayTypeAnnotation: arrayTypeAnnotation,
  10811. BooleanTypeAnnotation: booleanTypeAnnotation,
  10812. BooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,
  10813. NullLiteralTypeAnnotation: nullLiteralTypeAnnotation,
  10814. ClassImplements: classImplements,
  10815. DeclareClass: declareClass,
  10816. DeclareFunction: declareFunction,
  10817. DeclareInterface: declareInterface,
  10818. DeclareModule: declareModule,
  10819. DeclareModuleExports: declareModuleExports,
  10820. DeclareTypeAlias: declareTypeAlias,
  10821. DeclareOpaqueType: declareOpaqueType,
  10822. DeclareVariable: declareVariable,
  10823. DeclareExportDeclaration: declareExportDeclaration,
  10824. DeclareExportAllDeclaration: declareExportAllDeclaration,
  10825. DeclaredPredicate: declaredPredicate,
  10826. ExistsTypeAnnotation: existsTypeAnnotation,
  10827. FunctionTypeAnnotation: functionTypeAnnotation,
  10828. FunctionTypeParam: functionTypeParam,
  10829. GenericTypeAnnotation: genericTypeAnnotation,
  10830. InferredPredicate: inferredPredicate,
  10831. InterfaceExtends: interfaceExtends,
  10832. InterfaceDeclaration: interfaceDeclaration,
  10833. InterfaceTypeAnnotation: interfaceTypeAnnotation,
  10834. IntersectionTypeAnnotation: intersectionTypeAnnotation,
  10835. MixedTypeAnnotation: mixedTypeAnnotation,
  10836. EmptyTypeAnnotation: emptyTypeAnnotation,
  10837. NullableTypeAnnotation: nullableTypeAnnotation,
  10838. NumberLiteralTypeAnnotation: numberLiteralTypeAnnotation,
  10839. NumberTypeAnnotation: numberTypeAnnotation,
  10840. ObjectTypeAnnotation: objectTypeAnnotation,
  10841. ObjectTypeInternalSlot: objectTypeInternalSlot,
  10842. ObjectTypeCallProperty: objectTypeCallProperty,
  10843. ObjectTypeIndexer: objectTypeIndexer,
  10844. ObjectTypeProperty: objectTypeProperty,
  10845. ObjectTypeSpreadProperty: objectTypeSpreadProperty,
  10846. OpaqueType: opaqueType,
  10847. QualifiedTypeIdentifier: qualifiedTypeIdentifier,
  10848. StringLiteralTypeAnnotation: stringLiteralTypeAnnotation,
  10849. StringTypeAnnotation: stringTypeAnnotation,
  10850. SymbolTypeAnnotation: symbolTypeAnnotation,
  10851. ThisTypeAnnotation: thisTypeAnnotation,
  10852. TupleTypeAnnotation: tupleTypeAnnotation,
  10853. TypeofTypeAnnotation: typeofTypeAnnotation,
  10854. TypeAlias: typeAlias,
  10855. TypeAnnotation: typeAnnotation,
  10856. TypeCastExpression: typeCastExpression,
  10857. TypeParameter: typeParameter,
  10858. TypeParameterDeclaration: typeParameterDeclaration,
  10859. TypeParameterInstantiation: typeParameterInstantiation,
  10860. UnionTypeAnnotation: unionTypeAnnotation,
  10861. Variance: variance,
  10862. VoidTypeAnnotation: voidTypeAnnotation,
  10863. EnumDeclaration: enumDeclaration,
  10864. EnumBooleanBody: enumBooleanBody,
  10865. EnumNumberBody: enumNumberBody,
  10866. EnumStringBody: enumStringBody,
  10867. EnumSymbolBody: enumSymbolBody,
  10868. EnumBooleanMember: enumBooleanMember,
  10869. EnumNumberMember: enumNumberMember,
  10870. EnumStringMember: enumStringMember,
  10871. EnumDefaultedMember: enumDefaultedMember,
  10872. IndexedAccessType: indexedAccessType,
  10873. OptionalIndexedAccessType: optionalIndexedAccessType,
  10874. JSXAttribute: jsxAttribute,
  10875. JSXClosingElement: jsxClosingElement,
  10876. JSXElement: jsxElement,
  10877. JSXEmptyExpression: jsxEmptyExpression,
  10878. JSXExpressionContainer: jsxExpressionContainer,
  10879. JSXSpreadChild: jsxSpreadChild,
  10880. JSXIdentifier: jsxIdentifier,
  10881. JSXMemberExpression: jsxMemberExpression,
  10882. JSXNamespacedName: jsxNamespacedName,
  10883. JSXOpeningElement: jsxOpeningElement,
  10884. JSXSpreadAttribute: jsxSpreadAttribute,
  10885. JSXText: jsxText,
  10886. JSXFragment: jsxFragment,
  10887. JSXOpeningFragment: jsxOpeningFragment,
  10888. JSXClosingFragment: jsxClosingFragment,
  10889. Noop: noop$1,
  10890. Placeholder: placeholder,
  10891. V8IntrinsicIdentifier: v8IntrinsicIdentifier,
  10892. ArgumentPlaceholder: argumentPlaceholder,
  10893. BindExpression: bindExpression,
  10894. ClassProperty: classProperty,
  10895. PipelineTopicExpression: pipelineTopicExpression,
  10896. PipelineBareFunction: pipelineBareFunction,
  10897. PipelinePrimaryTopicReference: pipelinePrimaryTopicReference,
  10898. ClassPrivateProperty: classPrivateProperty,
  10899. ClassPrivateMethod: classPrivateMethod,
  10900. ImportAttribute: importAttribute,
  10901. Decorator: decorator,
  10902. DoExpression: doExpression,
  10903. ExportDefaultSpecifier: exportDefaultSpecifier,
  10904. PrivateName: privateName,
  10905. RecordExpression: recordExpression,
  10906. TupleExpression: tupleExpression,
  10907. DecimalLiteral: decimalLiteral,
  10908. StaticBlock: staticBlock,
  10909. ModuleExpression: moduleExpression,
  10910. TSParameterProperty: tsParameterProperty,
  10911. TSDeclareFunction: tsDeclareFunction,
  10912. TSDeclareMethod: tsDeclareMethod,
  10913. TSQualifiedName: tsQualifiedName,
  10914. TSCallSignatureDeclaration: tsCallSignatureDeclaration,
  10915. TSConstructSignatureDeclaration: tsConstructSignatureDeclaration,
  10916. TSPropertySignature: tsPropertySignature,
  10917. TSMethodSignature: tsMethodSignature,
  10918. TSIndexSignature: tsIndexSignature,
  10919. TSAnyKeyword: tsAnyKeyword,
  10920. TSBooleanKeyword: tsBooleanKeyword,
  10921. TSBigIntKeyword: tsBigIntKeyword,
  10922. TSIntrinsicKeyword: tsIntrinsicKeyword,
  10923. TSNeverKeyword: tsNeverKeyword,
  10924. TSNullKeyword: tsNullKeyword,
  10925. TSNumberKeyword: tsNumberKeyword,
  10926. TSObjectKeyword: tsObjectKeyword,
  10927. TSStringKeyword: tsStringKeyword,
  10928. TSSymbolKeyword: tsSymbolKeyword,
  10929. TSUndefinedKeyword: tsUndefinedKeyword,
  10930. TSUnknownKeyword: tsUnknownKeyword,
  10931. TSVoidKeyword: tsVoidKeyword,
  10932. TSThisType: tsThisType,
  10933. TSFunctionType: tsFunctionType,
  10934. TSConstructorType: tsConstructorType,
  10935. TSTypeReference: tsTypeReference,
  10936. TSTypePredicate: tsTypePredicate,
  10937. TSTypeQuery: tsTypeQuery,
  10938. TSTypeLiteral: tsTypeLiteral,
  10939. TSArrayType: tsArrayType,
  10940. TSTupleType: tsTupleType,
  10941. TSOptionalType: tsOptionalType,
  10942. TSRestType: tsRestType,
  10943. TSNamedTupleMember: tsNamedTupleMember,
  10944. TSUnionType: tsUnionType,
  10945. TSIntersectionType: tsIntersectionType,
  10946. TSConditionalType: tsConditionalType,
  10947. TSInferType: tsInferType,
  10948. TSParenthesizedType: tsParenthesizedType,
  10949. TSTypeOperator: tsTypeOperator,
  10950. TSIndexedAccessType: tsIndexedAccessType,
  10951. TSMappedType: tsMappedType,
  10952. TSLiteralType: tsLiteralType,
  10953. TSExpressionWithTypeArguments: tsExpressionWithTypeArguments,
  10954. TSInterfaceDeclaration: tsInterfaceDeclaration,
  10955. TSInterfaceBody: tsInterfaceBody,
  10956. TSTypeAliasDeclaration: tsTypeAliasDeclaration,
  10957. TSAsExpression: tsAsExpression,
  10958. TSTypeAssertion: tsTypeAssertion,
  10959. TSEnumDeclaration: tsEnumDeclaration,
  10960. TSEnumMember: tsEnumMember,
  10961. TSModuleDeclaration: tsModuleDeclaration,
  10962. TSModuleBlock: tsModuleBlock,
  10963. TSImportType: tsImportType,
  10964. TSImportEqualsDeclaration: tsImportEqualsDeclaration,
  10965. TSExternalModuleReference: tsExternalModuleReference,
  10966. TSNonNullExpression: tsNonNullExpression,
  10967. TSExportAssignment: tsExportAssignment,
  10968. TSNamespaceExportDeclaration: tsNamespaceExportDeclaration,
  10969. TSTypeAnnotation: tsTypeAnnotation,
  10970. TSTypeParameterInstantiation: tsTypeParameterInstantiation,
  10971. TSTypeParameterDeclaration: tsTypeParameterDeclaration,
  10972. TSTypeParameter: tsTypeParameter,
  10973. NumberLiteral: NumberLiteral,
  10974. RegexLiteral: RegexLiteral,
  10975. RestProperty: RestProperty$1,
  10976. SpreadProperty: SpreadProperty$1,
  10977. EXPRESSION_TYPES: EXPRESSION_TYPES,
  10978. BINARY_TYPES: BINARY_TYPES,
  10979. SCOPABLE_TYPES: SCOPABLE_TYPES,
  10980. BLOCKPARENT_TYPES: BLOCKPARENT_TYPES,
  10981. BLOCK_TYPES: BLOCK_TYPES,
  10982. STATEMENT_TYPES: STATEMENT_TYPES,
  10983. TERMINATORLESS_TYPES: TERMINATORLESS_TYPES,
  10984. COMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES,
  10985. CONDITIONAL_TYPES: CONDITIONAL_TYPES,
  10986. LOOP_TYPES: LOOP_TYPES,
  10987. WHILE_TYPES: WHILE_TYPES,
  10988. EXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES,
  10989. FOR_TYPES: FOR_TYPES,
  10990. FORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES,
  10991. FUNCTION_TYPES: FUNCTION_TYPES,
  10992. FUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES,
  10993. PUREISH_TYPES: PUREISH_TYPES,
  10994. DECLARATION_TYPES: DECLARATION_TYPES,
  10995. PATTERNLIKE_TYPES: PATTERNLIKE_TYPES,
  10996. LVAL_TYPES: LVAL_TYPES,
  10997. TSENTITYNAME_TYPES: TSENTITYNAME_TYPES,
  10998. LITERAL_TYPES: LITERAL_TYPES,
  10999. IMMUTABLE_TYPES: IMMUTABLE_TYPES,
  11000. USERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES,
  11001. METHOD_TYPES: METHOD_TYPES,
  11002. OBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES,
  11003. PROPERTY_TYPES: PROPERTY_TYPES,
  11004. UNARYLIKE_TYPES: UNARYLIKE_TYPES,
  11005. PATTERN_TYPES: PATTERN_TYPES,
  11006. CLASS_TYPES: CLASS_TYPES,
  11007. MODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES,
  11008. EXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES,
  11009. MODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES,
  11010. FLOW_TYPES: FLOW_TYPES,
  11011. FLOWTYPE_TYPES: FLOWTYPE_TYPES,
  11012. FLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES,
  11013. FLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES,
  11014. FLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES,
  11015. ENUMBODY_TYPES: ENUMBODY_TYPES,
  11016. ENUMMEMBER_TYPES: ENUMMEMBER_TYPES,
  11017. JSX_TYPES: JSX_TYPES,
  11018. PRIVATE_TYPES: PRIVATE_TYPES,
  11019. TSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES,
  11020. TSTYPE_TYPES: TSTYPE_TYPES,
  11021. TSBASETYPE_TYPES: TSBASETYPE_TYPES,
  11022. STATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS,
  11023. FLATTENABLE_KEYS: FLATTENABLE_KEYS,
  11024. FOR_INIT_KEYS: FOR_INIT_KEYS,
  11025. COMMENT_KEYS: COMMENT_KEYS,
  11026. LOGICAL_OPERATORS: LOGICAL_OPERATORS,
  11027. UPDATE_OPERATORS: UPDATE_OPERATORS,
  11028. BOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS,
  11029. EQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS,
  11030. COMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS,
  11031. BOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS,
  11032. NUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS,
  11033. BINARY_OPERATORS: BINARY_OPERATORS,
  11034. ASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS,
  11035. BOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS,
  11036. NUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS,
  11037. STRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS,
  11038. UNARY_OPERATORS: UNARY_OPERATORS,
  11039. INHERIT_KEYS: INHERIT_KEYS,
  11040. BLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL,
  11041. NOT_LOCAL_BINDING: NOT_LOCAL_BINDING,
  11042. VISITOR_KEYS: VISITOR_KEYS,
  11043. ALIAS_KEYS: ALIAS_KEYS,
  11044. FLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS,
  11045. NODE_FIELDS: NODE_FIELDS,
  11046. BUILDER_KEYS: BUILDER_KEYS,
  11047. DEPRECATED_KEYS: DEPRECATED_KEYS,
  11048. NODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS,
  11049. PLACEHOLDERS: PLACEHOLDERS,
  11050. PLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS,
  11051. PLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS,
  11052. TYPES: TYPES,
  11053. isArrayExpression: isArrayExpression,
  11054. isAssignmentExpression: isAssignmentExpression,
  11055. isBinaryExpression: isBinaryExpression,
  11056. isInterpreterDirective: isInterpreterDirective,
  11057. isDirective: isDirective,
  11058. isDirectiveLiteral: isDirectiveLiteral,
  11059. isBlockStatement: isBlockStatement,
  11060. isBreakStatement: isBreakStatement,
  11061. isCallExpression: isCallExpression,
  11062. isCatchClause: isCatchClause,
  11063. isConditionalExpression: isConditionalExpression,
  11064. isContinueStatement: isContinueStatement,
  11065. isDebuggerStatement: isDebuggerStatement,
  11066. isDoWhileStatement: isDoWhileStatement,
  11067. isEmptyStatement: isEmptyStatement,
  11068. isExpressionStatement: isExpressionStatement,
  11069. isFile: isFile,
  11070. isForInStatement: isForInStatement,
  11071. isForStatement: isForStatement,
  11072. isFunctionDeclaration: isFunctionDeclaration,
  11073. isFunctionExpression: isFunctionExpression,
  11074. isIdentifier: isIdentifier,
  11075. isIfStatement: isIfStatement,
  11076. isLabeledStatement: isLabeledStatement,
  11077. isStringLiteral: isStringLiteral,
  11078. isNumericLiteral: isNumericLiteral,
  11079. isNullLiteral: isNullLiteral,
  11080. isBooleanLiteral: isBooleanLiteral,
  11081. isRegExpLiteral: isRegExpLiteral,
  11082. isLogicalExpression: isLogicalExpression,
  11083. isMemberExpression: isMemberExpression,
  11084. isNewExpression: isNewExpression,
  11085. isProgram: isProgram,
  11086. isObjectExpression: isObjectExpression,
  11087. isObjectMethod: isObjectMethod,
  11088. isObjectProperty: isObjectProperty,
  11089. isRestElement: isRestElement,
  11090. isReturnStatement: isReturnStatement,
  11091. isSequenceExpression: isSequenceExpression,
  11092. isParenthesizedExpression: isParenthesizedExpression,
  11093. isSwitchCase: isSwitchCase,
  11094. isSwitchStatement: isSwitchStatement,
  11095. isThisExpression: isThisExpression,
  11096. isThrowStatement: isThrowStatement,
  11097. isTryStatement: isTryStatement,
  11098. isUnaryExpression: isUnaryExpression,
  11099. isUpdateExpression: isUpdateExpression,
  11100. isVariableDeclaration: isVariableDeclaration,
  11101. isVariableDeclarator: isVariableDeclarator,
  11102. isWhileStatement: isWhileStatement,
  11103. isWithStatement: isWithStatement,
  11104. isAssignmentPattern: isAssignmentPattern,
  11105. isArrayPattern: isArrayPattern,
  11106. isArrowFunctionExpression: isArrowFunctionExpression,
  11107. isClassBody: isClassBody,
  11108. isClassExpression: isClassExpression,
  11109. isClassDeclaration: isClassDeclaration,
  11110. isExportAllDeclaration: isExportAllDeclaration,
  11111. isExportDefaultDeclaration: isExportDefaultDeclaration,
  11112. isExportNamedDeclaration: isExportNamedDeclaration,
  11113. isExportSpecifier: isExportSpecifier,
  11114. isForOfStatement: isForOfStatement,
  11115. isImportDeclaration: isImportDeclaration,
  11116. isImportDefaultSpecifier: isImportDefaultSpecifier,
  11117. isImportNamespaceSpecifier: isImportNamespaceSpecifier,
  11118. isImportSpecifier: isImportSpecifier,
  11119. isMetaProperty: isMetaProperty,
  11120. isClassMethod: isClassMethod,
  11121. isObjectPattern: isObjectPattern,
  11122. isSpreadElement: isSpreadElement,
  11123. isSuper: isSuper,
  11124. isTaggedTemplateExpression: isTaggedTemplateExpression,
  11125. isTemplateElement: isTemplateElement,
  11126. isTemplateLiteral: isTemplateLiteral,
  11127. isYieldExpression: isYieldExpression,
  11128. isAwaitExpression: isAwaitExpression,
  11129. isImport: isImport,
  11130. isBigIntLiteral: isBigIntLiteral,
  11131. isExportNamespaceSpecifier: isExportNamespaceSpecifier,
  11132. isOptionalMemberExpression: isOptionalMemberExpression,
  11133. isOptionalCallExpression: isOptionalCallExpression,
  11134. isAnyTypeAnnotation: isAnyTypeAnnotation,
  11135. isArrayTypeAnnotation: isArrayTypeAnnotation,
  11136. isBooleanTypeAnnotation: isBooleanTypeAnnotation,
  11137. isBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation,
  11138. isNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation,
  11139. isClassImplements: isClassImplements,
  11140. isDeclareClass: isDeclareClass,
  11141. isDeclareFunction: isDeclareFunction,
  11142. isDeclareInterface: isDeclareInterface,
  11143. isDeclareModule: isDeclareModule,
  11144. isDeclareModuleExports: isDeclareModuleExports,
  11145. isDeclareTypeAlias: isDeclareTypeAlias,
  11146. isDeclareOpaqueType: isDeclareOpaqueType,
  11147. isDeclareVariable: isDeclareVariable,
  11148. isDeclareExportDeclaration: isDeclareExportDeclaration,
  11149. isDeclareExportAllDeclaration: isDeclareExportAllDeclaration,
  11150. isDeclaredPredicate: isDeclaredPredicate,
  11151. isExistsTypeAnnotation: isExistsTypeAnnotation,
  11152. isFunctionTypeAnnotation: isFunctionTypeAnnotation,
  11153. isFunctionTypeParam: isFunctionTypeParam,
  11154. isGenericTypeAnnotation: isGenericTypeAnnotation,
  11155. isInferredPredicate: isInferredPredicate,
  11156. isInterfaceExtends: isInterfaceExtends,
  11157. isInterfaceDeclaration: isInterfaceDeclaration,
  11158. isInterfaceTypeAnnotation: isInterfaceTypeAnnotation,
  11159. isIntersectionTypeAnnotation: isIntersectionTypeAnnotation,
  11160. isMixedTypeAnnotation: isMixedTypeAnnotation,
  11161. isEmptyTypeAnnotation: isEmptyTypeAnnotation,
  11162. isNullableTypeAnnotation: isNullableTypeAnnotation,
  11163. isNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation,
  11164. isNumberTypeAnnotation: isNumberTypeAnnotation,
  11165. isObjectTypeAnnotation: isObjectTypeAnnotation,
  11166. isObjectTypeInternalSlot: isObjectTypeInternalSlot,
  11167. isObjectTypeCallProperty: isObjectTypeCallProperty,
  11168. isObjectTypeIndexer: isObjectTypeIndexer,
  11169. isObjectTypeProperty: isObjectTypeProperty,
  11170. isObjectTypeSpreadProperty: isObjectTypeSpreadProperty,
  11171. isOpaqueType: isOpaqueType,
  11172. isQualifiedTypeIdentifier: isQualifiedTypeIdentifier,
  11173. isStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation,
  11174. isStringTypeAnnotation: isStringTypeAnnotation,
  11175. isSymbolTypeAnnotation: isSymbolTypeAnnotation,
  11176. isThisTypeAnnotation: isThisTypeAnnotation,
  11177. isTupleTypeAnnotation: isTupleTypeAnnotation,
  11178. isTypeofTypeAnnotation: isTypeofTypeAnnotation,
  11179. isTypeAlias: isTypeAlias,
  11180. isTypeAnnotation: isTypeAnnotation,
  11181. isTypeCastExpression: isTypeCastExpression,
  11182. isTypeParameter: isTypeParameter,
  11183. isTypeParameterDeclaration: isTypeParameterDeclaration,
  11184. isTypeParameterInstantiation: isTypeParameterInstantiation,
  11185. isUnionTypeAnnotation: isUnionTypeAnnotation,
  11186. isVariance: isVariance,
  11187. isVoidTypeAnnotation: isVoidTypeAnnotation,
  11188. isEnumDeclaration: isEnumDeclaration,
  11189. isEnumBooleanBody: isEnumBooleanBody,
  11190. isEnumNumberBody: isEnumNumberBody,
  11191. isEnumStringBody: isEnumStringBody,
  11192. isEnumSymbolBody: isEnumSymbolBody,
  11193. isEnumBooleanMember: isEnumBooleanMember,
  11194. isEnumNumberMember: isEnumNumberMember,
  11195. isEnumStringMember: isEnumStringMember,
  11196. isEnumDefaultedMember: isEnumDefaultedMember,
  11197. isIndexedAccessType: isIndexedAccessType,
  11198. isOptionalIndexedAccessType: isOptionalIndexedAccessType,
  11199. isJSXAttribute: isJSXAttribute,
  11200. isJSXClosingElement: isJSXClosingElement,
  11201. isJSXElement: isJSXElement,
  11202. isJSXEmptyExpression: isJSXEmptyExpression,
  11203. isJSXExpressionContainer: isJSXExpressionContainer,
  11204. isJSXSpreadChild: isJSXSpreadChild,
  11205. isJSXIdentifier: isJSXIdentifier,
  11206. isJSXMemberExpression: isJSXMemberExpression,
  11207. isJSXNamespacedName: isJSXNamespacedName,
  11208. isJSXOpeningElement: isJSXOpeningElement,
  11209. isJSXSpreadAttribute: isJSXSpreadAttribute,
  11210. isJSXText: isJSXText,
  11211. isJSXFragment: isJSXFragment,
  11212. isJSXOpeningFragment: isJSXOpeningFragment,
  11213. isJSXClosingFragment: isJSXClosingFragment,
  11214. isNoop: isNoop,
  11215. isPlaceholder: isPlaceholder,
  11216. isV8IntrinsicIdentifier: isV8IntrinsicIdentifier,
  11217. isArgumentPlaceholder: isArgumentPlaceholder,
  11218. isBindExpression: isBindExpression,
  11219. isClassProperty: isClassProperty,
  11220. isPipelineTopicExpression: isPipelineTopicExpression,
  11221. isPipelineBareFunction: isPipelineBareFunction,
  11222. isPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference,
  11223. isClassPrivateProperty: isClassPrivateProperty,
  11224. isClassPrivateMethod: isClassPrivateMethod,
  11225. isImportAttribute: isImportAttribute,
  11226. isDecorator: isDecorator,
  11227. isDoExpression: isDoExpression,
  11228. isExportDefaultSpecifier: isExportDefaultSpecifier,
  11229. isPrivateName: isPrivateName,
  11230. isRecordExpression: isRecordExpression,
  11231. isTupleExpression: isTupleExpression,
  11232. isDecimalLiteral: isDecimalLiteral,
  11233. isStaticBlock: isStaticBlock,
  11234. isModuleExpression: isModuleExpression,
  11235. isTSParameterProperty: isTSParameterProperty,
  11236. isTSDeclareFunction: isTSDeclareFunction,
  11237. isTSDeclareMethod: isTSDeclareMethod,
  11238. isTSQualifiedName: isTSQualifiedName,
  11239. isTSCallSignatureDeclaration: isTSCallSignatureDeclaration,
  11240. isTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration,
  11241. isTSPropertySignature: isTSPropertySignature,
  11242. isTSMethodSignature: isTSMethodSignature,
  11243. isTSIndexSignature: isTSIndexSignature,
  11244. isTSAnyKeyword: isTSAnyKeyword,
  11245. isTSBooleanKeyword: isTSBooleanKeyword,
  11246. isTSBigIntKeyword: isTSBigIntKeyword,
  11247. isTSIntrinsicKeyword: isTSIntrinsicKeyword,
  11248. isTSNeverKeyword: isTSNeverKeyword,
  11249. isTSNullKeyword: isTSNullKeyword,
  11250. isTSNumberKeyword: isTSNumberKeyword,
  11251. isTSObjectKeyword: isTSObjectKeyword,
  11252. isTSStringKeyword: isTSStringKeyword,
  11253. isTSSymbolKeyword: isTSSymbolKeyword,
  11254. isTSUndefinedKeyword: isTSUndefinedKeyword,
  11255. isTSUnknownKeyword: isTSUnknownKeyword,
  11256. isTSVoidKeyword: isTSVoidKeyword,
  11257. isTSThisType: isTSThisType,
  11258. isTSFunctionType: isTSFunctionType,
  11259. isTSConstructorType: isTSConstructorType,
  11260. isTSTypeReference: isTSTypeReference,
  11261. isTSTypePredicate: isTSTypePredicate,
  11262. isTSTypeQuery: isTSTypeQuery,
  11263. isTSTypeLiteral: isTSTypeLiteral,
  11264. isTSArrayType: isTSArrayType,
  11265. isTSTupleType: isTSTupleType,
  11266. isTSOptionalType: isTSOptionalType,
  11267. isTSRestType: isTSRestType,
  11268. isTSNamedTupleMember: isTSNamedTupleMember,
  11269. isTSUnionType: isTSUnionType,
  11270. isTSIntersectionType: isTSIntersectionType,
  11271. isTSConditionalType: isTSConditionalType,
  11272. isTSInferType: isTSInferType,
  11273. isTSParenthesizedType: isTSParenthesizedType,
  11274. isTSTypeOperator: isTSTypeOperator,
  11275. isTSIndexedAccessType: isTSIndexedAccessType,
  11276. isTSMappedType: isTSMappedType,
  11277. isTSLiteralType: isTSLiteralType,
  11278. isTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments,
  11279. isTSInterfaceDeclaration: isTSInterfaceDeclaration,
  11280. isTSInterfaceBody: isTSInterfaceBody,
  11281. isTSTypeAliasDeclaration: isTSTypeAliasDeclaration,
  11282. isTSAsExpression: isTSAsExpression,
  11283. isTSTypeAssertion: isTSTypeAssertion,
  11284. isTSEnumDeclaration: isTSEnumDeclaration,
  11285. isTSEnumMember: isTSEnumMember,
  11286. isTSModuleDeclaration: isTSModuleDeclaration,
  11287. isTSModuleBlock: isTSModuleBlock,
  11288. isTSImportType: isTSImportType,
  11289. isTSImportEqualsDeclaration: isTSImportEqualsDeclaration,
  11290. isTSExternalModuleReference: isTSExternalModuleReference,
  11291. isTSNonNullExpression: isTSNonNullExpression,
  11292. isTSExportAssignment: isTSExportAssignment,
  11293. isTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration,
  11294. isTSTypeAnnotation: isTSTypeAnnotation,
  11295. isTSTypeParameterInstantiation: isTSTypeParameterInstantiation,
  11296. isTSTypeParameterDeclaration: isTSTypeParameterDeclaration,
  11297. isTSTypeParameter: isTSTypeParameter,
  11298. isExpression: isExpression,
  11299. isBinary: isBinary,
  11300. isScopable: isScopable,
  11301. isBlockParent: isBlockParent,
  11302. isBlock: isBlock,
  11303. isStatement: isStatement,
  11304. isTerminatorless: isTerminatorless,
  11305. isCompletionStatement: isCompletionStatement,
  11306. isConditional: isConditional,
  11307. isLoop: isLoop$1,
  11308. isWhile: isWhile,
  11309. isExpressionWrapper: isExpressionWrapper,
  11310. isFor: isFor,
  11311. isForXStatement: isForXStatement,
  11312. isFunction: isFunction$1,
  11313. isFunctionParent: isFunctionParent,
  11314. isPureish: isPureish,
  11315. isDeclaration: isDeclaration,
  11316. isPatternLike: isPatternLike,
  11317. isLVal: isLVal,
  11318. isTSEntityName: isTSEntityName,
  11319. isLiteral: isLiteral,
  11320. isUserWhitespacable: isUserWhitespacable,
  11321. isMethod: isMethod,
  11322. isObjectMember: isObjectMember,
  11323. isProperty: isProperty,
  11324. isUnaryLike: isUnaryLike,
  11325. isPattern: isPattern,
  11326. isClass: isClass,
  11327. isModuleDeclaration: isModuleDeclaration,
  11328. isExportDeclaration: isExportDeclaration,
  11329. isModuleSpecifier: isModuleSpecifier,
  11330. isFlow: isFlow,
  11331. isFlowType: isFlowType,
  11332. isFlowBaseAnnotation: isFlowBaseAnnotation,
  11333. isFlowDeclaration: isFlowDeclaration,
  11334. isFlowPredicate: isFlowPredicate,
  11335. isEnumBody: isEnumBody,
  11336. isEnumMember: isEnumMember,
  11337. isJSX: isJSX,
  11338. isPrivate: isPrivate,
  11339. isTSTypeElement: isTSTypeElement,
  11340. isTSType: isTSType,
  11341. isTSBaseType: isTSBaseType,
  11342. isNumberLiteral: isNumberLiteral,
  11343. isRegexLiteral: isRegexLiteral,
  11344. isRestProperty: isRestProperty,
  11345. isSpreadProperty: isSpreadProperty
  11346. });
  11347. var ReferencedIdentifier = {
  11348. types: ["Identifier", "JSXIdentifier"],
  11349. checkPath: function checkPath(path, opts) {
  11350. var node = path.node,
  11351. parent = path.parent;
  11352. if (!isIdentifier(node, opts) && !isJSXMemberExpression(parent, opts)) {
  11353. if (isJSXIdentifier(node, opts)) {
  11354. if (react.isCompatTag(node.name)) return false;
  11355. } else {
  11356. return false;
  11357. }
  11358. }
  11359. return isReferenced(node, parent, path.parentPath.parent);
  11360. }
  11361. };
  11362. var ReferencedMemberExpression = {
  11363. types: ["MemberExpression"],
  11364. checkPath: function checkPath(_ref) {
  11365. var node = _ref.node,
  11366. parent = _ref.parent;
  11367. return isMemberExpression(node) && isReferenced(node, parent);
  11368. }
  11369. };
  11370. var BindingIdentifier = {
  11371. types: ["Identifier"],
  11372. checkPath: function checkPath(path) {
  11373. var node = path.node,
  11374. parent = path.parent;
  11375. var grandparent = path.parentPath.parent;
  11376. return isIdentifier(node) && isBinding(node, parent, grandparent);
  11377. }
  11378. };
  11379. var Statement = {
  11380. types: ["Statement"],
  11381. checkPath: function checkPath(_ref2) {
  11382. var node = _ref2.node,
  11383. parent = _ref2.parent;
  11384. if (isStatement(node)) {
  11385. if (isVariableDeclaration(node)) {
  11386. if (isForXStatement(parent, {
  11387. left: node
  11388. })) return false;
  11389. if (isForStatement(parent, {
  11390. init: node
  11391. })) return false;
  11392. }
  11393. return true;
  11394. } else {
  11395. return false;
  11396. }
  11397. }
  11398. };
  11399. var Expression = {
  11400. types: ["Expression"],
  11401. checkPath: function checkPath(path) {
  11402. if (path.isIdentifier()) {
  11403. return path.isReferencedIdentifier();
  11404. } else {
  11405. return isExpression(path.node);
  11406. }
  11407. }
  11408. };
  11409. var Scope$2 = {
  11410. types: ["Scopable", "Pattern"],
  11411. checkPath: function checkPath(path) {
  11412. return isScope(path.node, path.parent);
  11413. }
  11414. };
  11415. var Referenced = {
  11416. checkPath: function checkPath(path) {
  11417. return isReferenced(path.node, path.parent);
  11418. }
  11419. };
  11420. var BlockScoped = {
  11421. checkPath: function checkPath(path) {
  11422. return isBlockScoped$1(path.node);
  11423. }
  11424. };
  11425. var Var = {
  11426. types: ["VariableDeclaration"],
  11427. checkPath: function checkPath(path) {
  11428. return isVar$1(path.node);
  11429. }
  11430. };
  11431. var User = {
  11432. checkPath: function checkPath(path) {
  11433. return path.node && !!path.node.loc;
  11434. }
  11435. };
  11436. var Generated = {
  11437. checkPath: function checkPath(path) {
  11438. return !path.isUser();
  11439. }
  11440. };
  11441. var Pure = {
  11442. checkPath: function checkPath(path, opts) {
  11443. return path.scope.isPure(path.node, opts);
  11444. }
  11445. };
  11446. var Flow = {
  11447. types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
  11448. checkPath: function checkPath(_ref3) {
  11449. var node = _ref3.node;
  11450. if (isFlow(node)) {
  11451. return true;
  11452. } else if (isImportDeclaration(node)) {
  11453. return node.importKind === "type" || node.importKind === "typeof";
  11454. } else if (isExportDeclaration(node)) {
  11455. return node.exportKind === "type";
  11456. } else if (isImportSpecifier(node)) {
  11457. return node.importKind === "type" || node.importKind === "typeof";
  11458. } else {
  11459. return false;
  11460. }
  11461. }
  11462. };
  11463. var RestProperty = {
  11464. types: ["RestElement"],
  11465. checkPath: function checkPath(path) {
  11466. return path.parentPath && path.parentPath.isObjectPattern();
  11467. }
  11468. };
  11469. var SpreadProperty = {
  11470. types: ["RestElement"],
  11471. checkPath: function checkPath(path) {
  11472. return path.parentPath && path.parentPath.isObjectExpression();
  11473. }
  11474. };
  11475. var ExistentialTypeParam = {
  11476. types: ["ExistsTypeAnnotation"]
  11477. };
  11478. var NumericLiteralTypeAnnotation = {
  11479. types: ["NumberLiteralTypeAnnotation"]
  11480. };
  11481. var ForAwaitStatement = {
  11482. types: ["ForOfStatement"],
  11483. checkPath: function checkPath(_ref4) {
  11484. var node = _ref4.node;
  11485. return node["await"] === true;
  11486. }
  11487. };
  11488. var virtualTypes = /*#__PURE__*/Object.freeze({
  11489. __proto__: null,
  11490. ReferencedIdentifier: ReferencedIdentifier,
  11491. ReferencedMemberExpression: ReferencedMemberExpression,
  11492. BindingIdentifier: BindingIdentifier,
  11493. Statement: Statement,
  11494. Expression: Expression,
  11495. Scope: Scope$2,
  11496. Referenced: Referenced,
  11497. BlockScoped: BlockScoped,
  11498. Var: Var,
  11499. User: User,
  11500. Generated: Generated,
  11501. Pure: Pure,
  11502. Flow: Flow,
  11503. RestProperty: RestProperty,
  11504. SpreadProperty: SpreadProperty,
  11505. ExistentialTypeParam: ExistentialTypeParam,
  11506. NumericLiteralTypeAnnotation: NumericLiteralTypeAnnotation,
  11507. ForAwaitStatement: ForAwaitStatement
  11508. });
  11509. var s$1 = 1000;
  11510. var m$2 = s$1 * 60;
  11511. var h$1 = m$2 * 60;
  11512. var d$1 = h$1 * 24;
  11513. var w$1 = d$1 * 7;
  11514. var y$1 = d$1 * 365.25;
  11515. var ms$1 = function ms(val, options) {
  11516. options = options || {};
  11517. var type = typeof val;
  11518. if (type === 'string' && val.length > 0) {
  11519. return parse$9(val);
  11520. } else if (type === 'number' && isFinite(val)) {
  11521. return options["long"] ? fmtLong$1(val) : fmtShort$1(val);
  11522. }
  11523. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  11524. };
  11525. function parse$9(str) {
  11526. str = String(str);
  11527. if (str.length > 100) {
  11528. return;
  11529. }
  11530. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  11531. if (!match) {
  11532. return;
  11533. }
  11534. var n = parseFloat(match[1]);
  11535. var type = (match[2] || 'ms').toLowerCase();
  11536. switch (type) {
  11537. case 'years':
  11538. case 'year':
  11539. case 'yrs':
  11540. case 'yr':
  11541. case 'y':
  11542. return n * y$1;
  11543. case 'weeks':
  11544. case 'week':
  11545. case 'w':
  11546. return n * w$1;
  11547. case 'days':
  11548. case 'day':
  11549. case 'd':
  11550. return n * d$1;
  11551. case 'hours':
  11552. case 'hour':
  11553. case 'hrs':
  11554. case 'hr':
  11555. case 'h':
  11556. return n * h$1;
  11557. case 'minutes':
  11558. case 'minute':
  11559. case 'mins':
  11560. case 'min':
  11561. case 'm':
  11562. return n * m$2;
  11563. case 'seconds':
  11564. case 'second':
  11565. case 'secs':
  11566. case 'sec':
  11567. case 's':
  11568. return n * s$1;
  11569. case 'milliseconds':
  11570. case 'millisecond':
  11571. case 'msecs':
  11572. case 'msec':
  11573. case 'ms':
  11574. return n;
  11575. default:
  11576. return undefined;
  11577. }
  11578. }
  11579. function fmtShort$1(ms) {
  11580. var msAbs = Math.abs(ms);
  11581. if (msAbs >= d$1) {
  11582. return Math.round(ms / d$1) + 'd';
  11583. }
  11584. if (msAbs >= h$1) {
  11585. return Math.round(ms / h$1) + 'h';
  11586. }
  11587. if (msAbs >= m$2) {
  11588. return Math.round(ms / m$2) + 'm';
  11589. }
  11590. if (msAbs >= s$1) {
  11591. return Math.round(ms / s$1) + 's';
  11592. }
  11593. return ms + 'ms';
  11594. }
  11595. function fmtLong$1(ms) {
  11596. var msAbs = Math.abs(ms);
  11597. if (msAbs >= d$1) {
  11598. return plural$1(ms, msAbs, d$1, 'day');
  11599. }
  11600. if (msAbs >= h$1) {
  11601. return plural$1(ms, msAbs, h$1, 'hour');
  11602. }
  11603. if (msAbs >= m$2) {
  11604. return plural$1(ms, msAbs, m$2, 'minute');
  11605. }
  11606. if (msAbs >= s$1) {
  11607. return plural$1(ms, msAbs, s$1, 'second');
  11608. }
  11609. return ms + ' ms';
  11610. }
  11611. function plural$1(ms, msAbs, n, name) {
  11612. var isPlural = msAbs >= n * 1.5;
  11613. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  11614. }
  11615. function setup$2(env) {
  11616. createDebug.debug = createDebug;
  11617. createDebug["default"] = createDebug;
  11618. createDebug.coerce = coerce;
  11619. createDebug.disable = disable;
  11620. createDebug.enable = enable;
  11621. createDebug.enabled = enabled;
  11622. createDebug.humanize = ms$1;
  11623. createDebug.destroy = destroy;
  11624. Object.keys(env).forEach(function (key) {
  11625. createDebug[key] = env[key];
  11626. });
  11627. createDebug.names = [];
  11628. createDebug.skips = [];
  11629. createDebug.formatters = {};
  11630. function selectColor(namespace) {
  11631. var hash = 0;
  11632. for (var i = 0; i < namespace.length; i++) {
  11633. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  11634. hash |= 0;
  11635. }
  11636. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  11637. }
  11638. createDebug.selectColor = selectColor;
  11639. function createDebug(namespace) {
  11640. var prevTime;
  11641. var enableOverride = null;
  11642. var namespacesCache;
  11643. var enabledCache;
  11644. function debug() {
  11645. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  11646. args[_key] = arguments[_key];
  11647. }
  11648. if (!debug.enabled) {
  11649. return;
  11650. }
  11651. var self = debug;
  11652. var curr = Number(new Date());
  11653. var ms = curr - (prevTime || curr);
  11654. self.diff = ms;
  11655. self.prev = prevTime;
  11656. self.curr = curr;
  11657. prevTime = curr;
  11658. args[0] = createDebug.coerce(args[0]);
  11659. if (typeof args[0] !== 'string') {
  11660. args.unshift('%O');
  11661. }
  11662. var index = 0;
  11663. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  11664. if (match === '%%') {
  11665. return '%';
  11666. }
  11667. index++;
  11668. var formatter = createDebug.formatters[format];
  11669. if (typeof formatter === 'function') {
  11670. var val = args[index];
  11671. match = formatter.call(self, val);
  11672. args.splice(index, 1);
  11673. index--;
  11674. }
  11675. return match;
  11676. });
  11677. createDebug.formatArgs.call(self, args);
  11678. var logFn = self.log || createDebug.log;
  11679. logFn.apply(self, args);
  11680. }
  11681. debug.namespace = namespace;
  11682. debug.useColors = createDebug.useColors();
  11683. debug.color = createDebug.selectColor(namespace);
  11684. debug.extend = extend;
  11685. debug.destroy = createDebug.destroy;
  11686. Object.defineProperty(debug, 'enabled', {
  11687. enumerable: true,
  11688. configurable: false,
  11689. get: function get() {
  11690. if (enableOverride !== null) {
  11691. return enableOverride;
  11692. }
  11693. if (namespacesCache !== createDebug.namespaces) {
  11694. namespacesCache = createDebug.namespaces;
  11695. enabledCache = createDebug.enabled(namespace);
  11696. }
  11697. return enabledCache;
  11698. },
  11699. set: function set(v) {
  11700. enableOverride = v;
  11701. }
  11702. });
  11703. if (typeof createDebug.init === 'function') {
  11704. createDebug.init(debug);
  11705. }
  11706. return debug;
  11707. }
  11708. function extend(namespace, delimiter) {
  11709. var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  11710. newDebug.log = this.log;
  11711. return newDebug;
  11712. }
  11713. function enable(namespaces) {
  11714. createDebug.save(namespaces);
  11715. createDebug.namespaces = namespaces;
  11716. createDebug.names = [];
  11717. createDebug.skips = [];
  11718. var i;
  11719. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  11720. var len = split.length;
  11721. for (i = 0; i < len; i++) {
  11722. if (!split[i]) {
  11723. continue;
  11724. }
  11725. namespaces = split[i].replace(/\*/g, '.*?');
  11726. if (namespaces[0] === '-') {
  11727. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  11728. } else {
  11729. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  11730. }
  11731. }
  11732. }
  11733. function disable() {
  11734. var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
  11735. return '-' + namespace;
  11736. }))).join(',');
  11737. createDebug.enable('');
  11738. return namespaces;
  11739. }
  11740. function enabled(name) {
  11741. if (name[name.length - 1] === '*') {
  11742. return true;
  11743. }
  11744. var i;
  11745. var len;
  11746. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  11747. if (createDebug.skips[i].test(name)) {
  11748. return false;
  11749. }
  11750. }
  11751. for (i = 0, len = createDebug.names.length; i < len; i++) {
  11752. if (createDebug.names[i].test(name)) {
  11753. return true;
  11754. }
  11755. }
  11756. return false;
  11757. }
  11758. function toNamespace(regexp) {
  11759. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
  11760. }
  11761. function coerce(val) {
  11762. if (val instanceof Error) {
  11763. return val.stack || val.message;
  11764. }
  11765. return val;
  11766. }
  11767. function destroy() {
  11768. console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
  11769. }
  11770. createDebug.enable(createDebug.load());
  11771. return createDebug;
  11772. }
  11773. var common$1 = setup$2;
  11774. var browser$5 = createCommonjsModule(function (module, exports) {
  11775. exports.formatArgs = formatArgs;
  11776. exports.save = save;
  11777. exports.load = load;
  11778. exports.useColors = useColors;
  11779. exports.storage = localstorage();
  11780. exports.destroy = function () {
  11781. var warned = false;
  11782. return function () {
  11783. if (!warned) {
  11784. warned = true;
  11785. console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
  11786. }
  11787. };
  11788. }();
  11789. exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
  11790. function useColors() {
  11791. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  11792. return true;
  11793. }
  11794. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  11795. return false;
  11796. }
  11797. return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  11798. }
  11799. function formatArgs(args) {
  11800. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  11801. if (!this.useColors) {
  11802. return;
  11803. }
  11804. var c = 'color: ' + this.color;
  11805. args.splice(1, 0, c, 'color: inherit');
  11806. var index = 0;
  11807. var lastC = 0;
  11808. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  11809. if (match === '%%') {
  11810. return;
  11811. }
  11812. index++;
  11813. if (match === '%c') {
  11814. lastC = index;
  11815. }
  11816. });
  11817. args.splice(lastC, 0, c);
  11818. }
  11819. exports.log = console.debug || console.log || function () {};
  11820. function save(namespaces) {
  11821. try {
  11822. if (namespaces) {
  11823. exports.storage.setItem('debug', namespaces);
  11824. } else {
  11825. exports.storage.removeItem('debug');
  11826. }
  11827. } catch (error) {}
  11828. }
  11829. function load() {
  11830. var r;
  11831. try {
  11832. r = exports.storage.getItem('debug');
  11833. } catch (error) {}
  11834. if (!r && typeof browser$6 !== 'undefined' && 'env' in browser$6) {
  11835. r = browser$6.env.DEBUG;
  11836. }
  11837. return r;
  11838. }
  11839. function localstorage() {
  11840. try {
  11841. return localStorage;
  11842. } catch (error) {}
  11843. }
  11844. module.exports = common$1(exports);
  11845. var formatters = module.exports.formatters;
  11846. formatters.j = function (v) {
  11847. try {
  11848. return JSON.stringify(v);
  11849. } catch (error) {
  11850. return '[UnexpectedJSONParseError]: ' + error.message;
  11851. }
  11852. };
  11853. }, "/$$rollup_base$$/packages/babel-traverse/node_modules/debug/src");
  11854. var Binding = function () {
  11855. function Binding(_ref) {
  11856. var identifier = _ref.identifier,
  11857. scope = _ref.scope,
  11858. path = _ref.path,
  11859. kind = _ref.kind;
  11860. this.identifier = void 0;
  11861. this.scope = void 0;
  11862. this.path = void 0;
  11863. this.kind = void 0;
  11864. this.constantViolations = [];
  11865. this.constant = true;
  11866. this.referencePaths = [];
  11867. this.referenced = false;
  11868. this.references = 0;
  11869. this.identifier = identifier;
  11870. this.scope = scope;
  11871. this.path = path;
  11872. this.kind = kind;
  11873. this.clearValue();
  11874. }
  11875. var _proto = Binding.prototype;
  11876. _proto.deoptValue = function deoptValue() {
  11877. this.clearValue();
  11878. this.hasDeoptedValue = true;
  11879. };
  11880. _proto.setValue = function setValue(value) {
  11881. if (this.hasDeoptedValue) return;
  11882. this.hasValue = true;
  11883. this.value = value;
  11884. };
  11885. _proto.clearValue = function clearValue() {
  11886. this.hasDeoptedValue = false;
  11887. this.hasValue = false;
  11888. this.value = null;
  11889. };
  11890. _proto.reassign = function reassign(path) {
  11891. this.constant = false;
  11892. if (this.constantViolations.indexOf(path) !== -1) {
  11893. return;
  11894. }
  11895. this.constantViolations.push(path);
  11896. };
  11897. _proto.reference = function reference(path) {
  11898. if (this.referencePaths.indexOf(path) !== -1) {
  11899. return;
  11900. }
  11901. this.referenced = true;
  11902. this.references++;
  11903. this.referencePaths.push(path);
  11904. };
  11905. _proto.dereference = function dereference() {
  11906. this.references--;
  11907. this.referenced = !!this.references;
  11908. };
  11909. return Binding;
  11910. }();
  11911. function splitExportDeclaration(exportDeclaration) {
  11912. if (!exportDeclaration.isExportDeclaration()) {
  11913. throw new Error("Only export declarations can be split.");
  11914. }
  11915. var isDefault = exportDeclaration.isExportDefaultDeclaration();
  11916. var declaration = exportDeclaration.get("declaration");
  11917. var isClassDeclaration = declaration.isClassDeclaration();
  11918. if (isDefault) {
  11919. var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
  11920. var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
  11921. var id = declaration.node.id;
  11922. var needBindingRegistration = false;
  11923. if (!id) {
  11924. needBindingRegistration = true;
  11925. id = scope.generateUidIdentifier("default");
  11926. if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
  11927. declaration.node.id = cloneNode(id);
  11928. }
  11929. }
  11930. var updatedDeclaration = standaloneDeclaration ? declaration : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]);
  11931. var updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);
  11932. exportDeclaration.insertAfter(updatedExportDeclaration);
  11933. exportDeclaration.replaceWith(updatedDeclaration);
  11934. if (needBindingRegistration) {
  11935. scope.registerDeclaration(exportDeclaration);
  11936. }
  11937. return exportDeclaration;
  11938. }
  11939. if (exportDeclaration.get("specifiers").length > 0) {
  11940. throw new Error("It doesn't make sense to split exported specifiers.");
  11941. }
  11942. var bindingIdentifiers = declaration.getOuterBindingIdentifiers();
  11943. var specifiers = Object.keys(bindingIdentifiers).map(function (name) {
  11944. return exportSpecifier(identifier(name), identifier(name));
  11945. });
  11946. var aliasDeclar = exportNamedDeclaration(null, specifiers);
  11947. exportDeclaration.insertAfter(aliasDeclar);
  11948. exportDeclaration.replaceWith(declaration.node);
  11949. return exportDeclaration;
  11950. }
  11951. var renameVisitor = {
  11952. ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {
  11953. var node = _ref.node;
  11954. if (node.name === state.oldName) {
  11955. node.name = state.newName;
  11956. }
  11957. },
  11958. Scope: function Scope(path, state) {
  11959. if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
  11960. skipAllButComputedMethodKey(path);
  11961. }
  11962. },
  11963. "AssignmentExpression|Declaration|VariableDeclarator": function AssignmentExpressionDeclarationVariableDeclarator(path, state) {
  11964. if (path.isVariableDeclaration()) return;
  11965. var ids = path.getOuterBindingIdentifiers();
  11966. for (var name in ids) {
  11967. if (name === state.oldName) ids[name].name = state.newName;
  11968. }
  11969. }
  11970. };
  11971. var Renamer = function () {
  11972. function Renamer(binding, oldName, newName) {
  11973. this.newName = newName;
  11974. this.oldName = oldName;
  11975. this.binding = binding;
  11976. }
  11977. var _proto = Renamer.prototype;
  11978. _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {
  11979. var maybeExportDeclar = parentDeclar.parentPath;
  11980. if (!maybeExportDeclar.isExportDeclaration()) {
  11981. return;
  11982. }
  11983. if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
  11984. return;
  11985. }
  11986. splitExportDeclaration(maybeExportDeclar);
  11987. };
  11988. _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {
  11989. return;
  11990. };
  11991. _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {
  11992. return;
  11993. };
  11994. _proto.rename = function rename(block) {
  11995. var _this = this;
  11996. var binding = this.binding,
  11997. oldName = this.oldName,
  11998. newName = this.newName;
  11999. var scope = binding.scope,
  12000. path = binding.path;
  12001. var parentDeclar = path.find(function (path) {
  12002. return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression();
  12003. });
  12004. if (parentDeclar) {
  12005. var bindingIds = parentDeclar.getOuterBindingIdentifiers();
  12006. if (bindingIds[oldName] === binding.identifier) {
  12007. this.maybeConvertFromExportDeclaration(parentDeclar);
  12008. }
  12009. }
  12010. var blockToTraverse = block || scope.block;
  12011. if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
  12012. blockToTraverse.cases.forEach(function (c) {
  12013. scope.traverse(c, renameVisitor, _this);
  12014. });
  12015. } else {
  12016. scope.traverse(blockToTraverse, renameVisitor, this);
  12017. }
  12018. if (!block) {
  12019. scope.removeOwnBinding(oldName);
  12020. scope.bindings[newName] = binding;
  12021. this.binding.identifier.name = newName;
  12022. }
  12023. if (parentDeclar) {
  12024. this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
  12025. this.maybeConvertFromClassFunctionExpression(parentDeclar);
  12026. }
  12027. };
  12028. return Renamer;
  12029. }();
  12030. function skipAllButComputedMethodKey(path) {
  12031. if (!path.isMethod() || !path.node.computed) {
  12032. path.skip();
  12033. return;
  12034. }
  12035. var keys = VISITOR_KEYS[path.type];
  12036. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  12037. var key = _step.value;
  12038. if (key !== "key") path.skipKey(key);
  12039. }
  12040. }
  12041. var builtin$1 = {
  12042. "Array": false,
  12043. "ArrayBuffer": false,
  12044. Atomics: false,
  12045. BigInt: false,
  12046. BigInt64Array: false,
  12047. BigUint64Array: false,
  12048. "Boolean": false,
  12049. constructor: false,
  12050. "DataView": false,
  12051. "Date": false,
  12052. "decodeURI": false,
  12053. "decodeURIComponent": false,
  12054. "encodeURI": false,
  12055. "encodeURIComponent": false,
  12056. "Error": false,
  12057. "escape": false,
  12058. "eval": false,
  12059. "EvalError": false,
  12060. "Float32Array": false,
  12061. "Float64Array": false,
  12062. "Function": false,
  12063. globalThis: false,
  12064. hasOwnProperty: false,
  12065. "Infinity": false,
  12066. "Int16Array": false,
  12067. "Int32Array": false,
  12068. "Int8Array": false,
  12069. "isFinite": false,
  12070. "isNaN": false,
  12071. isPrototypeOf: false,
  12072. "JSON": false,
  12073. "Map": false,
  12074. "Math": false,
  12075. "NaN": false,
  12076. "Number": false,
  12077. "Object": false,
  12078. "parseFloat": false,
  12079. "parseInt": false,
  12080. "Promise": false,
  12081. propertyIsEnumerable: false,
  12082. "Proxy": false,
  12083. "RangeError": false,
  12084. "ReferenceError": false,
  12085. "Reflect": false,
  12086. "RegExp": false,
  12087. "Set": false,
  12088. SharedArrayBuffer: false,
  12089. "String": false,
  12090. "Symbol": false,
  12091. "SyntaxError": false,
  12092. toLocaleString: false,
  12093. toString: false,
  12094. "TypeError": false,
  12095. "Uint16Array": false,
  12096. "Uint32Array": false,
  12097. "Uint8Array": false,
  12098. "Uint8ClampedArray": false,
  12099. "undefined": false,
  12100. "unescape": false,
  12101. "URIError": false,
  12102. valueOf: false,
  12103. "WeakMap": false,
  12104. "WeakSet": false
  12105. };
  12106. var es5$1 = {
  12107. "Array": false,
  12108. "Boolean": false,
  12109. constructor: false,
  12110. "Date": false,
  12111. "decodeURI": false,
  12112. "decodeURIComponent": false,
  12113. "encodeURI": false,
  12114. "encodeURIComponent": false,
  12115. "Error": false,
  12116. "escape": false,
  12117. "eval": false,
  12118. "EvalError": false,
  12119. "Function": false,
  12120. hasOwnProperty: false,
  12121. "Infinity": false,
  12122. "isFinite": false,
  12123. "isNaN": false,
  12124. isPrototypeOf: false,
  12125. "JSON": false,
  12126. "Math": false,
  12127. "NaN": false,
  12128. "Number": false,
  12129. "Object": false,
  12130. "parseFloat": false,
  12131. "parseInt": false,
  12132. propertyIsEnumerable: false,
  12133. "RangeError": false,
  12134. "ReferenceError": false,
  12135. "RegExp": false,
  12136. "String": false,
  12137. "SyntaxError": false,
  12138. toLocaleString: false,
  12139. toString: false,
  12140. "TypeError": false,
  12141. "undefined": false,
  12142. "unescape": false,
  12143. "URIError": false,
  12144. valueOf: false
  12145. };
  12146. var es2015$1 = {
  12147. "Array": false,
  12148. "ArrayBuffer": false,
  12149. "Boolean": false,
  12150. constructor: false,
  12151. "DataView": false,
  12152. "Date": false,
  12153. "decodeURI": false,
  12154. "decodeURIComponent": false,
  12155. "encodeURI": false,
  12156. "encodeURIComponent": false,
  12157. "Error": false,
  12158. "escape": false,
  12159. "eval": false,
  12160. "EvalError": false,
  12161. "Float32Array": false,
  12162. "Float64Array": false,
  12163. "Function": false,
  12164. hasOwnProperty: false,
  12165. "Infinity": false,
  12166. "Int16Array": false,
  12167. "Int32Array": false,
  12168. "Int8Array": false,
  12169. "isFinite": false,
  12170. "isNaN": false,
  12171. isPrototypeOf: false,
  12172. "JSON": false,
  12173. "Map": false,
  12174. "Math": false,
  12175. "NaN": false,
  12176. "Number": false,
  12177. "Object": false,
  12178. "parseFloat": false,
  12179. "parseInt": false,
  12180. "Promise": false,
  12181. propertyIsEnumerable: false,
  12182. "Proxy": false,
  12183. "RangeError": false,
  12184. "ReferenceError": false,
  12185. "Reflect": false,
  12186. "RegExp": false,
  12187. "Set": false,
  12188. "String": false,
  12189. "Symbol": false,
  12190. "SyntaxError": false,
  12191. toLocaleString: false,
  12192. toString: false,
  12193. "TypeError": false,
  12194. "Uint16Array": false,
  12195. "Uint32Array": false,
  12196. "Uint8Array": false,
  12197. "Uint8ClampedArray": false,
  12198. "undefined": false,
  12199. "unescape": false,
  12200. "URIError": false,
  12201. valueOf: false,
  12202. "WeakMap": false,
  12203. "WeakSet": false
  12204. };
  12205. var es2017$1 = {
  12206. "Array": false,
  12207. "ArrayBuffer": false,
  12208. Atomics: false,
  12209. "Boolean": false,
  12210. constructor: false,
  12211. "DataView": false,
  12212. "Date": false,
  12213. "decodeURI": false,
  12214. "decodeURIComponent": false,
  12215. "encodeURI": false,
  12216. "encodeURIComponent": false,
  12217. "Error": false,
  12218. "escape": false,
  12219. "eval": false,
  12220. "EvalError": false,
  12221. "Float32Array": false,
  12222. "Float64Array": false,
  12223. "Function": false,
  12224. hasOwnProperty: false,
  12225. "Infinity": false,
  12226. "Int16Array": false,
  12227. "Int32Array": false,
  12228. "Int8Array": false,
  12229. "isFinite": false,
  12230. "isNaN": false,
  12231. isPrototypeOf: false,
  12232. "JSON": false,
  12233. "Map": false,
  12234. "Math": false,
  12235. "NaN": false,
  12236. "Number": false,
  12237. "Object": false,
  12238. "parseFloat": false,
  12239. "parseInt": false,
  12240. "Promise": false,
  12241. propertyIsEnumerable: false,
  12242. "Proxy": false,
  12243. "RangeError": false,
  12244. "ReferenceError": false,
  12245. "Reflect": false,
  12246. "RegExp": false,
  12247. "Set": false,
  12248. SharedArrayBuffer: false,
  12249. "String": false,
  12250. "Symbol": false,
  12251. "SyntaxError": false,
  12252. toLocaleString: false,
  12253. toString: false,
  12254. "TypeError": false,
  12255. "Uint16Array": false,
  12256. "Uint32Array": false,
  12257. "Uint8Array": false,
  12258. "Uint8ClampedArray": false,
  12259. "undefined": false,
  12260. "unescape": false,
  12261. "URIError": false,
  12262. valueOf: false,
  12263. "WeakMap": false,
  12264. "WeakSet": false
  12265. };
  12266. var browser$4 = {
  12267. AbortController: false,
  12268. AbortSignal: false,
  12269. addEventListener: false,
  12270. alert: false,
  12271. AnalyserNode: false,
  12272. Animation: false,
  12273. AnimationEffectReadOnly: false,
  12274. AnimationEffectTiming: false,
  12275. AnimationEffectTimingReadOnly: false,
  12276. AnimationEvent: false,
  12277. AnimationPlaybackEvent: false,
  12278. AnimationTimeline: false,
  12279. applicationCache: false,
  12280. ApplicationCache: false,
  12281. ApplicationCacheErrorEvent: false,
  12282. atob: false,
  12283. Attr: false,
  12284. Audio: false,
  12285. AudioBuffer: false,
  12286. AudioBufferSourceNode: false,
  12287. AudioContext: false,
  12288. AudioDestinationNode: false,
  12289. AudioListener: false,
  12290. AudioNode: false,
  12291. AudioParam: false,
  12292. AudioProcessingEvent: false,
  12293. AudioScheduledSourceNode: false,
  12294. "AudioWorkletGlobalScope ": false,
  12295. AudioWorkletNode: false,
  12296. AudioWorkletProcessor: false,
  12297. BarProp: false,
  12298. BaseAudioContext: false,
  12299. BatteryManager: false,
  12300. BeforeUnloadEvent: false,
  12301. BiquadFilterNode: false,
  12302. Blob: false,
  12303. BlobEvent: false,
  12304. blur: false,
  12305. BroadcastChannel: false,
  12306. btoa: false,
  12307. BudgetService: false,
  12308. ByteLengthQueuingStrategy: false,
  12309. Cache: false,
  12310. caches: false,
  12311. CacheStorage: false,
  12312. cancelAnimationFrame: false,
  12313. cancelIdleCallback: false,
  12314. CanvasCaptureMediaStreamTrack: false,
  12315. CanvasGradient: false,
  12316. CanvasPattern: false,
  12317. CanvasRenderingContext2D: false,
  12318. ChannelMergerNode: false,
  12319. ChannelSplitterNode: false,
  12320. CharacterData: false,
  12321. clearInterval: false,
  12322. clearTimeout: false,
  12323. clientInformation: false,
  12324. ClipboardEvent: false,
  12325. close: false,
  12326. closed: false,
  12327. CloseEvent: false,
  12328. Comment: false,
  12329. CompositionEvent: false,
  12330. confirm: false,
  12331. console: false,
  12332. ConstantSourceNode: false,
  12333. ConvolverNode: false,
  12334. CountQueuingStrategy: false,
  12335. createImageBitmap: false,
  12336. Credential: false,
  12337. CredentialsContainer: false,
  12338. crypto: false,
  12339. Crypto: false,
  12340. CryptoKey: false,
  12341. CSS: false,
  12342. CSSConditionRule: false,
  12343. CSSFontFaceRule: false,
  12344. CSSGroupingRule: false,
  12345. CSSImportRule: false,
  12346. CSSKeyframeRule: false,
  12347. CSSKeyframesRule: false,
  12348. CSSMediaRule: false,
  12349. CSSNamespaceRule: false,
  12350. CSSPageRule: false,
  12351. CSSRule: false,
  12352. CSSRuleList: false,
  12353. CSSStyleDeclaration: false,
  12354. CSSStyleRule: false,
  12355. CSSStyleSheet: false,
  12356. CSSSupportsRule: false,
  12357. CustomElementRegistry: false,
  12358. customElements: false,
  12359. CustomEvent: false,
  12360. DataTransfer: false,
  12361. DataTransferItem: false,
  12362. DataTransferItemList: false,
  12363. defaultstatus: false,
  12364. defaultStatus: false,
  12365. DelayNode: false,
  12366. DeviceMotionEvent: false,
  12367. DeviceOrientationEvent: false,
  12368. devicePixelRatio: false,
  12369. dispatchEvent: false,
  12370. document: false,
  12371. Document: false,
  12372. DocumentFragment: false,
  12373. DocumentType: false,
  12374. DOMError: false,
  12375. DOMException: false,
  12376. DOMImplementation: false,
  12377. DOMMatrix: false,
  12378. DOMMatrixReadOnly: false,
  12379. DOMParser: false,
  12380. DOMPoint: false,
  12381. DOMPointReadOnly: false,
  12382. DOMQuad: false,
  12383. DOMRect: false,
  12384. DOMRectReadOnly: false,
  12385. DOMStringList: false,
  12386. DOMStringMap: false,
  12387. DOMTokenList: false,
  12388. DragEvent: false,
  12389. DynamicsCompressorNode: false,
  12390. Element: false,
  12391. ErrorEvent: false,
  12392. event: false,
  12393. Event: false,
  12394. EventSource: false,
  12395. EventTarget: false,
  12396. external: false,
  12397. fetch: false,
  12398. File: false,
  12399. FileList: false,
  12400. FileReader: false,
  12401. find: false,
  12402. focus: false,
  12403. FocusEvent: false,
  12404. FontFace: false,
  12405. FontFaceSetLoadEvent: false,
  12406. FormData: false,
  12407. frameElement: false,
  12408. frames: false,
  12409. GainNode: false,
  12410. Gamepad: false,
  12411. GamepadButton: false,
  12412. GamepadEvent: false,
  12413. getComputedStyle: false,
  12414. getSelection: false,
  12415. HashChangeEvent: false,
  12416. Headers: false,
  12417. history: false,
  12418. History: false,
  12419. HTMLAllCollection: false,
  12420. HTMLAnchorElement: false,
  12421. HTMLAreaElement: false,
  12422. HTMLAudioElement: false,
  12423. HTMLBaseElement: false,
  12424. HTMLBodyElement: false,
  12425. HTMLBRElement: false,
  12426. HTMLButtonElement: false,
  12427. HTMLCanvasElement: false,
  12428. HTMLCollection: false,
  12429. HTMLContentElement: false,
  12430. HTMLDataElement: false,
  12431. HTMLDataListElement: false,
  12432. HTMLDetailsElement: false,
  12433. HTMLDialogElement: false,
  12434. HTMLDirectoryElement: false,
  12435. HTMLDivElement: false,
  12436. HTMLDListElement: false,
  12437. HTMLDocument: false,
  12438. HTMLElement: false,
  12439. HTMLEmbedElement: false,
  12440. HTMLFieldSetElement: false,
  12441. HTMLFontElement: false,
  12442. HTMLFormControlsCollection: false,
  12443. HTMLFormElement: false,
  12444. HTMLFrameElement: false,
  12445. HTMLFrameSetElement: false,
  12446. HTMLHeadElement: false,
  12447. HTMLHeadingElement: false,
  12448. HTMLHRElement: false,
  12449. HTMLHtmlElement: false,
  12450. HTMLIFrameElement: false,
  12451. HTMLImageElement: false,
  12452. HTMLInputElement: false,
  12453. HTMLLabelElement: false,
  12454. HTMLLegendElement: false,
  12455. HTMLLIElement: false,
  12456. HTMLLinkElement: false,
  12457. HTMLMapElement: false,
  12458. HTMLMarqueeElement: false,
  12459. HTMLMediaElement: false,
  12460. HTMLMenuElement: false,
  12461. HTMLMetaElement: false,
  12462. HTMLMeterElement: false,
  12463. HTMLModElement: false,
  12464. HTMLObjectElement: false,
  12465. HTMLOListElement: false,
  12466. HTMLOptGroupElement: false,
  12467. HTMLOptionElement: false,
  12468. HTMLOptionsCollection: false,
  12469. HTMLOutputElement: false,
  12470. HTMLParagraphElement: false,
  12471. HTMLParamElement: false,
  12472. HTMLPictureElement: false,
  12473. HTMLPreElement: false,
  12474. HTMLProgressElement: false,
  12475. HTMLQuoteElement: false,
  12476. HTMLScriptElement: false,
  12477. HTMLSelectElement: false,
  12478. HTMLShadowElement: false,
  12479. HTMLSlotElement: false,
  12480. HTMLSourceElement: false,
  12481. HTMLSpanElement: false,
  12482. HTMLStyleElement: false,
  12483. HTMLTableCaptionElement: false,
  12484. HTMLTableCellElement: false,
  12485. HTMLTableColElement: false,
  12486. HTMLTableElement: false,
  12487. HTMLTableRowElement: false,
  12488. HTMLTableSectionElement: false,
  12489. HTMLTemplateElement: false,
  12490. HTMLTextAreaElement: false,
  12491. HTMLTimeElement: false,
  12492. HTMLTitleElement: false,
  12493. HTMLTrackElement: false,
  12494. HTMLUListElement: false,
  12495. HTMLUnknownElement: false,
  12496. HTMLVideoElement: false,
  12497. IDBCursor: false,
  12498. IDBCursorWithValue: false,
  12499. IDBDatabase: false,
  12500. IDBFactory: false,
  12501. IDBIndex: false,
  12502. IDBKeyRange: false,
  12503. IDBObjectStore: false,
  12504. IDBOpenDBRequest: false,
  12505. IDBRequest: false,
  12506. IDBTransaction: false,
  12507. IDBVersionChangeEvent: false,
  12508. IdleDeadline: false,
  12509. IIRFilterNode: false,
  12510. Image: false,
  12511. ImageBitmap: false,
  12512. ImageBitmapRenderingContext: false,
  12513. ImageCapture: false,
  12514. ImageData: false,
  12515. indexedDB: false,
  12516. innerHeight: false,
  12517. innerWidth: false,
  12518. InputEvent: false,
  12519. IntersectionObserver: false,
  12520. IntersectionObserverEntry: false,
  12521. "Intl": false,
  12522. isSecureContext: false,
  12523. KeyboardEvent: false,
  12524. KeyframeEffect: false,
  12525. KeyframeEffectReadOnly: false,
  12526. length: false,
  12527. localStorage: false,
  12528. location: true,
  12529. Location: false,
  12530. locationbar: false,
  12531. matchMedia: false,
  12532. MediaDeviceInfo: false,
  12533. MediaDevices: false,
  12534. MediaElementAudioSourceNode: false,
  12535. MediaEncryptedEvent: false,
  12536. MediaError: false,
  12537. MediaKeyMessageEvent: false,
  12538. MediaKeySession: false,
  12539. MediaKeyStatusMap: false,
  12540. MediaKeySystemAccess: false,
  12541. MediaList: false,
  12542. MediaQueryList: false,
  12543. MediaQueryListEvent: false,
  12544. MediaRecorder: false,
  12545. MediaSettingsRange: false,
  12546. MediaSource: false,
  12547. MediaStream: false,
  12548. MediaStreamAudioDestinationNode: false,
  12549. MediaStreamAudioSourceNode: false,
  12550. MediaStreamEvent: false,
  12551. MediaStreamTrack: false,
  12552. MediaStreamTrackEvent: false,
  12553. menubar: false,
  12554. MessageChannel: false,
  12555. MessageEvent: false,
  12556. MessagePort: false,
  12557. MIDIAccess: false,
  12558. MIDIConnectionEvent: false,
  12559. MIDIInput: false,
  12560. MIDIInputMap: false,
  12561. MIDIMessageEvent: false,
  12562. MIDIOutput: false,
  12563. MIDIOutputMap: false,
  12564. MIDIPort: false,
  12565. MimeType: false,
  12566. MimeTypeArray: false,
  12567. MouseEvent: false,
  12568. moveBy: false,
  12569. moveTo: false,
  12570. MutationEvent: false,
  12571. MutationObserver: false,
  12572. MutationRecord: false,
  12573. name: false,
  12574. NamedNodeMap: false,
  12575. NavigationPreloadManager: false,
  12576. navigator: false,
  12577. Navigator: false,
  12578. NetworkInformation: false,
  12579. Node: false,
  12580. NodeFilter: false,
  12581. NodeIterator: false,
  12582. NodeList: false,
  12583. Notification: false,
  12584. OfflineAudioCompletionEvent: false,
  12585. OfflineAudioContext: false,
  12586. offscreenBuffering: false,
  12587. OffscreenCanvas: true,
  12588. onabort: true,
  12589. onafterprint: true,
  12590. onanimationend: true,
  12591. onanimationiteration: true,
  12592. onanimationstart: true,
  12593. onappinstalled: true,
  12594. onauxclick: true,
  12595. onbeforeinstallprompt: true,
  12596. onbeforeprint: true,
  12597. onbeforeunload: true,
  12598. onblur: true,
  12599. oncancel: true,
  12600. oncanplay: true,
  12601. oncanplaythrough: true,
  12602. onchange: true,
  12603. onclick: true,
  12604. onclose: true,
  12605. oncontextmenu: true,
  12606. oncuechange: true,
  12607. ondblclick: true,
  12608. ondevicemotion: true,
  12609. ondeviceorientation: true,
  12610. ondeviceorientationabsolute: true,
  12611. ondrag: true,
  12612. ondragend: true,
  12613. ondragenter: true,
  12614. ondragleave: true,
  12615. ondragover: true,
  12616. ondragstart: true,
  12617. ondrop: true,
  12618. ondurationchange: true,
  12619. onemptied: true,
  12620. onended: true,
  12621. onerror: true,
  12622. onfocus: true,
  12623. ongotpointercapture: true,
  12624. onhashchange: true,
  12625. oninput: true,
  12626. oninvalid: true,
  12627. onkeydown: true,
  12628. onkeypress: true,
  12629. onkeyup: true,
  12630. onlanguagechange: true,
  12631. onload: true,
  12632. onloadeddata: true,
  12633. onloadedmetadata: true,
  12634. onloadstart: true,
  12635. onlostpointercapture: true,
  12636. onmessage: true,
  12637. onmessageerror: true,
  12638. onmousedown: true,
  12639. onmouseenter: true,
  12640. onmouseleave: true,
  12641. onmousemove: true,
  12642. onmouseout: true,
  12643. onmouseover: true,
  12644. onmouseup: true,
  12645. onmousewheel: true,
  12646. onoffline: true,
  12647. ononline: true,
  12648. onpagehide: true,
  12649. onpageshow: true,
  12650. onpause: true,
  12651. onplay: true,
  12652. onplaying: true,
  12653. onpointercancel: true,
  12654. onpointerdown: true,
  12655. onpointerenter: true,
  12656. onpointerleave: true,
  12657. onpointermove: true,
  12658. onpointerout: true,
  12659. onpointerover: true,
  12660. onpointerup: true,
  12661. onpopstate: true,
  12662. onprogress: true,
  12663. onratechange: true,
  12664. onrejectionhandled: true,
  12665. onreset: true,
  12666. onresize: true,
  12667. onscroll: true,
  12668. onsearch: true,
  12669. onseeked: true,
  12670. onseeking: true,
  12671. onselect: true,
  12672. onstalled: true,
  12673. onstorage: true,
  12674. onsubmit: true,
  12675. onsuspend: true,
  12676. ontimeupdate: true,
  12677. ontoggle: true,
  12678. ontransitionend: true,
  12679. onunhandledrejection: true,
  12680. onunload: true,
  12681. onvolumechange: true,
  12682. onwaiting: true,
  12683. onwheel: true,
  12684. open: false,
  12685. openDatabase: false,
  12686. opener: false,
  12687. Option: false,
  12688. origin: false,
  12689. OscillatorNode: false,
  12690. outerHeight: false,
  12691. outerWidth: false,
  12692. PageTransitionEvent: false,
  12693. pageXOffset: false,
  12694. pageYOffset: false,
  12695. PannerNode: false,
  12696. parent: false,
  12697. Path2D: false,
  12698. PaymentAddress: false,
  12699. PaymentRequest: false,
  12700. PaymentRequestUpdateEvent: false,
  12701. PaymentResponse: false,
  12702. performance: false,
  12703. Performance: false,
  12704. PerformanceEntry: false,
  12705. PerformanceLongTaskTiming: false,
  12706. PerformanceMark: false,
  12707. PerformanceMeasure: false,
  12708. PerformanceNavigation: false,
  12709. PerformanceNavigationTiming: false,
  12710. PerformanceObserver: false,
  12711. PerformanceObserverEntryList: false,
  12712. PerformancePaintTiming: false,
  12713. PerformanceResourceTiming: false,
  12714. PerformanceTiming: false,
  12715. PeriodicWave: false,
  12716. Permissions: false,
  12717. PermissionStatus: false,
  12718. personalbar: false,
  12719. PhotoCapabilities: false,
  12720. Plugin: false,
  12721. PluginArray: false,
  12722. PointerEvent: false,
  12723. PopStateEvent: false,
  12724. postMessage: false,
  12725. Presentation: false,
  12726. PresentationAvailability: false,
  12727. PresentationConnection: false,
  12728. PresentationConnectionAvailableEvent: false,
  12729. PresentationConnectionCloseEvent: false,
  12730. PresentationConnectionList: false,
  12731. PresentationReceiver: false,
  12732. PresentationRequest: false,
  12733. print: false,
  12734. ProcessingInstruction: false,
  12735. ProgressEvent: false,
  12736. PromiseRejectionEvent: false,
  12737. prompt: false,
  12738. PushManager: false,
  12739. PushSubscription: false,
  12740. PushSubscriptionOptions: false,
  12741. queueMicrotask: false,
  12742. RadioNodeList: false,
  12743. Range: false,
  12744. ReadableStream: false,
  12745. registerProcessor: false,
  12746. RemotePlayback: false,
  12747. removeEventListener: false,
  12748. Request: false,
  12749. requestAnimationFrame: false,
  12750. requestIdleCallback: false,
  12751. resizeBy: false,
  12752. ResizeObserver: false,
  12753. ResizeObserverEntry: false,
  12754. resizeTo: false,
  12755. Response: false,
  12756. RTCCertificate: false,
  12757. RTCDataChannel: false,
  12758. RTCDataChannelEvent: false,
  12759. RTCDtlsTransport: false,
  12760. RTCIceCandidate: false,
  12761. RTCIceGatherer: false,
  12762. RTCIceTransport: false,
  12763. RTCPeerConnection: false,
  12764. RTCPeerConnectionIceEvent: false,
  12765. RTCRtpContributingSource: false,
  12766. RTCRtpReceiver: false,
  12767. RTCRtpSender: false,
  12768. RTCSctpTransport: false,
  12769. RTCSessionDescription: false,
  12770. RTCStatsReport: false,
  12771. RTCTrackEvent: false,
  12772. screen: false,
  12773. Screen: false,
  12774. screenLeft: false,
  12775. ScreenOrientation: false,
  12776. screenTop: false,
  12777. screenX: false,
  12778. screenY: false,
  12779. ScriptProcessorNode: false,
  12780. scroll: false,
  12781. scrollbars: false,
  12782. scrollBy: false,
  12783. scrollTo: false,
  12784. scrollX: false,
  12785. scrollY: false,
  12786. SecurityPolicyViolationEvent: false,
  12787. Selection: false,
  12788. self: false,
  12789. ServiceWorker: false,
  12790. ServiceWorkerContainer: false,
  12791. ServiceWorkerRegistration: false,
  12792. sessionStorage: false,
  12793. setInterval: false,
  12794. setTimeout: false,
  12795. ShadowRoot: false,
  12796. SharedWorker: false,
  12797. SourceBuffer: false,
  12798. SourceBufferList: false,
  12799. speechSynthesis: false,
  12800. SpeechSynthesisEvent: false,
  12801. SpeechSynthesisUtterance: false,
  12802. StaticRange: false,
  12803. status: false,
  12804. statusbar: false,
  12805. StereoPannerNode: false,
  12806. stop: false,
  12807. Storage: false,
  12808. StorageEvent: false,
  12809. StorageManager: false,
  12810. styleMedia: false,
  12811. StyleSheet: false,
  12812. StyleSheetList: false,
  12813. SubtleCrypto: false,
  12814. SVGAElement: false,
  12815. SVGAngle: false,
  12816. SVGAnimatedAngle: false,
  12817. SVGAnimatedBoolean: false,
  12818. SVGAnimatedEnumeration: false,
  12819. SVGAnimatedInteger: false,
  12820. SVGAnimatedLength: false,
  12821. SVGAnimatedLengthList: false,
  12822. SVGAnimatedNumber: false,
  12823. SVGAnimatedNumberList: false,
  12824. SVGAnimatedPreserveAspectRatio: false,
  12825. SVGAnimatedRect: false,
  12826. SVGAnimatedString: false,
  12827. SVGAnimatedTransformList: false,
  12828. SVGAnimateElement: false,
  12829. SVGAnimateMotionElement: false,
  12830. SVGAnimateTransformElement: false,
  12831. SVGAnimationElement: false,
  12832. SVGCircleElement: false,
  12833. SVGClipPathElement: false,
  12834. SVGComponentTransferFunctionElement: false,
  12835. SVGDefsElement: false,
  12836. SVGDescElement: false,
  12837. SVGDiscardElement: false,
  12838. SVGElement: false,
  12839. SVGEllipseElement: false,
  12840. SVGFEBlendElement: false,
  12841. SVGFEColorMatrixElement: false,
  12842. SVGFEComponentTransferElement: false,
  12843. SVGFECompositeElement: false,
  12844. SVGFEConvolveMatrixElement: false,
  12845. SVGFEDiffuseLightingElement: false,
  12846. SVGFEDisplacementMapElement: false,
  12847. SVGFEDistantLightElement: false,
  12848. SVGFEDropShadowElement: false,
  12849. SVGFEFloodElement: false,
  12850. SVGFEFuncAElement: false,
  12851. SVGFEFuncBElement: false,
  12852. SVGFEFuncGElement: false,
  12853. SVGFEFuncRElement: false,
  12854. SVGFEGaussianBlurElement: false,
  12855. SVGFEImageElement: false,
  12856. SVGFEMergeElement: false,
  12857. SVGFEMergeNodeElement: false,
  12858. SVGFEMorphologyElement: false,
  12859. SVGFEOffsetElement: false,
  12860. SVGFEPointLightElement: false,
  12861. SVGFESpecularLightingElement: false,
  12862. SVGFESpotLightElement: false,
  12863. SVGFETileElement: false,
  12864. SVGFETurbulenceElement: false,
  12865. SVGFilterElement: false,
  12866. SVGForeignObjectElement: false,
  12867. SVGGElement: false,
  12868. SVGGeometryElement: false,
  12869. SVGGradientElement: false,
  12870. SVGGraphicsElement: false,
  12871. SVGImageElement: false,
  12872. SVGLength: false,
  12873. SVGLengthList: false,
  12874. SVGLinearGradientElement: false,
  12875. SVGLineElement: false,
  12876. SVGMarkerElement: false,
  12877. SVGMaskElement: false,
  12878. SVGMatrix: false,
  12879. SVGMetadataElement: false,
  12880. SVGMPathElement: false,
  12881. SVGNumber: false,
  12882. SVGNumberList: false,
  12883. SVGPathElement: false,
  12884. SVGPatternElement: false,
  12885. SVGPoint: false,
  12886. SVGPointList: false,
  12887. SVGPolygonElement: false,
  12888. SVGPolylineElement: false,
  12889. SVGPreserveAspectRatio: false,
  12890. SVGRadialGradientElement: false,
  12891. SVGRect: false,
  12892. SVGRectElement: false,
  12893. SVGScriptElement: false,
  12894. SVGSetElement: false,
  12895. SVGStopElement: false,
  12896. SVGStringList: false,
  12897. SVGStyleElement: false,
  12898. SVGSVGElement: false,
  12899. SVGSwitchElement: false,
  12900. SVGSymbolElement: false,
  12901. SVGTextContentElement: false,
  12902. SVGTextElement: false,
  12903. SVGTextPathElement: false,
  12904. SVGTextPositioningElement: false,
  12905. SVGTitleElement: false,
  12906. SVGTransform: false,
  12907. SVGTransformList: false,
  12908. SVGTSpanElement: false,
  12909. SVGUnitTypes: false,
  12910. SVGUseElement: false,
  12911. SVGViewElement: false,
  12912. TaskAttributionTiming: false,
  12913. Text: false,
  12914. TextDecoder: false,
  12915. TextEncoder: false,
  12916. TextEvent: false,
  12917. TextMetrics: false,
  12918. TextTrack: false,
  12919. TextTrackCue: false,
  12920. TextTrackCueList: false,
  12921. TextTrackList: false,
  12922. TimeRanges: false,
  12923. toolbar: false,
  12924. top: false,
  12925. Touch: false,
  12926. TouchEvent: false,
  12927. TouchList: false,
  12928. TrackEvent: false,
  12929. TransitionEvent: false,
  12930. TreeWalker: false,
  12931. UIEvent: false,
  12932. URL: false,
  12933. URLSearchParams: false,
  12934. ValidityState: false,
  12935. visualViewport: false,
  12936. VisualViewport: false,
  12937. VTTCue: false,
  12938. WaveShaperNode: false,
  12939. WebAssembly: false,
  12940. WebGL2RenderingContext: false,
  12941. WebGLActiveInfo: false,
  12942. WebGLBuffer: false,
  12943. WebGLContextEvent: false,
  12944. WebGLFramebuffer: false,
  12945. WebGLProgram: false,
  12946. WebGLQuery: false,
  12947. WebGLRenderbuffer: false,
  12948. WebGLRenderingContext: false,
  12949. WebGLSampler: false,
  12950. WebGLShader: false,
  12951. WebGLShaderPrecisionFormat: false,
  12952. WebGLSync: false,
  12953. WebGLTexture: false,
  12954. WebGLTransformFeedback: false,
  12955. WebGLUniformLocation: false,
  12956. WebGLVertexArrayObject: false,
  12957. WebSocket: false,
  12958. WheelEvent: false,
  12959. window: false,
  12960. Window: false,
  12961. Worker: false,
  12962. WritableStream: false,
  12963. XMLDocument: false,
  12964. XMLHttpRequest: false,
  12965. XMLHttpRequestEventTarget: false,
  12966. XMLHttpRequestUpload: false,
  12967. XMLSerializer: false,
  12968. XPathEvaluator: false,
  12969. XPathExpression: false,
  12970. XPathResult: false,
  12971. XSLTProcessor: false
  12972. };
  12973. var worker$1 = {
  12974. addEventListener: false,
  12975. applicationCache: false,
  12976. atob: false,
  12977. Blob: false,
  12978. BroadcastChannel: false,
  12979. btoa: false,
  12980. Cache: false,
  12981. caches: false,
  12982. clearInterval: false,
  12983. clearTimeout: false,
  12984. close: true,
  12985. console: false,
  12986. fetch: false,
  12987. FileReaderSync: false,
  12988. FormData: false,
  12989. Headers: false,
  12990. IDBCursor: false,
  12991. IDBCursorWithValue: false,
  12992. IDBDatabase: false,
  12993. IDBFactory: false,
  12994. IDBIndex: false,
  12995. IDBKeyRange: false,
  12996. IDBObjectStore: false,
  12997. IDBOpenDBRequest: false,
  12998. IDBRequest: false,
  12999. IDBTransaction: false,
  13000. IDBVersionChangeEvent: false,
  13001. ImageData: false,
  13002. importScripts: true,
  13003. indexedDB: false,
  13004. location: false,
  13005. MessageChannel: false,
  13006. MessagePort: false,
  13007. name: false,
  13008. navigator: false,
  13009. Notification: false,
  13010. onclose: true,
  13011. onconnect: true,
  13012. onerror: true,
  13013. onlanguagechange: true,
  13014. onmessage: true,
  13015. onoffline: true,
  13016. ononline: true,
  13017. onrejectionhandled: true,
  13018. onunhandledrejection: true,
  13019. performance: false,
  13020. Performance: false,
  13021. PerformanceEntry: false,
  13022. PerformanceMark: false,
  13023. PerformanceMeasure: false,
  13024. PerformanceNavigation: false,
  13025. PerformanceResourceTiming: false,
  13026. PerformanceTiming: false,
  13027. postMessage: true,
  13028. "Promise": false,
  13029. queueMicrotask: false,
  13030. removeEventListener: false,
  13031. Request: false,
  13032. Response: false,
  13033. self: true,
  13034. ServiceWorkerRegistration: false,
  13035. setInterval: false,
  13036. setTimeout: false,
  13037. TextDecoder: false,
  13038. TextEncoder: false,
  13039. URL: false,
  13040. URLSearchParams: false,
  13041. WebSocket: false,
  13042. Worker: false,
  13043. WorkerGlobalScope: false,
  13044. XMLHttpRequest: false
  13045. };
  13046. var node$1 = {
  13047. __dirname: false,
  13048. __filename: false,
  13049. Buffer: false,
  13050. clearImmediate: false,
  13051. clearInterval: false,
  13052. clearTimeout: false,
  13053. console: false,
  13054. exports: true,
  13055. global: false,
  13056. "Intl": false,
  13057. module: false,
  13058. process: false,
  13059. queueMicrotask: false,
  13060. require: false,
  13061. setImmediate: false,
  13062. setInterval: false,
  13063. setTimeout: false,
  13064. TextDecoder: false,
  13065. TextEncoder: false,
  13066. URL: false,
  13067. URLSearchParams: false
  13068. };
  13069. var commonjs$1 = {
  13070. exports: true,
  13071. global: false,
  13072. module: false,
  13073. require: false
  13074. };
  13075. var amd$1 = {
  13076. define: false,
  13077. require: false
  13078. };
  13079. var mocha$1 = {
  13080. after: false,
  13081. afterEach: false,
  13082. before: false,
  13083. beforeEach: false,
  13084. context: false,
  13085. describe: false,
  13086. it: false,
  13087. mocha: false,
  13088. run: false,
  13089. setup: false,
  13090. specify: false,
  13091. suite: false,
  13092. suiteSetup: false,
  13093. suiteTeardown: false,
  13094. teardown: false,
  13095. test: false,
  13096. xcontext: false,
  13097. xdescribe: false,
  13098. xit: false,
  13099. xspecify: false
  13100. };
  13101. var jasmine$1 = {
  13102. afterAll: false,
  13103. afterEach: false,
  13104. beforeAll: false,
  13105. beforeEach: false,
  13106. describe: false,
  13107. expect: false,
  13108. fail: false,
  13109. fdescribe: false,
  13110. fit: false,
  13111. it: false,
  13112. jasmine: false,
  13113. pending: false,
  13114. runs: false,
  13115. spyOn: false,
  13116. spyOnProperty: false,
  13117. waits: false,
  13118. waitsFor: false,
  13119. xdescribe: false,
  13120. xit: false
  13121. };
  13122. var jest$1 = {
  13123. afterAll: false,
  13124. afterEach: false,
  13125. beforeAll: false,
  13126. beforeEach: false,
  13127. describe: false,
  13128. expect: false,
  13129. fdescribe: false,
  13130. fit: false,
  13131. it: false,
  13132. jest: false,
  13133. pit: false,
  13134. require: false,
  13135. test: false,
  13136. xdescribe: false,
  13137. xit: false,
  13138. xtest: false
  13139. };
  13140. var qunit$1 = {
  13141. asyncTest: false,
  13142. deepEqual: false,
  13143. equal: false,
  13144. expect: false,
  13145. module: false,
  13146. notDeepEqual: false,
  13147. notEqual: false,
  13148. notOk: false,
  13149. notPropEqual: false,
  13150. notStrictEqual: false,
  13151. ok: false,
  13152. propEqual: false,
  13153. QUnit: false,
  13154. raises: false,
  13155. start: false,
  13156. stop: false,
  13157. strictEqual: false,
  13158. test: false,
  13159. throws: false
  13160. };
  13161. var phantomjs$1 = {
  13162. console: true,
  13163. exports: true,
  13164. phantom: true,
  13165. require: true,
  13166. WebPage: true
  13167. };
  13168. var couch$1 = {
  13169. emit: false,
  13170. exports: false,
  13171. getRow: false,
  13172. log: false,
  13173. module: false,
  13174. provides: false,
  13175. require: false,
  13176. respond: false,
  13177. send: false,
  13178. start: false,
  13179. sum: false
  13180. };
  13181. var rhino$1 = {
  13182. defineClass: false,
  13183. deserialize: false,
  13184. gc: false,
  13185. help: false,
  13186. importClass: false,
  13187. importPackage: false,
  13188. java: false,
  13189. load: false,
  13190. loadClass: false,
  13191. Packages: false,
  13192. print: false,
  13193. quit: false,
  13194. readFile: false,
  13195. readUrl: false,
  13196. runCommand: false,
  13197. seal: false,
  13198. serialize: false,
  13199. spawn: false,
  13200. sync: false,
  13201. toint32: false,
  13202. version: false
  13203. };
  13204. var nashorn$1 = {
  13205. __DIR__: false,
  13206. __FILE__: false,
  13207. __LINE__: false,
  13208. com: false,
  13209. edu: false,
  13210. exit: false,
  13211. java: false,
  13212. Java: false,
  13213. javafx: false,
  13214. JavaImporter: false,
  13215. javax: false,
  13216. JSAdapter: false,
  13217. load: false,
  13218. loadWithNewGlobal: false,
  13219. org: false,
  13220. Packages: false,
  13221. print: false,
  13222. quit: false
  13223. };
  13224. var wsh$1 = {
  13225. ActiveXObject: true,
  13226. Enumerator: true,
  13227. GetObject: true,
  13228. ScriptEngine: true,
  13229. ScriptEngineBuildVersion: true,
  13230. ScriptEngineMajorVersion: true,
  13231. ScriptEngineMinorVersion: true,
  13232. VBArray: true,
  13233. WScript: true,
  13234. WSH: true,
  13235. XDomainRequest: true
  13236. };
  13237. var jquery$1 = {
  13238. $: false,
  13239. jQuery: false
  13240. };
  13241. var yui$1 = {
  13242. YAHOO: false,
  13243. YAHOO_config: false,
  13244. YUI: false,
  13245. YUI_config: false
  13246. };
  13247. var shelljs$1 = {
  13248. cat: false,
  13249. cd: false,
  13250. chmod: false,
  13251. config: false,
  13252. cp: false,
  13253. dirs: false,
  13254. echo: false,
  13255. env: false,
  13256. error: false,
  13257. exec: false,
  13258. exit: false,
  13259. find: false,
  13260. grep: false,
  13261. ln: false,
  13262. ls: false,
  13263. mkdir: false,
  13264. mv: false,
  13265. popd: false,
  13266. pushd: false,
  13267. pwd: false,
  13268. rm: false,
  13269. sed: false,
  13270. set: false,
  13271. target: false,
  13272. tempdir: false,
  13273. test: false,
  13274. touch: false,
  13275. which: false
  13276. };
  13277. var prototypejs$1 = {
  13278. $: false,
  13279. $$: false,
  13280. $A: false,
  13281. $break: false,
  13282. $continue: false,
  13283. $F: false,
  13284. $H: false,
  13285. $R: false,
  13286. $w: false,
  13287. Abstract: false,
  13288. Ajax: false,
  13289. Autocompleter: false,
  13290. Builder: false,
  13291. Class: false,
  13292. Control: false,
  13293. Draggable: false,
  13294. Draggables: false,
  13295. Droppables: false,
  13296. Effect: false,
  13297. Element: false,
  13298. Enumerable: false,
  13299. Event: false,
  13300. Field: false,
  13301. Form: false,
  13302. Hash: false,
  13303. Insertion: false,
  13304. ObjectRange: false,
  13305. PeriodicalExecuter: false,
  13306. Position: false,
  13307. Prototype: false,
  13308. Scriptaculous: false,
  13309. Selector: false,
  13310. Sortable: false,
  13311. SortableObserver: false,
  13312. Sound: false,
  13313. Template: false,
  13314. Toggle: false,
  13315. Try: false
  13316. };
  13317. var meteor$1 = {
  13318. _: false,
  13319. $: false,
  13320. Accounts: false,
  13321. AccountsClient: false,
  13322. AccountsCommon: false,
  13323. AccountsServer: false,
  13324. App: false,
  13325. Assets: false,
  13326. Blaze: false,
  13327. check: false,
  13328. Cordova: false,
  13329. DDP: false,
  13330. DDPRateLimiter: false,
  13331. DDPServer: false,
  13332. Deps: false,
  13333. EJSON: false,
  13334. Email: false,
  13335. HTTP: false,
  13336. Log: false,
  13337. Match: false,
  13338. Meteor: false,
  13339. Mongo: false,
  13340. MongoInternals: false,
  13341. Npm: false,
  13342. Package: false,
  13343. Plugin: false,
  13344. process: false,
  13345. Random: false,
  13346. ReactiveDict: false,
  13347. ReactiveVar: false,
  13348. Router: false,
  13349. ServiceConfiguration: false,
  13350. Session: false,
  13351. share: false,
  13352. Spacebars: false,
  13353. Template: false,
  13354. Tinytest: false,
  13355. Tracker: false,
  13356. UI: false,
  13357. Utils: false,
  13358. WebApp: false,
  13359. WebAppInternals: false
  13360. };
  13361. var mongo$1 = {
  13362. _isWindows: false,
  13363. _rand: false,
  13364. BulkWriteResult: false,
  13365. cat: false,
  13366. cd: false,
  13367. connect: false,
  13368. db: false,
  13369. getHostName: false,
  13370. getMemInfo: false,
  13371. hostname: false,
  13372. ISODate: false,
  13373. listFiles: false,
  13374. load: false,
  13375. ls: false,
  13376. md5sumFile: false,
  13377. mkdir: false,
  13378. Mongo: false,
  13379. NumberInt: false,
  13380. NumberLong: false,
  13381. ObjectId: false,
  13382. PlanCache: false,
  13383. print: false,
  13384. printjson: false,
  13385. pwd: false,
  13386. quit: false,
  13387. removeFile: false,
  13388. rs: false,
  13389. sh: false,
  13390. UUID: false,
  13391. version: false,
  13392. WriteResult: false
  13393. };
  13394. var applescript$1 = {
  13395. $: false,
  13396. Application: false,
  13397. Automation: false,
  13398. console: false,
  13399. delay: false,
  13400. Library: false,
  13401. ObjC: false,
  13402. ObjectSpecifier: false,
  13403. Path: false,
  13404. Progress: false,
  13405. Ref: false
  13406. };
  13407. var serviceworker$1 = {
  13408. addEventListener: false,
  13409. applicationCache: false,
  13410. atob: false,
  13411. Blob: false,
  13412. BroadcastChannel: false,
  13413. btoa: false,
  13414. Cache: false,
  13415. caches: false,
  13416. CacheStorage: false,
  13417. clearInterval: false,
  13418. clearTimeout: false,
  13419. Client: false,
  13420. clients: false,
  13421. Clients: false,
  13422. close: true,
  13423. console: false,
  13424. ExtendableEvent: false,
  13425. ExtendableMessageEvent: false,
  13426. fetch: false,
  13427. FetchEvent: false,
  13428. FileReaderSync: false,
  13429. FormData: false,
  13430. Headers: false,
  13431. IDBCursor: false,
  13432. IDBCursorWithValue: false,
  13433. IDBDatabase: false,
  13434. IDBFactory: false,
  13435. IDBIndex: false,
  13436. IDBKeyRange: false,
  13437. IDBObjectStore: false,
  13438. IDBOpenDBRequest: false,
  13439. IDBRequest: false,
  13440. IDBTransaction: false,
  13441. IDBVersionChangeEvent: false,
  13442. ImageData: false,
  13443. importScripts: false,
  13444. indexedDB: false,
  13445. location: false,
  13446. MessageChannel: false,
  13447. MessagePort: false,
  13448. name: false,
  13449. navigator: false,
  13450. Notification: false,
  13451. onclose: true,
  13452. onconnect: true,
  13453. onerror: true,
  13454. onfetch: true,
  13455. oninstall: true,
  13456. onlanguagechange: true,
  13457. onmessage: true,
  13458. onmessageerror: true,
  13459. onnotificationclick: true,
  13460. onnotificationclose: true,
  13461. onoffline: true,
  13462. ononline: true,
  13463. onpush: true,
  13464. onpushsubscriptionchange: true,
  13465. onrejectionhandled: true,
  13466. onsync: true,
  13467. onunhandledrejection: true,
  13468. performance: false,
  13469. Performance: false,
  13470. PerformanceEntry: false,
  13471. PerformanceMark: false,
  13472. PerformanceMeasure: false,
  13473. PerformanceNavigation: false,
  13474. PerformanceResourceTiming: false,
  13475. PerformanceTiming: false,
  13476. postMessage: true,
  13477. "Promise": false,
  13478. queueMicrotask: false,
  13479. registration: false,
  13480. removeEventListener: false,
  13481. Request: false,
  13482. Response: false,
  13483. self: false,
  13484. ServiceWorker: false,
  13485. ServiceWorkerContainer: false,
  13486. ServiceWorkerGlobalScope: false,
  13487. ServiceWorkerMessageEvent: false,
  13488. ServiceWorkerRegistration: false,
  13489. setInterval: false,
  13490. setTimeout: false,
  13491. skipWaiting: false,
  13492. TextDecoder: false,
  13493. TextEncoder: false,
  13494. URL: false,
  13495. URLSearchParams: false,
  13496. WebSocket: false,
  13497. WindowClient: false,
  13498. Worker: false,
  13499. WorkerGlobalScope: false,
  13500. XMLHttpRequest: false
  13501. };
  13502. var atomtest$1 = {
  13503. advanceClock: false,
  13504. fakeClearInterval: false,
  13505. fakeClearTimeout: false,
  13506. fakeSetInterval: false,
  13507. fakeSetTimeout: false,
  13508. resetTimeouts: false,
  13509. waitsForPromise: false
  13510. };
  13511. var embertest$1 = {
  13512. andThen: false,
  13513. click: false,
  13514. currentPath: false,
  13515. currentRouteName: false,
  13516. currentURL: false,
  13517. fillIn: false,
  13518. find: false,
  13519. findAll: false,
  13520. findWithAssert: false,
  13521. keyEvent: false,
  13522. pauseTest: false,
  13523. resumeTest: false,
  13524. triggerEvent: false,
  13525. visit: false,
  13526. wait: false
  13527. };
  13528. var protractor$1 = {
  13529. $: false,
  13530. $$: false,
  13531. browser: false,
  13532. by: false,
  13533. By: false,
  13534. DartObject: false,
  13535. element: false,
  13536. protractor: false
  13537. };
  13538. var webextensions$1 = {
  13539. browser: false,
  13540. chrome: false,
  13541. opr: false
  13542. };
  13543. var greasemonkey$1 = {
  13544. cloneInto: false,
  13545. createObjectIn: false,
  13546. exportFunction: false,
  13547. GM: false,
  13548. GM_addStyle: false,
  13549. GM_deleteValue: false,
  13550. GM_getResourceText: false,
  13551. GM_getResourceURL: false,
  13552. GM_getValue: false,
  13553. GM_info: false,
  13554. GM_listValues: false,
  13555. GM_log: false,
  13556. GM_openInTab: false,
  13557. GM_registerMenuCommand: false,
  13558. GM_setClipboard: false,
  13559. GM_setValue: false,
  13560. GM_xmlhttpRequest: false,
  13561. unsafeWindow: false
  13562. };
  13563. var devtools$1 = {
  13564. $: false,
  13565. $_: false,
  13566. $$: false,
  13567. $0: false,
  13568. $1: false,
  13569. $2: false,
  13570. $3: false,
  13571. $4: false,
  13572. $x: false,
  13573. chrome: false,
  13574. clear: false,
  13575. copy: false,
  13576. debug: false,
  13577. dir: false,
  13578. dirxml: false,
  13579. getEventListeners: false,
  13580. inspect: false,
  13581. keys: false,
  13582. monitor: false,
  13583. monitorEvents: false,
  13584. profile: false,
  13585. profileEnd: false,
  13586. queryObjects: false,
  13587. table: false,
  13588. undebug: false,
  13589. unmonitor: false,
  13590. unmonitorEvents: false,
  13591. values: false
  13592. };
  13593. var require$$0$8 = {
  13594. builtin: builtin$1,
  13595. es5: es5$1,
  13596. es2015: es2015$1,
  13597. es2017: es2017$1,
  13598. browser: browser$4,
  13599. worker: worker$1,
  13600. node: node$1,
  13601. commonjs: commonjs$1,
  13602. amd: amd$1,
  13603. mocha: mocha$1,
  13604. jasmine: jasmine$1,
  13605. jest: jest$1,
  13606. qunit: qunit$1,
  13607. phantomjs: phantomjs$1,
  13608. couch: couch$1,
  13609. rhino: rhino$1,
  13610. nashorn: nashorn$1,
  13611. wsh: wsh$1,
  13612. jquery: jquery$1,
  13613. yui: yui$1,
  13614. shelljs: shelljs$1,
  13615. prototypejs: prototypejs$1,
  13616. meteor: meteor$1,
  13617. mongo: mongo$1,
  13618. applescript: applescript$1,
  13619. serviceworker: serviceworker$1,
  13620. atomtest: atomtest$1,
  13621. embertest: embertest$1,
  13622. protractor: protractor$1,
  13623. "shared-node-browser": {
  13624. clearInterval: false,
  13625. clearTimeout: false,
  13626. console: false,
  13627. setInterval: false,
  13628. setTimeout: false,
  13629. URL: false,
  13630. URLSearchParams: false
  13631. },
  13632. webextensions: webextensions$1,
  13633. greasemonkey: greasemonkey$1,
  13634. devtools: devtools$1
  13635. };
  13636. var globalsBABEL_8_BREAKINGFalse$1 = require$$0$8;
  13637. var globals$1 = globalsBABEL_8_BREAKINGFalse$1;
  13638. var path$3 = new WeakMap();
  13639. var scope = new WeakMap();
  13640. function clear() {
  13641. clearPath();
  13642. clearScope();
  13643. }
  13644. function clearPath() {
  13645. path$3 = new WeakMap();
  13646. }
  13647. function clearScope() {
  13648. scope = new WeakMap();
  13649. }
  13650. var cache$4 = /*#__PURE__*/Object.freeze({
  13651. __proto__: null,
  13652. get path () { return path$3; },
  13653. get scope () { return scope; },
  13654. clear: clear,
  13655. clearPath: clearPath,
  13656. clearScope: clearScope
  13657. });
  13658. function gatherNodeParts(node, parts) {
  13659. switch (node == null ? void 0 : node.type) {
  13660. default:
  13661. if (isModuleDeclaration(node)) {
  13662. if ((isExportAllDeclaration(node) || isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.source) {
  13663. gatherNodeParts(node.source, parts);
  13664. } else if ((isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
  13665. for (var _iterator = _createForOfIteratorHelperLoose(node.specifiers), _step; !(_step = _iterator()).done;) {
  13666. var e = _step.value;
  13667. gatherNodeParts(e, parts);
  13668. }
  13669. } else if ((isExportDefaultDeclaration(node) || isExportNamedDeclaration(node)) && node.declaration) {
  13670. gatherNodeParts(node.declaration, parts);
  13671. }
  13672. } else if (isModuleSpecifier(node)) {
  13673. gatherNodeParts(node.local, parts);
  13674. } else if (isLiteral(node)) {
  13675. parts.push(node.value);
  13676. }
  13677. break;
  13678. case "MemberExpression":
  13679. case "OptionalMemberExpression":
  13680. case "JSXMemberExpression":
  13681. gatherNodeParts(node.object, parts);
  13682. gatherNodeParts(node.property, parts);
  13683. break;
  13684. case "Identifier":
  13685. case "JSXIdentifier":
  13686. parts.push(node.name);
  13687. break;
  13688. case "CallExpression":
  13689. case "OptionalCallExpression":
  13690. case "NewExpression":
  13691. gatherNodeParts(node.callee, parts);
  13692. break;
  13693. case "ObjectExpression":
  13694. case "ObjectPattern":
  13695. for (var _iterator2 = _createForOfIteratorHelperLoose(node.properties), _step2; !(_step2 = _iterator2()).done;) {
  13696. var _e = _step2.value;
  13697. gatherNodeParts(_e, parts);
  13698. }
  13699. break;
  13700. case "SpreadElement":
  13701. case "RestElement":
  13702. gatherNodeParts(node.argument, parts);
  13703. break;
  13704. case "ObjectProperty":
  13705. case "ObjectMethod":
  13706. case "ClassProperty":
  13707. case "ClassMethod":
  13708. case "ClassPrivateProperty":
  13709. case "ClassPrivateMethod":
  13710. gatherNodeParts(node.key, parts);
  13711. break;
  13712. case "ThisExpression":
  13713. parts.push("this");
  13714. break;
  13715. case "Super":
  13716. parts.push("super");
  13717. break;
  13718. case "Import":
  13719. parts.push("import");
  13720. break;
  13721. case "DoExpression":
  13722. parts.push("do");
  13723. break;
  13724. case "YieldExpression":
  13725. parts.push("yield");
  13726. gatherNodeParts(node.argument, parts);
  13727. break;
  13728. case "AwaitExpression":
  13729. parts.push("await");
  13730. gatherNodeParts(node.argument, parts);
  13731. break;
  13732. case "AssignmentExpression":
  13733. gatherNodeParts(node.left, parts);
  13734. break;
  13735. case "VariableDeclarator":
  13736. gatherNodeParts(node.id, parts);
  13737. break;
  13738. case "FunctionExpression":
  13739. case "FunctionDeclaration":
  13740. case "ClassExpression":
  13741. case "ClassDeclaration":
  13742. gatherNodeParts(node.id, parts);
  13743. break;
  13744. case "PrivateName":
  13745. gatherNodeParts(node.id, parts);
  13746. break;
  13747. case "ParenthesizedExpression":
  13748. gatherNodeParts(node.expression, parts);
  13749. break;
  13750. case "UnaryExpression":
  13751. case "UpdateExpression":
  13752. gatherNodeParts(node.argument, parts);
  13753. break;
  13754. case "MetaProperty":
  13755. gatherNodeParts(node.meta, parts);
  13756. gatherNodeParts(node.property, parts);
  13757. break;
  13758. case "JSXElement":
  13759. gatherNodeParts(node.openingElement, parts);
  13760. break;
  13761. case "JSXOpeningElement":
  13762. parts.push(node.name);
  13763. break;
  13764. case "JSXFragment":
  13765. gatherNodeParts(node.openingFragment, parts);
  13766. break;
  13767. case "JSXOpeningFragment":
  13768. parts.push("Fragment");
  13769. break;
  13770. case "JSXNamespacedName":
  13771. gatherNodeParts(node.namespace, parts);
  13772. gatherNodeParts(node.name, parts);
  13773. break;
  13774. }
  13775. }
  13776. var collectorVisitor = {
  13777. For: function For(path) {
  13778. for (var _iterator3 = _createForOfIteratorHelperLoose(FOR_INIT_KEYS), _step3; !(_step3 = _iterator3()).done;) {
  13779. var key = _step3.value;
  13780. var declar = path.get(key);
  13781. if (declar.isVar()) {
  13782. var parentScope = path.scope.getFunctionParent() || path.scope.getProgramParent();
  13783. parentScope.registerBinding("var", declar);
  13784. }
  13785. }
  13786. },
  13787. Declaration: function Declaration(path) {
  13788. if (path.isBlockScoped()) return;
  13789. if (path.isExportDeclaration()) return;
  13790. var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
  13791. parent.registerDeclaration(path);
  13792. },
  13793. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  13794. state.references.push(path);
  13795. },
  13796. ForXStatement: function ForXStatement(path, state) {
  13797. var left = path.get("left");
  13798. if (left.isPattern() || left.isIdentifier()) {
  13799. state.constantViolations.push(path);
  13800. }
  13801. },
  13802. ExportDeclaration: {
  13803. exit: function exit(path) {
  13804. var node = path.node,
  13805. scope = path.scope;
  13806. if (isExportAllDeclaration(node)) return;
  13807. var declar = node.declaration;
  13808. if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) {
  13809. var id = declar.id;
  13810. if (!id) return;
  13811. var binding = scope.getBinding(id.name);
  13812. if (binding) binding.reference(path);
  13813. } else if (isVariableDeclaration(declar)) {
  13814. for (var _iterator4 = _createForOfIteratorHelperLoose(declar.declarations), _step4; !(_step4 = _iterator4()).done;) {
  13815. var decl = _step4.value;
  13816. for (var _i = 0, _Object$keys = Object.keys(getBindingIdentifiers$1(decl)); _i < _Object$keys.length; _i++) {
  13817. var _name = _Object$keys[_i];
  13818. var _binding = scope.getBinding(_name);
  13819. if (_binding) _binding.reference(path);
  13820. }
  13821. }
  13822. }
  13823. }
  13824. },
  13825. LabeledStatement: function LabeledStatement(path) {
  13826. path.scope.getBlockParent().registerDeclaration(path);
  13827. },
  13828. AssignmentExpression: function AssignmentExpression(path, state) {
  13829. state.assignments.push(path);
  13830. },
  13831. UpdateExpression: function UpdateExpression(path, state) {
  13832. state.constantViolations.push(path);
  13833. },
  13834. UnaryExpression: function UnaryExpression(path, state) {
  13835. if (path.node.operator === "delete") {
  13836. state.constantViolations.push(path);
  13837. }
  13838. },
  13839. BlockScoped: function BlockScoped(path) {
  13840. var scope = path.scope;
  13841. if (scope.path === path) scope = scope.parent;
  13842. var parent = scope.getBlockParent();
  13843. parent.registerDeclaration(path);
  13844. if (path.isClassDeclaration() && path.node.id) {
  13845. var id = path.node.id;
  13846. var _name2 = id.name;
  13847. path.scope.bindings[_name2] = path.scope.parent.getBinding(_name2);
  13848. }
  13849. },
  13850. CatchClause: function CatchClause(path) {
  13851. path.scope.registerBinding("let", path);
  13852. },
  13853. Function: function Function(path) {
  13854. if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
  13855. path.scope.registerBinding("local", path.get("id"), path);
  13856. }
  13857. var params = path.get("params");
  13858. for (var _iterator5 = _createForOfIteratorHelperLoose(params), _step5; !(_step5 = _iterator5()).done;) {
  13859. var param = _step5.value;
  13860. path.scope.registerBinding("param", param);
  13861. }
  13862. },
  13863. ClassExpression: function ClassExpression(path) {
  13864. if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
  13865. path.scope.registerBinding("local", path);
  13866. }
  13867. }
  13868. };
  13869. var uid = 0;
  13870. var Scope$1 = function () {
  13871. function Scope(path) {
  13872. this.uid = void 0;
  13873. this.path = void 0;
  13874. this.block = void 0;
  13875. this.labels = void 0;
  13876. this.inited = void 0;
  13877. this.bindings = void 0;
  13878. this.references = void 0;
  13879. this.globals = void 0;
  13880. this.uids = void 0;
  13881. this.data = void 0;
  13882. this.crawling = void 0;
  13883. var node = path.node;
  13884. var cached = scope.get(node);
  13885. if ((cached == null ? void 0 : cached.path) === path) {
  13886. return cached;
  13887. }
  13888. scope.set(node, this);
  13889. this.uid = uid++;
  13890. this.block = node;
  13891. this.path = path;
  13892. this.labels = new Map();
  13893. this.inited = false;
  13894. }
  13895. var _proto = Scope.prototype;
  13896. _proto.traverse = function traverse$1(node, opts, state) {
  13897. traverse(node, opts, this, state, this.path);
  13898. };
  13899. _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) {
  13900. var id = this.generateUidIdentifier(name);
  13901. this.push({
  13902. id: id
  13903. });
  13904. return cloneNode(id);
  13905. };
  13906. _proto.generateUidIdentifier = function generateUidIdentifier(name) {
  13907. return identifier(this.generateUid(name));
  13908. };
  13909. _proto.generateUid = function generateUid(name) {
  13910. if (name === void 0) {
  13911. name = "temp";
  13912. }
  13913. name = toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
  13914. var uid;
  13915. var i = 1;
  13916. do {
  13917. uid = this._generateUid(name, i);
  13918. i++;
  13919. } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
  13920. var program = this.getProgramParent();
  13921. program.references[uid] = true;
  13922. program.uids[uid] = true;
  13923. return uid;
  13924. };
  13925. _proto._generateUid = function _generateUid(name, i) {
  13926. var id = name;
  13927. if (i > 1) id += i;
  13928. return "_" + id;
  13929. };
  13930. _proto.generateUidBasedOnNode = function generateUidBasedOnNode(node, defaultName) {
  13931. var parts = [];
  13932. gatherNodeParts(node, parts);
  13933. var id = parts.join("$");
  13934. id = id.replace(/^_/, "") || defaultName || "ref";
  13935. return this.generateUid(id.slice(0, 20));
  13936. };
  13937. _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(node, defaultName) {
  13938. return identifier(this.generateUidBasedOnNode(node, defaultName));
  13939. };
  13940. _proto.isStatic = function isStatic(node) {
  13941. if (isThisExpression(node) || isSuper(node)) {
  13942. return true;
  13943. }
  13944. if (isIdentifier(node)) {
  13945. var binding = this.getBinding(node.name);
  13946. if (binding) {
  13947. return binding.constant;
  13948. } else {
  13949. return this.hasBinding(node.name);
  13950. }
  13951. }
  13952. return false;
  13953. };
  13954. _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {
  13955. if (this.isStatic(node)) {
  13956. return null;
  13957. } else {
  13958. var id = this.generateUidIdentifierBasedOnNode(node);
  13959. if (!dontPush) {
  13960. this.push({
  13961. id: id
  13962. });
  13963. return cloneNode(id);
  13964. }
  13965. return id;
  13966. }
  13967. };
  13968. _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {
  13969. if (kind === "param") return;
  13970. if (local.kind === "local") return;
  13971. var duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && (kind === "let" || kind === "const");
  13972. if (duplicate) {
  13973. throw this.hub.buildError(id, "Duplicate declaration \"" + name + "\"", TypeError);
  13974. }
  13975. };
  13976. _proto.rename = function rename(oldName, newName, block) {
  13977. var binding = this.getBinding(oldName);
  13978. if (binding) {
  13979. newName = newName || this.generateUidIdentifier(oldName).name;
  13980. return new Renamer(binding, oldName, newName).rename(block);
  13981. }
  13982. };
  13983. _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) {
  13984. if (map[oldName]) {
  13985. map[newName] = value;
  13986. map[oldName] = null;
  13987. }
  13988. };
  13989. _proto.dump = function dump() {
  13990. var sep = "-".repeat(60);
  13991. console.log(sep);
  13992. var scope = this;
  13993. do {
  13994. console.log("#", scope.block.type);
  13995. for (var _i2 = 0, _Object$keys2 = Object.keys(scope.bindings); _i2 < _Object$keys2.length; _i2++) {
  13996. var _name3 = _Object$keys2[_i2];
  13997. var binding = scope.bindings[_name3];
  13998. console.log(" -", _name3, {
  13999. constant: binding.constant,
  14000. references: binding.references,
  14001. violations: binding.constantViolations.length,
  14002. kind: binding.kind
  14003. });
  14004. }
  14005. } while (scope = scope.parent);
  14006. console.log(sep);
  14007. };
  14008. _proto.toArray = function toArray(node, i, arrayLikeIsIterable) {
  14009. if (isIdentifier(node)) {
  14010. var binding = this.getBinding(node.name);
  14011. if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
  14012. return node;
  14013. }
  14014. }
  14015. if (isArrayExpression(node)) {
  14016. return node;
  14017. }
  14018. if (isIdentifier(node, {
  14019. name: "arguments"
  14020. })) {
  14021. return callExpression(memberExpression(memberExpression(memberExpression(identifier("Array"), identifier("prototype")), identifier("slice")), identifier("call")), [node]);
  14022. }
  14023. var helperName;
  14024. var args = [node];
  14025. if (i === true) {
  14026. helperName = "toConsumableArray";
  14027. } else if (i) {
  14028. args.push(numericLiteral(i));
  14029. helperName = "slicedToArray";
  14030. } else {
  14031. helperName = "toArray";
  14032. }
  14033. if (arrayLikeIsIterable) {
  14034. args.unshift(this.hub.addHelper(helperName));
  14035. helperName = "maybeArrayLike";
  14036. }
  14037. return callExpression(this.hub.addHelper(helperName), args);
  14038. };
  14039. _proto.hasLabel = function hasLabel(name) {
  14040. return !!this.getLabel(name);
  14041. };
  14042. _proto.getLabel = function getLabel(name) {
  14043. return this.labels.get(name);
  14044. };
  14045. _proto.registerLabel = function registerLabel(path) {
  14046. this.labels.set(path.node.label.name, path);
  14047. };
  14048. _proto.registerDeclaration = function registerDeclaration(path) {
  14049. if (path.isLabeledStatement()) {
  14050. this.registerLabel(path);
  14051. } else if (path.isFunctionDeclaration()) {
  14052. this.registerBinding("hoisted", path.get("id"), path);
  14053. } else if (path.isVariableDeclaration()) {
  14054. var declarations = path.get("declarations");
  14055. for (var _iterator6 = _createForOfIteratorHelperLoose(declarations), _step6; !(_step6 = _iterator6()).done;) {
  14056. var declar = _step6.value;
  14057. this.registerBinding(path.node.kind, declar);
  14058. }
  14059. } else if (path.isClassDeclaration()) {
  14060. this.registerBinding("let", path);
  14061. } else if (path.isImportDeclaration()) {
  14062. var specifiers = path.get("specifiers");
  14063. for (var _iterator7 = _createForOfIteratorHelperLoose(specifiers), _step7; !(_step7 = _iterator7()).done;) {
  14064. var specifier = _step7.value;
  14065. this.registerBinding("module", specifier);
  14066. }
  14067. } else if (path.isExportDeclaration()) {
  14068. var _declar = path.get("declaration");
  14069. if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {
  14070. this.registerDeclaration(_declar);
  14071. }
  14072. } else {
  14073. this.registerBinding("unknown", path);
  14074. }
  14075. };
  14076. _proto.buildUndefinedNode = function buildUndefinedNode() {
  14077. return unaryExpression("void", numericLiteral(0), true);
  14078. };
  14079. _proto.registerConstantViolation = function registerConstantViolation(path) {
  14080. var ids = path.getBindingIdentifiers();
  14081. for (var _i3 = 0, _Object$keys3 = Object.keys(ids); _i3 < _Object$keys3.length; _i3++) {
  14082. var _name4 = _Object$keys3[_i3];
  14083. var binding = this.getBinding(_name4);
  14084. if (binding) binding.reassign(path);
  14085. }
  14086. };
  14087. _proto.registerBinding = function registerBinding(kind, path, bindingPath) {
  14088. if (bindingPath === void 0) {
  14089. bindingPath = path;
  14090. }
  14091. if (!kind) throw new ReferenceError("no `kind`");
  14092. if (path.isVariableDeclaration()) {
  14093. var declarators = path.get("declarations");
  14094. for (var _iterator8 = _createForOfIteratorHelperLoose(declarators), _step8; !(_step8 = _iterator8()).done;) {
  14095. var declar = _step8.value;
  14096. this.registerBinding(kind, declar);
  14097. }
  14098. return;
  14099. }
  14100. var parent = this.getProgramParent();
  14101. var ids = path.getOuterBindingIdentifiers(true);
  14102. for (var _i4 = 0, _Object$keys4 = Object.keys(ids); _i4 < _Object$keys4.length; _i4++) {
  14103. var _name5 = _Object$keys4[_i4];
  14104. parent.references[_name5] = true;
  14105. for (var _iterator9 = _createForOfIteratorHelperLoose(ids[_name5]), _step9; !(_step9 = _iterator9()).done;) {
  14106. var id = _step9.value;
  14107. var local = this.getOwnBinding(_name5);
  14108. if (local) {
  14109. if (local.identifier === id) continue;
  14110. this.checkBlockScopedCollisions(local, kind, _name5, id);
  14111. }
  14112. if (local) {
  14113. this.registerConstantViolation(bindingPath);
  14114. } else {
  14115. this.bindings[_name5] = new Binding({
  14116. identifier: id,
  14117. scope: this,
  14118. path: bindingPath,
  14119. kind: kind
  14120. });
  14121. }
  14122. }
  14123. }
  14124. };
  14125. _proto.addGlobal = function addGlobal(node) {
  14126. this.globals[node.name] = node;
  14127. };
  14128. _proto.hasUid = function hasUid(name) {
  14129. var scope = this;
  14130. do {
  14131. if (scope.uids[name]) return true;
  14132. } while (scope = scope.parent);
  14133. return false;
  14134. };
  14135. _proto.hasGlobal = function hasGlobal(name) {
  14136. var scope = this;
  14137. do {
  14138. if (scope.globals[name]) return true;
  14139. } while (scope = scope.parent);
  14140. return false;
  14141. };
  14142. _proto.hasReference = function hasReference(name) {
  14143. return !!this.getProgramParent().references[name];
  14144. };
  14145. _proto.isPure = function isPure(node, constantsOnly) {
  14146. if (isIdentifier(node)) {
  14147. var binding = this.getBinding(node.name);
  14148. if (!binding) return false;
  14149. if (constantsOnly) return binding.constant;
  14150. return true;
  14151. } else if (isClass(node)) {
  14152. if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
  14153. return false;
  14154. }
  14155. return this.isPure(node.body, constantsOnly);
  14156. } else if (isClassBody(node)) {
  14157. for (var _iterator10 = _createForOfIteratorHelperLoose(node.body), _step10; !(_step10 = _iterator10()).done;) {
  14158. var method = _step10.value;
  14159. if (!this.isPure(method, constantsOnly)) return false;
  14160. }
  14161. return true;
  14162. } else if (isBinary(node)) {
  14163. return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
  14164. } else if (isArrayExpression(node)) {
  14165. for (var _iterator11 = _createForOfIteratorHelperLoose(node.elements), _step11; !(_step11 = _iterator11()).done;) {
  14166. var elem = _step11.value;
  14167. if (!this.isPure(elem, constantsOnly)) return false;
  14168. }
  14169. return true;
  14170. } else if (isObjectExpression(node)) {
  14171. for (var _iterator12 = _createForOfIteratorHelperLoose(node.properties), _step12; !(_step12 = _iterator12()).done;) {
  14172. var prop = _step12.value;
  14173. if (!this.isPure(prop, constantsOnly)) return false;
  14174. }
  14175. return true;
  14176. } else if (isMethod(node)) {
  14177. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  14178. if (node.kind === "get" || node.kind === "set") return false;
  14179. return true;
  14180. } else if (isProperty(node)) {
  14181. if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
  14182. return this.isPure(node.value, constantsOnly);
  14183. } else if (isUnaryExpression(node)) {
  14184. return this.isPure(node.argument, constantsOnly);
  14185. } else if (isTaggedTemplateExpression(node)) {
  14186. return matchesPattern$1(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
  14187. } else if (isTemplateLiteral(node)) {
  14188. for (var _iterator13 = _createForOfIteratorHelperLoose(node.expressions), _step13; !(_step13 = _iterator13()).done;) {
  14189. var expression = _step13.value;
  14190. if (!this.isPure(expression, constantsOnly)) return false;
  14191. }
  14192. return true;
  14193. } else {
  14194. return isPureish(node);
  14195. }
  14196. };
  14197. _proto.setData = function setData(key, val) {
  14198. return this.data[key] = val;
  14199. };
  14200. _proto.getData = function getData(key) {
  14201. var scope = this;
  14202. do {
  14203. var data = scope.data[key];
  14204. if (data != null) return data;
  14205. } while (scope = scope.parent);
  14206. };
  14207. _proto.removeData = function removeData(key) {
  14208. var scope = this;
  14209. do {
  14210. var data = scope.data[key];
  14211. if (data != null) scope.data[key] = null;
  14212. } while (scope = scope.parent);
  14213. };
  14214. _proto.init = function init() {
  14215. if (!this.inited) {
  14216. this.inited = true;
  14217. this.crawl();
  14218. }
  14219. };
  14220. _proto.crawl = function crawl() {
  14221. var path = this.path;
  14222. this.references = Object.create(null);
  14223. this.bindings = Object.create(null);
  14224. this.globals = Object.create(null);
  14225. this.uids = Object.create(null);
  14226. this.data = Object.create(null);
  14227. var programParent = this.getProgramParent();
  14228. if (programParent.crawling) return;
  14229. var state = {
  14230. references: [],
  14231. constantViolations: [],
  14232. assignments: []
  14233. };
  14234. this.crawling = true;
  14235. if (path.type !== "Program" && collectorVisitor._exploded) {
  14236. for (var _iterator14 = _createForOfIteratorHelperLoose(collectorVisitor.enter), _step14; !(_step14 = _iterator14()).done;) {
  14237. var _visit = _step14.value;
  14238. _visit(path, state);
  14239. }
  14240. var typeVisitors = collectorVisitor[path.type];
  14241. if (typeVisitors) {
  14242. for (var _iterator15 = _createForOfIteratorHelperLoose(typeVisitors.enter), _step15; !(_step15 = _iterator15()).done;) {
  14243. var visit = _step15.value;
  14244. visit(path, state);
  14245. }
  14246. }
  14247. }
  14248. path.traverse(collectorVisitor, state);
  14249. this.crawling = false;
  14250. for (var _iterator16 = _createForOfIteratorHelperLoose(state.assignments), _step16; !(_step16 = _iterator16()).done;) {
  14251. var _path = _step16.value;
  14252. var ids = _path.getBindingIdentifiers();
  14253. for (var _i5 = 0, _Object$keys5 = Object.keys(ids); _i5 < _Object$keys5.length; _i5++) {
  14254. var _name6 = _Object$keys5[_i5];
  14255. if (_path.scope.getBinding(_name6)) continue;
  14256. programParent.addGlobal(ids[_name6]);
  14257. }
  14258. _path.scope.registerConstantViolation(_path);
  14259. }
  14260. for (var _iterator17 = _createForOfIteratorHelperLoose(state.references), _step17; !(_step17 = _iterator17()).done;) {
  14261. var ref = _step17.value;
  14262. var binding = ref.scope.getBinding(ref.node.name);
  14263. if (binding) {
  14264. binding.reference(ref);
  14265. } else {
  14266. programParent.addGlobal(ref.node);
  14267. }
  14268. }
  14269. for (var _iterator18 = _createForOfIteratorHelperLoose(state.constantViolations), _step18; !(_step18 = _iterator18()).done;) {
  14270. var _path2 = _step18.value;
  14271. _path2.scope.registerConstantViolation(_path2);
  14272. }
  14273. };
  14274. _proto.push = function push(opts) {
  14275. var path = this.path;
  14276. if (!path.isBlockStatement() && !path.isProgram()) {
  14277. path = this.getBlockParent().path;
  14278. }
  14279. if (path.isSwitchStatement()) {
  14280. path = (this.getFunctionParent() || this.getProgramParent()).path;
  14281. }
  14282. if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
  14283. path.ensureBlock();
  14284. path = path.get("body");
  14285. }
  14286. var unique = opts.unique;
  14287. var kind = opts.kind || "var";
  14288. var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
  14289. var dataKey = "declaration:" + kind + ":" + blockHoist;
  14290. var declarPath = !unique && path.getData(dataKey);
  14291. if (!declarPath) {
  14292. var declar = variableDeclaration(kind, []);
  14293. declar._blockHoist = blockHoist;
  14294. var _path$unshiftContaine = path.unshiftContainer("body", [declar]);
  14295. var _path$unshiftContaine2 = _slicedToArray$2(_path$unshiftContaine, 1);
  14296. declarPath = _path$unshiftContaine2[0];
  14297. if (!unique) path.setData(dataKey, declarPath);
  14298. }
  14299. var declarator = variableDeclarator(opts.id, opts.init);
  14300. declarPath.node.declarations.push(declarator);
  14301. this.registerBinding(kind, declarPath.get("declarations").pop());
  14302. };
  14303. _proto.getProgramParent = function getProgramParent() {
  14304. var scope = this;
  14305. do {
  14306. if (scope.path.isProgram()) {
  14307. return scope;
  14308. }
  14309. } while (scope = scope.parent);
  14310. throw new Error("Couldn't find a Program");
  14311. };
  14312. _proto.getFunctionParent = function getFunctionParent() {
  14313. var scope = this;
  14314. do {
  14315. if (scope.path.isFunctionParent()) {
  14316. return scope;
  14317. }
  14318. } while (scope = scope.parent);
  14319. return null;
  14320. };
  14321. _proto.getBlockParent = function getBlockParent() {
  14322. var scope = this;
  14323. do {
  14324. if (scope.path.isBlockParent()) {
  14325. return scope;
  14326. }
  14327. } while (scope = scope.parent);
  14328. throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
  14329. };
  14330. _proto.getAllBindings = function getAllBindings() {
  14331. var ids = Object.create(null);
  14332. var scope = this;
  14333. do {
  14334. for (var _i6 = 0, _Object$keys6 = Object.keys(scope.bindings); _i6 < _Object$keys6.length; _i6++) {
  14335. var key = _Object$keys6[_i6];
  14336. if (key in ids === false) {
  14337. ids[key] = scope.bindings[key];
  14338. }
  14339. }
  14340. scope = scope.parent;
  14341. } while (scope);
  14342. return ids;
  14343. };
  14344. _proto.getAllBindingsOfKind = function getAllBindingsOfKind() {
  14345. var ids = Object.create(null);
  14346. for (var _len = arguments.length, kinds = new Array(_len), _key = 0; _key < _len; _key++) {
  14347. kinds[_key] = arguments[_key];
  14348. }
  14349. for (var _i7 = 0, _kinds = kinds; _i7 < _kinds.length; _i7++) {
  14350. var kind = _kinds[_i7];
  14351. var scope = this;
  14352. do {
  14353. for (var _i8 = 0, _Object$keys7 = Object.keys(scope.bindings); _i8 < _Object$keys7.length; _i8++) {
  14354. var _name7 = _Object$keys7[_i8];
  14355. var binding = scope.bindings[_name7];
  14356. if (binding.kind === kind) ids[_name7] = binding;
  14357. }
  14358. scope = scope.parent;
  14359. } while (scope);
  14360. }
  14361. return ids;
  14362. };
  14363. _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {
  14364. return this.getBindingIdentifier(name) === node;
  14365. };
  14366. _proto.getBinding = function getBinding(name) {
  14367. var scope = this;
  14368. var previousPath;
  14369. do {
  14370. var binding = scope.getOwnBinding(name);
  14371. if (binding) {
  14372. var _previousPath;
  14373. if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param") ; else {
  14374. return binding;
  14375. }
  14376. }
  14377. previousPath = scope.path;
  14378. } while (scope = scope.parent);
  14379. };
  14380. _proto.getOwnBinding = function getOwnBinding(name) {
  14381. return this.bindings[name];
  14382. };
  14383. _proto.getBindingIdentifier = function getBindingIdentifier(name) {
  14384. var _this$getBinding;
  14385. return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier;
  14386. };
  14387. _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {
  14388. var binding = this.bindings[name];
  14389. return binding == null ? void 0 : binding.identifier;
  14390. };
  14391. _proto.hasOwnBinding = function hasOwnBinding(name) {
  14392. return !!this.getOwnBinding(name);
  14393. };
  14394. _proto.hasBinding = function hasBinding(name, noGlobals) {
  14395. if (!name) return false;
  14396. if (this.hasOwnBinding(name)) return true;
  14397. if (this.parentHasBinding(name, noGlobals)) return true;
  14398. if (this.hasUid(name)) return true;
  14399. if (!noGlobals && Scope.globals.includes(name)) return true;
  14400. if (!noGlobals && Scope.contextVariables.includes(name)) return true;
  14401. return false;
  14402. };
  14403. _proto.parentHasBinding = function parentHasBinding(name, noGlobals) {
  14404. var _this$parent;
  14405. return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals);
  14406. };
  14407. _proto.moveBindingTo = function moveBindingTo(name, scope) {
  14408. var info = this.getBinding(name);
  14409. if (info) {
  14410. info.scope.removeOwnBinding(name);
  14411. info.scope = scope;
  14412. scope.bindings[name] = info;
  14413. }
  14414. };
  14415. _proto.removeOwnBinding = function removeOwnBinding(name) {
  14416. delete this.bindings[name];
  14417. };
  14418. _proto.removeBinding = function removeBinding(name) {
  14419. var _this$getBinding2;
  14420. (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name);
  14421. var scope = this;
  14422. do {
  14423. if (scope.uids[name]) {
  14424. scope.uids[name] = false;
  14425. }
  14426. } while (scope = scope.parent);
  14427. };
  14428. _createClass(Scope, [{
  14429. key: "parent",
  14430. get: function get() {
  14431. var _parent;
  14432. var parent,
  14433. path = this.path;
  14434. do {
  14435. var isKey = path.key === "key";
  14436. path = path.parentPath;
  14437. if (isKey && path.isMethod()) path = path.parentPath;
  14438. if (path && path.isScope()) parent = path;
  14439. } while (path && !parent);
  14440. return (_parent = parent) == null ? void 0 : _parent.scope;
  14441. }
  14442. }, {
  14443. key: "parentBlock",
  14444. get: function get() {
  14445. return this.path.parent;
  14446. }
  14447. }, {
  14448. key: "hub",
  14449. get: function get() {
  14450. return this.path.hub;
  14451. }
  14452. }]);
  14453. return Scope;
  14454. }();
  14455. Scope$1.globals = Object.keys(globals$1.builtin);
  14456. Scope$1.contextVariables = ["arguments", "undefined", "Infinity", "NaN"];
  14457. var intToCharMap$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  14458. var encode$3 = function encode(number) {
  14459. if (0 <= number && number < intToCharMap$1.length) {
  14460. return intToCharMap$1[number];
  14461. }
  14462. throw new TypeError("Must be between 0 and 63: " + number);
  14463. };
  14464. var decode$3 = function decode(charCode) {
  14465. var bigA = 65;
  14466. var bigZ = 90;
  14467. var littleA = 97;
  14468. var littleZ = 122;
  14469. var zero = 48;
  14470. var nine = 57;
  14471. var plus = 43;
  14472. var slash = 47;
  14473. var littleOffset = 26;
  14474. var numberOffset = 52;
  14475. if (bigA <= charCode && charCode <= bigZ) {
  14476. return charCode - bigA;
  14477. }
  14478. if (littleA <= charCode && charCode <= littleZ) {
  14479. return charCode - littleA + littleOffset;
  14480. }
  14481. if (zero <= charCode && charCode <= nine) {
  14482. return charCode - zero + numberOffset;
  14483. }
  14484. if (charCode == plus) {
  14485. return 62;
  14486. }
  14487. if (charCode == slash) {
  14488. return 63;
  14489. }
  14490. return -1;
  14491. };
  14492. var base64$1 = {
  14493. encode: encode$3,
  14494. decode: decode$3
  14495. };
  14496. var VLQ_BASE_SHIFT$1 = 5;
  14497. var VLQ_BASE$1 = 1 << VLQ_BASE_SHIFT$1;
  14498. var VLQ_BASE_MASK$1 = VLQ_BASE$1 - 1;
  14499. var VLQ_CONTINUATION_BIT$1 = VLQ_BASE$1;
  14500. function toVLQSigned$1(aValue) {
  14501. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  14502. }
  14503. function fromVLQSigned$1(aValue) {
  14504. var isNegative = (aValue & 1) === 1;
  14505. var shifted = aValue >> 1;
  14506. return isNegative ? -shifted : shifted;
  14507. }
  14508. var encode$2 = function base64VLQ_encode(aValue) {
  14509. var encoded = "";
  14510. var digit;
  14511. var vlq = toVLQSigned$1(aValue);
  14512. do {
  14513. digit = vlq & VLQ_BASE_MASK$1;
  14514. vlq >>>= VLQ_BASE_SHIFT$1;
  14515. if (vlq > 0) {
  14516. digit |= VLQ_CONTINUATION_BIT$1;
  14517. }
  14518. encoded += base64$1.encode(digit);
  14519. } while (vlq > 0);
  14520. return encoded;
  14521. };
  14522. var decode$2 = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  14523. var strLen = aStr.length;
  14524. var result = 0;
  14525. var shift = 0;
  14526. var continuation, digit;
  14527. do {
  14528. if (aIndex >= strLen) {
  14529. throw new Error("Expected more digits in base 64 VLQ value.");
  14530. }
  14531. digit = base64$1.decode(aStr.charCodeAt(aIndex++));
  14532. if (digit === -1) {
  14533. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  14534. }
  14535. continuation = !!(digit & VLQ_CONTINUATION_BIT$1);
  14536. digit &= VLQ_BASE_MASK$1;
  14537. result = result + (digit << shift);
  14538. shift += VLQ_BASE_SHIFT$1;
  14539. } while (continuation);
  14540. aOutParam.value = fromVLQSigned$1(result);
  14541. aOutParam.rest = aIndex;
  14542. };
  14543. var base64Vlq$1 = {
  14544. encode: encode$2,
  14545. decode: decode$2
  14546. };
  14547. var util$6 = createCommonjsModule(function (module, exports) {
  14548. function getArg(aArgs, aName, aDefaultValue) {
  14549. if (aName in aArgs) {
  14550. return aArgs[aName];
  14551. } else if (arguments.length === 3) {
  14552. return aDefaultValue;
  14553. } else {
  14554. throw new Error('"' + aName + '" is a required argument.');
  14555. }
  14556. }
  14557. exports.getArg = getArg;
  14558. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  14559. var dataUrlRegexp = /^data:.+\,.+$/;
  14560. function urlParse(aUrl) {
  14561. var match = aUrl.match(urlRegexp);
  14562. if (!match) {
  14563. return null;
  14564. }
  14565. return {
  14566. scheme: match[1],
  14567. auth: match[2],
  14568. host: match[3],
  14569. port: match[4],
  14570. path: match[5]
  14571. };
  14572. }
  14573. exports.urlParse = urlParse;
  14574. function urlGenerate(aParsedUrl) {
  14575. var url = '';
  14576. if (aParsedUrl.scheme) {
  14577. url += aParsedUrl.scheme + ':';
  14578. }
  14579. url += '//';
  14580. if (aParsedUrl.auth) {
  14581. url += aParsedUrl.auth + '@';
  14582. }
  14583. if (aParsedUrl.host) {
  14584. url += aParsedUrl.host;
  14585. }
  14586. if (aParsedUrl.port) {
  14587. url += ":" + aParsedUrl.port;
  14588. }
  14589. if (aParsedUrl.path) {
  14590. url += aParsedUrl.path;
  14591. }
  14592. return url;
  14593. }
  14594. exports.urlGenerate = urlGenerate;
  14595. function normalize(aPath) {
  14596. var path = aPath;
  14597. var url = urlParse(aPath);
  14598. if (url) {
  14599. if (!url.path) {
  14600. return aPath;
  14601. }
  14602. path = url.path;
  14603. }
  14604. var isAbsolute = exports.isAbsolute(path);
  14605. var parts = path.split(/\/+/);
  14606. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  14607. part = parts[i];
  14608. if (part === '.') {
  14609. parts.splice(i, 1);
  14610. } else if (part === '..') {
  14611. up++;
  14612. } else if (up > 0) {
  14613. if (part === '') {
  14614. parts.splice(i + 1, up);
  14615. up = 0;
  14616. } else {
  14617. parts.splice(i, 2);
  14618. up--;
  14619. }
  14620. }
  14621. }
  14622. path = parts.join('/');
  14623. if (path === '') {
  14624. path = isAbsolute ? '/' : '.';
  14625. }
  14626. if (url) {
  14627. url.path = path;
  14628. return urlGenerate(url);
  14629. }
  14630. return path;
  14631. }
  14632. exports.normalize = normalize;
  14633. function join(aRoot, aPath) {
  14634. if (aRoot === "") {
  14635. aRoot = ".";
  14636. }
  14637. if (aPath === "") {
  14638. aPath = ".";
  14639. }
  14640. var aPathUrl = urlParse(aPath);
  14641. var aRootUrl = urlParse(aRoot);
  14642. if (aRootUrl) {
  14643. aRoot = aRootUrl.path || '/';
  14644. }
  14645. if (aPathUrl && !aPathUrl.scheme) {
  14646. if (aRootUrl) {
  14647. aPathUrl.scheme = aRootUrl.scheme;
  14648. }
  14649. return urlGenerate(aPathUrl);
  14650. }
  14651. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  14652. return aPath;
  14653. }
  14654. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  14655. aRootUrl.host = aPath;
  14656. return urlGenerate(aRootUrl);
  14657. }
  14658. var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  14659. if (aRootUrl) {
  14660. aRootUrl.path = joined;
  14661. return urlGenerate(aRootUrl);
  14662. }
  14663. return joined;
  14664. }
  14665. exports.join = join;
  14666. exports.isAbsolute = function (aPath) {
  14667. return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
  14668. };
  14669. function relative(aRoot, aPath) {
  14670. if (aRoot === "") {
  14671. aRoot = ".";
  14672. }
  14673. aRoot = aRoot.replace(/\/$/, '');
  14674. var level = 0;
  14675. while (aPath.indexOf(aRoot + '/') !== 0) {
  14676. var index = aRoot.lastIndexOf("/");
  14677. if (index < 0) {
  14678. return aPath;
  14679. }
  14680. aRoot = aRoot.slice(0, index);
  14681. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  14682. return aPath;
  14683. }
  14684. ++level;
  14685. }
  14686. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  14687. }
  14688. exports.relative = relative;
  14689. var supportsNullProto = function () {
  14690. var obj = Object.create(null);
  14691. return !('__proto__' in obj);
  14692. }();
  14693. function identity(s) {
  14694. return s;
  14695. }
  14696. function toSetString(aStr) {
  14697. if (isProtoString(aStr)) {
  14698. return '$' + aStr;
  14699. }
  14700. return aStr;
  14701. }
  14702. exports.toSetString = supportsNullProto ? identity : toSetString;
  14703. function fromSetString(aStr) {
  14704. if (isProtoString(aStr)) {
  14705. return aStr.slice(1);
  14706. }
  14707. return aStr;
  14708. }
  14709. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  14710. function isProtoString(s) {
  14711. if (!s) {
  14712. return false;
  14713. }
  14714. var length = s.length;
  14715. if (length < 9) {
  14716. return false;
  14717. }
  14718. if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
  14719. return false;
  14720. }
  14721. for (var i = length - 10; i >= 0; i--) {
  14722. if (s.charCodeAt(i) !== 36) {
  14723. return false;
  14724. }
  14725. }
  14726. return true;
  14727. }
  14728. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  14729. var cmp = mappingA.source - mappingB.source;
  14730. if (cmp !== 0) {
  14731. return cmp;
  14732. }
  14733. cmp = mappingA.originalLine - mappingB.originalLine;
  14734. if (cmp !== 0) {
  14735. return cmp;
  14736. }
  14737. cmp = mappingA.originalColumn - mappingB.originalColumn;
  14738. if (cmp !== 0 || onlyCompareOriginal) {
  14739. return cmp;
  14740. }
  14741. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  14742. if (cmp !== 0) {
  14743. return cmp;
  14744. }
  14745. cmp = mappingA.generatedLine - mappingB.generatedLine;
  14746. if (cmp !== 0) {
  14747. return cmp;
  14748. }
  14749. return mappingA.name - mappingB.name;
  14750. }
  14751. exports.compareByOriginalPositions = compareByOriginalPositions;
  14752. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  14753. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  14754. if (cmp !== 0) {
  14755. return cmp;
  14756. }
  14757. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  14758. if (cmp !== 0 || onlyCompareGenerated) {
  14759. return cmp;
  14760. }
  14761. cmp = mappingA.source - mappingB.source;
  14762. if (cmp !== 0) {
  14763. return cmp;
  14764. }
  14765. cmp = mappingA.originalLine - mappingB.originalLine;
  14766. if (cmp !== 0) {
  14767. return cmp;
  14768. }
  14769. cmp = mappingA.originalColumn - mappingB.originalColumn;
  14770. if (cmp !== 0) {
  14771. return cmp;
  14772. }
  14773. return mappingA.name - mappingB.name;
  14774. }
  14775. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  14776. function strcmp(aStr1, aStr2) {
  14777. if (aStr1 === aStr2) {
  14778. return 0;
  14779. }
  14780. if (aStr1 > aStr2) {
  14781. return 1;
  14782. }
  14783. return -1;
  14784. }
  14785. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  14786. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  14787. if (cmp !== 0) {
  14788. return cmp;
  14789. }
  14790. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  14791. if (cmp !== 0) {
  14792. return cmp;
  14793. }
  14794. cmp = strcmp(mappingA.source, mappingB.source);
  14795. if (cmp !== 0) {
  14796. return cmp;
  14797. }
  14798. cmp = mappingA.originalLine - mappingB.originalLine;
  14799. if (cmp !== 0) {
  14800. return cmp;
  14801. }
  14802. cmp = mappingA.originalColumn - mappingB.originalColumn;
  14803. if (cmp !== 0) {
  14804. return cmp;
  14805. }
  14806. return strcmp(mappingA.name, mappingB.name);
  14807. }
  14808. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  14809. }, "/$$rollup_base$$/packages/babel-generator/node_modules/source-map/lib");
  14810. var has$c = Object.prototype.hasOwnProperty;
  14811. var hasNativeMap$1 = typeof Map !== "undefined";
  14812. function ArraySet$5() {
  14813. this._array = [];
  14814. this._set = hasNativeMap$1 ? new Map() : Object.create(null);
  14815. }
  14816. ArraySet$5.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  14817. var set = new ArraySet$5();
  14818. for (var i = 0, len = aArray.length; i < len; i++) {
  14819. set.add(aArray[i], aAllowDuplicates);
  14820. }
  14821. return set;
  14822. };
  14823. ArraySet$5.prototype.size = function ArraySet_size() {
  14824. return hasNativeMap$1 ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  14825. };
  14826. ArraySet$5.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  14827. var sStr = hasNativeMap$1 ? aStr : util$6.toSetString(aStr);
  14828. var isDuplicate = hasNativeMap$1 ? this.has(aStr) : has$c.call(this._set, sStr);
  14829. var idx = this._array.length;
  14830. if (!isDuplicate || aAllowDuplicates) {
  14831. this._array.push(aStr);
  14832. }
  14833. if (!isDuplicate) {
  14834. if (hasNativeMap$1) {
  14835. this._set.set(aStr, idx);
  14836. } else {
  14837. this._set[sStr] = idx;
  14838. }
  14839. }
  14840. };
  14841. ArraySet$5.prototype.has = function ArraySet_has(aStr) {
  14842. if (hasNativeMap$1) {
  14843. return this._set.has(aStr);
  14844. } else {
  14845. var sStr = util$6.toSetString(aStr);
  14846. return has$c.call(this._set, sStr);
  14847. }
  14848. };
  14849. ArraySet$5.prototype.indexOf = function ArraySet_indexOf(aStr) {
  14850. if (hasNativeMap$1) {
  14851. var idx = this._set.get(aStr);
  14852. if (idx >= 0) {
  14853. return idx;
  14854. }
  14855. } else {
  14856. var sStr = util$6.toSetString(aStr);
  14857. if (has$c.call(this._set, sStr)) {
  14858. return this._set[sStr];
  14859. }
  14860. }
  14861. throw new Error('"' + aStr + '" is not in the set.');
  14862. };
  14863. ArraySet$5.prototype.at = function ArraySet_at(aIdx) {
  14864. if (aIdx >= 0 && aIdx < this._array.length) {
  14865. return this._array[aIdx];
  14866. }
  14867. throw new Error('No element indexed by ' + aIdx);
  14868. };
  14869. ArraySet$5.prototype.toArray = function ArraySet_toArray() {
  14870. return this._array.slice();
  14871. };
  14872. var ArraySet_1$1 = ArraySet$5;
  14873. var arraySet$1 = {
  14874. ArraySet: ArraySet_1$1
  14875. };
  14876. function generatedPositionAfter$1(mappingA, mappingB) {
  14877. var lineA = mappingA.generatedLine;
  14878. var lineB = mappingB.generatedLine;
  14879. var columnA = mappingA.generatedColumn;
  14880. var columnB = mappingB.generatedColumn;
  14881. return lineB > lineA || lineB == lineA && columnB >= columnA || util$6.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  14882. }
  14883. function MappingList$3() {
  14884. this._array = [];
  14885. this._sorted = true;
  14886. this._last = {
  14887. generatedLine: -1,
  14888. generatedColumn: 0
  14889. };
  14890. }
  14891. MappingList$3.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  14892. this._array.forEach(aCallback, aThisArg);
  14893. };
  14894. MappingList$3.prototype.add = function MappingList_add(aMapping) {
  14895. if (generatedPositionAfter$1(this._last, aMapping)) {
  14896. this._last = aMapping;
  14897. this._array.push(aMapping);
  14898. } else {
  14899. this._sorted = false;
  14900. this._array.push(aMapping);
  14901. }
  14902. };
  14903. MappingList$3.prototype.toArray = function MappingList_toArray() {
  14904. if (!this._sorted) {
  14905. this._array.sort(util$6.compareByGeneratedPositionsInflated);
  14906. this._sorted = true;
  14907. }
  14908. return this._array;
  14909. };
  14910. var MappingList_1$1 = MappingList$3;
  14911. var mappingList$1 = {
  14912. MappingList: MappingList_1$1
  14913. };
  14914. var ArraySet$4 = arraySet$1.ArraySet;
  14915. var MappingList$2 = mappingList$1.MappingList;
  14916. function SourceMapGenerator$5(aArgs) {
  14917. if (!aArgs) {
  14918. aArgs = {};
  14919. }
  14920. this._file = util$6.getArg(aArgs, 'file', null);
  14921. this._sourceRoot = util$6.getArg(aArgs, 'sourceRoot', null);
  14922. this._skipValidation = util$6.getArg(aArgs, 'skipValidation', false);
  14923. this._sources = new ArraySet$4();
  14924. this._names = new ArraySet$4();
  14925. this._mappings = new MappingList$2();
  14926. this._sourcesContents = null;
  14927. }
  14928. SourceMapGenerator$5.prototype._version = 3;
  14929. SourceMapGenerator$5.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  14930. var sourceRoot = aSourceMapConsumer.sourceRoot;
  14931. var generator = new SourceMapGenerator$5({
  14932. file: aSourceMapConsumer.file,
  14933. sourceRoot: sourceRoot
  14934. });
  14935. aSourceMapConsumer.eachMapping(function (mapping) {
  14936. var newMapping = {
  14937. generated: {
  14938. line: mapping.generatedLine,
  14939. column: mapping.generatedColumn
  14940. }
  14941. };
  14942. if (mapping.source != null) {
  14943. newMapping.source = mapping.source;
  14944. if (sourceRoot != null) {
  14945. newMapping.source = util$6.relative(sourceRoot, newMapping.source);
  14946. }
  14947. newMapping.original = {
  14948. line: mapping.originalLine,
  14949. column: mapping.originalColumn
  14950. };
  14951. if (mapping.name != null) {
  14952. newMapping.name = mapping.name;
  14953. }
  14954. }
  14955. generator.addMapping(newMapping);
  14956. });
  14957. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  14958. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  14959. if (content != null) {
  14960. generator.setSourceContent(sourceFile, content);
  14961. }
  14962. });
  14963. return generator;
  14964. };
  14965. SourceMapGenerator$5.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  14966. var generated = util$6.getArg(aArgs, 'generated');
  14967. var original = util$6.getArg(aArgs, 'original', null);
  14968. var source = util$6.getArg(aArgs, 'source', null);
  14969. var name = util$6.getArg(aArgs, 'name', null);
  14970. if (!this._skipValidation) {
  14971. this._validateMapping(generated, original, source, name);
  14972. }
  14973. if (source != null) {
  14974. source = String(source);
  14975. if (!this._sources.has(source)) {
  14976. this._sources.add(source);
  14977. }
  14978. }
  14979. if (name != null) {
  14980. name = String(name);
  14981. if (!this._names.has(name)) {
  14982. this._names.add(name);
  14983. }
  14984. }
  14985. this._mappings.add({
  14986. generatedLine: generated.line,
  14987. generatedColumn: generated.column,
  14988. originalLine: original != null && original.line,
  14989. originalColumn: original != null && original.column,
  14990. source: source,
  14991. name: name
  14992. });
  14993. };
  14994. SourceMapGenerator$5.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  14995. var source = aSourceFile;
  14996. if (this._sourceRoot != null) {
  14997. source = util$6.relative(this._sourceRoot, source);
  14998. }
  14999. if (aSourceContent != null) {
  15000. if (!this._sourcesContents) {
  15001. this._sourcesContents = Object.create(null);
  15002. }
  15003. this._sourcesContents[util$6.toSetString(source)] = aSourceContent;
  15004. } else if (this._sourcesContents) {
  15005. delete this._sourcesContents[util$6.toSetString(source)];
  15006. if (Object.keys(this._sourcesContents).length === 0) {
  15007. this._sourcesContents = null;
  15008. }
  15009. }
  15010. };
  15011. SourceMapGenerator$5.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  15012. var sourceFile = aSourceFile;
  15013. if (aSourceFile == null) {
  15014. if (aSourceMapConsumer.file == null) {
  15015. throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
  15016. }
  15017. sourceFile = aSourceMapConsumer.file;
  15018. }
  15019. var sourceRoot = this._sourceRoot;
  15020. if (sourceRoot != null) {
  15021. sourceFile = util$6.relative(sourceRoot, sourceFile);
  15022. }
  15023. var newSources = new ArraySet$4();
  15024. var newNames = new ArraySet$4();
  15025. this._mappings.unsortedForEach(function (mapping) {
  15026. if (mapping.source === sourceFile && mapping.originalLine != null) {
  15027. var original = aSourceMapConsumer.originalPositionFor({
  15028. line: mapping.originalLine,
  15029. column: mapping.originalColumn
  15030. });
  15031. if (original.source != null) {
  15032. mapping.source = original.source;
  15033. if (aSourceMapPath != null) {
  15034. mapping.source = util$6.join(aSourceMapPath, mapping.source);
  15035. }
  15036. if (sourceRoot != null) {
  15037. mapping.source = util$6.relative(sourceRoot, mapping.source);
  15038. }
  15039. mapping.originalLine = original.line;
  15040. mapping.originalColumn = original.column;
  15041. if (original.name != null) {
  15042. mapping.name = original.name;
  15043. }
  15044. }
  15045. }
  15046. var source = mapping.source;
  15047. if (source != null && !newSources.has(source)) {
  15048. newSources.add(source);
  15049. }
  15050. var name = mapping.name;
  15051. if (name != null && !newNames.has(name)) {
  15052. newNames.add(name);
  15053. }
  15054. }, this);
  15055. this._sources = newSources;
  15056. this._names = newNames;
  15057. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  15058. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  15059. if (content != null) {
  15060. if (aSourceMapPath != null) {
  15061. sourceFile = util$6.join(aSourceMapPath, sourceFile);
  15062. }
  15063. if (sourceRoot != null) {
  15064. sourceFile = util$6.relative(sourceRoot, sourceFile);
  15065. }
  15066. this.setSourceContent(sourceFile, content);
  15067. }
  15068. }, this);
  15069. };
  15070. SourceMapGenerator$5.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  15071. if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
  15072. throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.');
  15073. }
  15074. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  15075. return;
  15076. } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
  15077. return;
  15078. } else {
  15079. throw new Error('Invalid mapping: ' + JSON.stringify({
  15080. generated: aGenerated,
  15081. source: aSource,
  15082. original: aOriginal,
  15083. name: aName
  15084. }));
  15085. }
  15086. };
  15087. SourceMapGenerator$5.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  15088. var previousGeneratedColumn = 0;
  15089. var previousGeneratedLine = 1;
  15090. var previousOriginalColumn = 0;
  15091. var previousOriginalLine = 0;
  15092. var previousName = 0;
  15093. var previousSource = 0;
  15094. var result = '';
  15095. var next;
  15096. var mapping;
  15097. var nameIdx;
  15098. var sourceIdx;
  15099. var mappings = this._mappings.toArray();
  15100. for (var i = 0, len = mappings.length; i < len; i++) {
  15101. mapping = mappings[i];
  15102. next = '';
  15103. if (mapping.generatedLine !== previousGeneratedLine) {
  15104. previousGeneratedColumn = 0;
  15105. while (mapping.generatedLine !== previousGeneratedLine) {
  15106. next += ';';
  15107. previousGeneratedLine++;
  15108. }
  15109. } else {
  15110. if (i > 0) {
  15111. if (!util$6.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  15112. continue;
  15113. }
  15114. next += ',';
  15115. }
  15116. }
  15117. next += base64Vlq$1.encode(mapping.generatedColumn - previousGeneratedColumn);
  15118. previousGeneratedColumn = mapping.generatedColumn;
  15119. if (mapping.source != null) {
  15120. sourceIdx = this._sources.indexOf(mapping.source);
  15121. next += base64Vlq$1.encode(sourceIdx - previousSource);
  15122. previousSource = sourceIdx;
  15123. next += base64Vlq$1.encode(mapping.originalLine - 1 - previousOriginalLine);
  15124. previousOriginalLine = mapping.originalLine - 1;
  15125. next += base64Vlq$1.encode(mapping.originalColumn - previousOriginalColumn);
  15126. previousOriginalColumn = mapping.originalColumn;
  15127. if (mapping.name != null) {
  15128. nameIdx = this._names.indexOf(mapping.name);
  15129. next += base64Vlq$1.encode(nameIdx - previousName);
  15130. previousName = nameIdx;
  15131. }
  15132. }
  15133. result += next;
  15134. }
  15135. return result;
  15136. };
  15137. SourceMapGenerator$5.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  15138. return aSources.map(function (source) {
  15139. if (!this._sourcesContents) {
  15140. return null;
  15141. }
  15142. if (aSourceRoot != null) {
  15143. source = util$6.relative(aSourceRoot, source);
  15144. }
  15145. var key = util$6.toSetString(source);
  15146. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  15147. }, this);
  15148. };
  15149. SourceMapGenerator$5.prototype.toJSON = function SourceMapGenerator_toJSON() {
  15150. var map = {
  15151. version: this._version,
  15152. sources: this._sources.toArray(),
  15153. names: this._names.toArray(),
  15154. mappings: this._serializeMappings()
  15155. };
  15156. if (this._file != null) {
  15157. map.file = this._file;
  15158. }
  15159. if (this._sourceRoot != null) {
  15160. map.sourceRoot = this._sourceRoot;
  15161. }
  15162. if (this._sourcesContents) {
  15163. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  15164. }
  15165. return map;
  15166. };
  15167. SourceMapGenerator$5.prototype.toString = function SourceMapGenerator_toString() {
  15168. return JSON.stringify(this.toJSON());
  15169. };
  15170. var SourceMapGenerator_1$1 = SourceMapGenerator$5;
  15171. var sourceMapGenerator$1 = {
  15172. SourceMapGenerator: SourceMapGenerator_1$1
  15173. };
  15174. var binarySearch$1 = createCommonjsModule(function (module, exports) {
  15175. exports.GREATEST_LOWER_BOUND = 1;
  15176. exports.LEAST_UPPER_BOUND = 2;
  15177. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  15178. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  15179. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  15180. if (cmp === 0) {
  15181. return mid;
  15182. } else if (cmp > 0) {
  15183. if (aHigh - mid > 1) {
  15184. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  15185. }
  15186. if (aBias == exports.LEAST_UPPER_BOUND) {
  15187. return aHigh < aHaystack.length ? aHigh : -1;
  15188. } else {
  15189. return mid;
  15190. }
  15191. } else {
  15192. if (mid - aLow > 1) {
  15193. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  15194. }
  15195. if (aBias == exports.LEAST_UPPER_BOUND) {
  15196. return mid;
  15197. } else {
  15198. return aLow < 0 ? -1 : aLow;
  15199. }
  15200. }
  15201. }
  15202. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  15203. if (aHaystack.length === 0) {
  15204. return -1;
  15205. }
  15206. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  15207. if (index < 0) {
  15208. return -1;
  15209. }
  15210. while (index - 1 >= 0) {
  15211. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  15212. break;
  15213. }
  15214. --index;
  15215. }
  15216. return index;
  15217. };
  15218. }, "/$$rollup_base$$/packages/babel-generator/node_modules/source-map/lib");
  15219. function swap$1(ary, x, y) {
  15220. var temp = ary[x];
  15221. ary[x] = ary[y];
  15222. ary[y] = temp;
  15223. }
  15224. function randomIntInRange$1(low, high) {
  15225. return Math.round(low + Math.random() * (high - low));
  15226. }
  15227. function doQuickSort$1(ary, comparator, p, r) {
  15228. if (p < r) {
  15229. var pivotIndex = randomIntInRange$1(p, r);
  15230. var i = p - 1;
  15231. swap$1(ary, pivotIndex, r);
  15232. var pivot = ary[r];
  15233. for (var j = p; j < r; j++) {
  15234. if (comparator(ary[j], pivot) <= 0) {
  15235. i += 1;
  15236. swap$1(ary, i, j);
  15237. }
  15238. }
  15239. swap$1(ary, i + 1, j);
  15240. var q = i + 1;
  15241. doQuickSort$1(ary, comparator, p, q - 1);
  15242. doQuickSort$1(ary, comparator, q + 1, r);
  15243. }
  15244. }
  15245. var quickSort_1$1 = function quickSort_1(ary, comparator) {
  15246. doQuickSort$1(ary, comparator, 0, ary.length - 1);
  15247. };
  15248. var quickSort$3 = {
  15249. quickSort: quickSort_1$1
  15250. };
  15251. var ArraySet$3 = arraySet$1.ArraySet;
  15252. var quickSort$2 = quickSort$3.quickSort;
  15253. function SourceMapConsumer$3(aSourceMap) {
  15254. var sourceMap = aSourceMap;
  15255. if (typeof aSourceMap === 'string') {
  15256. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  15257. }
  15258. return sourceMap.sections != null ? new IndexedSourceMapConsumer$1(sourceMap) : new BasicSourceMapConsumer$1(sourceMap);
  15259. }
  15260. SourceMapConsumer$3.fromSourceMap = function (aSourceMap) {
  15261. return BasicSourceMapConsumer$1.fromSourceMap(aSourceMap);
  15262. };
  15263. SourceMapConsumer$3.prototype._version = 3;
  15264. SourceMapConsumer$3.prototype.__generatedMappings = null;
  15265. Object.defineProperty(SourceMapConsumer$3.prototype, '_generatedMappings', {
  15266. get: function get() {
  15267. if (!this.__generatedMappings) {
  15268. this._parseMappings(this._mappings, this.sourceRoot);
  15269. }
  15270. return this.__generatedMappings;
  15271. }
  15272. });
  15273. SourceMapConsumer$3.prototype.__originalMappings = null;
  15274. Object.defineProperty(SourceMapConsumer$3.prototype, '_originalMappings', {
  15275. get: function get() {
  15276. if (!this.__originalMappings) {
  15277. this._parseMappings(this._mappings, this.sourceRoot);
  15278. }
  15279. return this.__originalMappings;
  15280. }
  15281. });
  15282. SourceMapConsumer$3.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  15283. var c = aStr.charAt(index);
  15284. return c === ";" || c === ",";
  15285. };
  15286. SourceMapConsumer$3.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  15287. throw new Error("Subclasses must implement _parseMappings");
  15288. };
  15289. SourceMapConsumer$3.GENERATED_ORDER = 1;
  15290. SourceMapConsumer$3.ORIGINAL_ORDER = 2;
  15291. SourceMapConsumer$3.GREATEST_LOWER_BOUND = 1;
  15292. SourceMapConsumer$3.LEAST_UPPER_BOUND = 2;
  15293. SourceMapConsumer$3.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  15294. var context = aContext || null;
  15295. var order = aOrder || SourceMapConsumer$3.GENERATED_ORDER;
  15296. var mappings;
  15297. switch (order) {
  15298. case SourceMapConsumer$3.GENERATED_ORDER:
  15299. mappings = this._generatedMappings;
  15300. break;
  15301. case SourceMapConsumer$3.ORIGINAL_ORDER:
  15302. mappings = this._originalMappings;
  15303. break;
  15304. default:
  15305. throw new Error("Unknown order of iteration.");
  15306. }
  15307. var sourceRoot = this.sourceRoot;
  15308. mappings.map(function (mapping) {
  15309. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  15310. if (source != null && sourceRoot != null) {
  15311. source = util$6.join(sourceRoot, source);
  15312. }
  15313. return {
  15314. source: source,
  15315. generatedLine: mapping.generatedLine,
  15316. generatedColumn: mapping.generatedColumn,
  15317. originalLine: mapping.originalLine,
  15318. originalColumn: mapping.originalColumn,
  15319. name: mapping.name === null ? null : this._names.at(mapping.name)
  15320. };
  15321. }, this).forEach(aCallback, context);
  15322. };
  15323. SourceMapConsumer$3.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  15324. var line = util$6.getArg(aArgs, 'line');
  15325. var needle = {
  15326. source: util$6.getArg(aArgs, 'source'),
  15327. originalLine: line,
  15328. originalColumn: util$6.getArg(aArgs, 'column', 0)
  15329. };
  15330. if (this.sourceRoot != null) {
  15331. needle.source = util$6.relative(this.sourceRoot, needle.source);
  15332. }
  15333. if (!this._sources.has(needle.source)) {
  15334. return [];
  15335. }
  15336. needle.source = this._sources.indexOf(needle.source);
  15337. var mappings = [];
  15338. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$6.compareByOriginalPositions, binarySearch$1.LEAST_UPPER_BOUND);
  15339. if (index >= 0) {
  15340. var mapping = this._originalMappings[index];
  15341. if (aArgs.column === undefined) {
  15342. var originalLine = mapping.originalLine;
  15343. while (mapping && mapping.originalLine === originalLine) {
  15344. mappings.push({
  15345. line: util$6.getArg(mapping, 'generatedLine', null),
  15346. column: util$6.getArg(mapping, 'generatedColumn', null),
  15347. lastColumn: util$6.getArg(mapping, 'lastGeneratedColumn', null)
  15348. });
  15349. mapping = this._originalMappings[++index];
  15350. }
  15351. } else {
  15352. var originalColumn = mapping.originalColumn;
  15353. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  15354. mappings.push({
  15355. line: util$6.getArg(mapping, 'generatedLine', null),
  15356. column: util$6.getArg(mapping, 'generatedColumn', null),
  15357. lastColumn: util$6.getArg(mapping, 'lastGeneratedColumn', null)
  15358. });
  15359. mapping = this._originalMappings[++index];
  15360. }
  15361. }
  15362. }
  15363. return mappings;
  15364. };
  15365. var SourceMapConsumer_1$1 = SourceMapConsumer$3;
  15366. function BasicSourceMapConsumer$1(aSourceMap) {
  15367. var sourceMap = aSourceMap;
  15368. if (typeof aSourceMap === 'string') {
  15369. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  15370. }
  15371. var version = util$6.getArg(sourceMap, 'version');
  15372. var sources = util$6.getArg(sourceMap, 'sources');
  15373. var names = util$6.getArg(sourceMap, 'names', []);
  15374. var sourceRoot = util$6.getArg(sourceMap, 'sourceRoot', null);
  15375. var sourcesContent = util$6.getArg(sourceMap, 'sourcesContent', null);
  15376. var mappings = util$6.getArg(sourceMap, 'mappings');
  15377. var file = util$6.getArg(sourceMap, 'file', null);
  15378. if (version != this._version) {
  15379. throw new Error('Unsupported version: ' + version);
  15380. }
  15381. sources = sources.map(String).map(util$6.normalize).map(function (source) {
  15382. return sourceRoot && util$6.isAbsolute(sourceRoot) && util$6.isAbsolute(source) ? util$6.relative(sourceRoot, source) : source;
  15383. });
  15384. this._names = ArraySet$3.fromArray(names.map(String), true);
  15385. this._sources = ArraySet$3.fromArray(sources, true);
  15386. this.sourceRoot = sourceRoot;
  15387. this.sourcesContent = sourcesContent;
  15388. this._mappings = mappings;
  15389. this.file = file;
  15390. }
  15391. BasicSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$3.prototype);
  15392. BasicSourceMapConsumer$1.prototype.consumer = SourceMapConsumer$3;
  15393. BasicSourceMapConsumer$1.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
  15394. var smc = Object.create(BasicSourceMapConsumer$1.prototype);
  15395. var names = smc._names = ArraySet$3.fromArray(aSourceMap._names.toArray(), true);
  15396. var sources = smc._sources = ArraySet$3.fromArray(aSourceMap._sources.toArray(), true);
  15397. smc.sourceRoot = aSourceMap._sourceRoot;
  15398. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
  15399. smc.file = aSourceMap._file;
  15400. var generatedMappings = aSourceMap._mappings.toArray().slice();
  15401. var destGeneratedMappings = smc.__generatedMappings = [];
  15402. var destOriginalMappings = smc.__originalMappings = [];
  15403. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  15404. var srcMapping = generatedMappings[i];
  15405. var destMapping = new Mapping$1();
  15406. destMapping.generatedLine = srcMapping.generatedLine;
  15407. destMapping.generatedColumn = srcMapping.generatedColumn;
  15408. if (srcMapping.source) {
  15409. destMapping.source = sources.indexOf(srcMapping.source);
  15410. destMapping.originalLine = srcMapping.originalLine;
  15411. destMapping.originalColumn = srcMapping.originalColumn;
  15412. if (srcMapping.name) {
  15413. destMapping.name = names.indexOf(srcMapping.name);
  15414. }
  15415. destOriginalMappings.push(destMapping);
  15416. }
  15417. destGeneratedMappings.push(destMapping);
  15418. }
  15419. quickSort$2(smc.__originalMappings, util$6.compareByOriginalPositions);
  15420. return smc;
  15421. };
  15422. BasicSourceMapConsumer$1.prototype._version = 3;
  15423. Object.defineProperty(BasicSourceMapConsumer$1.prototype, 'sources', {
  15424. get: function get() {
  15425. return this._sources.toArray().map(function (s) {
  15426. return this.sourceRoot != null ? util$6.join(this.sourceRoot, s) : s;
  15427. }, this);
  15428. }
  15429. });
  15430. function Mapping$1() {
  15431. this.generatedLine = 0;
  15432. this.generatedColumn = 0;
  15433. this.source = null;
  15434. this.originalLine = null;
  15435. this.originalColumn = null;
  15436. this.name = null;
  15437. }
  15438. BasicSourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  15439. var generatedLine = 1;
  15440. var previousGeneratedColumn = 0;
  15441. var previousOriginalLine = 0;
  15442. var previousOriginalColumn = 0;
  15443. var previousSource = 0;
  15444. var previousName = 0;
  15445. var length = aStr.length;
  15446. var index = 0;
  15447. var cachedSegments = {};
  15448. var temp = {};
  15449. var originalMappings = [];
  15450. var generatedMappings = [];
  15451. var mapping, str, segment, end, value;
  15452. while (index < length) {
  15453. if (aStr.charAt(index) === ';') {
  15454. generatedLine++;
  15455. index++;
  15456. previousGeneratedColumn = 0;
  15457. } else if (aStr.charAt(index) === ',') {
  15458. index++;
  15459. } else {
  15460. mapping = new Mapping$1();
  15461. mapping.generatedLine = generatedLine;
  15462. for (end = index; end < length; end++) {
  15463. if (this._charIsMappingSeparator(aStr, end)) {
  15464. break;
  15465. }
  15466. }
  15467. str = aStr.slice(index, end);
  15468. segment = cachedSegments[str];
  15469. if (segment) {
  15470. index += str.length;
  15471. } else {
  15472. segment = [];
  15473. while (index < end) {
  15474. base64Vlq$1.decode(aStr, index, temp);
  15475. value = temp.value;
  15476. index = temp.rest;
  15477. segment.push(value);
  15478. }
  15479. if (segment.length === 2) {
  15480. throw new Error('Found a source, but no line and column');
  15481. }
  15482. if (segment.length === 3) {
  15483. throw new Error('Found a source and line, but no column');
  15484. }
  15485. cachedSegments[str] = segment;
  15486. }
  15487. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  15488. previousGeneratedColumn = mapping.generatedColumn;
  15489. if (segment.length > 1) {
  15490. mapping.source = previousSource + segment[1];
  15491. previousSource += segment[1];
  15492. mapping.originalLine = previousOriginalLine + segment[2];
  15493. previousOriginalLine = mapping.originalLine;
  15494. mapping.originalLine += 1;
  15495. mapping.originalColumn = previousOriginalColumn + segment[3];
  15496. previousOriginalColumn = mapping.originalColumn;
  15497. if (segment.length > 4) {
  15498. mapping.name = previousName + segment[4];
  15499. previousName += segment[4];
  15500. }
  15501. }
  15502. generatedMappings.push(mapping);
  15503. if (typeof mapping.originalLine === 'number') {
  15504. originalMappings.push(mapping);
  15505. }
  15506. }
  15507. }
  15508. quickSort$2(generatedMappings, util$6.compareByGeneratedPositionsDeflated);
  15509. this.__generatedMappings = generatedMappings;
  15510. quickSort$2(originalMappings, util$6.compareByOriginalPositions);
  15511. this.__originalMappings = originalMappings;
  15512. };
  15513. BasicSourceMapConsumer$1.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  15514. if (aNeedle[aLineName] <= 0) {
  15515. throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
  15516. }
  15517. if (aNeedle[aColumnName] < 0) {
  15518. throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
  15519. }
  15520. return binarySearch$1.search(aNeedle, aMappings, aComparator, aBias);
  15521. };
  15522. BasicSourceMapConsumer$1.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  15523. for (var index = 0; index < this._generatedMappings.length; ++index) {
  15524. var mapping = this._generatedMappings[index];
  15525. if (index + 1 < this._generatedMappings.length) {
  15526. var nextMapping = this._generatedMappings[index + 1];
  15527. if (mapping.generatedLine === nextMapping.generatedLine) {
  15528. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  15529. continue;
  15530. }
  15531. }
  15532. mapping.lastGeneratedColumn = Infinity;
  15533. }
  15534. };
  15535. BasicSourceMapConsumer$1.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  15536. var needle = {
  15537. generatedLine: util$6.getArg(aArgs, 'line'),
  15538. generatedColumn: util$6.getArg(aArgs, 'column')
  15539. };
  15540. var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util$6.compareByGeneratedPositionsDeflated, util$6.getArg(aArgs, 'bias', SourceMapConsumer$3.GREATEST_LOWER_BOUND));
  15541. if (index >= 0) {
  15542. var mapping = this._generatedMappings[index];
  15543. if (mapping.generatedLine === needle.generatedLine) {
  15544. var source = util$6.getArg(mapping, 'source', null);
  15545. if (source !== null) {
  15546. source = this._sources.at(source);
  15547. if (this.sourceRoot != null) {
  15548. source = util$6.join(this.sourceRoot, source);
  15549. }
  15550. }
  15551. var name = util$6.getArg(mapping, 'name', null);
  15552. if (name !== null) {
  15553. name = this._names.at(name);
  15554. }
  15555. return {
  15556. source: source,
  15557. line: util$6.getArg(mapping, 'originalLine', null),
  15558. column: util$6.getArg(mapping, 'originalColumn', null),
  15559. name: name
  15560. };
  15561. }
  15562. }
  15563. return {
  15564. source: null,
  15565. line: null,
  15566. column: null,
  15567. name: null
  15568. };
  15569. };
  15570. BasicSourceMapConsumer$1.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  15571. if (!this.sourcesContent) {
  15572. return false;
  15573. }
  15574. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {
  15575. return sc == null;
  15576. });
  15577. };
  15578. BasicSourceMapConsumer$1.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  15579. if (!this.sourcesContent) {
  15580. return null;
  15581. }
  15582. if (this.sourceRoot != null) {
  15583. aSource = util$6.relative(this.sourceRoot, aSource);
  15584. }
  15585. if (this._sources.has(aSource)) {
  15586. return this.sourcesContent[this._sources.indexOf(aSource)];
  15587. }
  15588. var url;
  15589. if (this.sourceRoot != null && (url = util$6.urlParse(this.sourceRoot))) {
  15590. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  15591. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  15592. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  15593. }
  15594. if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
  15595. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  15596. }
  15597. }
  15598. if (nullOnMissing) {
  15599. return null;
  15600. } else {
  15601. throw new Error('"' + aSource + '" is not in the SourceMap.');
  15602. }
  15603. };
  15604. BasicSourceMapConsumer$1.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  15605. var source = util$6.getArg(aArgs, 'source');
  15606. if (this.sourceRoot != null) {
  15607. source = util$6.relative(this.sourceRoot, source);
  15608. }
  15609. if (!this._sources.has(source)) {
  15610. return {
  15611. line: null,
  15612. column: null,
  15613. lastColumn: null
  15614. };
  15615. }
  15616. source = this._sources.indexOf(source);
  15617. var needle = {
  15618. source: source,
  15619. originalLine: util$6.getArg(aArgs, 'line'),
  15620. originalColumn: util$6.getArg(aArgs, 'column')
  15621. };
  15622. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$6.compareByOriginalPositions, util$6.getArg(aArgs, 'bias', SourceMapConsumer$3.GREATEST_LOWER_BOUND));
  15623. if (index >= 0) {
  15624. var mapping = this._originalMappings[index];
  15625. if (mapping.source === needle.source) {
  15626. return {
  15627. line: util$6.getArg(mapping, 'generatedLine', null),
  15628. column: util$6.getArg(mapping, 'generatedColumn', null),
  15629. lastColumn: util$6.getArg(mapping, 'lastGeneratedColumn', null)
  15630. };
  15631. }
  15632. }
  15633. return {
  15634. line: null,
  15635. column: null,
  15636. lastColumn: null
  15637. };
  15638. };
  15639. var BasicSourceMapConsumer_1$1 = BasicSourceMapConsumer$1;
  15640. function IndexedSourceMapConsumer$1(aSourceMap) {
  15641. var sourceMap = aSourceMap;
  15642. if (typeof aSourceMap === 'string') {
  15643. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  15644. }
  15645. var version = util$6.getArg(sourceMap, 'version');
  15646. var sections = util$6.getArg(sourceMap, 'sections');
  15647. if (version != this._version) {
  15648. throw new Error('Unsupported version: ' + version);
  15649. }
  15650. this._sources = new ArraySet$3();
  15651. this._names = new ArraySet$3();
  15652. var lastOffset = {
  15653. line: -1,
  15654. column: 0
  15655. };
  15656. this._sections = sections.map(function (s) {
  15657. if (s.url) {
  15658. throw new Error('Support for url field in sections not implemented.');
  15659. }
  15660. var offset = util$6.getArg(s, 'offset');
  15661. var offsetLine = util$6.getArg(offset, 'line');
  15662. var offsetColumn = util$6.getArg(offset, 'column');
  15663. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  15664. throw new Error('Section offsets must be ordered and non-overlapping.');
  15665. }
  15666. lastOffset = offset;
  15667. return {
  15668. generatedOffset: {
  15669. generatedLine: offsetLine + 1,
  15670. generatedColumn: offsetColumn + 1
  15671. },
  15672. consumer: new SourceMapConsumer$3(util$6.getArg(s, 'map'))
  15673. };
  15674. });
  15675. }
  15676. IndexedSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$3.prototype);
  15677. IndexedSourceMapConsumer$1.prototype.constructor = SourceMapConsumer$3;
  15678. IndexedSourceMapConsumer$1.prototype._version = 3;
  15679. Object.defineProperty(IndexedSourceMapConsumer$1.prototype, 'sources', {
  15680. get: function get() {
  15681. var sources = [];
  15682. for (var i = 0; i < this._sections.length; i++) {
  15683. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  15684. sources.push(this._sections[i].consumer.sources[j]);
  15685. }
  15686. }
  15687. return sources;
  15688. }
  15689. });
  15690. IndexedSourceMapConsumer$1.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  15691. var needle = {
  15692. generatedLine: util$6.getArg(aArgs, 'line'),
  15693. generatedColumn: util$6.getArg(aArgs, 'column')
  15694. };
  15695. var sectionIndex = binarySearch$1.search(needle, this._sections, function (needle, section) {
  15696. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  15697. if (cmp) {
  15698. return cmp;
  15699. }
  15700. return needle.generatedColumn - section.generatedOffset.generatedColumn;
  15701. });
  15702. var section = this._sections[sectionIndex];
  15703. if (!section) {
  15704. return {
  15705. source: null,
  15706. line: null,
  15707. column: null,
  15708. name: null
  15709. };
  15710. }
  15711. return section.consumer.originalPositionFor({
  15712. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  15713. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  15714. bias: aArgs.bias
  15715. });
  15716. };
  15717. IndexedSourceMapConsumer$1.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  15718. return this._sections.every(function (s) {
  15719. return s.consumer.hasContentsOfAllSources();
  15720. });
  15721. };
  15722. IndexedSourceMapConsumer$1.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  15723. for (var i = 0; i < this._sections.length; i++) {
  15724. var section = this._sections[i];
  15725. var content = section.consumer.sourceContentFor(aSource, true);
  15726. if (content) {
  15727. return content;
  15728. }
  15729. }
  15730. if (nullOnMissing) {
  15731. return null;
  15732. } else {
  15733. throw new Error('"' + aSource + '" is not in the SourceMap.');
  15734. }
  15735. };
  15736. IndexedSourceMapConsumer$1.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  15737. for (var i = 0; i < this._sections.length; i++) {
  15738. var section = this._sections[i];
  15739. if (section.consumer.sources.indexOf(util$6.getArg(aArgs, 'source')) === -1) {
  15740. continue;
  15741. }
  15742. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  15743. if (generatedPosition) {
  15744. var ret = {
  15745. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  15746. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  15747. };
  15748. return ret;
  15749. }
  15750. }
  15751. return {
  15752. line: null,
  15753. column: null
  15754. };
  15755. };
  15756. IndexedSourceMapConsumer$1.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  15757. this.__generatedMappings = [];
  15758. this.__originalMappings = [];
  15759. for (var i = 0; i < this._sections.length; i++) {
  15760. var section = this._sections[i];
  15761. var sectionMappings = section.consumer._generatedMappings;
  15762. for (var j = 0; j < sectionMappings.length; j++) {
  15763. var mapping = sectionMappings[j];
  15764. var source = section.consumer._sources.at(mapping.source);
  15765. if (section.consumer.sourceRoot !== null) {
  15766. source = util$6.join(section.consumer.sourceRoot, source);
  15767. }
  15768. this._sources.add(source);
  15769. source = this._sources.indexOf(source);
  15770. var name = section.consumer._names.at(mapping.name);
  15771. this._names.add(name);
  15772. name = this._names.indexOf(name);
  15773. var adjustedMapping = {
  15774. source: source,
  15775. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  15776. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  15777. originalLine: mapping.originalLine,
  15778. originalColumn: mapping.originalColumn,
  15779. name: name
  15780. };
  15781. this.__generatedMappings.push(adjustedMapping);
  15782. if (typeof adjustedMapping.originalLine === 'number') {
  15783. this.__originalMappings.push(adjustedMapping);
  15784. }
  15785. }
  15786. }
  15787. quickSort$2(this.__generatedMappings, util$6.compareByGeneratedPositionsDeflated);
  15788. quickSort$2(this.__originalMappings, util$6.compareByOriginalPositions);
  15789. };
  15790. var IndexedSourceMapConsumer_1$1 = IndexedSourceMapConsumer$1;
  15791. var sourceMapConsumer$1 = {
  15792. SourceMapConsumer: SourceMapConsumer_1$1,
  15793. BasicSourceMapConsumer: BasicSourceMapConsumer_1$1,
  15794. IndexedSourceMapConsumer: IndexedSourceMapConsumer_1$1
  15795. };
  15796. var SourceMapGenerator$4 = sourceMapGenerator$1.SourceMapGenerator;
  15797. var REGEX_NEWLINE$1 = /(\r?\n)/;
  15798. var NEWLINE_CODE$1 = 10;
  15799. var isSourceNode$1 = "$$$isSourceNode$$$";
  15800. function SourceNode$3(aLine, aColumn, aSource, aChunks, aName) {
  15801. this.children = [];
  15802. this.sourceContents = {};
  15803. this.line = aLine == null ? null : aLine;
  15804. this.column = aColumn == null ? null : aColumn;
  15805. this.source = aSource == null ? null : aSource;
  15806. this.name = aName == null ? null : aName;
  15807. this[isSourceNode$1] = true;
  15808. if (aChunks != null) this.add(aChunks);
  15809. }
  15810. SourceNode$3.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  15811. var node = new SourceNode$3();
  15812. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE$1);
  15813. var remainingLinesIndex = 0;
  15814. var shiftNextLine = function shiftNextLine() {
  15815. var lineContents = getNextLine();
  15816. var newLine = getNextLine() || "";
  15817. return lineContents + newLine;
  15818. function getNextLine() {
  15819. return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
  15820. }
  15821. };
  15822. var lastGeneratedLine = 1,
  15823. lastGeneratedColumn = 0;
  15824. var lastMapping = null;
  15825. aSourceMapConsumer.eachMapping(function (mapping) {
  15826. if (lastMapping !== null) {
  15827. if (lastGeneratedLine < mapping.generatedLine) {
  15828. addMappingWithCode(lastMapping, shiftNextLine());
  15829. lastGeneratedLine++;
  15830. lastGeneratedColumn = 0;
  15831. } else {
  15832. var nextLine = remainingLines[remainingLinesIndex];
  15833. var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  15834. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  15835. lastGeneratedColumn = mapping.generatedColumn;
  15836. addMappingWithCode(lastMapping, code);
  15837. lastMapping = mapping;
  15838. return;
  15839. }
  15840. }
  15841. while (lastGeneratedLine < mapping.generatedLine) {
  15842. node.add(shiftNextLine());
  15843. lastGeneratedLine++;
  15844. }
  15845. if (lastGeneratedColumn < mapping.generatedColumn) {
  15846. var nextLine = remainingLines[remainingLinesIndex];
  15847. node.add(nextLine.substr(0, mapping.generatedColumn));
  15848. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  15849. lastGeneratedColumn = mapping.generatedColumn;
  15850. }
  15851. lastMapping = mapping;
  15852. }, this);
  15853. if (remainingLinesIndex < remainingLines.length) {
  15854. if (lastMapping) {
  15855. addMappingWithCode(lastMapping, shiftNextLine());
  15856. }
  15857. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  15858. }
  15859. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  15860. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  15861. if (content != null) {
  15862. if (aRelativePath != null) {
  15863. sourceFile = util$6.join(aRelativePath, sourceFile);
  15864. }
  15865. node.setSourceContent(sourceFile, content);
  15866. }
  15867. });
  15868. return node;
  15869. function addMappingWithCode(mapping, code) {
  15870. if (mapping === null || mapping.source === undefined) {
  15871. node.add(code);
  15872. } else {
  15873. var source = aRelativePath ? util$6.join(aRelativePath, mapping.source) : mapping.source;
  15874. node.add(new SourceNode$3(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
  15875. }
  15876. }
  15877. };
  15878. SourceNode$3.prototype.add = function SourceNode_add(aChunk) {
  15879. if (Array.isArray(aChunk)) {
  15880. aChunk.forEach(function (chunk) {
  15881. this.add(chunk);
  15882. }, this);
  15883. } else if (aChunk[isSourceNode$1] || typeof aChunk === "string") {
  15884. if (aChunk) {
  15885. this.children.push(aChunk);
  15886. }
  15887. } else {
  15888. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  15889. }
  15890. return this;
  15891. };
  15892. SourceNode$3.prototype.prepend = function SourceNode_prepend(aChunk) {
  15893. if (Array.isArray(aChunk)) {
  15894. for (var i = aChunk.length - 1; i >= 0; i--) {
  15895. this.prepend(aChunk[i]);
  15896. }
  15897. } else if (aChunk[isSourceNode$1] || typeof aChunk === "string") {
  15898. this.children.unshift(aChunk);
  15899. } else {
  15900. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  15901. }
  15902. return this;
  15903. };
  15904. SourceNode$3.prototype.walk = function SourceNode_walk(aFn) {
  15905. var chunk;
  15906. for (var i = 0, len = this.children.length; i < len; i++) {
  15907. chunk = this.children[i];
  15908. if (chunk[isSourceNode$1]) {
  15909. chunk.walk(aFn);
  15910. } else {
  15911. if (chunk !== '') {
  15912. aFn(chunk, {
  15913. source: this.source,
  15914. line: this.line,
  15915. column: this.column,
  15916. name: this.name
  15917. });
  15918. }
  15919. }
  15920. }
  15921. };
  15922. SourceNode$3.prototype.join = function SourceNode_join(aSep) {
  15923. var newChildren;
  15924. var i;
  15925. var len = this.children.length;
  15926. if (len > 0) {
  15927. newChildren = [];
  15928. for (i = 0; i < len - 1; i++) {
  15929. newChildren.push(this.children[i]);
  15930. newChildren.push(aSep);
  15931. }
  15932. newChildren.push(this.children[i]);
  15933. this.children = newChildren;
  15934. }
  15935. return this;
  15936. };
  15937. SourceNode$3.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  15938. var lastChild = this.children[this.children.length - 1];
  15939. if (lastChild[isSourceNode$1]) {
  15940. lastChild.replaceRight(aPattern, aReplacement);
  15941. } else if (typeof lastChild === 'string') {
  15942. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  15943. } else {
  15944. this.children.push(''.replace(aPattern, aReplacement));
  15945. }
  15946. return this;
  15947. };
  15948. SourceNode$3.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  15949. this.sourceContents[util$6.toSetString(aSourceFile)] = aSourceContent;
  15950. };
  15951. SourceNode$3.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  15952. for (var i = 0, len = this.children.length; i < len; i++) {
  15953. if (this.children[i][isSourceNode$1]) {
  15954. this.children[i].walkSourceContents(aFn);
  15955. }
  15956. }
  15957. var sources = Object.keys(this.sourceContents);
  15958. for (var i = 0, len = sources.length; i < len; i++) {
  15959. aFn(util$6.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  15960. }
  15961. };
  15962. SourceNode$3.prototype.toString = function SourceNode_toString() {
  15963. var str = "";
  15964. this.walk(function (chunk) {
  15965. str += chunk;
  15966. });
  15967. return str;
  15968. };
  15969. SourceNode$3.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  15970. var generated = {
  15971. code: "",
  15972. line: 1,
  15973. column: 0
  15974. };
  15975. var map = new SourceMapGenerator$4(aArgs);
  15976. var sourceMappingActive = false;
  15977. var lastOriginalSource = null;
  15978. var lastOriginalLine = null;
  15979. var lastOriginalColumn = null;
  15980. var lastOriginalName = null;
  15981. this.walk(function (chunk, original) {
  15982. generated.code += chunk;
  15983. if (original.source !== null && original.line !== null && original.column !== null) {
  15984. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  15985. map.addMapping({
  15986. source: original.source,
  15987. original: {
  15988. line: original.line,
  15989. column: original.column
  15990. },
  15991. generated: {
  15992. line: generated.line,
  15993. column: generated.column
  15994. },
  15995. name: original.name
  15996. });
  15997. }
  15998. lastOriginalSource = original.source;
  15999. lastOriginalLine = original.line;
  16000. lastOriginalColumn = original.column;
  16001. lastOriginalName = original.name;
  16002. sourceMappingActive = true;
  16003. } else if (sourceMappingActive) {
  16004. map.addMapping({
  16005. generated: {
  16006. line: generated.line,
  16007. column: generated.column
  16008. }
  16009. });
  16010. lastOriginalSource = null;
  16011. sourceMappingActive = false;
  16012. }
  16013. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  16014. if (chunk.charCodeAt(idx) === NEWLINE_CODE$1) {
  16015. generated.line++;
  16016. generated.column = 0;
  16017. if (idx + 1 === length) {
  16018. lastOriginalSource = null;
  16019. sourceMappingActive = false;
  16020. } else if (sourceMappingActive) {
  16021. map.addMapping({
  16022. source: original.source,
  16023. original: {
  16024. line: original.line,
  16025. column: original.column
  16026. },
  16027. generated: {
  16028. line: generated.line,
  16029. column: generated.column
  16030. },
  16031. name: original.name
  16032. });
  16033. }
  16034. } else {
  16035. generated.column++;
  16036. }
  16037. }
  16038. });
  16039. this.walkSourceContents(function (sourceFile, sourceContent) {
  16040. map.setSourceContent(sourceFile, sourceContent);
  16041. });
  16042. return {
  16043. code: generated.code,
  16044. map: map
  16045. };
  16046. };
  16047. var SourceNode_1$1 = SourceNode$3;
  16048. var sourceNode$1 = {
  16049. SourceNode: SourceNode_1$1
  16050. };
  16051. var SourceMapGenerator$3 = sourceMapGenerator$1.SourceMapGenerator;
  16052. var SourceMapConsumer$2 = sourceMapConsumer$1.SourceMapConsumer;
  16053. var SourceNode$2 = sourceNode$1.SourceNode;
  16054. var sourceMap$1 = {
  16055. SourceMapGenerator: SourceMapGenerator$3,
  16056. SourceMapConsumer: SourceMapConsumer$2,
  16057. SourceNode: SourceNode$2
  16058. };
  16059. var SourceMap = function () {
  16060. function SourceMap(opts, code) {
  16061. this._cachedMap = void 0;
  16062. this._code = void 0;
  16063. this._opts = void 0;
  16064. this._rawMappings = void 0;
  16065. this._lastGenLine = void 0;
  16066. this._lastSourceLine = void 0;
  16067. this._lastSourceColumn = void 0;
  16068. this._cachedMap = null;
  16069. this._code = code;
  16070. this._opts = opts;
  16071. this._rawMappings = [];
  16072. }
  16073. var _proto = SourceMap.prototype;
  16074. _proto.get = function get() {
  16075. if (!this._cachedMap) {
  16076. var map = this._cachedMap = new sourceMap$1.SourceMapGenerator({
  16077. sourceRoot: this._opts.sourceRoot
  16078. });
  16079. var code = this._code;
  16080. if (typeof code === "string") {
  16081. map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code);
  16082. } else if (typeof code === "object") {
  16083. Object.keys(code).forEach(function (sourceFileName) {
  16084. map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
  16085. });
  16086. }
  16087. this._rawMappings.forEach(function (mapping) {
  16088. return map.addMapping(mapping);
  16089. }, map);
  16090. }
  16091. return this._cachedMap.toJSON();
  16092. };
  16093. _proto.getRawMappings = function getRawMappings() {
  16094. return this._rawMappings.slice();
  16095. };
  16096. _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
  16097. if (this._lastGenLine !== generatedLine && line === null) return;
  16098. if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
  16099. return;
  16100. }
  16101. this._cachedMap = null;
  16102. this._lastGenLine = generatedLine;
  16103. this._lastSourceLine = line;
  16104. this._lastSourceColumn = column;
  16105. this._rawMappings.push({
  16106. name: identifierName || undefined,
  16107. generated: {
  16108. line: generatedLine,
  16109. column: generatedColumn
  16110. },
  16111. source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
  16112. original: line == null ? undefined : {
  16113. line: line,
  16114. column: column
  16115. }
  16116. });
  16117. };
  16118. return SourceMap;
  16119. }();
  16120. var SPACES_RE = /^[ \t]+$/;
  16121. var Buffer = function () {
  16122. function Buffer(map) {
  16123. this._map = null;
  16124. this._buf = [];
  16125. this._last = "";
  16126. this._queue = [];
  16127. this._position = {
  16128. line: 1,
  16129. column: 0
  16130. };
  16131. this._sourcePosition = {
  16132. identifierName: null,
  16133. line: null,
  16134. column: null,
  16135. filename: null
  16136. };
  16137. this._disallowedPop = null;
  16138. this._map = map;
  16139. }
  16140. var _proto = Buffer.prototype;
  16141. _proto.get = function get() {
  16142. this._flush();
  16143. var map = this._map;
  16144. var result = {
  16145. code: this._buf.join("").trimRight(),
  16146. map: null,
  16147. rawMappings: map == null ? void 0 : map.getRawMappings()
  16148. };
  16149. if (map) {
  16150. Object.defineProperty(result, "map", {
  16151. configurable: true,
  16152. enumerable: true,
  16153. get: function get() {
  16154. return this.map = map.get();
  16155. },
  16156. set: function set(value) {
  16157. Object.defineProperty(this, "map", {
  16158. value: value,
  16159. writable: true
  16160. });
  16161. }
  16162. });
  16163. }
  16164. return result;
  16165. };
  16166. _proto.append = function append(str) {
  16167. this._flush();
  16168. var _this$_sourcePosition = this._sourcePosition,
  16169. line = _this$_sourcePosition.line,
  16170. column = _this$_sourcePosition.column,
  16171. filename = _this$_sourcePosition.filename,
  16172. identifierName = _this$_sourcePosition.identifierName,
  16173. force = _this$_sourcePosition.force;
  16174. this._append(str, line, column, identifierName, filename, force);
  16175. };
  16176. _proto.queue = function queue(str) {
  16177. if (str === "\n") {
  16178. while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
  16179. this._queue.shift();
  16180. }
  16181. }
  16182. var _this$_sourcePosition2 = this._sourcePosition,
  16183. line = _this$_sourcePosition2.line,
  16184. column = _this$_sourcePosition2.column,
  16185. filename = _this$_sourcePosition2.filename,
  16186. identifierName = _this$_sourcePosition2.identifierName,
  16187. force = _this$_sourcePosition2.force;
  16188. this._queue.unshift([str, line, column, identifierName, filename, force]);
  16189. };
  16190. _proto._flush = function _flush() {
  16191. var item;
  16192. while (item = this._queue.pop()) {
  16193. this._append.apply(this, _toConsumableArray(item));
  16194. }
  16195. };
  16196. _proto._append = function _append(str, line, column, identifierName, filename, force) {
  16197. this._buf.push(str);
  16198. this._last = str[str.length - 1];
  16199. var i = str.indexOf("\n");
  16200. var last = 0;
  16201. if (i !== 0) {
  16202. this._mark(line, column, identifierName, filename, force);
  16203. }
  16204. while (i !== -1) {
  16205. this._position.line++;
  16206. this._position.column = 0;
  16207. last = i + 1;
  16208. if (last < str.length) {
  16209. this._mark(++line, 0, identifierName, filename, force);
  16210. }
  16211. i = str.indexOf("\n", last);
  16212. }
  16213. this._position.column += str.length - last;
  16214. };
  16215. _proto._mark = function _mark(line, column, identifierName, filename, force) {
  16216. var _this$_map;
  16217. (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
  16218. };
  16219. _proto.removeTrailingNewline = function removeTrailingNewline() {
  16220. if (this._queue.length > 0 && this._queue[0][0] === "\n") {
  16221. this._queue.shift();
  16222. }
  16223. };
  16224. _proto.removeLastSemicolon = function removeLastSemicolon() {
  16225. if (this._queue.length > 0 && this._queue[0][0] === ";") {
  16226. this._queue.shift();
  16227. }
  16228. };
  16229. _proto.endsWith = function endsWith(suffix) {
  16230. if (suffix.length === 1) {
  16231. var last;
  16232. if (this._queue.length > 0) {
  16233. var _str = this._queue[0][0];
  16234. last = _str[_str.length - 1];
  16235. } else {
  16236. last = this._last;
  16237. }
  16238. return last === suffix;
  16239. }
  16240. var end = this._last + this._queue.reduce(function (acc, item) {
  16241. return item[0] + acc;
  16242. }, "");
  16243. if (suffix.length <= end.length) {
  16244. return end.slice(-suffix.length) === suffix;
  16245. }
  16246. return false;
  16247. };
  16248. _proto.hasContent = function hasContent() {
  16249. return this._queue.length > 0 || !!this._last;
  16250. };
  16251. _proto.exactSource = function exactSource(loc, cb) {
  16252. this.source("start", loc, true);
  16253. cb();
  16254. this.source("end", loc);
  16255. this._disallowPop("start", loc);
  16256. };
  16257. _proto.source = function source(prop, loc, force) {
  16258. if (prop && !loc) return;
  16259. this._normalizePosition(prop, loc, this._sourcePosition, force);
  16260. };
  16261. _proto.withSource = function withSource(prop, loc, cb) {
  16262. if (!this._map) return cb();
  16263. var originalLine = this._sourcePosition.line;
  16264. var originalColumn = this._sourcePosition.column;
  16265. var originalFilename = this._sourcePosition.filename;
  16266. var originalIdentifierName = this._sourcePosition.identifierName;
  16267. this.source(prop, loc);
  16268. cb();
  16269. if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
  16270. this._sourcePosition.line = originalLine;
  16271. this._sourcePosition.column = originalColumn;
  16272. this._sourcePosition.filename = originalFilename;
  16273. this._sourcePosition.identifierName = originalIdentifierName;
  16274. this._sourcePosition.force = false;
  16275. this._disallowedPop = null;
  16276. }
  16277. };
  16278. _proto._disallowPop = function _disallowPop(prop, loc) {
  16279. if (prop && !loc) return;
  16280. this._disallowedPop = this._normalizePosition(prop, loc);
  16281. };
  16282. _proto._normalizePosition = function _normalizePosition(prop, loc, targetObj, force) {
  16283. var pos = loc ? loc[prop] : null;
  16284. if (targetObj === undefined) {
  16285. targetObj = {
  16286. identifierName: null,
  16287. line: null,
  16288. column: null,
  16289. filename: null,
  16290. force: false
  16291. };
  16292. }
  16293. var origLine = targetObj.line;
  16294. var origColumn = targetObj.column;
  16295. var origFilename = targetObj.filename;
  16296. targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
  16297. targetObj.line = pos == null ? void 0 : pos.line;
  16298. targetObj.column = pos == null ? void 0 : pos.column;
  16299. targetObj.filename = loc == null ? void 0 : loc.filename;
  16300. if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
  16301. targetObj.force = force;
  16302. }
  16303. return targetObj;
  16304. };
  16305. _proto.getCurrentColumn = function getCurrentColumn() {
  16306. var extra = this._queue.reduce(function (acc, item) {
  16307. return item[0] + acc;
  16308. }, "");
  16309. var lastIndex = extra.lastIndexOf("\n");
  16310. return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
  16311. };
  16312. _proto.getCurrentLine = function getCurrentLine() {
  16313. var extra = this._queue.reduce(function (acc, item) {
  16314. return item[0] + acc;
  16315. }, "");
  16316. var count = 0;
  16317. for (var i = 0; i < extra.length; i++) {
  16318. if (extra[i] === "\n") count++;
  16319. }
  16320. return this._position.line + count;
  16321. };
  16322. return Buffer;
  16323. }();
  16324. function crawl(node, state) {
  16325. if (state === void 0) {
  16326. state = {};
  16327. }
  16328. if (isMemberExpression(node) || isOptionalMemberExpression(node)) {
  16329. crawl(node.object, state);
  16330. if (node.computed) crawl(node.property, state);
  16331. } else if (isBinary(node) || isAssignmentExpression(node)) {
  16332. crawl(node.left, state);
  16333. crawl(node.right, state);
  16334. } else if (isCallExpression(node) || isOptionalCallExpression(node)) {
  16335. state.hasCall = true;
  16336. crawl(node.callee, state);
  16337. } else if (isFunction$1(node)) {
  16338. state.hasFunction = true;
  16339. } else if (isIdentifier(node)) {
  16340. state.hasHelper = state.hasHelper || isHelper(node.callee);
  16341. }
  16342. return state;
  16343. }
  16344. function isHelper(node) {
  16345. if (isMemberExpression(node)) {
  16346. return isHelper(node.object) || isHelper(node.property);
  16347. } else if (isIdentifier(node)) {
  16348. return node.name === "require" || node.name[0] === "_";
  16349. } else if (isCallExpression(node)) {
  16350. return isHelper(node.callee);
  16351. } else if (isBinary(node) || isAssignmentExpression(node)) {
  16352. return isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
  16353. } else {
  16354. return false;
  16355. }
  16356. }
  16357. function isType(node) {
  16358. return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node);
  16359. }
  16360. var nodes = {
  16361. AssignmentExpression: function (_AssignmentExpression) {
  16362. function AssignmentExpression(_x) {
  16363. return _AssignmentExpression.apply(this, arguments);
  16364. }
  16365. AssignmentExpression.toString = function () {
  16366. return _AssignmentExpression.toString();
  16367. };
  16368. return AssignmentExpression;
  16369. }(function (node) {
  16370. var state = crawl(node.right);
  16371. if (state.hasCall && state.hasHelper || state.hasFunction) {
  16372. return {
  16373. before: state.hasFunction,
  16374. after: true
  16375. };
  16376. }
  16377. }),
  16378. SwitchCase: function (_SwitchCase) {
  16379. function SwitchCase(_x2, _x3) {
  16380. return _SwitchCase.apply(this, arguments);
  16381. }
  16382. SwitchCase.toString = function () {
  16383. return _SwitchCase.toString();
  16384. };
  16385. return SwitchCase;
  16386. }(function (node, parent) {
  16387. return {
  16388. before: !!node.consequent.length || parent.cases[0] === node,
  16389. after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
  16390. };
  16391. }),
  16392. LogicalExpression: function (_LogicalExpression) {
  16393. function LogicalExpression(_x4) {
  16394. return _LogicalExpression.apply(this, arguments);
  16395. }
  16396. LogicalExpression.toString = function () {
  16397. return _LogicalExpression.toString();
  16398. };
  16399. return LogicalExpression;
  16400. }(function (node) {
  16401. if (isFunction$1(node.left) || isFunction$1(node.right)) {
  16402. return {
  16403. after: true
  16404. };
  16405. }
  16406. }),
  16407. Literal: function (_Literal) {
  16408. function Literal(_x5) {
  16409. return _Literal.apply(this, arguments);
  16410. }
  16411. Literal.toString = function () {
  16412. return _Literal.toString();
  16413. };
  16414. return Literal;
  16415. }(function (node) {
  16416. if (isStringLiteral(node) && node.value === "use strict") {
  16417. return {
  16418. after: true
  16419. };
  16420. }
  16421. }),
  16422. CallExpression: function (_CallExpression) {
  16423. function CallExpression(_x6) {
  16424. return _CallExpression.apply(this, arguments);
  16425. }
  16426. CallExpression.toString = function () {
  16427. return _CallExpression.toString();
  16428. };
  16429. return CallExpression;
  16430. }(function (node) {
  16431. if (isFunction$1(node.callee) || isHelper(node)) {
  16432. return {
  16433. before: true,
  16434. after: true
  16435. };
  16436. }
  16437. }),
  16438. OptionalCallExpression: function (_OptionalCallExpression) {
  16439. function OptionalCallExpression(_x7) {
  16440. return _OptionalCallExpression.apply(this, arguments);
  16441. }
  16442. OptionalCallExpression.toString = function () {
  16443. return _OptionalCallExpression.toString();
  16444. };
  16445. return OptionalCallExpression;
  16446. }(function (node) {
  16447. if (isFunction$1(node.callee)) {
  16448. return {
  16449. before: true,
  16450. after: true
  16451. };
  16452. }
  16453. }),
  16454. VariableDeclaration: function (_VariableDeclaration) {
  16455. function VariableDeclaration(_x8) {
  16456. return _VariableDeclaration.apply(this, arguments);
  16457. }
  16458. VariableDeclaration.toString = function () {
  16459. return _VariableDeclaration.toString();
  16460. };
  16461. return VariableDeclaration;
  16462. }(function (node) {
  16463. for (var i = 0; i < node.declarations.length; i++) {
  16464. var declar = node.declarations[i];
  16465. var enabled = isHelper(declar.id) && !isType(declar.init);
  16466. if (!enabled) {
  16467. var state = crawl(declar.init);
  16468. enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
  16469. }
  16470. if (enabled) {
  16471. return {
  16472. before: true,
  16473. after: true
  16474. };
  16475. }
  16476. }
  16477. }),
  16478. IfStatement: function (_IfStatement) {
  16479. function IfStatement(_x9) {
  16480. return _IfStatement.apply(this, arguments);
  16481. }
  16482. IfStatement.toString = function () {
  16483. return _IfStatement.toString();
  16484. };
  16485. return IfStatement;
  16486. }(function (node) {
  16487. if (isBlockStatement(node.consequent)) {
  16488. return {
  16489. before: true,
  16490. after: true
  16491. };
  16492. }
  16493. })
  16494. };
  16495. nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
  16496. if (parent.properties[0] === node) {
  16497. return {
  16498. before: true
  16499. };
  16500. }
  16501. };
  16502. nodes.ObjectTypeCallProperty = function (node, parent) {
  16503. var _parent$properties;
  16504. if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
  16505. return {
  16506. before: true
  16507. };
  16508. }
  16509. };
  16510. nodes.ObjectTypeIndexer = function (node, parent) {
  16511. var _parent$properties2, _parent$callPropertie;
  16512. if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
  16513. return {
  16514. before: true
  16515. };
  16516. }
  16517. };
  16518. nodes.ObjectTypeInternalSlot = function (node, parent) {
  16519. var _parent$properties3, _parent$callPropertie2, _parent$indexers;
  16520. if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
  16521. return {
  16522. before: true
  16523. };
  16524. }
  16525. };
  16526. var list$1 = {
  16527. VariableDeclaration: function (_VariableDeclaration2) {
  16528. function VariableDeclaration(_x10) {
  16529. return _VariableDeclaration2.apply(this, arguments);
  16530. }
  16531. VariableDeclaration.toString = function () {
  16532. return _VariableDeclaration2.toString();
  16533. };
  16534. return VariableDeclaration;
  16535. }(function (node) {
  16536. return node.declarations.map(function (decl) {
  16537. return decl.init;
  16538. });
  16539. }),
  16540. ArrayExpression: function (_ArrayExpression) {
  16541. function ArrayExpression(_x11) {
  16542. return _ArrayExpression.apply(this, arguments);
  16543. }
  16544. ArrayExpression.toString = function () {
  16545. return _ArrayExpression.toString();
  16546. };
  16547. return ArrayExpression;
  16548. }(function (node) {
  16549. return node.elements;
  16550. }),
  16551. ObjectExpression: function (_ObjectExpression) {
  16552. function ObjectExpression(_x12) {
  16553. return _ObjectExpression.apply(this, arguments);
  16554. }
  16555. ObjectExpression.toString = function () {
  16556. return _ObjectExpression.toString();
  16557. };
  16558. return ObjectExpression;
  16559. }(function (node) {
  16560. return node.properties;
  16561. })
  16562. };
  16563. [["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function (_ref) {
  16564. var _ref2 = _slicedToArray$2(_ref, 2),
  16565. type = _ref2[0],
  16566. amounts = _ref2[1];
  16567. if (typeof amounts === "boolean") {
  16568. amounts = {
  16569. after: amounts,
  16570. before: amounts
  16571. };
  16572. }
  16573. [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
  16574. nodes[type] = function () {
  16575. return amounts;
  16576. };
  16577. });
  16578. });
  16579. var PRECEDENCE = {
  16580. "||": 0,
  16581. "??": 0,
  16582. "&&": 1,
  16583. "|": 2,
  16584. "^": 3,
  16585. "&": 4,
  16586. "==": 5,
  16587. "===": 5,
  16588. "!=": 5,
  16589. "!==": 5,
  16590. "<": 6,
  16591. ">": 6,
  16592. "<=": 6,
  16593. ">=": 6,
  16594. "in": 6,
  16595. "instanceof": 6,
  16596. ">>": 7,
  16597. "<<": 7,
  16598. ">>>": 7,
  16599. "+": 8,
  16600. "-": 8,
  16601. "*": 9,
  16602. "/": 9,
  16603. "%": 9,
  16604. "**": 10
  16605. };
  16606. var isClassExtendsClause = function isClassExtendsClause(node, parent) {
  16607. return (isClassDeclaration(parent) || isClassExpression(parent)) && parent.superClass === node;
  16608. };
  16609. var hasPostfixPart = function hasPostfixPart(node, parent) {
  16610. return (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent);
  16611. };
  16612. function NullableTypeAnnotation$1(node, parent) {
  16613. return isArrayTypeAnnotation(parent);
  16614. }
  16615. function FunctionTypeAnnotation$1(node, parent, printStack) {
  16616. return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);
  16617. }
  16618. function UpdateExpression$2(node, parent) {
  16619. return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
  16620. }
  16621. function ObjectExpression$2(node, parent, printStack) {
  16622. return isFirstInContext(printStack, {
  16623. expressionStatement: true,
  16624. arrowBody: true
  16625. });
  16626. }
  16627. function DoExpression$1(node, parent, printStack) {
  16628. return !node.async && isFirstInContext(printStack, {
  16629. expressionStatement: true
  16630. });
  16631. }
  16632. function Binary(node, parent) {
  16633. if (node.operator === "**" && isBinaryExpression(parent, {
  16634. operator: "**"
  16635. })) {
  16636. return parent.left === node;
  16637. }
  16638. if (isClassExtendsClause(node, parent)) {
  16639. return true;
  16640. }
  16641. if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) {
  16642. return true;
  16643. }
  16644. if (isBinary(parent)) {
  16645. var parentOp = parent.operator;
  16646. var parentPos = PRECEDENCE[parentOp];
  16647. var nodeOp = node.operator;
  16648. var nodePos = PRECEDENCE[nodeOp];
  16649. if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) {
  16650. return true;
  16651. }
  16652. }
  16653. }
  16654. function UnionTypeAnnotation$1(node, parent) {
  16655. return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent);
  16656. }
  16657. function OptionalIndexedAccessType$1(node, parent) {
  16658. return isIndexedAccessType(parent, {
  16659. objectType: node
  16660. });
  16661. }
  16662. function TSAsExpression$1() {
  16663. return true;
  16664. }
  16665. function TSTypeAssertion$1() {
  16666. return true;
  16667. }
  16668. function TSUnionType$1(node, parent) {
  16669. return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);
  16670. }
  16671. function TSInferType$1(node, parent) {
  16672. return isTSArrayType(parent) || isTSOptionalType(parent);
  16673. }
  16674. function BinaryExpression$1(node, parent) {
  16675. return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent));
  16676. }
  16677. function SequenceExpression$2(node, parent) {
  16678. if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) {
  16679. return false;
  16680. }
  16681. return true;
  16682. }
  16683. function YieldExpression$1(node, parent) {
  16684. return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
  16685. }
  16686. function ClassExpression(node, parent, printStack) {
  16687. return isFirstInContext(printStack, {
  16688. expressionStatement: true,
  16689. exportDefault: true
  16690. });
  16691. }
  16692. function UnaryLike(node, parent) {
  16693. return hasPostfixPart(node, parent) || isBinaryExpression(parent, {
  16694. operator: "**",
  16695. left: node
  16696. }) || isClassExtendsClause(node, parent);
  16697. }
  16698. function FunctionExpression$1(node, parent, printStack) {
  16699. return isFirstInContext(printStack, {
  16700. expressionStatement: true,
  16701. exportDefault: true
  16702. });
  16703. }
  16704. function ArrowFunctionExpression$1(node, parent) {
  16705. return isExportDeclaration(parent) || ConditionalExpression$2(node, parent);
  16706. }
  16707. function ConditionalExpression$2(node, parent) {
  16708. if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {
  16709. test: node
  16710. }) || isAwaitExpression(parent) || isTSTypeAssertion(parent) || isTSAsExpression(parent)) {
  16711. return true;
  16712. }
  16713. return UnaryLike(node, parent);
  16714. }
  16715. function OptionalMemberExpression$1(node, parent) {
  16716. return isCallExpression(parent, {
  16717. callee: node
  16718. }) || isMemberExpression(parent, {
  16719. object: node
  16720. });
  16721. }
  16722. function AssignmentExpression$2(node, parent) {
  16723. if (isObjectPattern(node.left)) {
  16724. return true;
  16725. } else {
  16726. return ConditionalExpression$2(node, parent);
  16727. }
  16728. }
  16729. function LogicalExpression$1(node, parent) {
  16730. switch (node.operator) {
  16731. case "||":
  16732. if (!isLogicalExpression(parent)) return false;
  16733. return parent.operator === "??" || parent.operator === "&&";
  16734. case "&&":
  16735. return isLogicalExpression(parent, {
  16736. operator: "??"
  16737. });
  16738. case "??":
  16739. return isLogicalExpression(parent) && parent.operator !== "??";
  16740. }
  16741. }
  16742. function Identifier$1(node, parent, printStack) {
  16743. if (node.name === "let") {
  16744. var isFollowedByBracket = isMemberExpression(parent, {
  16745. object: node,
  16746. computed: true
  16747. }) || isOptionalMemberExpression(parent, {
  16748. object: node,
  16749. computed: true,
  16750. optional: false
  16751. });
  16752. return isFirstInContext(printStack, {
  16753. expressionStatement: isFollowedByBracket,
  16754. forHead: isFollowedByBracket,
  16755. forInHead: isFollowedByBracket,
  16756. forOfHead: true
  16757. });
  16758. }
  16759. return node.name === "async" && isForOfStatement(parent) && node === parent.left;
  16760. }
  16761. function isFirstInContext(printStack, _ref) {
  16762. var _ref$expressionStatem = _ref.expressionStatement,
  16763. expressionStatement = _ref$expressionStatem === void 0 ? false : _ref$expressionStatem,
  16764. _ref$arrowBody = _ref.arrowBody,
  16765. arrowBody = _ref$arrowBody === void 0 ? false : _ref$arrowBody,
  16766. _ref$exportDefault = _ref.exportDefault,
  16767. exportDefault = _ref$exportDefault === void 0 ? false : _ref$exportDefault,
  16768. _ref$forHead = _ref.forHead,
  16769. forHead = _ref$forHead === void 0 ? false : _ref$forHead,
  16770. _ref$forInHead = _ref.forInHead,
  16771. forInHead = _ref$forInHead === void 0 ? false : _ref$forInHead,
  16772. _ref$forOfHead = _ref.forOfHead,
  16773. forOfHead = _ref$forOfHead === void 0 ? false : _ref$forOfHead;
  16774. var i = printStack.length - 1;
  16775. var node = printStack[i];
  16776. i--;
  16777. var parent = printStack[i];
  16778. while (i >= 0) {
  16779. if (expressionStatement && isExpressionStatement(parent, {
  16780. expression: node
  16781. }) || exportDefault && isExportDefaultDeclaration(parent, {
  16782. declaration: node
  16783. }) || arrowBody && isArrowFunctionExpression(parent, {
  16784. body: node
  16785. }) || forHead && isForStatement(parent, {
  16786. init: node
  16787. }) || forInHead && isForInStatement(parent, {
  16788. left: node
  16789. }) || forOfHead && isForOfStatement(parent, {
  16790. left: node
  16791. })) {
  16792. return true;
  16793. }
  16794. if (hasPostfixPart(node, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isConditional(parent, {
  16795. test: node
  16796. }) || isBinary(parent, {
  16797. left: node
  16798. }) || isAssignmentExpression(parent, {
  16799. left: node
  16800. })) {
  16801. node = parent;
  16802. i--;
  16803. parent = printStack[i];
  16804. } else {
  16805. return false;
  16806. }
  16807. }
  16808. return false;
  16809. }
  16810. var parens = /*#__PURE__*/Object.freeze({
  16811. __proto__: null,
  16812. NullableTypeAnnotation: NullableTypeAnnotation$1,
  16813. FunctionTypeAnnotation: FunctionTypeAnnotation$1,
  16814. UpdateExpression: UpdateExpression$2,
  16815. ObjectExpression: ObjectExpression$2,
  16816. DoExpression: DoExpression$1,
  16817. Binary: Binary,
  16818. UnionTypeAnnotation: UnionTypeAnnotation$1,
  16819. IntersectionTypeAnnotation: UnionTypeAnnotation$1,
  16820. OptionalIndexedAccessType: OptionalIndexedAccessType$1,
  16821. TSAsExpression: TSAsExpression$1,
  16822. TSTypeAssertion: TSTypeAssertion$1,
  16823. TSUnionType: TSUnionType$1,
  16824. TSIntersectionType: TSUnionType$1,
  16825. TSInferType: TSInferType$1,
  16826. BinaryExpression: BinaryExpression$1,
  16827. SequenceExpression: SequenceExpression$2,
  16828. YieldExpression: YieldExpression$1,
  16829. AwaitExpression: YieldExpression$1,
  16830. ClassExpression: ClassExpression,
  16831. UnaryLike: UnaryLike,
  16832. FunctionExpression: FunctionExpression$1,
  16833. ArrowFunctionExpression: ArrowFunctionExpression$1,
  16834. ConditionalExpression: ConditionalExpression$2,
  16835. OptionalMemberExpression: OptionalMemberExpression$1,
  16836. OptionalCallExpression: OptionalMemberExpression$1,
  16837. AssignmentExpression: AssignmentExpression$2,
  16838. LogicalExpression: LogicalExpression$1,
  16839. Identifier: Identifier$1
  16840. });
  16841. function expandAliases(obj) {
  16842. var newObj = {};
  16843. function add(type, func) {
  16844. var fn = newObj[type];
  16845. newObj[type] = fn ? function (node, parent, stack) {
  16846. var result = fn(node, parent, stack);
  16847. return result == null ? func(node, parent, stack) : result;
  16848. } : func;
  16849. }
  16850. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  16851. var type = _Object$keys[_i];
  16852. var aliases = FLIPPED_ALIAS_KEYS[type];
  16853. if (aliases) {
  16854. for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {
  16855. var alias = _step.value;
  16856. add(alias, obj[type]);
  16857. }
  16858. } else {
  16859. add(type, obj[type]);
  16860. }
  16861. }
  16862. return newObj;
  16863. }
  16864. var expandedParens = expandAliases(parens);
  16865. var expandedWhitespaceNodes = expandAliases(nodes);
  16866. var expandedWhitespaceList = expandAliases(list$1);
  16867. function find$2(obj, node, parent, printStack) {
  16868. var fn = obj[node.type];
  16869. return fn ? fn(node, parent, printStack) : null;
  16870. }
  16871. function isOrHasCallExpression(node) {
  16872. if (isCallExpression(node)) {
  16873. return true;
  16874. }
  16875. return isMemberExpression(node) && isOrHasCallExpression(node.object);
  16876. }
  16877. function needsWhitespace(node, parent, type) {
  16878. if (!node) return 0;
  16879. if (isExpressionStatement(node)) {
  16880. node = node.expression;
  16881. }
  16882. var linesInfo = find$2(expandedWhitespaceNodes, node, parent);
  16883. if (!linesInfo) {
  16884. var items = find$2(expandedWhitespaceList, node, parent);
  16885. if (items) {
  16886. for (var i = 0; i < items.length; i++) {
  16887. linesInfo = needsWhitespace(items[i], node, type);
  16888. if (linesInfo) break;
  16889. }
  16890. }
  16891. }
  16892. if (typeof linesInfo === "object" && linesInfo !== null) {
  16893. return linesInfo[type] || 0;
  16894. }
  16895. return 0;
  16896. }
  16897. function needsWhitespaceBefore(node, parent) {
  16898. return needsWhitespace(node, parent, "before");
  16899. }
  16900. function needsWhitespaceAfter(node, parent) {
  16901. return needsWhitespace(node, parent, "after");
  16902. }
  16903. function needsParens(node, parent, printStack) {
  16904. if (!parent) return false;
  16905. if (isNewExpression(parent) && parent.callee === node) {
  16906. if (isOrHasCallExpression(node)) return true;
  16907. }
  16908. return find$2(expandedParens, node, parent, printStack);
  16909. }
  16910. function TaggedTemplateExpression$1(node) {
  16911. this.print(node.tag, node);
  16912. this.print(node.typeParameters, node);
  16913. this.print(node.quasi, node);
  16914. }
  16915. function TemplateElement(node, parent) {
  16916. var isFirst = parent.quasis[0] === node;
  16917. var isLast = parent.quasis[parent.quasis.length - 1] === node;
  16918. var value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
  16919. this.token(value);
  16920. }
  16921. function TemplateLiteral$1(node) {
  16922. var quasis = node.quasis;
  16923. for (var i = 0; i < quasis.length; i++) {
  16924. this.print(quasis[i], node);
  16925. if (i + 1 < quasis.length) {
  16926. this.print(node.expressions[i], node);
  16927. }
  16928. }
  16929. }
  16930. function UnaryExpression$1(node) {
  16931. if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
  16932. this.word(node.operator);
  16933. this.space();
  16934. } else {
  16935. this.token(node.operator);
  16936. }
  16937. this.print(node.argument, node);
  16938. }
  16939. function DoExpression(node) {
  16940. if (node.async) {
  16941. this.word("async");
  16942. this.space();
  16943. }
  16944. this.word("do");
  16945. this.space();
  16946. this.print(node.body, node);
  16947. }
  16948. function ParenthesizedExpression$1(node) {
  16949. this.token("(");
  16950. this.print(node.expression, node);
  16951. this.token(")");
  16952. }
  16953. function UpdateExpression$1(node) {
  16954. if (node.prefix) {
  16955. this.token(node.operator);
  16956. this.print(node.argument, node);
  16957. } else {
  16958. this.startTerminatorless(true);
  16959. this.print(node.argument, node);
  16960. this.endTerminatorless();
  16961. this.token(node.operator);
  16962. }
  16963. }
  16964. function ConditionalExpression$1(node) {
  16965. this.print(node.test, node);
  16966. this.space();
  16967. this.token("?");
  16968. this.space();
  16969. this.print(node.consequent, node);
  16970. this.space();
  16971. this.token(":");
  16972. this.space();
  16973. this.print(node.alternate, node);
  16974. }
  16975. function NewExpression$1(node, parent) {
  16976. this.word("new");
  16977. this.space();
  16978. this.print(node.callee, node);
  16979. if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
  16980. callee: node
  16981. }) && !isMemberExpression(parent) && !isNewExpression(parent)) {
  16982. return;
  16983. }
  16984. this.print(node.typeArguments, node);
  16985. this.print(node.typeParameters, node);
  16986. if (node.optional) {
  16987. this.token("?.");
  16988. }
  16989. this.token("(");
  16990. this.printList(node.arguments, node);
  16991. this.token(")");
  16992. }
  16993. function SequenceExpression$1(node) {
  16994. this.printList(node.expressions, node);
  16995. }
  16996. function ThisExpression() {
  16997. this.word("this");
  16998. }
  16999. function Super() {
  17000. this.word("super");
  17001. }
  17002. function Decorator(node) {
  17003. this.token("@");
  17004. this.print(node.expression, node);
  17005. this.newline();
  17006. }
  17007. function OptionalMemberExpression(node) {
  17008. this.print(node.object, node);
  17009. if (!node.computed && isMemberExpression(node.property)) {
  17010. throw new TypeError("Got a MemberExpression for MemberExpression property");
  17011. }
  17012. var computed = node.computed;
  17013. if (isLiteral(node.property) && typeof node.property.value === "number") {
  17014. computed = true;
  17015. }
  17016. if (node.optional) {
  17017. this.token("?.");
  17018. }
  17019. if (computed) {
  17020. this.token("[");
  17021. this.print(node.property, node);
  17022. this.token("]");
  17023. } else {
  17024. if (!node.optional) {
  17025. this.token(".");
  17026. }
  17027. this.print(node.property, node);
  17028. }
  17029. }
  17030. function OptionalCallExpression(node) {
  17031. this.print(node.callee, node);
  17032. this.print(node.typeArguments, node);
  17033. this.print(node.typeParameters, node);
  17034. if (node.optional) {
  17035. this.token("?.");
  17036. }
  17037. this.token("(");
  17038. this.printList(node.arguments, node);
  17039. this.token(")");
  17040. }
  17041. function CallExpression$1(node) {
  17042. this.print(node.callee, node);
  17043. this.print(node.typeArguments, node);
  17044. this.print(node.typeParameters, node);
  17045. this.token("(");
  17046. this.printList(node.arguments, node);
  17047. this.token(")");
  17048. }
  17049. function Import() {
  17050. this.word("import");
  17051. }
  17052. function buildYieldAwait(keyword) {
  17053. return function (node) {
  17054. this.word(keyword);
  17055. if (node.delegate) {
  17056. this.token("*");
  17057. }
  17058. if (node.argument) {
  17059. this.space();
  17060. var terminatorState = this.startTerminatorless();
  17061. this.print(node.argument, node);
  17062. this.endTerminatorless(terminatorState);
  17063. }
  17064. };
  17065. }
  17066. var YieldExpression = buildYieldAwait("yield");
  17067. var AwaitExpression = buildYieldAwait("await");
  17068. function EmptyStatement() {
  17069. this.semicolon(true);
  17070. }
  17071. function ExpressionStatement(node) {
  17072. this.print(node.expression, node);
  17073. this.semicolon();
  17074. }
  17075. function AssignmentPattern(node) {
  17076. this.print(node.left, node);
  17077. if (node.left.optional) this.token("?");
  17078. this.print(node.left.typeAnnotation, node);
  17079. this.space();
  17080. this.token("=");
  17081. this.space();
  17082. this.print(node.right, node);
  17083. }
  17084. function AssignmentExpression$1(node, parent) {
  17085. var parens = this.inForStatementInitCounter && node.operator === "in" && !needsParens(node, parent);
  17086. if (parens) {
  17087. this.token("(");
  17088. }
  17089. this.print(node.left, node);
  17090. this.space();
  17091. if (node.operator === "in" || node.operator === "instanceof") {
  17092. this.word(node.operator);
  17093. } else {
  17094. this.token(node.operator);
  17095. }
  17096. this.space();
  17097. this.print(node.right, node);
  17098. if (parens) {
  17099. this.token(")");
  17100. }
  17101. }
  17102. function BindExpression(node) {
  17103. this.print(node.object, node);
  17104. this.token("::");
  17105. this.print(node.callee, node);
  17106. }
  17107. function MemberExpression(node) {
  17108. this.print(node.object, node);
  17109. if (!node.computed && isMemberExpression(node.property)) {
  17110. throw new TypeError("Got a MemberExpression for MemberExpression property");
  17111. }
  17112. var computed = node.computed;
  17113. if (isLiteral(node.property) && typeof node.property.value === "number") {
  17114. computed = true;
  17115. }
  17116. if (computed) {
  17117. this.token("[");
  17118. this.print(node.property, node);
  17119. this.token("]");
  17120. } else {
  17121. this.token(".");
  17122. this.print(node.property, node);
  17123. }
  17124. }
  17125. function MetaProperty(node) {
  17126. this.print(node.meta, node);
  17127. this.token(".");
  17128. this.print(node.property, node);
  17129. }
  17130. function PrivateName(node) {
  17131. this.token("#");
  17132. this.print(node.id, node);
  17133. }
  17134. function V8IntrinsicIdentifier(node) {
  17135. this.token("%");
  17136. this.word(node.name);
  17137. }
  17138. function ModuleExpression(node) {
  17139. this.word("module");
  17140. this.space();
  17141. this.token("{");
  17142. if (node.body.body.length === 0) {
  17143. this.token("}");
  17144. } else {
  17145. this.newline();
  17146. this.printSequence(node.body.body, node, {
  17147. indent: true
  17148. });
  17149. this.rightBrace();
  17150. }
  17151. }
  17152. function WithStatement(node) {
  17153. this.word("with");
  17154. this.space();
  17155. this.token("(");
  17156. this.print(node.object, node);
  17157. this.token(")");
  17158. this.printBlock(node);
  17159. }
  17160. function IfStatement(node) {
  17161. this.word("if");
  17162. this.space();
  17163. this.token("(");
  17164. this.print(node.test, node);
  17165. this.token(")");
  17166. this.space();
  17167. var needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
  17168. if (needsBlock) {
  17169. this.token("{");
  17170. this.newline();
  17171. this.indent();
  17172. }
  17173. this.printAndIndentOnComments(node.consequent, node);
  17174. if (needsBlock) {
  17175. this.dedent();
  17176. this.newline();
  17177. this.token("}");
  17178. }
  17179. if (node.alternate) {
  17180. if (this.endsWith("}")) this.space();
  17181. this.word("else");
  17182. this.space();
  17183. this.printAndIndentOnComments(node.alternate, node);
  17184. }
  17185. }
  17186. function getLastStatement(statement) {
  17187. if (!isStatement(statement.body)) return statement;
  17188. return getLastStatement(statement.body);
  17189. }
  17190. function ForStatement(node) {
  17191. this.word("for");
  17192. this.space();
  17193. this.token("(");
  17194. this.inForStatementInitCounter++;
  17195. this.print(node.init, node);
  17196. this.inForStatementInitCounter--;
  17197. this.token(";");
  17198. if (node.test) {
  17199. this.space();
  17200. this.print(node.test, node);
  17201. }
  17202. this.token(";");
  17203. if (node.update) {
  17204. this.space();
  17205. this.print(node.update, node);
  17206. }
  17207. this.token(")");
  17208. this.printBlock(node);
  17209. }
  17210. function WhileStatement(node) {
  17211. this.word("while");
  17212. this.space();
  17213. this.token("(");
  17214. this.print(node.test, node);
  17215. this.token(")");
  17216. this.printBlock(node);
  17217. }
  17218. var buildForXStatement = function buildForXStatement(op) {
  17219. return function (node) {
  17220. this.word("for");
  17221. this.space();
  17222. if (op === "of" && node["await"]) {
  17223. this.word("await");
  17224. this.space();
  17225. }
  17226. this.token("(");
  17227. this.print(node.left, node);
  17228. this.space();
  17229. this.word(op);
  17230. this.space();
  17231. this.print(node.right, node);
  17232. this.token(")");
  17233. this.printBlock(node);
  17234. };
  17235. };
  17236. var ForInStatement = buildForXStatement("in");
  17237. var ForOfStatement = buildForXStatement("of");
  17238. function DoWhileStatement(node) {
  17239. this.word("do");
  17240. this.space();
  17241. this.print(node.body, node);
  17242. this.space();
  17243. this.word("while");
  17244. this.space();
  17245. this.token("(");
  17246. this.print(node.test, node);
  17247. this.token(")");
  17248. this.semicolon();
  17249. }
  17250. function buildLabelStatement(prefix, key) {
  17251. if (key === void 0) {
  17252. key = "label";
  17253. }
  17254. return function (node) {
  17255. this.word(prefix);
  17256. var label = node[key];
  17257. if (label) {
  17258. this.space();
  17259. var isLabel = key == "label";
  17260. var terminatorState = this.startTerminatorless(isLabel);
  17261. this.print(label, node);
  17262. this.endTerminatorless(terminatorState);
  17263. }
  17264. this.semicolon();
  17265. };
  17266. }
  17267. var ContinueStatement = buildLabelStatement("continue");
  17268. var ReturnStatement = buildLabelStatement("return", "argument");
  17269. var BreakStatement = buildLabelStatement("break");
  17270. var ThrowStatement = buildLabelStatement("throw", "argument");
  17271. function LabeledStatement(node) {
  17272. this.print(node.label, node);
  17273. this.token(":");
  17274. this.space();
  17275. this.print(node.body, node);
  17276. }
  17277. function TryStatement(node) {
  17278. this.word("try");
  17279. this.space();
  17280. this.print(node.block, node);
  17281. this.space();
  17282. if (node.handlers) {
  17283. this.print(node.handlers[0], node);
  17284. } else {
  17285. this.print(node.handler, node);
  17286. }
  17287. if (node.finalizer) {
  17288. this.space();
  17289. this.word("finally");
  17290. this.space();
  17291. this.print(node.finalizer, node);
  17292. }
  17293. }
  17294. function CatchClause(node) {
  17295. this.word("catch");
  17296. this.space();
  17297. if (node.param) {
  17298. this.token("(");
  17299. this.print(node.param, node);
  17300. this.print(node.param.typeAnnotation, node);
  17301. this.token(")");
  17302. this.space();
  17303. }
  17304. this.print(node.body, node);
  17305. }
  17306. function SwitchStatement(node) {
  17307. this.word("switch");
  17308. this.space();
  17309. this.token("(");
  17310. this.print(node.discriminant, node);
  17311. this.token(")");
  17312. this.space();
  17313. this.token("{");
  17314. this.printSequence(node.cases, node, {
  17315. indent: true,
  17316. addNewlines: function addNewlines(leading, cas) {
  17317. if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
  17318. }
  17319. });
  17320. this.token("}");
  17321. }
  17322. function SwitchCase(node) {
  17323. if (node.test) {
  17324. this.word("case");
  17325. this.space();
  17326. this.print(node.test, node);
  17327. this.token(":");
  17328. } else {
  17329. this.word("default");
  17330. this.token(":");
  17331. }
  17332. if (node.consequent.length) {
  17333. this.newline();
  17334. this.printSequence(node.consequent, node, {
  17335. indent: true
  17336. });
  17337. }
  17338. }
  17339. function DebuggerStatement() {
  17340. this.word("debugger");
  17341. this.semicolon();
  17342. }
  17343. function variableDeclarationIndent() {
  17344. this.token(",");
  17345. this.newline();
  17346. if (this.endsWith("\n")) for (var i = 0; i < 4; i++) {
  17347. this.space(true);
  17348. }
  17349. }
  17350. function constDeclarationIndent() {
  17351. this.token(",");
  17352. this.newline();
  17353. if (this.endsWith("\n")) for (var i = 0; i < 6; i++) {
  17354. this.space(true);
  17355. }
  17356. }
  17357. function VariableDeclaration(node, parent) {
  17358. if (node.declare) {
  17359. this.word("declare");
  17360. this.space();
  17361. }
  17362. this.word(node.kind);
  17363. this.space();
  17364. var hasInits = false;
  17365. if (!isFor(parent)) {
  17366. for (var _iterator = _createForOfIteratorHelperLoose(node.declarations), _step; !(_step = _iterator()).done;) {
  17367. var declar = _step.value;
  17368. if (declar.init) {
  17369. hasInits = true;
  17370. }
  17371. }
  17372. }
  17373. var separator;
  17374. if (hasInits) {
  17375. separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
  17376. }
  17377. this.printList(node.declarations, node, {
  17378. separator: separator
  17379. });
  17380. if (isFor(parent)) {
  17381. if (isForStatement(parent)) {
  17382. if (parent.init === node) return;
  17383. } else {
  17384. if (parent.left === node) return;
  17385. }
  17386. }
  17387. this.semicolon();
  17388. }
  17389. function VariableDeclarator$1(node) {
  17390. this.print(node.id, node);
  17391. if (node.definite) this.token("!");
  17392. this.print(node.id.typeAnnotation, node);
  17393. if (node.init) {
  17394. this.space();
  17395. this.token("=");
  17396. this.space();
  17397. this.print(node.init, node);
  17398. }
  17399. }
  17400. function ClassDeclaration(node, parent) {
  17401. if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) {
  17402. this.printJoin(node.decorators, node);
  17403. }
  17404. if (node.declare) {
  17405. this.word("declare");
  17406. this.space();
  17407. }
  17408. if (node["abstract"]) {
  17409. this.word("abstract");
  17410. this.space();
  17411. }
  17412. this.word("class");
  17413. if (node.id) {
  17414. this.space();
  17415. this.print(node.id, node);
  17416. }
  17417. this.print(node.typeParameters, node);
  17418. if (node.superClass) {
  17419. this.space();
  17420. this.word("extends");
  17421. this.space();
  17422. this.print(node.superClass, node);
  17423. this.print(node.superTypeParameters, node);
  17424. }
  17425. if (node["implements"]) {
  17426. this.space();
  17427. this.word("implements");
  17428. this.space();
  17429. this.printList(node["implements"], node);
  17430. }
  17431. this.space();
  17432. this.print(node.body, node);
  17433. }
  17434. function ClassBody(node) {
  17435. this.token("{");
  17436. this.printInnerComments(node);
  17437. if (node.body.length === 0) {
  17438. this.token("}");
  17439. } else {
  17440. this.newline();
  17441. this.indent();
  17442. this.printSequence(node.body, node);
  17443. this.dedent();
  17444. if (!this.endsWith("\n")) this.newline();
  17445. this.rightBrace();
  17446. }
  17447. }
  17448. function ClassProperty(node) {
  17449. this.printJoin(node.decorators, node);
  17450. this.source("end", node.key.loc);
  17451. this.tsPrintClassMemberModifiers(node, true);
  17452. if (node.computed) {
  17453. this.token("[");
  17454. this.print(node.key, node);
  17455. this.token("]");
  17456. } else {
  17457. this._variance(node);
  17458. this.print(node.key, node);
  17459. }
  17460. if (node.optional) {
  17461. this.token("?");
  17462. }
  17463. if (node.definite) {
  17464. this.token("!");
  17465. }
  17466. this.print(node.typeAnnotation, node);
  17467. if (node.value) {
  17468. this.space();
  17469. this.token("=");
  17470. this.space();
  17471. this.print(node.value, node);
  17472. }
  17473. this.semicolon();
  17474. }
  17475. function ClassPrivateProperty(node) {
  17476. this.printJoin(node.decorators, node);
  17477. if (node["static"]) {
  17478. this.word("static");
  17479. this.space();
  17480. }
  17481. this.print(node.key, node);
  17482. this.print(node.typeAnnotation, node);
  17483. if (node.value) {
  17484. this.space();
  17485. this.token("=");
  17486. this.space();
  17487. this.print(node.value, node);
  17488. }
  17489. this.semicolon();
  17490. }
  17491. function ClassMethod(node) {
  17492. this._classMethodHead(node);
  17493. this.space();
  17494. this.print(node.body, node);
  17495. }
  17496. function ClassPrivateMethod(node) {
  17497. this._classMethodHead(node);
  17498. this.space();
  17499. this.print(node.body, node);
  17500. }
  17501. function _classMethodHead(node) {
  17502. this.printJoin(node.decorators, node);
  17503. this.source("end", node.key.loc);
  17504. this.tsPrintClassMemberModifiers(node, false);
  17505. this._methodHead(node);
  17506. }
  17507. function StaticBlock(node) {
  17508. this.word("static");
  17509. this.space();
  17510. this.token("{");
  17511. if (node.body.length === 0) {
  17512. this.token("}");
  17513. } else {
  17514. this.newline();
  17515. this.printSequence(node.body, node, {
  17516. indent: true
  17517. });
  17518. this.rightBrace();
  17519. }
  17520. }
  17521. function _params(node) {
  17522. this.print(node.typeParameters, node);
  17523. this.token("(");
  17524. this._parameters(node.params, node);
  17525. this.token(")");
  17526. this.print(node.returnType, node);
  17527. }
  17528. function _parameters(parameters, parent) {
  17529. for (var i = 0; i < parameters.length; i++) {
  17530. this._param(parameters[i], parent);
  17531. if (i < parameters.length - 1) {
  17532. this.token(",");
  17533. this.space();
  17534. }
  17535. }
  17536. }
  17537. function _param(parameter, parent) {
  17538. this.printJoin(parameter.decorators, parameter);
  17539. this.print(parameter, parent);
  17540. if (parameter.optional) this.token("?");
  17541. this.print(parameter.typeAnnotation, parameter);
  17542. }
  17543. function _methodHead(node) {
  17544. var kind = node.kind;
  17545. var key = node.key;
  17546. if (kind === "get" || kind === "set") {
  17547. this.word(kind);
  17548. this.space();
  17549. }
  17550. if (node.async) {
  17551. this._catchUp("start", key.loc);
  17552. this.word("async");
  17553. this.space();
  17554. }
  17555. if (kind === "method" || kind === "init") {
  17556. if (node.generator) {
  17557. this.token("*");
  17558. }
  17559. }
  17560. if (node.computed) {
  17561. this.token("[");
  17562. this.print(key, node);
  17563. this.token("]");
  17564. } else {
  17565. this.print(key, node);
  17566. }
  17567. if (node.optional) {
  17568. this.token("?");
  17569. }
  17570. this._params(node);
  17571. }
  17572. function _predicate(node) {
  17573. if (node.predicate) {
  17574. if (!node.returnType) {
  17575. this.token(":");
  17576. }
  17577. this.space();
  17578. this.print(node.predicate, node);
  17579. }
  17580. }
  17581. function _functionHead(node) {
  17582. if (node.async) {
  17583. this.word("async");
  17584. this.space();
  17585. }
  17586. this.word("function");
  17587. if (node.generator) this.token("*");
  17588. this.space();
  17589. if (node.id) {
  17590. this.print(node.id, node);
  17591. }
  17592. this._params(node);
  17593. this._predicate(node);
  17594. }
  17595. function FunctionExpression(node) {
  17596. this._functionHead(node);
  17597. this.space();
  17598. this.print(node.body, node);
  17599. }
  17600. function ArrowFunctionExpression(node) {
  17601. if (node.async) {
  17602. this.word("async");
  17603. this.space();
  17604. }
  17605. var firstParam = node.params[0];
  17606. if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
  17607. this.print(firstParam, node);
  17608. } else {
  17609. this._params(node);
  17610. }
  17611. this._predicate(node);
  17612. this.space();
  17613. this.token("=>");
  17614. this.space();
  17615. this.print(node.body, node);
  17616. }
  17617. function hasTypesOrComments(node, param) {
  17618. var _param$leadingComment, _param$trailingCommen;
  17619. return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
  17620. }
  17621. function ImportSpecifier(node) {
  17622. if (node.importKind === "type" || node.importKind === "typeof") {
  17623. this.word(node.importKind);
  17624. this.space();
  17625. }
  17626. this.print(node.imported, node);
  17627. if (node.local && node.local.name !== node.imported.name) {
  17628. this.space();
  17629. this.word("as");
  17630. this.space();
  17631. this.print(node.local, node);
  17632. }
  17633. }
  17634. function ImportDefaultSpecifier(node) {
  17635. this.print(node.local, node);
  17636. }
  17637. function ExportDefaultSpecifier(node) {
  17638. this.print(node.exported, node);
  17639. }
  17640. function ExportSpecifier(node) {
  17641. this.print(node.local, node);
  17642. if (node.exported && node.local.name !== node.exported.name) {
  17643. this.space();
  17644. this.word("as");
  17645. this.space();
  17646. this.print(node.exported, node);
  17647. }
  17648. }
  17649. function ExportNamespaceSpecifier(node) {
  17650. this.token("*");
  17651. this.space();
  17652. this.word("as");
  17653. this.space();
  17654. this.print(node.exported, node);
  17655. }
  17656. function ExportAllDeclaration(node) {
  17657. this.word("export");
  17658. this.space();
  17659. if (node.exportKind === "type") {
  17660. this.word("type");
  17661. this.space();
  17662. }
  17663. this.token("*");
  17664. this.space();
  17665. this.word("from");
  17666. this.space();
  17667. this.print(node.source, node);
  17668. this.printAssertions(node);
  17669. this.semicolon();
  17670. }
  17671. function ExportNamedDeclaration(node) {
  17672. if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
  17673. this.printJoin(node.declaration.decorators, node);
  17674. }
  17675. this.word("export");
  17676. this.space();
  17677. ExportDeclaration.apply(this, arguments);
  17678. }
  17679. function ExportDefaultDeclaration(node) {
  17680. if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
  17681. this.printJoin(node.declaration.decorators, node);
  17682. }
  17683. this.word("export");
  17684. this.space();
  17685. this.word("default");
  17686. this.space();
  17687. ExportDeclaration.apply(this, arguments);
  17688. }
  17689. function ExportDeclaration(node) {
  17690. if (node.declaration) {
  17691. var declar = node.declaration;
  17692. this.print(declar, node);
  17693. if (!isStatement(declar)) this.semicolon();
  17694. } else {
  17695. if (node.exportKind === "type") {
  17696. this.word("type");
  17697. this.space();
  17698. }
  17699. var specifiers = node.specifiers.slice(0);
  17700. var hasSpecial = false;
  17701. for (;;) {
  17702. var first = specifiers[0];
  17703. if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
  17704. hasSpecial = true;
  17705. this.print(specifiers.shift(), node);
  17706. if (specifiers.length) {
  17707. this.token(",");
  17708. this.space();
  17709. }
  17710. } else {
  17711. break;
  17712. }
  17713. }
  17714. if (specifiers.length || !specifiers.length && !hasSpecial) {
  17715. this.token("{");
  17716. if (specifiers.length) {
  17717. this.space();
  17718. this.printList(specifiers, node);
  17719. this.space();
  17720. }
  17721. this.token("}");
  17722. }
  17723. if (node.source) {
  17724. this.space();
  17725. this.word("from");
  17726. this.space();
  17727. this.print(node.source, node);
  17728. this.printAssertions(node);
  17729. }
  17730. this.semicolon();
  17731. }
  17732. }
  17733. function ImportDeclaration(node) {
  17734. this.word("import");
  17735. this.space();
  17736. if (node.importKind === "type" || node.importKind === "typeof") {
  17737. this.word(node.importKind);
  17738. this.space();
  17739. }
  17740. var specifiers = node.specifiers.slice(0);
  17741. if (specifiers != null && specifiers.length) {
  17742. for (;;) {
  17743. var first = specifiers[0];
  17744. if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
  17745. this.print(specifiers.shift(), node);
  17746. if (specifiers.length) {
  17747. this.token(",");
  17748. this.space();
  17749. }
  17750. } else {
  17751. break;
  17752. }
  17753. }
  17754. if (specifiers.length) {
  17755. this.token("{");
  17756. this.space();
  17757. this.printList(specifiers, node);
  17758. this.space();
  17759. this.token("}");
  17760. }
  17761. this.space();
  17762. this.word("from");
  17763. this.space();
  17764. }
  17765. this.print(node.source, node);
  17766. this.printAssertions(node);
  17767. {
  17768. var _node$attributes;
  17769. if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
  17770. this.space();
  17771. this.word("with");
  17772. this.space();
  17773. this.printList(node.attributes, node);
  17774. }
  17775. }
  17776. this.semicolon();
  17777. }
  17778. function ImportAttribute(node) {
  17779. this.print(node.key);
  17780. this.token(":");
  17781. this.space();
  17782. this.print(node.value);
  17783. }
  17784. function ImportNamespaceSpecifier(node) {
  17785. this.token("*");
  17786. this.space();
  17787. this.word("as");
  17788. this.space();
  17789. this.print(node.local, node);
  17790. }
  17791. var byteLength_1 = byteLength;
  17792. var toByteArray_1 = toByteArray;
  17793. var fromByteArray_1 = fromByteArray;
  17794. var lookup = [];
  17795. var revLookup = [];
  17796. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
  17797. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  17798. for (var i = 0, len = code.length; i < len; ++i) {
  17799. lookup[i] = code[i];
  17800. revLookup[code.charCodeAt(i)] = i;
  17801. }
  17802. revLookup['-'.charCodeAt(0)] = 62;
  17803. revLookup['_'.charCodeAt(0)] = 63;
  17804. function getLens(b64) {
  17805. var len = b64.length;
  17806. if (len % 4 > 0) {
  17807. throw new Error('Invalid string. Length must be a multiple of 4');
  17808. }
  17809. var validLen = b64.indexOf('=');
  17810. if (validLen === -1) validLen = len;
  17811. var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
  17812. return [validLen, placeHoldersLen];
  17813. }
  17814. function byteLength(b64) {
  17815. var lens = getLens(b64);
  17816. var validLen = lens[0];
  17817. var placeHoldersLen = lens[1];
  17818. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  17819. }
  17820. function _byteLength(b64, validLen, placeHoldersLen) {
  17821. return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
  17822. }
  17823. function toByteArray(b64) {
  17824. var tmp;
  17825. var lens = getLens(b64);
  17826. var validLen = lens[0];
  17827. var placeHoldersLen = lens[1];
  17828. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
  17829. var curByte = 0;
  17830. var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
  17831. var i;
  17832. for (i = 0; i < len; i += 4) {
  17833. tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
  17834. arr[curByte++] = tmp >> 16 & 0xFF;
  17835. arr[curByte++] = tmp >> 8 & 0xFF;
  17836. arr[curByte++] = tmp & 0xFF;
  17837. }
  17838. if (placeHoldersLen === 2) {
  17839. tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
  17840. arr[curByte++] = tmp & 0xFF;
  17841. }
  17842. if (placeHoldersLen === 1) {
  17843. tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
  17844. arr[curByte++] = tmp >> 8 & 0xFF;
  17845. arr[curByte++] = tmp & 0xFF;
  17846. }
  17847. return arr;
  17848. }
  17849. function tripletToBase64(num) {
  17850. return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
  17851. }
  17852. function encodeChunk(uint8, start, end) {
  17853. var tmp;
  17854. var output = [];
  17855. for (var i = start; i < end; i += 3) {
  17856. tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);
  17857. output.push(tripletToBase64(tmp));
  17858. }
  17859. return output.join('');
  17860. }
  17861. function fromByteArray(uint8) {
  17862. var tmp;
  17863. var len = uint8.length;
  17864. var extraBytes = len % 3;
  17865. var parts = [];
  17866. var maxChunkLength = 16383;
  17867. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  17868. parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
  17869. }
  17870. if (extraBytes === 1) {
  17871. tmp = uint8[len - 1];
  17872. parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
  17873. } else if (extraBytes === 2) {
  17874. tmp = (uint8[len - 2] << 8) + uint8[len - 1];
  17875. parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
  17876. }
  17877. return parts.join('');
  17878. }
  17879. var base64Js = {
  17880. byteLength: byteLength_1,
  17881. toByteArray: toByteArray_1,
  17882. fromByteArray: fromByteArray_1
  17883. };
  17884. var read = function read(buffer, offset, isLE, mLen, nBytes) {
  17885. var e, m;
  17886. var eLen = nBytes * 8 - mLen - 1;
  17887. var eMax = (1 << eLen) - 1;
  17888. var eBias = eMax >> 1;
  17889. var nBits = -7;
  17890. var i = isLE ? nBytes - 1 : 0;
  17891. var d = isLE ? -1 : 1;
  17892. var s = buffer[offset + i];
  17893. i += d;
  17894. e = s & (1 << -nBits) - 1;
  17895. s >>= -nBits;
  17896. nBits += eLen;
  17897. for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  17898. m = e & (1 << -nBits) - 1;
  17899. e >>= -nBits;
  17900. nBits += mLen;
  17901. for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
  17902. if (e === 0) {
  17903. e = 1 - eBias;
  17904. } else if (e === eMax) {
  17905. return m ? NaN : (s ? -1 : 1) * Infinity;
  17906. } else {
  17907. m = m + Math.pow(2, mLen);
  17908. e = e - eBias;
  17909. }
  17910. return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
  17911. };
  17912. var write = function write(buffer, value, offset, isLE, mLen, nBytes) {
  17913. var e, m, c;
  17914. var eLen = nBytes * 8 - mLen - 1;
  17915. var eMax = (1 << eLen) - 1;
  17916. var eBias = eMax >> 1;
  17917. var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
  17918. var i = isLE ? 0 : nBytes - 1;
  17919. var d = isLE ? 1 : -1;
  17920. var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
  17921. value = Math.abs(value);
  17922. if (isNaN(value) || value === Infinity) {
  17923. m = isNaN(value) ? 1 : 0;
  17924. e = eMax;
  17925. } else {
  17926. e = Math.floor(Math.log(value) / Math.LN2);
  17927. if (value * (c = Math.pow(2, -e)) < 1) {
  17928. e--;
  17929. c *= 2;
  17930. }
  17931. if (e + eBias >= 1) {
  17932. value += rt / c;
  17933. } else {
  17934. value += rt * Math.pow(2, 1 - eBias);
  17935. }
  17936. if (value * c >= 2) {
  17937. e++;
  17938. c /= 2;
  17939. }
  17940. if (e + eBias >= eMax) {
  17941. m = 0;
  17942. e = eMax;
  17943. } else if (e + eBias >= 1) {
  17944. m = (value * c - 1) * Math.pow(2, mLen);
  17945. e = e + eBias;
  17946. } else {
  17947. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
  17948. e = 0;
  17949. }
  17950. }
  17951. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  17952. e = e << mLen | m;
  17953. eLen += mLen;
  17954. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  17955. buffer[offset + i - d] |= s * 128;
  17956. };
  17957. var ieee754 = {
  17958. read: read,
  17959. write: write
  17960. };
  17961. /*!
  17962. * The buffer module from node.js, for the browser.
  17963. *
  17964. * @author Feross Aboukhadijeh <https://feross.org>
  17965. * @license MIT
  17966. */
  17967. var buffer = createCommonjsModule(function (module, exports) {
  17968. exports.Buffer = Buffer;
  17969. exports.SlowBuffer = SlowBuffer;
  17970. exports.INSPECT_MAX_BYTES = 50;
  17971. var K_MAX_LENGTH = 0x7fffffff;
  17972. exports.kMaxLength = K_MAX_LENGTH;
  17973. Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
  17974. if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {
  17975. console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.');
  17976. }
  17977. function typedArraySupport() {
  17978. try {
  17979. var arr = new Uint8Array(1);
  17980. arr.__proto__ = {
  17981. __proto__: Uint8Array.prototype,
  17982. foo: function foo() {
  17983. return 42;
  17984. }
  17985. };
  17986. return arr.foo() === 42;
  17987. } catch (e) {
  17988. return false;
  17989. }
  17990. }
  17991. Object.defineProperty(Buffer.prototype, 'parent', {
  17992. enumerable: true,
  17993. get: function get() {
  17994. if (!Buffer.isBuffer(this)) return undefined;
  17995. return this.buffer;
  17996. }
  17997. });
  17998. Object.defineProperty(Buffer.prototype, 'offset', {
  17999. enumerable: true,
  18000. get: function get() {
  18001. if (!Buffer.isBuffer(this)) return undefined;
  18002. return this.byteOffset;
  18003. }
  18004. });
  18005. function createBuffer(length) {
  18006. if (length > K_MAX_LENGTH) {
  18007. throw new RangeError('The value "' + length + '" is invalid for option "size"');
  18008. }
  18009. var buf = new Uint8Array(length);
  18010. buf.__proto__ = Buffer.prototype;
  18011. return buf;
  18012. }
  18013. function Buffer(arg, encodingOrOffset, length) {
  18014. if (typeof arg === 'number') {
  18015. if (typeof encodingOrOffset === 'string') {
  18016. throw new TypeError('The "string" argument must be of type string. Received type number');
  18017. }
  18018. return allocUnsafe(arg);
  18019. }
  18020. return from(arg, encodingOrOffset, length);
  18021. }
  18022. if (typeof Symbol !== 'undefined' && Symbol.species != null && Buffer[Symbol.species] === Buffer) {
  18023. Object.defineProperty(Buffer, Symbol.species, {
  18024. value: null,
  18025. configurable: true,
  18026. enumerable: false,
  18027. writable: false
  18028. });
  18029. }
  18030. Buffer.poolSize = 8192;
  18031. function from(value, encodingOrOffset, length) {
  18032. if (typeof value === 'string') {
  18033. return fromString(value, encodingOrOffset);
  18034. }
  18035. if (ArrayBuffer.isView(value)) {
  18036. return fromArrayLike(value);
  18037. }
  18038. if (value == null) {
  18039. throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);
  18040. }
  18041. if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
  18042. return fromArrayBuffer(value, encodingOrOffset, length);
  18043. }
  18044. if (typeof value === 'number') {
  18045. throw new TypeError('The "value" argument must not be of type number. Received type number');
  18046. }
  18047. var valueOf = value.valueOf && value.valueOf();
  18048. if (valueOf != null && valueOf !== value) {
  18049. return Buffer.from(valueOf, encodingOrOffset, length);
  18050. }
  18051. var b = fromObject(value);
  18052. if (b) return b;
  18053. if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {
  18054. return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
  18055. }
  18056. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);
  18057. }
  18058. Buffer.from = function (value, encodingOrOffset, length) {
  18059. return from(value, encodingOrOffset, length);
  18060. };
  18061. Buffer.prototype.__proto__ = Uint8Array.prototype;
  18062. Buffer.__proto__ = Uint8Array;
  18063. function assertSize(size) {
  18064. if (typeof size !== 'number') {
  18065. throw new TypeError('"size" argument must be of type number');
  18066. } else if (size < 0) {
  18067. throw new RangeError('The value "' + size + '" is invalid for option "size"');
  18068. }
  18069. }
  18070. function alloc(size, fill, encoding) {
  18071. assertSize(size);
  18072. if (size <= 0) {
  18073. return createBuffer(size);
  18074. }
  18075. if (fill !== undefined) {
  18076. return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
  18077. }
  18078. return createBuffer(size);
  18079. }
  18080. Buffer.alloc = function (size, fill, encoding) {
  18081. return alloc(size, fill, encoding);
  18082. };
  18083. function allocUnsafe(size) {
  18084. assertSize(size);
  18085. return createBuffer(size < 0 ? 0 : checked(size) | 0);
  18086. }
  18087. Buffer.allocUnsafe = function (size) {
  18088. return allocUnsafe(size);
  18089. };
  18090. Buffer.allocUnsafeSlow = function (size) {
  18091. return allocUnsafe(size);
  18092. };
  18093. function fromString(string, encoding) {
  18094. if (typeof encoding !== 'string' || encoding === '') {
  18095. encoding = 'utf8';
  18096. }
  18097. if (!Buffer.isEncoding(encoding)) {
  18098. throw new TypeError('Unknown encoding: ' + encoding);
  18099. }
  18100. var length = byteLength(string, encoding) | 0;
  18101. var buf = createBuffer(length);
  18102. var actual = buf.write(string, encoding);
  18103. if (actual !== length) {
  18104. buf = buf.slice(0, actual);
  18105. }
  18106. return buf;
  18107. }
  18108. function fromArrayLike(array) {
  18109. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  18110. var buf = createBuffer(length);
  18111. for (var i = 0; i < length; i += 1) {
  18112. buf[i] = array[i] & 255;
  18113. }
  18114. return buf;
  18115. }
  18116. function fromArrayBuffer(array, byteOffset, length) {
  18117. if (byteOffset < 0 || array.byteLength < byteOffset) {
  18118. throw new RangeError('"offset" is outside of buffer bounds');
  18119. }
  18120. if (array.byteLength < byteOffset + (length || 0)) {
  18121. throw new RangeError('"length" is outside of buffer bounds');
  18122. }
  18123. var buf;
  18124. if (byteOffset === undefined && length === undefined) {
  18125. buf = new Uint8Array(array);
  18126. } else if (length === undefined) {
  18127. buf = new Uint8Array(array, byteOffset);
  18128. } else {
  18129. buf = new Uint8Array(array, byteOffset, length);
  18130. }
  18131. buf.__proto__ = Buffer.prototype;
  18132. return buf;
  18133. }
  18134. function fromObject(obj) {
  18135. if (Buffer.isBuffer(obj)) {
  18136. var len = checked(obj.length) | 0;
  18137. var buf = createBuffer(len);
  18138. if (buf.length === 0) {
  18139. return buf;
  18140. }
  18141. obj.copy(buf, 0, 0, len);
  18142. return buf;
  18143. }
  18144. if (obj.length !== undefined) {
  18145. if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
  18146. return createBuffer(0);
  18147. }
  18148. return fromArrayLike(obj);
  18149. }
  18150. if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
  18151. return fromArrayLike(obj.data);
  18152. }
  18153. }
  18154. function checked(length) {
  18155. if (length >= K_MAX_LENGTH) {
  18156. throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
  18157. }
  18158. return length | 0;
  18159. }
  18160. function SlowBuffer(length) {
  18161. if (+length != length) {
  18162. length = 0;
  18163. }
  18164. return Buffer.alloc(+length);
  18165. }
  18166. Buffer.isBuffer = function isBuffer(b) {
  18167. return b != null && b._isBuffer === true && b !== Buffer.prototype;
  18168. };
  18169. Buffer.compare = function compare(a, b) {
  18170. if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
  18171. if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
  18172. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  18173. throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
  18174. }
  18175. if (a === b) return 0;
  18176. var x = a.length;
  18177. var y = b.length;
  18178. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  18179. if (a[i] !== b[i]) {
  18180. x = a[i];
  18181. y = b[i];
  18182. break;
  18183. }
  18184. }
  18185. if (x < y) return -1;
  18186. if (y < x) return 1;
  18187. return 0;
  18188. };
  18189. Buffer.isEncoding = function isEncoding(encoding) {
  18190. switch (String(encoding).toLowerCase()) {
  18191. case 'hex':
  18192. case 'utf8':
  18193. case 'utf-8':
  18194. case 'ascii':
  18195. case 'latin1':
  18196. case 'binary':
  18197. case 'base64':
  18198. case 'ucs2':
  18199. case 'ucs-2':
  18200. case 'utf16le':
  18201. case 'utf-16le':
  18202. return true;
  18203. default:
  18204. return false;
  18205. }
  18206. };
  18207. Buffer.concat = function concat(list, length) {
  18208. if (!Array.isArray(list)) {
  18209. throw new TypeError('"list" argument must be an Array of Buffers');
  18210. }
  18211. if (list.length === 0) {
  18212. return Buffer.alloc(0);
  18213. }
  18214. var i;
  18215. if (length === undefined) {
  18216. length = 0;
  18217. for (i = 0; i < list.length; ++i) {
  18218. length += list[i].length;
  18219. }
  18220. }
  18221. var buffer = Buffer.allocUnsafe(length);
  18222. var pos = 0;
  18223. for (i = 0; i < list.length; ++i) {
  18224. var buf = list[i];
  18225. if (isInstance(buf, Uint8Array)) {
  18226. buf = Buffer.from(buf);
  18227. }
  18228. if (!Buffer.isBuffer(buf)) {
  18229. throw new TypeError('"list" argument must be an Array of Buffers');
  18230. }
  18231. buf.copy(buffer, pos);
  18232. pos += buf.length;
  18233. }
  18234. return buffer;
  18235. };
  18236. function byteLength(string, encoding) {
  18237. if (Buffer.isBuffer(string)) {
  18238. return string.length;
  18239. }
  18240. if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
  18241. return string.byteLength;
  18242. }
  18243. if (typeof string !== 'string') {
  18244. throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string);
  18245. }
  18246. var len = string.length;
  18247. var mustMatch = arguments.length > 2 && arguments[2] === true;
  18248. if (!mustMatch && len === 0) return 0;
  18249. var loweredCase = false;
  18250. for (;;) {
  18251. switch (encoding) {
  18252. case 'ascii':
  18253. case 'latin1':
  18254. case 'binary':
  18255. return len;
  18256. case 'utf8':
  18257. case 'utf-8':
  18258. return utf8ToBytes(string).length;
  18259. case 'ucs2':
  18260. case 'ucs-2':
  18261. case 'utf16le':
  18262. case 'utf-16le':
  18263. return len * 2;
  18264. case 'hex':
  18265. return len >>> 1;
  18266. case 'base64':
  18267. return base64ToBytes(string).length;
  18268. default:
  18269. if (loweredCase) {
  18270. return mustMatch ? -1 : utf8ToBytes(string).length;
  18271. }
  18272. encoding = ('' + encoding).toLowerCase();
  18273. loweredCase = true;
  18274. }
  18275. }
  18276. }
  18277. Buffer.byteLength = byteLength;
  18278. function slowToString(encoding, start, end) {
  18279. var loweredCase = false;
  18280. if (start === undefined || start < 0) {
  18281. start = 0;
  18282. }
  18283. if (start > this.length) {
  18284. return '';
  18285. }
  18286. if (end === undefined || end > this.length) {
  18287. end = this.length;
  18288. }
  18289. if (end <= 0) {
  18290. return '';
  18291. }
  18292. end >>>= 0;
  18293. start >>>= 0;
  18294. if (end <= start) {
  18295. return '';
  18296. }
  18297. if (!encoding) encoding = 'utf8';
  18298. while (true) {
  18299. switch (encoding) {
  18300. case 'hex':
  18301. return hexSlice(this, start, end);
  18302. case 'utf8':
  18303. case 'utf-8':
  18304. return utf8Slice(this, start, end);
  18305. case 'ascii':
  18306. return asciiSlice(this, start, end);
  18307. case 'latin1':
  18308. case 'binary':
  18309. return latin1Slice(this, start, end);
  18310. case 'base64':
  18311. return base64Slice(this, start, end);
  18312. case 'ucs2':
  18313. case 'ucs-2':
  18314. case 'utf16le':
  18315. case 'utf-16le':
  18316. return utf16leSlice(this, start, end);
  18317. default:
  18318. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  18319. encoding = (encoding + '').toLowerCase();
  18320. loweredCase = true;
  18321. }
  18322. }
  18323. }
  18324. Buffer.prototype._isBuffer = true;
  18325. function swap(b, n, m) {
  18326. var i = b[n];
  18327. b[n] = b[m];
  18328. b[m] = i;
  18329. }
  18330. Buffer.prototype.swap16 = function swap16() {
  18331. var len = this.length;
  18332. if (len % 2 !== 0) {
  18333. throw new RangeError('Buffer size must be a multiple of 16-bits');
  18334. }
  18335. for (var i = 0; i < len; i += 2) {
  18336. swap(this, i, i + 1);
  18337. }
  18338. return this;
  18339. };
  18340. Buffer.prototype.swap32 = function swap32() {
  18341. var len = this.length;
  18342. if (len % 4 !== 0) {
  18343. throw new RangeError('Buffer size must be a multiple of 32-bits');
  18344. }
  18345. for (var i = 0; i < len; i += 4) {
  18346. swap(this, i, i + 3);
  18347. swap(this, i + 1, i + 2);
  18348. }
  18349. return this;
  18350. };
  18351. Buffer.prototype.swap64 = function swap64() {
  18352. var len = this.length;
  18353. if (len % 8 !== 0) {
  18354. throw new RangeError('Buffer size must be a multiple of 64-bits');
  18355. }
  18356. for (var i = 0; i < len; i += 8) {
  18357. swap(this, i, i + 7);
  18358. swap(this, i + 1, i + 6);
  18359. swap(this, i + 2, i + 5);
  18360. swap(this, i + 3, i + 4);
  18361. }
  18362. return this;
  18363. };
  18364. Buffer.prototype.toString = function toString() {
  18365. var length = this.length;
  18366. if (length === 0) return '';
  18367. if (arguments.length === 0) return utf8Slice(this, 0, length);
  18368. return slowToString.apply(this, arguments);
  18369. };
  18370. Buffer.prototype.toLocaleString = Buffer.prototype.toString;
  18371. Buffer.prototype.equals = function equals(b) {
  18372. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
  18373. if (this === b) return true;
  18374. return Buffer.compare(this, b) === 0;
  18375. };
  18376. Buffer.prototype.inspect = function inspect() {
  18377. var str = '';
  18378. var max = exports.INSPECT_MAX_BYTES;
  18379. str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
  18380. if (this.length > max) str += ' ... ';
  18381. return '<Buffer ' + str + '>';
  18382. };
  18383. Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  18384. if (isInstance(target, Uint8Array)) {
  18385. target = Buffer.from(target, target.offset, target.byteLength);
  18386. }
  18387. if (!Buffer.isBuffer(target)) {
  18388. throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target);
  18389. }
  18390. if (start === undefined) {
  18391. start = 0;
  18392. }
  18393. if (end === undefined) {
  18394. end = target ? target.length : 0;
  18395. }
  18396. if (thisStart === undefined) {
  18397. thisStart = 0;
  18398. }
  18399. if (thisEnd === undefined) {
  18400. thisEnd = this.length;
  18401. }
  18402. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  18403. throw new RangeError('out of range index');
  18404. }
  18405. if (thisStart >= thisEnd && start >= end) {
  18406. return 0;
  18407. }
  18408. if (thisStart >= thisEnd) {
  18409. return -1;
  18410. }
  18411. if (start >= end) {
  18412. return 1;
  18413. }
  18414. start >>>= 0;
  18415. end >>>= 0;
  18416. thisStart >>>= 0;
  18417. thisEnd >>>= 0;
  18418. if (this === target) return 0;
  18419. var x = thisEnd - thisStart;
  18420. var y = end - start;
  18421. var len = Math.min(x, y);
  18422. var thisCopy = this.slice(thisStart, thisEnd);
  18423. var targetCopy = target.slice(start, end);
  18424. for (var i = 0; i < len; ++i) {
  18425. if (thisCopy[i] !== targetCopy[i]) {
  18426. x = thisCopy[i];
  18427. y = targetCopy[i];
  18428. break;
  18429. }
  18430. }
  18431. if (x < y) return -1;
  18432. if (y < x) return 1;
  18433. return 0;
  18434. };
  18435. function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  18436. if (buffer.length === 0) return -1;
  18437. if (typeof byteOffset === 'string') {
  18438. encoding = byteOffset;
  18439. byteOffset = 0;
  18440. } else if (byteOffset > 0x7fffffff) {
  18441. byteOffset = 0x7fffffff;
  18442. } else if (byteOffset < -0x80000000) {
  18443. byteOffset = -0x80000000;
  18444. }
  18445. byteOffset = +byteOffset;
  18446. if (numberIsNaN(byteOffset)) {
  18447. byteOffset = dir ? 0 : buffer.length - 1;
  18448. }
  18449. if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  18450. if (byteOffset >= buffer.length) {
  18451. if (dir) return -1;else byteOffset = buffer.length - 1;
  18452. } else if (byteOffset < 0) {
  18453. if (dir) byteOffset = 0;else return -1;
  18454. }
  18455. if (typeof val === 'string') {
  18456. val = Buffer.from(val, encoding);
  18457. }
  18458. if (Buffer.isBuffer(val)) {
  18459. if (val.length === 0) {
  18460. return -1;
  18461. }
  18462. return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  18463. } else if (typeof val === 'number') {
  18464. val = val & 0xFF;
  18465. if (typeof Uint8Array.prototype.indexOf === 'function') {
  18466. if (dir) {
  18467. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
  18468. } else {
  18469. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
  18470. }
  18471. }
  18472. return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  18473. }
  18474. throw new TypeError('val must be string, number or Buffer');
  18475. }
  18476. function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  18477. var indexSize = 1;
  18478. var arrLength = arr.length;
  18479. var valLength = val.length;
  18480. if (encoding !== undefined) {
  18481. encoding = String(encoding).toLowerCase();
  18482. if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
  18483. if (arr.length < 2 || val.length < 2) {
  18484. return -1;
  18485. }
  18486. indexSize = 2;
  18487. arrLength /= 2;
  18488. valLength /= 2;
  18489. byteOffset /= 2;
  18490. }
  18491. }
  18492. function read(buf, i) {
  18493. if (indexSize === 1) {
  18494. return buf[i];
  18495. } else {
  18496. return buf.readUInt16BE(i * indexSize);
  18497. }
  18498. }
  18499. var i;
  18500. if (dir) {
  18501. var foundIndex = -1;
  18502. for (i = byteOffset; i < arrLength; i++) {
  18503. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  18504. if (foundIndex === -1) foundIndex = i;
  18505. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
  18506. } else {
  18507. if (foundIndex !== -1) i -= i - foundIndex;
  18508. foundIndex = -1;
  18509. }
  18510. }
  18511. } else {
  18512. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
  18513. for (i = byteOffset; i >= 0; i--) {
  18514. var found = true;
  18515. for (var j = 0; j < valLength; j++) {
  18516. if (read(arr, i + j) !== read(val, j)) {
  18517. found = false;
  18518. break;
  18519. }
  18520. }
  18521. if (found) return i;
  18522. }
  18523. }
  18524. return -1;
  18525. }
  18526. Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
  18527. return this.indexOf(val, byteOffset, encoding) !== -1;
  18528. };
  18529. Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  18530. return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
  18531. };
  18532. Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  18533. return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
  18534. };
  18535. function hexWrite(buf, string, offset, length) {
  18536. offset = Number(offset) || 0;
  18537. var remaining = buf.length - offset;
  18538. if (!length) {
  18539. length = remaining;
  18540. } else {
  18541. length = Number(length);
  18542. if (length > remaining) {
  18543. length = remaining;
  18544. }
  18545. }
  18546. var strLen = string.length;
  18547. if (length > strLen / 2) {
  18548. length = strLen / 2;
  18549. }
  18550. for (var i = 0; i < length; ++i) {
  18551. var parsed = parseInt(string.substr(i * 2, 2), 16);
  18552. if (numberIsNaN(parsed)) return i;
  18553. buf[offset + i] = parsed;
  18554. }
  18555. return i;
  18556. }
  18557. function utf8Write(buf, string, offset, length) {
  18558. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  18559. }
  18560. function asciiWrite(buf, string, offset, length) {
  18561. return blitBuffer(asciiToBytes(string), buf, offset, length);
  18562. }
  18563. function latin1Write(buf, string, offset, length) {
  18564. return asciiWrite(buf, string, offset, length);
  18565. }
  18566. function base64Write(buf, string, offset, length) {
  18567. return blitBuffer(base64ToBytes(string), buf, offset, length);
  18568. }
  18569. function ucs2Write(buf, string, offset, length) {
  18570. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
  18571. }
  18572. Buffer.prototype.write = function write(string, offset, length, encoding) {
  18573. if (offset === undefined) {
  18574. encoding = 'utf8';
  18575. length = this.length;
  18576. offset = 0;
  18577. } else if (length === undefined && typeof offset === 'string') {
  18578. encoding = offset;
  18579. length = this.length;
  18580. offset = 0;
  18581. } else if (isFinite(offset)) {
  18582. offset = offset >>> 0;
  18583. if (isFinite(length)) {
  18584. length = length >>> 0;
  18585. if (encoding === undefined) encoding = 'utf8';
  18586. } else {
  18587. encoding = length;
  18588. length = undefined;
  18589. }
  18590. } else {
  18591. throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  18592. }
  18593. var remaining = this.length - offset;
  18594. if (length === undefined || length > remaining) length = remaining;
  18595. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  18596. throw new RangeError('Attempt to write outside buffer bounds');
  18597. }
  18598. if (!encoding) encoding = 'utf8';
  18599. var loweredCase = false;
  18600. for (;;) {
  18601. switch (encoding) {
  18602. case 'hex':
  18603. return hexWrite(this, string, offset, length);
  18604. case 'utf8':
  18605. case 'utf-8':
  18606. return utf8Write(this, string, offset, length);
  18607. case 'ascii':
  18608. return asciiWrite(this, string, offset, length);
  18609. case 'latin1':
  18610. case 'binary':
  18611. return latin1Write(this, string, offset, length);
  18612. case 'base64':
  18613. return base64Write(this, string, offset, length);
  18614. case 'ucs2':
  18615. case 'ucs-2':
  18616. case 'utf16le':
  18617. case 'utf-16le':
  18618. return ucs2Write(this, string, offset, length);
  18619. default:
  18620. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  18621. encoding = ('' + encoding).toLowerCase();
  18622. loweredCase = true;
  18623. }
  18624. }
  18625. };
  18626. Buffer.prototype.toJSON = function toJSON() {
  18627. return {
  18628. type: 'Buffer',
  18629. data: Array.prototype.slice.call(this._arr || this, 0)
  18630. };
  18631. };
  18632. function base64Slice(buf, start, end) {
  18633. if (start === 0 && end === buf.length) {
  18634. return base64Js.fromByteArray(buf);
  18635. } else {
  18636. return base64Js.fromByteArray(buf.slice(start, end));
  18637. }
  18638. }
  18639. function utf8Slice(buf, start, end) {
  18640. end = Math.min(buf.length, end);
  18641. var res = [];
  18642. var i = start;
  18643. while (i < end) {
  18644. var firstByte = buf[i];
  18645. var codePoint = null;
  18646. var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
  18647. if (i + bytesPerSequence <= end) {
  18648. var secondByte, thirdByte, fourthByte, tempCodePoint;
  18649. switch (bytesPerSequence) {
  18650. case 1:
  18651. if (firstByte < 0x80) {
  18652. codePoint = firstByte;
  18653. }
  18654. break;
  18655. case 2:
  18656. secondByte = buf[i + 1];
  18657. if ((secondByte & 0xC0) === 0x80) {
  18658. tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
  18659. if (tempCodePoint > 0x7F) {
  18660. codePoint = tempCodePoint;
  18661. }
  18662. }
  18663. break;
  18664. case 3:
  18665. secondByte = buf[i + 1];
  18666. thirdByte = buf[i + 2];
  18667. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  18668. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
  18669. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  18670. codePoint = tempCodePoint;
  18671. }
  18672. }
  18673. break;
  18674. case 4:
  18675. secondByte = buf[i + 1];
  18676. thirdByte = buf[i + 2];
  18677. fourthByte = buf[i + 3];
  18678. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  18679. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
  18680. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  18681. codePoint = tempCodePoint;
  18682. }
  18683. }
  18684. }
  18685. }
  18686. if (codePoint === null) {
  18687. codePoint = 0xFFFD;
  18688. bytesPerSequence = 1;
  18689. } else if (codePoint > 0xFFFF) {
  18690. codePoint -= 0x10000;
  18691. res.push(codePoint >>> 10 & 0x3FF | 0xD800);
  18692. codePoint = 0xDC00 | codePoint & 0x3FF;
  18693. }
  18694. res.push(codePoint);
  18695. i += bytesPerSequence;
  18696. }
  18697. return decodeCodePointsArray(res);
  18698. }
  18699. var MAX_ARGUMENTS_LENGTH = 0x1000;
  18700. function decodeCodePointsArray(codePoints) {
  18701. var len = codePoints.length;
  18702. if (len <= MAX_ARGUMENTS_LENGTH) {
  18703. return String.fromCharCode.apply(String, codePoints);
  18704. }
  18705. var res = '';
  18706. var i = 0;
  18707. while (i < len) {
  18708. res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  18709. }
  18710. return res;
  18711. }
  18712. function asciiSlice(buf, start, end) {
  18713. var ret = '';
  18714. end = Math.min(buf.length, end);
  18715. for (var i = start; i < end; ++i) {
  18716. ret += String.fromCharCode(buf[i] & 0x7F);
  18717. }
  18718. return ret;
  18719. }
  18720. function latin1Slice(buf, start, end) {
  18721. var ret = '';
  18722. end = Math.min(buf.length, end);
  18723. for (var i = start; i < end; ++i) {
  18724. ret += String.fromCharCode(buf[i]);
  18725. }
  18726. return ret;
  18727. }
  18728. function hexSlice(buf, start, end) {
  18729. var len = buf.length;
  18730. if (!start || start < 0) start = 0;
  18731. if (!end || end < 0 || end > len) end = len;
  18732. var out = '';
  18733. for (var i = start; i < end; ++i) {
  18734. out += toHex(buf[i]);
  18735. }
  18736. return out;
  18737. }
  18738. function utf16leSlice(buf, start, end) {
  18739. var bytes = buf.slice(start, end);
  18740. var res = '';
  18741. for (var i = 0; i < bytes.length; i += 2) {
  18742. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  18743. }
  18744. return res;
  18745. }
  18746. Buffer.prototype.slice = function slice(start, end) {
  18747. var len = this.length;
  18748. start = ~~start;
  18749. end = end === undefined ? len : ~~end;
  18750. if (start < 0) {
  18751. start += len;
  18752. if (start < 0) start = 0;
  18753. } else if (start > len) {
  18754. start = len;
  18755. }
  18756. if (end < 0) {
  18757. end += len;
  18758. if (end < 0) end = 0;
  18759. } else if (end > len) {
  18760. end = len;
  18761. }
  18762. if (end < start) end = start;
  18763. var newBuf = this.subarray(start, end);
  18764. newBuf.__proto__ = Buffer.prototype;
  18765. return newBuf;
  18766. };
  18767. function checkOffset(offset, ext, length) {
  18768. if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  18769. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
  18770. }
  18771. Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  18772. offset = offset >>> 0;
  18773. byteLength = byteLength >>> 0;
  18774. if (!noAssert) checkOffset(offset, byteLength, this.length);
  18775. var val = this[offset];
  18776. var mul = 1;
  18777. var i = 0;
  18778. while (++i < byteLength && (mul *= 0x100)) {
  18779. val += this[offset + i] * mul;
  18780. }
  18781. return val;
  18782. };
  18783. Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  18784. offset = offset >>> 0;
  18785. byteLength = byteLength >>> 0;
  18786. if (!noAssert) {
  18787. checkOffset(offset, byteLength, this.length);
  18788. }
  18789. var val = this[offset + --byteLength];
  18790. var mul = 1;
  18791. while (byteLength > 0 && (mul *= 0x100)) {
  18792. val += this[offset + --byteLength] * mul;
  18793. }
  18794. return val;
  18795. };
  18796. Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  18797. offset = offset >>> 0;
  18798. if (!noAssert) checkOffset(offset, 1, this.length);
  18799. return this[offset];
  18800. };
  18801. Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  18802. offset = offset >>> 0;
  18803. if (!noAssert) checkOffset(offset, 2, this.length);
  18804. return this[offset] | this[offset + 1] << 8;
  18805. };
  18806. Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  18807. offset = offset >>> 0;
  18808. if (!noAssert) checkOffset(offset, 2, this.length);
  18809. return this[offset] << 8 | this[offset + 1];
  18810. };
  18811. Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  18812. offset = offset >>> 0;
  18813. if (!noAssert) checkOffset(offset, 4, this.length);
  18814. return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
  18815. };
  18816. Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  18817. offset = offset >>> 0;
  18818. if (!noAssert) checkOffset(offset, 4, this.length);
  18819. return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
  18820. };
  18821. Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  18822. offset = offset >>> 0;
  18823. byteLength = byteLength >>> 0;
  18824. if (!noAssert) checkOffset(offset, byteLength, this.length);
  18825. var val = this[offset];
  18826. var mul = 1;
  18827. var i = 0;
  18828. while (++i < byteLength && (mul *= 0x100)) {
  18829. val += this[offset + i] * mul;
  18830. }
  18831. mul *= 0x80;
  18832. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  18833. return val;
  18834. };
  18835. Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  18836. offset = offset >>> 0;
  18837. byteLength = byteLength >>> 0;
  18838. if (!noAssert) checkOffset(offset, byteLength, this.length);
  18839. var i = byteLength;
  18840. var mul = 1;
  18841. var val = this[offset + --i];
  18842. while (i > 0 && (mul *= 0x100)) {
  18843. val += this[offset + --i] * mul;
  18844. }
  18845. mul *= 0x80;
  18846. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  18847. return val;
  18848. };
  18849. Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
  18850. offset = offset >>> 0;
  18851. if (!noAssert) checkOffset(offset, 1, this.length);
  18852. if (!(this[offset] & 0x80)) return this[offset];
  18853. return (0xff - this[offset] + 1) * -1;
  18854. };
  18855. Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  18856. offset = offset >>> 0;
  18857. if (!noAssert) checkOffset(offset, 2, this.length);
  18858. var val = this[offset] | this[offset + 1] << 8;
  18859. return val & 0x8000 ? val | 0xFFFF0000 : val;
  18860. };
  18861. Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  18862. offset = offset >>> 0;
  18863. if (!noAssert) checkOffset(offset, 2, this.length);
  18864. var val = this[offset + 1] | this[offset] << 8;
  18865. return val & 0x8000 ? val | 0xFFFF0000 : val;
  18866. };
  18867. Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  18868. offset = offset >>> 0;
  18869. if (!noAssert) checkOffset(offset, 4, this.length);
  18870. return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
  18871. };
  18872. Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  18873. offset = offset >>> 0;
  18874. if (!noAssert) checkOffset(offset, 4, this.length);
  18875. return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
  18876. };
  18877. Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  18878. offset = offset >>> 0;
  18879. if (!noAssert) checkOffset(offset, 4, this.length);
  18880. return ieee754.read(this, offset, true, 23, 4);
  18881. };
  18882. Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  18883. offset = offset >>> 0;
  18884. if (!noAssert) checkOffset(offset, 4, this.length);
  18885. return ieee754.read(this, offset, false, 23, 4);
  18886. };
  18887. Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  18888. offset = offset >>> 0;
  18889. if (!noAssert) checkOffset(offset, 8, this.length);
  18890. return ieee754.read(this, offset, true, 52, 8);
  18891. };
  18892. Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  18893. offset = offset >>> 0;
  18894. if (!noAssert) checkOffset(offset, 8, this.length);
  18895. return ieee754.read(this, offset, false, 52, 8);
  18896. };
  18897. function checkInt(buf, value, offset, ext, max, min) {
  18898. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  18899. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  18900. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  18901. }
  18902. Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  18903. value = +value;
  18904. offset = offset >>> 0;
  18905. byteLength = byteLength >>> 0;
  18906. if (!noAssert) {
  18907. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  18908. checkInt(this, value, offset, byteLength, maxBytes, 0);
  18909. }
  18910. var mul = 1;
  18911. var i = 0;
  18912. this[offset] = value & 0xFF;
  18913. while (++i < byteLength && (mul *= 0x100)) {
  18914. this[offset + i] = value / mul & 0xFF;
  18915. }
  18916. return offset + byteLength;
  18917. };
  18918. Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  18919. value = +value;
  18920. offset = offset >>> 0;
  18921. byteLength = byteLength >>> 0;
  18922. if (!noAssert) {
  18923. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  18924. checkInt(this, value, offset, byteLength, maxBytes, 0);
  18925. }
  18926. var i = byteLength - 1;
  18927. var mul = 1;
  18928. this[offset + i] = value & 0xFF;
  18929. while (--i >= 0 && (mul *= 0x100)) {
  18930. this[offset + i] = value / mul & 0xFF;
  18931. }
  18932. return offset + byteLength;
  18933. };
  18934. Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  18935. value = +value;
  18936. offset = offset >>> 0;
  18937. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  18938. this[offset] = value & 0xff;
  18939. return offset + 1;
  18940. };
  18941. Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  18942. value = +value;
  18943. offset = offset >>> 0;
  18944. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  18945. this[offset] = value & 0xff;
  18946. this[offset + 1] = value >>> 8;
  18947. return offset + 2;
  18948. };
  18949. Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  18950. value = +value;
  18951. offset = offset >>> 0;
  18952. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  18953. this[offset] = value >>> 8;
  18954. this[offset + 1] = value & 0xff;
  18955. return offset + 2;
  18956. };
  18957. Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  18958. value = +value;
  18959. offset = offset >>> 0;
  18960. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  18961. this[offset + 3] = value >>> 24;
  18962. this[offset + 2] = value >>> 16;
  18963. this[offset + 1] = value >>> 8;
  18964. this[offset] = value & 0xff;
  18965. return offset + 4;
  18966. };
  18967. Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  18968. value = +value;
  18969. offset = offset >>> 0;
  18970. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  18971. this[offset] = value >>> 24;
  18972. this[offset + 1] = value >>> 16;
  18973. this[offset + 2] = value >>> 8;
  18974. this[offset + 3] = value & 0xff;
  18975. return offset + 4;
  18976. };
  18977. Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  18978. value = +value;
  18979. offset = offset >>> 0;
  18980. if (!noAssert) {
  18981. var limit = Math.pow(2, 8 * byteLength - 1);
  18982. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  18983. }
  18984. var i = 0;
  18985. var mul = 1;
  18986. var sub = 0;
  18987. this[offset] = value & 0xFF;
  18988. while (++i < byteLength && (mul *= 0x100)) {
  18989. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  18990. sub = 1;
  18991. }
  18992. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  18993. }
  18994. return offset + byteLength;
  18995. };
  18996. Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  18997. value = +value;
  18998. offset = offset >>> 0;
  18999. if (!noAssert) {
  19000. var limit = Math.pow(2, 8 * byteLength - 1);
  19001. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  19002. }
  19003. var i = byteLength - 1;
  19004. var mul = 1;
  19005. var sub = 0;
  19006. this[offset + i] = value & 0xFF;
  19007. while (--i >= 0 && (mul *= 0x100)) {
  19008. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  19009. sub = 1;
  19010. }
  19011. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  19012. }
  19013. return offset + byteLength;
  19014. };
  19015. Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  19016. value = +value;
  19017. offset = offset >>> 0;
  19018. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  19019. if (value < 0) value = 0xff + value + 1;
  19020. this[offset] = value & 0xff;
  19021. return offset + 1;
  19022. };
  19023. Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  19024. value = +value;
  19025. offset = offset >>> 0;
  19026. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  19027. this[offset] = value & 0xff;
  19028. this[offset + 1] = value >>> 8;
  19029. return offset + 2;
  19030. };
  19031. Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  19032. value = +value;
  19033. offset = offset >>> 0;
  19034. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  19035. this[offset] = value >>> 8;
  19036. this[offset + 1] = value & 0xff;
  19037. return offset + 2;
  19038. };
  19039. Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  19040. value = +value;
  19041. offset = offset >>> 0;
  19042. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  19043. this[offset] = value & 0xff;
  19044. this[offset + 1] = value >>> 8;
  19045. this[offset + 2] = value >>> 16;
  19046. this[offset + 3] = value >>> 24;
  19047. return offset + 4;
  19048. };
  19049. Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  19050. value = +value;
  19051. offset = offset >>> 0;
  19052. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  19053. if (value < 0) value = 0xffffffff + value + 1;
  19054. this[offset] = value >>> 24;
  19055. this[offset + 1] = value >>> 16;
  19056. this[offset + 2] = value >>> 8;
  19057. this[offset + 3] = value & 0xff;
  19058. return offset + 4;
  19059. };
  19060. function checkIEEE754(buf, value, offset, ext, max, min) {
  19061. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  19062. if (offset < 0) throw new RangeError('Index out of range');
  19063. }
  19064. function writeFloat(buf, value, offset, littleEndian, noAssert) {
  19065. value = +value;
  19066. offset = offset >>> 0;
  19067. if (!noAssert) {
  19068. checkIEEE754(buf, value, offset, 4);
  19069. }
  19070. ieee754.write(buf, value, offset, littleEndian, 23, 4);
  19071. return offset + 4;
  19072. }
  19073. Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  19074. return writeFloat(this, value, offset, true, noAssert);
  19075. };
  19076. Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  19077. return writeFloat(this, value, offset, false, noAssert);
  19078. };
  19079. function writeDouble(buf, value, offset, littleEndian, noAssert) {
  19080. value = +value;
  19081. offset = offset >>> 0;
  19082. if (!noAssert) {
  19083. checkIEEE754(buf, value, offset, 8);
  19084. }
  19085. ieee754.write(buf, value, offset, littleEndian, 52, 8);
  19086. return offset + 8;
  19087. }
  19088. Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  19089. return writeDouble(this, value, offset, true, noAssert);
  19090. };
  19091. Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  19092. return writeDouble(this, value, offset, false, noAssert);
  19093. };
  19094. Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  19095. if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
  19096. if (!start) start = 0;
  19097. if (!end && end !== 0) end = this.length;
  19098. if (targetStart >= target.length) targetStart = target.length;
  19099. if (!targetStart) targetStart = 0;
  19100. if (end > 0 && end < start) end = start;
  19101. if (end === start) return 0;
  19102. if (target.length === 0 || this.length === 0) return 0;
  19103. if (targetStart < 0) {
  19104. throw new RangeError('targetStart out of bounds');
  19105. }
  19106. if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
  19107. if (end < 0) throw new RangeError('sourceEnd out of bounds');
  19108. if (end > this.length) end = this.length;
  19109. if (target.length - targetStart < end - start) {
  19110. end = target.length - targetStart + start;
  19111. }
  19112. var len = end - start;
  19113. if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
  19114. this.copyWithin(targetStart, start, end);
  19115. } else if (this === target && start < targetStart && targetStart < end) {
  19116. for (var i = len - 1; i >= 0; --i) {
  19117. target[i + targetStart] = this[i + start];
  19118. }
  19119. } else {
  19120. Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
  19121. }
  19122. return len;
  19123. };
  19124. Buffer.prototype.fill = function fill(val, start, end, encoding) {
  19125. if (typeof val === 'string') {
  19126. if (typeof start === 'string') {
  19127. encoding = start;
  19128. start = 0;
  19129. end = this.length;
  19130. } else if (typeof end === 'string') {
  19131. encoding = end;
  19132. end = this.length;
  19133. }
  19134. if (encoding !== undefined && typeof encoding !== 'string') {
  19135. throw new TypeError('encoding must be a string');
  19136. }
  19137. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  19138. throw new TypeError('Unknown encoding: ' + encoding);
  19139. }
  19140. if (val.length === 1) {
  19141. var code = val.charCodeAt(0);
  19142. if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {
  19143. val = code;
  19144. }
  19145. }
  19146. } else if (typeof val === 'number') {
  19147. val = val & 255;
  19148. }
  19149. if (start < 0 || this.length < start || this.length < end) {
  19150. throw new RangeError('Out of range index');
  19151. }
  19152. if (end <= start) {
  19153. return this;
  19154. }
  19155. start = start >>> 0;
  19156. end = end === undefined ? this.length : end >>> 0;
  19157. if (!val) val = 0;
  19158. var i;
  19159. if (typeof val === 'number') {
  19160. for (i = start; i < end; ++i) {
  19161. this[i] = val;
  19162. }
  19163. } else {
  19164. var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
  19165. var len = bytes.length;
  19166. if (len === 0) {
  19167. throw new TypeError('The value "' + val + '" is invalid for argument "value"');
  19168. }
  19169. for (i = 0; i < end - start; ++i) {
  19170. this[i + start] = bytes[i % len];
  19171. }
  19172. }
  19173. return this;
  19174. };
  19175. var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
  19176. function base64clean(str) {
  19177. str = str.split('=')[0];
  19178. str = str.trim().replace(INVALID_BASE64_RE, '');
  19179. if (str.length < 2) return '';
  19180. while (str.length % 4 !== 0) {
  19181. str = str + '=';
  19182. }
  19183. return str;
  19184. }
  19185. function toHex(n) {
  19186. if (n < 16) return '0' + n.toString(16);
  19187. return n.toString(16);
  19188. }
  19189. function utf8ToBytes(string, units) {
  19190. units = units || Infinity;
  19191. var codePoint;
  19192. var length = string.length;
  19193. var leadSurrogate = null;
  19194. var bytes = [];
  19195. for (var i = 0; i < length; ++i) {
  19196. codePoint = string.charCodeAt(i);
  19197. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  19198. if (!leadSurrogate) {
  19199. if (codePoint > 0xDBFF) {
  19200. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  19201. continue;
  19202. } else if (i + 1 === length) {
  19203. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  19204. continue;
  19205. }
  19206. leadSurrogate = codePoint;
  19207. continue;
  19208. }
  19209. if (codePoint < 0xDC00) {
  19210. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  19211. leadSurrogate = codePoint;
  19212. continue;
  19213. }
  19214. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  19215. } else if (leadSurrogate) {
  19216. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  19217. }
  19218. leadSurrogate = null;
  19219. if (codePoint < 0x80) {
  19220. if ((units -= 1) < 0) break;
  19221. bytes.push(codePoint);
  19222. } else if (codePoint < 0x800) {
  19223. if ((units -= 2) < 0) break;
  19224. bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
  19225. } else if (codePoint < 0x10000) {
  19226. if ((units -= 3) < 0) break;
  19227. bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  19228. } else if (codePoint < 0x110000) {
  19229. if ((units -= 4) < 0) break;
  19230. bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  19231. } else {
  19232. throw new Error('Invalid code point');
  19233. }
  19234. }
  19235. return bytes;
  19236. }
  19237. function asciiToBytes(str) {
  19238. var byteArray = [];
  19239. for (var i = 0; i < str.length; ++i) {
  19240. byteArray.push(str.charCodeAt(i) & 0xFF);
  19241. }
  19242. return byteArray;
  19243. }
  19244. function utf16leToBytes(str, units) {
  19245. var c, hi, lo;
  19246. var byteArray = [];
  19247. for (var i = 0; i < str.length; ++i) {
  19248. if ((units -= 2) < 0) break;
  19249. c = str.charCodeAt(i);
  19250. hi = c >> 8;
  19251. lo = c % 256;
  19252. byteArray.push(lo);
  19253. byteArray.push(hi);
  19254. }
  19255. return byteArray;
  19256. }
  19257. function base64ToBytes(str) {
  19258. return base64Js.toByteArray(base64clean(str));
  19259. }
  19260. function blitBuffer(src, dst, offset, length) {
  19261. for (var i = 0; i < length; ++i) {
  19262. if (i + offset >= dst.length || i >= src.length) break;
  19263. dst[i + offset] = src[i];
  19264. }
  19265. return i;
  19266. }
  19267. function isInstance(obj, type) {
  19268. return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
  19269. }
  19270. function numberIsNaN(obj) {
  19271. return obj !== obj;
  19272. }
  19273. }, "/$$rollup_base$$/node_modules/buffer");
  19274. var object = {};
  19275. var hasOwnProperty$2 = object.hasOwnProperty;
  19276. var forOwn = function forOwn(object, callback) {
  19277. for (var key in object) {
  19278. if (hasOwnProperty$2.call(object, key)) {
  19279. callback(key, object[key]);
  19280. }
  19281. }
  19282. };
  19283. var extend = function extend(destination, source) {
  19284. if (!source) {
  19285. return destination;
  19286. }
  19287. forOwn(source, function (key, value) {
  19288. destination[key] = value;
  19289. });
  19290. return destination;
  19291. };
  19292. var forEach = function forEach(array, callback) {
  19293. var length = array.length;
  19294. var index = -1;
  19295. while (++index < length) {
  19296. callback(array[index]);
  19297. }
  19298. };
  19299. var toString = object.toString;
  19300. var isArray$1 = Array.isArray;
  19301. var isBuffer = buffer.Buffer.isBuffer;
  19302. var isObject = function isObject(value) {
  19303. return toString.call(value) == '[object Object]';
  19304. };
  19305. var isString = function isString(value) {
  19306. return typeof value == 'string' || toString.call(value) == '[object String]';
  19307. };
  19308. var isNumber = function isNumber(value) {
  19309. return typeof value == 'number' || toString.call(value) == '[object Number]';
  19310. };
  19311. var isFunction = function isFunction(value) {
  19312. return typeof value == 'function';
  19313. };
  19314. var isMap = function isMap(value) {
  19315. return toString.call(value) == '[object Map]';
  19316. };
  19317. var isSet = function isSet(value) {
  19318. return toString.call(value) == '[object Set]';
  19319. };
  19320. var singleEscapes = {
  19321. '"': '\\"',
  19322. '\'': '\\\'',
  19323. '\\': '\\\\',
  19324. '\b': '\\b',
  19325. '\f': '\\f',
  19326. '\n': '\\n',
  19327. '\r': '\\r',
  19328. '\t': '\\t'
  19329. };
  19330. var regexSingleEscape = /["'\\\b\f\n\r\t]/;
  19331. var regexDigit = /[0-9]/;
  19332. var regexWhitelist = /[ !#-&\(-\[\]-_a-~]/;
  19333. var jsesc$1 = function jsesc(argument, options) {
  19334. var increaseIndentation = function increaseIndentation() {
  19335. oldIndent = indent;
  19336. ++options.indentLevel;
  19337. indent = options.indent.repeat(options.indentLevel);
  19338. };
  19339. var defaults = {
  19340. 'escapeEverything': false,
  19341. 'minimal': false,
  19342. 'isScriptContext': false,
  19343. 'quotes': 'single',
  19344. 'wrap': false,
  19345. 'es6': false,
  19346. 'json': false,
  19347. 'compact': true,
  19348. 'lowercaseHex': false,
  19349. 'numbers': 'decimal',
  19350. 'indent': '\t',
  19351. 'indentLevel': 0,
  19352. '__inline1__': false,
  19353. '__inline2__': false
  19354. };
  19355. var json = options && options.json;
  19356. if (json) {
  19357. defaults.quotes = 'double';
  19358. defaults.wrap = true;
  19359. }
  19360. options = extend(defaults, options);
  19361. if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') {
  19362. options.quotes = 'single';
  19363. }
  19364. var quote = options.quotes == 'double' ? '"' : options.quotes == 'backtick' ? '`' : '\'';
  19365. var compact = options.compact;
  19366. var lowercaseHex = options.lowercaseHex;
  19367. var indent = options.indent.repeat(options.indentLevel);
  19368. var oldIndent = '';
  19369. var inline1 = options.__inline1__;
  19370. var inline2 = options.__inline2__;
  19371. var newLine = compact ? '' : '\n';
  19372. var result;
  19373. var isEmpty = true;
  19374. var useBinNumbers = options.numbers == 'binary';
  19375. var useOctNumbers = options.numbers == 'octal';
  19376. var useDecNumbers = options.numbers == 'decimal';
  19377. var useHexNumbers = options.numbers == 'hexadecimal';
  19378. if (json && argument && isFunction(argument.toJSON)) {
  19379. argument = argument.toJSON();
  19380. }
  19381. if (!isString(argument)) {
  19382. if (isMap(argument)) {
  19383. if (argument.size == 0) {
  19384. return 'new Map()';
  19385. }
  19386. if (!compact) {
  19387. options.__inline1__ = true;
  19388. options.__inline2__ = false;
  19389. }
  19390. return 'new Map(' + jsesc(Array.from(argument), options) + ')';
  19391. }
  19392. if (isSet(argument)) {
  19393. if (argument.size == 0) {
  19394. return 'new Set()';
  19395. }
  19396. return 'new Set(' + jsesc(Array.from(argument), options) + ')';
  19397. }
  19398. if (isBuffer(argument)) {
  19399. if (argument.length == 0) {
  19400. return 'Buffer.from([])';
  19401. }
  19402. return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';
  19403. }
  19404. if (isArray$1(argument)) {
  19405. result = [];
  19406. options.wrap = true;
  19407. if (inline1) {
  19408. options.__inline1__ = false;
  19409. options.__inline2__ = true;
  19410. }
  19411. if (!inline2) {
  19412. increaseIndentation();
  19413. }
  19414. forEach(argument, function (value) {
  19415. isEmpty = false;
  19416. if (inline2) {
  19417. options.__inline2__ = false;
  19418. }
  19419. result.push((compact || inline2 ? '' : indent) + jsesc(value, options));
  19420. });
  19421. if (isEmpty) {
  19422. return '[]';
  19423. }
  19424. if (inline2) {
  19425. return '[' + result.join(', ') + ']';
  19426. }
  19427. return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';
  19428. } else if (isNumber(argument)) {
  19429. if (json) {
  19430. return JSON.stringify(argument);
  19431. }
  19432. if (useDecNumbers) {
  19433. return String(argument);
  19434. }
  19435. if (useHexNumbers) {
  19436. var hexadecimal = argument.toString(16);
  19437. if (!lowercaseHex) {
  19438. hexadecimal = hexadecimal.toUpperCase();
  19439. }
  19440. return '0x' + hexadecimal;
  19441. }
  19442. if (useBinNumbers) {
  19443. return '0b' + argument.toString(2);
  19444. }
  19445. if (useOctNumbers) {
  19446. return '0o' + argument.toString(8);
  19447. }
  19448. } else if (!isObject(argument)) {
  19449. if (json) {
  19450. return JSON.stringify(argument) || 'null';
  19451. }
  19452. return String(argument);
  19453. } else {
  19454. result = [];
  19455. options.wrap = true;
  19456. increaseIndentation();
  19457. forOwn(argument, function (key, value) {
  19458. isEmpty = false;
  19459. result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));
  19460. });
  19461. if (isEmpty) {
  19462. return '{}';
  19463. }
  19464. return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';
  19465. }
  19466. }
  19467. var string = argument;
  19468. var index = -1;
  19469. var length = string.length;
  19470. result = '';
  19471. while (++index < length) {
  19472. var character = string.charAt(index);
  19473. if (options.es6) {
  19474. var first = string.charCodeAt(index);
  19475. if (first >= 0xD800 && first <= 0xDBFF && length > index + 1) {
  19476. var second = string.charCodeAt(index + 1);
  19477. if (second >= 0xDC00 && second <= 0xDFFF) {
  19478. var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  19479. var _hexadecimal2 = codePoint.toString(16);
  19480. if (!lowercaseHex) {
  19481. _hexadecimal2 = _hexadecimal2.toUpperCase();
  19482. }
  19483. result += "\\u{" + _hexadecimal2 + '}';
  19484. ++index;
  19485. continue;
  19486. }
  19487. }
  19488. }
  19489. if (!options.escapeEverything) {
  19490. if (regexWhitelist.test(character)) {
  19491. result += character;
  19492. continue;
  19493. }
  19494. if (character == '"') {
  19495. result += quote == character ? '\\"' : character;
  19496. continue;
  19497. }
  19498. if (character == '`') {
  19499. result += quote == character ? '\\`' : character;
  19500. continue;
  19501. }
  19502. if (character == '\'') {
  19503. result += quote == character ? '\\\'' : character;
  19504. continue;
  19505. }
  19506. }
  19507. if (character == '\0' && !json && !regexDigit.test(string.charAt(index + 1))) {
  19508. result += '\\0';
  19509. continue;
  19510. }
  19511. if (regexSingleEscape.test(character)) {
  19512. result += singleEscapes[character];
  19513. continue;
  19514. }
  19515. var charCode = character.charCodeAt(0);
  19516. if (options.minimal && charCode != 0x2028 && charCode != 0x2029) {
  19517. result += character;
  19518. continue;
  19519. }
  19520. var _hexadecimal = charCode.toString(16);
  19521. if (!lowercaseHex) {
  19522. _hexadecimal = _hexadecimal.toUpperCase();
  19523. }
  19524. var longhand = _hexadecimal.length > 2 || json;
  19525. var escaped = '\\' + (longhand ? 'u' : 'x') + ('0000' + _hexadecimal).slice(longhand ? -4 : -2);
  19526. result += escaped;
  19527. continue;
  19528. }
  19529. if (options.wrap) {
  19530. result = quote + result + quote;
  19531. }
  19532. if (quote == '`') {
  19533. result = result.replace(/\$\{/g, '\\\$\{');
  19534. }
  19535. if (options.isScriptContext) {
  19536. return result.replace(/<\/(script|style)/gi, '<\\/$1').replace(/<!--/g, json ? "\\u003C!--" : '\\x3C!--');
  19537. }
  19538. return result;
  19539. };
  19540. jsesc$1.version = '2.5.2';
  19541. var jsesc_1 = jsesc$1;
  19542. var jsesc = jsesc_1;
  19543. function Identifier(node) {
  19544. var _this = this;
  19545. this.exactSource(node.loc, function () {
  19546. _this.word(node.name);
  19547. });
  19548. }
  19549. function ArgumentPlaceholder() {
  19550. this.token("?");
  19551. }
  19552. function RestElement$1(node) {
  19553. this.token("...");
  19554. this.print(node.argument, node);
  19555. }
  19556. function ObjectExpression$1(node) {
  19557. var props = node.properties;
  19558. this.token("{");
  19559. this.printInnerComments(node);
  19560. if (props.length) {
  19561. this.space();
  19562. this.printList(props, node, {
  19563. indent: true,
  19564. statement: true
  19565. });
  19566. this.space();
  19567. }
  19568. this.token("}");
  19569. }
  19570. function ObjectMethod(node) {
  19571. this.printJoin(node.decorators, node);
  19572. this._methodHead(node);
  19573. this.space();
  19574. this.print(node.body, node);
  19575. }
  19576. function ObjectProperty(node) {
  19577. this.printJoin(node.decorators, node);
  19578. if (node.computed) {
  19579. this.token("[");
  19580. this.print(node.key, node);
  19581. this.token("]");
  19582. } else {
  19583. if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) {
  19584. this.print(node.value, node);
  19585. return;
  19586. }
  19587. this.print(node.key, node);
  19588. if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) {
  19589. return;
  19590. }
  19591. }
  19592. this.token(":");
  19593. this.space();
  19594. this.print(node.value, node);
  19595. }
  19596. function ArrayExpression$1(node) {
  19597. var elems = node.elements;
  19598. var len = elems.length;
  19599. this.token("[");
  19600. this.printInnerComments(node);
  19601. for (var i = 0; i < elems.length; i++) {
  19602. var elem = elems[i];
  19603. if (elem) {
  19604. if (i > 0) this.space();
  19605. this.print(elem, node);
  19606. if (i < len - 1) this.token(",");
  19607. } else {
  19608. this.token(",");
  19609. }
  19610. }
  19611. this.token("]");
  19612. }
  19613. function RecordExpression(node) {
  19614. var props = node.properties;
  19615. var startToken;
  19616. var endToken;
  19617. if (this.format.recordAndTupleSyntaxType === "bar") {
  19618. startToken = "{|";
  19619. endToken = "|}";
  19620. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  19621. startToken = "#{";
  19622. endToken = "}";
  19623. } else {
  19624. throw new Error("The \"recordAndTupleSyntaxType\" generator option must be \"bar\" or \"hash\" (" + JSON.stringify(this.format.recordAndTupleSyntaxType) + " received).");
  19625. }
  19626. this.token(startToken);
  19627. this.printInnerComments(node);
  19628. if (props.length) {
  19629. this.space();
  19630. this.printList(props, node, {
  19631. indent: true,
  19632. statement: true
  19633. });
  19634. this.space();
  19635. }
  19636. this.token(endToken);
  19637. }
  19638. function TupleExpression(node) {
  19639. var elems = node.elements;
  19640. var len = elems.length;
  19641. var startToken;
  19642. var endToken;
  19643. if (this.format.recordAndTupleSyntaxType === "bar") {
  19644. startToken = "[|";
  19645. endToken = "|]";
  19646. } else if (this.format.recordAndTupleSyntaxType === "hash") {
  19647. startToken = "#[";
  19648. endToken = "]";
  19649. } else {
  19650. throw new Error(this.format.recordAndTupleSyntaxType + " is not a valid recordAndTuple syntax type");
  19651. }
  19652. this.token(startToken);
  19653. this.printInnerComments(node);
  19654. for (var i = 0; i < elems.length; i++) {
  19655. var elem = elems[i];
  19656. if (elem) {
  19657. if (i > 0) this.space();
  19658. this.print(elem, node);
  19659. if (i < len - 1) this.token(",");
  19660. }
  19661. }
  19662. this.token(endToken);
  19663. }
  19664. function RegExpLiteral$1(node) {
  19665. this.word("/" + node.pattern + "/" + node.flags);
  19666. }
  19667. function BooleanLiteral$1(node) {
  19668. this.word(node.value ? "true" : "false");
  19669. }
  19670. function NullLiteral$1() {
  19671. this.word("null");
  19672. }
  19673. function NumericLiteral$2(node) {
  19674. var raw = this.getPossibleRaw(node);
  19675. var opts = this.format.jsescOption;
  19676. var value = node.value + "";
  19677. if (opts.numbers) {
  19678. this.number(jsesc(node.value, opts));
  19679. } else if (raw == null) {
  19680. this.number(value);
  19681. } else if (this.format.minified) {
  19682. this.number(raw.length < value.length ? raw : value);
  19683. } else {
  19684. this.number(raw);
  19685. }
  19686. }
  19687. function StringLiteral$2(node) {
  19688. var raw = this.getPossibleRaw(node);
  19689. if (!this.format.minified && raw != null) {
  19690. this.token(raw);
  19691. return;
  19692. }
  19693. var val = jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
  19694. json: true
  19695. }));
  19696. return this.token(val);
  19697. }
  19698. function BigIntLiteral(node) {
  19699. var raw = this.getPossibleRaw(node);
  19700. if (!this.format.minified && raw != null) {
  19701. this.word(raw);
  19702. return;
  19703. }
  19704. this.word(node.value + "n");
  19705. }
  19706. function DecimalLiteral(node) {
  19707. var raw = this.getPossibleRaw(node);
  19708. if (!this.format.minified && raw != null) {
  19709. this.word(raw);
  19710. return;
  19711. }
  19712. this.word(node.value + "m");
  19713. }
  19714. function PipelineTopicExpression(node) {
  19715. this.print(node.expression, node);
  19716. }
  19717. function PipelineBareFunction(node) {
  19718. this.print(node.callee, node);
  19719. }
  19720. function PipelinePrimaryTopicReference() {
  19721. this.token("#");
  19722. }
  19723. function AnyTypeAnnotation() {
  19724. this.word("any");
  19725. }
  19726. function ArrayTypeAnnotation(node) {
  19727. this.print(node.elementType, node);
  19728. this.token("[");
  19729. this.token("]");
  19730. }
  19731. function BooleanTypeAnnotation() {
  19732. this.word("boolean");
  19733. }
  19734. function BooleanLiteralTypeAnnotation(node) {
  19735. this.word(node.value ? "true" : "false");
  19736. }
  19737. function NullLiteralTypeAnnotation() {
  19738. this.word("null");
  19739. }
  19740. function DeclareClass(node, parent) {
  19741. if (!isDeclareExportDeclaration(parent)) {
  19742. this.word("declare");
  19743. this.space();
  19744. }
  19745. this.word("class");
  19746. this.space();
  19747. this._interfaceish(node);
  19748. }
  19749. function DeclareFunction(node, parent) {
  19750. if (!isDeclareExportDeclaration(parent)) {
  19751. this.word("declare");
  19752. this.space();
  19753. }
  19754. this.word("function");
  19755. this.space();
  19756. this.print(node.id, node);
  19757. this.print(node.id.typeAnnotation.typeAnnotation, node);
  19758. if (node.predicate) {
  19759. this.space();
  19760. this.print(node.predicate, node);
  19761. }
  19762. this.semicolon();
  19763. }
  19764. function InferredPredicate() {
  19765. this.token("%");
  19766. this.word("checks");
  19767. }
  19768. function DeclaredPredicate(node) {
  19769. this.token("%");
  19770. this.word("checks");
  19771. this.token("(");
  19772. this.print(node.value, node);
  19773. this.token(")");
  19774. }
  19775. function DeclareInterface(node) {
  19776. this.word("declare");
  19777. this.space();
  19778. this.InterfaceDeclaration(node);
  19779. }
  19780. function DeclareModule(node) {
  19781. this.word("declare");
  19782. this.space();
  19783. this.word("module");
  19784. this.space();
  19785. this.print(node.id, node);
  19786. this.space();
  19787. this.print(node.body, node);
  19788. }
  19789. function DeclareModuleExports(node) {
  19790. this.word("declare");
  19791. this.space();
  19792. this.word("module");
  19793. this.token(".");
  19794. this.word("exports");
  19795. this.print(node.typeAnnotation, node);
  19796. }
  19797. function DeclareTypeAlias(node) {
  19798. this.word("declare");
  19799. this.space();
  19800. this.TypeAlias(node);
  19801. }
  19802. function DeclareOpaqueType(node, parent) {
  19803. if (!isDeclareExportDeclaration(parent)) {
  19804. this.word("declare");
  19805. this.space();
  19806. }
  19807. this.OpaqueType(node);
  19808. }
  19809. function DeclareVariable(node, parent) {
  19810. if (!isDeclareExportDeclaration(parent)) {
  19811. this.word("declare");
  19812. this.space();
  19813. }
  19814. this.word("var");
  19815. this.space();
  19816. this.print(node.id, node);
  19817. this.print(node.id.typeAnnotation, node);
  19818. this.semicolon();
  19819. }
  19820. function DeclareExportDeclaration(node) {
  19821. this.word("declare");
  19822. this.space();
  19823. this.word("export");
  19824. this.space();
  19825. if (node["default"]) {
  19826. this.word("default");
  19827. this.space();
  19828. }
  19829. FlowExportDeclaration.apply(this, arguments);
  19830. }
  19831. function DeclareExportAllDeclaration() {
  19832. this.word("declare");
  19833. this.space();
  19834. ExportAllDeclaration.apply(this, arguments);
  19835. }
  19836. function EnumDeclaration(node) {
  19837. var id = node.id,
  19838. body = node.body;
  19839. this.word("enum");
  19840. this.space();
  19841. this.print(id, node);
  19842. this.print(body, node);
  19843. }
  19844. function enumExplicitType(context, name, hasExplicitType) {
  19845. if (hasExplicitType) {
  19846. context.space();
  19847. context.word("of");
  19848. context.space();
  19849. context.word(name);
  19850. }
  19851. context.space();
  19852. }
  19853. function enumBody(context, node) {
  19854. var members = node.members;
  19855. context.token("{");
  19856. context.indent();
  19857. context.newline();
  19858. for (var _iterator = _createForOfIteratorHelperLoose(members), _step; !(_step = _iterator()).done;) {
  19859. var member = _step.value;
  19860. context.print(member, node);
  19861. context.newline();
  19862. }
  19863. if (node.hasUnknownMembers) {
  19864. context.token("...");
  19865. context.newline();
  19866. }
  19867. context.dedent();
  19868. context.token("}");
  19869. }
  19870. function EnumBooleanBody(node) {
  19871. var explicitType = node.explicitType;
  19872. enumExplicitType(this, "boolean", explicitType);
  19873. enumBody(this, node);
  19874. }
  19875. function EnumNumberBody(node) {
  19876. var explicitType = node.explicitType;
  19877. enumExplicitType(this, "number", explicitType);
  19878. enumBody(this, node);
  19879. }
  19880. function EnumStringBody(node) {
  19881. var explicitType = node.explicitType;
  19882. enumExplicitType(this, "string", explicitType);
  19883. enumBody(this, node);
  19884. }
  19885. function EnumSymbolBody(node) {
  19886. enumExplicitType(this, "symbol", true);
  19887. enumBody(this, node);
  19888. }
  19889. function EnumDefaultedMember(node) {
  19890. var id = node.id;
  19891. this.print(id, node);
  19892. this.token(",");
  19893. }
  19894. function enumInitializedMember(context, node) {
  19895. var id = node.id,
  19896. init = node.init;
  19897. context.print(id, node);
  19898. context.space();
  19899. context.token("=");
  19900. context.space();
  19901. context.print(init, node);
  19902. context.token(",");
  19903. }
  19904. function EnumBooleanMember(node) {
  19905. enumInitializedMember(this, node);
  19906. }
  19907. function EnumNumberMember(node) {
  19908. enumInitializedMember(this, node);
  19909. }
  19910. function EnumStringMember(node) {
  19911. enumInitializedMember(this, node);
  19912. }
  19913. function FlowExportDeclaration(node) {
  19914. if (node.declaration) {
  19915. var declar = node.declaration;
  19916. this.print(declar, node);
  19917. if (!isStatement(declar)) this.semicolon();
  19918. } else {
  19919. this.token("{");
  19920. if (node.specifiers.length) {
  19921. this.space();
  19922. this.printList(node.specifiers, node);
  19923. this.space();
  19924. }
  19925. this.token("}");
  19926. if (node.source) {
  19927. this.space();
  19928. this.word("from");
  19929. this.space();
  19930. this.print(node.source, node);
  19931. }
  19932. this.semicolon();
  19933. }
  19934. }
  19935. function ExistsTypeAnnotation() {
  19936. this.token("*");
  19937. }
  19938. function FunctionTypeAnnotation(node, parent) {
  19939. this.print(node.typeParameters, node);
  19940. this.token("(");
  19941. if (node["this"]) {
  19942. this.word("this");
  19943. this.token(":");
  19944. this.space();
  19945. this.print(node["this"].typeAnnotation, node);
  19946. if (node.params.length || node.rest) {
  19947. this.token(",");
  19948. this.space();
  19949. }
  19950. }
  19951. this.printList(node.params, node);
  19952. if (node.rest) {
  19953. if (node.params.length) {
  19954. this.token(",");
  19955. this.space();
  19956. }
  19957. this.token("...");
  19958. this.print(node.rest, node);
  19959. }
  19960. this.token(")");
  19961. if (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method) {
  19962. this.token(":");
  19963. } else {
  19964. this.space();
  19965. this.token("=>");
  19966. }
  19967. this.space();
  19968. this.print(node.returnType, node);
  19969. }
  19970. function FunctionTypeParam(node) {
  19971. this.print(node.name, node);
  19972. if (node.optional) this.token("?");
  19973. if (node.name) {
  19974. this.token(":");
  19975. this.space();
  19976. }
  19977. this.print(node.typeAnnotation, node);
  19978. }
  19979. function InterfaceExtends(node) {
  19980. this.print(node.id, node);
  19981. this.print(node.typeParameters, node);
  19982. }
  19983. function _interfaceish(node) {
  19984. var _node$extends;
  19985. this.print(node.id, node);
  19986. this.print(node.typeParameters, node);
  19987. if ((_node$extends = node["extends"]) != null && _node$extends.length) {
  19988. this.space();
  19989. this.word("extends");
  19990. this.space();
  19991. this.printList(node["extends"], node);
  19992. }
  19993. if (node.mixins && node.mixins.length) {
  19994. this.space();
  19995. this.word("mixins");
  19996. this.space();
  19997. this.printList(node.mixins, node);
  19998. }
  19999. if (node["implements"] && node["implements"].length) {
  20000. this.space();
  20001. this.word("implements");
  20002. this.space();
  20003. this.printList(node["implements"], node);
  20004. }
  20005. this.space();
  20006. this.print(node.body, node);
  20007. }
  20008. function _variance(node) {
  20009. if (node.variance) {
  20010. if (node.variance.kind === "plus") {
  20011. this.token("+");
  20012. } else if (node.variance.kind === "minus") {
  20013. this.token("-");
  20014. }
  20015. }
  20016. }
  20017. function InterfaceDeclaration(node) {
  20018. this.word("interface");
  20019. this.space();
  20020. this._interfaceish(node);
  20021. }
  20022. function andSeparator() {
  20023. this.space();
  20024. this.token("&");
  20025. this.space();
  20026. }
  20027. function InterfaceTypeAnnotation(node) {
  20028. this.word("interface");
  20029. if (node["extends"] && node["extends"].length) {
  20030. this.space();
  20031. this.word("extends");
  20032. this.space();
  20033. this.printList(node["extends"], node);
  20034. }
  20035. this.space();
  20036. this.print(node.body, node);
  20037. }
  20038. function IntersectionTypeAnnotation(node) {
  20039. this.printJoin(node.types, node, {
  20040. separator: andSeparator
  20041. });
  20042. }
  20043. function MixedTypeAnnotation() {
  20044. this.word("mixed");
  20045. }
  20046. function EmptyTypeAnnotation() {
  20047. this.word("empty");
  20048. }
  20049. function NullableTypeAnnotation(node) {
  20050. this.token("?");
  20051. this.print(node.typeAnnotation, node);
  20052. }
  20053. function NumberTypeAnnotation() {
  20054. this.word("number");
  20055. }
  20056. function StringTypeAnnotation() {
  20057. this.word("string");
  20058. }
  20059. function ThisTypeAnnotation() {
  20060. this.word("this");
  20061. }
  20062. function TupleTypeAnnotation(node) {
  20063. this.token("[");
  20064. this.printList(node.types, node);
  20065. this.token("]");
  20066. }
  20067. function TypeofTypeAnnotation(node) {
  20068. this.word("typeof");
  20069. this.space();
  20070. this.print(node.argument, node);
  20071. }
  20072. function TypeAlias(node) {
  20073. this.word("type");
  20074. this.space();
  20075. this.print(node.id, node);
  20076. this.print(node.typeParameters, node);
  20077. this.space();
  20078. this.token("=");
  20079. this.space();
  20080. this.print(node.right, node);
  20081. this.semicolon();
  20082. }
  20083. function TypeAnnotation(node) {
  20084. this.token(":");
  20085. this.space();
  20086. if (node.optional) this.token("?");
  20087. this.print(node.typeAnnotation, node);
  20088. }
  20089. function TypeParameterInstantiation(node) {
  20090. this.token("<");
  20091. this.printList(node.params, node, {});
  20092. this.token(">");
  20093. }
  20094. function TypeParameter(node) {
  20095. this._variance(node);
  20096. this.word(node.name);
  20097. if (node.bound) {
  20098. this.print(node.bound, node);
  20099. }
  20100. if (node["default"]) {
  20101. this.space();
  20102. this.token("=");
  20103. this.space();
  20104. this.print(node["default"], node);
  20105. }
  20106. }
  20107. function OpaqueType(node) {
  20108. this.word("opaque");
  20109. this.space();
  20110. this.word("type");
  20111. this.space();
  20112. this.print(node.id, node);
  20113. this.print(node.typeParameters, node);
  20114. if (node.supertype) {
  20115. this.token(":");
  20116. this.space();
  20117. this.print(node.supertype, node);
  20118. }
  20119. if (node.impltype) {
  20120. this.space();
  20121. this.token("=");
  20122. this.space();
  20123. this.print(node.impltype, node);
  20124. }
  20125. this.semicolon();
  20126. }
  20127. function ObjectTypeAnnotation(node) {
  20128. var _this = this;
  20129. if (node.exact) {
  20130. this.token("{|");
  20131. } else {
  20132. this.token("{");
  20133. }
  20134. var props = [].concat(_toConsumableArray(node.properties), _toConsumableArray(node.callProperties || []), _toConsumableArray(node.indexers || []), _toConsumableArray(node.internalSlots || []));
  20135. if (props.length) {
  20136. this.space();
  20137. this.printJoin(props, node, {
  20138. addNewlines: function addNewlines(leading) {
  20139. if (leading && !props[0]) return 1;
  20140. },
  20141. indent: true,
  20142. statement: true,
  20143. iterator: function iterator() {
  20144. if (props.length !== 1 || node.inexact) {
  20145. _this.token(",");
  20146. _this.space();
  20147. }
  20148. }
  20149. });
  20150. this.space();
  20151. }
  20152. if (node.inexact) {
  20153. this.indent();
  20154. this.token("...");
  20155. if (props.length) {
  20156. this.newline();
  20157. }
  20158. this.dedent();
  20159. }
  20160. if (node.exact) {
  20161. this.token("|}");
  20162. } else {
  20163. this.token("}");
  20164. }
  20165. }
  20166. function ObjectTypeInternalSlot(node) {
  20167. if (node["static"]) {
  20168. this.word("static");
  20169. this.space();
  20170. }
  20171. this.token("[");
  20172. this.token("[");
  20173. this.print(node.id, node);
  20174. this.token("]");
  20175. this.token("]");
  20176. if (node.optional) this.token("?");
  20177. if (!node.method) {
  20178. this.token(":");
  20179. this.space();
  20180. }
  20181. this.print(node.value, node);
  20182. }
  20183. function ObjectTypeCallProperty(node) {
  20184. if (node["static"]) {
  20185. this.word("static");
  20186. this.space();
  20187. }
  20188. this.print(node.value, node);
  20189. }
  20190. function ObjectTypeIndexer(node) {
  20191. if (node["static"]) {
  20192. this.word("static");
  20193. this.space();
  20194. }
  20195. this._variance(node);
  20196. this.token("[");
  20197. if (node.id) {
  20198. this.print(node.id, node);
  20199. this.token(":");
  20200. this.space();
  20201. }
  20202. this.print(node.key, node);
  20203. this.token("]");
  20204. this.token(":");
  20205. this.space();
  20206. this.print(node.value, node);
  20207. }
  20208. function ObjectTypeProperty(node) {
  20209. if (node.proto) {
  20210. this.word("proto");
  20211. this.space();
  20212. }
  20213. if (node["static"]) {
  20214. this.word("static");
  20215. this.space();
  20216. }
  20217. if (node.kind === "get" || node.kind === "set") {
  20218. this.word(node.kind);
  20219. this.space();
  20220. }
  20221. this._variance(node);
  20222. this.print(node.key, node);
  20223. if (node.optional) this.token("?");
  20224. if (!node.method) {
  20225. this.token(":");
  20226. this.space();
  20227. }
  20228. this.print(node.value, node);
  20229. }
  20230. function ObjectTypeSpreadProperty(node) {
  20231. this.token("...");
  20232. this.print(node.argument, node);
  20233. }
  20234. function QualifiedTypeIdentifier(node) {
  20235. this.print(node.qualification, node);
  20236. this.token(".");
  20237. this.print(node.id, node);
  20238. }
  20239. function SymbolTypeAnnotation() {
  20240. this.word("symbol");
  20241. }
  20242. function orSeparator() {
  20243. this.space();
  20244. this.token("|");
  20245. this.space();
  20246. }
  20247. function UnionTypeAnnotation(node) {
  20248. this.printJoin(node.types, node, {
  20249. separator: orSeparator
  20250. });
  20251. }
  20252. function TypeCastExpression$1(node) {
  20253. this.token("(");
  20254. this.print(node.expression, node);
  20255. this.print(node.typeAnnotation, node);
  20256. this.token(")");
  20257. }
  20258. function Variance(node) {
  20259. if (node.kind === "plus") {
  20260. this.token("+");
  20261. } else {
  20262. this.token("-");
  20263. }
  20264. }
  20265. function VoidTypeAnnotation() {
  20266. this.word("void");
  20267. }
  20268. function IndexedAccessType(node) {
  20269. this.print(node.objectType, node);
  20270. this.token("[");
  20271. this.print(node.indexType, node);
  20272. this.token("]");
  20273. }
  20274. function OptionalIndexedAccessType(node) {
  20275. this.print(node.objectType, node);
  20276. if (node.optional) {
  20277. this.token("?.");
  20278. }
  20279. this.token("[");
  20280. this.print(node.indexType, node);
  20281. this.token("]");
  20282. }
  20283. function File$1(node) {
  20284. if (node.program) {
  20285. this.print(node.program.interpreter, node);
  20286. }
  20287. this.print(node.program, node);
  20288. }
  20289. function Program(node) {
  20290. this.printInnerComments(node, false);
  20291. this.printSequence(node.directives, node);
  20292. if (node.directives && node.directives.length) this.newline();
  20293. this.printSequence(node.body, node);
  20294. }
  20295. function BlockStatement(node) {
  20296. var _node$directives;
  20297. this.token("{");
  20298. this.printInnerComments(node);
  20299. var hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
  20300. if (node.body.length || hasDirectives) {
  20301. this.newline();
  20302. this.printSequence(node.directives, node, {
  20303. indent: true
  20304. });
  20305. if (hasDirectives) this.newline();
  20306. this.printSequence(node.body, node, {
  20307. indent: true
  20308. });
  20309. this.removeTrailingNewline();
  20310. this.source("end", node.loc);
  20311. if (!this.endsWith("\n")) this.newline();
  20312. this.rightBrace();
  20313. } else {
  20314. this.source("end", node.loc);
  20315. this.token("}");
  20316. }
  20317. }
  20318. function Directive(node) {
  20319. this.print(node.value, node);
  20320. this.semicolon();
  20321. }
  20322. var unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
  20323. var unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
  20324. function DirectiveLiteral(node) {
  20325. var raw = this.getPossibleRaw(node);
  20326. if (raw != null) {
  20327. this.token(raw);
  20328. return;
  20329. }
  20330. var value = node.value;
  20331. if (!unescapedDoubleQuoteRE.test(value)) {
  20332. this.token("\"" + value + "\"");
  20333. } else if (!unescapedSingleQuoteRE.test(value)) {
  20334. this.token("'" + value + "'");
  20335. } else {
  20336. throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
  20337. }
  20338. }
  20339. function InterpreterDirective(node) {
  20340. this.token("#!" + node.value + "\n");
  20341. }
  20342. function Placeholder(node) {
  20343. this.token("%%");
  20344. this.print(node.name);
  20345. this.token("%%");
  20346. if (node.expectedNode === "Statement") {
  20347. this.semicolon();
  20348. }
  20349. }
  20350. function JSXAttribute(node) {
  20351. this.print(node.name, node);
  20352. if (node.value) {
  20353. this.token("=");
  20354. this.print(node.value, node);
  20355. }
  20356. }
  20357. function JSXIdentifier$1(node) {
  20358. this.word(node.name);
  20359. }
  20360. function JSXNamespacedName(node) {
  20361. this.print(node.namespace, node);
  20362. this.token(":");
  20363. this.print(node.name, node);
  20364. }
  20365. function JSXMemberExpression(node) {
  20366. this.print(node.object, node);
  20367. this.token(".");
  20368. this.print(node.property, node);
  20369. }
  20370. function JSXSpreadAttribute(node) {
  20371. this.token("{");
  20372. this.token("...");
  20373. this.print(node.argument, node);
  20374. this.token("}");
  20375. }
  20376. function JSXExpressionContainer(node) {
  20377. this.token("{");
  20378. this.print(node.expression, node);
  20379. this.token("}");
  20380. }
  20381. function JSXSpreadChild(node) {
  20382. this.token("{");
  20383. this.token("...");
  20384. this.print(node.expression, node);
  20385. this.token("}");
  20386. }
  20387. function JSXText$1(node) {
  20388. var raw = this.getPossibleRaw(node);
  20389. if (raw != null) {
  20390. this.token(raw);
  20391. } else {
  20392. this.token(node.value);
  20393. }
  20394. }
  20395. function JSXElement(node) {
  20396. var open = node.openingElement;
  20397. this.print(open, node);
  20398. if (open.selfClosing) return;
  20399. this.indent();
  20400. for (var _iterator = _createForOfIteratorHelperLoose(node.children), _step; !(_step = _iterator()).done;) {
  20401. var child = _step.value;
  20402. this.print(child, node);
  20403. }
  20404. this.dedent();
  20405. this.print(node.closingElement, node);
  20406. }
  20407. function spaceSeparator() {
  20408. this.space();
  20409. }
  20410. function JSXOpeningElement(node) {
  20411. this.token("<");
  20412. this.print(node.name, node);
  20413. this.print(node.typeParameters, node);
  20414. if (node.attributes.length > 0) {
  20415. this.space();
  20416. this.printJoin(node.attributes, node, {
  20417. separator: spaceSeparator
  20418. });
  20419. }
  20420. if (node.selfClosing) {
  20421. this.space();
  20422. this.token("/>");
  20423. } else {
  20424. this.token(">");
  20425. }
  20426. }
  20427. function JSXClosingElement(node) {
  20428. this.token("</");
  20429. this.print(node.name, node);
  20430. this.token(">");
  20431. }
  20432. function JSXEmptyExpression(node) {
  20433. this.printInnerComments(node);
  20434. }
  20435. function JSXFragment(node) {
  20436. this.print(node.openingFragment, node);
  20437. this.indent();
  20438. for (var _iterator2 = _createForOfIteratorHelperLoose(node.children), _step2; !(_step2 = _iterator2()).done;) {
  20439. var child = _step2.value;
  20440. this.print(child, node);
  20441. }
  20442. this.dedent();
  20443. this.print(node.closingFragment, node);
  20444. }
  20445. function JSXOpeningFragment() {
  20446. this.token("<");
  20447. this.token(">");
  20448. }
  20449. function JSXClosingFragment() {
  20450. this.token("</");
  20451. this.token(">");
  20452. }
  20453. function TSTypeAnnotation(node) {
  20454. this.token(":");
  20455. this.space();
  20456. if (node.optional) this.token("?");
  20457. this.print(node.typeAnnotation, node);
  20458. }
  20459. function TSTypeParameterInstantiation(node) {
  20460. this.token("<");
  20461. this.printList(node.params, node, {});
  20462. this.token(">");
  20463. }
  20464. function TSTypeParameter(node) {
  20465. this.word(node.name);
  20466. if (node.constraint) {
  20467. this.space();
  20468. this.word("extends");
  20469. this.space();
  20470. this.print(node.constraint, node);
  20471. }
  20472. if (node["default"]) {
  20473. this.space();
  20474. this.token("=");
  20475. this.space();
  20476. this.print(node["default"], node);
  20477. }
  20478. }
  20479. function TSParameterProperty(node) {
  20480. if (node.accessibility) {
  20481. this.word(node.accessibility);
  20482. this.space();
  20483. }
  20484. if (node.readonly) {
  20485. this.word("readonly");
  20486. this.space();
  20487. }
  20488. this._param(node.parameter);
  20489. }
  20490. function TSDeclareFunction(node) {
  20491. if (node.declare) {
  20492. this.word("declare");
  20493. this.space();
  20494. }
  20495. this._functionHead(node);
  20496. this.token(";");
  20497. }
  20498. function TSDeclareMethod(node) {
  20499. this._classMethodHead(node);
  20500. this.token(";");
  20501. }
  20502. function TSQualifiedName(node) {
  20503. this.print(node.left, node);
  20504. this.token(".");
  20505. this.print(node.right, node);
  20506. }
  20507. function TSCallSignatureDeclaration(node) {
  20508. this.tsPrintSignatureDeclarationBase(node);
  20509. this.token(";");
  20510. }
  20511. function TSConstructSignatureDeclaration(node) {
  20512. this.word("new");
  20513. this.space();
  20514. this.tsPrintSignatureDeclarationBase(node);
  20515. this.token(";");
  20516. }
  20517. function TSPropertySignature(node) {
  20518. var readonly = node.readonly,
  20519. initializer = node.initializer;
  20520. if (readonly) {
  20521. this.word("readonly");
  20522. this.space();
  20523. }
  20524. this.tsPrintPropertyOrMethodName(node);
  20525. this.print(node.typeAnnotation, node);
  20526. if (initializer) {
  20527. this.space();
  20528. this.token("=");
  20529. this.space();
  20530. this.print(initializer, node);
  20531. }
  20532. this.token(";");
  20533. }
  20534. function tsPrintPropertyOrMethodName(node) {
  20535. if (node.computed) {
  20536. this.token("[");
  20537. }
  20538. this.print(node.key, node);
  20539. if (node.computed) {
  20540. this.token("]");
  20541. }
  20542. if (node.optional) {
  20543. this.token("?");
  20544. }
  20545. }
  20546. function TSMethodSignature(node) {
  20547. var kind = node.kind;
  20548. if (kind === "set" || kind === "get") {
  20549. this.word(kind);
  20550. this.space();
  20551. }
  20552. this.tsPrintPropertyOrMethodName(node);
  20553. this.tsPrintSignatureDeclarationBase(node);
  20554. this.token(";");
  20555. }
  20556. function TSIndexSignature(node) {
  20557. var readonly = node.readonly,
  20558. isStatic = node["static"];
  20559. if (isStatic) {
  20560. this.word("static");
  20561. this.space();
  20562. }
  20563. if (readonly) {
  20564. this.word("readonly");
  20565. this.space();
  20566. }
  20567. this.token("[");
  20568. this._parameters(node.parameters, node);
  20569. this.token("]");
  20570. this.print(node.typeAnnotation, node);
  20571. this.token(";");
  20572. }
  20573. function TSAnyKeyword() {
  20574. this.word("any");
  20575. }
  20576. function TSBigIntKeyword() {
  20577. this.word("bigint");
  20578. }
  20579. function TSUnknownKeyword() {
  20580. this.word("unknown");
  20581. }
  20582. function TSNumberKeyword() {
  20583. this.word("number");
  20584. }
  20585. function TSObjectKeyword() {
  20586. this.word("object");
  20587. }
  20588. function TSBooleanKeyword() {
  20589. this.word("boolean");
  20590. }
  20591. function TSStringKeyword() {
  20592. this.word("string");
  20593. }
  20594. function TSSymbolKeyword() {
  20595. this.word("symbol");
  20596. }
  20597. function TSVoidKeyword() {
  20598. this.word("void");
  20599. }
  20600. function TSUndefinedKeyword() {
  20601. this.word("undefined");
  20602. }
  20603. function TSNullKeyword() {
  20604. this.word("null");
  20605. }
  20606. function TSNeverKeyword() {
  20607. this.word("never");
  20608. }
  20609. function TSIntrinsicKeyword() {
  20610. this.word("intrinsic");
  20611. }
  20612. function TSThisType() {
  20613. this.word("this");
  20614. }
  20615. function TSFunctionType(node) {
  20616. this.tsPrintFunctionOrConstructorType(node);
  20617. }
  20618. function TSConstructorType(node) {
  20619. if (node["abstract"]) {
  20620. this.word("abstract");
  20621. this.space();
  20622. }
  20623. this.word("new");
  20624. this.space();
  20625. this.tsPrintFunctionOrConstructorType(node);
  20626. }
  20627. function tsPrintFunctionOrConstructorType(node) {
  20628. var typeParameters = node.typeParameters,
  20629. parameters = node.parameters;
  20630. this.print(typeParameters, node);
  20631. this.token("(");
  20632. this._parameters(parameters, node);
  20633. this.token(")");
  20634. this.space();
  20635. this.token("=>");
  20636. this.space();
  20637. this.print(node.typeAnnotation.typeAnnotation, node);
  20638. }
  20639. function TSTypeReference(node) {
  20640. this.print(node.typeName, node);
  20641. this.print(node.typeParameters, node);
  20642. }
  20643. function TSTypePredicate(node) {
  20644. if (node.asserts) {
  20645. this.word("asserts");
  20646. this.space();
  20647. }
  20648. this.print(node.parameterName);
  20649. if (node.typeAnnotation) {
  20650. this.space();
  20651. this.word("is");
  20652. this.space();
  20653. this.print(node.typeAnnotation.typeAnnotation);
  20654. }
  20655. }
  20656. function TSTypeQuery(node) {
  20657. this.word("typeof");
  20658. this.space();
  20659. this.print(node.exprName);
  20660. }
  20661. function TSTypeLiteral(node) {
  20662. this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
  20663. }
  20664. function tsPrintTypeLiteralOrInterfaceBody(members, node) {
  20665. this.tsPrintBraced(members, node);
  20666. }
  20667. function tsPrintBraced(members, node) {
  20668. this.token("{");
  20669. if (members.length) {
  20670. this.indent();
  20671. this.newline();
  20672. for (var _iterator = _createForOfIteratorHelperLoose(members), _step; !(_step = _iterator()).done;) {
  20673. var member = _step.value;
  20674. this.print(member, node);
  20675. this.newline();
  20676. }
  20677. this.dedent();
  20678. this.rightBrace();
  20679. } else {
  20680. this.token("}");
  20681. }
  20682. }
  20683. function TSArrayType(node) {
  20684. this.print(node.elementType, node);
  20685. this.token("[]");
  20686. }
  20687. function TSTupleType(node) {
  20688. this.token("[");
  20689. this.printList(node.elementTypes, node);
  20690. this.token("]");
  20691. }
  20692. function TSOptionalType(node) {
  20693. this.print(node.typeAnnotation, node);
  20694. this.token("?");
  20695. }
  20696. function TSRestType(node) {
  20697. this.token("...");
  20698. this.print(node.typeAnnotation, node);
  20699. }
  20700. function TSNamedTupleMember(node) {
  20701. this.print(node.label, node);
  20702. if (node.optional) this.token("?");
  20703. this.token(":");
  20704. this.space();
  20705. this.print(node.elementType, node);
  20706. }
  20707. function TSUnionType(node) {
  20708. this.tsPrintUnionOrIntersectionType(node, "|");
  20709. }
  20710. function TSIntersectionType(node) {
  20711. this.tsPrintUnionOrIntersectionType(node, "&");
  20712. }
  20713. function tsPrintUnionOrIntersectionType(node, sep) {
  20714. this.printJoin(node.types, node, {
  20715. separator: function separator() {
  20716. this.space();
  20717. this.token(sep);
  20718. this.space();
  20719. }
  20720. });
  20721. }
  20722. function TSConditionalType(node) {
  20723. this.print(node.checkType);
  20724. this.space();
  20725. this.word("extends");
  20726. this.space();
  20727. this.print(node.extendsType);
  20728. this.space();
  20729. this.token("?");
  20730. this.space();
  20731. this.print(node.trueType);
  20732. this.space();
  20733. this.token(":");
  20734. this.space();
  20735. this.print(node.falseType);
  20736. }
  20737. function TSInferType(node) {
  20738. this.token("infer");
  20739. this.space();
  20740. this.print(node.typeParameter);
  20741. }
  20742. function TSParenthesizedType(node) {
  20743. this.token("(");
  20744. this.print(node.typeAnnotation, node);
  20745. this.token(")");
  20746. }
  20747. function TSTypeOperator(node) {
  20748. this.word(node.operator);
  20749. this.space();
  20750. this.print(node.typeAnnotation, node);
  20751. }
  20752. function TSIndexedAccessType(node) {
  20753. this.print(node.objectType, node);
  20754. this.token("[");
  20755. this.print(node.indexType, node);
  20756. this.token("]");
  20757. }
  20758. function TSMappedType(node) {
  20759. var nameType = node.nameType,
  20760. optional = node.optional,
  20761. readonly = node.readonly,
  20762. typeParameter = node.typeParameter;
  20763. this.token("{");
  20764. this.space();
  20765. if (readonly) {
  20766. tokenIfPlusMinus(this, readonly);
  20767. this.word("readonly");
  20768. this.space();
  20769. }
  20770. this.token("[");
  20771. this.word(typeParameter.name);
  20772. this.space();
  20773. this.word("in");
  20774. this.space();
  20775. this.print(typeParameter.constraint, typeParameter);
  20776. if (nameType) {
  20777. this.space();
  20778. this.word("as");
  20779. this.space();
  20780. this.print(nameType, node);
  20781. }
  20782. this.token("]");
  20783. if (optional) {
  20784. tokenIfPlusMinus(this, optional);
  20785. this.token("?");
  20786. }
  20787. this.token(":");
  20788. this.space();
  20789. this.print(node.typeAnnotation, node);
  20790. this.space();
  20791. this.token("}");
  20792. }
  20793. function tokenIfPlusMinus(self, tok) {
  20794. if (tok !== true) {
  20795. self.token(tok);
  20796. }
  20797. }
  20798. function TSLiteralType(node) {
  20799. this.print(node.literal, node);
  20800. }
  20801. function TSExpressionWithTypeArguments(node) {
  20802. this.print(node.expression, node);
  20803. this.print(node.typeParameters, node);
  20804. }
  20805. function TSInterfaceDeclaration(node) {
  20806. var declare = node.declare,
  20807. id = node.id,
  20808. typeParameters = node.typeParameters,
  20809. extendz = node["extends"],
  20810. body = node.body;
  20811. if (declare) {
  20812. this.word("declare");
  20813. this.space();
  20814. }
  20815. this.word("interface");
  20816. this.space();
  20817. this.print(id, node);
  20818. this.print(typeParameters, node);
  20819. if (extendz != null && extendz.length) {
  20820. this.space();
  20821. this.word("extends");
  20822. this.space();
  20823. this.printList(extendz, node);
  20824. }
  20825. this.space();
  20826. this.print(body, node);
  20827. }
  20828. function TSInterfaceBody(node) {
  20829. this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
  20830. }
  20831. function TSTypeAliasDeclaration(node) {
  20832. var declare = node.declare,
  20833. id = node.id,
  20834. typeParameters = node.typeParameters,
  20835. typeAnnotation = node.typeAnnotation;
  20836. if (declare) {
  20837. this.word("declare");
  20838. this.space();
  20839. }
  20840. this.word("type");
  20841. this.space();
  20842. this.print(id, node);
  20843. this.print(typeParameters, node);
  20844. this.space();
  20845. this.token("=");
  20846. this.space();
  20847. this.print(typeAnnotation, node);
  20848. this.token(";");
  20849. }
  20850. function TSAsExpression(node) {
  20851. var expression = node.expression,
  20852. typeAnnotation = node.typeAnnotation;
  20853. this.print(expression, node);
  20854. this.space();
  20855. this.word("as");
  20856. this.space();
  20857. this.print(typeAnnotation, node);
  20858. }
  20859. function TSTypeAssertion(node) {
  20860. var typeAnnotation = node.typeAnnotation,
  20861. expression = node.expression;
  20862. this.token("<");
  20863. this.print(typeAnnotation, node);
  20864. this.token(">");
  20865. this.space();
  20866. this.print(expression, node);
  20867. }
  20868. function TSEnumDeclaration(node) {
  20869. var declare = node.declare,
  20870. isConst = node["const"],
  20871. id = node.id,
  20872. members = node.members;
  20873. if (declare) {
  20874. this.word("declare");
  20875. this.space();
  20876. }
  20877. if (isConst) {
  20878. this.word("const");
  20879. this.space();
  20880. }
  20881. this.word("enum");
  20882. this.space();
  20883. this.print(id, node);
  20884. this.space();
  20885. this.tsPrintBraced(members, node);
  20886. }
  20887. function TSEnumMember(node) {
  20888. var id = node.id,
  20889. initializer = node.initializer;
  20890. this.print(id, node);
  20891. if (initializer) {
  20892. this.space();
  20893. this.token("=");
  20894. this.space();
  20895. this.print(initializer, node);
  20896. }
  20897. this.token(",");
  20898. }
  20899. function TSModuleDeclaration(node) {
  20900. var declare = node.declare,
  20901. id = node.id;
  20902. if (declare) {
  20903. this.word("declare");
  20904. this.space();
  20905. }
  20906. if (!node.global) {
  20907. this.word(id.type === "Identifier" ? "namespace" : "module");
  20908. this.space();
  20909. }
  20910. this.print(id, node);
  20911. if (!node.body) {
  20912. this.token(";");
  20913. return;
  20914. }
  20915. var body = node.body;
  20916. while (body.type === "TSModuleDeclaration") {
  20917. this.token(".");
  20918. this.print(body.id, body);
  20919. body = body.body;
  20920. }
  20921. this.space();
  20922. this.print(body, node);
  20923. }
  20924. function TSModuleBlock(node) {
  20925. this.tsPrintBraced(node.body, node);
  20926. }
  20927. function TSImportType(node) {
  20928. var argument = node.argument,
  20929. qualifier = node.qualifier,
  20930. typeParameters = node.typeParameters;
  20931. this.word("import");
  20932. this.token("(");
  20933. this.print(argument, node);
  20934. this.token(")");
  20935. if (qualifier) {
  20936. this.token(".");
  20937. this.print(qualifier, node);
  20938. }
  20939. if (typeParameters) {
  20940. this.print(typeParameters, node);
  20941. }
  20942. }
  20943. function TSImportEqualsDeclaration(node) {
  20944. var isExport = node.isExport,
  20945. id = node.id,
  20946. moduleReference = node.moduleReference;
  20947. if (isExport) {
  20948. this.word("export");
  20949. this.space();
  20950. }
  20951. this.word("import");
  20952. this.space();
  20953. this.print(id, node);
  20954. this.space();
  20955. this.token("=");
  20956. this.space();
  20957. this.print(moduleReference, node);
  20958. this.token(";");
  20959. }
  20960. function TSExternalModuleReference(node) {
  20961. this.token("require(");
  20962. this.print(node.expression, node);
  20963. this.token(")");
  20964. }
  20965. function TSNonNullExpression(node) {
  20966. this.print(node.expression, node);
  20967. this.token("!");
  20968. }
  20969. function TSExportAssignment(node) {
  20970. this.word("export");
  20971. this.space();
  20972. this.token("=");
  20973. this.space();
  20974. this.print(node.expression, node);
  20975. this.token(";");
  20976. }
  20977. function TSNamespaceExportDeclaration(node) {
  20978. this.word("export");
  20979. this.space();
  20980. this.word("as");
  20981. this.space();
  20982. this.word("namespace");
  20983. this.space();
  20984. this.print(node.id, node);
  20985. }
  20986. function tsPrintSignatureDeclarationBase(node) {
  20987. var typeParameters = node.typeParameters,
  20988. parameters = node.parameters;
  20989. this.print(typeParameters, node);
  20990. this.token("(");
  20991. this._parameters(parameters, node);
  20992. this.token(")");
  20993. this.print(node.typeAnnotation, node);
  20994. }
  20995. function tsPrintClassMemberModifiers(node, isField) {
  20996. if (isField && node.declare) {
  20997. this.word("declare");
  20998. this.space();
  20999. }
  21000. if (node.accessibility) {
  21001. this.word(node.accessibility);
  21002. this.space();
  21003. }
  21004. if (node["static"]) {
  21005. this.word("static");
  21006. this.space();
  21007. }
  21008. if (node.override) {
  21009. this.word("override");
  21010. this.space();
  21011. }
  21012. if (node["abstract"]) {
  21013. this.word("abstract");
  21014. this.space();
  21015. }
  21016. if (isField && node.readonly) {
  21017. this.word("readonly");
  21018. this.space();
  21019. }
  21020. }
  21021. var generatorFunctions = /*#__PURE__*/Object.freeze({
  21022. __proto__: null,
  21023. TaggedTemplateExpression: TaggedTemplateExpression$1,
  21024. TemplateElement: TemplateElement,
  21025. TemplateLiteral: TemplateLiteral$1,
  21026. UnaryExpression: UnaryExpression$1,
  21027. DoExpression: DoExpression,
  21028. ParenthesizedExpression: ParenthesizedExpression$1,
  21029. UpdateExpression: UpdateExpression$1,
  21030. ConditionalExpression: ConditionalExpression$1,
  21031. NewExpression: NewExpression$1,
  21032. SequenceExpression: SequenceExpression$1,
  21033. ThisExpression: ThisExpression,
  21034. Super: Super,
  21035. Decorator: Decorator,
  21036. OptionalMemberExpression: OptionalMemberExpression,
  21037. OptionalCallExpression: OptionalCallExpression,
  21038. CallExpression: CallExpression$1,
  21039. Import: Import,
  21040. YieldExpression: YieldExpression,
  21041. AwaitExpression: AwaitExpression,
  21042. EmptyStatement: EmptyStatement,
  21043. ExpressionStatement: ExpressionStatement,
  21044. AssignmentPattern: AssignmentPattern,
  21045. AssignmentExpression: AssignmentExpression$1,
  21046. BindExpression: BindExpression,
  21047. BinaryExpression: AssignmentExpression$1,
  21048. LogicalExpression: AssignmentExpression$1,
  21049. MemberExpression: MemberExpression,
  21050. MetaProperty: MetaProperty,
  21051. PrivateName: PrivateName,
  21052. V8IntrinsicIdentifier: V8IntrinsicIdentifier,
  21053. ModuleExpression: ModuleExpression,
  21054. WithStatement: WithStatement,
  21055. IfStatement: IfStatement,
  21056. ForStatement: ForStatement,
  21057. WhileStatement: WhileStatement,
  21058. ForInStatement: ForInStatement,
  21059. ForOfStatement: ForOfStatement,
  21060. DoWhileStatement: DoWhileStatement,
  21061. ContinueStatement: ContinueStatement,
  21062. ReturnStatement: ReturnStatement,
  21063. BreakStatement: BreakStatement,
  21064. ThrowStatement: ThrowStatement,
  21065. LabeledStatement: LabeledStatement,
  21066. TryStatement: TryStatement,
  21067. CatchClause: CatchClause,
  21068. SwitchStatement: SwitchStatement,
  21069. SwitchCase: SwitchCase,
  21070. DebuggerStatement: DebuggerStatement,
  21071. VariableDeclaration: VariableDeclaration,
  21072. VariableDeclarator: VariableDeclarator$1,
  21073. ClassDeclaration: ClassDeclaration,
  21074. ClassExpression: ClassDeclaration,
  21075. ClassBody: ClassBody,
  21076. ClassProperty: ClassProperty,
  21077. ClassPrivateProperty: ClassPrivateProperty,
  21078. ClassMethod: ClassMethod,
  21079. ClassPrivateMethod: ClassPrivateMethod,
  21080. _classMethodHead: _classMethodHead,
  21081. StaticBlock: StaticBlock,
  21082. _params: _params,
  21083. _parameters: _parameters,
  21084. _param: _param,
  21085. _methodHead: _methodHead,
  21086. _predicate: _predicate,
  21087. _functionHead: _functionHead,
  21088. FunctionExpression: FunctionExpression,
  21089. FunctionDeclaration: FunctionExpression,
  21090. ArrowFunctionExpression: ArrowFunctionExpression,
  21091. ImportSpecifier: ImportSpecifier,
  21092. ImportDefaultSpecifier: ImportDefaultSpecifier,
  21093. ExportDefaultSpecifier: ExportDefaultSpecifier,
  21094. ExportSpecifier: ExportSpecifier,
  21095. ExportNamespaceSpecifier: ExportNamespaceSpecifier,
  21096. ExportAllDeclaration: ExportAllDeclaration,
  21097. ExportNamedDeclaration: ExportNamedDeclaration,
  21098. ExportDefaultDeclaration: ExportDefaultDeclaration,
  21099. ImportDeclaration: ImportDeclaration,
  21100. ImportAttribute: ImportAttribute,
  21101. ImportNamespaceSpecifier: ImportNamespaceSpecifier,
  21102. Identifier: Identifier,
  21103. ArgumentPlaceholder: ArgumentPlaceholder,
  21104. RestElement: RestElement$1,
  21105. SpreadElement: RestElement$1,
  21106. ObjectExpression: ObjectExpression$1,
  21107. ObjectPattern: ObjectExpression$1,
  21108. ObjectMethod: ObjectMethod,
  21109. ObjectProperty: ObjectProperty,
  21110. ArrayExpression: ArrayExpression$1,
  21111. ArrayPattern: ArrayExpression$1,
  21112. RecordExpression: RecordExpression,
  21113. TupleExpression: TupleExpression,
  21114. RegExpLiteral: RegExpLiteral$1,
  21115. BooleanLiteral: BooleanLiteral$1,
  21116. NullLiteral: NullLiteral$1,
  21117. NumericLiteral: NumericLiteral$2,
  21118. StringLiteral: StringLiteral$2,
  21119. BigIntLiteral: BigIntLiteral,
  21120. DecimalLiteral: DecimalLiteral,
  21121. PipelineTopicExpression: PipelineTopicExpression,
  21122. PipelineBareFunction: PipelineBareFunction,
  21123. PipelinePrimaryTopicReference: PipelinePrimaryTopicReference,
  21124. NumberLiteralTypeAnnotation: NumericLiteral$2,
  21125. StringLiteralTypeAnnotation: StringLiteral$2,
  21126. AnyTypeAnnotation: AnyTypeAnnotation,
  21127. ArrayTypeAnnotation: ArrayTypeAnnotation,
  21128. BooleanTypeAnnotation: BooleanTypeAnnotation,
  21129. BooleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotation,
  21130. NullLiteralTypeAnnotation: NullLiteralTypeAnnotation,
  21131. DeclareClass: DeclareClass,
  21132. DeclareFunction: DeclareFunction,
  21133. InferredPredicate: InferredPredicate,
  21134. DeclaredPredicate: DeclaredPredicate,
  21135. DeclareInterface: DeclareInterface,
  21136. DeclareModule: DeclareModule,
  21137. DeclareModuleExports: DeclareModuleExports,
  21138. DeclareTypeAlias: DeclareTypeAlias,
  21139. DeclareOpaqueType: DeclareOpaqueType,
  21140. DeclareVariable: DeclareVariable,
  21141. DeclareExportDeclaration: DeclareExportDeclaration,
  21142. DeclareExportAllDeclaration: DeclareExportAllDeclaration,
  21143. EnumDeclaration: EnumDeclaration,
  21144. EnumBooleanBody: EnumBooleanBody,
  21145. EnumNumberBody: EnumNumberBody,
  21146. EnumStringBody: EnumStringBody,
  21147. EnumSymbolBody: EnumSymbolBody,
  21148. EnumDefaultedMember: EnumDefaultedMember,
  21149. EnumBooleanMember: EnumBooleanMember,
  21150. EnumNumberMember: EnumNumberMember,
  21151. EnumStringMember: EnumStringMember,
  21152. ExistsTypeAnnotation: ExistsTypeAnnotation,
  21153. FunctionTypeAnnotation: FunctionTypeAnnotation,
  21154. FunctionTypeParam: FunctionTypeParam,
  21155. InterfaceExtends: InterfaceExtends,
  21156. ClassImplements: InterfaceExtends,
  21157. GenericTypeAnnotation: InterfaceExtends,
  21158. _interfaceish: _interfaceish,
  21159. _variance: _variance,
  21160. InterfaceDeclaration: InterfaceDeclaration,
  21161. InterfaceTypeAnnotation: InterfaceTypeAnnotation,
  21162. IntersectionTypeAnnotation: IntersectionTypeAnnotation,
  21163. MixedTypeAnnotation: MixedTypeAnnotation,
  21164. EmptyTypeAnnotation: EmptyTypeAnnotation,
  21165. NullableTypeAnnotation: NullableTypeAnnotation,
  21166. NumberTypeAnnotation: NumberTypeAnnotation,
  21167. StringTypeAnnotation: StringTypeAnnotation,
  21168. ThisTypeAnnotation: ThisTypeAnnotation,
  21169. TupleTypeAnnotation: TupleTypeAnnotation,
  21170. TypeofTypeAnnotation: TypeofTypeAnnotation,
  21171. TypeAlias: TypeAlias,
  21172. TypeAnnotation: TypeAnnotation,
  21173. TypeParameterInstantiation: TypeParameterInstantiation,
  21174. TypeParameterDeclaration: TypeParameterInstantiation,
  21175. TypeParameter: TypeParameter,
  21176. OpaqueType: OpaqueType,
  21177. ObjectTypeAnnotation: ObjectTypeAnnotation,
  21178. ObjectTypeInternalSlot: ObjectTypeInternalSlot,
  21179. ObjectTypeCallProperty: ObjectTypeCallProperty,
  21180. ObjectTypeIndexer: ObjectTypeIndexer,
  21181. ObjectTypeProperty: ObjectTypeProperty,
  21182. ObjectTypeSpreadProperty: ObjectTypeSpreadProperty,
  21183. QualifiedTypeIdentifier: QualifiedTypeIdentifier,
  21184. SymbolTypeAnnotation: SymbolTypeAnnotation,
  21185. UnionTypeAnnotation: UnionTypeAnnotation,
  21186. TypeCastExpression: TypeCastExpression$1,
  21187. Variance: Variance,
  21188. VoidTypeAnnotation: VoidTypeAnnotation,
  21189. IndexedAccessType: IndexedAccessType,
  21190. OptionalIndexedAccessType: OptionalIndexedAccessType,
  21191. File: File$1,
  21192. Program: Program,
  21193. BlockStatement: BlockStatement,
  21194. Directive: Directive,
  21195. DirectiveLiteral: DirectiveLiteral,
  21196. InterpreterDirective: InterpreterDirective,
  21197. Placeholder: Placeholder,
  21198. JSXAttribute: JSXAttribute,
  21199. JSXIdentifier: JSXIdentifier$1,
  21200. JSXNamespacedName: JSXNamespacedName,
  21201. JSXMemberExpression: JSXMemberExpression,
  21202. JSXSpreadAttribute: JSXSpreadAttribute,
  21203. JSXExpressionContainer: JSXExpressionContainer,
  21204. JSXSpreadChild: JSXSpreadChild,
  21205. JSXText: JSXText$1,
  21206. JSXElement: JSXElement,
  21207. JSXOpeningElement: JSXOpeningElement,
  21208. JSXClosingElement: JSXClosingElement,
  21209. JSXEmptyExpression: JSXEmptyExpression,
  21210. JSXFragment: JSXFragment,
  21211. JSXOpeningFragment: JSXOpeningFragment,
  21212. JSXClosingFragment: JSXClosingFragment,
  21213. TSTypeAnnotation: TSTypeAnnotation,
  21214. TSTypeParameterInstantiation: TSTypeParameterInstantiation,
  21215. TSTypeParameterDeclaration: TSTypeParameterInstantiation,
  21216. TSTypeParameter: TSTypeParameter,
  21217. TSParameterProperty: TSParameterProperty,
  21218. TSDeclareFunction: TSDeclareFunction,
  21219. TSDeclareMethod: TSDeclareMethod,
  21220. TSQualifiedName: TSQualifiedName,
  21221. TSCallSignatureDeclaration: TSCallSignatureDeclaration,
  21222. TSConstructSignatureDeclaration: TSConstructSignatureDeclaration,
  21223. TSPropertySignature: TSPropertySignature,
  21224. tsPrintPropertyOrMethodName: tsPrintPropertyOrMethodName,
  21225. TSMethodSignature: TSMethodSignature,
  21226. TSIndexSignature: TSIndexSignature,
  21227. TSAnyKeyword: TSAnyKeyword,
  21228. TSBigIntKeyword: TSBigIntKeyword,
  21229. TSUnknownKeyword: TSUnknownKeyword,
  21230. TSNumberKeyword: TSNumberKeyword,
  21231. TSObjectKeyword: TSObjectKeyword,
  21232. TSBooleanKeyword: TSBooleanKeyword,
  21233. TSStringKeyword: TSStringKeyword,
  21234. TSSymbolKeyword: TSSymbolKeyword,
  21235. TSVoidKeyword: TSVoidKeyword,
  21236. TSUndefinedKeyword: TSUndefinedKeyword,
  21237. TSNullKeyword: TSNullKeyword,
  21238. TSNeverKeyword: TSNeverKeyword,
  21239. TSIntrinsicKeyword: TSIntrinsicKeyword,
  21240. TSThisType: TSThisType,
  21241. TSFunctionType: TSFunctionType,
  21242. TSConstructorType: TSConstructorType,
  21243. tsPrintFunctionOrConstructorType: tsPrintFunctionOrConstructorType,
  21244. TSTypeReference: TSTypeReference,
  21245. TSTypePredicate: TSTypePredicate,
  21246. TSTypeQuery: TSTypeQuery,
  21247. TSTypeLiteral: TSTypeLiteral,
  21248. tsPrintTypeLiteralOrInterfaceBody: tsPrintTypeLiteralOrInterfaceBody,
  21249. tsPrintBraced: tsPrintBraced,
  21250. TSArrayType: TSArrayType,
  21251. TSTupleType: TSTupleType,
  21252. TSOptionalType: TSOptionalType,
  21253. TSRestType: TSRestType,
  21254. TSNamedTupleMember: TSNamedTupleMember,
  21255. TSUnionType: TSUnionType,
  21256. TSIntersectionType: TSIntersectionType,
  21257. tsPrintUnionOrIntersectionType: tsPrintUnionOrIntersectionType,
  21258. TSConditionalType: TSConditionalType,
  21259. TSInferType: TSInferType,
  21260. TSParenthesizedType: TSParenthesizedType,
  21261. TSTypeOperator: TSTypeOperator,
  21262. TSIndexedAccessType: TSIndexedAccessType,
  21263. TSMappedType: TSMappedType,
  21264. TSLiteralType: TSLiteralType,
  21265. TSExpressionWithTypeArguments: TSExpressionWithTypeArguments,
  21266. TSInterfaceDeclaration: TSInterfaceDeclaration,
  21267. TSInterfaceBody: TSInterfaceBody,
  21268. TSTypeAliasDeclaration: TSTypeAliasDeclaration,
  21269. TSAsExpression: TSAsExpression,
  21270. TSTypeAssertion: TSTypeAssertion,
  21271. TSEnumDeclaration: TSEnumDeclaration,
  21272. TSEnumMember: TSEnumMember,
  21273. TSModuleDeclaration: TSModuleDeclaration,
  21274. TSModuleBlock: TSModuleBlock,
  21275. TSImportType: TSImportType,
  21276. TSImportEqualsDeclaration: TSImportEqualsDeclaration,
  21277. TSExternalModuleReference: TSExternalModuleReference,
  21278. TSNonNullExpression: TSNonNullExpression,
  21279. TSExportAssignment: TSExportAssignment,
  21280. TSNamespaceExportDeclaration: TSNamespaceExportDeclaration,
  21281. tsPrintSignatureDeclarationBase: tsPrintSignatureDeclarationBase,
  21282. tsPrintClassMemberModifiers: tsPrintClassMemberModifiers
  21283. });
  21284. var SCIENTIFIC_NOTATION = /e/i;
  21285. var ZERO_DECIMAL_INTEGER = /\.0+$/;
  21286. var NON_DECIMAL_LITERAL = /^0[box]/;
  21287. var PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
  21288. var Printer = function () {
  21289. function Printer(format, map) {
  21290. this.inForStatementInitCounter = 0;
  21291. this._printStack = [];
  21292. this._indent = 0;
  21293. this._insideAux = false;
  21294. this._parenPushNewlineState = null;
  21295. this._noLineTerminator = false;
  21296. this._printAuxAfterOnNextUserNode = false;
  21297. this._printedComments = new WeakSet();
  21298. this._endsWithInteger = false;
  21299. this._endsWithWord = false;
  21300. this.format = format;
  21301. this._buf = new Buffer(map);
  21302. }
  21303. var _proto = Printer.prototype;
  21304. _proto.generate = function generate(ast) {
  21305. this.print(ast);
  21306. this._maybeAddAuxComment();
  21307. return this._buf.get();
  21308. };
  21309. _proto.indent = function indent() {
  21310. if (this.format.compact || this.format.concise) return;
  21311. this._indent++;
  21312. };
  21313. _proto.dedent = function dedent() {
  21314. if (this.format.compact || this.format.concise) return;
  21315. this._indent--;
  21316. };
  21317. _proto.semicolon = function semicolon(force) {
  21318. if (force === void 0) {
  21319. force = false;
  21320. }
  21321. this._maybeAddAuxComment();
  21322. this._append(";", !force);
  21323. };
  21324. _proto.rightBrace = function rightBrace() {
  21325. if (this.format.minified) {
  21326. this._buf.removeLastSemicolon();
  21327. }
  21328. this.token("}");
  21329. };
  21330. _proto.space = function space(force) {
  21331. if (force === void 0) {
  21332. force = false;
  21333. }
  21334. if (this.format.compact) return;
  21335. if (this._buf.hasContent() && !this.endsWith(" ") && !this.endsWith("\n") || force) {
  21336. this._space();
  21337. }
  21338. };
  21339. _proto.word = function word(str) {
  21340. if (this._endsWithWord || this.endsWith("/") && str.indexOf("/") === 0) {
  21341. this._space();
  21342. }
  21343. this._maybeAddAuxComment();
  21344. this._append(str);
  21345. this._endsWithWord = true;
  21346. };
  21347. _proto.number = function number(str) {
  21348. this.word(str);
  21349. this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== ".";
  21350. };
  21351. _proto.token = function token(str) {
  21352. if (str === "--" && this.endsWith("!") || str[0] === "+" && this.endsWith("+") || str[0] === "-" && this.endsWith("-") || str[0] === "." && this._endsWithInteger) {
  21353. this._space();
  21354. }
  21355. this._maybeAddAuxComment();
  21356. this._append(str);
  21357. };
  21358. _proto.newline = function newline(i) {
  21359. if (this.format.retainLines || this.format.compact) return;
  21360. if (this.format.concise) {
  21361. this.space();
  21362. return;
  21363. }
  21364. if (this.endsWith("\n\n")) return;
  21365. if (typeof i !== "number") i = 1;
  21366. i = Math.min(2, i);
  21367. if (this.endsWith("{\n") || this.endsWith(":\n")) i--;
  21368. if (i <= 0) return;
  21369. for (var j = 0; j < i; j++) {
  21370. this._newline();
  21371. }
  21372. };
  21373. _proto.endsWith = function endsWith(str) {
  21374. return this._buf.endsWith(str);
  21375. };
  21376. _proto.removeTrailingNewline = function removeTrailingNewline() {
  21377. this._buf.removeTrailingNewline();
  21378. };
  21379. _proto.exactSource = function exactSource(loc, cb) {
  21380. this._catchUp("start", loc);
  21381. this._buf.exactSource(loc, cb);
  21382. };
  21383. _proto.source = function source(prop, loc) {
  21384. this._catchUp(prop, loc);
  21385. this._buf.source(prop, loc);
  21386. };
  21387. _proto.withSource = function withSource(prop, loc, cb) {
  21388. this._catchUp(prop, loc);
  21389. this._buf.withSource(prop, loc, cb);
  21390. };
  21391. _proto._space = function _space() {
  21392. this._append(" ", true);
  21393. };
  21394. _proto._newline = function _newline() {
  21395. this._append("\n", true);
  21396. };
  21397. _proto._append = function _append(str, queue) {
  21398. if (queue === void 0) {
  21399. queue = false;
  21400. }
  21401. this._maybeAddParen(str);
  21402. this._maybeIndent(str);
  21403. if (queue) this._buf.queue(str);else this._buf.append(str);
  21404. this._endsWithWord = false;
  21405. this._endsWithInteger = false;
  21406. };
  21407. _proto._maybeIndent = function _maybeIndent(str) {
  21408. if (this._indent && this.endsWith("\n") && str[0] !== "\n") {
  21409. this._buf.queue(this._getIndent());
  21410. }
  21411. };
  21412. _proto._maybeAddParen = function _maybeAddParen(str) {
  21413. var parenPushNewlineState = this._parenPushNewlineState;
  21414. if (!parenPushNewlineState) return;
  21415. var i;
  21416. for (i = 0; i < str.length && str[i] === " "; i++) {
  21417. continue;
  21418. }
  21419. if (i === str.length) {
  21420. return;
  21421. }
  21422. var cha = str[i];
  21423. if (cha !== "\n") {
  21424. if (cha !== "/" || i + 1 === str.length) {
  21425. this._parenPushNewlineState = null;
  21426. return;
  21427. }
  21428. var chaPost = str[i + 1];
  21429. if (chaPost === "*") {
  21430. if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
  21431. return;
  21432. }
  21433. } else if (chaPost !== "/") {
  21434. this._parenPushNewlineState = null;
  21435. return;
  21436. }
  21437. }
  21438. this.token("(");
  21439. this.indent();
  21440. parenPushNewlineState.printed = true;
  21441. };
  21442. _proto._catchUp = function _catchUp(prop, loc) {
  21443. if (!this.format.retainLines) return;
  21444. var pos = loc ? loc[prop] : null;
  21445. if ((pos == null ? void 0 : pos.line) != null) {
  21446. var count = pos.line - this._buf.getCurrentLine();
  21447. for (var i = 0; i < count; i++) {
  21448. this._newline();
  21449. }
  21450. }
  21451. };
  21452. _proto._getIndent = function _getIndent() {
  21453. return this.format.indent.style.repeat(this._indent);
  21454. };
  21455. _proto.startTerminatorless = function startTerminatorless(isLabel) {
  21456. if (isLabel === void 0) {
  21457. isLabel = false;
  21458. }
  21459. if (isLabel) {
  21460. this._noLineTerminator = true;
  21461. return null;
  21462. } else {
  21463. return this._parenPushNewlineState = {
  21464. printed: false
  21465. };
  21466. }
  21467. };
  21468. _proto.endTerminatorless = function endTerminatorless(state) {
  21469. this._noLineTerminator = false;
  21470. if (state != null && state.printed) {
  21471. this.dedent();
  21472. this.newline();
  21473. this.token(")");
  21474. }
  21475. };
  21476. _proto.print = function print(node, parent) {
  21477. var _this = this;
  21478. if (!node) return;
  21479. var oldConcise = this.format.concise;
  21480. if (node._compact) {
  21481. this.format.concise = true;
  21482. }
  21483. var printMethod = this[node.type];
  21484. if (!printMethod) {
  21485. throw new ReferenceError("unknown node of type " + JSON.stringify(node.type) + " with constructor " + JSON.stringify(node == null ? void 0 : node.constructor.name));
  21486. }
  21487. this._printStack.push(node);
  21488. var oldInAux = this._insideAux;
  21489. this._insideAux = !node.loc;
  21490. this._maybeAddAuxComment(this._insideAux && !oldInAux);
  21491. var needsParens$1 = needsParens(node, parent, this._printStack);
  21492. if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
  21493. needsParens$1 = true;
  21494. }
  21495. if (needsParens$1) this.token("(");
  21496. this._printLeadingComments(node);
  21497. var loc = isProgram(node) || isFile(node) ? null : node.loc;
  21498. this.withSource("start", loc, function () {
  21499. printMethod.call(_this, node, parent);
  21500. });
  21501. this._printTrailingComments(node);
  21502. if (needsParens$1) this.token(")");
  21503. this._printStack.pop();
  21504. this.format.concise = oldConcise;
  21505. this._insideAux = oldInAux;
  21506. };
  21507. _proto._maybeAddAuxComment = function _maybeAddAuxComment(enteredPositionlessNode) {
  21508. if (enteredPositionlessNode) this._printAuxBeforeComment();
  21509. if (!this._insideAux) this._printAuxAfterComment();
  21510. };
  21511. _proto._printAuxBeforeComment = function _printAuxBeforeComment() {
  21512. if (this._printAuxAfterOnNextUserNode) return;
  21513. this._printAuxAfterOnNextUserNode = true;
  21514. var comment = this.format.auxiliaryCommentBefore;
  21515. if (comment) {
  21516. this._printComment({
  21517. type: "CommentBlock",
  21518. value: comment
  21519. });
  21520. }
  21521. };
  21522. _proto._printAuxAfterComment = function _printAuxAfterComment() {
  21523. if (!this._printAuxAfterOnNextUserNode) return;
  21524. this._printAuxAfterOnNextUserNode = false;
  21525. var comment = this.format.auxiliaryCommentAfter;
  21526. if (comment) {
  21527. this._printComment({
  21528. type: "CommentBlock",
  21529. value: comment
  21530. });
  21531. }
  21532. };
  21533. _proto.getPossibleRaw = function getPossibleRaw(node) {
  21534. var extra = node.extra;
  21535. if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
  21536. return extra.raw;
  21537. }
  21538. };
  21539. _proto.printJoin = function printJoin(nodes, parent, opts) {
  21540. if (opts === void 0) {
  21541. opts = {};
  21542. }
  21543. if (!(nodes != null && nodes.length)) return;
  21544. if (opts.indent) this.indent();
  21545. var newlineOpts = {
  21546. addNewlines: opts.addNewlines
  21547. };
  21548. for (var i = 0; i < nodes.length; i++) {
  21549. var node = nodes[i];
  21550. if (!node) continue;
  21551. if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
  21552. this.print(node, parent);
  21553. if (opts.iterator) {
  21554. opts.iterator(node, i);
  21555. }
  21556. if (opts.separator && i < nodes.length - 1) {
  21557. opts.separator.call(this);
  21558. }
  21559. if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
  21560. }
  21561. if (opts.indent) this.dedent();
  21562. };
  21563. _proto.printAndIndentOnComments = function printAndIndentOnComments(node, parent) {
  21564. var indent = node.leadingComments && node.leadingComments.length > 0;
  21565. if (indent) this.indent();
  21566. this.print(node, parent);
  21567. if (indent) this.dedent();
  21568. };
  21569. _proto.printBlock = function printBlock(parent) {
  21570. var node = parent.body;
  21571. if (!isEmptyStatement(node)) {
  21572. this.space();
  21573. }
  21574. this.print(node, parent);
  21575. };
  21576. _proto._printTrailingComments = function _printTrailingComments(node) {
  21577. this._printComments(this._getComments(false, node));
  21578. };
  21579. _proto._printLeadingComments = function _printLeadingComments(node) {
  21580. this._printComments(this._getComments(true, node), true);
  21581. };
  21582. _proto.printInnerComments = function printInnerComments(node, indent) {
  21583. var _node$innerComments;
  21584. if (indent === void 0) {
  21585. indent = true;
  21586. }
  21587. if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length)) return;
  21588. if (indent) this.indent();
  21589. this._printComments(node.innerComments);
  21590. if (indent) this.dedent();
  21591. };
  21592. _proto.printSequence = function printSequence(nodes, parent, opts) {
  21593. if (opts === void 0) {
  21594. opts = {};
  21595. }
  21596. opts.statement = true;
  21597. return this.printJoin(nodes, parent, opts);
  21598. };
  21599. _proto.printList = function printList(items, parent, opts) {
  21600. if (opts === void 0) {
  21601. opts = {};
  21602. }
  21603. if (opts.separator == null) {
  21604. opts.separator = commaSeparator;
  21605. }
  21606. return this.printJoin(items, parent, opts);
  21607. };
  21608. _proto._printNewline = function _printNewline(leading, node, parent, opts) {
  21609. if (this.format.retainLines || this.format.compact) return;
  21610. if (this.format.concise) {
  21611. this.space();
  21612. return;
  21613. }
  21614. var lines = 0;
  21615. if (this._buf.hasContent()) {
  21616. if (!leading) lines++;
  21617. if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
  21618. var needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;
  21619. if (needs(node, parent)) lines++;
  21620. }
  21621. this.newline(lines);
  21622. };
  21623. _proto._getComments = function _getComments(leading, node) {
  21624. return node && (leading ? node.leadingComments : node.trailingComments) || [];
  21625. };
  21626. _proto._printComment = function _printComment(comment, skipNewLines) {
  21627. var _this2 = this;
  21628. if (!this.format.shouldPrintComment(comment.value)) return;
  21629. if (comment.ignore) return;
  21630. if (this._printedComments.has(comment)) return;
  21631. this._printedComments.add(comment);
  21632. var isBlockComment = comment.type === "CommentBlock";
  21633. var printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
  21634. if (printNewLines && this._buf.hasContent()) this.newline(1);
  21635. if (!this.endsWith("[") && !this.endsWith("{")) this.space();
  21636. var val = !isBlockComment && !this._noLineTerminator ? "//" + comment.value + "\n" : "/*" + comment.value + "*/";
  21637. if (isBlockComment && this.format.indent.adjustMultilineComment) {
  21638. var _comment$loc;
  21639. var offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column;
  21640. if (offset) {
  21641. var newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
  21642. val = val.replace(newlineRegex, "\n");
  21643. }
  21644. var indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
  21645. val = val.replace(/\n(?!$)/g, "\n" + " ".repeat(indentSize));
  21646. }
  21647. if (this.endsWith("/")) this._space();
  21648. this.withSource("start", comment.loc, function () {
  21649. _this2._append(val);
  21650. });
  21651. if (printNewLines) this.newline(1);
  21652. };
  21653. _proto._printComments = function _printComments(comments, inlinePureAnnotation) {
  21654. if (!(comments != null && comments.length)) return;
  21655. if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
  21656. this._printComment(comments[0], this._buf.hasContent() && !this.endsWith("\n"));
  21657. } else {
  21658. for (var _iterator = _createForOfIteratorHelperLoose(comments), _step; !(_step = _iterator()).done;) {
  21659. var _comment = _step.value;
  21660. this._printComment(_comment);
  21661. }
  21662. }
  21663. };
  21664. _proto.printAssertions = function printAssertions(node) {
  21665. var _node$assertions;
  21666. if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
  21667. this.space();
  21668. this.word("assert");
  21669. this.space();
  21670. this.token("{");
  21671. this.space();
  21672. this.printList(node.assertions, node);
  21673. this.space();
  21674. this.token("}");
  21675. }
  21676. };
  21677. return Printer;
  21678. }();
  21679. Object.assign(Printer.prototype, generatorFunctions);
  21680. {
  21681. Printer.prototype.Noop = function Noop() {};
  21682. }
  21683. function commaSeparator() {
  21684. this.token(",");
  21685. this.space();
  21686. }
  21687. var Generator = function (_Printer) {
  21688. _inherits(Generator, _Printer);
  21689. function Generator(ast, opts, code) {
  21690. var _this;
  21691. if (opts === void 0) {
  21692. opts = {};
  21693. }
  21694. var format = normalizeOptions$6(code, opts);
  21695. var map = opts.sourceMaps ? new SourceMap(opts, code) : null;
  21696. _this = _Printer.call(this, format, map) || this;
  21697. _this.ast = void 0;
  21698. _this.ast = ast;
  21699. return _this;
  21700. }
  21701. var _proto = Generator.prototype;
  21702. _proto.generate = function generate() {
  21703. return _Printer.prototype.generate.call(this, this.ast);
  21704. };
  21705. return Generator;
  21706. }(Printer);
  21707. function normalizeOptions$6(code, opts) {
  21708. var format = {
  21709. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  21710. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  21711. shouldPrintComment: opts.shouldPrintComment,
  21712. retainLines: opts.retainLines,
  21713. retainFunctionParens: opts.retainFunctionParens,
  21714. comments: opts.comments == null || opts.comments,
  21715. compact: opts.compact,
  21716. minified: opts.minified,
  21717. concise: opts.concise,
  21718. indent: {
  21719. adjustMultilineComment: true,
  21720. style: " ",
  21721. base: 0
  21722. },
  21723. decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
  21724. jsescOption: Object.assign({
  21725. quotes: "double",
  21726. wrap: true,
  21727. minimal: false
  21728. }, opts.jsescOption),
  21729. recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType
  21730. };
  21731. {
  21732. format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
  21733. }
  21734. if (format.minified) {
  21735. format.compact = true;
  21736. format.shouldPrintComment = format.shouldPrintComment || function () {
  21737. return format.comments;
  21738. };
  21739. } else {
  21740. format.shouldPrintComment = format.shouldPrintComment || function (value) {
  21741. return format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0;
  21742. };
  21743. }
  21744. if (format.compact === "auto") {
  21745. format.compact = code.length > 500000;
  21746. if (format.compact) {
  21747. console.error("[BABEL] Note: The code generator has deoptimised the styling of " + (opts.filename + " as it exceeds the max of " + "500KB" + "."));
  21748. }
  21749. }
  21750. if (format.compact) {
  21751. format.indent.adjustMultilineComment = false;
  21752. }
  21753. return format;
  21754. }
  21755. function generate$1(ast, opts, code) {
  21756. var gen = new Generator(ast, opts, code);
  21757. return gen.generate();
  21758. }
  21759. function findParent(callback) {
  21760. var path = this;
  21761. while (path = path.parentPath) {
  21762. if (callback(path)) return path;
  21763. }
  21764. return null;
  21765. }
  21766. function find$1(callback) {
  21767. var path = this;
  21768. do {
  21769. if (callback(path)) return path;
  21770. } while (path = path.parentPath);
  21771. return null;
  21772. }
  21773. function getFunctionParent() {
  21774. return this.findParent(function (p) {
  21775. return p.isFunction();
  21776. });
  21777. }
  21778. function getStatementParent() {
  21779. var path = this;
  21780. do {
  21781. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  21782. break;
  21783. } else {
  21784. path = path.parentPath;
  21785. }
  21786. } while (path);
  21787. if (path && (path.isProgram() || path.isFile())) {
  21788. throw new Error("File/Program node, we can't possibly find a statement parent to this");
  21789. }
  21790. return path;
  21791. }
  21792. function getEarliestCommonAncestorFrom(paths) {
  21793. return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
  21794. var earliest;
  21795. var keys = VISITOR_KEYS[deepest.type];
  21796. for (var _iterator = _createForOfIteratorHelperLoose(ancestries), _step; !(_step = _iterator()).done;) {
  21797. var ancestry = _step.value;
  21798. var path = ancestry[i + 1];
  21799. if (!earliest) {
  21800. earliest = path;
  21801. continue;
  21802. }
  21803. if (path.listKey && earliest.listKey === path.listKey) {
  21804. if (path.key < earliest.key) {
  21805. earliest = path;
  21806. continue;
  21807. }
  21808. }
  21809. var earliestKeyIndex = keys.indexOf(earliest.parentKey);
  21810. var currentKeyIndex = keys.indexOf(path.parentKey);
  21811. if (earliestKeyIndex > currentKeyIndex) {
  21812. earliest = path;
  21813. }
  21814. }
  21815. return earliest;
  21816. });
  21817. }
  21818. function getDeepestCommonAncestorFrom(paths, filter) {
  21819. var _this = this;
  21820. if (!paths.length) {
  21821. return this;
  21822. }
  21823. if (paths.length === 1) {
  21824. return paths[0];
  21825. }
  21826. var minDepth = Infinity;
  21827. var lastCommonIndex, lastCommon;
  21828. var ancestries = paths.map(function (path) {
  21829. var ancestry = [];
  21830. do {
  21831. ancestry.unshift(path);
  21832. } while ((path = path.parentPath) && path !== _this);
  21833. if (ancestry.length < minDepth) {
  21834. minDepth = ancestry.length;
  21835. }
  21836. return ancestry;
  21837. });
  21838. var first = ancestries[0];
  21839. depthLoop: for (var _i = 0; _i < minDepth; _i++) {
  21840. var shouldMatch = first[_i];
  21841. for (var _iterator2 = _createForOfIteratorHelperLoose(ancestries), _step2; !(_step2 = _iterator2()).done;) {
  21842. var ancestry = _step2.value;
  21843. if (ancestry[_i] !== shouldMatch) {
  21844. break depthLoop;
  21845. }
  21846. }
  21847. lastCommonIndex = _i;
  21848. lastCommon = shouldMatch;
  21849. }
  21850. if (lastCommon) {
  21851. if (filter) {
  21852. return filter(lastCommon, lastCommonIndex, ancestries);
  21853. } else {
  21854. return lastCommon;
  21855. }
  21856. } else {
  21857. throw new Error("Couldn't find intersection");
  21858. }
  21859. }
  21860. function getAncestry() {
  21861. var path = this;
  21862. var paths = [];
  21863. do {
  21864. paths.push(path);
  21865. } while (path = path.parentPath);
  21866. return paths;
  21867. }
  21868. function isAncestor(maybeDescendant) {
  21869. return maybeDescendant.isDescendant(this);
  21870. }
  21871. function isDescendant(maybeAncestor) {
  21872. return !!this.findParent(function (parent) {
  21873. return parent === maybeAncestor;
  21874. });
  21875. }
  21876. function inType() {
  21877. var path = this;
  21878. for (var _len = arguments.length, candidateTypes = new Array(_len), _key = 0; _key < _len; _key++) {
  21879. candidateTypes[_key] = arguments[_key];
  21880. }
  21881. while (path) {
  21882. for (var _iterator3 = _createForOfIteratorHelperLoose(candidateTypes), _step3; !(_step3 = _iterator3()).done;) {
  21883. var type = _step3.value;
  21884. if (path.node.type === type) return true;
  21885. }
  21886. path = path.parentPath;
  21887. }
  21888. return false;
  21889. }
  21890. var NodePath_ancestry = /*#__PURE__*/Object.freeze({
  21891. __proto__: null,
  21892. findParent: findParent,
  21893. find: find$1,
  21894. getFunctionParent: getFunctionParent,
  21895. getStatementParent: getStatementParent,
  21896. getEarliestCommonAncestorFrom: getEarliestCommonAncestorFrom,
  21897. getDeepestCommonAncestorFrom: getDeepestCommonAncestorFrom,
  21898. getAncestry: getAncestry,
  21899. isAncestor: isAncestor,
  21900. isDescendant: isDescendant,
  21901. inType: inType
  21902. });
  21903. function infererReference (node) {
  21904. if (!this.isReferenced()) return;
  21905. var binding = this.scope.getBinding(node.name);
  21906. if (binding) {
  21907. if (binding.identifier.typeAnnotation) {
  21908. return binding.identifier.typeAnnotation;
  21909. } else {
  21910. return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
  21911. }
  21912. }
  21913. if (node.name === "undefined") {
  21914. return voidTypeAnnotation();
  21915. } else if (node.name === "NaN" || node.name === "Infinity") {
  21916. return numberTypeAnnotation();
  21917. } else if (node.name === "arguments") ;
  21918. }
  21919. function getTypeAnnotationBindingConstantViolations(binding, path, name) {
  21920. var types = [];
  21921. var functionConstantViolations = [];
  21922. var constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
  21923. var testType = getConditionalAnnotation(binding, path, name);
  21924. if (testType) {
  21925. var testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
  21926. constantViolations = constantViolations.filter(function (path) {
  21927. return testConstantViolations.indexOf(path) < 0;
  21928. });
  21929. types.push(testType.typeAnnotation);
  21930. }
  21931. if (constantViolations.length) {
  21932. constantViolations = constantViolations.concat(functionConstantViolations);
  21933. for (var _iterator = _createForOfIteratorHelperLoose(constantViolations), _step; !(_step = _iterator()).done;) {
  21934. var violation = _step.value;
  21935. types.push(violation.getTypeAnnotation());
  21936. }
  21937. }
  21938. if (!types.length) {
  21939. return;
  21940. }
  21941. if (isTSTypeAnnotation(types[0]) && createTSUnionType) {
  21942. return createTSUnionType(types);
  21943. }
  21944. if (createFlowUnionType) {
  21945. return createFlowUnionType(types);
  21946. }
  21947. return createFlowUnionType(types);
  21948. }
  21949. function getConstantViolationsBefore(binding, path, functions) {
  21950. var violations = binding.constantViolations.slice();
  21951. violations.unshift(binding.path);
  21952. return violations.filter(function (violation) {
  21953. violation = violation.resolve();
  21954. var status = violation._guessExecutionStatusRelativeTo(path);
  21955. if (functions && status === "unknown") functions.push(violation);
  21956. return status === "before";
  21957. });
  21958. }
  21959. function inferAnnotationFromBinaryExpression(name, path) {
  21960. var operator = path.node.operator;
  21961. var right = path.get("right").resolve();
  21962. var left = path.get("left").resolve();
  21963. var target;
  21964. if (left.isIdentifier({
  21965. name: name
  21966. })) {
  21967. target = right;
  21968. } else if (right.isIdentifier({
  21969. name: name
  21970. })) {
  21971. target = left;
  21972. }
  21973. if (target) {
  21974. if (operator === "===") {
  21975. return target.getTypeAnnotation();
  21976. }
  21977. if (BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  21978. return numberTypeAnnotation();
  21979. }
  21980. return;
  21981. }
  21982. if (operator !== "===" && operator !== "==") return;
  21983. var typeofPath;
  21984. var typePath;
  21985. if (left.isUnaryExpression({
  21986. operator: "typeof"
  21987. })) {
  21988. typeofPath = left;
  21989. typePath = right;
  21990. } else if (right.isUnaryExpression({
  21991. operator: "typeof"
  21992. })) {
  21993. typeofPath = right;
  21994. typePath = left;
  21995. }
  21996. if (!typeofPath) return;
  21997. if (!typeofPath.get("argument").isIdentifier({
  21998. name: name
  21999. })) return;
  22000. typePath = typePath.resolve();
  22001. if (!typePath.isLiteral()) return;
  22002. var typeValue = typePath.node.value;
  22003. if (typeof typeValue !== "string") return;
  22004. return createTypeAnnotationBasedOnTypeof(typeValue);
  22005. }
  22006. function getParentConditionalPath(binding, path, name) {
  22007. var parentPath;
  22008. while (parentPath = path.parentPath) {
  22009. if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
  22010. if (path.key === "test") {
  22011. return;
  22012. }
  22013. return parentPath;
  22014. }
  22015. if (parentPath.isFunction()) {
  22016. if (parentPath.parentPath.scope.getBinding(name) !== binding) return;
  22017. }
  22018. path = parentPath;
  22019. }
  22020. }
  22021. function getConditionalAnnotation(binding, path, name) {
  22022. var ifStatement = getParentConditionalPath(binding, path, name);
  22023. if (!ifStatement) return;
  22024. var test = ifStatement.get("test");
  22025. var paths = [test];
  22026. var types = [];
  22027. for (var i = 0; i < paths.length; i++) {
  22028. var _path = paths[i];
  22029. if (_path.isLogicalExpression()) {
  22030. if (_path.node.operator === "&&") {
  22031. paths.push(_path.get("left"));
  22032. paths.push(_path.get("right"));
  22033. }
  22034. } else if (_path.isBinaryExpression()) {
  22035. var type = inferAnnotationFromBinaryExpression(name, _path);
  22036. if (type) types.push(type);
  22037. }
  22038. }
  22039. if (types.length) {
  22040. if (isTSTypeAnnotation(types[0]) && createTSUnionType) {
  22041. return {
  22042. typeAnnotation: createTSUnionType(types),
  22043. ifStatement: ifStatement
  22044. };
  22045. }
  22046. if (createFlowUnionType) {
  22047. return {
  22048. typeAnnotation: createFlowUnionType(types),
  22049. ifStatement: ifStatement
  22050. };
  22051. }
  22052. return {
  22053. typeAnnotation: createFlowUnionType(types),
  22054. ifStatement: ifStatement
  22055. };
  22056. }
  22057. return getConditionalAnnotation(ifStatement, name);
  22058. }
  22059. function VariableDeclarator() {
  22060. var _type;
  22061. var id = this.get("id");
  22062. if (!id.isIdentifier()) return;
  22063. var init = this.get("init");
  22064. var type = init.getTypeAnnotation();
  22065. if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
  22066. if (init.isCallExpression() && init.get("callee").isIdentifier({
  22067. name: "Array"
  22068. }) && !init.scope.hasBinding("Array", true)) {
  22069. type = ArrayExpression();
  22070. }
  22071. }
  22072. return type;
  22073. }
  22074. function TypeCastExpression(node) {
  22075. return node.typeAnnotation;
  22076. }
  22077. TypeCastExpression.validParent = true;
  22078. function NewExpression(node) {
  22079. if (this.get("callee").isIdentifier()) {
  22080. return genericTypeAnnotation(node.callee);
  22081. }
  22082. }
  22083. function TemplateLiteral() {
  22084. return stringTypeAnnotation();
  22085. }
  22086. function UnaryExpression(node) {
  22087. var operator = node.operator;
  22088. if (operator === "void") {
  22089. return voidTypeAnnotation();
  22090. } else if (NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
  22091. return numberTypeAnnotation();
  22092. } else if (STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
  22093. return stringTypeAnnotation();
  22094. } else if (BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
  22095. return booleanTypeAnnotation();
  22096. }
  22097. }
  22098. function BinaryExpression(node) {
  22099. var operator = node.operator;
  22100. if (NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
  22101. return numberTypeAnnotation();
  22102. } else if (BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
  22103. return booleanTypeAnnotation();
  22104. } else if (operator === "+") {
  22105. var right = this.get("right");
  22106. var left = this.get("left");
  22107. if (left.isBaseType("number") && right.isBaseType("number")) {
  22108. return numberTypeAnnotation();
  22109. } else if (left.isBaseType("string") || right.isBaseType("string")) {
  22110. return stringTypeAnnotation();
  22111. }
  22112. return unionTypeAnnotation([stringTypeAnnotation(), numberTypeAnnotation()]);
  22113. }
  22114. }
  22115. function LogicalExpression() {
  22116. var argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
  22117. if (isTSTypeAnnotation(argumentTypes[0]) && createTSUnionType) {
  22118. return createTSUnionType(argumentTypes);
  22119. }
  22120. if (createFlowUnionType) {
  22121. return createFlowUnionType(argumentTypes);
  22122. }
  22123. return createFlowUnionType(argumentTypes);
  22124. }
  22125. function ConditionalExpression() {
  22126. var argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
  22127. if (isTSTypeAnnotation(argumentTypes[0]) && createTSUnionType) {
  22128. return createTSUnionType(argumentTypes);
  22129. }
  22130. if (createFlowUnionType) {
  22131. return createFlowUnionType(argumentTypes);
  22132. }
  22133. return createFlowUnionType(argumentTypes);
  22134. }
  22135. function SequenceExpression() {
  22136. return this.get("expressions").pop().getTypeAnnotation();
  22137. }
  22138. function ParenthesizedExpression() {
  22139. return this.get("expression").getTypeAnnotation();
  22140. }
  22141. function AssignmentExpression() {
  22142. return this.get("right").getTypeAnnotation();
  22143. }
  22144. function UpdateExpression(node) {
  22145. var operator = node.operator;
  22146. if (operator === "++" || operator === "--") {
  22147. return numberTypeAnnotation();
  22148. }
  22149. }
  22150. function StringLiteral$1() {
  22151. return stringTypeAnnotation();
  22152. }
  22153. function NumericLiteral$1() {
  22154. return numberTypeAnnotation();
  22155. }
  22156. function BooleanLiteral() {
  22157. return booleanTypeAnnotation();
  22158. }
  22159. function NullLiteral() {
  22160. return nullLiteralTypeAnnotation();
  22161. }
  22162. function RegExpLiteral() {
  22163. return genericTypeAnnotation(identifier("RegExp"));
  22164. }
  22165. function ObjectExpression() {
  22166. return genericTypeAnnotation(identifier("Object"));
  22167. }
  22168. function ArrayExpression() {
  22169. return genericTypeAnnotation(identifier("Array"));
  22170. }
  22171. function RestElement() {
  22172. return ArrayExpression();
  22173. }
  22174. RestElement.validParent = true;
  22175. function Func() {
  22176. return genericTypeAnnotation(identifier("Function"));
  22177. }
  22178. var isArrayFrom = buildMatchMemberExpression("Array.from");
  22179. var isObjectKeys = buildMatchMemberExpression("Object.keys");
  22180. var isObjectValues = buildMatchMemberExpression("Object.values");
  22181. var isObjectEntries = buildMatchMemberExpression("Object.entries");
  22182. function CallExpression() {
  22183. var callee = this.node.callee;
  22184. if (isObjectKeys(callee)) {
  22185. return arrayTypeAnnotation(stringTypeAnnotation());
  22186. } else if (isArrayFrom(callee) || isObjectValues(callee)) {
  22187. return arrayTypeAnnotation(anyTypeAnnotation());
  22188. } else if (isObjectEntries(callee)) {
  22189. return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(), anyTypeAnnotation()]));
  22190. }
  22191. return resolveCall(this.get("callee"));
  22192. }
  22193. function TaggedTemplateExpression() {
  22194. return resolveCall(this.get("tag"));
  22195. }
  22196. function resolveCall(callee) {
  22197. callee = callee.resolve();
  22198. if (callee.isFunction()) {
  22199. if (callee.is("async")) {
  22200. if (callee.is("generator")) {
  22201. return genericTypeAnnotation(identifier("AsyncIterator"));
  22202. } else {
  22203. return genericTypeAnnotation(identifier("Promise"));
  22204. }
  22205. } else {
  22206. if (callee.node.returnType) {
  22207. return callee.node.returnType;
  22208. }
  22209. }
  22210. }
  22211. }
  22212. var inferers = /*#__PURE__*/Object.freeze({
  22213. __proto__: null,
  22214. VariableDeclarator: VariableDeclarator,
  22215. TypeCastExpression: TypeCastExpression,
  22216. NewExpression: NewExpression,
  22217. TemplateLiteral: TemplateLiteral,
  22218. UnaryExpression: UnaryExpression,
  22219. BinaryExpression: BinaryExpression,
  22220. LogicalExpression: LogicalExpression,
  22221. ConditionalExpression: ConditionalExpression,
  22222. SequenceExpression: SequenceExpression,
  22223. ParenthesizedExpression: ParenthesizedExpression,
  22224. AssignmentExpression: AssignmentExpression,
  22225. UpdateExpression: UpdateExpression,
  22226. StringLiteral: StringLiteral$1,
  22227. NumericLiteral: NumericLiteral$1,
  22228. BooleanLiteral: BooleanLiteral,
  22229. NullLiteral: NullLiteral,
  22230. RegExpLiteral: RegExpLiteral,
  22231. ObjectExpression: ObjectExpression,
  22232. ArrayExpression: ArrayExpression,
  22233. RestElement: RestElement,
  22234. FunctionExpression: Func,
  22235. ArrowFunctionExpression: Func,
  22236. FunctionDeclaration: Func,
  22237. ClassExpression: Func,
  22238. ClassDeclaration: Func,
  22239. CallExpression: CallExpression,
  22240. TaggedTemplateExpression: TaggedTemplateExpression,
  22241. Identifier: infererReference
  22242. });
  22243. function getTypeAnnotation() {
  22244. if (this.typeAnnotation) return this.typeAnnotation;
  22245. var type = this._getTypeAnnotation() || anyTypeAnnotation();
  22246. if (isTypeAnnotation(type)) type = type.typeAnnotation;
  22247. return this.typeAnnotation = type;
  22248. }
  22249. var typeAnnotationInferringNodes = new WeakSet();
  22250. function _getTypeAnnotation() {
  22251. var node = this.node;
  22252. if (!node) {
  22253. if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
  22254. var declar = this.parentPath.parentPath;
  22255. var declarParent = declar.parentPath;
  22256. if (declar.key === "left" && declarParent.isForInStatement()) {
  22257. return stringTypeAnnotation();
  22258. }
  22259. if (declar.key === "left" && declarParent.isForOfStatement()) {
  22260. return anyTypeAnnotation();
  22261. }
  22262. return voidTypeAnnotation();
  22263. } else {
  22264. return;
  22265. }
  22266. }
  22267. if (node.typeAnnotation) {
  22268. return node.typeAnnotation;
  22269. }
  22270. if (typeAnnotationInferringNodes.has(node)) {
  22271. return;
  22272. }
  22273. typeAnnotationInferringNodes.add(node);
  22274. try {
  22275. var _inferer;
  22276. var inferer = inferers[node.type];
  22277. if (inferer) {
  22278. return inferer.call(this, node);
  22279. }
  22280. inferer = inferers[this.parentPath.type];
  22281. if ((_inferer = inferer) != null && _inferer.validParent) {
  22282. return this.parentPath.getTypeAnnotation();
  22283. }
  22284. } finally {
  22285. typeAnnotationInferringNodes["delete"](node);
  22286. }
  22287. }
  22288. function isBaseType(baseName, soft) {
  22289. return _isBaseType(baseName, this.getTypeAnnotation(), soft);
  22290. }
  22291. function _isBaseType(baseName, type, soft) {
  22292. if (baseName === "string") {
  22293. return isStringTypeAnnotation(type);
  22294. } else if (baseName === "number") {
  22295. return isNumberTypeAnnotation(type);
  22296. } else if (baseName === "boolean") {
  22297. return isBooleanTypeAnnotation(type);
  22298. } else if (baseName === "any") {
  22299. return isAnyTypeAnnotation(type);
  22300. } else if (baseName === "mixed") {
  22301. return isMixedTypeAnnotation(type);
  22302. } else if (baseName === "empty") {
  22303. return isEmptyTypeAnnotation(type);
  22304. } else if (baseName === "void") {
  22305. return isVoidTypeAnnotation(type);
  22306. } else {
  22307. if (soft) {
  22308. return false;
  22309. } else {
  22310. throw new Error("Unknown base type " + baseName);
  22311. }
  22312. }
  22313. }
  22314. function couldBeBaseType(name) {
  22315. var type = this.getTypeAnnotation();
  22316. if (isAnyTypeAnnotation(type)) return true;
  22317. if (isUnionTypeAnnotation(type)) {
  22318. for (var _iterator = _createForOfIteratorHelperLoose(type.types), _step; !(_step = _iterator()).done;) {
  22319. var type2 = _step.value;
  22320. if (isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
  22321. return true;
  22322. }
  22323. }
  22324. return false;
  22325. } else {
  22326. return _isBaseType(name, type, true);
  22327. }
  22328. }
  22329. function baseTypeStrictlyMatches(rightArg) {
  22330. var left = this.getTypeAnnotation();
  22331. var right = rightArg.getTypeAnnotation();
  22332. if (!isAnyTypeAnnotation(left) && isFlowBaseAnnotation(left)) {
  22333. return right.type === left.type;
  22334. }
  22335. return false;
  22336. }
  22337. function isGenericType(genericName) {
  22338. var type = this.getTypeAnnotation();
  22339. return isGenericTypeAnnotation(type) && isIdentifier(type.id, {
  22340. name: genericName
  22341. });
  22342. }
  22343. var NodePath_inference = /*#__PURE__*/Object.freeze({
  22344. __proto__: null,
  22345. getTypeAnnotation: getTypeAnnotation,
  22346. _getTypeAnnotation: _getTypeAnnotation,
  22347. isBaseType: isBaseType,
  22348. couldBeBaseType: couldBeBaseType,
  22349. baseTypeStrictlyMatches: baseTypeStrictlyMatches,
  22350. isGenericType: isGenericType
  22351. });
  22352. var runtime_1 = createCommonjsModule(function (module) {
  22353. var runtime = function (exports) {
  22354. var Op = Object.prototype;
  22355. var hasOwn = Op.hasOwnProperty;
  22356. var undefined$1;
  22357. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  22358. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  22359. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  22360. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  22361. function define(obj, key, value) {
  22362. Object.defineProperty(obj, key, {
  22363. value: value,
  22364. enumerable: true,
  22365. configurable: true,
  22366. writable: true
  22367. });
  22368. return obj[key];
  22369. }
  22370. try {
  22371. define({}, "");
  22372. } catch (err) {
  22373. define = function define(obj, key, value) {
  22374. return obj[key] = value;
  22375. };
  22376. }
  22377. function wrap(innerFn, outerFn, self, tryLocsList) {
  22378. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  22379. var generator = Object.create(protoGenerator.prototype);
  22380. var context = new Context(tryLocsList || []);
  22381. generator._invoke = makeInvokeMethod(innerFn, self, context);
  22382. return generator;
  22383. }
  22384. exports.wrap = wrap;
  22385. function tryCatch(fn, obj, arg) {
  22386. try {
  22387. return {
  22388. type: "normal",
  22389. arg: fn.call(obj, arg)
  22390. };
  22391. } catch (err) {
  22392. return {
  22393. type: "throw",
  22394. arg: err
  22395. };
  22396. }
  22397. }
  22398. var GenStateSuspendedStart = "suspendedStart";
  22399. var GenStateSuspendedYield = "suspendedYield";
  22400. var GenStateExecuting = "executing";
  22401. var GenStateCompleted = "completed";
  22402. var ContinueSentinel = {};
  22403. function Generator() {}
  22404. function GeneratorFunction() {}
  22405. function GeneratorFunctionPrototype() {}
  22406. var IteratorPrototype = {};
  22407. IteratorPrototype[iteratorSymbol] = function () {
  22408. return this;
  22409. };
  22410. var getProto = Object.getPrototypeOf;
  22411. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  22412. if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  22413. IteratorPrototype = NativeIteratorPrototype;
  22414. }
  22415. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  22416. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  22417. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  22418. GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction");
  22419. function defineIteratorMethods(prototype) {
  22420. ["next", "throw", "return"].forEach(function (method) {
  22421. define(prototype, method, function (arg) {
  22422. return this._invoke(method, arg);
  22423. });
  22424. });
  22425. }
  22426. exports.isGeneratorFunction = function (genFun) {
  22427. var ctor = typeof genFun === "function" && genFun.constructor;
  22428. return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
  22429. };
  22430. exports.mark = function (genFun) {
  22431. if (Object.setPrototypeOf) {
  22432. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  22433. } else {
  22434. genFun.__proto__ = GeneratorFunctionPrototype;
  22435. define(genFun, toStringTagSymbol, "GeneratorFunction");
  22436. }
  22437. genFun.prototype = Object.create(Gp);
  22438. return genFun;
  22439. };
  22440. exports.awrap = function (arg) {
  22441. return {
  22442. __await: arg
  22443. };
  22444. };
  22445. function AsyncIterator(generator, PromiseImpl) {
  22446. function invoke(method, arg, resolve, reject) {
  22447. var record = tryCatch(generator[method], generator, arg);
  22448. if (record.type === "throw") {
  22449. reject(record.arg);
  22450. } else {
  22451. var result = record.arg;
  22452. var value = result.value;
  22453. if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
  22454. return PromiseImpl.resolve(value.__await).then(function (value) {
  22455. invoke("next", value, resolve, reject);
  22456. }, function (err) {
  22457. invoke("throw", err, resolve, reject);
  22458. });
  22459. }
  22460. return PromiseImpl.resolve(value).then(function (unwrapped) {
  22461. result.value = unwrapped;
  22462. resolve(result);
  22463. }, function (error) {
  22464. return invoke("throw", error, resolve, reject);
  22465. });
  22466. }
  22467. }
  22468. var previousPromise;
  22469. function enqueue(method, arg) {
  22470. function callInvokeWithMethodAndArg() {
  22471. return new PromiseImpl(function (resolve, reject) {
  22472. invoke(method, arg, resolve, reject);
  22473. });
  22474. }
  22475. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  22476. }
  22477. this._invoke = enqueue;
  22478. }
  22479. defineIteratorMethods(AsyncIterator.prototype);
  22480. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  22481. return this;
  22482. };
  22483. exports.AsyncIterator = AsyncIterator;
  22484. exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  22485. if (PromiseImpl === void 0) PromiseImpl = Promise;
  22486. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  22487. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  22488. return result.done ? result.value : iter.next();
  22489. });
  22490. };
  22491. function makeInvokeMethod(innerFn, self, context) {
  22492. var state = GenStateSuspendedStart;
  22493. return function invoke(method, arg) {
  22494. if (state === GenStateExecuting) {
  22495. throw new Error("Generator is already running");
  22496. }
  22497. if (state === GenStateCompleted) {
  22498. if (method === "throw") {
  22499. throw arg;
  22500. }
  22501. return doneResult();
  22502. }
  22503. context.method = method;
  22504. context.arg = arg;
  22505. while (true) {
  22506. var delegate = context.delegate;
  22507. if (delegate) {
  22508. var delegateResult = maybeInvokeDelegate(delegate, context);
  22509. if (delegateResult) {
  22510. if (delegateResult === ContinueSentinel) continue;
  22511. return delegateResult;
  22512. }
  22513. }
  22514. if (context.method === "next") {
  22515. context.sent = context._sent = context.arg;
  22516. } else if (context.method === "throw") {
  22517. if (state === GenStateSuspendedStart) {
  22518. state = GenStateCompleted;
  22519. throw context.arg;
  22520. }
  22521. context.dispatchException(context.arg);
  22522. } else if (context.method === "return") {
  22523. context.abrupt("return", context.arg);
  22524. }
  22525. state = GenStateExecuting;
  22526. var record = tryCatch(innerFn, self, context);
  22527. if (record.type === "normal") {
  22528. state = context.done ? GenStateCompleted : GenStateSuspendedYield;
  22529. if (record.arg === ContinueSentinel) {
  22530. continue;
  22531. }
  22532. return {
  22533. value: record.arg,
  22534. done: context.done
  22535. };
  22536. } else if (record.type === "throw") {
  22537. state = GenStateCompleted;
  22538. context.method = "throw";
  22539. context.arg = record.arg;
  22540. }
  22541. }
  22542. };
  22543. }
  22544. function maybeInvokeDelegate(delegate, context) {
  22545. var method = delegate.iterator[context.method];
  22546. if (method === undefined$1) {
  22547. context.delegate = null;
  22548. if (context.method === "throw") {
  22549. if (delegate.iterator["return"]) {
  22550. context.method = "return";
  22551. context.arg = undefined$1;
  22552. maybeInvokeDelegate(delegate, context);
  22553. if (context.method === "throw") {
  22554. return ContinueSentinel;
  22555. }
  22556. }
  22557. context.method = "throw";
  22558. context.arg = new TypeError("The iterator does not provide a 'throw' method");
  22559. }
  22560. return ContinueSentinel;
  22561. }
  22562. var record = tryCatch(method, delegate.iterator, context.arg);
  22563. if (record.type === "throw") {
  22564. context.method = "throw";
  22565. context.arg = record.arg;
  22566. context.delegate = null;
  22567. return ContinueSentinel;
  22568. }
  22569. var info = record.arg;
  22570. if (!info) {
  22571. context.method = "throw";
  22572. context.arg = new TypeError("iterator result is not an object");
  22573. context.delegate = null;
  22574. return ContinueSentinel;
  22575. }
  22576. if (info.done) {
  22577. context[delegate.resultName] = info.value;
  22578. context.next = delegate.nextLoc;
  22579. if (context.method !== "return") {
  22580. context.method = "next";
  22581. context.arg = undefined$1;
  22582. }
  22583. } else {
  22584. return info;
  22585. }
  22586. context.delegate = null;
  22587. return ContinueSentinel;
  22588. }
  22589. defineIteratorMethods(Gp);
  22590. define(Gp, toStringTagSymbol, "Generator");
  22591. Gp[iteratorSymbol] = function () {
  22592. return this;
  22593. };
  22594. Gp.toString = function () {
  22595. return "[object Generator]";
  22596. };
  22597. function pushTryEntry(locs) {
  22598. var entry = {
  22599. tryLoc: locs[0]
  22600. };
  22601. if (1 in locs) {
  22602. entry.catchLoc = locs[1];
  22603. }
  22604. if (2 in locs) {
  22605. entry.finallyLoc = locs[2];
  22606. entry.afterLoc = locs[3];
  22607. }
  22608. this.tryEntries.push(entry);
  22609. }
  22610. function resetTryEntry(entry) {
  22611. var record = entry.completion || {};
  22612. record.type = "normal";
  22613. delete record.arg;
  22614. entry.completion = record;
  22615. }
  22616. function Context(tryLocsList) {
  22617. this.tryEntries = [{
  22618. tryLoc: "root"
  22619. }];
  22620. tryLocsList.forEach(pushTryEntry, this);
  22621. this.reset(true);
  22622. }
  22623. exports.keys = function (object) {
  22624. var keys = [];
  22625. for (var key in object) {
  22626. keys.push(key);
  22627. }
  22628. keys.reverse();
  22629. return function next() {
  22630. while (keys.length) {
  22631. var key = keys.pop();
  22632. if (key in object) {
  22633. next.value = key;
  22634. next.done = false;
  22635. return next;
  22636. }
  22637. }
  22638. next.done = true;
  22639. return next;
  22640. };
  22641. };
  22642. function values(iterable) {
  22643. if (iterable) {
  22644. var iteratorMethod = iterable[iteratorSymbol];
  22645. if (iteratorMethod) {
  22646. return iteratorMethod.call(iterable);
  22647. }
  22648. if (typeof iterable.next === "function") {
  22649. return iterable;
  22650. }
  22651. if (!isNaN(iterable.length)) {
  22652. var i = -1,
  22653. next = function next() {
  22654. while (++i < iterable.length) {
  22655. if (hasOwn.call(iterable, i)) {
  22656. next.value = iterable[i];
  22657. next.done = false;
  22658. return next;
  22659. }
  22660. }
  22661. next.value = undefined$1;
  22662. next.done = true;
  22663. return next;
  22664. };
  22665. return next.next = next;
  22666. }
  22667. }
  22668. return {
  22669. next: doneResult
  22670. };
  22671. }
  22672. exports.values = values;
  22673. function doneResult() {
  22674. return {
  22675. value: undefined$1,
  22676. done: true
  22677. };
  22678. }
  22679. Context.prototype = {
  22680. constructor: Context,
  22681. reset: function reset(skipTempReset) {
  22682. this.prev = 0;
  22683. this.next = 0;
  22684. this.sent = this._sent = undefined$1;
  22685. this.done = false;
  22686. this.delegate = null;
  22687. this.method = "next";
  22688. this.arg = undefined$1;
  22689. this.tryEntries.forEach(resetTryEntry);
  22690. if (!skipTempReset) {
  22691. for (var name in this) {
  22692. if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
  22693. this[name] = undefined$1;
  22694. }
  22695. }
  22696. }
  22697. },
  22698. stop: function stop() {
  22699. this.done = true;
  22700. var rootEntry = this.tryEntries[0];
  22701. var rootRecord = rootEntry.completion;
  22702. if (rootRecord.type === "throw") {
  22703. throw rootRecord.arg;
  22704. }
  22705. return this.rval;
  22706. },
  22707. dispatchException: function dispatchException(exception) {
  22708. if (this.done) {
  22709. throw exception;
  22710. }
  22711. var context = this;
  22712. function handle(loc, caught) {
  22713. record.type = "throw";
  22714. record.arg = exception;
  22715. context.next = loc;
  22716. if (caught) {
  22717. context.method = "next";
  22718. context.arg = undefined$1;
  22719. }
  22720. return !!caught;
  22721. }
  22722. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  22723. var entry = this.tryEntries[i];
  22724. var record = entry.completion;
  22725. if (entry.tryLoc === "root") {
  22726. return handle("end");
  22727. }
  22728. if (entry.tryLoc <= this.prev) {
  22729. var hasCatch = hasOwn.call(entry, "catchLoc");
  22730. var hasFinally = hasOwn.call(entry, "finallyLoc");
  22731. if (hasCatch && hasFinally) {
  22732. if (this.prev < entry.catchLoc) {
  22733. return handle(entry.catchLoc, true);
  22734. } else if (this.prev < entry.finallyLoc) {
  22735. return handle(entry.finallyLoc);
  22736. }
  22737. } else if (hasCatch) {
  22738. if (this.prev < entry.catchLoc) {
  22739. return handle(entry.catchLoc, true);
  22740. }
  22741. } else if (hasFinally) {
  22742. if (this.prev < entry.finallyLoc) {
  22743. return handle(entry.finallyLoc);
  22744. }
  22745. } else {
  22746. throw new Error("try statement without catch or finally");
  22747. }
  22748. }
  22749. }
  22750. },
  22751. abrupt: function abrupt(type, arg) {
  22752. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  22753. var entry = this.tryEntries[i];
  22754. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  22755. var finallyEntry = entry;
  22756. break;
  22757. }
  22758. }
  22759. if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
  22760. finallyEntry = null;
  22761. }
  22762. var record = finallyEntry ? finallyEntry.completion : {};
  22763. record.type = type;
  22764. record.arg = arg;
  22765. if (finallyEntry) {
  22766. this.method = "next";
  22767. this.next = finallyEntry.finallyLoc;
  22768. return ContinueSentinel;
  22769. }
  22770. return this.complete(record);
  22771. },
  22772. complete: function complete(record, afterLoc) {
  22773. if (record.type === "throw") {
  22774. throw record.arg;
  22775. }
  22776. if (record.type === "break" || record.type === "continue") {
  22777. this.next = record.arg;
  22778. } else if (record.type === "return") {
  22779. this.rval = this.arg = record.arg;
  22780. this.method = "return";
  22781. this.next = "end";
  22782. } else if (record.type === "normal" && afterLoc) {
  22783. this.next = afterLoc;
  22784. }
  22785. return ContinueSentinel;
  22786. },
  22787. finish: function finish(finallyLoc) {
  22788. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  22789. var entry = this.tryEntries[i];
  22790. if (entry.finallyLoc === finallyLoc) {
  22791. this.complete(entry.completion, entry.afterLoc);
  22792. resetTryEntry(entry);
  22793. return ContinueSentinel;
  22794. }
  22795. }
  22796. },
  22797. "catch": function _catch(tryLoc) {
  22798. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  22799. var entry = this.tryEntries[i];
  22800. if (entry.tryLoc === tryLoc) {
  22801. var record = entry.completion;
  22802. if (record.type === "throw") {
  22803. var thrown = record.arg;
  22804. resetTryEntry(entry);
  22805. }
  22806. return thrown;
  22807. }
  22808. }
  22809. throw new Error("illegal catch attempt");
  22810. },
  22811. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  22812. this.delegate = {
  22813. iterator: values(iterable),
  22814. resultName: resultName,
  22815. nextLoc: nextLoc
  22816. };
  22817. if (this.method === "next") {
  22818. this.arg = undefined$1;
  22819. }
  22820. return ContinueSentinel;
  22821. }
  22822. };
  22823. return exports;
  22824. }(module.exports );
  22825. try {
  22826. regeneratorRuntime = runtime;
  22827. } catch (accidentalStrictMode) {
  22828. Function("r", "regeneratorRuntime = r")(runtime);
  22829. }
  22830. }, "/$$rollup_base$$/node_modules/regenerator-runtime");
  22831. var regenerator = runtime_1;
  22832. var IdentifierName, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace;
  22833. RegularExpressionLiteral = new RegExp("\\/(?![\\*\\/])(?:\\[(?:(?![\\\\\\]])(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*\\]|(?![\\/\\\\\\]])(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])|\\\\(?:[\\0-\\t\\x0B\\f\\x0E-\\u2027\\u202A-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]))*(\\/(?:[\\$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u07FD\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u08D3-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CD0-\\u1CD2\\u1CD4-\\u1CFA\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA827\\uA82C\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE80-\\uDEA9\\uDEAB\\uDEAC\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF50\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD44-\\uDD47\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDC9-\\uDDCC\\uDDCE-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3B-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC5E-\\uDC61\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC00-\\uDC3A\\uDCA0-\\uDCE9\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD7\\uDDDA-\\uDDE1\\uDDE3\\uDDE4\\uDE00-\\uDE3E\\uDE47\\uDE50-\\uDE99\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF6\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF4F-\\uDF87\\uDF8F-\\uDF9F\\uDFE0\\uDFE1\\uDFE3\\uDFE4\\uDFF0\\uDFF1]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD00-\\uDD2C\\uDD30-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A]|\\uDB40[\\uDD00-\\uDDEF])*|\\\\)?", "y");
  22834. Punctuator = new RegExp("--|\\+\\+|=>|\\.{3}|\\??\\.(?!\\d)|(?:&&|\\|\\||\\?\\?|[+\\-%&|^]|\\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\\/(?![\\/*]))=?|[?~,:;[\\](){}]", "y");
  22835. IdentifierName = new RegExp("(?=(?:[\\$A-Z\\\\_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDEC0-\\uDEEB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A]))(?:(?:[\\$0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u07FD\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u08D3-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CD0-\\u1CD2\\u1CD4-\\u1CFA\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA827\\uA82C\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE80-\\uDEA9\\uDEAB\\uDEAC\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF50\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD44-\\uDD47\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDC9-\\uDDCC\\uDDCE-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3B-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC5E-\\uDC61\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC00-\\uDC3A\\uDCA0-\\uDCE9\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD7\\uDDDA-\\uDDE1\\uDDE3\\uDDE4\\uDE00-\\uDE3E\\uDE47\\uDE50-\\uDE99\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF6\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF4F-\\uDF87\\uDF8F-\\uDF9F\\uDFE0\\uDFE1\\uDFE3\\uDFE4\\uDFF0\\uDFF1]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD00-\\uDD2C\\uDD30-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A]|\\uDB40[\\uDD00-\\uDDEF])|\\\\u[0-9A-Fa-f]{4}|\\\\u\\{[0-9A-Fa-f]+\\})+", "y");
  22836. StringLiteral = new RegExp("(['\"])(?:(?!\\1)[^\\\\\\n\\r]|\\\\(?:\\r\\n|[^]))*(\\1)?", "y");
  22837. NumericLiteral = new RegExp("(?:0[xX][\\da-fA-F](?:_?[\\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\\d)*n|(?:(?:0(?!\\d)|0\\d*[89]\\d*|[1-9](?:_?\\d)*)(?:\\.(?:\\d(?:_?\\d)*)?)?|\\.\\d(?:_?\\d)*)(?:[eE][+-]?\\d(?:_?\\d)*)?|0[0-7]+", "y");
  22838. Template = new RegExp("[`}](?:[^`\\\\$]|\\\\[^]|\\$(?!\\{))*(`|\\$\\{)?", "y");
  22839. WhiteSpace = new RegExp("[\\t\\x0B\\f \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000\\uFEFF]+", "y");
  22840. LineTerminatorSequence = new RegExp("\\r?\\n|[\\r\\u2028\\u2029]", "y");
  22841. MultiLineComment = new RegExp("\\/\\*(?:[^*]|\\*(?!\\/))*(\\*\\/)?", "y");
  22842. SingleLineComment = new RegExp("\\/\\/.*", "y");
  22843. JSXPunctuator = new RegExp("[<>.:={}]|\\/(?![\\/*])", "y");
  22844. JSXIdentifier = new RegExp("(?:[\\$A-Z_a-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD23\\uDE80-\\uDEA9\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF45\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD44\\uDD47\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC5F-\\uDC61\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDEB8\\uDF00-\\uDF1A]|\\uD806[\\uDC00-\\uDC2B\\uDCA0-\\uDCDF\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD2F\\uDD3F\\uDD41\\uDDA0-\\uDDA7\\uDDAA-\\uDDD0\\uDDE1\\uDDE3\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE89\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD89\\uDD98\\uDEE0-\\uDEF2\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1\\uDFE3]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD838[\\uDD00-\\uDD2C\\uDD37-\\uDD3D\\uDD4E\\uDEC0-\\uDEEB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43\\uDD4B]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A])(?:[\\$\\x2D0-9A-Z_a-z\\xAA\\xB5\\xB7\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u07FD\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u08D3-\\u08E1\\u08E3-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u09FC\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C80-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D54-\\u0D57\\u0D5F-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1369-\\u1371\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CD0-\\u1CD2\\u1CD4-\\u1CFA\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7BF\\uA7C2-\\uA7CA\\uA7F5-\\uA827\\uA82C\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDD40-\\uDD74\\uDDFD\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDEE0\\uDF00-\\uDF1F\\uDF2D-\\uDF4A\\uDF50-\\uDF7A\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF\\uDFD1-\\uDFD5]|\\uD801[\\uDC00-\\uDC9D\\uDCA0-\\uDCA9\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE35\\uDE38-\\uDE3A\\uDE3F\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE6\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2\\uDD00-\\uDD27\\uDD30-\\uDD39\\uDE80-\\uDEA9\\uDEAB\\uDEAC\\uDEB0\\uDEB1\\uDF00-\\uDF1C\\uDF27\\uDF30-\\uDF50\\uDFB0-\\uDFC4\\uDFE0-\\uDFF6]|\\uD804[\\uDC00-\\uDC46\\uDC66-\\uDC6F\\uDC7F-\\uDCBA\\uDCD0-\\uDCE8\\uDCF0-\\uDCF9\\uDD00-\\uDD34\\uDD36-\\uDD3F\\uDD44-\\uDD47\\uDD50-\\uDD73\\uDD76\\uDD80-\\uDDC4\\uDDC9-\\uDDCC\\uDDCE-\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE37\\uDE3E\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEEA\\uDEF0-\\uDEF9\\uDF00-\\uDF03\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\uDF33\\uDF35-\\uDF39\\uDF3B-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF50\\uDF57\\uDF5D-\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC00-\\uDC4A\\uDC50-\\uDC59\\uDC5E-\\uDC61\\uDC80-\\uDCC5\\uDCC7\\uDCD0-\\uDCD9\\uDD80-\\uDDB5\\uDDB8-\\uDDC0\\uDDD8-\\uDDDD\\uDE00-\\uDE40\\uDE44\\uDE50-\\uDE59\\uDE80-\\uDEB8\\uDEC0-\\uDEC9\\uDF00-\\uDF1A\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDC00-\\uDC3A\\uDCA0-\\uDCE9\\uDCFF-\\uDD06\\uDD09\\uDD0C-\\uDD13\\uDD15\\uDD16\\uDD18-\\uDD35\\uDD37\\uDD38\\uDD3B-\\uDD43\\uDD50-\\uDD59\\uDDA0-\\uDDA7\\uDDAA-\\uDDD7\\uDDDA-\\uDDE1\\uDDE3\\uDDE4\\uDE00-\\uDE3E\\uDE47\\uDE50-\\uDE99\\uDE9D\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59\\uDD60-\\uDD65\\uDD67\\uDD68\\uDD6A-\\uDD8E\\uDD90\\uDD91\\uDD93-\\uDD98\\uDDA0-\\uDDA9\\uDEE0-\\uDEF6\\uDFB0]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD822\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879\\uD880-\\uD883][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDE40-\\uDE7F\\uDF00-\\uDF4A\\uDF4F-\\uDF87\\uDF8F-\\uDF9F\\uDFE0\\uDFE1\\uDFE3\\uDFE4\\uDFF0\\uDFF1]|\\uD821[\\uDC00-\\uDFF7]|\\uD823[\\uDC00-\\uDCD5\\uDD00-\\uDD08]|\\uD82C[\\uDC00-\\uDD1E\\uDD50-\\uDD52\\uDD64-\\uDD67\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB\\uDFCE-\\uDFFF]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD00-\\uDD2C\\uDD30-\\uDD3D\\uDD40-\\uDD49\\uDD4E\\uDEC0-\\uDEF9]|\\uD83A[\\uDC00-\\uDCC4\\uDCD0-\\uDCD6\\uDD00-\\uDD4B\\uDD50-\\uDD59]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD83E[\\uDFF0-\\uDFF9]|\\uD869[\\uDC00-\\uDEDD\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uD884[\\uDC00-\\uDF4A]|\\uDB40[\\uDD00-\\uDDEF])*", "y");
  22845. JSXString = new RegExp("(['\"])(?:(?!\\1)[^])*(\\1)?", "y");
  22846. JSXText = new RegExp("[^<>{}]+", "y");
  22847. TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;
  22848. TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;
  22849. KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;
  22850. KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/;
  22851. Newline = RegExp(LineTerminatorSequence.source);
  22852. regenerator.mark(function jsTokens(input, _temp) {
  22853. var _ref, _ref$jsx, jsx, braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack;
  22854. return regenerator.wrap(function jsTokens$(_context) {
  22855. while (1) {
  22856. switch (_context.prev = _context.next) {
  22857. case 0:
  22858. _ref = _temp === void 0 ? {} : _temp, _ref$jsx = _ref.jsx, jsx = _ref$jsx === void 0 ? false : _ref$jsx;
  22859. length = input.length;
  22860. lastIndex = 0;
  22861. lastSignificantToken = "";
  22862. stack = [{
  22863. tag: "JS"
  22864. }];
  22865. braces = [];
  22866. parenNesting = 0;
  22867. postfixIncDec = false;
  22868. case 8:
  22869. if (!(lastIndex < length)) {
  22870. _context.next = 231;
  22871. break;
  22872. }
  22873. mode = stack[stack.length - 1];
  22874. _context.t0 = mode.tag;
  22875. _context.next = _context.t0 === "JS" ? 13 : _context.t0 === "JSNonExpressionParen" ? 13 : _context.t0 === "InterpolationInTemplate" ? 13 : _context.t0 === "InterpolationInJSX" ? 13 : _context.t0 === "JSXTag" ? 136 : _context.t0 === "JSXTagEnd" ? 136 : _context.t0 === "JSXChildren" ? 172 : 195;
  22876. break;
  22877. case 13:
  22878. if (!(input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)))) {
  22879. _context.next = 22;
  22880. break;
  22881. }
  22882. RegularExpressionLiteral.lastIndex = lastIndex;
  22883. if (!(match = RegularExpressionLiteral.exec(input))) {
  22884. _context.next = 22;
  22885. break;
  22886. }
  22887. lastIndex = RegularExpressionLiteral.lastIndex;
  22888. lastSignificantToken = match[0];
  22889. postfixIncDec = true;
  22890. _context.next = 21;
  22891. return {
  22892. type: "RegularExpressionLiteral",
  22893. value: match[0],
  22894. closed: match[1] !== void 0 && match[1] !== "\\"
  22895. };
  22896. case 21:
  22897. return _context.abrupt("continue", 8);
  22898. case 22:
  22899. Punctuator.lastIndex = lastIndex;
  22900. if (!(match = Punctuator.exec(input))) {
  22901. _context.next = 93;
  22902. break;
  22903. }
  22904. punctuator = match[0];
  22905. nextLastIndex = Punctuator.lastIndex;
  22906. nextLastSignificantToken = punctuator;
  22907. _context.t1 = punctuator;
  22908. _context.next = _context.t1 === "(" ? 30 : _context.t1 === ")" ? 34 : _context.t1 === "{" ? 38 : _context.t1 === "}" ? 43 : _context.t1 === "]" ? 74 : _context.t1 === "++" ? 76 : _context.t1 === "--" ? 76 : _context.t1 === "<" ? 78 : 87;
  22909. break;
  22910. case 30:
  22911. if (lastSignificantToken === "?NonExpressionParenKeyword") {
  22912. stack.push({
  22913. tag: "JSNonExpressionParen",
  22914. nesting: parenNesting
  22915. });
  22916. }
  22917. parenNesting++;
  22918. postfixIncDec = false;
  22919. return _context.abrupt("break", 88);
  22920. case 34:
  22921. parenNesting--;
  22922. postfixIncDec = true;
  22923. if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) {
  22924. stack.pop();
  22925. nextLastSignificantToken = "?NonExpressionParenEnd";
  22926. postfixIncDec = false;
  22927. }
  22928. return _context.abrupt("break", 88);
  22929. case 38:
  22930. Punctuator.lastIndex = 0;
  22931. isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken));
  22932. braces.push(isExpression);
  22933. postfixIncDec = false;
  22934. return _context.abrupt("break", 88);
  22935. case 43:
  22936. _context.t2 = mode.tag;
  22937. _context.next = _context.t2 === "InterpolationInTemplate" ? 46 : _context.t2 === "InterpolationInJSX" ? 64 : 71;
  22938. break;
  22939. case 46:
  22940. if (!(braces.length === mode.nesting)) {
  22941. _context.next = 63;
  22942. break;
  22943. }
  22944. Template.lastIndex = lastIndex;
  22945. match = Template.exec(input);
  22946. lastIndex = Template.lastIndex;
  22947. lastSignificantToken = match[0];
  22948. if (!(match[1] === "${")) {
  22949. _context.next = 58;
  22950. break;
  22951. }
  22952. lastSignificantToken = "?InterpolationInTemplate";
  22953. postfixIncDec = false;
  22954. _context.next = 56;
  22955. return {
  22956. type: "TemplateMiddle",
  22957. value: match[0]
  22958. };
  22959. case 56:
  22960. _context.next = 62;
  22961. break;
  22962. case 58:
  22963. stack.pop();
  22964. postfixIncDec = true;
  22965. _context.next = 62;
  22966. return {
  22967. type: "TemplateTail",
  22968. value: match[0],
  22969. closed: match[1] === "`"
  22970. };
  22971. case 62:
  22972. return _context.abrupt("continue", 8);
  22973. case 63:
  22974. return _context.abrupt("break", 71);
  22975. case 64:
  22976. if (!(braces.length === mode.nesting)) {
  22977. _context.next = 71;
  22978. break;
  22979. }
  22980. stack.pop();
  22981. lastIndex += 1;
  22982. lastSignificantToken = "}";
  22983. _context.next = 70;
  22984. return {
  22985. type: "JSXPunctuator",
  22986. value: "}"
  22987. };
  22988. case 70:
  22989. return _context.abrupt("continue", 8);
  22990. case 71:
  22991. postfixIncDec = braces.pop();
  22992. nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}";
  22993. return _context.abrupt("break", 88);
  22994. case 74:
  22995. postfixIncDec = true;
  22996. return _context.abrupt("break", 88);
  22997. case 76:
  22998. nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec";
  22999. return _context.abrupt("break", 88);
  23000. case 78:
  23001. if (!(jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)))) {
  23002. _context.next = 85;
  23003. break;
  23004. }
  23005. stack.push({
  23006. tag: "JSXTag"
  23007. });
  23008. lastIndex += 1;
  23009. lastSignificantToken = "<";
  23010. _context.next = 84;
  23011. return {
  23012. type: "JSXPunctuator",
  23013. value: punctuator
  23014. };
  23015. case 84:
  23016. return _context.abrupt("continue", 8);
  23017. case 85:
  23018. postfixIncDec = false;
  23019. return _context.abrupt("break", 88);
  23020. case 87:
  23021. postfixIncDec = false;
  23022. case 88:
  23023. lastIndex = nextLastIndex;
  23024. lastSignificantToken = nextLastSignificantToken;
  23025. _context.next = 92;
  23026. return {
  23027. type: "Punctuator",
  23028. value: punctuator
  23029. };
  23030. case 92:
  23031. return _context.abrupt("continue", 8);
  23032. case 93:
  23033. IdentifierName.lastIndex = lastIndex;
  23034. if (!(match = IdentifierName.exec(input))) {
  23035. _context.next = 103;
  23036. break;
  23037. }
  23038. lastIndex = IdentifierName.lastIndex;
  23039. nextLastSignificantToken = match[0];
  23040. switch (match[0]) {
  23041. case "for":
  23042. case "if":
  23043. case "while":
  23044. case "with":
  23045. if (lastSignificantToken !== "." && lastSignificantToken !== "?.") {
  23046. nextLastSignificantToken = "?NonExpressionParenKeyword";
  23047. }
  23048. }
  23049. lastSignificantToken = nextLastSignificantToken;
  23050. postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]);
  23051. _context.next = 102;
  23052. return {
  23053. type: "IdentifierName",
  23054. value: match[0]
  23055. };
  23056. case 102:
  23057. return _context.abrupt("continue", 8);
  23058. case 103:
  23059. StringLiteral.lastIndex = lastIndex;
  23060. if (!(match = StringLiteral.exec(input))) {
  23061. _context.next = 111;
  23062. break;
  23063. }
  23064. lastIndex = StringLiteral.lastIndex;
  23065. lastSignificantToken = match[0];
  23066. postfixIncDec = true;
  23067. _context.next = 110;
  23068. return {
  23069. type: "StringLiteral",
  23070. value: match[0],
  23071. closed: match[2] !== void 0
  23072. };
  23073. case 110:
  23074. return _context.abrupt("continue", 8);
  23075. case 111:
  23076. NumericLiteral.lastIndex = lastIndex;
  23077. if (!(match = NumericLiteral.exec(input))) {
  23078. _context.next = 119;
  23079. break;
  23080. }
  23081. lastIndex = NumericLiteral.lastIndex;
  23082. lastSignificantToken = match[0];
  23083. postfixIncDec = true;
  23084. _context.next = 118;
  23085. return {
  23086. type: "NumericLiteral",
  23087. value: match[0]
  23088. };
  23089. case 118:
  23090. return _context.abrupt("continue", 8);
  23091. case 119:
  23092. Template.lastIndex = lastIndex;
  23093. if (!(match = Template.exec(input))) {
  23094. _context.next = 135;
  23095. break;
  23096. }
  23097. lastIndex = Template.lastIndex;
  23098. lastSignificantToken = match[0];
  23099. if (!(match[1] === "${")) {
  23100. _context.next = 131;
  23101. break;
  23102. }
  23103. lastSignificantToken = "?InterpolationInTemplate";
  23104. stack.push({
  23105. tag: "InterpolationInTemplate",
  23106. nesting: braces.length
  23107. });
  23108. postfixIncDec = false;
  23109. _context.next = 129;
  23110. return {
  23111. type: "TemplateHead",
  23112. value: match[0]
  23113. };
  23114. case 129:
  23115. _context.next = 134;
  23116. break;
  23117. case 131:
  23118. postfixIncDec = true;
  23119. _context.next = 134;
  23120. return {
  23121. type: "NoSubstitutionTemplate",
  23122. value: match[0],
  23123. closed: match[1] === "`"
  23124. };
  23125. case 134:
  23126. return _context.abrupt("continue", 8);
  23127. case 135:
  23128. return _context.abrupt("break", 195);
  23129. case 136:
  23130. JSXPunctuator.lastIndex = lastIndex;
  23131. if (!(match = JSXPunctuator.exec(input))) {
  23132. _context.next = 157;
  23133. break;
  23134. }
  23135. lastIndex = JSXPunctuator.lastIndex;
  23136. nextLastSignificantToken = match[0];
  23137. _context.t3 = match[0];
  23138. _context.next = _context.t3 === "<" ? 143 : _context.t3 === ">" ? 145 : _context.t3 === "{" ? 148 : _context.t3 === "/" ? 152 : 153;
  23139. break;
  23140. case 143:
  23141. stack.push({
  23142. tag: "JSXTag"
  23143. });
  23144. return _context.abrupt("break", 153);
  23145. case 145:
  23146. stack.pop();
  23147. if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") {
  23148. nextLastSignificantToken = "?JSX";
  23149. postfixIncDec = true;
  23150. } else {
  23151. stack.push({
  23152. tag: "JSXChildren"
  23153. });
  23154. }
  23155. return _context.abrupt("break", 153);
  23156. case 148:
  23157. stack.push({
  23158. tag: "InterpolationInJSX",
  23159. nesting: braces.length
  23160. });
  23161. nextLastSignificantToken = "?InterpolationInJSX";
  23162. postfixIncDec = false;
  23163. return _context.abrupt("break", 153);
  23164. case 152:
  23165. if (lastSignificantToken === "<") {
  23166. stack.pop();
  23167. if (stack[stack.length - 1].tag === "JSXChildren") {
  23168. stack.pop();
  23169. }
  23170. stack.push({
  23171. tag: "JSXTagEnd"
  23172. });
  23173. }
  23174. case 153:
  23175. lastSignificantToken = nextLastSignificantToken;
  23176. _context.next = 156;
  23177. return {
  23178. type: "JSXPunctuator",
  23179. value: match[0]
  23180. };
  23181. case 156:
  23182. return _context.abrupt("continue", 8);
  23183. case 157:
  23184. JSXIdentifier.lastIndex = lastIndex;
  23185. if (!(match = JSXIdentifier.exec(input))) {
  23186. _context.next = 164;
  23187. break;
  23188. }
  23189. lastIndex = JSXIdentifier.lastIndex;
  23190. lastSignificantToken = match[0];
  23191. _context.next = 163;
  23192. return {
  23193. type: "JSXIdentifier",
  23194. value: match[0]
  23195. };
  23196. case 163:
  23197. return _context.abrupt("continue", 8);
  23198. case 164:
  23199. JSXString.lastIndex = lastIndex;
  23200. if (!(match = JSXString.exec(input))) {
  23201. _context.next = 171;
  23202. break;
  23203. }
  23204. lastIndex = JSXString.lastIndex;
  23205. lastSignificantToken = match[0];
  23206. _context.next = 170;
  23207. return {
  23208. type: "JSXString",
  23209. value: match[0],
  23210. closed: match[2] !== void 0
  23211. };
  23212. case 170:
  23213. return _context.abrupt("continue", 8);
  23214. case 171:
  23215. return _context.abrupt("break", 195);
  23216. case 172:
  23217. JSXText.lastIndex = lastIndex;
  23218. if (!(match = JSXText.exec(input))) {
  23219. _context.next = 179;
  23220. break;
  23221. }
  23222. lastIndex = JSXText.lastIndex;
  23223. lastSignificantToken = match[0];
  23224. _context.next = 178;
  23225. return {
  23226. type: "JSXText",
  23227. value: match[0]
  23228. };
  23229. case 178:
  23230. return _context.abrupt("continue", 8);
  23231. case 179:
  23232. _context.t4 = input[lastIndex];
  23233. _context.next = _context.t4 === "<" ? 182 : _context.t4 === "{" ? 188 : 195;
  23234. break;
  23235. case 182:
  23236. stack.push({
  23237. tag: "JSXTag"
  23238. });
  23239. lastIndex++;
  23240. lastSignificantToken = "<";
  23241. _context.next = 187;
  23242. return {
  23243. type: "JSXPunctuator",
  23244. value: "<"
  23245. };
  23246. case 187:
  23247. return _context.abrupt("continue", 8);
  23248. case 188:
  23249. stack.push({
  23250. tag: "InterpolationInJSX",
  23251. nesting: braces.length
  23252. });
  23253. lastIndex++;
  23254. lastSignificantToken = "?InterpolationInJSX";
  23255. postfixIncDec = false;
  23256. _context.next = 194;
  23257. return {
  23258. type: "JSXPunctuator",
  23259. value: "{"
  23260. };
  23261. case 194:
  23262. return _context.abrupt("continue", 8);
  23263. case 195:
  23264. WhiteSpace.lastIndex = lastIndex;
  23265. if (!(match = WhiteSpace.exec(input))) {
  23266. _context.next = 201;
  23267. break;
  23268. }
  23269. lastIndex = WhiteSpace.lastIndex;
  23270. _context.next = 200;
  23271. return {
  23272. type: "WhiteSpace",
  23273. value: match[0]
  23274. };
  23275. case 200:
  23276. return _context.abrupt("continue", 8);
  23277. case 201:
  23278. LineTerminatorSequence.lastIndex = lastIndex;
  23279. if (!(match = LineTerminatorSequence.exec(input))) {
  23280. _context.next = 209;
  23281. break;
  23282. }
  23283. lastIndex = LineTerminatorSequence.lastIndex;
  23284. postfixIncDec = false;
  23285. if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
  23286. lastSignificantToken = "?NoLineTerminatorHere";
  23287. }
  23288. _context.next = 208;
  23289. return {
  23290. type: "LineTerminatorSequence",
  23291. value: match[0]
  23292. };
  23293. case 208:
  23294. return _context.abrupt("continue", 8);
  23295. case 209:
  23296. MultiLineComment.lastIndex = lastIndex;
  23297. if (!(match = MultiLineComment.exec(input))) {
  23298. _context.next = 216;
  23299. break;
  23300. }
  23301. lastIndex = MultiLineComment.lastIndex;
  23302. if (Newline.test(match[0])) {
  23303. postfixIncDec = false;
  23304. if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) {
  23305. lastSignificantToken = "?NoLineTerminatorHere";
  23306. }
  23307. }
  23308. _context.next = 215;
  23309. return {
  23310. type: "MultiLineComment",
  23311. value: match[0],
  23312. closed: match[1] !== void 0
  23313. };
  23314. case 215:
  23315. return _context.abrupt("continue", 8);
  23316. case 216:
  23317. SingleLineComment.lastIndex = lastIndex;
  23318. if (!(match = SingleLineComment.exec(input))) {
  23319. _context.next = 223;
  23320. break;
  23321. }
  23322. lastIndex = SingleLineComment.lastIndex;
  23323. postfixIncDec = false;
  23324. _context.next = 222;
  23325. return {
  23326. type: "SingleLineComment",
  23327. value: match[0]
  23328. };
  23329. case 222:
  23330. return _context.abrupt("continue", 8);
  23331. case 223:
  23332. firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex));
  23333. lastIndex += firstCodePoint.length;
  23334. lastSignificantToken = firstCodePoint;
  23335. postfixIncDec = false;
  23336. _context.next = 229;
  23337. return {
  23338. type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid",
  23339. value: firstCodePoint
  23340. };
  23341. case 229:
  23342. _context.next = 8;
  23343. break;
  23344. case 231:
  23345. return _context.abrupt("return", void 0);
  23346. case 232:
  23347. case "end":
  23348. return _context.stop();
  23349. }
  23350. }
  23351. }, jsTokens);
  23352. });
  23353. var _default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
  23354. var matchToToken = function matchToToken(match) {
  23355. var token = {
  23356. type: "invalid",
  23357. value: match[0],
  23358. closed: undefined
  23359. };
  23360. if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace";
  23361. return token;
  23362. };
  23363. var jsTokensBABEL_8_BREAKINGFalse = Object.defineProperty({
  23364. "default": _default,
  23365. matchToToken: matchToToken
  23366. }, '__esModule', {
  23367. value: true
  23368. });
  23369. var jsTokens = jsTokensBABEL_8_BREAKINGFalse;
  23370. var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
  23371. var escapeStringRegexp = function escapeStringRegexp(str) {
  23372. if (typeof str !== 'string') {
  23373. throw new TypeError('Expected a string');
  23374. }
  23375. return str.replace(matchOperatorsRe, '\\$&');
  23376. };
  23377. var colorName = {
  23378. "aliceblue": [240, 248, 255],
  23379. "antiquewhite": [250, 235, 215],
  23380. "aqua": [0, 255, 255],
  23381. "aquamarine": [127, 255, 212],
  23382. "azure": [240, 255, 255],
  23383. "beige": [245, 245, 220],
  23384. "bisque": [255, 228, 196],
  23385. "black": [0, 0, 0],
  23386. "blanchedalmond": [255, 235, 205],
  23387. "blue": [0, 0, 255],
  23388. "blueviolet": [138, 43, 226],
  23389. "brown": [165, 42, 42],
  23390. "burlywood": [222, 184, 135],
  23391. "cadetblue": [95, 158, 160],
  23392. "chartreuse": [127, 255, 0],
  23393. "chocolate": [210, 105, 30],
  23394. "coral": [255, 127, 80],
  23395. "cornflowerblue": [100, 149, 237],
  23396. "cornsilk": [255, 248, 220],
  23397. "crimson": [220, 20, 60],
  23398. "cyan": [0, 255, 255],
  23399. "darkblue": [0, 0, 139],
  23400. "darkcyan": [0, 139, 139],
  23401. "darkgoldenrod": [184, 134, 11],
  23402. "darkgray": [169, 169, 169],
  23403. "darkgreen": [0, 100, 0],
  23404. "darkgrey": [169, 169, 169],
  23405. "darkkhaki": [189, 183, 107],
  23406. "darkmagenta": [139, 0, 139],
  23407. "darkolivegreen": [85, 107, 47],
  23408. "darkorange": [255, 140, 0],
  23409. "darkorchid": [153, 50, 204],
  23410. "darkred": [139, 0, 0],
  23411. "darksalmon": [233, 150, 122],
  23412. "darkseagreen": [143, 188, 143],
  23413. "darkslateblue": [72, 61, 139],
  23414. "darkslategray": [47, 79, 79],
  23415. "darkslategrey": [47, 79, 79],
  23416. "darkturquoise": [0, 206, 209],
  23417. "darkviolet": [148, 0, 211],
  23418. "deeppink": [255, 20, 147],
  23419. "deepskyblue": [0, 191, 255],
  23420. "dimgray": [105, 105, 105],
  23421. "dimgrey": [105, 105, 105],
  23422. "dodgerblue": [30, 144, 255],
  23423. "firebrick": [178, 34, 34],
  23424. "floralwhite": [255, 250, 240],
  23425. "forestgreen": [34, 139, 34],
  23426. "fuchsia": [255, 0, 255],
  23427. "gainsboro": [220, 220, 220],
  23428. "ghostwhite": [248, 248, 255],
  23429. "gold": [255, 215, 0],
  23430. "goldenrod": [218, 165, 32],
  23431. "gray": [128, 128, 128],
  23432. "green": [0, 128, 0],
  23433. "greenyellow": [173, 255, 47],
  23434. "grey": [128, 128, 128],
  23435. "honeydew": [240, 255, 240],
  23436. "hotpink": [255, 105, 180],
  23437. "indianred": [205, 92, 92],
  23438. "indigo": [75, 0, 130],
  23439. "ivory": [255, 255, 240],
  23440. "khaki": [240, 230, 140],
  23441. "lavender": [230, 230, 250],
  23442. "lavenderblush": [255, 240, 245],
  23443. "lawngreen": [124, 252, 0],
  23444. "lemonchiffon": [255, 250, 205],
  23445. "lightblue": [173, 216, 230],
  23446. "lightcoral": [240, 128, 128],
  23447. "lightcyan": [224, 255, 255],
  23448. "lightgoldenrodyellow": [250, 250, 210],
  23449. "lightgray": [211, 211, 211],
  23450. "lightgreen": [144, 238, 144],
  23451. "lightgrey": [211, 211, 211],
  23452. "lightpink": [255, 182, 193],
  23453. "lightsalmon": [255, 160, 122],
  23454. "lightseagreen": [32, 178, 170],
  23455. "lightskyblue": [135, 206, 250],
  23456. "lightslategray": [119, 136, 153],
  23457. "lightslategrey": [119, 136, 153],
  23458. "lightsteelblue": [176, 196, 222],
  23459. "lightyellow": [255, 255, 224],
  23460. "lime": [0, 255, 0],
  23461. "limegreen": [50, 205, 50],
  23462. "linen": [250, 240, 230],
  23463. "magenta": [255, 0, 255],
  23464. "maroon": [128, 0, 0],
  23465. "mediumaquamarine": [102, 205, 170],
  23466. "mediumblue": [0, 0, 205],
  23467. "mediumorchid": [186, 85, 211],
  23468. "mediumpurple": [147, 112, 219],
  23469. "mediumseagreen": [60, 179, 113],
  23470. "mediumslateblue": [123, 104, 238],
  23471. "mediumspringgreen": [0, 250, 154],
  23472. "mediumturquoise": [72, 209, 204],
  23473. "mediumvioletred": [199, 21, 133],
  23474. "midnightblue": [25, 25, 112],
  23475. "mintcream": [245, 255, 250],
  23476. "mistyrose": [255, 228, 225],
  23477. "moccasin": [255, 228, 181],
  23478. "navajowhite": [255, 222, 173],
  23479. "navy": [0, 0, 128],
  23480. "oldlace": [253, 245, 230],
  23481. "olive": [128, 128, 0],
  23482. "olivedrab": [107, 142, 35],
  23483. "orange": [255, 165, 0],
  23484. "orangered": [255, 69, 0],
  23485. "orchid": [218, 112, 214],
  23486. "palegoldenrod": [238, 232, 170],
  23487. "palegreen": [152, 251, 152],
  23488. "paleturquoise": [175, 238, 238],
  23489. "palevioletred": [219, 112, 147],
  23490. "papayawhip": [255, 239, 213],
  23491. "peachpuff": [255, 218, 185],
  23492. "peru": [205, 133, 63],
  23493. "pink": [255, 192, 203],
  23494. "plum": [221, 160, 221],
  23495. "powderblue": [176, 224, 230],
  23496. "purple": [128, 0, 128],
  23497. "rebeccapurple": [102, 51, 153],
  23498. "red": [255, 0, 0],
  23499. "rosybrown": [188, 143, 143],
  23500. "royalblue": [65, 105, 225],
  23501. "saddlebrown": [139, 69, 19],
  23502. "salmon": [250, 128, 114],
  23503. "sandybrown": [244, 164, 96],
  23504. "seagreen": [46, 139, 87],
  23505. "seashell": [255, 245, 238],
  23506. "sienna": [160, 82, 45],
  23507. "silver": [192, 192, 192],
  23508. "skyblue": [135, 206, 235],
  23509. "slateblue": [106, 90, 205],
  23510. "slategray": [112, 128, 144],
  23511. "slategrey": [112, 128, 144],
  23512. "snow": [255, 250, 250],
  23513. "springgreen": [0, 255, 127],
  23514. "steelblue": [70, 130, 180],
  23515. "tan": [210, 180, 140],
  23516. "teal": [0, 128, 128],
  23517. "thistle": [216, 191, 216],
  23518. "tomato": [255, 99, 71],
  23519. "turquoise": [64, 224, 208],
  23520. "violet": [238, 130, 238],
  23521. "wheat": [245, 222, 179],
  23522. "white": [255, 255, 255],
  23523. "whitesmoke": [245, 245, 245],
  23524. "yellow": [255, 255, 0],
  23525. "yellowgreen": [154, 205, 50]
  23526. };
  23527. var conversions = createCommonjsModule(function (module) {
  23528. var reverseKeywords = {};
  23529. for (var key in colorName) {
  23530. if (colorName.hasOwnProperty(key)) {
  23531. reverseKeywords[colorName[key]] = key;
  23532. }
  23533. }
  23534. var convert = module.exports = {
  23535. rgb: {
  23536. channels: 3,
  23537. labels: 'rgb'
  23538. },
  23539. hsl: {
  23540. channels: 3,
  23541. labels: 'hsl'
  23542. },
  23543. hsv: {
  23544. channels: 3,
  23545. labels: 'hsv'
  23546. },
  23547. hwb: {
  23548. channels: 3,
  23549. labels: 'hwb'
  23550. },
  23551. cmyk: {
  23552. channels: 4,
  23553. labels: 'cmyk'
  23554. },
  23555. xyz: {
  23556. channels: 3,
  23557. labels: 'xyz'
  23558. },
  23559. lab: {
  23560. channels: 3,
  23561. labels: 'lab'
  23562. },
  23563. lch: {
  23564. channels: 3,
  23565. labels: 'lch'
  23566. },
  23567. hex: {
  23568. channels: 1,
  23569. labels: ['hex']
  23570. },
  23571. keyword: {
  23572. channels: 1,
  23573. labels: ['keyword']
  23574. },
  23575. ansi16: {
  23576. channels: 1,
  23577. labels: ['ansi16']
  23578. },
  23579. ansi256: {
  23580. channels: 1,
  23581. labels: ['ansi256']
  23582. },
  23583. hcg: {
  23584. channels: 3,
  23585. labels: ['h', 'c', 'g']
  23586. },
  23587. apple: {
  23588. channels: 3,
  23589. labels: ['r16', 'g16', 'b16']
  23590. },
  23591. gray: {
  23592. channels: 1,
  23593. labels: ['gray']
  23594. }
  23595. };
  23596. for (var model in convert) {
  23597. if (convert.hasOwnProperty(model)) {
  23598. if (!('channels' in convert[model])) {
  23599. throw new Error('missing channels property: ' + model);
  23600. }
  23601. if (!('labels' in convert[model])) {
  23602. throw new Error('missing channel labels property: ' + model);
  23603. }
  23604. if (convert[model].labels.length !== convert[model].channels) {
  23605. throw new Error('channel and label counts mismatch: ' + model);
  23606. }
  23607. var channels = convert[model].channels;
  23608. var labels = convert[model].labels;
  23609. delete convert[model].channels;
  23610. delete convert[model].labels;
  23611. Object.defineProperty(convert[model], 'channels', {
  23612. value: channels
  23613. });
  23614. Object.defineProperty(convert[model], 'labels', {
  23615. value: labels
  23616. });
  23617. }
  23618. }
  23619. convert.rgb.hsl = function (rgb) {
  23620. var r = rgb[0] / 255;
  23621. var g = rgb[1] / 255;
  23622. var b = rgb[2] / 255;
  23623. var min = Math.min(r, g, b);
  23624. var max = Math.max(r, g, b);
  23625. var delta = max - min;
  23626. var h;
  23627. var s;
  23628. var l;
  23629. if (max === min) {
  23630. h = 0;
  23631. } else if (r === max) {
  23632. h = (g - b) / delta;
  23633. } else if (g === max) {
  23634. h = 2 + (b - r) / delta;
  23635. } else if (b === max) {
  23636. h = 4 + (r - g) / delta;
  23637. }
  23638. h = Math.min(h * 60, 360);
  23639. if (h < 0) {
  23640. h += 360;
  23641. }
  23642. l = (min + max) / 2;
  23643. if (max === min) {
  23644. s = 0;
  23645. } else if (l <= 0.5) {
  23646. s = delta / (max + min);
  23647. } else {
  23648. s = delta / (2 - max - min);
  23649. }
  23650. return [h, s * 100, l * 100];
  23651. };
  23652. convert.rgb.hsv = function (rgb) {
  23653. var rdif;
  23654. var gdif;
  23655. var bdif;
  23656. var h;
  23657. var s;
  23658. var r = rgb[0] / 255;
  23659. var g = rgb[1] / 255;
  23660. var b = rgb[2] / 255;
  23661. var v = Math.max(r, g, b);
  23662. var diff = v - Math.min(r, g, b);
  23663. var diffc = function diffc(c) {
  23664. return (v - c) / 6 / diff + 1 / 2;
  23665. };
  23666. if (diff === 0) {
  23667. h = s = 0;
  23668. } else {
  23669. s = diff / v;
  23670. rdif = diffc(r);
  23671. gdif = diffc(g);
  23672. bdif = diffc(b);
  23673. if (r === v) {
  23674. h = bdif - gdif;
  23675. } else if (g === v) {
  23676. h = 1 / 3 + rdif - bdif;
  23677. } else if (b === v) {
  23678. h = 2 / 3 + gdif - rdif;
  23679. }
  23680. if (h < 0) {
  23681. h += 1;
  23682. } else if (h > 1) {
  23683. h -= 1;
  23684. }
  23685. }
  23686. return [h * 360, s * 100, v * 100];
  23687. };
  23688. convert.rgb.hwb = function (rgb) {
  23689. var r = rgb[0];
  23690. var g = rgb[1];
  23691. var b = rgb[2];
  23692. var h = convert.rgb.hsl(rgb)[0];
  23693. var w = 1 / 255 * Math.min(r, Math.min(g, b));
  23694. b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
  23695. return [h, w * 100, b * 100];
  23696. };
  23697. convert.rgb.cmyk = function (rgb) {
  23698. var r = rgb[0] / 255;
  23699. var g = rgb[1] / 255;
  23700. var b = rgb[2] / 255;
  23701. var c;
  23702. var m;
  23703. var y;
  23704. var k;
  23705. k = Math.min(1 - r, 1 - g, 1 - b);
  23706. c = (1 - r - k) / (1 - k) || 0;
  23707. m = (1 - g - k) / (1 - k) || 0;
  23708. y = (1 - b - k) / (1 - k) || 0;
  23709. return [c * 100, m * 100, y * 100, k * 100];
  23710. };
  23711. function comparativeDistance(x, y) {
  23712. return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2);
  23713. }
  23714. convert.rgb.keyword = function (rgb) {
  23715. var reversed = reverseKeywords[rgb];
  23716. if (reversed) {
  23717. return reversed;
  23718. }
  23719. var currentClosestDistance = Infinity;
  23720. var currentClosestKeyword;
  23721. for (var keyword in colorName) {
  23722. if (colorName.hasOwnProperty(keyword)) {
  23723. var value = colorName[keyword];
  23724. var distance = comparativeDistance(rgb, value);
  23725. if (distance < currentClosestDistance) {
  23726. currentClosestDistance = distance;
  23727. currentClosestKeyword = keyword;
  23728. }
  23729. }
  23730. }
  23731. return currentClosestKeyword;
  23732. };
  23733. convert.keyword.rgb = function (keyword) {
  23734. return colorName[keyword];
  23735. };
  23736. convert.rgb.xyz = function (rgb) {
  23737. var r = rgb[0] / 255;
  23738. var g = rgb[1] / 255;
  23739. var b = rgb[2] / 255;
  23740. r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
  23741. g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
  23742. b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
  23743. var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
  23744. var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
  23745. var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
  23746. return [x * 100, y * 100, z * 100];
  23747. };
  23748. convert.rgb.lab = function (rgb) {
  23749. var xyz = convert.rgb.xyz(rgb);
  23750. var x = xyz[0];
  23751. var y = xyz[1];
  23752. var z = xyz[2];
  23753. var l;
  23754. var a;
  23755. var b;
  23756. x /= 95.047;
  23757. y /= 100;
  23758. z /= 108.883;
  23759. x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  23760. y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  23761. z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  23762. l = 116 * y - 16;
  23763. a = 500 * (x - y);
  23764. b = 200 * (y - z);
  23765. return [l, a, b];
  23766. };
  23767. convert.hsl.rgb = function (hsl) {
  23768. var h = hsl[0] / 360;
  23769. var s = hsl[1] / 100;
  23770. var l = hsl[2] / 100;
  23771. var t1;
  23772. var t2;
  23773. var t3;
  23774. var rgb;
  23775. var val;
  23776. if (s === 0) {
  23777. val = l * 255;
  23778. return [val, val, val];
  23779. }
  23780. if (l < 0.5) {
  23781. t2 = l * (1 + s);
  23782. } else {
  23783. t2 = l + s - l * s;
  23784. }
  23785. t1 = 2 * l - t2;
  23786. rgb = [0, 0, 0];
  23787. for (var i = 0; i < 3; i++) {
  23788. t3 = h + 1 / 3 * -(i - 1);
  23789. if (t3 < 0) {
  23790. t3++;
  23791. }
  23792. if (t3 > 1) {
  23793. t3--;
  23794. }
  23795. if (6 * t3 < 1) {
  23796. val = t1 + (t2 - t1) * 6 * t3;
  23797. } else if (2 * t3 < 1) {
  23798. val = t2;
  23799. } else if (3 * t3 < 2) {
  23800. val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
  23801. } else {
  23802. val = t1;
  23803. }
  23804. rgb[i] = val * 255;
  23805. }
  23806. return rgb;
  23807. };
  23808. convert.hsl.hsv = function (hsl) {
  23809. var h = hsl[0];
  23810. var s = hsl[1] / 100;
  23811. var l = hsl[2] / 100;
  23812. var smin = s;
  23813. var lmin = Math.max(l, 0.01);
  23814. var sv;
  23815. var v;
  23816. l *= 2;
  23817. s *= l <= 1 ? l : 2 - l;
  23818. smin *= lmin <= 1 ? lmin : 2 - lmin;
  23819. v = (l + s) / 2;
  23820. sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
  23821. return [h, sv * 100, v * 100];
  23822. };
  23823. convert.hsv.rgb = function (hsv) {
  23824. var h = hsv[0] / 60;
  23825. var s = hsv[1] / 100;
  23826. var v = hsv[2] / 100;
  23827. var hi = Math.floor(h) % 6;
  23828. var f = h - Math.floor(h);
  23829. var p = 255 * v * (1 - s);
  23830. var q = 255 * v * (1 - s * f);
  23831. var t = 255 * v * (1 - s * (1 - f));
  23832. v *= 255;
  23833. switch (hi) {
  23834. case 0:
  23835. return [v, t, p];
  23836. case 1:
  23837. return [q, v, p];
  23838. case 2:
  23839. return [p, v, t];
  23840. case 3:
  23841. return [p, q, v];
  23842. case 4:
  23843. return [t, p, v];
  23844. case 5:
  23845. return [v, p, q];
  23846. }
  23847. };
  23848. convert.hsv.hsl = function (hsv) {
  23849. var h = hsv[0];
  23850. var s = hsv[1] / 100;
  23851. var v = hsv[2] / 100;
  23852. var vmin = Math.max(v, 0.01);
  23853. var lmin;
  23854. var sl;
  23855. var l;
  23856. l = (2 - s) * v;
  23857. lmin = (2 - s) * vmin;
  23858. sl = s * vmin;
  23859. sl /= lmin <= 1 ? lmin : 2 - lmin;
  23860. sl = sl || 0;
  23861. l /= 2;
  23862. return [h, sl * 100, l * 100];
  23863. };
  23864. convert.hwb.rgb = function (hwb) {
  23865. var h = hwb[0] / 360;
  23866. var wh = hwb[1] / 100;
  23867. var bl = hwb[2] / 100;
  23868. var ratio = wh + bl;
  23869. var i;
  23870. var v;
  23871. var f;
  23872. var n;
  23873. if (ratio > 1) {
  23874. wh /= ratio;
  23875. bl /= ratio;
  23876. }
  23877. i = Math.floor(6 * h);
  23878. v = 1 - bl;
  23879. f = 6 * h - i;
  23880. if ((i & 0x01) !== 0) {
  23881. f = 1 - f;
  23882. }
  23883. n = wh + f * (v - wh);
  23884. var r;
  23885. var g;
  23886. var b;
  23887. switch (i) {
  23888. default:
  23889. case 6:
  23890. case 0:
  23891. r = v;
  23892. g = n;
  23893. b = wh;
  23894. break;
  23895. case 1:
  23896. r = n;
  23897. g = v;
  23898. b = wh;
  23899. break;
  23900. case 2:
  23901. r = wh;
  23902. g = v;
  23903. b = n;
  23904. break;
  23905. case 3:
  23906. r = wh;
  23907. g = n;
  23908. b = v;
  23909. break;
  23910. case 4:
  23911. r = n;
  23912. g = wh;
  23913. b = v;
  23914. break;
  23915. case 5:
  23916. r = v;
  23917. g = wh;
  23918. b = n;
  23919. break;
  23920. }
  23921. return [r * 255, g * 255, b * 255];
  23922. };
  23923. convert.cmyk.rgb = function (cmyk) {
  23924. var c = cmyk[0] / 100;
  23925. var m = cmyk[1] / 100;
  23926. var y = cmyk[2] / 100;
  23927. var k = cmyk[3] / 100;
  23928. var r;
  23929. var g;
  23930. var b;
  23931. r = 1 - Math.min(1, c * (1 - k) + k);
  23932. g = 1 - Math.min(1, m * (1 - k) + k);
  23933. b = 1 - Math.min(1, y * (1 - k) + k);
  23934. return [r * 255, g * 255, b * 255];
  23935. };
  23936. convert.xyz.rgb = function (xyz) {
  23937. var x = xyz[0] / 100;
  23938. var y = xyz[1] / 100;
  23939. var z = xyz[2] / 100;
  23940. var r;
  23941. var g;
  23942. var b;
  23943. r = x * 3.2406 + y * -1.5372 + z * -0.4986;
  23944. g = x * -0.9689 + y * 1.8758 + z * 0.0415;
  23945. b = x * 0.0557 + y * -0.2040 + z * 1.0570;
  23946. r = r > 0.0031308 ? 1.055 * Math.pow(r, 1.0 / 2.4) - 0.055 : r * 12.92;
  23947. g = g > 0.0031308 ? 1.055 * Math.pow(g, 1.0 / 2.4) - 0.055 : g * 12.92;
  23948. b = b > 0.0031308 ? 1.055 * Math.pow(b, 1.0 / 2.4) - 0.055 : b * 12.92;
  23949. r = Math.min(Math.max(0, r), 1);
  23950. g = Math.min(Math.max(0, g), 1);
  23951. b = Math.min(Math.max(0, b), 1);
  23952. return [r * 255, g * 255, b * 255];
  23953. };
  23954. convert.xyz.lab = function (xyz) {
  23955. var x = xyz[0];
  23956. var y = xyz[1];
  23957. var z = xyz[2];
  23958. var l;
  23959. var a;
  23960. var b;
  23961. x /= 95.047;
  23962. y /= 100;
  23963. z /= 108.883;
  23964. x = x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
  23965. y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
  23966. z = z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
  23967. l = 116 * y - 16;
  23968. a = 500 * (x - y);
  23969. b = 200 * (y - z);
  23970. return [l, a, b];
  23971. };
  23972. convert.lab.xyz = function (lab) {
  23973. var l = lab[0];
  23974. var a = lab[1];
  23975. var b = lab[2];
  23976. var x;
  23977. var y;
  23978. var z;
  23979. y = (l + 16) / 116;
  23980. x = a / 500 + y;
  23981. z = y - b / 200;
  23982. var y2 = Math.pow(y, 3);
  23983. var x2 = Math.pow(x, 3);
  23984. var z2 = Math.pow(z, 3);
  23985. y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
  23986. x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
  23987. z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
  23988. x *= 95.047;
  23989. y *= 100;
  23990. z *= 108.883;
  23991. return [x, y, z];
  23992. };
  23993. convert.lab.lch = function (lab) {
  23994. var l = lab[0];
  23995. var a = lab[1];
  23996. var b = lab[2];
  23997. var hr;
  23998. var h;
  23999. var c;
  24000. hr = Math.atan2(b, a);
  24001. h = hr * 360 / 2 / Math.PI;
  24002. if (h < 0) {
  24003. h += 360;
  24004. }
  24005. c = Math.sqrt(a * a + b * b);
  24006. return [l, c, h];
  24007. };
  24008. convert.lch.lab = function (lch) {
  24009. var l = lch[0];
  24010. var c = lch[1];
  24011. var h = lch[2];
  24012. var a;
  24013. var b;
  24014. var hr;
  24015. hr = h / 360 * 2 * Math.PI;
  24016. a = c * Math.cos(hr);
  24017. b = c * Math.sin(hr);
  24018. return [l, a, b];
  24019. };
  24020. convert.rgb.ansi16 = function (args) {
  24021. var r = args[0];
  24022. var g = args[1];
  24023. var b = args[2];
  24024. var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2];
  24025. value = Math.round(value / 50);
  24026. if (value === 0) {
  24027. return 30;
  24028. }
  24029. var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
  24030. if (value === 2) {
  24031. ansi += 60;
  24032. }
  24033. return ansi;
  24034. };
  24035. convert.hsv.ansi16 = function (args) {
  24036. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
  24037. };
  24038. convert.rgb.ansi256 = function (args) {
  24039. var r = args[0];
  24040. var g = args[1];
  24041. var b = args[2];
  24042. if (r === g && g === b) {
  24043. if (r < 8) {
  24044. return 16;
  24045. }
  24046. if (r > 248) {
  24047. return 231;
  24048. }
  24049. return Math.round((r - 8) / 247 * 24) + 232;
  24050. }
  24051. var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
  24052. return ansi;
  24053. };
  24054. convert.ansi16.rgb = function (args) {
  24055. var color = args % 10;
  24056. if (color === 0 || color === 7) {
  24057. if (args > 50) {
  24058. color += 3.5;
  24059. }
  24060. color = color / 10.5 * 255;
  24061. return [color, color, color];
  24062. }
  24063. var mult = (~~(args > 50) + 1) * 0.5;
  24064. var r = (color & 1) * mult * 255;
  24065. var g = (color >> 1 & 1) * mult * 255;
  24066. var b = (color >> 2 & 1) * mult * 255;
  24067. return [r, g, b];
  24068. };
  24069. convert.ansi256.rgb = function (args) {
  24070. if (args >= 232) {
  24071. var c = (args - 232) * 10 + 8;
  24072. return [c, c, c];
  24073. }
  24074. args -= 16;
  24075. var rem;
  24076. var r = Math.floor(args / 36) / 5 * 255;
  24077. var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
  24078. var b = rem % 6 / 5 * 255;
  24079. return [r, g, b];
  24080. };
  24081. convert.rgb.hex = function (args) {
  24082. var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
  24083. var string = integer.toString(16).toUpperCase();
  24084. return '000000'.substring(string.length) + string;
  24085. };
  24086. convert.hex.rgb = function (args) {
  24087. var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
  24088. if (!match) {
  24089. return [0, 0, 0];
  24090. }
  24091. var colorString = match[0];
  24092. if (match[0].length === 3) {
  24093. colorString = colorString.split('').map(function (_char) {
  24094. return _char + _char;
  24095. }).join('');
  24096. }
  24097. var integer = parseInt(colorString, 16);
  24098. var r = integer >> 16 & 0xFF;
  24099. var g = integer >> 8 & 0xFF;
  24100. var b = integer & 0xFF;
  24101. return [r, g, b];
  24102. };
  24103. convert.rgb.hcg = function (rgb) {
  24104. var r = rgb[0] / 255;
  24105. var g = rgb[1] / 255;
  24106. var b = rgb[2] / 255;
  24107. var max = Math.max(Math.max(r, g), b);
  24108. var min = Math.min(Math.min(r, g), b);
  24109. var chroma = max - min;
  24110. var grayscale;
  24111. var hue;
  24112. if (chroma < 1) {
  24113. grayscale = min / (1 - chroma);
  24114. } else {
  24115. grayscale = 0;
  24116. }
  24117. if (chroma <= 0) {
  24118. hue = 0;
  24119. } else if (max === r) {
  24120. hue = (g - b) / chroma % 6;
  24121. } else if (max === g) {
  24122. hue = 2 + (b - r) / chroma;
  24123. } else {
  24124. hue = 4 + (r - g) / chroma + 4;
  24125. }
  24126. hue /= 6;
  24127. hue %= 1;
  24128. return [hue * 360, chroma * 100, grayscale * 100];
  24129. };
  24130. convert.hsl.hcg = function (hsl) {
  24131. var s = hsl[1] / 100;
  24132. var l = hsl[2] / 100;
  24133. var c = 1;
  24134. var f = 0;
  24135. if (l < 0.5) {
  24136. c = 2.0 * s * l;
  24137. } else {
  24138. c = 2.0 * s * (1.0 - l);
  24139. }
  24140. if (c < 1.0) {
  24141. f = (l - 0.5 * c) / (1.0 - c);
  24142. }
  24143. return [hsl[0], c * 100, f * 100];
  24144. };
  24145. convert.hsv.hcg = function (hsv) {
  24146. var s = hsv[1] / 100;
  24147. var v = hsv[2] / 100;
  24148. var c = s * v;
  24149. var f = 0;
  24150. if (c < 1.0) {
  24151. f = (v - c) / (1 - c);
  24152. }
  24153. return [hsv[0], c * 100, f * 100];
  24154. };
  24155. convert.hcg.rgb = function (hcg) {
  24156. var h = hcg[0] / 360;
  24157. var c = hcg[1] / 100;
  24158. var g = hcg[2] / 100;
  24159. if (c === 0.0) {
  24160. return [g * 255, g * 255, g * 255];
  24161. }
  24162. var pure = [0, 0, 0];
  24163. var hi = h % 1 * 6;
  24164. var v = hi % 1;
  24165. var w = 1 - v;
  24166. var mg = 0;
  24167. switch (Math.floor(hi)) {
  24168. case 0:
  24169. pure[0] = 1;
  24170. pure[1] = v;
  24171. pure[2] = 0;
  24172. break;
  24173. case 1:
  24174. pure[0] = w;
  24175. pure[1] = 1;
  24176. pure[2] = 0;
  24177. break;
  24178. case 2:
  24179. pure[0] = 0;
  24180. pure[1] = 1;
  24181. pure[2] = v;
  24182. break;
  24183. case 3:
  24184. pure[0] = 0;
  24185. pure[1] = w;
  24186. pure[2] = 1;
  24187. break;
  24188. case 4:
  24189. pure[0] = v;
  24190. pure[1] = 0;
  24191. pure[2] = 1;
  24192. break;
  24193. default:
  24194. pure[0] = 1;
  24195. pure[1] = 0;
  24196. pure[2] = w;
  24197. }
  24198. mg = (1.0 - c) * g;
  24199. return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
  24200. };
  24201. convert.hcg.hsv = function (hcg) {
  24202. var c = hcg[1] / 100;
  24203. var g = hcg[2] / 100;
  24204. var v = c + g * (1.0 - c);
  24205. var f = 0;
  24206. if (v > 0.0) {
  24207. f = c / v;
  24208. }
  24209. return [hcg[0], f * 100, v * 100];
  24210. };
  24211. convert.hcg.hsl = function (hcg) {
  24212. var c = hcg[1] / 100;
  24213. var g = hcg[2] / 100;
  24214. var l = g * (1.0 - c) + 0.5 * c;
  24215. var s = 0;
  24216. if (l > 0.0 && l < 0.5) {
  24217. s = c / (2 * l);
  24218. } else if (l >= 0.5 && l < 1.0) {
  24219. s = c / (2 * (1 - l));
  24220. }
  24221. return [hcg[0], s * 100, l * 100];
  24222. };
  24223. convert.hcg.hwb = function (hcg) {
  24224. var c = hcg[1] / 100;
  24225. var g = hcg[2] / 100;
  24226. var v = c + g * (1.0 - c);
  24227. return [hcg[0], (v - c) * 100, (1 - v) * 100];
  24228. };
  24229. convert.hwb.hcg = function (hwb) {
  24230. var w = hwb[1] / 100;
  24231. var b = hwb[2] / 100;
  24232. var v = 1 - b;
  24233. var c = v - w;
  24234. var g = 0;
  24235. if (c < 1) {
  24236. g = (v - c) / (1 - c);
  24237. }
  24238. return [hwb[0], c * 100, g * 100];
  24239. };
  24240. convert.apple.rgb = function (apple) {
  24241. return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
  24242. };
  24243. convert.rgb.apple = function (rgb) {
  24244. return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
  24245. };
  24246. convert.gray.rgb = function (args) {
  24247. return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
  24248. };
  24249. convert.gray.hsl = convert.gray.hsv = function (args) {
  24250. return [0, 0, args[0]];
  24251. };
  24252. convert.gray.hwb = function (gray) {
  24253. return [0, 100, gray[0]];
  24254. };
  24255. convert.gray.cmyk = function (gray) {
  24256. return [0, 0, 0, gray[0]];
  24257. };
  24258. convert.gray.lab = function (gray) {
  24259. return [gray[0], 0, 0];
  24260. };
  24261. convert.gray.hex = function (gray) {
  24262. var val = Math.round(gray[0] / 100 * 255) & 0xFF;
  24263. var integer = (val << 16) + (val << 8) + val;
  24264. var string = integer.toString(16).toUpperCase();
  24265. return '000000'.substring(string.length) + string;
  24266. };
  24267. convert.rgb.gray = function (rgb) {
  24268. var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
  24269. return [val / 255 * 100];
  24270. };
  24271. }, "/$$rollup_base$$/packages/babel-highlight/node_modules/chalk/node_modules/ansi-styles/node_modules/color-convert");
  24272. function buildGraph() {
  24273. var graph = {};
  24274. var models = Object.keys(conversions);
  24275. for (var len = models.length, i = 0; i < len; i++) {
  24276. graph[models[i]] = {
  24277. distance: -1,
  24278. parent: null
  24279. };
  24280. }
  24281. return graph;
  24282. }
  24283. function deriveBFS(fromModel) {
  24284. var graph = buildGraph();
  24285. var queue = [fromModel];
  24286. graph[fromModel].distance = 0;
  24287. while (queue.length) {
  24288. var current = queue.pop();
  24289. var adjacents = Object.keys(conversions[current]);
  24290. for (var len = adjacents.length, i = 0; i < len; i++) {
  24291. var adjacent = adjacents[i];
  24292. var node = graph[adjacent];
  24293. if (node.distance === -1) {
  24294. node.distance = graph[current].distance + 1;
  24295. node.parent = current;
  24296. queue.unshift(adjacent);
  24297. }
  24298. }
  24299. }
  24300. return graph;
  24301. }
  24302. function link(from, to) {
  24303. return function (args) {
  24304. return to(from(args));
  24305. };
  24306. }
  24307. function wrapConversion(toModel, graph) {
  24308. var path = [graph[toModel].parent, toModel];
  24309. var fn = conversions[graph[toModel].parent][toModel];
  24310. var cur = graph[toModel].parent;
  24311. while (graph[cur].parent) {
  24312. path.unshift(graph[cur].parent);
  24313. fn = link(conversions[graph[cur].parent][cur], fn);
  24314. cur = graph[cur].parent;
  24315. }
  24316. fn.conversion = path;
  24317. return fn;
  24318. }
  24319. var route = function route(fromModel) {
  24320. var graph = deriveBFS(fromModel);
  24321. var conversion = {};
  24322. var models = Object.keys(graph);
  24323. for (var len = models.length, i = 0; i < len; i++) {
  24324. var toModel = models[i];
  24325. var node = graph[toModel];
  24326. if (node.parent === null) {
  24327. continue;
  24328. }
  24329. conversion[toModel] = wrapConversion(toModel, graph);
  24330. }
  24331. return conversion;
  24332. };
  24333. var convert = {};
  24334. var models = Object.keys(conversions);
  24335. function wrapRaw(fn) {
  24336. var wrappedFn = function wrappedFn(args) {
  24337. if (args === undefined || args === null) {
  24338. return args;
  24339. }
  24340. if (arguments.length > 1) {
  24341. args = Array.prototype.slice.call(arguments);
  24342. }
  24343. return fn(args);
  24344. };
  24345. if ('conversion' in fn) {
  24346. wrappedFn.conversion = fn.conversion;
  24347. }
  24348. return wrappedFn;
  24349. }
  24350. function wrapRounded(fn) {
  24351. var wrappedFn = function wrappedFn(args) {
  24352. if (args === undefined || args === null) {
  24353. return args;
  24354. }
  24355. if (arguments.length > 1) {
  24356. args = Array.prototype.slice.call(arguments);
  24357. }
  24358. var result = fn(args);
  24359. if (typeof result === 'object') {
  24360. for (var len = result.length, i = 0; i < len; i++) {
  24361. result[i] = Math.round(result[i]);
  24362. }
  24363. }
  24364. return result;
  24365. };
  24366. if ('conversion' in fn) {
  24367. wrappedFn.conversion = fn.conversion;
  24368. }
  24369. return wrappedFn;
  24370. }
  24371. models.forEach(function (fromModel) {
  24372. convert[fromModel] = {};
  24373. Object.defineProperty(convert[fromModel], 'channels', {
  24374. value: conversions[fromModel].channels
  24375. });
  24376. Object.defineProperty(convert[fromModel], 'labels', {
  24377. value: conversions[fromModel].labels
  24378. });
  24379. var routes = route(fromModel);
  24380. var routeModels = Object.keys(routes);
  24381. routeModels.forEach(function (toModel) {
  24382. var fn = routes[toModel];
  24383. convert[fromModel][toModel] = wrapRounded(fn);
  24384. convert[fromModel][toModel].raw = wrapRaw(fn);
  24385. });
  24386. });
  24387. var colorConvert = convert;
  24388. var ansiStyles = createCommonjsModule(function (module) {
  24389. var wrapAnsi16 = function wrapAnsi16(fn, offset) {
  24390. return function () {
  24391. var code = fn.apply(colorConvert, arguments);
  24392. return "\x1B[" + (code + offset) + "m";
  24393. };
  24394. };
  24395. var wrapAnsi256 = function wrapAnsi256(fn, offset) {
  24396. return function () {
  24397. var code = fn.apply(colorConvert, arguments);
  24398. return "\x1B[" + (38 + offset) + ";5;" + code + "m";
  24399. };
  24400. };
  24401. var wrapAnsi16m = function wrapAnsi16m(fn, offset) {
  24402. return function () {
  24403. var rgb = fn.apply(colorConvert, arguments);
  24404. return "\x1B[" + (38 + offset) + ";2;" + rgb[0] + ";" + rgb[1] + ";" + rgb[2] + "m";
  24405. };
  24406. };
  24407. function assembleStyles() {
  24408. var codes = new Map();
  24409. var styles = {
  24410. modifier: {
  24411. reset: [0, 0],
  24412. bold: [1, 22],
  24413. dim: [2, 22],
  24414. italic: [3, 23],
  24415. underline: [4, 24],
  24416. inverse: [7, 27],
  24417. hidden: [8, 28],
  24418. strikethrough: [9, 29]
  24419. },
  24420. color: {
  24421. black: [30, 39],
  24422. red: [31, 39],
  24423. green: [32, 39],
  24424. yellow: [33, 39],
  24425. blue: [34, 39],
  24426. magenta: [35, 39],
  24427. cyan: [36, 39],
  24428. white: [37, 39],
  24429. gray: [90, 39],
  24430. redBright: [91, 39],
  24431. greenBright: [92, 39],
  24432. yellowBright: [93, 39],
  24433. blueBright: [94, 39],
  24434. magentaBright: [95, 39],
  24435. cyanBright: [96, 39],
  24436. whiteBright: [97, 39]
  24437. },
  24438. bgColor: {
  24439. bgBlack: [40, 49],
  24440. bgRed: [41, 49],
  24441. bgGreen: [42, 49],
  24442. bgYellow: [43, 49],
  24443. bgBlue: [44, 49],
  24444. bgMagenta: [45, 49],
  24445. bgCyan: [46, 49],
  24446. bgWhite: [47, 49],
  24447. bgBlackBright: [100, 49],
  24448. bgRedBright: [101, 49],
  24449. bgGreenBright: [102, 49],
  24450. bgYellowBright: [103, 49],
  24451. bgBlueBright: [104, 49],
  24452. bgMagentaBright: [105, 49],
  24453. bgCyanBright: [106, 49],
  24454. bgWhiteBright: [107, 49]
  24455. }
  24456. };
  24457. styles.color.grey = styles.color.gray;
  24458. for (var _i = 0, _Object$keys = Object.keys(styles); _i < _Object$keys.length; _i++) {
  24459. var groupName = _Object$keys[_i];
  24460. var group = styles[groupName];
  24461. for (var _i2 = 0, _Object$keys2 = Object.keys(group); _i2 < _Object$keys2.length; _i2++) {
  24462. var styleName = _Object$keys2[_i2];
  24463. var style = group[styleName];
  24464. styles[styleName] = {
  24465. open: "\x1B[" + style[0] + "m",
  24466. close: "\x1B[" + style[1] + "m"
  24467. };
  24468. group[styleName] = styles[styleName];
  24469. codes.set(style[0], style[1]);
  24470. }
  24471. Object.defineProperty(styles, groupName, {
  24472. value: group,
  24473. enumerable: false
  24474. });
  24475. Object.defineProperty(styles, 'codes', {
  24476. value: codes,
  24477. enumerable: false
  24478. });
  24479. }
  24480. var ansi2ansi = function ansi2ansi(n) {
  24481. return n;
  24482. };
  24483. var rgb2rgb = function rgb2rgb(r, g, b) {
  24484. return [r, g, b];
  24485. };
  24486. styles.color.close = "\x1B[39m";
  24487. styles.bgColor.close = "\x1B[49m";
  24488. styles.color.ansi = {
  24489. ansi: wrapAnsi16(ansi2ansi, 0)
  24490. };
  24491. styles.color.ansi256 = {
  24492. ansi256: wrapAnsi256(ansi2ansi, 0)
  24493. };
  24494. styles.color.ansi16m = {
  24495. rgb: wrapAnsi16m(rgb2rgb, 0)
  24496. };
  24497. styles.bgColor.ansi = {
  24498. ansi: wrapAnsi16(ansi2ansi, 10)
  24499. };
  24500. styles.bgColor.ansi256 = {
  24501. ansi256: wrapAnsi256(ansi2ansi, 10)
  24502. };
  24503. styles.bgColor.ansi16m = {
  24504. rgb: wrapAnsi16m(rgb2rgb, 10)
  24505. };
  24506. for (var _i3 = 0, _Object$keys3 = Object.keys(colorConvert); _i3 < _Object$keys3.length; _i3++) {
  24507. var key = _Object$keys3[_i3];
  24508. if (typeof colorConvert[key] !== 'object') {
  24509. continue;
  24510. }
  24511. var suite = colorConvert[key];
  24512. if (key === 'ansi16') {
  24513. key = 'ansi';
  24514. }
  24515. if ('ansi16' in suite) {
  24516. styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
  24517. styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
  24518. }
  24519. if ('ansi256' in suite) {
  24520. styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
  24521. styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
  24522. }
  24523. if ('rgb' in suite) {
  24524. styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
  24525. styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
  24526. }
  24527. }
  24528. return styles;
  24529. }
  24530. Object.defineProperty(module, 'exports', {
  24531. enumerable: true,
  24532. get: assembleStyles
  24533. });
  24534. }, "/$$rollup_base$$/packages/babel-highlight/node_modules/chalk/node_modules/ansi-styles");
  24535. var browser$3 = {
  24536. stdout: false,
  24537. stderr: false
  24538. };
  24539. var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
  24540. var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
  24541. var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
  24542. var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
  24543. var ESCAPES = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', "\x1B"], ['a', "\x07"]]);
  24544. function unescape(c) {
  24545. if (c[0] === 'u' && c.length === 5 || c[0] === 'x' && c.length === 3) {
  24546. return String.fromCharCode(parseInt(c.slice(1), 16));
  24547. }
  24548. return ESCAPES.get(c) || c;
  24549. }
  24550. function parseArguments(name, args) {
  24551. var results = [];
  24552. var chunks = args.trim().split(/\s*,\s*/g);
  24553. var matches;
  24554. for (var _iterator = _createForOfIteratorHelperLoose(chunks), _step; !(_step = _iterator()).done;) {
  24555. var chunk = _step.value;
  24556. if (!isNaN(chunk)) {
  24557. results.push(Number(chunk));
  24558. } else if (matches = chunk.match(STRING_REGEX)) {
  24559. results.push(matches[2].replace(ESCAPE_REGEX, function (m, escape, chr) {
  24560. return escape ? unescape(escape) : chr;
  24561. }));
  24562. } else {
  24563. throw new Error("Invalid Chalk template style argument: " + chunk + " (in style '" + name + "')");
  24564. }
  24565. }
  24566. return results;
  24567. }
  24568. function parseStyle(style) {
  24569. STYLE_REGEX.lastIndex = 0;
  24570. var results = [];
  24571. var matches;
  24572. while ((matches = STYLE_REGEX.exec(style)) !== null) {
  24573. var name = matches[1];
  24574. if (matches[2]) {
  24575. var args = parseArguments(name, matches[2]);
  24576. results.push([name].concat(args));
  24577. } else {
  24578. results.push([name]);
  24579. }
  24580. }
  24581. return results;
  24582. }
  24583. function buildStyle(chalk, styles) {
  24584. var enabled = {};
  24585. for (var _iterator2 = _createForOfIteratorHelperLoose(styles), _step2; !(_step2 = _iterator2()).done;) {
  24586. var layer = _step2.value;
  24587. for (var _iterator3 = _createForOfIteratorHelperLoose(layer.styles), _step3; !(_step3 = _iterator3()).done;) {
  24588. var style = _step3.value;
  24589. enabled[style[0]] = layer.inverse ? null : style.slice(1);
  24590. }
  24591. }
  24592. var current = chalk;
  24593. for (var _i = 0, _Object$keys = Object.keys(enabled); _i < _Object$keys.length; _i++) {
  24594. var styleName = _Object$keys[_i];
  24595. if (Array.isArray(enabled[styleName])) {
  24596. if (!(styleName in current)) {
  24597. throw new Error("Unknown Chalk style: " + styleName);
  24598. }
  24599. if (enabled[styleName].length > 0) {
  24600. current = current[styleName].apply(current, enabled[styleName]);
  24601. } else {
  24602. current = current[styleName];
  24603. }
  24604. }
  24605. }
  24606. return current;
  24607. }
  24608. var templates = function templates(chalk, tmp) {
  24609. var styles = [];
  24610. var chunks = [];
  24611. var chunk = [];
  24612. tmp.replace(TEMPLATE_REGEX, function (m, escapeChar, inverse, style, close, chr) {
  24613. if (escapeChar) {
  24614. chunk.push(unescape(escapeChar));
  24615. } else if (style) {
  24616. var str = chunk.join('');
  24617. chunk = [];
  24618. chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
  24619. styles.push({
  24620. inverse: inverse,
  24621. styles: parseStyle(style)
  24622. });
  24623. } else if (close) {
  24624. if (styles.length === 0) {
  24625. throw new Error('Found extraneous } in Chalk template literal');
  24626. }
  24627. chunks.push(buildStyle(chalk, styles)(chunk.join('')));
  24628. chunk = [];
  24629. styles.pop();
  24630. } else {
  24631. chunk.push(chr);
  24632. }
  24633. });
  24634. chunks.push(chunk.join(''));
  24635. if (styles.length > 0) {
  24636. var errMsg = "Chalk template literal is missing " + styles.length + " closing bracket" + (styles.length === 1 ? '' : 's') + " (`}`)";
  24637. throw new Error(errMsg);
  24638. }
  24639. return chunks.join('');
  24640. };
  24641. var chalk = createCommonjsModule(function (module) {
  24642. var stdoutColor = browser$3.stdout;
  24643. var isSimpleWindowsTerm = browser$6.platform === 'win32' && !(browser$6.env.TERM || '').toLowerCase().startsWith('xterm');
  24644. var levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
  24645. var skipModels = new Set(['gray']);
  24646. var styles = Object.create(null);
  24647. function applyOptions(obj, options) {
  24648. options = options || {};
  24649. var scLevel = 0;
  24650. obj.level = options.level === undefined ? scLevel : options.level;
  24651. obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
  24652. }
  24653. function Chalk(options) {
  24654. if (!this || !(this instanceof Chalk) || this.template) {
  24655. var _chalk = {};
  24656. applyOptions(_chalk, options);
  24657. _chalk.template = function () {
  24658. var args = [].slice.call(arguments);
  24659. return chalkTag.apply(null, [_chalk.template].concat(args));
  24660. };
  24661. Object.setPrototypeOf(_chalk, Chalk.prototype);
  24662. Object.setPrototypeOf(_chalk.template, _chalk);
  24663. _chalk.template.constructor = Chalk;
  24664. return _chalk.template;
  24665. }
  24666. applyOptions(this, options);
  24667. }
  24668. if (isSimpleWindowsTerm) {
  24669. ansiStyles.blue.open = "\x1B[94m";
  24670. }
  24671. var _loop = function _loop() {
  24672. var key = _Object$keys[_i];
  24673. ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
  24674. styles[key] = {
  24675. get: function get() {
  24676. var codes = ansiStyles[key];
  24677. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
  24678. }
  24679. };
  24680. };
  24681. for (var _i = 0, _Object$keys = Object.keys(ansiStyles); _i < _Object$keys.length; _i++) {
  24682. _loop();
  24683. }
  24684. styles.visible = {
  24685. get: function get() {
  24686. return build.call(this, this._styles || [], true, 'visible');
  24687. }
  24688. };
  24689. ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
  24690. var _loop2 = function _loop2() {
  24691. var model = _Object$keys2[_i2];
  24692. if (skipModels.has(model)) {
  24693. return "continue";
  24694. }
  24695. styles[model] = {
  24696. get: function get() {
  24697. var level = this.level;
  24698. return function () {
  24699. var open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
  24700. var codes = {
  24701. open: open,
  24702. close: ansiStyles.color.close,
  24703. closeRe: ansiStyles.color.closeRe
  24704. };
  24705. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  24706. };
  24707. }
  24708. };
  24709. };
  24710. for (var _i2 = 0, _Object$keys2 = Object.keys(ansiStyles.color.ansi); _i2 < _Object$keys2.length; _i2++) {
  24711. var _ret = _loop2();
  24712. if (_ret === "continue") continue;
  24713. }
  24714. ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
  24715. var _loop3 = function _loop3() {
  24716. var model = _Object$keys3[_i3];
  24717. if (skipModels.has(model)) {
  24718. return "continue";
  24719. }
  24720. var bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
  24721. styles[bgModel] = {
  24722. get: function get() {
  24723. var level = this.level;
  24724. return function () {
  24725. var open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
  24726. var codes = {
  24727. open: open,
  24728. close: ansiStyles.bgColor.close,
  24729. closeRe: ansiStyles.bgColor.closeRe
  24730. };
  24731. return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
  24732. };
  24733. }
  24734. };
  24735. };
  24736. for (var _i3 = 0, _Object$keys3 = Object.keys(ansiStyles.bgColor.ansi); _i3 < _Object$keys3.length; _i3++) {
  24737. var _ret2 = _loop3();
  24738. if (_ret2 === "continue") continue;
  24739. }
  24740. var proto = Object.defineProperties(function () {}, styles);
  24741. function build(_styles, _empty, key) {
  24742. var builder = function builder() {
  24743. return applyStyle.apply(builder, arguments);
  24744. };
  24745. builder._styles = _styles;
  24746. builder._empty = _empty;
  24747. var self = this;
  24748. Object.defineProperty(builder, 'level', {
  24749. enumerable: true,
  24750. get: function get() {
  24751. return self.level;
  24752. },
  24753. set: function set(level) {
  24754. self.level = level;
  24755. }
  24756. });
  24757. Object.defineProperty(builder, 'enabled', {
  24758. enumerable: true,
  24759. get: function get() {
  24760. return self.enabled;
  24761. },
  24762. set: function set(enabled) {
  24763. self.enabled = enabled;
  24764. }
  24765. });
  24766. builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
  24767. builder.__proto__ = proto;
  24768. return builder;
  24769. }
  24770. function applyStyle() {
  24771. var args = arguments;
  24772. var argsLen = args.length;
  24773. var str = String(arguments[0]);
  24774. if (argsLen === 0) {
  24775. return '';
  24776. }
  24777. if (argsLen > 1) {
  24778. for (var a = 1; a < argsLen; a++) {
  24779. str += ' ' + args[a];
  24780. }
  24781. }
  24782. if (!this.enabled || this.level <= 0 || !str) {
  24783. return this._empty ? '' : str;
  24784. }
  24785. var originalDim = ansiStyles.dim.open;
  24786. if (isSimpleWindowsTerm && this.hasGrey) {
  24787. ansiStyles.dim.open = '';
  24788. }
  24789. for (var _iterator = _createForOfIteratorHelperLoose(this._styles.slice().reverse()), _step; !(_step = _iterator()).done;) {
  24790. var code = _step.value;
  24791. str = code.open + str.replace(code.closeRe, code.open) + code.close;
  24792. str = str.replace(/\r?\n/g, code.close + "$&" + code.open);
  24793. }
  24794. ansiStyles.dim.open = originalDim;
  24795. return str;
  24796. }
  24797. function chalkTag(chalk, strings) {
  24798. if (!Array.isArray(strings)) {
  24799. return [].slice.call(arguments, 1).join(' ');
  24800. }
  24801. var args = [].slice.call(arguments, 2);
  24802. var parts = [strings.raw[0]];
  24803. for (var i = 1; i < strings.length; i++) {
  24804. parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
  24805. parts.push(String(strings.raw[i]));
  24806. }
  24807. return templates(chalk, parts.join(''));
  24808. }
  24809. Object.defineProperties(Chalk.prototype, styles);
  24810. module.exports = Chalk();
  24811. module.exports.supportsColor = stdoutColor;
  24812. module.exports["default"] = module.exports;
  24813. }, "/$$rollup_base$$/packages/babel-highlight/node_modules/chalk");
  24814. var sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
  24815. function getDefs$1(chalk) {
  24816. return {
  24817. keyword: chalk.cyan,
  24818. capitalized: chalk.yellow,
  24819. jsxIdentifier: chalk.yellow,
  24820. punctuator: chalk.yellow,
  24821. number: chalk.magenta,
  24822. string: chalk.green,
  24823. regex: chalk.magenta,
  24824. comment: chalk.grey,
  24825. invalid: chalk.white.bgRed.bold
  24826. };
  24827. }
  24828. var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
  24829. var BRACKET = /^[()[\]{}]$/;
  24830. var tokenize;
  24831. {
  24832. var JSX_TAG = /^[a-z][\w-]*$/i;
  24833. var getTokenType = function getTokenType(token, offset, text) {
  24834. if (token.type === "name") {
  24835. if (isKeyword(token.value) || isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) {
  24836. return "keyword";
  24837. }
  24838. if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
  24839. return "jsxIdentifier";
  24840. }
  24841. if (token.value[0] !== token.value[0].toLowerCase()) {
  24842. return "capitalized";
  24843. }
  24844. }
  24845. if (token.type === "punctuator" && BRACKET.test(token.value)) {
  24846. return "bracket";
  24847. }
  24848. if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
  24849. return "punctuator";
  24850. }
  24851. return token.type;
  24852. };
  24853. tokenize = regenerator.mark(function tokenize(text) {
  24854. var match, token;
  24855. return regenerator.wrap(function tokenize$(_context) {
  24856. while (1) {
  24857. switch (_context.prev = _context.next) {
  24858. case 0:
  24859. if (!(match = jsTokens["default"].exec(text))) {
  24860. _context.next = 6;
  24861. break;
  24862. }
  24863. token = jsTokens.matchToToken(match);
  24864. _context.next = 4;
  24865. return {
  24866. type: getTokenType(token, match.index, text),
  24867. value: token.value
  24868. };
  24869. case 4:
  24870. _context.next = 0;
  24871. break;
  24872. case 6:
  24873. case "end":
  24874. return _context.stop();
  24875. }
  24876. }
  24877. }, tokenize);
  24878. });
  24879. }
  24880. function highlightTokens(defs, text) {
  24881. var highlighted = "";
  24882. var _loop = function _loop() {
  24883. var _step$value = _step.value,
  24884. type = _step$value.type,
  24885. value = _step$value.value;
  24886. var colorize = defs[type];
  24887. if (colorize) {
  24888. highlighted += value.split(NEWLINE$1).map(function (str) {
  24889. return colorize(str);
  24890. }).join("\n");
  24891. } else {
  24892. highlighted += value;
  24893. }
  24894. };
  24895. for (var _iterator = _createForOfIteratorHelperLoose(tokenize(text)), _step; !(_step = _iterator()).done;) {
  24896. _loop();
  24897. }
  24898. return highlighted;
  24899. }
  24900. function shouldHighlight(options) {
  24901. return !!chalk.supportsColor || options.forceColor;
  24902. }
  24903. function getChalk(options) {
  24904. return options.forceColor ? new chalk.constructor({
  24905. enabled: true,
  24906. level: 1
  24907. }) : chalk;
  24908. }
  24909. function highlight(code, options) {
  24910. if (options === void 0) {
  24911. options = {};
  24912. }
  24913. if (shouldHighlight(options)) {
  24914. var chalk = getChalk(options);
  24915. var defs = getDefs$1(chalk);
  24916. return highlightTokens(defs, code);
  24917. } else {
  24918. return code;
  24919. }
  24920. }
  24921. function getDefs(chalk) {
  24922. return {
  24923. gutter: chalk.grey,
  24924. marker: chalk.red.bold,
  24925. message: chalk.red.bold
  24926. };
  24927. }
  24928. var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
  24929. function getMarkerLines(loc, source, opts) {
  24930. var startLoc = Object.assign({
  24931. column: 0,
  24932. line: -1
  24933. }, loc.start);
  24934. var endLoc = Object.assign({}, startLoc, loc.end);
  24935. var _ref = opts || {},
  24936. _ref$linesAbove = _ref.linesAbove,
  24937. linesAbove = _ref$linesAbove === void 0 ? 2 : _ref$linesAbove,
  24938. _ref$linesBelow = _ref.linesBelow,
  24939. linesBelow = _ref$linesBelow === void 0 ? 3 : _ref$linesBelow;
  24940. var startLine = startLoc.line;
  24941. var startColumn = startLoc.column;
  24942. var endLine = endLoc.line;
  24943. var endColumn = endLoc.column;
  24944. var start = Math.max(startLine - (linesAbove + 1), 0);
  24945. var end = Math.min(source.length, endLine + linesBelow);
  24946. if (startLine === -1) {
  24947. start = 0;
  24948. }
  24949. if (endLine === -1) {
  24950. end = source.length;
  24951. }
  24952. var lineDiff = endLine - startLine;
  24953. var markerLines = {};
  24954. if (lineDiff) {
  24955. for (var i = 0; i <= lineDiff; i++) {
  24956. var lineNumber = i + startLine;
  24957. if (!startColumn) {
  24958. markerLines[lineNumber] = true;
  24959. } else if (i === 0) {
  24960. var sourceLength = source[lineNumber - 1].length;
  24961. markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
  24962. } else if (i === lineDiff) {
  24963. markerLines[lineNumber] = [0, endColumn];
  24964. } else {
  24965. var _sourceLength = source[lineNumber - i].length;
  24966. markerLines[lineNumber] = [0, _sourceLength];
  24967. }
  24968. }
  24969. } else {
  24970. if (startColumn === endColumn) {
  24971. if (startColumn) {
  24972. markerLines[startLine] = [startColumn, 0];
  24973. } else {
  24974. markerLines[startLine] = true;
  24975. }
  24976. } else {
  24977. markerLines[startLine] = [startColumn, endColumn - startColumn];
  24978. }
  24979. }
  24980. return {
  24981. start: start,
  24982. end: end,
  24983. markerLines: markerLines
  24984. };
  24985. }
  24986. function codeFrameColumns(rawLines, loc, opts) {
  24987. if (opts === void 0) {
  24988. opts = {};
  24989. }
  24990. var highlighted = (opts.highlightCode || opts.forceColor) && shouldHighlight(opts);
  24991. var chalk = getChalk(opts);
  24992. var defs = getDefs(chalk);
  24993. var maybeHighlight = function maybeHighlight(chalkFn, string) {
  24994. return highlighted ? chalkFn(string) : string;
  24995. };
  24996. var lines = rawLines.split(NEWLINE);
  24997. var _getMarkerLines = getMarkerLines(loc, lines, opts),
  24998. start = _getMarkerLines.start,
  24999. end = _getMarkerLines.end,
  25000. markerLines = _getMarkerLines.markerLines;
  25001. var hasColumns = loc.start && typeof loc.start.column === "number";
  25002. var numberMaxWidth = String(end).length;
  25003. var highlightedLines = highlighted ? highlight(rawLines, opts) : rawLines;
  25004. var frame = highlightedLines.split(NEWLINE).slice(start, end).map(function (line, index) {
  25005. var number = start + 1 + index;
  25006. var paddedNumber = (" " + number).slice(-numberMaxWidth);
  25007. var gutter = " " + paddedNumber + " |";
  25008. var hasMarker = markerLines[number];
  25009. var lastMarkerLine = !markerLines[number + 1];
  25010. if (hasMarker) {
  25011. var markerLine = "";
  25012. if (Array.isArray(hasMarker)) {
  25013. var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
  25014. var numberOfMarkers = hasMarker[1] || 1;
  25015. markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
  25016. if (lastMarkerLine && opts.message) {
  25017. markerLine += " " + maybeHighlight(defs.message, opts.message);
  25018. }
  25019. }
  25020. return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? " " + line : "", markerLine].join("");
  25021. } else {
  25022. return " " + maybeHighlight(defs.gutter, gutter) + (line.length > 0 ? " " + line : "");
  25023. }
  25024. }).join("\n");
  25025. if (opts.message && !hasColumns) {
  25026. frame = "" + " ".repeat(numberMaxWidth + 1) + opts.message + "\n" + frame;
  25027. }
  25028. if (highlighted) {
  25029. return chalk.reset(frame);
  25030. } else {
  25031. return frame;
  25032. }
  25033. }
  25034. var beforeExpr = true;
  25035. var startsExpr = true;
  25036. var isLoop = true;
  25037. var isAssign = true;
  25038. var prefix = true;
  25039. var postfix = true;
  25040. var TokenType = function TokenType(label, conf) {
  25041. if (conf === void 0) {
  25042. conf = {};
  25043. }
  25044. this.label = void 0;
  25045. this.keyword = void 0;
  25046. this.beforeExpr = void 0;
  25047. this.startsExpr = void 0;
  25048. this.rightAssociative = void 0;
  25049. this.isLoop = void 0;
  25050. this.isAssign = void 0;
  25051. this.prefix = void 0;
  25052. this.postfix = void 0;
  25053. this.binop = void 0;
  25054. this.updateContext = void 0;
  25055. this.label = label;
  25056. this.keyword = conf.keyword;
  25057. this.beforeExpr = !!conf.beforeExpr;
  25058. this.startsExpr = !!conf.startsExpr;
  25059. this.rightAssociative = !!conf.rightAssociative;
  25060. this.isLoop = !!conf.isLoop;
  25061. this.isAssign = !!conf.isAssign;
  25062. this.prefix = !!conf.prefix;
  25063. this.postfix = !!conf.postfix;
  25064. this.binop = conf.binop != null ? conf.binop : null;
  25065. this.updateContext = null;
  25066. };
  25067. var keywords = new Map();
  25068. function createKeyword(name, options) {
  25069. if (options === void 0) {
  25070. options = {};
  25071. }
  25072. options.keyword = name;
  25073. var token = new TokenType(name, options);
  25074. keywords.set(name, token);
  25075. return token;
  25076. }
  25077. function createBinop(name, binop) {
  25078. return new TokenType(name, {
  25079. beforeExpr: beforeExpr,
  25080. binop: binop
  25081. });
  25082. }
  25083. var types$1 = {
  25084. num: new TokenType("num", {
  25085. startsExpr: startsExpr
  25086. }),
  25087. bigint: new TokenType("bigint", {
  25088. startsExpr: startsExpr
  25089. }),
  25090. decimal: new TokenType("decimal", {
  25091. startsExpr: startsExpr
  25092. }),
  25093. regexp: new TokenType("regexp", {
  25094. startsExpr: startsExpr
  25095. }),
  25096. string: new TokenType("string", {
  25097. startsExpr: startsExpr
  25098. }),
  25099. name: new TokenType("name", {
  25100. startsExpr: startsExpr
  25101. }),
  25102. privateName: new TokenType("#name", {
  25103. startsExpr: startsExpr
  25104. }),
  25105. eof: new TokenType("eof"),
  25106. bracketL: new TokenType("[", {
  25107. beforeExpr: beforeExpr,
  25108. startsExpr: startsExpr
  25109. }),
  25110. bracketHashL: new TokenType("#[", {
  25111. beforeExpr: beforeExpr,
  25112. startsExpr: startsExpr
  25113. }),
  25114. bracketBarL: new TokenType("[|", {
  25115. beforeExpr: beforeExpr,
  25116. startsExpr: startsExpr
  25117. }),
  25118. bracketR: new TokenType("]"),
  25119. bracketBarR: new TokenType("|]"),
  25120. braceL: new TokenType("{", {
  25121. beforeExpr: beforeExpr,
  25122. startsExpr: startsExpr
  25123. }),
  25124. braceBarL: new TokenType("{|", {
  25125. beforeExpr: beforeExpr,
  25126. startsExpr: startsExpr
  25127. }),
  25128. braceHashL: new TokenType("#{", {
  25129. beforeExpr: beforeExpr,
  25130. startsExpr: startsExpr
  25131. }),
  25132. braceR: new TokenType("}", {
  25133. beforeExpr: beforeExpr
  25134. }),
  25135. braceBarR: new TokenType("|}"),
  25136. parenL: new TokenType("(", {
  25137. beforeExpr: beforeExpr,
  25138. startsExpr: startsExpr
  25139. }),
  25140. parenR: new TokenType(")"),
  25141. comma: new TokenType(",", {
  25142. beforeExpr: beforeExpr
  25143. }),
  25144. semi: new TokenType(";", {
  25145. beforeExpr: beforeExpr
  25146. }),
  25147. colon: new TokenType(":", {
  25148. beforeExpr: beforeExpr
  25149. }),
  25150. doubleColon: new TokenType("::", {
  25151. beforeExpr: beforeExpr
  25152. }),
  25153. dot: new TokenType("."),
  25154. question: new TokenType("?", {
  25155. beforeExpr: beforeExpr
  25156. }),
  25157. questionDot: new TokenType("?."),
  25158. arrow: new TokenType("=>", {
  25159. beforeExpr: beforeExpr
  25160. }),
  25161. template: new TokenType("template"),
  25162. ellipsis: new TokenType("...", {
  25163. beforeExpr: beforeExpr
  25164. }),
  25165. backQuote: new TokenType("`", {
  25166. startsExpr: startsExpr
  25167. }),
  25168. dollarBraceL: new TokenType("${", {
  25169. beforeExpr: beforeExpr,
  25170. startsExpr: startsExpr
  25171. }),
  25172. at: new TokenType("@"),
  25173. hash: new TokenType("#", {
  25174. startsExpr: startsExpr
  25175. }),
  25176. interpreterDirective: new TokenType("#!..."),
  25177. eq: new TokenType("=", {
  25178. beforeExpr: beforeExpr,
  25179. isAssign: isAssign
  25180. }),
  25181. assign: new TokenType("_=", {
  25182. beforeExpr: beforeExpr,
  25183. isAssign: isAssign
  25184. }),
  25185. slashAssign: new TokenType("_=", {
  25186. beforeExpr: beforeExpr,
  25187. isAssign: isAssign
  25188. }),
  25189. incDec: new TokenType("++/--", {
  25190. prefix: prefix,
  25191. postfix: postfix,
  25192. startsExpr: startsExpr
  25193. }),
  25194. bang: new TokenType("!", {
  25195. beforeExpr: beforeExpr,
  25196. prefix: prefix,
  25197. startsExpr: startsExpr
  25198. }),
  25199. tilde: new TokenType("~", {
  25200. beforeExpr: beforeExpr,
  25201. prefix: prefix,
  25202. startsExpr: startsExpr
  25203. }),
  25204. pipeline: createBinop("|>", 0),
  25205. nullishCoalescing: createBinop("??", 1),
  25206. logicalOR: createBinop("||", 1),
  25207. logicalAND: createBinop("&&", 2),
  25208. bitwiseOR: createBinop("|", 3),
  25209. bitwiseXOR: createBinop("^", 4),
  25210. bitwiseAND: createBinop("&", 5),
  25211. equality: createBinop("==/!=/===/!==", 6),
  25212. relational: createBinop("</>/<=/>=", 7),
  25213. bitShift: createBinop("<</>>/>>>", 8),
  25214. plusMin: new TokenType("+/-", {
  25215. beforeExpr: beforeExpr,
  25216. binop: 9,
  25217. prefix: prefix,
  25218. startsExpr: startsExpr
  25219. }),
  25220. modulo: new TokenType("%", {
  25221. beforeExpr: beforeExpr,
  25222. binop: 10,
  25223. startsExpr: startsExpr
  25224. }),
  25225. star: new TokenType("*", {
  25226. binop: 10
  25227. }),
  25228. slash: createBinop("/", 10),
  25229. exponent: new TokenType("**", {
  25230. beforeExpr: beforeExpr,
  25231. binop: 11,
  25232. rightAssociative: true
  25233. }),
  25234. _break: createKeyword("break"),
  25235. _case: createKeyword("case", {
  25236. beforeExpr: beforeExpr
  25237. }),
  25238. _catch: createKeyword("catch"),
  25239. _continue: createKeyword("continue"),
  25240. _debugger: createKeyword("debugger"),
  25241. _default: createKeyword("default", {
  25242. beforeExpr: beforeExpr
  25243. }),
  25244. _do: createKeyword("do", {
  25245. isLoop: isLoop,
  25246. beforeExpr: beforeExpr
  25247. }),
  25248. _else: createKeyword("else", {
  25249. beforeExpr: beforeExpr
  25250. }),
  25251. _finally: createKeyword("finally"),
  25252. _for: createKeyword("for", {
  25253. isLoop: isLoop
  25254. }),
  25255. _function: createKeyword("function", {
  25256. startsExpr: startsExpr
  25257. }),
  25258. _if: createKeyword("if"),
  25259. _return: createKeyword("return", {
  25260. beforeExpr: beforeExpr
  25261. }),
  25262. _switch: createKeyword("switch"),
  25263. _throw: createKeyword("throw", {
  25264. beforeExpr: beforeExpr,
  25265. prefix: prefix,
  25266. startsExpr: startsExpr
  25267. }),
  25268. _try: createKeyword("try"),
  25269. _var: createKeyword("var"),
  25270. _const: createKeyword("const"),
  25271. _while: createKeyword("while", {
  25272. isLoop: isLoop
  25273. }),
  25274. _with: createKeyword("with"),
  25275. _new: createKeyword("new", {
  25276. beforeExpr: beforeExpr,
  25277. startsExpr: startsExpr
  25278. }),
  25279. _this: createKeyword("this", {
  25280. startsExpr: startsExpr
  25281. }),
  25282. _super: createKeyword("super", {
  25283. startsExpr: startsExpr
  25284. }),
  25285. _class: createKeyword("class", {
  25286. startsExpr: startsExpr
  25287. }),
  25288. _extends: createKeyword("extends", {
  25289. beforeExpr: beforeExpr
  25290. }),
  25291. _export: createKeyword("export"),
  25292. _import: createKeyword("import", {
  25293. startsExpr: startsExpr
  25294. }),
  25295. _null: createKeyword("null", {
  25296. startsExpr: startsExpr
  25297. }),
  25298. _true: createKeyword("true", {
  25299. startsExpr: startsExpr
  25300. }),
  25301. _false: createKeyword("false", {
  25302. startsExpr: startsExpr
  25303. }),
  25304. _in: createKeyword("in", {
  25305. beforeExpr: beforeExpr,
  25306. binop: 7
  25307. }),
  25308. _instanceof: createKeyword("instanceof", {
  25309. beforeExpr: beforeExpr,
  25310. binop: 7
  25311. }),
  25312. _typeof: createKeyword("typeof", {
  25313. beforeExpr: beforeExpr,
  25314. prefix: prefix,
  25315. startsExpr: startsExpr
  25316. }),
  25317. _void: createKeyword("void", {
  25318. beforeExpr: beforeExpr,
  25319. prefix: prefix,
  25320. startsExpr: startsExpr
  25321. }),
  25322. _delete: createKeyword("delete", {
  25323. beforeExpr: beforeExpr,
  25324. prefix: prefix,
  25325. startsExpr: startsExpr
  25326. })
  25327. };
  25328. var lineBreak = /\r\n?|[\n\u2028\u2029]/;
  25329. var lineBreakG = new RegExp(lineBreak.source, "g");
  25330. function isNewLine(code) {
  25331. switch (code) {
  25332. case 10:
  25333. case 13:
  25334. case 8232:
  25335. case 8233:
  25336. return true;
  25337. default:
  25338. return false;
  25339. }
  25340. }
  25341. var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
  25342. function isWhitespace(code) {
  25343. switch (code) {
  25344. case 0x0009:
  25345. case 0x000b:
  25346. case 0x000c:
  25347. case 32:
  25348. case 160:
  25349. case 5760:
  25350. case 0x2000:
  25351. case 0x2001:
  25352. case 0x2002:
  25353. case 0x2003:
  25354. case 0x2004:
  25355. case 0x2005:
  25356. case 0x2006:
  25357. case 0x2007:
  25358. case 0x2008:
  25359. case 0x2009:
  25360. case 0x200a:
  25361. case 0x202f:
  25362. case 0x205f:
  25363. case 0x3000:
  25364. case 0xfeff:
  25365. return true;
  25366. default:
  25367. return false;
  25368. }
  25369. }
  25370. var Position = function Position(line, col) {
  25371. this.line = void 0;
  25372. this.column = void 0;
  25373. this.line = line;
  25374. this.column = col;
  25375. };
  25376. var SourceLocation = function SourceLocation(start, end) {
  25377. this.start = void 0;
  25378. this.end = void 0;
  25379. this.filename = void 0;
  25380. this.identifierName = void 0;
  25381. this.start = start;
  25382. this.end = end;
  25383. };
  25384. function getLineInfo(input, offset) {
  25385. var line = 1;
  25386. var lineStart = 0;
  25387. var match;
  25388. lineBreakG.lastIndex = 0;
  25389. while ((match = lineBreakG.exec(input)) && match.index < offset) {
  25390. line++;
  25391. lineStart = lineBreakG.lastIndex;
  25392. }
  25393. return new Position(line, offset - lineStart);
  25394. }
  25395. var BaseParser = function () {
  25396. function BaseParser() {
  25397. this.sawUnambiguousESM = false;
  25398. this.ambiguousScriptDifferentAst = false;
  25399. }
  25400. var _proto = BaseParser.prototype;
  25401. _proto.hasPlugin = function hasPlugin(name) {
  25402. return this.plugins.has(name);
  25403. };
  25404. _proto.getPluginOption = function getPluginOption(plugin, name) {
  25405. if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name];
  25406. };
  25407. return BaseParser;
  25408. }();
  25409. function last(stack) {
  25410. return stack[stack.length - 1];
  25411. }
  25412. var CommentsParser = function (_BaseParser) {
  25413. _inherits(CommentsParser, _BaseParser);
  25414. function CommentsParser() {
  25415. return _BaseParser.apply(this, arguments) || this;
  25416. }
  25417. var _proto = CommentsParser.prototype;
  25418. _proto.addComment = function addComment(comment) {
  25419. if (this.filename) comment.loc.filename = this.filename;
  25420. this.state.trailingComments.push(comment);
  25421. this.state.leadingComments.push(comment);
  25422. };
  25423. _proto.adjustCommentsAfterTrailingComma = function adjustCommentsAfterTrailingComma(node, elements, takeAllComments) {
  25424. if (this.state.leadingComments.length === 0) {
  25425. return;
  25426. }
  25427. var lastElement = null;
  25428. var i = elements.length;
  25429. while (lastElement === null && i > 0) {
  25430. lastElement = elements[--i];
  25431. }
  25432. if (lastElement === null) {
  25433. return;
  25434. }
  25435. for (var j = 0; j < this.state.leadingComments.length; j++) {
  25436. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  25437. this.state.leadingComments.splice(j, 1);
  25438. j--;
  25439. }
  25440. }
  25441. var newTrailingComments = [];
  25442. for (var _i = 0; _i < this.state.leadingComments.length; _i++) {
  25443. var leadingComment = this.state.leadingComments[_i];
  25444. if (leadingComment.end < node.end) {
  25445. newTrailingComments.push(leadingComment);
  25446. if (!takeAllComments) {
  25447. this.state.leadingComments.splice(_i, 1);
  25448. _i--;
  25449. }
  25450. } else {
  25451. if (node.trailingComments === undefined) {
  25452. node.trailingComments = [];
  25453. }
  25454. node.trailingComments.push(leadingComment);
  25455. }
  25456. }
  25457. if (takeAllComments) this.state.leadingComments = [];
  25458. if (newTrailingComments.length > 0) {
  25459. lastElement.trailingComments = newTrailingComments;
  25460. } else if (lastElement.trailingComments !== undefined) {
  25461. lastElement.trailingComments = [];
  25462. }
  25463. };
  25464. _proto.processComment = function processComment(node) {
  25465. if (node.type === "Program" && node.body.length > 0) return;
  25466. var stack = this.state.commentStack;
  25467. var firstChild, lastChild, trailingComments, i, j;
  25468. if (this.state.trailingComments.length > 0) {
  25469. if (this.state.trailingComments[0].start >= node.end) {
  25470. trailingComments = this.state.trailingComments;
  25471. this.state.trailingComments = [];
  25472. } else {
  25473. this.state.trailingComments.length = 0;
  25474. }
  25475. } else if (stack.length > 0) {
  25476. var lastInStack = last(stack);
  25477. if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {
  25478. trailingComments = lastInStack.trailingComments;
  25479. delete lastInStack.trailingComments;
  25480. }
  25481. }
  25482. if (stack.length > 0 && last(stack).start >= node.start) {
  25483. firstChild = stack.pop();
  25484. }
  25485. while (stack.length > 0 && last(stack).start >= node.start) {
  25486. lastChild = stack.pop();
  25487. }
  25488. if (!lastChild && firstChild) lastChild = firstChild;
  25489. if (firstChild) {
  25490. switch (node.type) {
  25491. case "ObjectExpression":
  25492. this.adjustCommentsAfterTrailingComma(node, node.properties);
  25493. break;
  25494. case "ObjectPattern":
  25495. this.adjustCommentsAfterTrailingComma(node, node.properties, true);
  25496. break;
  25497. case "CallExpression":
  25498. this.adjustCommentsAfterTrailingComma(node, node.arguments);
  25499. break;
  25500. case "ArrayExpression":
  25501. this.adjustCommentsAfterTrailingComma(node, node.elements);
  25502. break;
  25503. case "ArrayPattern":
  25504. this.adjustCommentsAfterTrailingComma(node, node.elements, true);
  25505. break;
  25506. }
  25507. } else if (this.state.commentPreviousNode && (this.state.commentPreviousNode.type === "ImportSpecifier" && node.type !== "ImportSpecifier" || this.state.commentPreviousNode.type === "ExportSpecifier" && node.type !== "ExportSpecifier")) {
  25508. this.adjustCommentsAfterTrailingComma(node, [this.state.commentPreviousNode]);
  25509. }
  25510. if (lastChild) {
  25511. if (lastChild.leadingComments) {
  25512. if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {
  25513. node.leadingComments = lastChild.leadingComments;
  25514. delete lastChild.leadingComments;
  25515. } else {
  25516. for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {
  25517. if (lastChild.leadingComments[i].end <= node.start) {
  25518. node.leadingComments = lastChild.leadingComments.splice(0, i + 1);
  25519. break;
  25520. }
  25521. }
  25522. }
  25523. }
  25524. } else if (this.state.leadingComments.length > 0) {
  25525. if (last(this.state.leadingComments).end <= node.start) {
  25526. if (this.state.commentPreviousNode) {
  25527. for (j = 0; j < this.state.leadingComments.length; j++) {
  25528. if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {
  25529. this.state.leadingComments.splice(j, 1);
  25530. j--;
  25531. }
  25532. }
  25533. }
  25534. if (this.state.leadingComments.length > 0) {
  25535. node.leadingComments = this.state.leadingComments;
  25536. this.state.leadingComments = [];
  25537. }
  25538. } else {
  25539. for (i = 0; i < this.state.leadingComments.length; i++) {
  25540. if (this.state.leadingComments[i].end > node.start) {
  25541. break;
  25542. }
  25543. }
  25544. var leadingComments = this.state.leadingComments.slice(0, i);
  25545. if (leadingComments.length) {
  25546. node.leadingComments = leadingComments;
  25547. }
  25548. trailingComments = this.state.leadingComments.slice(i);
  25549. if (trailingComments.length === 0) {
  25550. trailingComments = null;
  25551. }
  25552. }
  25553. }
  25554. this.state.commentPreviousNode = node;
  25555. if (trailingComments) {
  25556. if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {
  25557. node.innerComments = trailingComments;
  25558. } else {
  25559. var firstTrailingCommentIndex = trailingComments.findIndex(function (comment) {
  25560. return comment.end >= node.end;
  25561. });
  25562. if (firstTrailingCommentIndex > 0) {
  25563. node.innerComments = trailingComments.slice(0, firstTrailingCommentIndex);
  25564. node.trailingComments = trailingComments.slice(firstTrailingCommentIndex);
  25565. } else {
  25566. node.trailingComments = trailingComments;
  25567. }
  25568. }
  25569. }
  25570. stack.push(node);
  25571. };
  25572. return CommentsParser;
  25573. }(BaseParser);
  25574. var ErrorCodes = Object.freeze({
  25575. SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
  25576. SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
  25577. });
  25578. var ErrorMessages = makeErrorTemplates({
  25579. AccessorIsGenerator: "A %0ter cannot be a generator.",
  25580. ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
  25581. AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
  25582. AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
  25583. AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
  25584. AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
  25585. AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
  25586. AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
  25587. BadGetterArity: "A 'get' accesor must not have any formal parameters.",
  25588. BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
  25589. BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
  25590. ConstructorClassField: "Classes may not have a field named 'constructor'.",
  25591. ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
  25592. ConstructorIsAccessor: "Class constructor may not be an accessor.",
  25593. ConstructorIsAsync: "Constructor can't be an async function.",
  25594. ConstructorIsGenerator: "Constructor can't be a generator.",
  25595. DeclarationMissingInitializer: "'%0' require an initialization value.",
  25596. DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
  25597. DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
  25598. DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
  25599. DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
  25600. DecoratorStaticBlock: "Decorators can't be used with a static block.",
  25601. DeletePrivateField: "Deleting a private field is not allowed.",
  25602. DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
  25603. DuplicateConstructor: "Duplicate constructor in the same class.",
  25604. DuplicateDefaultExport: "Only one default export allowed per module.",
  25605. DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
  25606. DuplicateProto: "Redefinition of __proto__ property.",
  25607. DuplicateRegExpFlags: "Duplicate regular expression flag.",
  25608. ElementAfterRest: "Rest element must be last element.",
  25609. EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
  25610. ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
  25611. ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
  25612. ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
  25613. ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
  25614. ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
  25615. GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
  25616. IllegalBreakContinue: "Unsyntactic %0.",
  25617. IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
  25618. IllegalReturn: "'return' outside of function.",
  25619. ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
  25620. ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
  25621. ImportCallArity: "`import()` requires exactly %0.",
  25622. ImportCallNotNewExpression: "Cannot use new with import(...).",
  25623. ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
  25624. InvalidBigIntLiteral: "Invalid BigIntLiteral.",
  25625. InvalidCodePoint: "Code point out of bounds.",
  25626. InvalidDecimal: "Invalid decimal.",
  25627. InvalidDigit: "Expected number in radix %0.",
  25628. InvalidEscapeSequence: "Bad character escape sequence.",
  25629. InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
  25630. InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
  25631. InvalidIdentifier: "Invalid identifier %0.",
  25632. InvalidLhs: "Invalid left-hand side in %0.",
  25633. InvalidLhsBinding: "Binding invalid left-hand side in %0.",
  25634. InvalidNumber: "Invalid number.",
  25635. InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
  25636. InvalidOrUnexpectedToken: "Unexpected character '%0'.",
  25637. InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
  25638. InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
  25639. InvalidPropertyBindingPattern: "Binding member expression.",
  25640. InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
  25641. InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
  25642. LabelRedeclaration: "Label '%0' is already declared.",
  25643. LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
  25644. LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
  25645. MalformedRegExpFlags: "Invalid regular expression flag.",
  25646. MissingClassName: "A class name is required.",
  25647. MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
  25648. MissingSemicolon: "Missing semicolon.",
  25649. MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
  25650. MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
  25651. ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
  25652. ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
  25653. ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
  25654. ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
  25655. ModuleExportUndefined: "Export '%0' is not defined.",
  25656. MultipleDefaultsInSwitch: "Multiple default clauses.",
  25657. NewlineAfterThrow: "Illegal newline after throw.",
  25658. NoCatchOrFinally: "Missing catch or finally clause.",
  25659. NumberIdentifier: "Identifier directly after number.",
  25660. NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
  25661. ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
  25662. OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
  25663. OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
  25664. OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
  25665. ParamDupe: "Argument name clash.",
  25666. PatternHasAccessor: "Object pattern can't contain getter or setter.",
  25667. PatternHasMethod: "Object pattern can't contain methods.",
  25668. PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
  25669. PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
  25670. PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
  25671. PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
  25672. PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
  25673. PrimaryTopicRequiresSmartPipeline: "Primary Topic Reference found but pipelineOperator not passed 'smart' for 'proposal' option.",
  25674. PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
  25675. PrivateNameRedeclaration: "Duplicate private name #%0.",
  25676. RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  25677. RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  25678. RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  25679. RecordNoProto: "'__proto__' is not allowed in Record expressions.",
  25680. RestTrailingComma: "Unexpected trailing comma after rest element.",
  25681. SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
  25682. StaticPrototype: "Classes may not have static property named prototype.",
  25683. StrictDelete: "Deleting local variable in strict mode.",
  25684. StrictEvalArguments: "Assigning to '%0' in strict mode.",
  25685. StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
  25686. StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
  25687. StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
  25688. StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
  25689. StrictWith: "'with' in strict mode.",
  25690. SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
  25691. SuperPrivateField: "Private fields can't be accessed on super.",
  25692. TrailingDecorator: "Decorators must be attached to a class element.",
  25693. TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  25694. TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
  25695. TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
  25696. UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
  25697. UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
  25698. UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
  25699. UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
  25700. UnexpectedKeyword: "Unexpected keyword '%0'.",
  25701. UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
  25702. UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
  25703. UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
  25704. UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
  25705. UnexpectedPrivateField: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).",
  25706. UnexpectedReservedWord: "Unexpected reserved word '%0'.",
  25707. UnexpectedSuper: "'super' is only allowed in object methods and classes.",
  25708. UnexpectedToken: "Unexpected token '%0'.",
  25709. UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
  25710. UnsupportedBind: "Binding should be performed on object property.",
  25711. UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
  25712. UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
  25713. UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
  25714. UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
  25715. UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
  25716. UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
  25717. UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
  25718. UnterminatedComment: "Unterminated comment.",
  25719. UnterminatedRegExp: "Unterminated regular expression.",
  25720. UnterminatedString: "Unterminated string constant.",
  25721. UnterminatedTemplate: "Unterminated template.",
  25722. VarRedeclaration: "Identifier '%0' has already been declared.",
  25723. YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
  25724. YieldInParameter: "Yield expression is not allowed in formal parameters.",
  25725. ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
  25726. }, ErrorCodes.SyntaxError);
  25727. var SourceTypeModuleErrorMessages = makeErrorTemplates({
  25728. ImportMetaOutsideModule: "import.meta may appear only with 'sourceType: \"module\"'",
  25729. ImportOutsideModule: "'import' and 'export' may appear only with 'sourceType: \"module\"'"
  25730. }, ErrorCodes.SourceTypeModuleError);
  25731. function makeErrorTemplates(messages, code) {
  25732. var templates = {};
  25733. Object.keys(messages).forEach(function (reasonCode) {
  25734. templates[reasonCode] = Object.freeze({
  25735. code: code,
  25736. reasonCode: reasonCode,
  25737. template: messages[reasonCode]
  25738. });
  25739. });
  25740. return Object.freeze(templates);
  25741. }
  25742. var ParserError = function (_CommentsParser) {
  25743. _inherits(ParserError, _CommentsParser);
  25744. function ParserError() {
  25745. return _CommentsParser.apply(this, arguments) || this;
  25746. }
  25747. var _proto = ParserError.prototype;
  25748. _proto.getLocationForPosition = function getLocationForPosition(pos) {
  25749. var loc;
  25750. if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos);
  25751. return loc;
  25752. };
  25753. _proto.raise = function raise(pos, _ref) {
  25754. var code = _ref.code,
  25755. reasonCode = _ref.reasonCode,
  25756. template = _ref.template;
  25757. for (var _len = arguments.length, params = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  25758. params[_key - 2] = arguments[_key];
  25759. }
  25760. return this.raiseWithData.apply(this, [pos, {
  25761. code: code,
  25762. reasonCode: reasonCode
  25763. }, template].concat(params));
  25764. };
  25765. _proto.raiseOverwrite = function raiseOverwrite(pos, _ref2) {
  25766. var code = _ref2.code,
  25767. template = _ref2.template;
  25768. for (var _len2 = arguments.length, params = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  25769. params[_key2 - 2] = arguments[_key2];
  25770. }
  25771. var loc = this.getLocationForPosition(pos);
  25772. var message = template.replace(/%(\d+)/g, function (_, i) {
  25773. return params[i];
  25774. }) + (" (" + loc.line + ":" + loc.column + ")");
  25775. if (this.options.errorRecovery) {
  25776. var errors = this.state.errors;
  25777. for (var i = errors.length - 1; i >= 0; i--) {
  25778. var error = errors[i];
  25779. if (error.pos === pos) {
  25780. return Object.assign(error, {
  25781. message: message
  25782. });
  25783. } else if (error.pos < pos) {
  25784. break;
  25785. }
  25786. }
  25787. }
  25788. return this._raise({
  25789. code: code,
  25790. loc: loc,
  25791. pos: pos
  25792. }, message);
  25793. };
  25794. _proto.raiseWithData = function raiseWithData(pos, data, errorTemplate) {
  25795. for (var _len3 = arguments.length, params = new Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) {
  25796. params[_key3 - 3] = arguments[_key3];
  25797. }
  25798. var loc = this.getLocationForPosition(pos);
  25799. var message = errorTemplate.replace(/%(\d+)/g, function (_, i) {
  25800. return params[i];
  25801. }) + (" (" + loc.line + ":" + loc.column + ")");
  25802. return this._raise(Object.assign({
  25803. loc: loc,
  25804. pos: pos
  25805. }, data), message);
  25806. };
  25807. _proto._raise = function _raise(errorContext, message) {
  25808. var err = new SyntaxError(message);
  25809. Object.assign(err, errorContext);
  25810. if (this.options.errorRecovery) {
  25811. if (!this.isLookahead) this.state.errors.push(err);
  25812. return err;
  25813. } else {
  25814. throw err;
  25815. }
  25816. };
  25817. return ParserError;
  25818. }(CommentsParser);
  25819. var estree = (function (superClass) {
  25820. return function (_superClass) {
  25821. _inherits(_class, _superClass);
  25822. function _class() {
  25823. return _superClass.apply(this, arguments) || this;
  25824. }
  25825. var _proto = _class.prototype;
  25826. _proto.parseRegExpLiteral = function parseRegExpLiteral(_ref) {
  25827. var pattern = _ref.pattern,
  25828. flags = _ref.flags;
  25829. var regex = null;
  25830. try {
  25831. regex = new RegExp(pattern, flags);
  25832. } catch (e) {}
  25833. var node = this.estreeParseLiteral(regex);
  25834. node.regex = {
  25835. pattern: pattern,
  25836. flags: flags
  25837. };
  25838. return node;
  25839. };
  25840. _proto.parseBigIntLiteral = function parseBigIntLiteral(value) {
  25841. var bigInt;
  25842. try {
  25843. bigInt = BigInt(value);
  25844. } catch (_unused) {
  25845. bigInt = null;
  25846. }
  25847. var node = this.estreeParseLiteral(bigInt);
  25848. node.bigint = String(node.value || value);
  25849. return node;
  25850. };
  25851. _proto.parseDecimalLiteral = function parseDecimalLiteral(value) {
  25852. var decimal = null;
  25853. var node = this.estreeParseLiteral(decimal);
  25854. node.decimal = String(node.value || value);
  25855. return node;
  25856. };
  25857. _proto.estreeParseLiteral = function estreeParseLiteral(value) {
  25858. return this.parseLiteral(value, "Literal");
  25859. };
  25860. _proto.parseStringLiteral = function parseStringLiteral(value) {
  25861. return this.estreeParseLiteral(value);
  25862. };
  25863. _proto.parseNumericLiteral = function parseNumericLiteral(value) {
  25864. return this.estreeParseLiteral(value);
  25865. };
  25866. _proto.parseNullLiteral = function parseNullLiteral() {
  25867. return this.estreeParseLiteral(null);
  25868. };
  25869. _proto.parseBooleanLiteral = function parseBooleanLiteral(value) {
  25870. return this.estreeParseLiteral(value);
  25871. };
  25872. _proto.directiveToStmt = function directiveToStmt(directive) {
  25873. var directiveLiteral = directive.value;
  25874. var stmt = this.startNodeAt(directive.start, directive.loc.start);
  25875. var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
  25876. expression.value = directiveLiteral.extra.expressionValue;
  25877. expression.raw = directiveLiteral.extra.raw;
  25878. stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end);
  25879. stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
  25880. return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end);
  25881. };
  25882. _proto.initFunction = function initFunction(node, isAsync) {
  25883. _superClass.prototype.initFunction.call(this, node, isAsync);
  25884. node.expression = false;
  25885. };
  25886. _proto.checkDeclaration = function checkDeclaration(node) {
  25887. if (node != null && this.isObjectProperty(node)) {
  25888. this.checkDeclaration(node.value);
  25889. } else {
  25890. _superClass.prototype.checkDeclaration.call(this, node);
  25891. }
  25892. };
  25893. _proto.getObjectOrClassMethodParams = function getObjectOrClassMethodParams(method) {
  25894. return method.value.params;
  25895. };
  25896. _proto.isValidDirective = function isValidDirective(stmt) {
  25897. var _stmt$expression$extr;
  25898. return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
  25899. };
  25900. _proto.stmtToDirective = function stmtToDirective(stmt) {
  25901. var directive = _superClass.prototype.stmtToDirective.call(this, stmt);
  25902. var value = stmt.expression.value;
  25903. this.addExtra(directive.value, "expressionValue", value);
  25904. return directive;
  25905. };
  25906. _proto.parseBlockBody = function parseBlockBody(node) {
  25907. var _superClass$prototype,
  25908. _this = this;
  25909. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  25910. args[_key - 1] = arguments[_key];
  25911. }
  25912. (_superClass$prototype = _superClass.prototype.parseBlockBody).call.apply(_superClass$prototype, [this, node].concat(args));
  25913. var directiveStatements = node.directives.map(function (d) {
  25914. return _this.directiveToStmt(d);
  25915. });
  25916. node.body = directiveStatements.concat(node.body);
  25917. delete node.directives;
  25918. };
  25919. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  25920. this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
  25921. if (method.typeParameters) {
  25922. method.value.typeParameters = method.typeParameters;
  25923. delete method.typeParameters;
  25924. }
  25925. classBody.body.push(method);
  25926. };
  25927. _proto.parseMaybePrivateName = function parseMaybePrivateName() {
  25928. var _superClass$prototype2;
  25929. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  25930. args[_key2] = arguments[_key2];
  25931. }
  25932. var node = (_superClass$prototype2 = _superClass.prototype.parseMaybePrivateName).call.apply(_superClass$prototype2, [this].concat(args));
  25933. if (node.type === "PrivateName" && this.getPluginOption("estree", "classFeatures")) {
  25934. return this.convertPrivateNameToPrivateIdentifier(node);
  25935. }
  25936. return node;
  25937. };
  25938. _proto.convertPrivateNameToPrivateIdentifier = function convertPrivateNameToPrivateIdentifier(node) {
  25939. var name = _superClass.prototype.getPrivateNameSV.call(this, node);
  25940. node = node;
  25941. delete node.id;
  25942. node.name = name;
  25943. node.type = "PrivateIdentifier";
  25944. return node;
  25945. };
  25946. _proto.isPrivateName = function isPrivateName(node) {
  25947. if (!this.getPluginOption("estree", "classFeatures")) {
  25948. return _superClass.prototype.isPrivateName.call(this, node);
  25949. }
  25950. return node.type === "PrivateIdentifier";
  25951. };
  25952. _proto.getPrivateNameSV = function getPrivateNameSV(node) {
  25953. if (!this.getPluginOption("estree", "classFeatures")) {
  25954. return _superClass.prototype.getPrivateNameSV.call(this, node);
  25955. }
  25956. return node.name;
  25957. };
  25958. _proto.parseLiteral = function parseLiteral(value, type) {
  25959. var node = _superClass.prototype.parseLiteral.call(this, value, type);
  25960. node.raw = node.extra.raw;
  25961. delete node.extra;
  25962. return node;
  25963. };
  25964. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) {
  25965. if (isMethod === void 0) {
  25966. isMethod = false;
  25967. }
  25968. _superClass.prototype.parseFunctionBody.call(this, node, allowExpression, isMethod);
  25969. node.expression = node.body.type !== "BlockStatement";
  25970. };
  25971. _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
  25972. if (inClassScope === void 0) {
  25973. inClassScope = false;
  25974. }
  25975. var funcNode = this.startNode();
  25976. funcNode.kind = node.kind;
  25977. funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
  25978. funcNode.type = "FunctionExpression";
  25979. delete funcNode.kind;
  25980. node.value = funcNode;
  25981. if (type === "ClassPrivateMethod") {
  25982. node.computed = false;
  25983. }
  25984. type = "MethodDefinition";
  25985. return this.finishNode(node, type);
  25986. };
  25987. _proto.parseClassProperty = function parseClassProperty() {
  25988. var _superClass$prototype3;
  25989. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  25990. args[_key3] = arguments[_key3];
  25991. }
  25992. var propertyNode = (_superClass$prototype3 = _superClass.prototype.parseClassProperty).call.apply(_superClass$prototype3, [this].concat(args));
  25993. if (this.getPluginOption("estree", "classFeatures")) {
  25994. propertyNode.type = "PropertyDefinition";
  25995. }
  25996. return propertyNode;
  25997. };
  25998. _proto.parseClassPrivateProperty = function parseClassPrivateProperty() {
  25999. var _superClass$prototype4;
  26000. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  26001. args[_key4] = arguments[_key4];
  26002. }
  26003. var propertyNode = (_superClass$prototype4 = _superClass.prototype.parseClassPrivateProperty).call.apply(_superClass$prototype4, [this].concat(args));
  26004. if (this.getPluginOption("estree", "classFeatures")) {
  26005. propertyNode.type = "PropertyDefinition";
  26006. propertyNode.computed = false;
  26007. }
  26008. return propertyNode;
  26009. };
  26010. _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  26011. var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, isAccessor);
  26012. if (node) {
  26013. node.type = "Property";
  26014. if (node.kind === "method") node.kind = "init";
  26015. node.shorthand = false;
  26016. }
  26017. return node;
  26018. };
  26019. _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  26020. var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refExpressionErrors);
  26021. if (node) {
  26022. node.kind = "init";
  26023. node.type = "Property";
  26024. }
  26025. return node;
  26026. };
  26027. _proto.toAssignable = function toAssignable(node, isLHS) {
  26028. if (isLHS === void 0) {
  26029. isLHS = false;
  26030. }
  26031. if (node != null && this.isObjectProperty(node)) {
  26032. this.toAssignable(node.value, isLHS);
  26033. return node;
  26034. }
  26035. return _superClass.prototype.toAssignable.call(this, node, isLHS);
  26036. };
  26037. _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop) {
  26038. if (prop.kind === "get" || prop.kind === "set") {
  26039. this.raise(prop.key.start, ErrorMessages.PatternHasAccessor);
  26040. } else if (prop.method) {
  26041. this.raise(prop.key.start, ErrorMessages.PatternHasMethod);
  26042. } else {
  26043. var _superClass$prototype5;
  26044. for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
  26045. args[_key5 - 1] = arguments[_key5];
  26046. }
  26047. (_superClass$prototype5 = _superClass.prototype.toAssignableObjectExpressionProp).call.apply(_superClass$prototype5, [this, prop].concat(args));
  26048. }
  26049. };
  26050. _proto.finishCallExpression = function finishCallExpression(node, optional) {
  26051. _superClass.prototype.finishCallExpression.call(this, node, optional);
  26052. if (node.callee.type === "Import") {
  26053. node.type = "ImportExpression";
  26054. node.source = node.arguments[0];
  26055. if (this.hasPlugin("importAssertions")) {
  26056. var _node$arguments$;
  26057. node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
  26058. }
  26059. delete node.arguments;
  26060. delete node.callee;
  26061. }
  26062. return node;
  26063. };
  26064. _proto.toReferencedArguments = function toReferencedArguments(node) {
  26065. if (node.type === "ImportExpression") {
  26066. return;
  26067. }
  26068. _superClass.prototype.toReferencedArguments.call(this, node);
  26069. };
  26070. _proto.parseExport = function parseExport(node) {
  26071. _superClass.prototype.parseExport.call(this, node);
  26072. switch (node.type) {
  26073. case "ExportAllDeclaration":
  26074. node.exported = null;
  26075. break;
  26076. case "ExportNamedDeclaration":
  26077. if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
  26078. node.type = "ExportAllDeclaration";
  26079. node.exported = node.specifiers[0].exported;
  26080. delete node.specifiers;
  26081. }
  26082. break;
  26083. }
  26084. return node;
  26085. };
  26086. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
  26087. var node = _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state);
  26088. if (state.optionalChainMember) {
  26089. if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
  26090. node.type = node.type.substring(8);
  26091. }
  26092. if (state.stop) {
  26093. var chain = this.startNodeAtNode(node);
  26094. chain.expression = node;
  26095. return this.finishNode(chain, "ChainExpression");
  26096. }
  26097. } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
  26098. node.optional = false;
  26099. }
  26100. return node;
  26101. };
  26102. _proto.hasPropertyAsPrivateName = function hasPropertyAsPrivateName(node) {
  26103. if (node.type === "ChainExpression") {
  26104. node = node.expression;
  26105. }
  26106. return _superClass.prototype.hasPropertyAsPrivateName.call(this, node);
  26107. };
  26108. _proto.isOptionalChain = function isOptionalChain(node) {
  26109. return node.type === "ChainExpression";
  26110. };
  26111. _proto.isObjectProperty = function isObjectProperty(node) {
  26112. return node.type === "Property" && node.kind === "init" && !node.method;
  26113. };
  26114. _proto.isObjectMethod = function isObjectMethod(node) {
  26115. return node.method || node.kind === "get" || node.kind === "set";
  26116. };
  26117. return _class;
  26118. }(superClass);
  26119. });
  26120. var TokContext = function TokContext(token, preserveSpace) {
  26121. this.token = void 0;
  26122. this.preserveSpace = void 0;
  26123. this.token = token;
  26124. this.preserveSpace = !!preserveSpace;
  26125. };
  26126. var types = {
  26127. brace: new TokContext("{"),
  26128. template: new TokContext("`", true)
  26129. };
  26130. types$1.braceR.updateContext = function (context) {
  26131. context.pop();
  26132. };
  26133. types$1.braceL.updateContext = types$1.braceHashL.updateContext = types$1.dollarBraceL.updateContext = function (context) {
  26134. context.push(types.brace);
  26135. };
  26136. types$1.backQuote.updateContext = function (context) {
  26137. if (context[context.length - 1] === types.template) {
  26138. context.pop();
  26139. } else {
  26140. context.push(types.template);
  26141. }
  26142. };
  26143. function isIteratorStart(current, next) {
  26144. return current === 64 && next === 64;
  26145. }
  26146. var reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
  26147. function canBeReservedWord(word) {
  26148. return reservedWordLikeSet.has(word);
  26149. }
  26150. var SCOPE_OTHER = 0,
  26151. SCOPE_PROGRAM = 1,
  26152. SCOPE_FUNCTION = 2,
  26153. SCOPE_ARROW = 4,
  26154. SCOPE_SIMPLE_CATCH = 8,
  26155. SCOPE_SUPER = 16,
  26156. SCOPE_DIRECT_SUPER = 32,
  26157. SCOPE_CLASS = 64,
  26158. SCOPE_STATIC_BLOCK = 128,
  26159. SCOPE_TS_MODULE = 256,
  26160. SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;
  26161. var BIND_KIND_VALUE = 1,
  26162. BIND_KIND_TYPE = 2,
  26163. BIND_SCOPE_VAR = 4,
  26164. BIND_SCOPE_LEXICAL = 8,
  26165. BIND_SCOPE_FUNCTION = 16,
  26166. BIND_FLAGS_NONE = 64,
  26167. BIND_FLAGS_CLASS = 128,
  26168. BIND_FLAGS_TS_ENUM = 256,
  26169. BIND_FLAGS_TS_CONST_ENUM = 512,
  26170. BIND_FLAGS_TS_EXPORT_ONLY = 1024,
  26171. BIND_FLAGS_FLOW_DECLARE_FN = 2048;
  26172. var BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
  26173. BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
  26174. BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
  26175. BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
  26176. BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
  26177. BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
  26178. BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
  26179. BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
  26180. BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
  26181. BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
  26182. BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
  26183. BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
  26184. BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
  26185. var CLASS_ELEMENT_FLAG_STATIC = 4,
  26186. CLASS_ELEMENT_KIND_GETTER = 2,
  26187. CLASS_ELEMENT_KIND_SETTER = 1,
  26188. CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
  26189. var CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,
  26190. CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,
  26191. CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,
  26192. CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,
  26193. CLASS_ELEMENT_OTHER = 0;
  26194. var Scope = function Scope(flags) {
  26195. this["var"] = new Set();
  26196. this.lexical = new Set();
  26197. this.functions = new Set();
  26198. this.flags = flags;
  26199. };
  26200. var ScopeHandler = function () {
  26201. function ScopeHandler(raise, inModule) {
  26202. this.scopeStack = [];
  26203. this.undefinedExports = new Map();
  26204. this.undefinedPrivateNames = new Map();
  26205. this.raise = raise;
  26206. this.inModule = inModule;
  26207. }
  26208. var _proto = ScopeHandler.prototype;
  26209. _proto.createScope = function createScope(flags) {
  26210. return new Scope(flags);
  26211. };
  26212. _proto.enter = function enter(flags) {
  26213. this.scopeStack.push(this.createScope(flags));
  26214. };
  26215. _proto.exit = function exit() {
  26216. this.scopeStack.pop();
  26217. };
  26218. _proto.treatFunctionsAsVarInScope = function treatFunctionsAsVarInScope(scope) {
  26219. return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM);
  26220. };
  26221. _proto.declareName = function declareName(name, bindingType, pos) {
  26222. var scope = this.currentScope();
  26223. if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
  26224. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  26225. if (bindingType & BIND_SCOPE_FUNCTION) {
  26226. scope.functions.add(name);
  26227. } else {
  26228. scope.lexical.add(name);
  26229. }
  26230. if (bindingType & BIND_SCOPE_LEXICAL) {
  26231. this.maybeExportDefined(scope, name);
  26232. }
  26233. } else if (bindingType & BIND_SCOPE_VAR) {
  26234. for (var i = this.scopeStack.length - 1; i >= 0; --i) {
  26235. scope = this.scopeStack[i];
  26236. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  26237. scope["var"].add(name);
  26238. this.maybeExportDefined(scope, name);
  26239. if (scope.flags & SCOPE_VAR) break;
  26240. }
  26241. }
  26242. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  26243. this.undefinedExports["delete"](name);
  26244. }
  26245. };
  26246. _proto.maybeExportDefined = function maybeExportDefined(scope, name) {
  26247. if (this.inModule && scope.flags & SCOPE_PROGRAM) {
  26248. this.undefinedExports["delete"](name);
  26249. }
  26250. };
  26251. _proto.checkRedeclarationInScope = function checkRedeclarationInScope(scope, name, bindingType, pos) {
  26252. if (this.isRedeclaredInScope(scope, name, bindingType)) {
  26253. this.raise(pos, ErrorMessages.VarRedeclaration, name);
  26254. }
  26255. };
  26256. _proto.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) {
  26257. if (!(bindingType & BIND_KIND_VALUE)) return false;
  26258. if (bindingType & BIND_SCOPE_LEXICAL) {
  26259. return scope.lexical.has(name) || scope.functions.has(name) || scope["var"].has(name);
  26260. }
  26261. if (bindingType & BIND_SCOPE_FUNCTION) {
  26262. return scope.lexical.has(name) || !this.treatFunctionsAsVarInScope(scope) && scope["var"].has(name);
  26263. }
  26264. return scope.lexical.has(name) && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name);
  26265. };
  26266. _proto.checkLocalExport = function checkLocalExport(id) {
  26267. var name = id.name;
  26268. var topLevelScope = this.scopeStack[0];
  26269. if (!topLevelScope.lexical.has(name) && !topLevelScope["var"].has(name) && !topLevelScope.functions.has(name)) {
  26270. this.undefinedExports.set(name, id.start);
  26271. }
  26272. };
  26273. _proto.currentScope = function currentScope() {
  26274. return this.scopeStack[this.scopeStack.length - 1];
  26275. };
  26276. _proto.currentVarScopeFlags = function currentVarScopeFlags() {
  26277. for (var i = this.scopeStack.length - 1;; i--) {
  26278. var flags = this.scopeStack[i].flags;
  26279. if (flags & SCOPE_VAR) {
  26280. return flags;
  26281. }
  26282. }
  26283. };
  26284. _proto.currentThisScopeFlags = function currentThisScopeFlags() {
  26285. for (var i = this.scopeStack.length - 1;; i--) {
  26286. var flags = this.scopeStack[i].flags;
  26287. if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) {
  26288. return flags;
  26289. }
  26290. }
  26291. };
  26292. _createClass(ScopeHandler, [{
  26293. key: "inFunction",
  26294. get: function get() {
  26295. return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0;
  26296. }
  26297. }, {
  26298. key: "allowSuper",
  26299. get: function get() {
  26300. return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0;
  26301. }
  26302. }, {
  26303. key: "allowDirectSuper",
  26304. get: function get() {
  26305. return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0;
  26306. }
  26307. }, {
  26308. key: "inClass",
  26309. get: function get() {
  26310. return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
  26311. }
  26312. }, {
  26313. key: "inClassAndNotInNonArrowFunction",
  26314. get: function get() {
  26315. var flags = this.currentThisScopeFlags();
  26316. return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0;
  26317. }
  26318. }, {
  26319. key: "inStaticBlock",
  26320. get: function get() {
  26321. return (this.currentThisScopeFlags() & SCOPE_STATIC_BLOCK) > 0;
  26322. }
  26323. }, {
  26324. key: "inNonArrowFunction",
  26325. get: function get() {
  26326. return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0;
  26327. }
  26328. }, {
  26329. key: "treatFunctionsAsVar",
  26330. get: function get() {
  26331. return this.treatFunctionsAsVarInScope(this.currentScope());
  26332. }
  26333. }]);
  26334. return ScopeHandler;
  26335. }();
  26336. var FlowScope = function (_Scope) {
  26337. _inherits(FlowScope, _Scope);
  26338. function FlowScope() {
  26339. var _this;
  26340. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  26341. args[_key] = arguments[_key];
  26342. }
  26343. _this = _Scope.call.apply(_Scope, [this].concat(args)) || this;
  26344. _this.declareFunctions = new Set();
  26345. return _this;
  26346. }
  26347. return FlowScope;
  26348. }(Scope);
  26349. var FlowScopeHandler = function (_ScopeHandler) {
  26350. _inherits(FlowScopeHandler, _ScopeHandler);
  26351. function FlowScopeHandler() {
  26352. return _ScopeHandler.apply(this, arguments) || this;
  26353. }
  26354. var _proto = FlowScopeHandler.prototype;
  26355. _proto.createScope = function createScope(flags) {
  26356. return new FlowScope(flags);
  26357. };
  26358. _proto.declareName = function declareName(name, bindingType, pos) {
  26359. var scope = this.currentScope();
  26360. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  26361. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  26362. this.maybeExportDefined(scope, name);
  26363. scope.declareFunctions.add(name);
  26364. return;
  26365. }
  26366. _ScopeHandler.prototype.declareName.apply(this, arguments);
  26367. };
  26368. _proto.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) {
  26369. if (_ScopeHandler.prototype.isRedeclaredInScope.apply(this, arguments)) return true;
  26370. if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
  26371. return !scope.declareFunctions.has(name) && (scope.lexical.has(name) || scope.functions.has(name));
  26372. }
  26373. return false;
  26374. };
  26375. _proto.checkLocalExport = function checkLocalExport(id) {
  26376. if (!this.scopeStack[0].declareFunctions.has(id.name)) {
  26377. _ScopeHandler.prototype.checkLocalExport.call(this, id);
  26378. }
  26379. };
  26380. return FlowScopeHandler;
  26381. }(ScopeHandler);
  26382. var reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
  26383. var FlowErrors = makeErrorTemplates({
  26384. AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
  26385. AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
  26386. AssignReservedType: "Cannot overwrite reserved type %0.",
  26387. DeclareClassElement: "The `declare` modifier can only appear on class fields.",
  26388. DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
  26389. DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
  26390. EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
  26391. EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
  26392. EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
  26393. EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  26394. EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
  26395. EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
  26396. EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
  26397. EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
  26398. EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
  26399. EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
  26400. EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
  26401. GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
  26402. ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
  26403. InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
  26404. InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
  26405. InexactVariance: "Explicit inexact syntax cannot have variance.",
  26406. InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
  26407. MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
  26408. NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
  26409. NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
  26410. OptionalBindingPattern: "A binding pattern parameter cannot be optional in an implementation signature.",
  26411. SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
  26412. SpreadVariance: "Spread properties cannot have variance.",
  26413. ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
  26414. ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
  26415. ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
  26416. ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
  26417. ThisParamNoDefault: "The `this` parameter may not have a default value.",
  26418. TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  26419. TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
  26420. UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
  26421. UnexpectedReservedType: "Unexpected reserved type %0.",
  26422. UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
  26423. UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
  26424. UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
  26425. UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
  26426. UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
  26427. UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
  26428. UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
  26429. UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
  26430. UnterminatedFlowComment: "Unterminated flow-comment."
  26431. }, ErrorCodes.SyntaxError);
  26432. function isEsModuleType(bodyElement) {
  26433. return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
  26434. }
  26435. function hasTypeImportKind(node) {
  26436. return node.importKind === "type" || node.importKind === "typeof";
  26437. }
  26438. function isMaybeDefaultImport(state) {
  26439. return (state.type === types$1.name || !!state.type.keyword) && state.value !== "from";
  26440. }
  26441. var exportSuggestions = {
  26442. "const": "declare export var",
  26443. "let": "declare export var",
  26444. type: "export type",
  26445. "interface": "export interface"
  26446. };
  26447. function partition(list, test) {
  26448. var list1 = [];
  26449. var list2 = [];
  26450. for (var i = 0; i < list.length; i++) {
  26451. (test(list[i], i, list) ? list1 : list2).push(list[i]);
  26452. }
  26453. return [list1, list2];
  26454. }
  26455. var FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
  26456. var flow = (function (superClass) {
  26457. return function (_superClass) {
  26458. _inherits(_class2, _superClass);
  26459. function _class2() {
  26460. var _this2;
  26461. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  26462. args[_key] = arguments[_key];
  26463. }
  26464. _this2 = _superClass.call.apply(_superClass, [this].concat(args)) || this;
  26465. _this2.flowPragma = undefined;
  26466. return _this2;
  26467. }
  26468. var _proto = _class2.prototype;
  26469. _proto.getScopeHandler = function getScopeHandler() {
  26470. return FlowScopeHandler;
  26471. };
  26472. _proto.shouldParseTypes = function shouldParseTypes() {
  26473. return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
  26474. };
  26475. _proto.shouldParseEnums = function shouldParseEnums() {
  26476. return !!this.getPluginOption("flow", "enums");
  26477. };
  26478. _proto.finishToken = function finishToken(type, val) {
  26479. if (type !== types$1.string && type !== types$1.semi && type !== types$1.interpreterDirective) {
  26480. if (this.flowPragma === undefined) {
  26481. this.flowPragma = null;
  26482. }
  26483. }
  26484. return _superClass.prototype.finishToken.call(this, type, val);
  26485. };
  26486. _proto.addComment = function addComment(comment) {
  26487. if (this.flowPragma === undefined) {
  26488. var matches = FLOW_PRAGMA_REGEX.exec(comment.value);
  26489. if (!matches) ; else if (matches[1] === "flow") {
  26490. this.flowPragma = "flow";
  26491. } else if (matches[1] === "noflow") {
  26492. this.flowPragma = "noflow";
  26493. } else {
  26494. throw new Error("Unexpected flow pragma");
  26495. }
  26496. }
  26497. return _superClass.prototype.addComment.call(this, comment);
  26498. };
  26499. _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) {
  26500. var oldInType = this.state.inType;
  26501. this.state.inType = true;
  26502. this.expect(tok || types$1.colon);
  26503. var type = this.flowParseType();
  26504. this.state.inType = oldInType;
  26505. return type;
  26506. };
  26507. _proto.flowParsePredicate = function flowParsePredicate() {
  26508. var node = this.startNode();
  26509. var moduloPos = this.state.start;
  26510. this.next();
  26511. this.expectContextual("checks");
  26512. if (this.state.lastTokStart > moduloPos + 1) {
  26513. this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks);
  26514. }
  26515. if (this.eat(types$1.parenL)) {
  26516. node.value = this.parseExpression();
  26517. this.expect(types$1.parenR);
  26518. return this.finishNode(node, "DeclaredPredicate");
  26519. } else {
  26520. return this.finishNode(node, "InferredPredicate");
  26521. }
  26522. };
  26523. _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() {
  26524. var oldInType = this.state.inType;
  26525. this.state.inType = true;
  26526. this.expect(types$1.colon);
  26527. var type = null;
  26528. var predicate = null;
  26529. if (this.match(types$1.modulo)) {
  26530. this.state.inType = oldInType;
  26531. predicate = this.flowParsePredicate();
  26532. } else {
  26533. type = this.flowParseType();
  26534. this.state.inType = oldInType;
  26535. if (this.match(types$1.modulo)) {
  26536. predicate = this.flowParsePredicate();
  26537. }
  26538. }
  26539. return [type, predicate];
  26540. };
  26541. _proto.flowParseDeclareClass = function flowParseDeclareClass(node) {
  26542. this.next();
  26543. this.flowParseInterfaceish(node, true);
  26544. return this.finishNode(node, "DeclareClass");
  26545. };
  26546. _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) {
  26547. this.next();
  26548. var id = node.id = this.parseIdentifier();
  26549. var typeNode = this.startNode();
  26550. var typeContainer = this.startNode();
  26551. if (this.isRelational("<")) {
  26552. typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
  26553. } else {
  26554. typeNode.typeParameters = null;
  26555. }
  26556. this.expect(types$1.parenL);
  26557. var tmp = this.flowParseFunctionTypeParams();
  26558. typeNode.params = tmp.params;
  26559. typeNode.rest = tmp.rest;
  26560. typeNode["this"] = tmp._this;
  26561. this.expect(types$1.parenR);
  26562. var _this$flowParseTypeAn = this.flowParseTypeAndPredicateInitialiser();
  26563. typeNode.returnType = _this$flowParseTypeAn[0];
  26564. node.predicate = _this$flowParseTypeAn[1];
  26565. typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
  26566. id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
  26567. this.resetEndLocation(id);
  26568. this.semicolon();
  26569. this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start);
  26570. return this.finishNode(node, "DeclareFunction");
  26571. };
  26572. _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) {
  26573. if (this.match(types$1._class)) {
  26574. return this.flowParseDeclareClass(node);
  26575. } else if (this.match(types$1._function)) {
  26576. return this.flowParseDeclareFunction(node);
  26577. } else if (this.match(types$1._var)) {
  26578. return this.flowParseDeclareVariable(node);
  26579. } else if (this.eatContextual("module")) {
  26580. if (this.match(types$1.dot)) {
  26581. return this.flowParseDeclareModuleExports(node);
  26582. } else {
  26583. if (insideModule) {
  26584. this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule);
  26585. }
  26586. return this.flowParseDeclareModule(node);
  26587. }
  26588. } else if (this.isContextual("type")) {
  26589. return this.flowParseDeclareTypeAlias(node);
  26590. } else if (this.isContextual("opaque")) {
  26591. return this.flowParseDeclareOpaqueType(node);
  26592. } else if (this.isContextual("interface")) {
  26593. return this.flowParseDeclareInterface(node);
  26594. } else if (this.match(types$1._export)) {
  26595. return this.flowParseDeclareExportDeclaration(node, insideModule);
  26596. } else {
  26597. throw this.unexpected();
  26598. }
  26599. };
  26600. _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) {
  26601. this.next();
  26602. node.id = this.flowParseTypeAnnotatableIdentifier(true);
  26603. this.scope.declareName(node.id.name, BIND_VAR, node.id.start);
  26604. this.semicolon();
  26605. return this.finishNode(node, "DeclareVariable");
  26606. };
  26607. _proto.flowParseDeclareModule = function flowParseDeclareModule(node) {
  26608. var _this3 = this;
  26609. this.scope.enter(SCOPE_OTHER);
  26610. if (this.match(types$1.string)) {
  26611. node.id = this.parseExprAtom();
  26612. } else {
  26613. node.id = this.parseIdentifier();
  26614. }
  26615. var bodyNode = node.body = this.startNode();
  26616. var body = bodyNode.body = [];
  26617. this.expect(types$1.braceL);
  26618. while (!this.match(types$1.braceR)) {
  26619. var _bodyNode = this.startNode();
  26620. if (this.match(types$1._import)) {
  26621. this.next();
  26622. if (!this.isContextual("type") && !this.match(types$1._typeof)) {
  26623. this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule);
  26624. }
  26625. this.parseImport(_bodyNode);
  26626. } else {
  26627. this.expectContextual("declare", FlowErrors.UnsupportedStatementInDeclareModule);
  26628. _bodyNode = this.flowParseDeclare(_bodyNode, true);
  26629. }
  26630. body.push(_bodyNode);
  26631. }
  26632. this.scope.exit();
  26633. this.expect(types$1.braceR);
  26634. this.finishNode(bodyNode, "BlockStatement");
  26635. var kind = null;
  26636. var hasModuleExport = false;
  26637. body.forEach(function (bodyElement) {
  26638. if (isEsModuleType(bodyElement)) {
  26639. if (kind === "CommonJS") {
  26640. _this3.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  26641. }
  26642. kind = "ES";
  26643. } else if (bodyElement.type === "DeclareModuleExports") {
  26644. if (hasModuleExport) {
  26645. _this3.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports);
  26646. }
  26647. if (kind === "ES") {
  26648. _this3.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind);
  26649. }
  26650. kind = "CommonJS";
  26651. hasModuleExport = true;
  26652. }
  26653. });
  26654. node.kind = kind || "CommonJS";
  26655. return this.finishNode(node, "DeclareModule");
  26656. };
  26657. _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) {
  26658. this.expect(types$1._export);
  26659. if (this.eat(types$1._default)) {
  26660. if (this.match(types$1._function) || this.match(types$1._class)) {
  26661. node.declaration = this.flowParseDeclare(this.startNode());
  26662. } else {
  26663. node.declaration = this.flowParseType();
  26664. this.semicolon();
  26665. }
  26666. node["default"] = true;
  26667. return this.finishNode(node, "DeclareExportDeclaration");
  26668. } else {
  26669. if (this.match(types$1._const) || this.isLet() || (this.isContextual("type") || this.isContextual("interface")) && !insideModule) {
  26670. var label = this.state.value;
  26671. var suggestion = exportSuggestions[label];
  26672. throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion);
  26673. }
  26674. if (this.match(types$1._var) || this.match(types$1._function) || this.match(types$1._class) || this.isContextual("opaque")) {
  26675. node.declaration = this.flowParseDeclare(this.startNode());
  26676. node["default"] = false;
  26677. return this.finishNode(node, "DeclareExportDeclaration");
  26678. } else if (this.match(types$1.star) || this.match(types$1.braceL) || this.isContextual("interface") || this.isContextual("type") || this.isContextual("opaque")) {
  26679. node = this.parseExport(node);
  26680. if (node.type === "ExportNamedDeclaration") {
  26681. node.type = "ExportDeclaration";
  26682. node["default"] = false;
  26683. delete node.exportKind;
  26684. }
  26685. node.type = "Declare" + node.type;
  26686. return node;
  26687. }
  26688. }
  26689. throw this.unexpected();
  26690. };
  26691. _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) {
  26692. this.next();
  26693. this.expectContextual("exports");
  26694. node.typeAnnotation = this.flowParseTypeAnnotation();
  26695. this.semicolon();
  26696. return this.finishNode(node, "DeclareModuleExports");
  26697. };
  26698. _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) {
  26699. this.next();
  26700. this.flowParseTypeAlias(node);
  26701. node.type = "DeclareTypeAlias";
  26702. return node;
  26703. };
  26704. _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) {
  26705. this.next();
  26706. this.flowParseOpaqueType(node, true);
  26707. node.type = "DeclareOpaqueType";
  26708. return node;
  26709. };
  26710. _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) {
  26711. this.next();
  26712. this.flowParseInterfaceish(node);
  26713. return this.finishNode(node, "DeclareInterface");
  26714. };
  26715. _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) {
  26716. if (isClass === void 0) {
  26717. isClass = false;
  26718. }
  26719. node.id = this.flowParseRestrictedIdentifier(!isClass, true);
  26720. this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.start);
  26721. if (this.isRelational("<")) {
  26722. node.typeParameters = this.flowParseTypeParameterDeclaration();
  26723. } else {
  26724. node.typeParameters = null;
  26725. }
  26726. node["extends"] = [];
  26727. node["implements"] = [];
  26728. node.mixins = [];
  26729. if (this.eat(types$1._extends)) {
  26730. do {
  26731. node["extends"].push(this.flowParseInterfaceExtends());
  26732. } while (!isClass && this.eat(types$1.comma));
  26733. }
  26734. if (this.isContextual("mixins")) {
  26735. this.next();
  26736. do {
  26737. node.mixins.push(this.flowParseInterfaceExtends());
  26738. } while (this.eat(types$1.comma));
  26739. }
  26740. if (this.isContextual("implements")) {
  26741. this.next();
  26742. do {
  26743. node["implements"].push(this.flowParseInterfaceExtends());
  26744. } while (this.eat(types$1.comma));
  26745. }
  26746. node.body = this.flowParseObjectType({
  26747. allowStatic: isClass,
  26748. allowExact: false,
  26749. allowSpread: false,
  26750. allowProto: isClass,
  26751. allowInexact: false
  26752. });
  26753. };
  26754. _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() {
  26755. var node = this.startNode();
  26756. node.id = this.flowParseQualifiedTypeIdentifier();
  26757. if (this.isRelational("<")) {
  26758. node.typeParameters = this.flowParseTypeParameterInstantiation();
  26759. } else {
  26760. node.typeParameters = null;
  26761. }
  26762. return this.finishNode(node, "InterfaceExtends");
  26763. };
  26764. _proto.flowParseInterface = function flowParseInterface(node) {
  26765. this.flowParseInterfaceish(node);
  26766. return this.finishNode(node, "InterfaceDeclaration");
  26767. };
  26768. _proto.checkNotUnderscore = function checkNotUnderscore(word) {
  26769. if (word === "_") {
  26770. this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore);
  26771. }
  26772. };
  26773. _proto.checkReservedType = function checkReservedType(word, startLoc, declaration) {
  26774. if (!reservedTypes.has(word)) return;
  26775. this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word);
  26776. };
  26777. _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal, declaration) {
  26778. this.checkReservedType(this.state.value, this.state.start, declaration);
  26779. return this.parseIdentifier(liberal);
  26780. };
  26781. _proto.flowParseTypeAlias = function flowParseTypeAlias(node) {
  26782. node.id = this.flowParseRestrictedIdentifier(false, true);
  26783. this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
  26784. if (this.isRelational("<")) {
  26785. node.typeParameters = this.flowParseTypeParameterDeclaration();
  26786. } else {
  26787. node.typeParameters = null;
  26788. }
  26789. node.right = this.flowParseTypeInitialiser(types$1.eq);
  26790. this.semicolon();
  26791. return this.finishNode(node, "TypeAlias");
  26792. };
  26793. _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) {
  26794. this.expectContextual("type");
  26795. node.id = this.flowParseRestrictedIdentifier(true, true);
  26796. this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start);
  26797. if (this.isRelational("<")) {
  26798. node.typeParameters = this.flowParseTypeParameterDeclaration();
  26799. } else {
  26800. node.typeParameters = null;
  26801. }
  26802. node.supertype = null;
  26803. if (this.match(types$1.colon)) {
  26804. node.supertype = this.flowParseTypeInitialiser(types$1.colon);
  26805. }
  26806. node.impltype = null;
  26807. if (!declare) {
  26808. node.impltype = this.flowParseTypeInitialiser(types$1.eq);
  26809. }
  26810. this.semicolon();
  26811. return this.finishNode(node, "OpaqueType");
  26812. };
  26813. _proto.flowParseTypeParameter = function flowParseTypeParameter(requireDefault) {
  26814. if (requireDefault === void 0) {
  26815. requireDefault = false;
  26816. }
  26817. var nodeStart = this.state.start;
  26818. var node = this.startNode();
  26819. var variance = this.flowParseVariance();
  26820. var ident = this.flowParseTypeAnnotatableIdentifier();
  26821. node.name = ident.name;
  26822. node.variance = variance;
  26823. node.bound = ident.typeAnnotation;
  26824. if (this.match(types$1.eq)) {
  26825. this.eat(types$1.eq);
  26826. node["default"] = this.flowParseType();
  26827. } else {
  26828. if (requireDefault) {
  26829. this.raise(nodeStart, FlowErrors.MissingTypeParamDefault);
  26830. }
  26831. }
  26832. return this.finishNode(node, "TypeParameter");
  26833. };
  26834. _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration() {
  26835. var oldInType = this.state.inType;
  26836. var node = this.startNode();
  26837. node.params = [];
  26838. this.state.inType = true;
  26839. if (this.isRelational("<") || this.match(types$1.jsxTagStart)) {
  26840. this.next();
  26841. } else {
  26842. this.unexpected();
  26843. }
  26844. var defaultRequired = false;
  26845. do {
  26846. var typeParameter = this.flowParseTypeParameter(defaultRequired);
  26847. node.params.push(typeParameter);
  26848. if (typeParameter["default"]) {
  26849. defaultRequired = true;
  26850. }
  26851. if (!this.isRelational(">")) {
  26852. this.expect(types$1.comma);
  26853. }
  26854. } while (!this.isRelational(">"));
  26855. this.expectRelational(">");
  26856. this.state.inType = oldInType;
  26857. return this.finishNode(node, "TypeParameterDeclaration");
  26858. };
  26859. _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() {
  26860. var node = this.startNode();
  26861. var oldInType = this.state.inType;
  26862. node.params = [];
  26863. this.state.inType = true;
  26864. this.expectRelational("<");
  26865. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  26866. this.state.noAnonFunctionType = false;
  26867. while (!this.isRelational(">")) {
  26868. node.params.push(this.flowParseType());
  26869. if (!this.isRelational(">")) {
  26870. this.expect(types$1.comma);
  26871. }
  26872. }
  26873. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  26874. this.expectRelational(">");
  26875. this.state.inType = oldInType;
  26876. return this.finishNode(node, "TypeParameterInstantiation");
  26877. };
  26878. _proto.flowParseTypeParameterInstantiationCallOrNew = function flowParseTypeParameterInstantiationCallOrNew() {
  26879. var node = this.startNode();
  26880. var oldInType = this.state.inType;
  26881. node.params = [];
  26882. this.state.inType = true;
  26883. this.expectRelational("<");
  26884. while (!this.isRelational(">")) {
  26885. node.params.push(this.flowParseTypeOrImplicitInstantiation());
  26886. if (!this.isRelational(">")) {
  26887. this.expect(types$1.comma);
  26888. }
  26889. }
  26890. this.expectRelational(">");
  26891. this.state.inType = oldInType;
  26892. return this.finishNode(node, "TypeParameterInstantiation");
  26893. };
  26894. _proto.flowParseInterfaceType = function flowParseInterfaceType() {
  26895. var node = this.startNode();
  26896. this.expectContextual("interface");
  26897. node["extends"] = [];
  26898. if (this.eat(types$1._extends)) {
  26899. do {
  26900. node["extends"].push(this.flowParseInterfaceExtends());
  26901. } while (this.eat(types$1.comma));
  26902. }
  26903. node.body = this.flowParseObjectType({
  26904. allowStatic: false,
  26905. allowExact: false,
  26906. allowSpread: false,
  26907. allowProto: false,
  26908. allowInexact: false
  26909. });
  26910. return this.finishNode(node, "InterfaceTypeAnnotation");
  26911. };
  26912. _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() {
  26913. return this.match(types$1.num) || this.match(types$1.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  26914. };
  26915. _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) {
  26916. node["static"] = isStatic;
  26917. if (this.lookahead().type === types$1.colon) {
  26918. node.id = this.flowParseObjectPropertyKey();
  26919. node.key = this.flowParseTypeInitialiser();
  26920. } else {
  26921. node.id = null;
  26922. node.key = this.flowParseType();
  26923. }
  26924. this.expect(types$1.bracketR);
  26925. node.value = this.flowParseTypeInitialiser();
  26926. node.variance = variance;
  26927. return this.finishNode(node, "ObjectTypeIndexer");
  26928. };
  26929. _proto.flowParseObjectTypeInternalSlot = function flowParseObjectTypeInternalSlot(node, isStatic) {
  26930. node["static"] = isStatic;
  26931. node.id = this.flowParseObjectPropertyKey();
  26932. this.expect(types$1.bracketR);
  26933. this.expect(types$1.bracketR);
  26934. if (this.isRelational("<") || this.match(types$1.parenL)) {
  26935. node.method = true;
  26936. node.optional = false;
  26937. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  26938. } else {
  26939. node.method = false;
  26940. if (this.eat(types$1.question)) {
  26941. node.optional = true;
  26942. }
  26943. node.value = this.flowParseTypeInitialiser();
  26944. }
  26945. return this.finishNode(node, "ObjectTypeInternalSlot");
  26946. };
  26947. _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) {
  26948. node.params = [];
  26949. node.rest = null;
  26950. node.typeParameters = null;
  26951. node["this"] = null;
  26952. if (this.isRelational("<")) {
  26953. node.typeParameters = this.flowParseTypeParameterDeclaration();
  26954. }
  26955. this.expect(types$1.parenL);
  26956. if (this.match(types$1._this)) {
  26957. node["this"] = this.flowParseFunctionTypeParam(true);
  26958. node["this"].name = null;
  26959. if (!this.match(types$1.parenR)) {
  26960. this.expect(types$1.comma);
  26961. }
  26962. }
  26963. while (!this.match(types$1.parenR) && !this.match(types$1.ellipsis)) {
  26964. node.params.push(this.flowParseFunctionTypeParam(false));
  26965. if (!this.match(types$1.parenR)) {
  26966. this.expect(types$1.comma);
  26967. }
  26968. }
  26969. if (this.eat(types$1.ellipsis)) {
  26970. node.rest = this.flowParseFunctionTypeParam(false);
  26971. }
  26972. this.expect(types$1.parenR);
  26973. node.returnType = this.flowParseTypeInitialiser();
  26974. return this.finishNode(node, "FunctionTypeAnnotation");
  26975. };
  26976. _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) {
  26977. var valueNode = this.startNode();
  26978. node["static"] = isStatic;
  26979. node.value = this.flowParseObjectTypeMethodish(valueNode);
  26980. return this.finishNode(node, "ObjectTypeCallProperty");
  26981. };
  26982. _proto.flowParseObjectType = function flowParseObjectType(_ref) {
  26983. var allowStatic = _ref.allowStatic,
  26984. allowExact = _ref.allowExact,
  26985. allowSpread = _ref.allowSpread,
  26986. allowProto = _ref.allowProto,
  26987. allowInexact = _ref.allowInexact;
  26988. var oldInType = this.state.inType;
  26989. this.state.inType = true;
  26990. var nodeStart = this.startNode();
  26991. nodeStart.callProperties = [];
  26992. nodeStart.properties = [];
  26993. nodeStart.indexers = [];
  26994. nodeStart.internalSlots = [];
  26995. var endDelim;
  26996. var exact;
  26997. var inexact = false;
  26998. if (allowExact && this.match(types$1.braceBarL)) {
  26999. this.expect(types$1.braceBarL);
  27000. endDelim = types$1.braceBarR;
  27001. exact = true;
  27002. } else {
  27003. this.expect(types$1.braceL);
  27004. endDelim = types$1.braceR;
  27005. exact = false;
  27006. }
  27007. nodeStart.exact = exact;
  27008. while (!this.match(endDelim)) {
  27009. var isStatic = false;
  27010. var protoStart = null;
  27011. var inexactStart = null;
  27012. var node = this.startNode();
  27013. if (allowProto && this.isContextual("proto")) {
  27014. var lookahead = this.lookahead();
  27015. if (lookahead.type !== types$1.colon && lookahead.type !== types$1.question) {
  27016. this.next();
  27017. protoStart = this.state.start;
  27018. allowStatic = false;
  27019. }
  27020. }
  27021. if (allowStatic && this.isContextual("static")) {
  27022. var _lookahead = this.lookahead();
  27023. if (_lookahead.type !== types$1.colon && _lookahead.type !== types$1.question) {
  27024. this.next();
  27025. isStatic = true;
  27026. }
  27027. }
  27028. var variance = this.flowParseVariance();
  27029. if (this.eat(types$1.bracketL)) {
  27030. if (protoStart != null) {
  27031. this.unexpected(protoStart);
  27032. }
  27033. if (this.eat(types$1.bracketL)) {
  27034. if (variance) {
  27035. this.unexpected(variance.start);
  27036. }
  27037. nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
  27038. } else {
  27039. nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
  27040. }
  27041. } else if (this.match(types$1.parenL) || this.isRelational("<")) {
  27042. if (protoStart != null) {
  27043. this.unexpected(protoStart);
  27044. }
  27045. if (variance) {
  27046. this.unexpected(variance.start);
  27047. }
  27048. nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
  27049. } else {
  27050. var kind = "init";
  27051. if (this.isContextual("get") || this.isContextual("set")) {
  27052. var _lookahead2 = this.lookahead();
  27053. if (_lookahead2.type === types$1.name || _lookahead2.type === types$1.string || _lookahead2.type === types$1.num) {
  27054. kind = this.state.value;
  27055. this.next();
  27056. }
  27057. }
  27058. var propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
  27059. if (propOrInexact === null) {
  27060. inexact = true;
  27061. inexactStart = this.state.lastTokStart;
  27062. } else {
  27063. nodeStart.properties.push(propOrInexact);
  27064. }
  27065. }
  27066. this.flowObjectTypeSemicolon();
  27067. if (inexactStart && !this.match(types$1.braceR) && !this.match(types$1.braceBarR)) {
  27068. this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject);
  27069. }
  27070. }
  27071. this.expect(endDelim);
  27072. if (allowSpread) {
  27073. nodeStart.inexact = inexact;
  27074. }
  27075. var out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
  27076. this.state.inType = oldInType;
  27077. return out;
  27078. };
  27079. _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) {
  27080. if (this.eat(types$1.ellipsis)) {
  27081. var isInexactToken = this.match(types$1.comma) || this.match(types$1.semi) || this.match(types$1.braceR) || this.match(types$1.braceBarR);
  27082. if (isInexactToken) {
  27083. if (!allowSpread) {
  27084. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject);
  27085. } else if (!allowInexact) {
  27086. this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact);
  27087. }
  27088. if (variance) {
  27089. this.raise(variance.start, FlowErrors.InexactVariance);
  27090. }
  27091. return null;
  27092. }
  27093. if (!allowSpread) {
  27094. this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType);
  27095. }
  27096. if (protoStart != null) {
  27097. this.unexpected(protoStart);
  27098. }
  27099. if (variance) {
  27100. this.raise(variance.start, FlowErrors.SpreadVariance);
  27101. }
  27102. node.argument = this.flowParseType();
  27103. return this.finishNode(node, "ObjectTypeSpreadProperty");
  27104. } else {
  27105. node.key = this.flowParseObjectPropertyKey();
  27106. node["static"] = isStatic;
  27107. node.proto = protoStart != null;
  27108. node.kind = kind;
  27109. var optional = false;
  27110. if (this.isRelational("<") || this.match(types$1.parenL)) {
  27111. node.method = true;
  27112. if (protoStart != null) {
  27113. this.unexpected(protoStart);
  27114. }
  27115. if (variance) {
  27116. this.unexpected(variance.start);
  27117. }
  27118. node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
  27119. if (kind === "get" || kind === "set") {
  27120. this.flowCheckGetterSetterParams(node);
  27121. }
  27122. if (!allowSpread && node.key.name === "constructor" && node.value["this"]) {
  27123. this.raise(node.value["this"].start, FlowErrors.ThisParamBannedInConstructor);
  27124. }
  27125. } else {
  27126. if (kind !== "init") this.unexpected();
  27127. node.method = false;
  27128. if (this.eat(types$1.question)) {
  27129. optional = true;
  27130. }
  27131. node.value = this.flowParseTypeInitialiser();
  27132. node.variance = variance;
  27133. }
  27134. node.optional = optional;
  27135. return this.finishNode(node, "ObjectTypeProperty");
  27136. }
  27137. };
  27138. _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) {
  27139. var paramCount = property.kind === "get" ? 0 : 1;
  27140. var start = property.start;
  27141. var length = property.value.params.length + (property.value.rest ? 1 : 0);
  27142. if (property.value["this"]) {
  27143. this.raise(property.value["this"].start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam);
  27144. }
  27145. if (length !== paramCount) {
  27146. if (property.kind === "get") {
  27147. this.raise(start, ErrorMessages.BadGetterArity);
  27148. } else {
  27149. this.raise(start, ErrorMessages.BadSetterArity);
  27150. }
  27151. }
  27152. if (property.kind === "set" && property.value.rest) {
  27153. this.raise(start, ErrorMessages.BadSetterRestParameter);
  27154. }
  27155. };
  27156. _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() {
  27157. if (!this.eat(types$1.semi) && !this.eat(types$1.comma) && !this.match(types$1.braceR) && !this.match(types$1.braceBarR)) {
  27158. this.unexpected();
  27159. }
  27160. };
  27161. _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
  27162. startPos = startPos || this.state.start;
  27163. startLoc = startLoc || this.state.startLoc;
  27164. var node = id || this.flowParseRestrictedIdentifier(true);
  27165. while (this.eat(types$1.dot)) {
  27166. var node2 = this.startNodeAt(startPos, startLoc);
  27167. node2.qualification = node;
  27168. node2.id = this.flowParseRestrictedIdentifier(true);
  27169. node = this.finishNode(node2, "QualifiedTypeIdentifier");
  27170. }
  27171. return node;
  27172. };
  27173. _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) {
  27174. var node = this.startNodeAt(startPos, startLoc);
  27175. node.typeParameters = null;
  27176. node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
  27177. if (this.isRelational("<")) {
  27178. node.typeParameters = this.flowParseTypeParameterInstantiation();
  27179. }
  27180. return this.finishNode(node, "GenericTypeAnnotation");
  27181. };
  27182. _proto.flowParseTypeofType = function flowParseTypeofType() {
  27183. var node = this.startNode();
  27184. this.expect(types$1._typeof);
  27185. node.argument = this.flowParsePrimaryType();
  27186. return this.finishNode(node, "TypeofTypeAnnotation");
  27187. };
  27188. _proto.flowParseTupleType = function flowParseTupleType() {
  27189. var node = this.startNode();
  27190. node.types = [];
  27191. this.expect(types$1.bracketL);
  27192. while (this.state.pos < this.length && !this.match(types$1.bracketR)) {
  27193. node.types.push(this.flowParseType());
  27194. if (this.match(types$1.bracketR)) break;
  27195. this.expect(types$1.comma);
  27196. }
  27197. this.expect(types$1.bracketR);
  27198. return this.finishNode(node, "TupleTypeAnnotation");
  27199. };
  27200. _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam(first) {
  27201. var name = null;
  27202. var optional = false;
  27203. var typeAnnotation = null;
  27204. var node = this.startNode();
  27205. var lh = this.lookahead();
  27206. var isThis = this.state.type === types$1._this;
  27207. if (lh.type === types$1.colon || lh.type === types$1.question) {
  27208. if (isThis && !first) {
  27209. this.raise(node.start, FlowErrors.ThisParamMustBeFirst);
  27210. }
  27211. name = this.parseIdentifier(isThis);
  27212. if (this.eat(types$1.question)) {
  27213. optional = true;
  27214. if (isThis) {
  27215. this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional);
  27216. }
  27217. }
  27218. typeAnnotation = this.flowParseTypeInitialiser();
  27219. } else {
  27220. typeAnnotation = this.flowParseType();
  27221. }
  27222. node.name = name;
  27223. node.optional = optional;
  27224. node.typeAnnotation = typeAnnotation;
  27225. return this.finishNode(node, "FunctionTypeParam");
  27226. };
  27227. _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) {
  27228. var node = this.startNodeAt(type.start, type.loc.start);
  27229. node.name = null;
  27230. node.optional = false;
  27231. node.typeAnnotation = type;
  27232. return this.finishNode(node, "FunctionTypeParam");
  27233. };
  27234. _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) {
  27235. if (params === void 0) {
  27236. params = [];
  27237. }
  27238. var rest = null;
  27239. var _this = null;
  27240. if (this.match(types$1._this)) {
  27241. _this = this.flowParseFunctionTypeParam(true);
  27242. _this.name = null;
  27243. if (!this.match(types$1.parenR)) {
  27244. this.expect(types$1.comma);
  27245. }
  27246. }
  27247. while (!this.match(types$1.parenR) && !this.match(types$1.ellipsis)) {
  27248. params.push(this.flowParseFunctionTypeParam(false));
  27249. if (!this.match(types$1.parenR)) {
  27250. this.expect(types$1.comma);
  27251. }
  27252. }
  27253. if (this.eat(types$1.ellipsis)) {
  27254. rest = this.flowParseFunctionTypeParam(false);
  27255. }
  27256. return {
  27257. params: params,
  27258. rest: rest,
  27259. _this: _this
  27260. };
  27261. };
  27262. _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
  27263. switch (id.name) {
  27264. case "any":
  27265. return this.finishNode(node, "AnyTypeAnnotation");
  27266. case "bool":
  27267. case "boolean":
  27268. return this.finishNode(node, "BooleanTypeAnnotation");
  27269. case "mixed":
  27270. return this.finishNode(node, "MixedTypeAnnotation");
  27271. case "empty":
  27272. return this.finishNode(node, "EmptyTypeAnnotation");
  27273. case "number":
  27274. return this.finishNode(node, "NumberTypeAnnotation");
  27275. case "string":
  27276. return this.finishNode(node, "StringTypeAnnotation");
  27277. case "symbol":
  27278. return this.finishNode(node, "SymbolTypeAnnotation");
  27279. default:
  27280. this.checkNotUnderscore(id.name);
  27281. return this.flowParseGenericType(startPos, startLoc, id);
  27282. }
  27283. };
  27284. _proto.flowParsePrimaryType = function flowParsePrimaryType() {
  27285. var startPos = this.state.start;
  27286. var startLoc = this.state.startLoc;
  27287. var node = this.startNode();
  27288. var tmp;
  27289. var type;
  27290. var isGroupedType = false;
  27291. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  27292. switch (this.state.type) {
  27293. case types$1.name:
  27294. if (this.isContextual("interface")) {
  27295. return this.flowParseInterfaceType();
  27296. }
  27297. return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
  27298. case types$1.braceL:
  27299. return this.flowParseObjectType({
  27300. allowStatic: false,
  27301. allowExact: false,
  27302. allowSpread: true,
  27303. allowProto: false,
  27304. allowInexact: true
  27305. });
  27306. case types$1.braceBarL:
  27307. return this.flowParseObjectType({
  27308. allowStatic: false,
  27309. allowExact: true,
  27310. allowSpread: true,
  27311. allowProto: false,
  27312. allowInexact: false
  27313. });
  27314. case types$1.bracketL:
  27315. this.state.noAnonFunctionType = false;
  27316. type = this.flowParseTupleType();
  27317. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  27318. return type;
  27319. case types$1.relational:
  27320. if (this.state.value === "<") {
  27321. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27322. this.expect(types$1.parenL);
  27323. tmp = this.flowParseFunctionTypeParams();
  27324. node.params = tmp.params;
  27325. node.rest = tmp.rest;
  27326. node["this"] = tmp._this;
  27327. this.expect(types$1.parenR);
  27328. this.expect(types$1.arrow);
  27329. node.returnType = this.flowParseType();
  27330. return this.finishNode(node, "FunctionTypeAnnotation");
  27331. }
  27332. break;
  27333. case types$1.parenL:
  27334. this.next();
  27335. if (!this.match(types$1.parenR) && !this.match(types$1.ellipsis)) {
  27336. if (this.match(types$1.name) || this.match(types$1._this)) {
  27337. var token = this.lookahead().type;
  27338. isGroupedType = token !== types$1.question && token !== types$1.colon;
  27339. } else {
  27340. isGroupedType = true;
  27341. }
  27342. }
  27343. if (isGroupedType) {
  27344. this.state.noAnonFunctionType = false;
  27345. type = this.flowParseType();
  27346. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  27347. if (this.state.noAnonFunctionType || !(this.match(types$1.comma) || this.match(types$1.parenR) && this.lookahead().type === types$1.arrow)) {
  27348. this.expect(types$1.parenR);
  27349. return type;
  27350. } else {
  27351. this.eat(types$1.comma);
  27352. }
  27353. }
  27354. if (type) {
  27355. tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
  27356. } else {
  27357. tmp = this.flowParseFunctionTypeParams();
  27358. }
  27359. node.params = tmp.params;
  27360. node.rest = tmp.rest;
  27361. node["this"] = tmp._this;
  27362. this.expect(types$1.parenR);
  27363. this.expect(types$1.arrow);
  27364. node.returnType = this.flowParseType();
  27365. node.typeParameters = null;
  27366. return this.finishNode(node, "FunctionTypeAnnotation");
  27367. case types$1.string:
  27368. return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
  27369. case types$1._true:
  27370. case types$1._false:
  27371. node.value = this.match(types$1._true);
  27372. this.next();
  27373. return this.finishNode(node, "BooleanLiteralTypeAnnotation");
  27374. case types$1.plusMin:
  27375. if (this.state.value === "-") {
  27376. this.next();
  27377. if (this.match(types$1.num)) {
  27378. return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
  27379. }
  27380. if (this.match(types$1.bigint)) {
  27381. return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
  27382. }
  27383. throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand);
  27384. }
  27385. throw this.unexpected();
  27386. case types$1.num:
  27387. return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
  27388. case types$1.bigint:
  27389. return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
  27390. case types$1._void:
  27391. this.next();
  27392. return this.finishNode(node, "VoidTypeAnnotation");
  27393. case types$1._null:
  27394. this.next();
  27395. return this.finishNode(node, "NullLiteralTypeAnnotation");
  27396. case types$1._this:
  27397. this.next();
  27398. return this.finishNode(node, "ThisTypeAnnotation");
  27399. case types$1.star:
  27400. this.next();
  27401. return this.finishNode(node, "ExistsTypeAnnotation");
  27402. default:
  27403. if (this.state.type.keyword === "typeof") {
  27404. return this.flowParseTypeofType();
  27405. } else if (this.state.type.keyword) {
  27406. var label = this.state.type.label;
  27407. this.next();
  27408. return _superClass.prototype.createIdentifier.call(this, node, label);
  27409. }
  27410. }
  27411. throw this.unexpected();
  27412. };
  27413. _proto.flowParsePostfixType = function flowParsePostfixType() {
  27414. var startPos = this.state.start;
  27415. var startLoc = this.state.startLoc;
  27416. var type = this.flowParsePrimaryType();
  27417. var seenOptionalIndexedAccess = false;
  27418. while ((this.match(types$1.bracketL) || this.match(types$1.questionDot)) && !this.canInsertSemicolon()) {
  27419. var node = this.startNodeAt(startPos, startLoc);
  27420. var optional = this.eat(types$1.questionDot);
  27421. seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
  27422. this.expect(types$1.bracketL);
  27423. if (!optional && this.match(types$1.bracketR)) {
  27424. node.elementType = type;
  27425. this.next();
  27426. type = this.finishNode(node, "ArrayTypeAnnotation");
  27427. } else {
  27428. node.objectType = type;
  27429. node.indexType = this.flowParseType();
  27430. this.expect(types$1.bracketR);
  27431. if (seenOptionalIndexedAccess) {
  27432. node.optional = optional;
  27433. type = this.finishNode(node, "OptionalIndexedAccessType");
  27434. } else {
  27435. type = this.finishNode(node, "IndexedAccessType");
  27436. }
  27437. }
  27438. }
  27439. return type;
  27440. };
  27441. _proto.flowParsePrefixType = function flowParsePrefixType() {
  27442. var node = this.startNode();
  27443. if (this.eat(types$1.question)) {
  27444. node.typeAnnotation = this.flowParsePrefixType();
  27445. return this.finishNode(node, "NullableTypeAnnotation");
  27446. } else {
  27447. return this.flowParsePostfixType();
  27448. }
  27449. };
  27450. _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() {
  27451. var param = this.flowParsePrefixType();
  27452. if (!this.state.noAnonFunctionType && this.eat(types$1.arrow)) {
  27453. var node = this.startNodeAt(param.start, param.loc.start);
  27454. node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
  27455. node.rest = null;
  27456. node["this"] = null;
  27457. node.returnType = this.flowParseType();
  27458. node.typeParameters = null;
  27459. return this.finishNode(node, "FunctionTypeAnnotation");
  27460. }
  27461. return param;
  27462. };
  27463. _proto.flowParseIntersectionType = function flowParseIntersectionType() {
  27464. var node = this.startNode();
  27465. this.eat(types$1.bitwiseAND);
  27466. var type = this.flowParseAnonFunctionWithoutParens();
  27467. node.types = [type];
  27468. while (this.eat(types$1.bitwiseAND)) {
  27469. node.types.push(this.flowParseAnonFunctionWithoutParens());
  27470. }
  27471. return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
  27472. };
  27473. _proto.flowParseUnionType = function flowParseUnionType() {
  27474. var node = this.startNode();
  27475. this.eat(types$1.bitwiseOR);
  27476. var type = this.flowParseIntersectionType();
  27477. node.types = [type];
  27478. while (this.eat(types$1.bitwiseOR)) {
  27479. node.types.push(this.flowParseIntersectionType());
  27480. }
  27481. return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
  27482. };
  27483. _proto.flowParseType = function flowParseType() {
  27484. var oldInType = this.state.inType;
  27485. this.state.inType = true;
  27486. var type = this.flowParseUnionType();
  27487. this.state.inType = oldInType;
  27488. return type;
  27489. };
  27490. _proto.flowParseTypeOrImplicitInstantiation = function flowParseTypeOrImplicitInstantiation() {
  27491. if (this.state.type === types$1.name && this.state.value === "_") {
  27492. var startPos = this.state.start;
  27493. var startLoc = this.state.startLoc;
  27494. var node = this.parseIdentifier();
  27495. return this.flowParseGenericType(startPos, startLoc, node);
  27496. } else {
  27497. return this.flowParseType();
  27498. }
  27499. };
  27500. _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() {
  27501. var node = this.startNode();
  27502. node.typeAnnotation = this.flowParseTypeInitialiser();
  27503. return this.finishNode(node, "TypeAnnotation");
  27504. };
  27505. _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
  27506. var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
  27507. if (this.match(types$1.colon)) {
  27508. ident.typeAnnotation = this.flowParseTypeAnnotation();
  27509. this.resetEndLocation(ident);
  27510. }
  27511. return ident;
  27512. };
  27513. _proto.typeCastToParameter = function typeCastToParameter(node) {
  27514. node.expression.typeAnnotation = node.typeAnnotation;
  27515. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  27516. return node.expression;
  27517. };
  27518. _proto.flowParseVariance = function flowParseVariance() {
  27519. var variance = null;
  27520. if (this.match(types$1.plusMin)) {
  27521. variance = this.startNode();
  27522. if (this.state.value === "+") {
  27523. variance.kind = "plus";
  27524. } else {
  27525. variance.kind = "minus";
  27526. }
  27527. this.next();
  27528. this.finishNode(variance, "Variance");
  27529. }
  27530. return variance;
  27531. };
  27532. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody, isMethod) {
  27533. var _this4 = this;
  27534. if (isMethod === void 0) {
  27535. isMethod = false;
  27536. }
  27537. if (allowExpressionBody) {
  27538. return this.forwardNoArrowParamsConversionAt(node, function () {
  27539. return _superClass.prototype.parseFunctionBody.call(_this4, node, true, isMethod);
  27540. });
  27541. }
  27542. return _superClass.prototype.parseFunctionBody.call(this, node, false, isMethod);
  27543. };
  27544. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  27545. if (isMethod === void 0) {
  27546. isMethod = false;
  27547. }
  27548. if (this.match(types$1.colon)) {
  27549. var typeNode = this.startNode();
  27550. var _this$flowParseTypeAn2 = this.flowParseTypeAndPredicateInitialiser();
  27551. typeNode.typeAnnotation = _this$flowParseTypeAn2[0];
  27552. node.predicate = _this$flowParseTypeAn2[1];
  27553. node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
  27554. }
  27555. _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod);
  27556. };
  27557. _proto.parseStatement = function parseStatement(context, topLevel) {
  27558. if (this.state.strict && this.match(types$1.name) && this.state.value === "interface") {
  27559. var lookahead = this.lookahead();
  27560. if (lookahead.type === types$1.name || isKeyword(lookahead.value)) {
  27561. var node = this.startNode();
  27562. this.next();
  27563. return this.flowParseInterface(node);
  27564. }
  27565. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  27566. var _node = this.startNode();
  27567. this.next();
  27568. return this.flowParseEnumDeclaration(_node);
  27569. }
  27570. var stmt = _superClass.prototype.parseStatement.call(this, context, topLevel);
  27571. if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {
  27572. this.flowPragma = null;
  27573. }
  27574. return stmt;
  27575. };
  27576. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  27577. if (expr.type === "Identifier") {
  27578. if (expr.name === "declare") {
  27579. if (this.match(types$1._class) || this.match(types$1.name) || this.match(types$1._function) || this.match(types$1._var) || this.match(types$1._export)) {
  27580. return this.flowParseDeclare(node);
  27581. }
  27582. } else if (this.match(types$1.name)) {
  27583. if (expr.name === "interface") {
  27584. return this.flowParseInterface(node);
  27585. } else if (expr.name === "type") {
  27586. return this.flowParseTypeAlias(node);
  27587. } else if (expr.name === "opaque") {
  27588. return this.flowParseOpaqueType(node, false);
  27589. }
  27590. }
  27591. }
  27592. return _superClass.prototype.parseExpressionStatement.call(this, node, expr);
  27593. };
  27594. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  27595. return this.isContextual("type") || this.isContextual("interface") || this.isContextual("opaque") || this.shouldParseEnums() && this.isContextual("enum") || _superClass.prototype.shouldParseExportDeclaration.call(this);
  27596. };
  27597. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  27598. if (this.match(types$1.name) && (this.state.value === "type" || this.state.value === "interface" || this.state.value === "opaque" || this.shouldParseEnums() && this.state.value === "enum")) {
  27599. return false;
  27600. }
  27601. return _superClass.prototype.isExportDefaultSpecifier.call(this);
  27602. };
  27603. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  27604. if (this.shouldParseEnums() && this.isContextual("enum")) {
  27605. var node = this.startNode();
  27606. this.next();
  27607. return this.flowParseEnumDeclaration(node);
  27608. }
  27609. return _superClass.prototype.parseExportDefaultExpression.call(this);
  27610. };
  27611. _proto.parseConditional = function parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  27612. var _this5 = this;
  27613. if (!this.match(types$1.question)) return expr;
  27614. if (this.state.maybeInArrowParameters) {
  27615. var result = this.tryParse(function () {
  27616. return _superClass.prototype.parseConditional.call(_this5, expr, startPos, startLoc);
  27617. });
  27618. if (!result.node) {
  27619. if (result.error) {
  27620. _superClass.prototype.setOptionalParametersError.call(this, refExpressionErrors, result.error);
  27621. }
  27622. return expr;
  27623. }
  27624. if (result.error) this.state = result.failState;
  27625. return result.node;
  27626. }
  27627. this.expect(types$1.question);
  27628. var state = this.state.clone();
  27629. var originalNoArrowAt = this.state.noArrowAt;
  27630. var node = this.startNodeAt(startPos, startLoc);
  27631. var _this$tryParseConditi = this.tryParseConditionalConsequent(),
  27632. consequent = _this$tryParseConditi.consequent,
  27633. failed = _this$tryParseConditi.failed;
  27634. var _this$getArrowLikeExp = this.getArrowLikeExpressions(consequent),
  27635. valid = _this$getArrowLikeExp[0],
  27636. invalid = _this$getArrowLikeExp[1];
  27637. if (failed || invalid.length > 0) {
  27638. var noArrowAt = [].concat(originalNoArrowAt);
  27639. if (invalid.length > 0) {
  27640. this.state = state;
  27641. this.state.noArrowAt = noArrowAt;
  27642. for (var i = 0; i < invalid.length; i++) {
  27643. noArrowAt.push(invalid[i].start);
  27644. }
  27645. var _this$tryParseConditi2 = this.tryParseConditionalConsequent();
  27646. consequent = _this$tryParseConditi2.consequent;
  27647. failed = _this$tryParseConditi2.failed;
  27648. var _this$getArrowLikeExp2 = this.getArrowLikeExpressions(consequent);
  27649. valid = _this$getArrowLikeExp2[0];
  27650. invalid = _this$getArrowLikeExp2[1];
  27651. }
  27652. if (failed && valid.length > 1) {
  27653. this.raise(state.start, FlowErrors.AmbiguousConditionalArrow);
  27654. }
  27655. if (failed && valid.length === 1) {
  27656. this.state = state;
  27657. this.state.noArrowAt = noArrowAt.concat(valid[0].start);
  27658. var _this$tryParseConditi3 = this.tryParseConditionalConsequent();
  27659. consequent = _this$tryParseConditi3.consequent;
  27660. failed = _this$tryParseConditi3.failed;
  27661. }
  27662. }
  27663. this.getArrowLikeExpressions(consequent, true);
  27664. this.state.noArrowAt = originalNoArrowAt;
  27665. this.expect(types$1.colon);
  27666. node.test = expr;
  27667. node.consequent = consequent;
  27668. node.alternate = this.forwardNoArrowParamsConversionAt(node, function () {
  27669. return _this5.parseMaybeAssign(undefined, undefined);
  27670. });
  27671. return this.finishNode(node, "ConditionalExpression");
  27672. };
  27673. _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() {
  27674. this.state.noArrowParamsConversionAt.push(this.state.start);
  27675. var consequent = this.parseMaybeAssignAllowIn();
  27676. var failed = !this.match(types$1.colon);
  27677. this.state.noArrowParamsConversionAt.pop();
  27678. return {
  27679. consequent: consequent,
  27680. failed: failed
  27681. };
  27682. };
  27683. _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) {
  27684. var _this6 = this;
  27685. var stack = [node];
  27686. var arrows = [];
  27687. while (stack.length !== 0) {
  27688. var _node2 = stack.pop();
  27689. if (_node2.type === "ArrowFunctionExpression") {
  27690. if (_node2.typeParameters || !_node2.returnType) {
  27691. this.finishArrowValidation(_node2);
  27692. } else {
  27693. arrows.push(_node2);
  27694. }
  27695. stack.push(_node2.body);
  27696. } else if (_node2.type === "ConditionalExpression") {
  27697. stack.push(_node2.consequent);
  27698. stack.push(_node2.alternate);
  27699. }
  27700. }
  27701. if (disallowInvalid) {
  27702. arrows.forEach(function (node) {
  27703. return _this6.finishArrowValidation(node);
  27704. });
  27705. return [arrows, []];
  27706. }
  27707. return partition(arrows, function (node) {
  27708. return node.params.every(function (param) {
  27709. return _this6.isAssignable(param, true);
  27710. });
  27711. });
  27712. };
  27713. _proto.finishArrowValidation = function finishArrowValidation(node) {
  27714. var _node$extra;
  27715. this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false);
  27716. this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
  27717. _superClass.prototype.checkParams.call(this, node, false, true);
  27718. this.scope.exit();
  27719. };
  27720. _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) {
  27721. var result;
  27722. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  27723. this.state.noArrowParamsConversionAt.push(this.state.start);
  27724. result = parse();
  27725. this.state.noArrowParamsConversionAt.pop();
  27726. } else {
  27727. result = parse();
  27728. }
  27729. return result;
  27730. };
  27731. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  27732. node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
  27733. if (this.eat(types$1.question)) {
  27734. node.optional = true;
  27735. this.resetEndLocation(node);
  27736. }
  27737. if (this.match(types$1.colon)) {
  27738. var typeCastNode = this.startNodeAt(startPos, startLoc);
  27739. typeCastNode.expression = node;
  27740. typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
  27741. return this.finishNode(typeCastNode, "TypeCastExpression");
  27742. }
  27743. return node;
  27744. };
  27745. _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
  27746. if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
  27747. return;
  27748. }
  27749. _superClass.prototype.assertModuleNodeAllowed.call(this, node);
  27750. };
  27751. _proto.parseExport = function parseExport(node) {
  27752. var decl = _superClass.prototype.parseExport.call(this, node);
  27753. if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
  27754. decl.exportKind = decl.exportKind || "value";
  27755. }
  27756. return decl;
  27757. };
  27758. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  27759. if (this.isContextual("type")) {
  27760. node.exportKind = "type";
  27761. var declarationNode = this.startNode();
  27762. this.next();
  27763. if (this.match(types$1.braceL)) {
  27764. node.specifiers = this.parseExportSpecifiers();
  27765. this.parseExportFrom(node);
  27766. return null;
  27767. } else {
  27768. return this.flowParseTypeAlias(declarationNode);
  27769. }
  27770. } else if (this.isContextual("opaque")) {
  27771. node.exportKind = "type";
  27772. var _declarationNode = this.startNode();
  27773. this.next();
  27774. return this.flowParseOpaqueType(_declarationNode, false);
  27775. } else if (this.isContextual("interface")) {
  27776. node.exportKind = "type";
  27777. var _declarationNode2 = this.startNode();
  27778. this.next();
  27779. return this.flowParseInterface(_declarationNode2);
  27780. } else if (this.shouldParseEnums() && this.isContextual("enum")) {
  27781. node.exportKind = "value";
  27782. var _declarationNode3 = this.startNode();
  27783. this.next();
  27784. return this.flowParseEnumDeclaration(_declarationNode3);
  27785. } else {
  27786. return _superClass.prototype.parseExportDeclaration.call(this, node);
  27787. }
  27788. };
  27789. _proto.eatExportStar = function eatExportStar(node) {
  27790. if (_superClass.prototype.eatExportStar.apply(this, arguments)) return true;
  27791. if (this.isContextual("type") && this.lookahead().type === types$1.star) {
  27792. node.exportKind = "type";
  27793. this.next();
  27794. this.next();
  27795. return true;
  27796. }
  27797. return false;
  27798. };
  27799. _proto.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) {
  27800. var pos = this.state.start;
  27801. var hasNamespace = _superClass.prototype.maybeParseExportNamespaceSpecifier.call(this, node);
  27802. if (hasNamespace && node.exportKind === "type") {
  27803. this.unexpected(pos);
  27804. }
  27805. return hasNamespace;
  27806. };
  27807. _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
  27808. _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId);
  27809. if (this.isRelational("<")) {
  27810. node.typeParameters = this.flowParseTypeParameterDeclaration();
  27811. }
  27812. };
  27813. _proto.parseClassMember = function parseClassMember(classBody, member, state) {
  27814. var pos = this.state.start;
  27815. if (this.isContextual("declare")) {
  27816. if (this.parseClassMemberFromModifier(classBody, member)) {
  27817. return;
  27818. }
  27819. member.declare = true;
  27820. }
  27821. _superClass.prototype.parseClassMember.call(this, classBody, member, state);
  27822. if (member.declare) {
  27823. if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
  27824. this.raise(pos, FlowErrors.DeclareClassElement);
  27825. } else if (member.value) {
  27826. this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer);
  27827. }
  27828. }
  27829. };
  27830. _proto.isIterator = function isIterator(word) {
  27831. return word === "iterator" || word === "asyncIterator";
  27832. };
  27833. _proto.readIterator = function readIterator() {
  27834. var word = _superClass.prototype.readWord1.call(this);
  27835. var fullWord = "@@" + word;
  27836. if (!this.isIterator(word) || !this.state.inType) {
  27837. this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord);
  27838. }
  27839. this.finishToken(types$1.name, fullWord);
  27840. };
  27841. _proto.getTokenFromCode = function getTokenFromCode(code) {
  27842. var next = this.input.charCodeAt(this.state.pos + 1);
  27843. if (code === 123 && next === 124) {
  27844. return this.finishOp(types$1.braceBarL, 2);
  27845. } else if (this.state.inType && (code === 62 || code === 60)) {
  27846. return this.finishOp(types$1.relational, 1);
  27847. } else if (this.state.inType && code === 63) {
  27848. if (next === 46) {
  27849. return this.finishOp(types$1.questionDot, 2);
  27850. }
  27851. return this.finishOp(types$1.question, 1);
  27852. } else if (isIteratorStart(code, next)) {
  27853. this.state.pos += 2;
  27854. return this.readIterator();
  27855. } else {
  27856. return _superClass.prototype.getTokenFromCode.call(this, code);
  27857. }
  27858. };
  27859. _proto.isAssignable = function isAssignable(node, isBinding) {
  27860. var _this7 = this;
  27861. switch (node.type) {
  27862. case "Identifier":
  27863. case "ObjectPattern":
  27864. case "ArrayPattern":
  27865. case "AssignmentPattern":
  27866. return true;
  27867. case "ObjectExpression":
  27868. {
  27869. var last = node.properties.length - 1;
  27870. return node.properties.every(function (prop, i) {
  27871. return prop.type !== "ObjectMethod" && (i === last || prop.type === "SpreadElement") && _this7.isAssignable(prop);
  27872. });
  27873. }
  27874. case "ObjectProperty":
  27875. return this.isAssignable(node.value);
  27876. case "SpreadElement":
  27877. return this.isAssignable(node.argument);
  27878. case "ArrayExpression":
  27879. return node.elements.every(function (element) {
  27880. return _this7.isAssignable(element);
  27881. });
  27882. case "AssignmentExpression":
  27883. return node.operator === "=";
  27884. case "ParenthesizedExpression":
  27885. case "TypeCastExpression":
  27886. return this.isAssignable(node.expression);
  27887. case "MemberExpression":
  27888. case "OptionalMemberExpression":
  27889. return !isBinding;
  27890. default:
  27891. return false;
  27892. }
  27893. };
  27894. _proto.toAssignable = function toAssignable(node, isLHS) {
  27895. if (isLHS === void 0) {
  27896. isLHS = false;
  27897. }
  27898. if (node.type === "TypeCastExpression") {
  27899. return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isLHS);
  27900. } else {
  27901. return _superClass.prototype.toAssignable.call(this, node, isLHS);
  27902. }
  27903. };
  27904. _proto.toAssignableList = function toAssignableList(exprList, trailingCommaPos, isLHS) {
  27905. for (var i = 0; i < exprList.length; i++) {
  27906. var expr = exprList[i];
  27907. if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
  27908. exprList[i] = this.typeCastToParameter(expr);
  27909. }
  27910. }
  27911. return _superClass.prototype.toAssignableList.call(this, exprList, trailingCommaPos, isLHS);
  27912. };
  27913. _proto.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) {
  27914. for (var i = 0; i < exprList.length; i++) {
  27915. var _expr$extra;
  27916. var expr = exprList[i];
  27917. if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
  27918. this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern);
  27919. }
  27920. }
  27921. return exprList;
  27922. };
  27923. _proto.parseArrayLike = function parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  27924. var node = _superClass.prototype.parseArrayLike.call(this, close, canBePattern, isTuple, refExpressionErrors);
  27925. if (canBePattern && !this.state.maybeInArrowParameters) {
  27926. this.toReferencedList(node.elements);
  27927. }
  27928. return node;
  27929. };
  27930. _proto.checkLVal = function checkLVal(expr) {
  27931. if (expr.type !== "TypeCastExpression") {
  27932. var _superClass$prototype;
  27933. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  27934. args[_key2 - 1] = arguments[_key2];
  27935. }
  27936. return (_superClass$prototype = _superClass.prototype.checkLVal).call.apply(_superClass$prototype, [this, expr].concat(args));
  27937. }
  27938. };
  27939. _proto.parseClassProperty = function parseClassProperty(node) {
  27940. if (this.match(types$1.colon)) {
  27941. node.typeAnnotation = this.flowParseTypeAnnotation();
  27942. }
  27943. return _superClass.prototype.parseClassProperty.call(this, node);
  27944. };
  27945. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  27946. if (this.match(types$1.colon)) {
  27947. node.typeAnnotation = this.flowParseTypeAnnotation();
  27948. }
  27949. return _superClass.prototype.parseClassPrivateProperty.call(this, node);
  27950. };
  27951. _proto.isClassMethod = function isClassMethod() {
  27952. return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
  27953. };
  27954. _proto.isClassProperty = function isClassProperty() {
  27955. return this.match(types$1.colon) || _superClass.prototype.isClassProperty.call(this);
  27956. };
  27957. _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
  27958. return !this.match(types$1.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method);
  27959. };
  27960. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  27961. if (method.variance) {
  27962. this.unexpected(method.variance.start);
  27963. }
  27964. delete method.variance;
  27965. if (this.isRelational("<")) {
  27966. method.typeParameters = this.flowParseTypeParameterDeclaration();
  27967. }
  27968. _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  27969. if (method.params && isConstructor) {
  27970. var params = method.params;
  27971. if (params.length > 0 && this.isThisParam(params[0])) {
  27972. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  27973. }
  27974. } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
  27975. var _params = method.value.params;
  27976. if (_params.length > 0 && this.isThisParam(_params[0])) {
  27977. this.raise(method.start, FlowErrors.ThisParamBannedInConstructor);
  27978. }
  27979. }
  27980. };
  27981. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  27982. if (method.variance) {
  27983. this.unexpected(method.variance.start);
  27984. }
  27985. delete method.variance;
  27986. if (this.isRelational("<")) {
  27987. method.typeParameters = this.flowParseTypeParameterDeclaration();
  27988. }
  27989. _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
  27990. };
  27991. _proto.parseClassSuper = function parseClassSuper(node) {
  27992. _superClass.prototype.parseClassSuper.call(this, node);
  27993. if (node.superClass && this.isRelational("<")) {
  27994. node.superTypeParameters = this.flowParseTypeParameterInstantiation();
  27995. }
  27996. if (this.isContextual("implements")) {
  27997. this.next();
  27998. var implemented = node["implements"] = [];
  27999. do {
  28000. var _node3 = this.startNode();
  28001. _node3.id = this.flowParseRestrictedIdentifier(true);
  28002. if (this.isRelational("<")) {
  28003. _node3.typeParameters = this.flowParseTypeParameterInstantiation();
  28004. } else {
  28005. _node3.typeParameters = null;
  28006. }
  28007. implemented.push(this.finishNode(_node3, "ClassImplements"));
  28008. } while (this.eat(types$1.comma));
  28009. }
  28010. };
  28011. _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {
  28012. _superClass.prototype.checkGetterSetterParams.call(this, method);
  28013. var params = this.getObjectOrClassMethodParams(method);
  28014. if (params.length > 0) {
  28015. var param = params[0];
  28016. if (this.isThisParam(param) && method.kind === "get") {
  28017. this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam);
  28018. } else if (this.isThisParam(param)) {
  28019. this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam);
  28020. }
  28021. }
  28022. };
  28023. _proto.parsePropertyName = function parsePropertyName(node, isPrivateNameAllowed) {
  28024. var variance = this.flowParseVariance();
  28025. var key = _superClass.prototype.parsePropertyName.call(this, node, isPrivateNameAllowed);
  28026. node.variance = variance;
  28027. return key;
  28028. };
  28029. _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  28030. if (prop.variance) {
  28031. this.unexpected(prop.variance.start);
  28032. }
  28033. delete prop.variance;
  28034. var typeParameters;
  28035. if (this.isRelational("<") && !isAccessor) {
  28036. typeParameters = this.flowParseTypeParameterDeclaration();
  28037. if (!this.match(types$1.parenL)) this.unexpected();
  28038. }
  28039. _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  28040. if (typeParameters) {
  28041. (prop.value || prop).typeParameters = typeParameters;
  28042. }
  28043. };
  28044. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  28045. if (this.eat(types$1.question)) {
  28046. if (param.type !== "Identifier") {
  28047. this.raise(param.start, FlowErrors.OptionalBindingPattern);
  28048. }
  28049. if (this.isThisParam(param)) {
  28050. this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional);
  28051. }
  28052. param.optional = true;
  28053. }
  28054. if (this.match(types$1.colon)) {
  28055. param.typeAnnotation = this.flowParseTypeAnnotation();
  28056. } else if (this.isThisParam(param)) {
  28057. this.raise(param.start, FlowErrors.ThisParamAnnotationRequired);
  28058. }
  28059. if (this.match(types$1.eq) && this.isThisParam(param)) {
  28060. this.raise(param.start, FlowErrors.ThisParamNoDefault);
  28061. }
  28062. this.resetEndLocation(param);
  28063. return param;
  28064. };
  28065. _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {
  28066. var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left);
  28067. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  28068. this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer);
  28069. }
  28070. return node;
  28071. };
  28072. _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
  28073. if (!hasTypeImportKind(node)) {
  28074. return _superClass.prototype.shouldParseDefaultImport.call(this, node);
  28075. }
  28076. return isMaybeDefaultImport(this.state);
  28077. };
  28078. _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  28079. specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
  28080. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
  28081. node.specifiers.push(this.finishNode(specifier, type));
  28082. };
  28083. _proto.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) {
  28084. node.importKind = "value";
  28085. var kind = null;
  28086. if (this.match(types$1._typeof)) {
  28087. kind = "typeof";
  28088. } else if (this.isContextual("type")) {
  28089. kind = "type";
  28090. }
  28091. if (kind) {
  28092. var lh = this.lookahead();
  28093. if (kind === "type" && lh.type === types$1.star) {
  28094. this.unexpected(lh.start);
  28095. }
  28096. if (isMaybeDefaultImport(lh) || lh.type === types$1.braceL || lh.type === types$1.star) {
  28097. this.next();
  28098. node.importKind = kind;
  28099. }
  28100. }
  28101. return _superClass.prototype.maybeParseDefaultImportSpecifier.call(this, node);
  28102. };
  28103. _proto.parseImportSpecifier = function parseImportSpecifier(node) {
  28104. var specifier = this.startNode();
  28105. var firstIdentIsString = this.match(types$1.string);
  28106. var firstIdent = this.parseModuleExportName();
  28107. var specifierTypeKind = null;
  28108. if (firstIdent.type === "Identifier") {
  28109. if (firstIdent.name === "type") {
  28110. specifierTypeKind = "type";
  28111. } else if (firstIdent.name === "typeof") {
  28112. specifierTypeKind = "typeof";
  28113. }
  28114. }
  28115. var isBinding = false;
  28116. if (this.isContextual("as") && !this.isLookaheadContextual("as")) {
  28117. var as_ident = this.parseIdentifier(true);
  28118. if (specifierTypeKind !== null && !this.match(types$1.name) && !this.state.type.keyword) {
  28119. specifier.imported = as_ident;
  28120. specifier.importKind = specifierTypeKind;
  28121. specifier.local = as_ident.__clone();
  28122. } else {
  28123. specifier.imported = firstIdent;
  28124. specifier.importKind = null;
  28125. specifier.local = this.parseIdentifier();
  28126. }
  28127. } else if (specifierTypeKind !== null && (this.match(types$1.name) || this.state.type.keyword)) {
  28128. specifier.imported = this.parseIdentifier(true);
  28129. specifier.importKind = specifierTypeKind;
  28130. if (this.eatContextual("as")) {
  28131. specifier.local = this.parseIdentifier();
  28132. } else {
  28133. isBinding = true;
  28134. specifier.local = specifier.imported.__clone();
  28135. }
  28136. } else {
  28137. if (firstIdentIsString) {
  28138. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value);
  28139. }
  28140. isBinding = true;
  28141. specifier.imported = firstIdent;
  28142. specifier.importKind = null;
  28143. specifier.local = specifier.imported.__clone();
  28144. }
  28145. var nodeIsTypeImport = hasTypeImportKind(node);
  28146. var specifierIsTypeImport = hasTypeImportKind(specifier);
  28147. if (nodeIsTypeImport && specifierIsTypeImport) {
  28148. this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport);
  28149. }
  28150. if (nodeIsTypeImport || specifierIsTypeImport) {
  28151. this.checkReservedType(specifier.local.name, specifier.local.start, true);
  28152. }
  28153. if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {
  28154. this.checkReservedWord(specifier.local.name, specifier.start, true, true);
  28155. }
  28156. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
  28157. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  28158. };
  28159. _proto.parseBindingAtom = function parseBindingAtom() {
  28160. switch (this.state.type) {
  28161. case types$1._this:
  28162. return this.parseIdentifier(true);
  28163. default:
  28164. return _superClass.prototype.parseBindingAtom.call(this);
  28165. }
  28166. };
  28167. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  28168. var kind = node.kind;
  28169. if (kind !== "get" && kind !== "set" && this.isRelational("<")) {
  28170. node.typeParameters = this.flowParseTypeParameterDeclaration();
  28171. }
  28172. _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);
  28173. };
  28174. _proto.parseVarId = function parseVarId(decl, kind) {
  28175. _superClass.prototype.parseVarId.call(this, decl, kind);
  28176. if (this.match(types$1.colon)) {
  28177. decl.id.typeAnnotation = this.flowParseTypeAnnotation();
  28178. this.resetEndLocation(decl.id);
  28179. }
  28180. };
  28181. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  28182. if (this.match(types$1.colon)) {
  28183. var oldNoAnonFunctionType = this.state.noAnonFunctionType;
  28184. this.state.noAnonFunctionType = true;
  28185. node.returnType = this.flowParseTypeAnnotation();
  28186. this.state.noAnonFunctionType = oldNoAnonFunctionType;
  28187. }
  28188. return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
  28189. };
  28190. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  28191. return this.match(types$1.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
  28192. };
  28193. _proto.parseMaybeAssign = function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  28194. var _this8 = this,
  28195. _jsx;
  28196. var state = null;
  28197. var jsx;
  28198. if (this.hasPlugin("jsx") && (this.match(types$1.jsxTagStart) || this.isRelational("<"))) {
  28199. state = this.state.clone();
  28200. jsx = this.tryParse(function () {
  28201. return _superClass.prototype.parseMaybeAssign.call(_this8, refExpressionErrors, afterLeftParse);
  28202. }, state);
  28203. if (!jsx.error) return jsx.node;
  28204. var context = this.state.context;
  28205. var curContext = context[context.length - 1];
  28206. if (curContext === types.j_oTag) {
  28207. context.length -= 2;
  28208. } else if (curContext === types.j_expr) {
  28209. context.length -= 1;
  28210. }
  28211. }
  28212. if ((_jsx = jsx) != null && _jsx.error || this.isRelational("<")) {
  28213. var _jsx2, _jsx3;
  28214. state = state || this.state.clone();
  28215. var typeParameters;
  28216. var arrow = this.tryParse(function (abort) {
  28217. var _arrowExpression$extr;
  28218. typeParameters = _this8.flowParseTypeParameterDeclaration();
  28219. var arrowExpression = _this8.forwardNoArrowParamsConversionAt(typeParameters, function () {
  28220. var result = _superClass.prototype.parseMaybeAssign.call(_this8, refExpressionErrors, afterLeftParse);
  28221. _this8.resetStartLocationFromNode(result, typeParameters);
  28222. return result;
  28223. });
  28224. if (arrowExpression.type !== "ArrowFunctionExpression" && (_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) {
  28225. abort();
  28226. }
  28227. var expr = _this8.maybeUnwrapTypeCastExpression(arrowExpression);
  28228. expr.typeParameters = typeParameters;
  28229. _this8.resetStartLocationFromNode(expr, typeParameters);
  28230. return arrowExpression;
  28231. }, state);
  28232. var arrowExpression = null;
  28233. if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
  28234. if (!arrow.error && !arrow.aborted) {
  28235. if (arrow.node.async) {
  28236. this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction);
  28237. }
  28238. return arrow.node;
  28239. }
  28240. arrowExpression = arrow.node;
  28241. }
  28242. if ((_jsx2 = jsx) != null && _jsx2.node) {
  28243. this.state = jsx.failState;
  28244. return jsx.node;
  28245. }
  28246. if (arrowExpression) {
  28247. this.state = arrow.failState;
  28248. return arrowExpression;
  28249. }
  28250. if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error;
  28251. if (arrow.thrown) throw arrow.error;
  28252. throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter);
  28253. }
  28254. return _superClass.prototype.parseMaybeAssign.call(this, refExpressionErrors, afterLeftParse);
  28255. };
  28256. _proto.parseArrow = function parseArrow(node) {
  28257. var _this9 = this;
  28258. if (this.match(types$1.colon)) {
  28259. var result = this.tryParse(function () {
  28260. var oldNoAnonFunctionType = _this9.state.noAnonFunctionType;
  28261. _this9.state.noAnonFunctionType = true;
  28262. var typeNode = _this9.startNode();
  28263. var _this9$flowParseTypeA = _this9.flowParseTypeAndPredicateInitialiser();
  28264. typeNode.typeAnnotation = _this9$flowParseTypeA[0];
  28265. node.predicate = _this9$flowParseTypeA[1];
  28266. _this9.state.noAnonFunctionType = oldNoAnonFunctionType;
  28267. if (_this9.canInsertSemicolon()) _this9.unexpected();
  28268. if (!_this9.match(types$1.arrow)) _this9.unexpected();
  28269. return typeNode;
  28270. });
  28271. if (result.thrown) return null;
  28272. if (result.error) this.state = result.failState;
  28273. node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
  28274. }
  28275. return _superClass.prototype.parseArrow.call(this, node);
  28276. };
  28277. _proto.shouldParseArrow = function shouldParseArrow() {
  28278. return this.match(types$1.colon) || _superClass.prototype.shouldParseArrow.call(this);
  28279. };
  28280. _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {
  28281. if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  28282. node.params = params;
  28283. } else {
  28284. _superClass.prototype.setArrowFunctionParameters.call(this, node, params);
  28285. }
  28286. };
  28287. _proto.checkParams = function checkParams(node, allowDuplicates, isArrowFunction) {
  28288. if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
  28289. return;
  28290. }
  28291. for (var i = 0; i < node.params.length; i++) {
  28292. if (this.isThisParam(node.params[i]) && i > 0) {
  28293. this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst);
  28294. }
  28295. }
  28296. return _superClass.prototype.checkParams.apply(this, arguments);
  28297. };
  28298. _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
  28299. return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
  28300. };
  28301. _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
  28302. var _this10 = this;
  28303. if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
  28304. this.next();
  28305. var node = this.startNodeAt(startPos, startLoc);
  28306. node.callee = base;
  28307. node.arguments = this.parseCallExpressionArguments(types$1.parenR, false);
  28308. base = this.finishNode(node, "CallExpression");
  28309. } else if (base.type === "Identifier" && base.name === "async" && this.isRelational("<")) {
  28310. var state = this.state.clone();
  28311. var arrow = this.tryParse(function (abort) {
  28312. return _this10.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort();
  28313. }, state);
  28314. if (!arrow.error && !arrow.aborted) return arrow.node;
  28315. var result = this.tryParse(function () {
  28316. return _superClass.prototype.parseSubscripts.call(_this10, base, startPos, startLoc, noCalls);
  28317. }, state);
  28318. if (result.node && !result.error) return result.node;
  28319. if (arrow.node) {
  28320. this.state = arrow.failState;
  28321. return arrow.node;
  28322. }
  28323. if (result.node) {
  28324. this.state = result.failState;
  28325. return result.node;
  28326. }
  28327. throw arrow.error || result.error;
  28328. }
  28329. return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);
  28330. };
  28331. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, subscriptState) {
  28332. var _this11 = this;
  28333. if (this.match(types$1.questionDot) && this.isLookaheadToken_lt()) {
  28334. subscriptState.optionalChainMember = true;
  28335. if (noCalls) {
  28336. subscriptState.stop = true;
  28337. return base;
  28338. }
  28339. this.next();
  28340. var node = this.startNodeAt(startPos, startLoc);
  28341. node.callee = base;
  28342. node.typeArguments = this.flowParseTypeParameterInstantiation();
  28343. this.expect(types$1.parenL);
  28344. node.arguments = this.parseCallExpressionArguments(types$1.parenR, false);
  28345. node.optional = true;
  28346. return this.finishCallExpression(node, true);
  28347. } else if (!noCalls && this.shouldParseTypes() && this.isRelational("<")) {
  28348. var _node4 = this.startNodeAt(startPos, startLoc);
  28349. _node4.callee = base;
  28350. var result = this.tryParse(function () {
  28351. _node4.typeArguments = _this11.flowParseTypeParameterInstantiationCallOrNew();
  28352. _this11.expect(types$1.parenL);
  28353. _node4.arguments = _this11.parseCallExpressionArguments(types$1.parenR, false);
  28354. if (subscriptState.optionalChainMember) _node4.optional = false;
  28355. return _this11.finishCallExpression(_node4, subscriptState.optionalChainMember);
  28356. });
  28357. if (result.node) {
  28358. if (result.error) this.state = result.failState;
  28359. return result.node;
  28360. }
  28361. }
  28362. return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, subscriptState);
  28363. };
  28364. _proto.parseNewArguments = function parseNewArguments(node) {
  28365. var _this12 = this;
  28366. var targs = null;
  28367. if (this.shouldParseTypes() && this.isRelational("<")) {
  28368. targs = this.tryParse(function () {
  28369. return _this12.flowParseTypeParameterInstantiationCallOrNew();
  28370. }).node;
  28371. }
  28372. node.typeArguments = targs;
  28373. _superClass.prototype.parseNewArguments.call(this, node);
  28374. };
  28375. _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) {
  28376. var node = this.startNodeAt(startPos, startLoc);
  28377. this.parseFunctionParams(node);
  28378. if (!this.parseArrow(node)) return;
  28379. return this.parseArrowExpression(node, undefined, true);
  28380. };
  28381. _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {
  28382. var next = this.input.charCodeAt(this.state.pos + 1);
  28383. if (code === 42 && next === 47 && this.state.hasFlowComment) {
  28384. this.state.hasFlowComment = false;
  28385. this.state.pos += 2;
  28386. this.nextToken();
  28387. return;
  28388. }
  28389. _superClass.prototype.readToken_mult_modulo.call(this, code);
  28390. };
  28391. _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {
  28392. var next = this.input.charCodeAt(this.state.pos + 1);
  28393. if (code === 124 && next === 125) {
  28394. this.finishOp(types$1.braceBarR, 2);
  28395. return;
  28396. }
  28397. _superClass.prototype.readToken_pipe_amp.call(this, code);
  28398. };
  28399. _proto.parseTopLevel = function parseTopLevel(file, program) {
  28400. var fileNode = _superClass.prototype.parseTopLevel.call(this, file, program);
  28401. if (this.state.hasFlowComment) {
  28402. this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment);
  28403. }
  28404. return fileNode;
  28405. };
  28406. _proto.skipBlockComment = function skipBlockComment() {
  28407. if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
  28408. if (this.state.hasFlowComment) {
  28409. this.unexpected(null, FlowErrors.NestedFlowComment);
  28410. }
  28411. this.hasFlowCommentCompletion();
  28412. this.state.pos += this.skipFlowComment();
  28413. this.state.hasFlowComment = true;
  28414. return;
  28415. }
  28416. if (this.state.hasFlowComment) {
  28417. var end = this.input.indexOf("*-/", this.state.pos += 2);
  28418. if (end === -1) {
  28419. throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment);
  28420. }
  28421. this.state.pos = end + 3;
  28422. return;
  28423. }
  28424. _superClass.prototype.skipBlockComment.call(this);
  28425. };
  28426. _proto.skipFlowComment = function skipFlowComment() {
  28427. var pos = this.state.pos;
  28428. var shiftToFirstNonWhiteSpace = 2;
  28429. while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
  28430. shiftToFirstNonWhiteSpace++;
  28431. }
  28432. var ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
  28433. var ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
  28434. if (ch2 === 58 && ch3 === 58) {
  28435. return shiftToFirstNonWhiteSpace + 2;
  28436. }
  28437. if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
  28438. return shiftToFirstNonWhiteSpace + 12;
  28439. }
  28440. if (ch2 === 58 && ch3 !== 58) {
  28441. return shiftToFirstNonWhiteSpace;
  28442. }
  28443. return false;
  28444. };
  28445. _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() {
  28446. var end = this.input.indexOf("*/", this.state.pos);
  28447. if (end === -1) {
  28448. throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment);
  28449. }
  28450. };
  28451. _proto.flowEnumErrorBooleanMemberNotInitialized = function flowEnumErrorBooleanMemberNotInitialized(pos, _ref2) {
  28452. var enumName = _ref2.enumName,
  28453. memberName = _ref2.memberName;
  28454. this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName);
  28455. };
  28456. _proto.flowEnumErrorInvalidMemberName = function flowEnumErrorInvalidMemberName(pos, _ref3) {
  28457. var enumName = _ref3.enumName,
  28458. memberName = _ref3.memberName;
  28459. var suggestion = memberName[0].toUpperCase() + memberName.slice(1);
  28460. this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName);
  28461. };
  28462. _proto.flowEnumErrorDuplicateMemberName = function flowEnumErrorDuplicateMemberName(pos, _ref4) {
  28463. var enumName = _ref4.enumName,
  28464. memberName = _ref4.memberName;
  28465. this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName);
  28466. };
  28467. _proto.flowEnumErrorInconsistentMemberValues = function flowEnumErrorInconsistentMemberValues(pos, _ref5) {
  28468. var enumName = _ref5.enumName;
  28469. this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName);
  28470. };
  28471. _proto.flowEnumErrorInvalidExplicitType = function flowEnumErrorInvalidExplicitType(pos, _ref6) {
  28472. var enumName = _ref6.enumName,
  28473. suppliedType = _ref6.suppliedType;
  28474. return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType);
  28475. };
  28476. _proto.flowEnumErrorInvalidMemberInitializer = function flowEnumErrorInvalidMemberInitializer(pos, _ref7) {
  28477. var enumName = _ref7.enumName,
  28478. explicitType = _ref7.explicitType,
  28479. memberName = _ref7.memberName;
  28480. var message = null;
  28481. switch (explicitType) {
  28482. case "boolean":
  28483. case "number":
  28484. case "string":
  28485. message = FlowErrors.EnumInvalidMemberInitializerPrimaryType;
  28486. break;
  28487. case "symbol":
  28488. message = FlowErrors.EnumInvalidMemberInitializerSymbolType;
  28489. break;
  28490. default:
  28491. message = FlowErrors.EnumInvalidMemberInitializerUnknownType;
  28492. }
  28493. return this.raise(pos, message, enumName, memberName, explicitType);
  28494. };
  28495. _proto.flowEnumErrorNumberMemberNotInitialized = function flowEnumErrorNumberMemberNotInitialized(pos, _ref8) {
  28496. var enumName = _ref8.enumName,
  28497. memberName = _ref8.memberName;
  28498. this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName);
  28499. };
  28500. _proto.flowEnumErrorStringMemberInconsistentlyInitailized = function flowEnumErrorStringMemberInconsistentlyInitailized(pos, _ref9) {
  28501. var enumName = _ref9.enumName;
  28502. this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName);
  28503. };
  28504. _proto.flowEnumMemberInit = function flowEnumMemberInit() {
  28505. var _this13 = this;
  28506. var startPos = this.state.start;
  28507. var endOfInit = function endOfInit() {
  28508. return _this13.match(types$1.comma) || _this13.match(types$1.braceR);
  28509. };
  28510. switch (this.state.type) {
  28511. case types$1.num:
  28512. {
  28513. var literal = this.parseNumericLiteral(this.state.value);
  28514. if (endOfInit()) {
  28515. return {
  28516. type: "number",
  28517. pos: literal.start,
  28518. value: literal
  28519. };
  28520. }
  28521. return {
  28522. type: "invalid",
  28523. pos: startPos
  28524. };
  28525. }
  28526. case types$1.string:
  28527. {
  28528. var _literal = this.parseStringLiteral(this.state.value);
  28529. if (endOfInit()) {
  28530. return {
  28531. type: "string",
  28532. pos: _literal.start,
  28533. value: _literal
  28534. };
  28535. }
  28536. return {
  28537. type: "invalid",
  28538. pos: startPos
  28539. };
  28540. }
  28541. case types$1._true:
  28542. case types$1._false:
  28543. {
  28544. var _literal2 = this.parseBooleanLiteral(this.match(types$1._true));
  28545. if (endOfInit()) {
  28546. return {
  28547. type: "boolean",
  28548. pos: _literal2.start,
  28549. value: _literal2
  28550. };
  28551. }
  28552. return {
  28553. type: "invalid",
  28554. pos: startPos
  28555. };
  28556. }
  28557. default:
  28558. return {
  28559. type: "invalid",
  28560. pos: startPos
  28561. };
  28562. }
  28563. };
  28564. _proto.flowEnumMemberRaw = function flowEnumMemberRaw() {
  28565. var pos = this.state.start;
  28566. var id = this.parseIdentifier(true);
  28567. var init = this.eat(types$1.eq) ? this.flowEnumMemberInit() : {
  28568. type: "none",
  28569. pos: pos
  28570. };
  28571. return {
  28572. id: id,
  28573. init: init
  28574. };
  28575. };
  28576. _proto.flowEnumCheckExplicitTypeMismatch = function flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) {
  28577. var explicitType = context.explicitType;
  28578. if (explicitType === null) {
  28579. return;
  28580. }
  28581. if (explicitType !== expectedType) {
  28582. this.flowEnumErrorInvalidMemberInitializer(pos, context);
  28583. }
  28584. };
  28585. _proto.flowEnumMembers = function flowEnumMembers(_ref10) {
  28586. var enumName = _ref10.enumName,
  28587. explicitType = _ref10.explicitType;
  28588. var seenNames = new Set();
  28589. var members = {
  28590. booleanMembers: [],
  28591. numberMembers: [],
  28592. stringMembers: [],
  28593. defaultedMembers: []
  28594. };
  28595. var hasUnknownMembers = false;
  28596. while (!this.match(types$1.braceR)) {
  28597. if (this.eat(types$1.ellipsis)) {
  28598. hasUnknownMembers = true;
  28599. break;
  28600. }
  28601. var memberNode = this.startNode();
  28602. var _this$flowEnumMemberR = this.flowEnumMemberRaw(),
  28603. id = _this$flowEnumMemberR.id,
  28604. init = _this$flowEnumMemberR.init;
  28605. var memberName = id.name;
  28606. if (memberName === "") {
  28607. continue;
  28608. }
  28609. if (/^[a-z]/.test(memberName)) {
  28610. this.flowEnumErrorInvalidMemberName(id.start, {
  28611. enumName: enumName,
  28612. memberName: memberName
  28613. });
  28614. }
  28615. if (seenNames.has(memberName)) {
  28616. this.flowEnumErrorDuplicateMemberName(id.start, {
  28617. enumName: enumName,
  28618. memberName: memberName
  28619. });
  28620. }
  28621. seenNames.add(memberName);
  28622. var context = {
  28623. enumName: enumName,
  28624. explicitType: explicitType,
  28625. memberName: memberName
  28626. };
  28627. memberNode.id = id;
  28628. switch (init.type) {
  28629. case "boolean":
  28630. {
  28631. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean");
  28632. memberNode.init = init.value;
  28633. members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
  28634. break;
  28635. }
  28636. case "number":
  28637. {
  28638. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number");
  28639. memberNode.init = init.value;
  28640. members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
  28641. break;
  28642. }
  28643. case "string":
  28644. {
  28645. this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string");
  28646. memberNode.init = init.value;
  28647. members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
  28648. break;
  28649. }
  28650. case "invalid":
  28651. {
  28652. throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context);
  28653. }
  28654. case "none":
  28655. {
  28656. switch (explicitType) {
  28657. case "boolean":
  28658. this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context);
  28659. break;
  28660. case "number":
  28661. this.flowEnumErrorNumberMemberNotInitialized(init.pos, context);
  28662. break;
  28663. default:
  28664. members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
  28665. }
  28666. }
  28667. }
  28668. if (!this.match(types$1.braceR)) {
  28669. this.expect(types$1.comma);
  28670. }
  28671. }
  28672. return {
  28673. members: members,
  28674. hasUnknownMembers: hasUnknownMembers
  28675. };
  28676. };
  28677. _proto.flowEnumStringMembers = function flowEnumStringMembers(initializedMembers, defaultedMembers, _ref11) {
  28678. var enumName = _ref11.enumName;
  28679. if (initializedMembers.length === 0) {
  28680. return defaultedMembers;
  28681. } else if (defaultedMembers.length === 0) {
  28682. return initializedMembers;
  28683. } else if (defaultedMembers.length > initializedMembers.length) {
  28684. for (var _i2 = 0; _i2 < initializedMembers.length; _i2++) {
  28685. var member = initializedMembers[_i2];
  28686. this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, {
  28687. enumName: enumName
  28688. });
  28689. }
  28690. return defaultedMembers;
  28691. } else {
  28692. for (var _i4 = 0; _i4 < defaultedMembers.length; _i4++) {
  28693. var _member = defaultedMembers[_i4];
  28694. this.flowEnumErrorStringMemberInconsistentlyInitailized(_member.start, {
  28695. enumName: enumName
  28696. });
  28697. }
  28698. return initializedMembers;
  28699. }
  28700. };
  28701. _proto.flowEnumParseExplicitType = function flowEnumParseExplicitType(_ref12) {
  28702. var enumName = _ref12.enumName;
  28703. if (this.eatContextual("of")) {
  28704. if (!this.match(types$1.name)) {
  28705. throw this.flowEnumErrorInvalidExplicitType(this.state.start, {
  28706. enumName: enumName,
  28707. suppliedType: null
  28708. });
  28709. }
  28710. var value = this.state.value;
  28711. this.next();
  28712. if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
  28713. this.flowEnumErrorInvalidExplicitType(this.state.start, {
  28714. enumName: enumName,
  28715. suppliedType: value
  28716. });
  28717. }
  28718. return value;
  28719. }
  28720. return null;
  28721. };
  28722. _proto.flowEnumBody = function flowEnumBody(node, _ref13) {
  28723. var _this14 = this;
  28724. var enumName = _ref13.enumName,
  28725. nameLoc = _ref13.nameLoc;
  28726. var explicitType = this.flowEnumParseExplicitType({
  28727. enumName: enumName
  28728. });
  28729. this.expect(types$1.braceL);
  28730. var _this$flowEnumMembers = this.flowEnumMembers({
  28731. enumName: enumName,
  28732. explicitType: explicitType
  28733. }),
  28734. members = _this$flowEnumMembers.members,
  28735. hasUnknownMembers = _this$flowEnumMembers.hasUnknownMembers;
  28736. node.hasUnknownMembers = hasUnknownMembers;
  28737. switch (explicitType) {
  28738. case "boolean":
  28739. node.explicitType = true;
  28740. node.members = members.booleanMembers;
  28741. this.expect(types$1.braceR);
  28742. return this.finishNode(node, "EnumBooleanBody");
  28743. case "number":
  28744. node.explicitType = true;
  28745. node.members = members.numberMembers;
  28746. this.expect(types$1.braceR);
  28747. return this.finishNode(node, "EnumNumberBody");
  28748. case "string":
  28749. node.explicitType = true;
  28750. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  28751. enumName: enumName
  28752. });
  28753. this.expect(types$1.braceR);
  28754. return this.finishNode(node, "EnumStringBody");
  28755. case "symbol":
  28756. node.members = members.defaultedMembers;
  28757. this.expect(types$1.braceR);
  28758. return this.finishNode(node, "EnumSymbolBody");
  28759. default:
  28760. {
  28761. var empty = function empty() {
  28762. node.members = [];
  28763. _this14.expect(types$1.braceR);
  28764. return _this14.finishNode(node, "EnumStringBody");
  28765. };
  28766. node.explicitType = false;
  28767. var boolsLen = members.booleanMembers.length;
  28768. var numsLen = members.numberMembers.length;
  28769. var strsLen = members.stringMembers.length;
  28770. var defaultedLen = members.defaultedMembers.length;
  28771. if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
  28772. return empty();
  28773. } else if (!boolsLen && !numsLen) {
  28774. node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
  28775. enumName: enumName
  28776. });
  28777. this.expect(types$1.braceR);
  28778. return this.finishNode(node, "EnumStringBody");
  28779. } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
  28780. for (var _i6 = 0, _members$defaultedMem2 = members.defaultedMembers; _i6 < _members$defaultedMem2.length; _i6++) {
  28781. var member = _members$defaultedMem2[_i6];
  28782. this.flowEnumErrorBooleanMemberNotInitialized(member.start, {
  28783. enumName: enumName,
  28784. memberName: member.id.name
  28785. });
  28786. }
  28787. node.members = members.booleanMembers;
  28788. this.expect(types$1.braceR);
  28789. return this.finishNode(node, "EnumBooleanBody");
  28790. } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
  28791. for (var _i8 = 0, _members$defaultedMem4 = members.defaultedMembers; _i8 < _members$defaultedMem4.length; _i8++) {
  28792. var _member2 = _members$defaultedMem4[_i8];
  28793. this.flowEnumErrorNumberMemberNotInitialized(_member2.start, {
  28794. enumName: enumName,
  28795. memberName: _member2.id.name
  28796. });
  28797. }
  28798. node.members = members.numberMembers;
  28799. this.expect(types$1.braceR);
  28800. return this.finishNode(node, "EnumNumberBody");
  28801. } else {
  28802. this.flowEnumErrorInconsistentMemberValues(nameLoc, {
  28803. enumName: enumName
  28804. });
  28805. return empty();
  28806. }
  28807. }
  28808. }
  28809. };
  28810. _proto.flowParseEnumDeclaration = function flowParseEnumDeclaration(node) {
  28811. var id = this.parseIdentifier();
  28812. node.id = id;
  28813. node.body = this.flowEnumBody(this.startNode(), {
  28814. enumName: id.name,
  28815. nameLoc: id.start
  28816. });
  28817. return this.finishNode(node, "EnumDeclaration");
  28818. };
  28819. _proto.isLookaheadToken_lt = function isLookaheadToken_lt() {
  28820. var next = this.nextTokenStart();
  28821. if (this.input.charCodeAt(next) === 60) {
  28822. var afterNext = this.input.charCodeAt(next + 1);
  28823. return afterNext !== 60 && afterNext !== 61;
  28824. }
  28825. return false;
  28826. };
  28827. _proto.maybeUnwrapTypeCastExpression = function maybeUnwrapTypeCastExpression(node) {
  28828. return node.type === "TypeCastExpression" ? node.expression : node;
  28829. };
  28830. return _class2;
  28831. }(superClass);
  28832. });
  28833. var entities = {
  28834. quot: "\"",
  28835. amp: "&",
  28836. apos: "'",
  28837. lt: "<",
  28838. gt: ">",
  28839. nbsp: "\xA0",
  28840. iexcl: "\xA1",
  28841. cent: "\xA2",
  28842. pound: "\xA3",
  28843. curren: "\xA4",
  28844. yen: "\xA5",
  28845. brvbar: "\xA6",
  28846. sect: "\xA7",
  28847. uml: "\xA8",
  28848. copy: "\xA9",
  28849. ordf: "\xAA",
  28850. laquo: "\xAB",
  28851. not: "\xAC",
  28852. shy: "\xAD",
  28853. reg: "\xAE",
  28854. macr: "\xAF",
  28855. deg: "\xB0",
  28856. plusmn: "\xB1",
  28857. sup2: "\xB2",
  28858. sup3: "\xB3",
  28859. acute: "\xB4",
  28860. micro: "\xB5",
  28861. para: "\xB6",
  28862. middot: "\xB7",
  28863. cedil: "\xB8",
  28864. sup1: "\xB9",
  28865. ordm: "\xBA",
  28866. raquo: "\xBB",
  28867. frac14: "\xBC",
  28868. frac12: "\xBD",
  28869. frac34: "\xBE",
  28870. iquest: "\xBF",
  28871. Agrave: "\xC0",
  28872. Aacute: "\xC1",
  28873. Acirc: "\xC2",
  28874. Atilde: "\xC3",
  28875. Auml: "\xC4",
  28876. Aring: "\xC5",
  28877. AElig: "\xC6",
  28878. Ccedil: "\xC7",
  28879. Egrave: "\xC8",
  28880. Eacute: "\xC9",
  28881. Ecirc: "\xCA",
  28882. Euml: "\xCB",
  28883. Igrave: "\xCC",
  28884. Iacute: "\xCD",
  28885. Icirc: "\xCE",
  28886. Iuml: "\xCF",
  28887. ETH: "\xD0",
  28888. Ntilde: "\xD1",
  28889. Ograve: "\xD2",
  28890. Oacute: "\xD3",
  28891. Ocirc: "\xD4",
  28892. Otilde: "\xD5",
  28893. Ouml: "\xD6",
  28894. times: "\xD7",
  28895. Oslash: "\xD8",
  28896. Ugrave: "\xD9",
  28897. Uacute: "\xDA",
  28898. Ucirc: "\xDB",
  28899. Uuml: "\xDC",
  28900. Yacute: "\xDD",
  28901. THORN: "\xDE",
  28902. szlig: "\xDF",
  28903. agrave: "\xE0",
  28904. aacute: "\xE1",
  28905. acirc: "\xE2",
  28906. atilde: "\xE3",
  28907. auml: "\xE4",
  28908. aring: "\xE5",
  28909. aelig: "\xE6",
  28910. ccedil: "\xE7",
  28911. egrave: "\xE8",
  28912. eacute: "\xE9",
  28913. ecirc: "\xEA",
  28914. euml: "\xEB",
  28915. igrave: "\xEC",
  28916. iacute: "\xED",
  28917. icirc: "\xEE",
  28918. iuml: "\xEF",
  28919. eth: "\xF0",
  28920. ntilde: "\xF1",
  28921. ograve: "\xF2",
  28922. oacute: "\xF3",
  28923. ocirc: "\xF4",
  28924. otilde: "\xF5",
  28925. ouml: "\xF6",
  28926. divide: "\xF7",
  28927. oslash: "\xF8",
  28928. ugrave: "\xF9",
  28929. uacute: "\xFA",
  28930. ucirc: "\xFB",
  28931. uuml: "\xFC",
  28932. yacute: "\xFD",
  28933. thorn: "\xFE",
  28934. yuml: "\xFF",
  28935. OElig: "\u0152",
  28936. oelig: "\u0153",
  28937. Scaron: "\u0160",
  28938. scaron: "\u0161",
  28939. Yuml: "\u0178",
  28940. fnof: "\u0192",
  28941. circ: "\u02C6",
  28942. tilde: "\u02DC",
  28943. Alpha: "\u0391",
  28944. Beta: "\u0392",
  28945. Gamma: "\u0393",
  28946. Delta: "\u0394",
  28947. Epsilon: "\u0395",
  28948. Zeta: "\u0396",
  28949. Eta: "\u0397",
  28950. Theta: "\u0398",
  28951. Iota: "\u0399",
  28952. Kappa: "\u039A",
  28953. Lambda: "\u039B",
  28954. Mu: "\u039C",
  28955. Nu: "\u039D",
  28956. Xi: "\u039E",
  28957. Omicron: "\u039F",
  28958. Pi: "\u03A0",
  28959. Rho: "\u03A1",
  28960. Sigma: "\u03A3",
  28961. Tau: "\u03A4",
  28962. Upsilon: "\u03A5",
  28963. Phi: "\u03A6",
  28964. Chi: "\u03A7",
  28965. Psi: "\u03A8",
  28966. Omega: "\u03A9",
  28967. alpha: "\u03B1",
  28968. beta: "\u03B2",
  28969. gamma: "\u03B3",
  28970. delta: "\u03B4",
  28971. epsilon: "\u03B5",
  28972. zeta: "\u03B6",
  28973. eta: "\u03B7",
  28974. theta: "\u03B8",
  28975. iota: "\u03B9",
  28976. kappa: "\u03BA",
  28977. lambda: "\u03BB",
  28978. mu: "\u03BC",
  28979. nu: "\u03BD",
  28980. xi: "\u03BE",
  28981. omicron: "\u03BF",
  28982. pi: "\u03C0",
  28983. rho: "\u03C1",
  28984. sigmaf: "\u03C2",
  28985. sigma: "\u03C3",
  28986. tau: "\u03C4",
  28987. upsilon: "\u03C5",
  28988. phi: "\u03C6",
  28989. chi: "\u03C7",
  28990. psi: "\u03C8",
  28991. omega: "\u03C9",
  28992. thetasym: "\u03D1",
  28993. upsih: "\u03D2",
  28994. piv: "\u03D6",
  28995. ensp: "\u2002",
  28996. emsp: "\u2003",
  28997. thinsp: "\u2009",
  28998. zwnj: "\u200C",
  28999. zwj: "\u200D",
  29000. lrm: "\u200E",
  29001. rlm: "\u200F",
  29002. ndash: "\u2013",
  29003. mdash: "\u2014",
  29004. lsquo: "\u2018",
  29005. rsquo: "\u2019",
  29006. sbquo: "\u201A",
  29007. ldquo: "\u201C",
  29008. rdquo: "\u201D",
  29009. bdquo: "\u201E",
  29010. dagger: "\u2020",
  29011. Dagger: "\u2021",
  29012. bull: "\u2022",
  29013. hellip: "\u2026",
  29014. permil: "\u2030",
  29015. prime: "\u2032",
  29016. Prime: "\u2033",
  29017. lsaquo: "\u2039",
  29018. rsaquo: "\u203A",
  29019. oline: "\u203E",
  29020. frasl: "\u2044",
  29021. euro: "\u20AC",
  29022. image: "\u2111",
  29023. weierp: "\u2118",
  29024. real: "\u211C",
  29025. trade: "\u2122",
  29026. alefsym: "\u2135",
  29027. larr: "\u2190",
  29028. uarr: "\u2191",
  29029. rarr: "\u2192",
  29030. darr: "\u2193",
  29031. harr: "\u2194",
  29032. crarr: "\u21B5",
  29033. lArr: "\u21D0",
  29034. uArr: "\u21D1",
  29035. rArr: "\u21D2",
  29036. dArr: "\u21D3",
  29037. hArr: "\u21D4",
  29038. forall: "\u2200",
  29039. part: "\u2202",
  29040. exist: "\u2203",
  29041. empty: "\u2205",
  29042. nabla: "\u2207",
  29043. isin: "\u2208",
  29044. notin: "\u2209",
  29045. ni: "\u220B",
  29046. prod: "\u220F",
  29047. sum: "\u2211",
  29048. minus: "\u2212",
  29049. lowast: "\u2217",
  29050. radic: "\u221A",
  29051. prop: "\u221D",
  29052. infin: "\u221E",
  29053. ang: "\u2220",
  29054. and: "\u2227",
  29055. or: "\u2228",
  29056. cap: "\u2229",
  29057. cup: "\u222A",
  29058. "int": "\u222B",
  29059. there4: "\u2234",
  29060. sim: "\u223C",
  29061. cong: "\u2245",
  29062. asymp: "\u2248",
  29063. ne: "\u2260",
  29064. equiv: "\u2261",
  29065. le: "\u2264",
  29066. ge: "\u2265",
  29067. sub: "\u2282",
  29068. sup: "\u2283",
  29069. nsub: "\u2284",
  29070. sube: "\u2286",
  29071. supe: "\u2287",
  29072. oplus: "\u2295",
  29073. otimes: "\u2297",
  29074. perp: "\u22A5",
  29075. sdot: "\u22C5",
  29076. lceil: "\u2308",
  29077. rceil: "\u2309",
  29078. lfloor: "\u230A",
  29079. rfloor: "\u230B",
  29080. lang: "\u2329",
  29081. rang: "\u232A",
  29082. loz: "\u25CA",
  29083. spades: "\u2660",
  29084. clubs: "\u2663",
  29085. hearts: "\u2665",
  29086. diams: "\u2666"
  29087. };
  29088. var State = function () {
  29089. function State() {
  29090. this.strict = void 0;
  29091. this.curLine = void 0;
  29092. this.startLoc = void 0;
  29093. this.endLoc = void 0;
  29094. this.errors = [];
  29095. this.potentialArrowAt = -1;
  29096. this.noArrowAt = [];
  29097. this.noArrowParamsConversionAt = [];
  29098. this.maybeInArrowParameters = false;
  29099. this.inPipeline = false;
  29100. this.inType = false;
  29101. this.noAnonFunctionType = false;
  29102. this.inPropertyName = false;
  29103. this.hasFlowComment = false;
  29104. this.isAmbientContext = false;
  29105. this.inAbstractClass = false;
  29106. this.topicContext = {
  29107. maxNumOfResolvableTopics: 0,
  29108. maxTopicIndex: null
  29109. };
  29110. this.soloAwait = false;
  29111. this.inFSharpPipelineDirectBody = false;
  29112. this.labels = [];
  29113. this.decoratorStack = [[]];
  29114. this.comments = [];
  29115. this.trailingComments = [];
  29116. this.leadingComments = [];
  29117. this.commentStack = [];
  29118. this.commentPreviousNode = null;
  29119. this.pos = 0;
  29120. this.lineStart = 0;
  29121. this.type = types$1.eof;
  29122. this.value = null;
  29123. this.start = 0;
  29124. this.end = 0;
  29125. this.lastTokEndLoc = null;
  29126. this.lastTokStartLoc = null;
  29127. this.lastTokStart = 0;
  29128. this.lastTokEnd = 0;
  29129. this.context = [types.brace];
  29130. this.exprAllowed = true;
  29131. this.containsEsc = false;
  29132. this.strictErrors = new Map();
  29133. this.tokensLength = 0;
  29134. }
  29135. var _proto = State.prototype;
  29136. _proto.init = function init(options) {
  29137. this.strict = options.strictMode === false ? false : options.sourceType === "module";
  29138. this.curLine = options.startLine;
  29139. this.startLoc = this.endLoc = this.curPosition();
  29140. };
  29141. _proto.curPosition = function curPosition() {
  29142. return new Position(this.curLine, this.pos - this.lineStart);
  29143. };
  29144. _proto.clone = function clone(skipArrays) {
  29145. var state = new State();
  29146. var keys = Object.keys(this);
  29147. for (var i = 0, length = keys.length; i < length; i++) {
  29148. var key = keys[i];
  29149. var val = this[key];
  29150. if (!skipArrays && Array.isArray(val)) {
  29151. val = val.slice();
  29152. }
  29153. state[key] = val;
  29154. }
  29155. return state;
  29156. };
  29157. return State;
  29158. }();
  29159. var HEX_NUMBER = /^[\da-fA-F]+$/;
  29160. var DECIMAL_NUMBER = /^\d+$/;
  29161. var JsxErrors = makeErrorTemplates({
  29162. AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
  29163. MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
  29164. MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
  29165. UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
  29166. UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
  29167. UnterminatedJsxContent: "Unterminated JSX contents.",
  29168. UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
  29169. }, ErrorCodes.SyntaxError);
  29170. types.j_oTag = new TokContext("<tag");
  29171. types.j_cTag = new TokContext("</tag");
  29172. types.j_expr = new TokContext("<tag>...</tag>", true);
  29173. types$1.jsxName = new TokenType("jsxName");
  29174. types$1.jsxText = new TokenType("jsxText", {
  29175. beforeExpr: true
  29176. });
  29177. types$1.jsxTagStart = new TokenType("jsxTagStart", {
  29178. startsExpr: true
  29179. });
  29180. types$1.jsxTagEnd = new TokenType("jsxTagEnd");
  29181. types$1.jsxTagStart.updateContext = function (context) {
  29182. context.push(types.j_expr, types.j_oTag);
  29183. };
  29184. function isFragment(object) {
  29185. return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
  29186. }
  29187. function getQualifiedJSXName(object) {
  29188. if (object.type === "JSXIdentifier") {
  29189. return object.name;
  29190. }
  29191. if (object.type === "JSXNamespacedName") {
  29192. return object.namespace.name + ":" + object.name.name;
  29193. }
  29194. if (object.type === "JSXMemberExpression") {
  29195. return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
  29196. }
  29197. throw new Error("Node had unexpected type: " + object.type);
  29198. }
  29199. var jsx$1 = (function (superClass) {
  29200. return function (_superClass) {
  29201. _inherits(_class, _superClass);
  29202. function _class() {
  29203. return _superClass.apply(this, arguments) || this;
  29204. }
  29205. var _proto = _class.prototype;
  29206. _proto.jsxReadToken = function jsxReadToken() {
  29207. var out = "";
  29208. var chunkStart = this.state.pos;
  29209. for (;;) {
  29210. if (this.state.pos >= this.length) {
  29211. throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent);
  29212. }
  29213. var ch = this.input.charCodeAt(this.state.pos);
  29214. switch (ch) {
  29215. case 60:
  29216. case 123:
  29217. if (this.state.pos === this.state.start) {
  29218. if (ch === 60 && this.state.exprAllowed) {
  29219. ++this.state.pos;
  29220. return this.finishToken(types$1.jsxTagStart);
  29221. }
  29222. return _superClass.prototype.getTokenFromCode.call(this, ch);
  29223. }
  29224. out += this.input.slice(chunkStart, this.state.pos);
  29225. return this.finishToken(types$1.jsxText, out);
  29226. case 38:
  29227. out += this.input.slice(chunkStart, this.state.pos);
  29228. out += this.jsxReadEntity();
  29229. chunkStart = this.state.pos;
  29230. break;
  29231. case 62:
  29232. case 125:
  29233. default:
  29234. if (isNewLine(ch)) {
  29235. out += this.input.slice(chunkStart, this.state.pos);
  29236. out += this.jsxReadNewLine(true);
  29237. chunkStart = this.state.pos;
  29238. } else {
  29239. ++this.state.pos;
  29240. }
  29241. }
  29242. }
  29243. };
  29244. _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) {
  29245. var ch = this.input.charCodeAt(this.state.pos);
  29246. var out;
  29247. ++this.state.pos;
  29248. if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
  29249. ++this.state.pos;
  29250. out = normalizeCRLF ? "\n" : "\r\n";
  29251. } else {
  29252. out = String.fromCharCode(ch);
  29253. }
  29254. ++this.state.curLine;
  29255. this.state.lineStart = this.state.pos;
  29256. return out;
  29257. };
  29258. _proto.jsxReadString = function jsxReadString(quote) {
  29259. var out = "";
  29260. var chunkStart = ++this.state.pos;
  29261. for (;;) {
  29262. if (this.state.pos >= this.length) {
  29263. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  29264. }
  29265. var ch = this.input.charCodeAt(this.state.pos);
  29266. if (ch === quote) break;
  29267. if (ch === 38) {
  29268. out += this.input.slice(chunkStart, this.state.pos);
  29269. out += this.jsxReadEntity();
  29270. chunkStart = this.state.pos;
  29271. } else if (isNewLine(ch)) {
  29272. out += this.input.slice(chunkStart, this.state.pos);
  29273. out += this.jsxReadNewLine(false);
  29274. chunkStart = this.state.pos;
  29275. } else {
  29276. ++this.state.pos;
  29277. }
  29278. }
  29279. out += this.input.slice(chunkStart, this.state.pos++);
  29280. return this.finishToken(types$1.string, out);
  29281. };
  29282. _proto.jsxReadEntity = function jsxReadEntity() {
  29283. var str = "";
  29284. var count = 0;
  29285. var entity;
  29286. var ch = this.input[this.state.pos];
  29287. var startPos = ++this.state.pos;
  29288. while (this.state.pos < this.length && count++ < 10) {
  29289. ch = this.input[this.state.pos++];
  29290. if (ch === ";") {
  29291. if (str[0] === "#") {
  29292. if (str[1] === "x") {
  29293. str = str.substr(2);
  29294. if (HEX_NUMBER.test(str)) {
  29295. entity = String.fromCodePoint(parseInt(str, 16));
  29296. }
  29297. } else {
  29298. str = str.substr(1);
  29299. if (DECIMAL_NUMBER.test(str)) {
  29300. entity = String.fromCodePoint(parseInt(str, 10));
  29301. }
  29302. }
  29303. } else {
  29304. entity = entities[str];
  29305. }
  29306. break;
  29307. }
  29308. str += ch;
  29309. }
  29310. if (!entity) {
  29311. this.state.pos = startPos;
  29312. return "&";
  29313. }
  29314. return entity;
  29315. };
  29316. _proto.jsxReadWord = function jsxReadWord() {
  29317. var ch;
  29318. var start = this.state.pos;
  29319. do {
  29320. ch = this.input.charCodeAt(++this.state.pos);
  29321. } while (isIdentifierChar(ch) || ch === 45);
  29322. return this.finishToken(types$1.jsxName, this.input.slice(start, this.state.pos));
  29323. };
  29324. _proto.jsxParseIdentifier = function jsxParseIdentifier() {
  29325. var node = this.startNode();
  29326. if (this.match(types$1.jsxName)) {
  29327. node.name = this.state.value;
  29328. } else if (this.state.type.keyword) {
  29329. node.name = this.state.type.keyword;
  29330. } else {
  29331. this.unexpected();
  29332. }
  29333. this.next();
  29334. return this.finishNode(node, "JSXIdentifier");
  29335. };
  29336. _proto.jsxParseNamespacedName = function jsxParseNamespacedName() {
  29337. var startPos = this.state.start;
  29338. var startLoc = this.state.startLoc;
  29339. var name = this.jsxParseIdentifier();
  29340. if (!this.eat(types$1.colon)) return name;
  29341. var node = this.startNodeAt(startPos, startLoc);
  29342. node.namespace = name;
  29343. node.name = this.jsxParseIdentifier();
  29344. return this.finishNode(node, "JSXNamespacedName");
  29345. };
  29346. _proto.jsxParseElementName = function jsxParseElementName() {
  29347. var startPos = this.state.start;
  29348. var startLoc = this.state.startLoc;
  29349. var node = this.jsxParseNamespacedName();
  29350. if (node.type === "JSXNamespacedName") {
  29351. return node;
  29352. }
  29353. while (this.eat(types$1.dot)) {
  29354. var newNode = this.startNodeAt(startPos, startLoc);
  29355. newNode.object = node;
  29356. newNode.property = this.jsxParseIdentifier();
  29357. node = this.finishNode(newNode, "JSXMemberExpression");
  29358. }
  29359. return node;
  29360. };
  29361. _proto.jsxParseAttributeValue = function jsxParseAttributeValue() {
  29362. var node;
  29363. switch (this.state.type) {
  29364. case types$1.braceL:
  29365. node = this.startNode();
  29366. this.next();
  29367. node = this.jsxParseExpressionContainer(node);
  29368. if (node.expression.type === "JSXEmptyExpression") {
  29369. this.raise(node.start, JsxErrors.AttributeIsEmpty);
  29370. }
  29371. return node;
  29372. case types$1.jsxTagStart:
  29373. case types$1.string:
  29374. return this.parseExprAtom();
  29375. default:
  29376. throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue);
  29377. }
  29378. };
  29379. _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() {
  29380. var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
  29381. return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc);
  29382. };
  29383. _proto.jsxParseSpreadChild = function jsxParseSpreadChild(node) {
  29384. this.next();
  29385. node.expression = this.parseExpression();
  29386. this.expect(types$1.braceR);
  29387. return this.finishNode(node, "JSXSpreadChild");
  29388. };
  29389. _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer(node) {
  29390. if (this.match(types$1.braceR)) {
  29391. node.expression = this.jsxParseEmptyExpression();
  29392. } else {
  29393. var expression = this.parseExpression();
  29394. node.expression = expression;
  29395. }
  29396. this.expect(types$1.braceR);
  29397. return this.finishNode(node, "JSXExpressionContainer");
  29398. };
  29399. _proto.jsxParseAttribute = function jsxParseAttribute() {
  29400. var node = this.startNode();
  29401. if (this.eat(types$1.braceL)) {
  29402. this.expect(types$1.ellipsis);
  29403. node.argument = this.parseMaybeAssignAllowIn();
  29404. this.expect(types$1.braceR);
  29405. return this.finishNode(node, "JSXSpreadAttribute");
  29406. }
  29407. node.name = this.jsxParseNamespacedName();
  29408. node.value = this.eat(types$1.eq) ? this.jsxParseAttributeValue() : null;
  29409. return this.finishNode(node, "JSXAttribute");
  29410. };
  29411. _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) {
  29412. var node = this.startNodeAt(startPos, startLoc);
  29413. if (this.match(types$1.jsxTagEnd)) {
  29414. this.expect(types$1.jsxTagEnd);
  29415. return this.finishNode(node, "JSXOpeningFragment");
  29416. }
  29417. node.name = this.jsxParseElementName();
  29418. return this.jsxParseOpeningElementAfterName(node);
  29419. };
  29420. _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {
  29421. var attributes = [];
  29422. while (!this.match(types$1.slash) && !this.match(types$1.jsxTagEnd)) {
  29423. attributes.push(this.jsxParseAttribute());
  29424. }
  29425. node.attributes = attributes;
  29426. node.selfClosing = this.eat(types$1.slash);
  29427. this.expect(types$1.jsxTagEnd);
  29428. return this.finishNode(node, "JSXOpeningElement");
  29429. };
  29430. _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) {
  29431. var node = this.startNodeAt(startPos, startLoc);
  29432. if (this.match(types$1.jsxTagEnd)) {
  29433. this.expect(types$1.jsxTagEnd);
  29434. return this.finishNode(node, "JSXClosingFragment");
  29435. }
  29436. node.name = this.jsxParseElementName();
  29437. this.expect(types$1.jsxTagEnd);
  29438. return this.finishNode(node, "JSXClosingElement");
  29439. };
  29440. _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) {
  29441. var node = this.startNodeAt(startPos, startLoc);
  29442. var children = [];
  29443. var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
  29444. var closingElement = null;
  29445. if (!openingElement.selfClosing) {
  29446. contents: for (;;) {
  29447. switch (this.state.type) {
  29448. case types$1.jsxTagStart:
  29449. startPos = this.state.start;
  29450. startLoc = this.state.startLoc;
  29451. this.next();
  29452. if (this.eat(types$1.slash)) {
  29453. closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
  29454. break contents;
  29455. }
  29456. children.push(this.jsxParseElementAt(startPos, startLoc));
  29457. break;
  29458. case types$1.jsxText:
  29459. children.push(this.parseExprAtom());
  29460. break;
  29461. case types$1.braceL:
  29462. {
  29463. var _node = this.startNode();
  29464. this.next();
  29465. if (this.match(types$1.ellipsis)) {
  29466. children.push(this.jsxParseSpreadChild(_node));
  29467. } else {
  29468. children.push(this.jsxParseExpressionContainer(_node));
  29469. }
  29470. break;
  29471. }
  29472. default:
  29473. throw this.unexpected();
  29474. }
  29475. }
  29476. if (isFragment(openingElement) && !isFragment(closingElement)) {
  29477. this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment);
  29478. } else if (!isFragment(openingElement) && isFragment(closingElement)) {
  29479. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  29480. } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
  29481. if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
  29482. this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name));
  29483. }
  29484. }
  29485. }
  29486. if (isFragment(openingElement)) {
  29487. node.openingFragment = openingElement;
  29488. node.closingFragment = closingElement;
  29489. } else {
  29490. node.openingElement = openingElement;
  29491. node.closingElement = closingElement;
  29492. }
  29493. node.children = children;
  29494. if (this.isRelational("<")) {
  29495. throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements);
  29496. }
  29497. return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
  29498. };
  29499. _proto.jsxParseElement = function jsxParseElement() {
  29500. var startPos = this.state.start;
  29501. var startLoc = this.state.startLoc;
  29502. this.next();
  29503. return this.jsxParseElementAt(startPos, startLoc);
  29504. };
  29505. _proto.parseExprAtom = function parseExprAtom(refExpressionErrors) {
  29506. if (this.match(types$1.jsxText)) {
  29507. return this.parseLiteral(this.state.value, "JSXText");
  29508. } else if (this.match(types$1.jsxTagStart)) {
  29509. return this.jsxParseElement();
  29510. } else if (this.isRelational("<") && this.input.charCodeAt(this.state.pos) !== 33) {
  29511. this.finishToken(types$1.jsxTagStart);
  29512. return this.jsxParseElement();
  29513. } else {
  29514. return _superClass.prototype.parseExprAtom.call(this, refExpressionErrors);
  29515. }
  29516. };
  29517. _proto.createLookaheadState = function createLookaheadState(state) {
  29518. var lookaheadState = _superClass.prototype.createLookaheadState.call(this, state);
  29519. lookaheadState.inPropertyName = state.inPropertyName;
  29520. return lookaheadState;
  29521. };
  29522. _proto.getTokenFromCode = function getTokenFromCode(code) {
  29523. if (this.state.inPropertyName) return _superClass.prototype.getTokenFromCode.call(this, code);
  29524. var context = this.curContext();
  29525. if (context === types.j_expr) {
  29526. return this.jsxReadToken();
  29527. }
  29528. if (context === types.j_oTag || context === types.j_cTag) {
  29529. if (isIdentifierStart(code)) {
  29530. return this.jsxReadWord();
  29531. }
  29532. if (code === 62) {
  29533. ++this.state.pos;
  29534. return this.finishToken(types$1.jsxTagEnd);
  29535. }
  29536. if ((code === 34 || code === 39) && context === types.j_oTag) {
  29537. return this.jsxReadString(code);
  29538. }
  29539. }
  29540. if (code === 60 && this.state.exprAllowed && this.input.charCodeAt(this.state.pos + 1) !== 33) {
  29541. ++this.state.pos;
  29542. return this.finishToken(types$1.jsxTagStart);
  29543. }
  29544. return _superClass.prototype.getTokenFromCode.call(this, code);
  29545. };
  29546. _proto.updateContext = function updateContext(prevType) {
  29547. _superClass.prototype.updateContext.call(this, prevType);
  29548. var _this$state = this.state,
  29549. context = _this$state.context,
  29550. type = _this$state.type;
  29551. if (type === types$1.slash && prevType === types$1.jsxTagStart) {
  29552. context.splice(-2, 2, types.j_cTag);
  29553. this.state.exprAllowed = false;
  29554. } else if (type === types$1.jsxTagEnd) {
  29555. var out = context.pop();
  29556. if (out === types.j_oTag && prevType === types$1.slash || out === types.j_cTag) {
  29557. context.pop();
  29558. this.state.exprAllowed = context[context.length - 1] === types.j_expr;
  29559. } else {
  29560. this.state.exprAllowed = true;
  29561. }
  29562. } else if (type.keyword && (prevType === types$1.dot || prevType === types$1.questionDot)) {
  29563. this.state.exprAllowed = false;
  29564. } else {
  29565. this.state.exprAllowed = type.beforeExpr;
  29566. }
  29567. };
  29568. return _class;
  29569. }(superClass);
  29570. });
  29571. var TypeScriptScope = function (_Scope) {
  29572. _inherits(TypeScriptScope, _Scope);
  29573. function TypeScriptScope() {
  29574. var _this;
  29575. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  29576. args[_key] = arguments[_key];
  29577. }
  29578. _this = _Scope.call.apply(_Scope, [this].concat(args)) || this;
  29579. _this.types = new Set();
  29580. _this.enums = new Set();
  29581. _this.constEnums = new Set();
  29582. _this.classes = new Set();
  29583. _this.exportOnlyBindings = new Set();
  29584. return _this;
  29585. }
  29586. return TypeScriptScope;
  29587. }(Scope);
  29588. var TypeScriptScopeHandler = function (_ScopeHandler) {
  29589. _inherits(TypeScriptScopeHandler, _ScopeHandler);
  29590. function TypeScriptScopeHandler() {
  29591. return _ScopeHandler.apply(this, arguments) || this;
  29592. }
  29593. var _proto = TypeScriptScopeHandler.prototype;
  29594. _proto.createScope = function createScope(flags) {
  29595. return new TypeScriptScope(flags);
  29596. };
  29597. _proto.declareName = function declareName(name, bindingType, pos) {
  29598. var scope = this.currentScope();
  29599. if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
  29600. this.maybeExportDefined(scope, name);
  29601. scope.exportOnlyBindings.add(name);
  29602. return;
  29603. }
  29604. _ScopeHandler.prototype.declareName.apply(this, arguments);
  29605. if (bindingType & BIND_KIND_TYPE) {
  29606. if (!(bindingType & BIND_KIND_VALUE)) {
  29607. this.checkRedeclarationInScope(scope, name, bindingType, pos);
  29608. this.maybeExportDefined(scope, name);
  29609. }
  29610. scope.types.add(name);
  29611. }
  29612. if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name);
  29613. if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name);
  29614. if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name);
  29615. };
  29616. _proto.isRedeclaredInScope = function isRedeclaredInScope(scope, name, bindingType) {
  29617. if (scope.enums.has(name)) {
  29618. if (bindingType & BIND_FLAGS_TS_ENUM) {
  29619. var isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
  29620. var wasConst = scope.constEnums.has(name);
  29621. return isConst !== wasConst;
  29622. }
  29623. return true;
  29624. }
  29625. if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) {
  29626. if (scope.lexical.has(name)) {
  29627. return !!(bindingType & BIND_KIND_VALUE);
  29628. } else {
  29629. return false;
  29630. }
  29631. }
  29632. if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) {
  29633. return true;
  29634. }
  29635. return _ScopeHandler.prototype.isRedeclaredInScope.apply(this, arguments);
  29636. };
  29637. _proto.checkLocalExport = function checkLocalExport(id) {
  29638. var topLevelScope = this.scopeStack[0];
  29639. var name = id.name;
  29640. if (!topLevelScope.types.has(name) && !topLevelScope.exportOnlyBindings.has(name)) {
  29641. _ScopeHandler.prototype.checkLocalExport.call(this, id);
  29642. }
  29643. };
  29644. return TypeScriptScopeHandler;
  29645. }(ScopeHandler);
  29646. var PARAM = 0,
  29647. PARAM_YIELD = 1,
  29648. PARAM_AWAIT = 2,
  29649. PARAM_RETURN = 4,
  29650. PARAM_IN = 8;
  29651. var ProductionParameterHandler = function () {
  29652. function ProductionParameterHandler() {
  29653. this.stacks = [];
  29654. }
  29655. var _proto = ProductionParameterHandler.prototype;
  29656. _proto.enter = function enter(flags) {
  29657. this.stacks.push(flags);
  29658. };
  29659. _proto.exit = function exit() {
  29660. this.stacks.pop();
  29661. };
  29662. _proto.currentFlags = function currentFlags() {
  29663. return this.stacks[this.stacks.length - 1];
  29664. };
  29665. _createClass(ProductionParameterHandler, [{
  29666. key: "hasAwait",
  29667. get: function get() {
  29668. return (this.currentFlags() & PARAM_AWAIT) > 0;
  29669. }
  29670. }, {
  29671. key: "hasYield",
  29672. get: function get() {
  29673. return (this.currentFlags() & PARAM_YIELD) > 0;
  29674. }
  29675. }, {
  29676. key: "hasReturn",
  29677. get: function get() {
  29678. return (this.currentFlags() & PARAM_RETURN) > 0;
  29679. }
  29680. }, {
  29681. key: "hasIn",
  29682. get: function get() {
  29683. return (this.currentFlags() & PARAM_IN) > 0;
  29684. }
  29685. }]);
  29686. return ProductionParameterHandler;
  29687. }();
  29688. function functionFlags(isAsync, isGenerator) {
  29689. return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
  29690. }
  29691. function nonNull(x) {
  29692. if (x == null) {
  29693. throw new Error("Unexpected " + x + " value.");
  29694. }
  29695. return x;
  29696. }
  29697. function assert(x) {
  29698. if (!x) {
  29699. throw new Error("Assert fail");
  29700. }
  29701. }
  29702. var TSErrors = makeErrorTemplates({
  29703. AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
  29704. AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
  29705. AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
  29706. ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
  29707. ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
  29708. ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
  29709. DeclareAccessor: "'declare' is not allowed in %0ters.",
  29710. DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
  29711. DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
  29712. DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
  29713. DuplicateModifier: "Duplicate modifier: '%0'.",
  29714. EmptyHeritageClauseType: "'%0' list cannot be empty.",
  29715. EmptyTypeArguments: "Type argument list cannot be empty.",
  29716. EmptyTypeParameters: "Type parameter list cannot be empty.",
  29717. ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
  29718. ImportAliasHasImportType: "An import alias can not use 'import type'.",
  29719. IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
  29720. IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
  29721. IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
  29722. IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
  29723. IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
  29724. IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
  29725. InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
  29726. InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
  29727. InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
  29728. MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
  29729. NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
  29730. NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
  29731. OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
  29732. OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
  29733. PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
  29734. PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
  29735. PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
  29736. ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
  29737. SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
  29738. SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
  29739. SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
  29740. StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
  29741. TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
  29742. TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
  29743. UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
  29744. UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
  29745. UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
  29746. UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
  29747. UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
  29748. UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
  29749. UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
  29750. }, ErrorCodes.SyntaxError);
  29751. function keywordTypeFromName(value) {
  29752. switch (value) {
  29753. case "any":
  29754. return "TSAnyKeyword";
  29755. case "boolean":
  29756. return "TSBooleanKeyword";
  29757. case "bigint":
  29758. return "TSBigIntKeyword";
  29759. case "never":
  29760. return "TSNeverKeyword";
  29761. case "number":
  29762. return "TSNumberKeyword";
  29763. case "object":
  29764. return "TSObjectKeyword";
  29765. case "string":
  29766. return "TSStringKeyword";
  29767. case "symbol":
  29768. return "TSSymbolKeyword";
  29769. case "undefined":
  29770. return "TSUndefinedKeyword";
  29771. case "unknown":
  29772. return "TSUnknownKeyword";
  29773. default:
  29774. return undefined;
  29775. }
  29776. }
  29777. function tsIsAccessModifier(modifier) {
  29778. return modifier === "private" || modifier === "public" || modifier === "protected";
  29779. }
  29780. var typescript = (function (superClass) {
  29781. return function (_superClass) {
  29782. _inherits(_class, _superClass);
  29783. function _class() {
  29784. return _superClass.apply(this, arguments) || this;
  29785. }
  29786. var _proto = _class.prototype;
  29787. _proto.getScopeHandler = function getScopeHandler() {
  29788. return TypeScriptScopeHandler;
  29789. };
  29790. _proto.tsIsIdentifier = function tsIsIdentifier() {
  29791. return this.match(types$1.name);
  29792. };
  29793. _proto.tsTokenCanFollowModifier = function tsTokenCanFollowModifier() {
  29794. return (this.match(types$1.bracketL) || this.match(types$1.braceL) || this.match(types$1.star) || this.match(types$1.ellipsis) || this.match(types$1.privateName) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
  29795. };
  29796. _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() {
  29797. this.next();
  29798. return this.tsTokenCanFollowModifier();
  29799. };
  29800. _proto.tsParseModifier = function tsParseModifier(allowedModifiers) {
  29801. if (!this.match(types$1.name)) {
  29802. return undefined;
  29803. }
  29804. var modifier = this.state.value;
  29805. if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
  29806. return modifier;
  29807. }
  29808. return undefined;
  29809. };
  29810. _proto.tsParseModifiers = function tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate) {
  29811. var _this = this;
  29812. var enforceOrder = function enforceOrder(pos, modifier, before, after) {
  29813. if (modifier === before && modified[after]) {
  29814. _this.raise(pos, TSErrors.InvalidModifiersOrder, before, after);
  29815. }
  29816. };
  29817. var incompatible = function incompatible(pos, modifier, mod1, mod2) {
  29818. if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
  29819. _this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2);
  29820. }
  29821. };
  29822. for (;;) {
  29823. var startPos = this.state.start;
  29824. var modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []));
  29825. if (!modifier) break;
  29826. if (tsIsAccessModifier(modifier)) {
  29827. if (modified.accessibility) {
  29828. this.raise(startPos, TSErrors.DuplicateAccessibilityModifier);
  29829. } else {
  29830. enforceOrder(startPos, modifier, modifier, "override");
  29831. enforceOrder(startPos, modifier, modifier, "static");
  29832. enforceOrder(startPos, modifier, modifier, "readonly");
  29833. modified.accessibility = modifier;
  29834. }
  29835. } else {
  29836. if (Object.hasOwnProperty.call(modified, modifier)) {
  29837. this.raise(startPos, TSErrors.DuplicateModifier, modifier);
  29838. } else {
  29839. enforceOrder(startPos, modifier, "static", "readonly");
  29840. enforceOrder(startPos, modifier, "static", "override");
  29841. enforceOrder(startPos, modifier, "override", "readonly");
  29842. enforceOrder(startPos, modifier, "abstract", "override");
  29843. incompatible(startPos, modifier, "declare", "override");
  29844. incompatible(startPos, modifier, "static", "abstract");
  29845. }
  29846. modified[modifier] = true;
  29847. }
  29848. if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
  29849. this.raise(startPos, errorTemplate, modifier);
  29850. }
  29851. }
  29852. };
  29853. _proto.tsIsListTerminator = function tsIsListTerminator(kind) {
  29854. switch (kind) {
  29855. case "EnumMembers":
  29856. case "TypeMembers":
  29857. return this.match(types$1.braceR);
  29858. case "HeritageClauseElement":
  29859. return this.match(types$1.braceL);
  29860. case "TupleElementTypes":
  29861. return this.match(types$1.bracketR);
  29862. case "TypeParametersOrArguments":
  29863. return this.isRelational(">");
  29864. }
  29865. throw new Error("Unreachable");
  29866. };
  29867. _proto.tsParseList = function tsParseList(kind, parseElement) {
  29868. var result = [];
  29869. while (!this.tsIsListTerminator(kind)) {
  29870. result.push(parseElement());
  29871. }
  29872. return result;
  29873. };
  29874. _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) {
  29875. return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));
  29876. };
  29877. _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {
  29878. var result = [];
  29879. for (;;) {
  29880. if (this.tsIsListTerminator(kind)) {
  29881. break;
  29882. }
  29883. var element = parseElement();
  29884. if (element == null) {
  29885. return undefined;
  29886. }
  29887. result.push(element);
  29888. if (this.eat(types$1.comma)) {
  29889. continue;
  29890. }
  29891. if (this.tsIsListTerminator(kind)) {
  29892. break;
  29893. }
  29894. if (expectSuccess) {
  29895. this.expect(types$1.comma);
  29896. }
  29897. return undefined;
  29898. }
  29899. return result;
  29900. };
  29901. _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {
  29902. if (!skipFirstToken) {
  29903. if (bracket) {
  29904. this.expect(types$1.bracketL);
  29905. } else {
  29906. this.expectRelational("<");
  29907. }
  29908. }
  29909. var result = this.tsParseDelimitedList(kind, parseElement);
  29910. if (bracket) {
  29911. this.expect(types$1.bracketR);
  29912. } else {
  29913. this.expectRelational(">");
  29914. }
  29915. return result;
  29916. };
  29917. _proto.tsParseImportType = function tsParseImportType() {
  29918. var node = this.startNode();
  29919. this.expect(types$1._import);
  29920. this.expect(types$1.parenL);
  29921. if (!this.match(types$1.string)) {
  29922. this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument);
  29923. }
  29924. node.argument = this.parseExprAtom();
  29925. this.expect(types$1.parenR);
  29926. if (this.eat(types$1.dot)) {
  29927. node.qualifier = this.tsParseEntityName(true);
  29928. }
  29929. if (this.isRelational("<")) {
  29930. node.typeParameters = this.tsParseTypeArguments();
  29931. }
  29932. return this.finishNode(node, "TSImportType");
  29933. };
  29934. _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) {
  29935. var entity = this.parseIdentifier();
  29936. while (this.eat(types$1.dot)) {
  29937. var node = this.startNodeAtNode(entity);
  29938. node.left = entity;
  29939. node.right = this.parseIdentifier(allowReservedWords);
  29940. entity = this.finishNode(node, "TSQualifiedName");
  29941. }
  29942. return entity;
  29943. };
  29944. _proto.tsParseTypeReference = function tsParseTypeReference() {
  29945. var node = this.startNode();
  29946. node.typeName = this.tsParseEntityName(false);
  29947. if (!this.hasPrecedingLineBreak() && this.isRelational("<")) {
  29948. node.typeParameters = this.tsParseTypeArguments();
  29949. }
  29950. return this.finishNode(node, "TSTypeReference");
  29951. };
  29952. _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) {
  29953. this.next();
  29954. var node = this.startNodeAtNode(lhs);
  29955. node.parameterName = lhs;
  29956. node.typeAnnotation = this.tsParseTypeAnnotation(false);
  29957. node.asserts = false;
  29958. return this.finishNode(node, "TSTypePredicate");
  29959. };
  29960. _proto.tsParseThisTypeNode = function tsParseThisTypeNode() {
  29961. var node = this.startNode();
  29962. this.next();
  29963. return this.finishNode(node, "TSThisType");
  29964. };
  29965. _proto.tsParseTypeQuery = function tsParseTypeQuery() {
  29966. var node = this.startNode();
  29967. this.expect(types$1._typeof);
  29968. if (this.match(types$1._import)) {
  29969. node.exprName = this.tsParseImportType();
  29970. } else {
  29971. node.exprName = this.tsParseEntityName(true);
  29972. }
  29973. return this.finishNode(node, "TSTypeQuery");
  29974. };
  29975. _proto.tsParseTypeParameter = function tsParseTypeParameter() {
  29976. var node = this.startNode();
  29977. node.name = this.parseIdentifierName(node.start);
  29978. node.constraint = this.tsEatThenParseType(types$1._extends);
  29979. node["default"] = this.tsEatThenParseType(types$1.eq);
  29980. return this.finishNode(node, "TSTypeParameter");
  29981. };
  29982. _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() {
  29983. if (this.isRelational("<")) {
  29984. return this.tsParseTypeParameters();
  29985. }
  29986. };
  29987. _proto.tsParseTypeParameters = function tsParseTypeParameters() {
  29988. var node = this.startNode();
  29989. if (this.isRelational("<") || this.match(types$1.jsxTagStart)) {
  29990. this.next();
  29991. } else {
  29992. this.unexpected();
  29993. }
  29994. node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true);
  29995. if (node.params.length === 0) {
  29996. this.raise(node.start, TSErrors.EmptyTypeParameters);
  29997. }
  29998. return this.finishNode(node, "TSTypeParameterDeclaration");
  29999. };
  30000. _proto.tsTryNextParseConstantContext = function tsTryNextParseConstantContext() {
  30001. if (this.lookahead().type === types$1._const) {
  30002. this.next();
  30003. return this.tsParseTypeReference();
  30004. }
  30005. return null;
  30006. };
  30007. _proto.tsFillSignature = function tsFillSignature(returnToken, signature) {
  30008. var returnTokenRequired = returnToken === types$1.arrow;
  30009. signature.typeParameters = this.tsTryParseTypeParameters();
  30010. this.expect(types$1.parenL);
  30011. signature.parameters = this.tsParseBindingListForSignature();
  30012. if (returnTokenRequired) {
  30013. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  30014. } else if (this.match(returnToken)) {
  30015. signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
  30016. }
  30017. };
  30018. _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() {
  30019. var _this2 = this;
  30020. return this.parseBindingList(types$1.parenR, 41).map(function (pattern) {
  30021. if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
  30022. _this2.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type);
  30023. }
  30024. return pattern;
  30025. });
  30026. };
  30027. _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() {
  30028. if (!this.eat(types$1.comma) && !this.isLineTerminator()) {
  30029. this.expect(types$1.semi);
  30030. }
  30031. };
  30032. _proto.tsParseSignatureMember = function tsParseSignatureMember(kind, node) {
  30033. this.tsFillSignature(types$1.colon, node);
  30034. this.tsParseTypeMemberSemicolon();
  30035. return this.finishNode(node, kind);
  30036. };
  30037. _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() {
  30038. this.next();
  30039. return this.eat(types$1.name) && this.match(types$1.colon);
  30040. };
  30041. _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) {
  30042. if (!(this.match(types$1.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
  30043. return undefined;
  30044. }
  30045. this.expect(types$1.bracketL);
  30046. var id = this.parseIdentifier();
  30047. id.typeAnnotation = this.tsParseTypeAnnotation();
  30048. this.resetEndLocation(id);
  30049. this.expect(types$1.bracketR);
  30050. node.parameters = [id];
  30051. var type = this.tsTryParseTypeAnnotation();
  30052. if (type) node.typeAnnotation = type;
  30053. this.tsParseTypeMemberSemicolon();
  30054. return this.finishNode(node, "TSIndexSignature");
  30055. };
  30056. _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) {
  30057. if (this.eat(types$1.question)) node.optional = true;
  30058. var nodeAny = node;
  30059. if (this.match(types$1.parenL) || this.isRelational("<")) {
  30060. if (readonly) {
  30061. this.raise(node.start, TSErrors.ReadonlyForMethodSignature);
  30062. }
  30063. var method = nodeAny;
  30064. if (method.kind && this.isRelational("<")) {
  30065. this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters);
  30066. }
  30067. this.tsFillSignature(types$1.colon, method);
  30068. this.tsParseTypeMemberSemicolon();
  30069. if (method.kind === "get") {
  30070. if (method.parameters.length > 0) {
  30071. this.raise(this.state.pos, ErrorMessages.BadGetterArity);
  30072. if (this.isThisParam(method.parameters[0])) {
  30073. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  30074. }
  30075. }
  30076. } else if (method.kind === "set") {
  30077. if (method.parameters.length !== 1) {
  30078. this.raise(this.state.pos, ErrorMessages.BadSetterArity);
  30079. } else {
  30080. var firstParameter = method.parameters[0];
  30081. if (this.isThisParam(firstParameter)) {
  30082. this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter);
  30083. }
  30084. if (firstParameter.type === "Identifier" && firstParameter.optional) {
  30085. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter);
  30086. }
  30087. if (firstParameter.type === "RestElement") {
  30088. this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter);
  30089. }
  30090. }
  30091. if (method.typeAnnotation) {
  30092. this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType);
  30093. }
  30094. } else {
  30095. method.kind = "method";
  30096. }
  30097. return this.finishNode(method, "TSMethodSignature");
  30098. } else {
  30099. var property = nodeAny;
  30100. if (readonly) property.readonly = true;
  30101. var type = this.tsTryParseTypeAnnotation();
  30102. if (type) property.typeAnnotation = type;
  30103. this.tsParseTypeMemberSemicolon();
  30104. return this.finishNode(property, "TSPropertySignature");
  30105. }
  30106. };
  30107. _proto.tsParseTypeMember = function tsParseTypeMember() {
  30108. var node = this.startNode();
  30109. if (this.match(types$1.parenL) || this.isRelational("<")) {
  30110. return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
  30111. }
  30112. if (this.match(types$1._new)) {
  30113. var id = this.startNode();
  30114. this.next();
  30115. if (this.match(types$1.parenL) || this.isRelational("<")) {
  30116. return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
  30117. } else {
  30118. node.key = this.createIdentifier(id, "new");
  30119. return this.tsParsePropertyOrMethodSignature(node, false);
  30120. }
  30121. }
  30122. this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
  30123. var idx = this.tsTryParseIndexSignature(node);
  30124. if (idx) {
  30125. return idx;
  30126. }
  30127. this.parsePropertyName(node, false);
  30128. if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
  30129. node.kind = node.key.name;
  30130. this.parsePropertyName(node, false);
  30131. }
  30132. return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
  30133. };
  30134. _proto.tsParseTypeLiteral = function tsParseTypeLiteral() {
  30135. var node = this.startNode();
  30136. node.members = this.tsParseObjectTypeMembers();
  30137. return this.finishNode(node, "TSTypeLiteral");
  30138. };
  30139. _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() {
  30140. this.expect(types$1.braceL);
  30141. var members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
  30142. this.expect(types$1.braceR);
  30143. return members;
  30144. };
  30145. _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() {
  30146. this.next();
  30147. if (this.eat(types$1.plusMin)) {
  30148. return this.isContextual("readonly");
  30149. }
  30150. if (this.isContextual("readonly")) {
  30151. this.next();
  30152. }
  30153. if (!this.match(types$1.bracketL)) {
  30154. return false;
  30155. }
  30156. this.next();
  30157. if (!this.tsIsIdentifier()) {
  30158. return false;
  30159. }
  30160. this.next();
  30161. return this.match(types$1._in);
  30162. };
  30163. _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() {
  30164. var node = this.startNode();
  30165. node.name = this.parseIdentifierName(node.start);
  30166. node.constraint = this.tsExpectThenParseType(types$1._in);
  30167. return this.finishNode(node, "TSTypeParameter");
  30168. };
  30169. _proto.tsParseMappedType = function tsParseMappedType() {
  30170. var node = this.startNode();
  30171. this.expect(types$1.braceL);
  30172. if (this.match(types$1.plusMin)) {
  30173. node.readonly = this.state.value;
  30174. this.next();
  30175. this.expectContextual("readonly");
  30176. } else if (this.eatContextual("readonly")) {
  30177. node.readonly = true;
  30178. }
  30179. this.expect(types$1.bracketL);
  30180. node.typeParameter = this.tsParseMappedTypeParameter();
  30181. node.nameType = this.eatContextual("as") ? this.tsParseType() : null;
  30182. this.expect(types$1.bracketR);
  30183. if (this.match(types$1.plusMin)) {
  30184. node.optional = this.state.value;
  30185. this.next();
  30186. this.expect(types$1.question);
  30187. } else if (this.eat(types$1.question)) {
  30188. node.optional = true;
  30189. }
  30190. node.typeAnnotation = this.tsTryParseType();
  30191. this.semicolon();
  30192. this.expect(types$1.braceR);
  30193. return this.finishNode(node, "TSMappedType");
  30194. };
  30195. _proto.tsParseTupleType = function tsParseTupleType() {
  30196. var _this3 = this;
  30197. var node = this.startNode();
  30198. node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
  30199. var seenOptionalElement = false;
  30200. var labeledElements = null;
  30201. node.elementTypes.forEach(function (elementNode) {
  30202. var _labeledElements;
  30203. var _elementNode = elementNode,
  30204. type = _elementNode.type;
  30205. if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
  30206. _this3.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired);
  30207. }
  30208. seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
  30209. if (type === "TSRestType") {
  30210. elementNode = elementNode.typeAnnotation;
  30211. type = elementNode.type;
  30212. }
  30213. var isLabeled = type === "TSNamedTupleMember";
  30214. labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
  30215. if (labeledElements !== isLabeled) {
  30216. _this3.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements);
  30217. }
  30218. });
  30219. return this.finishNode(node, "TSTupleType");
  30220. };
  30221. _proto.tsParseTupleElementType = function tsParseTupleElementType() {
  30222. var _this$state = this.state,
  30223. startPos = _this$state.start,
  30224. startLoc = _this$state.startLoc;
  30225. var rest = this.eat(types$1.ellipsis);
  30226. var type = this.tsParseType();
  30227. var optional = this.eat(types$1.question);
  30228. var labeled = this.eat(types$1.colon);
  30229. if (labeled) {
  30230. var labeledNode = this.startNodeAtNode(type);
  30231. labeledNode.optional = optional;
  30232. if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
  30233. labeledNode.label = type.typeName;
  30234. } else {
  30235. this.raise(type.start, TSErrors.InvalidTupleMemberLabel);
  30236. labeledNode.label = type;
  30237. }
  30238. labeledNode.elementType = this.tsParseType();
  30239. type = this.finishNode(labeledNode, "TSNamedTupleMember");
  30240. } else if (optional) {
  30241. var optionalTypeNode = this.startNodeAtNode(type);
  30242. optionalTypeNode.typeAnnotation = type;
  30243. type = this.finishNode(optionalTypeNode, "TSOptionalType");
  30244. }
  30245. if (rest) {
  30246. var restNode = this.startNodeAt(startPos, startLoc);
  30247. restNode.typeAnnotation = type;
  30248. type = this.finishNode(restNode, "TSRestType");
  30249. }
  30250. return type;
  30251. };
  30252. _proto.tsParseParenthesizedType = function tsParseParenthesizedType() {
  30253. var node = this.startNode();
  30254. this.expect(types$1.parenL);
  30255. node.typeAnnotation = this.tsParseType();
  30256. this.expect(types$1.parenR);
  30257. return this.finishNode(node, "TSParenthesizedType");
  30258. };
  30259. _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type, _abstract) {
  30260. var node = this.startNode();
  30261. if (type === "TSConstructorType") {
  30262. node["abstract"] = !!_abstract;
  30263. if (_abstract) this.next();
  30264. this.next();
  30265. }
  30266. this.tsFillSignature(types$1.arrow, node);
  30267. return this.finishNode(node, type);
  30268. };
  30269. _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() {
  30270. var _this4 = this;
  30271. var node = this.startNode();
  30272. node.literal = function () {
  30273. switch (_this4.state.type) {
  30274. case types$1.num:
  30275. case types$1.bigint:
  30276. case types$1.string:
  30277. case types$1._true:
  30278. case types$1._false:
  30279. return _this4.parseExprAtom();
  30280. default:
  30281. throw _this4.unexpected();
  30282. }
  30283. }();
  30284. return this.finishNode(node, "TSLiteralType");
  30285. };
  30286. _proto.tsParseTemplateLiteralType = function tsParseTemplateLiteralType() {
  30287. var node = this.startNode();
  30288. node.literal = this.parseTemplate(false);
  30289. return this.finishNode(node, "TSLiteralType");
  30290. };
  30291. _proto.parseTemplateSubstitution = function parseTemplateSubstitution() {
  30292. if (this.state.inType) return this.tsParseType();
  30293. return _superClass.prototype.parseTemplateSubstitution.call(this);
  30294. };
  30295. _proto.tsParseThisTypeOrThisTypePredicate = function tsParseThisTypeOrThisTypePredicate() {
  30296. var thisKeyword = this.tsParseThisTypeNode();
  30297. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  30298. return this.tsParseThisTypePredicate(thisKeyword);
  30299. } else {
  30300. return thisKeyword;
  30301. }
  30302. };
  30303. _proto.tsParseNonArrayType = function tsParseNonArrayType() {
  30304. switch (this.state.type) {
  30305. case types$1.name:
  30306. case types$1._void:
  30307. case types$1._null:
  30308. {
  30309. var type = this.match(types$1._void) ? "TSVoidKeyword" : this.match(types$1._null) ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
  30310. if (type !== undefined && this.lookaheadCharCode() !== 46) {
  30311. var node = this.startNode();
  30312. this.next();
  30313. return this.finishNode(node, type);
  30314. }
  30315. return this.tsParseTypeReference();
  30316. }
  30317. case types$1.string:
  30318. case types$1.num:
  30319. case types$1.bigint:
  30320. case types$1._true:
  30321. case types$1._false:
  30322. return this.tsParseLiteralTypeNode();
  30323. case types$1.plusMin:
  30324. if (this.state.value === "-") {
  30325. var _node = this.startNode();
  30326. var nextToken = this.lookahead();
  30327. if (nextToken.type !== types$1.num && nextToken.type !== types$1.bigint) {
  30328. throw this.unexpected();
  30329. }
  30330. _node.literal = this.parseMaybeUnary();
  30331. return this.finishNode(_node, "TSLiteralType");
  30332. }
  30333. break;
  30334. case types$1._this:
  30335. return this.tsParseThisTypeOrThisTypePredicate();
  30336. case types$1._typeof:
  30337. return this.tsParseTypeQuery();
  30338. case types$1._import:
  30339. return this.tsParseImportType();
  30340. case types$1.braceL:
  30341. return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
  30342. case types$1.bracketL:
  30343. return this.tsParseTupleType();
  30344. case types$1.parenL:
  30345. return this.tsParseParenthesizedType();
  30346. case types$1.backQuote:
  30347. return this.tsParseTemplateLiteralType();
  30348. }
  30349. throw this.unexpected();
  30350. };
  30351. _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() {
  30352. var type = this.tsParseNonArrayType();
  30353. while (!this.hasPrecedingLineBreak() && this.eat(types$1.bracketL)) {
  30354. if (this.match(types$1.bracketR)) {
  30355. var node = this.startNodeAtNode(type);
  30356. node.elementType = type;
  30357. this.expect(types$1.bracketR);
  30358. type = this.finishNode(node, "TSArrayType");
  30359. } else {
  30360. var _node2 = this.startNodeAtNode(type);
  30361. _node2.objectType = type;
  30362. _node2.indexType = this.tsParseType();
  30363. this.expect(types$1.bracketR);
  30364. type = this.finishNode(_node2, "TSIndexedAccessType");
  30365. }
  30366. }
  30367. return type;
  30368. };
  30369. _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) {
  30370. var node = this.startNode();
  30371. this.expectContextual(operator);
  30372. node.operator = operator;
  30373. node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
  30374. if (operator === "readonly") {
  30375. this.tsCheckTypeAnnotationForReadOnly(node);
  30376. }
  30377. return this.finishNode(node, "TSTypeOperator");
  30378. };
  30379. _proto.tsCheckTypeAnnotationForReadOnly = function tsCheckTypeAnnotationForReadOnly(node) {
  30380. switch (node.typeAnnotation.type) {
  30381. case "TSTupleType":
  30382. case "TSArrayType":
  30383. return;
  30384. default:
  30385. this.raise(node.start, TSErrors.UnexpectedReadonly);
  30386. }
  30387. };
  30388. _proto.tsParseInferType = function tsParseInferType() {
  30389. var node = this.startNode();
  30390. this.expectContextual("infer");
  30391. var typeParameter = this.startNode();
  30392. typeParameter.name = this.parseIdentifierName(typeParameter.start);
  30393. node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
  30394. return this.finishNode(node, "TSInferType");
  30395. };
  30396. _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() {
  30397. var _this5 = this;
  30398. var operator = ["keyof", "unique", "readonly"].find(function (kw) {
  30399. return _this5.isContextual(kw);
  30400. });
  30401. return operator ? this.tsParseTypeOperator(operator) : this.isContextual("infer") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
  30402. };
  30403. _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
  30404. var node = this.startNode();
  30405. var hasLeadingOperator = this.eat(operator);
  30406. var types = [];
  30407. do {
  30408. types.push(parseConstituentType());
  30409. } while (this.eat(operator));
  30410. if (types.length === 1 && !hasLeadingOperator) {
  30411. return types[0];
  30412. }
  30413. node.types = types;
  30414. return this.finishNode(node, kind);
  30415. };
  30416. _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() {
  30417. return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), types$1.bitwiseAND);
  30418. };
  30419. _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() {
  30420. return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), types$1.bitwiseOR);
  30421. };
  30422. _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() {
  30423. if (this.isRelational("<")) {
  30424. return true;
  30425. }
  30426. return this.match(types$1.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
  30427. };
  30428. _proto.tsSkipParameterStart = function tsSkipParameterStart() {
  30429. if (this.match(types$1.name) || this.match(types$1._this)) {
  30430. this.next();
  30431. return true;
  30432. }
  30433. if (this.match(types$1.braceL)) {
  30434. var braceStackCounter = 1;
  30435. this.next();
  30436. while (braceStackCounter > 0) {
  30437. if (this.match(types$1.braceL)) {
  30438. ++braceStackCounter;
  30439. } else if (this.match(types$1.braceR)) {
  30440. --braceStackCounter;
  30441. }
  30442. this.next();
  30443. }
  30444. return true;
  30445. }
  30446. if (this.match(types$1.bracketL)) {
  30447. var _braceStackCounter = 1;
  30448. this.next();
  30449. while (_braceStackCounter > 0) {
  30450. if (this.match(types$1.bracketL)) {
  30451. ++_braceStackCounter;
  30452. } else if (this.match(types$1.bracketR)) {
  30453. --_braceStackCounter;
  30454. }
  30455. this.next();
  30456. }
  30457. return true;
  30458. }
  30459. return false;
  30460. };
  30461. _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() {
  30462. this.next();
  30463. if (this.match(types$1.parenR) || this.match(types$1.ellipsis)) {
  30464. return true;
  30465. }
  30466. if (this.tsSkipParameterStart()) {
  30467. if (this.match(types$1.colon) || this.match(types$1.comma) || this.match(types$1.question) || this.match(types$1.eq)) {
  30468. return true;
  30469. }
  30470. if (this.match(types$1.parenR)) {
  30471. this.next();
  30472. if (this.match(types$1.arrow)) {
  30473. return true;
  30474. }
  30475. }
  30476. }
  30477. return false;
  30478. };
  30479. _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) {
  30480. var _this6 = this;
  30481. return this.tsInType(function () {
  30482. var t = _this6.startNode();
  30483. _this6.expect(returnToken);
  30484. var node = _this6.startNode();
  30485. var asserts = !!_this6.tsTryParse(_this6.tsParseTypePredicateAsserts.bind(_this6));
  30486. if (asserts && _this6.match(types$1._this)) {
  30487. var thisTypePredicate = _this6.tsParseThisTypeOrThisTypePredicate();
  30488. if (thisTypePredicate.type === "TSThisType") {
  30489. node.parameterName = thisTypePredicate;
  30490. node.asserts = true;
  30491. node.typeAnnotation = null;
  30492. thisTypePredicate = _this6.finishNode(node, "TSTypePredicate");
  30493. } else {
  30494. _this6.resetStartLocationFromNode(thisTypePredicate, node);
  30495. thisTypePredicate.asserts = true;
  30496. }
  30497. t.typeAnnotation = thisTypePredicate;
  30498. return _this6.finishNode(t, "TSTypeAnnotation");
  30499. }
  30500. var typePredicateVariable = _this6.tsIsIdentifier() && _this6.tsTryParse(_this6.tsParseTypePredicatePrefix.bind(_this6));
  30501. if (!typePredicateVariable) {
  30502. if (!asserts) {
  30503. return _this6.tsParseTypeAnnotation(false, t);
  30504. }
  30505. node.parameterName = _this6.parseIdentifier();
  30506. node.asserts = asserts;
  30507. node.typeAnnotation = null;
  30508. t.typeAnnotation = _this6.finishNode(node, "TSTypePredicate");
  30509. return _this6.finishNode(t, "TSTypeAnnotation");
  30510. }
  30511. var type = _this6.tsParseTypeAnnotation(false);
  30512. node.parameterName = typePredicateVariable;
  30513. node.typeAnnotation = type;
  30514. node.asserts = asserts;
  30515. t.typeAnnotation = _this6.finishNode(node, "TSTypePredicate");
  30516. return _this6.finishNode(t, "TSTypeAnnotation");
  30517. });
  30518. };
  30519. _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() {
  30520. return this.match(types$1.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types$1.colon) : undefined;
  30521. };
  30522. _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() {
  30523. return this.match(types$1.colon) ? this.tsParseTypeAnnotation() : undefined;
  30524. };
  30525. _proto.tsTryParseType = function tsTryParseType() {
  30526. return this.tsEatThenParseType(types$1.colon);
  30527. };
  30528. _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() {
  30529. var id = this.parseIdentifier();
  30530. if (this.isContextual("is") && !this.hasPrecedingLineBreak()) {
  30531. this.next();
  30532. return id;
  30533. }
  30534. };
  30535. _proto.tsParseTypePredicateAsserts = function tsParseTypePredicateAsserts() {
  30536. if (!this.match(types$1.name) || this.state.value !== "asserts" || this.hasPrecedingLineBreak()) {
  30537. return false;
  30538. }
  30539. var containsEsc = this.state.containsEsc;
  30540. this.next();
  30541. if (!this.match(types$1.name) && !this.match(types$1._this)) {
  30542. return false;
  30543. }
  30544. if (containsEsc) {
  30545. this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts");
  30546. }
  30547. return true;
  30548. };
  30549. _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) {
  30550. var _this7 = this;
  30551. if (eatColon === void 0) {
  30552. eatColon = true;
  30553. }
  30554. if (t === void 0) {
  30555. t = this.startNode();
  30556. }
  30557. this.tsInType(function () {
  30558. if (eatColon) _this7.expect(types$1.colon);
  30559. t.typeAnnotation = _this7.tsParseType();
  30560. });
  30561. return this.finishNode(t, "TSTypeAnnotation");
  30562. };
  30563. _proto.tsParseType = function tsParseType() {
  30564. assert(this.state.inType);
  30565. var type = this.tsParseNonConditionalType();
  30566. if (this.hasPrecedingLineBreak() || !this.eat(types$1._extends)) {
  30567. return type;
  30568. }
  30569. var node = this.startNodeAtNode(type);
  30570. node.checkType = type;
  30571. node.extendsType = this.tsParseNonConditionalType();
  30572. this.expect(types$1.question);
  30573. node.trueType = this.tsParseType();
  30574. this.expect(types$1.colon);
  30575. node.falseType = this.tsParseType();
  30576. return this.finishNode(node, "TSConditionalType");
  30577. };
  30578. _proto.isAbstractConstructorSignature = function isAbstractConstructorSignature() {
  30579. return this.isContextual("abstract") && this.lookahead().type === types$1._new;
  30580. };
  30581. _proto.tsParseNonConditionalType = function tsParseNonConditionalType() {
  30582. if (this.tsIsStartOfFunctionType()) {
  30583. return this.tsParseFunctionOrConstructorType("TSFunctionType");
  30584. }
  30585. if (this.match(types$1._new)) {
  30586. return this.tsParseFunctionOrConstructorType("TSConstructorType");
  30587. } else if (this.isAbstractConstructorSignature()) {
  30588. return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
  30589. }
  30590. return this.tsParseUnionTypeOrHigher();
  30591. };
  30592. _proto.tsParseTypeAssertion = function tsParseTypeAssertion() {
  30593. var node = this.startNode();
  30594. var _const = this.tsTryNextParseConstantContext();
  30595. node.typeAnnotation = _const || this.tsNextThenParseType();
  30596. this.expectRelational(">");
  30597. node.expression = this.parseMaybeUnary();
  30598. return this.finishNode(node, "TSTypeAssertion");
  30599. };
  30600. _proto.tsParseHeritageClause = function tsParseHeritageClause(descriptor) {
  30601. var originalStart = this.state.start;
  30602. var delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
  30603. if (!delimitedList.length) {
  30604. this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor);
  30605. }
  30606. return delimitedList;
  30607. };
  30608. _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() {
  30609. var node = this.startNode();
  30610. node.expression = this.tsParseEntityName(false);
  30611. if (this.isRelational("<")) {
  30612. node.typeParameters = this.tsParseTypeArguments();
  30613. }
  30614. return this.finishNode(node, "TSExpressionWithTypeArguments");
  30615. };
  30616. _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) {
  30617. node.id = this.parseIdentifier();
  30618. this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
  30619. node.typeParameters = this.tsTryParseTypeParameters();
  30620. if (this.eat(types$1._extends)) {
  30621. node["extends"] = this.tsParseHeritageClause("extends");
  30622. }
  30623. var body = this.startNode();
  30624. body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
  30625. node.body = this.finishNode(body, "TSInterfaceBody");
  30626. return this.finishNode(node, "TSInterfaceDeclaration");
  30627. };
  30628. _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) {
  30629. var _this8 = this;
  30630. node.id = this.parseIdentifier();
  30631. this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
  30632. node.typeParameters = this.tsTryParseTypeParameters();
  30633. node.typeAnnotation = this.tsInType(function () {
  30634. _this8.expect(types$1.eq);
  30635. if (_this8.isContextual("intrinsic") && _this8.lookahead().type !== types$1.dot) {
  30636. var _node3 = _this8.startNode();
  30637. _this8.next();
  30638. return _this8.finishNode(_node3, "TSIntrinsicKeyword");
  30639. }
  30640. return _this8.tsParseType();
  30641. });
  30642. this.semicolon();
  30643. return this.finishNode(node, "TSTypeAliasDeclaration");
  30644. };
  30645. _proto.tsInNoContext = function tsInNoContext(cb) {
  30646. var oldContext = this.state.context;
  30647. this.state.context = [oldContext[0]];
  30648. try {
  30649. return cb();
  30650. } finally {
  30651. this.state.context = oldContext;
  30652. }
  30653. };
  30654. _proto.tsInType = function tsInType(cb) {
  30655. var oldInType = this.state.inType;
  30656. this.state.inType = true;
  30657. try {
  30658. return cb();
  30659. } finally {
  30660. this.state.inType = oldInType;
  30661. }
  30662. };
  30663. _proto.tsEatThenParseType = function tsEatThenParseType(token) {
  30664. return !this.match(token) ? undefined : this.tsNextThenParseType();
  30665. };
  30666. _proto.tsExpectThenParseType = function tsExpectThenParseType(token) {
  30667. var _this9 = this;
  30668. return this.tsDoThenParseType(function () {
  30669. return _this9.expect(token);
  30670. });
  30671. };
  30672. _proto.tsNextThenParseType = function tsNextThenParseType() {
  30673. var _this10 = this;
  30674. return this.tsDoThenParseType(function () {
  30675. return _this10.next();
  30676. });
  30677. };
  30678. _proto.tsDoThenParseType = function tsDoThenParseType(cb) {
  30679. var _this11 = this;
  30680. return this.tsInType(function () {
  30681. cb();
  30682. return _this11.tsParseType();
  30683. });
  30684. };
  30685. _proto.tsParseEnumMember = function tsParseEnumMember() {
  30686. var node = this.startNode();
  30687. node.id = this.match(types$1.string) ? this.parseExprAtom() : this.parseIdentifier(true);
  30688. if (this.eat(types$1.eq)) {
  30689. node.initializer = this.parseMaybeAssignAllowIn();
  30690. }
  30691. return this.finishNode(node, "TSEnumMember");
  30692. };
  30693. _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) {
  30694. if (isConst) node["const"] = true;
  30695. node.id = this.parseIdentifier();
  30696. this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
  30697. this.expect(types$1.braceL);
  30698. node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
  30699. this.expect(types$1.braceR);
  30700. return this.finishNode(node, "TSEnumDeclaration");
  30701. };
  30702. _proto.tsParseModuleBlock = function tsParseModuleBlock() {
  30703. var node = this.startNode();
  30704. this.scope.enter(SCOPE_OTHER);
  30705. this.expect(types$1.braceL);
  30706. this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types$1.braceR);
  30707. this.scope.exit();
  30708. return this.finishNode(node, "TSModuleBlock");
  30709. };
  30710. _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node, nested) {
  30711. if (nested === void 0) {
  30712. nested = false;
  30713. }
  30714. node.id = this.parseIdentifier();
  30715. if (!nested) {
  30716. this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
  30717. }
  30718. if (this.eat(types$1.dot)) {
  30719. var inner = this.startNode();
  30720. this.tsParseModuleOrNamespaceDeclaration(inner, true);
  30721. node.body = inner;
  30722. } else {
  30723. this.scope.enter(SCOPE_TS_MODULE);
  30724. this.prodParam.enter(PARAM);
  30725. node.body = this.tsParseModuleBlock();
  30726. this.prodParam.exit();
  30727. this.scope.exit();
  30728. }
  30729. return this.finishNode(node, "TSModuleDeclaration");
  30730. };
  30731. _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) {
  30732. if (this.isContextual("global")) {
  30733. node.global = true;
  30734. node.id = this.parseIdentifier();
  30735. } else if (this.match(types$1.string)) {
  30736. node.id = this.parseExprAtom();
  30737. } else {
  30738. this.unexpected();
  30739. }
  30740. if (this.match(types$1.braceL)) {
  30741. this.scope.enter(SCOPE_TS_MODULE);
  30742. this.prodParam.enter(PARAM);
  30743. node.body = this.tsParseModuleBlock();
  30744. this.prodParam.exit();
  30745. this.scope.exit();
  30746. } else {
  30747. this.semicolon();
  30748. }
  30749. return this.finishNode(node, "TSModuleDeclaration");
  30750. };
  30751. _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) {
  30752. node.isExport = isExport || false;
  30753. node.id = this.parseIdentifier();
  30754. this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL);
  30755. this.expect(types$1.eq);
  30756. var moduleReference = this.tsParseModuleReference();
  30757. if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
  30758. this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType);
  30759. }
  30760. node.moduleReference = moduleReference;
  30761. this.semicolon();
  30762. return this.finishNode(node, "TSImportEqualsDeclaration");
  30763. };
  30764. _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() {
  30765. return this.isContextual("require") && this.lookaheadCharCode() === 40;
  30766. };
  30767. _proto.tsParseModuleReference = function tsParseModuleReference() {
  30768. return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
  30769. };
  30770. _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() {
  30771. var node = this.startNode();
  30772. this.expectContextual("require");
  30773. this.expect(types$1.parenL);
  30774. if (!this.match(types$1.string)) {
  30775. throw this.unexpected();
  30776. }
  30777. node.expression = this.parseExprAtom();
  30778. this.expect(types$1.parenR);
  30779. return this.finishNode(node, "TSExternalModuleReference");
  30780. };
  30781. _proto.tsLookAhead = function tsLookAhead(f) {
  30782. var state = this.state.clone();
  30783. var res = f();
  30784. this.state = state;
  30785. return res;
  30786. };
  30787. _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) {
  30788. var result = this.tryParse(function (abort) {
  30789. return f() || abort();
  30790. });
  30791. if (result.aborted || !result.node) return undefined;
  30792. if (result.error) this.state = result.failState;
  30793. return result.node;
  30794. };
  30795. _proto.tsTryParse = function tsTryParse(f) {
  30796. var state = this.state.clone();
  30797. var result = f();
  30798. if (result !== undefined && result !== false) {
  30799. return result;
  30800. } else {
  30801. this.state = state;
  30802. return undefined;
  30803. }
  30804. };
  30805. _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) {
  30806. var _this12 = this;
  30807. if (this.isLineTerminator()) {
  30808. return;
  30809. }
  30810. var starttype = this.state.type;
  30811. var kind;
  30812. if (this.isContextual("let")) {
  30813. starttype = types$1._var;
  30814. kind = "let";
  30815. }
  30816. return this.tsInAmbientContext(function () {
  30817. switch (starttype) {
  30818. case types$1._function:
  30819. nany.declare = true;
  30820. return _this12.parseFunctionStatement(nany, false, true);
  30821. case types$1._class:
  30822. nany.declare = true;
  30823. return _this12.parseClass(nany, true, false);
  30824. case types$1._const:
  30825. if (_this12.match(types$1._const) && _this12.isLookaheadContextual("enum")) {
  30826. _this12.expect(types$1._const);
  30827. _this12.expectContextual("enum");
  30828. return _this12.tsParseEnumDeclaration(nany, true);
  30829. }
  30830. case types$1._var:
  30831. kind = kind || _this12.state.value;
  30832. return _this12.parseVarStatement(nany, kind);
  30833. case types$1.name:
  30834. {
  30835. var value = _this12.state.value;
  30836. if (value === "global") {
  30837. return _this12.tsParseAmbientExternalModuleDeclaration(nany);
  30838. } else {
  30839. return _this12.tsParseDeclaration(nany, value, true);
  30840. }
  30841. }
  30842. }
  30843. });
  30844. };
  30845. _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() {
  30846. return this.tsParseDeclaration(this.startNode(), this.state.value, true);
  30847. };
  30848. _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) {
  30849. switch (expr.name) {
  30850. case "declare":
  30851. {
  30852. var declaration = this.tsTryParseDeclare(node);
  30853. if (declaration) {
  30854. declaration.declare = true;
  30855. return declaration;
  30856. }
  30857. break;
  30858. }
  30859. case "global":
  30860. if (this.match(types$1.braceL)) {
  30861. this.scope.enter(SCOPE_TS_MODULE);
  30862. this.prodParam.enter(PARAM);
  30863. var mod = node;
  30864. mod.global = true;
  30865. mod.id = expr;
  30866. mod.body = this.tsParseModuleBlock();
  30867. this.scope.exit();
  30868. this.prodParam.exit();
  30869. return this.finishNode(mod, "TSModuleDeclaration");
  30870. }
  30871. break;
  30872. default:
  30873. return this.tsParseDeclaration(node, expr.name, false);
  30874. }
  30875. };
  30876. _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) {
  30877. switch (value) {
  30878. case "abstract":
  30879. if (this.tsCheckLineTerminator(next) && (this.match(types$1._class) || this.match(types$1.name))) {
  30880. return this.tsParseAbstractDeclaration(node);
  30881. }
  30882. break;
  30883. case "enum":
  30884. if (next || this.match(types$1.name)) {
  30885. if (next) this.next();
  30886. return this.tsParseEnumDeclaration(node, false);
  30887. }
  30888. break;
  30889. case "interface":
  30890. if (this.tsCheckLineTerminator(next) && this.match(types$1.name)) {
  30891. return this.tsParseInterfaceDeclaration(node);
  30892. }
  30893. break;
  30894. case "module":
  30895. if (this.tsCheckLineTerminator(next)) {
  30896. if (this.match(types$1.string)) {
  30897. return this.tsParseAmbientExternalModuleDeclaration(node);
  30898. } else if (this.match(types$1.name)) {
  30899. return this.tsParseModuleOrNamespaceDeclaration(node);
  30900. }
  30901. }
  30902. break;
  30903. case "namespace":
  30904. if (this.tsCheckLineTerminator(next) && this.match(types$1.name)) {
  30905. return this.tsParseModuleOrNamespaceDeclaration(node);
  30906. }
  30907. break;
  30908. case "type":
  30909. if (this.tsCheckLineTerminator(next) && this.match(types$1.name)) {
  30910. return this.tsParseTypeAliasDeclaration(node);
  30911. }
  30912. break;
  30913. }
  30914. };
  30915. _proto.tsCheckLineTerminator = function tsCheckLineTerminator(next) {
  30916. if (next) {
  30917. if (this.hasFollowingLineBreak()) return false;
  30918. this.next();
  30919. return true;
  30920. }
  30921. return !this.isLineTerminator();
  30922. };
  30923. _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
  30924. var _this13 = this;
  30925. if (!this.isRelational("<")) {
  30926. return undefined;
  30927. }
  30928. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  30929. this.state.maybeInArrowParameters = true;
  30930. var res = this.tsTryParseAndCatch(function () {
  30931. var node = _this13.startNodeAt(startPos, startLoc);
  30932. node.typeParameters = _this13.tsParseTypeParameters();
  30933. _superClass.prototype.parseFunctionParams.call(_this13, node);
  30934. node.returnType = _this13.tsTryParseTypeOrTypePredicateAnnotation();
  30935. _this13.expect(types$1.arrow);
  30936. return node;
  30937. });
  30938. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  30939. if (!res) {
  30940. return undefined;
  30941. }
  30942. return this.parseArrowExpression(res, null, true);
  30943. };
  30944. _proto.tsParseTypeArguments = function tsParseTypeArguments() {
  30945. var _this14 = this;
  30946. var node = this.startNode();
  30947. node.params = this.tsInType(function () {
  30948. return _this14.tsInNoContext(function () {
  30949. _this14.expectRelational("<");
  30950. return _this14.tsParseDelimitedList("TypeParametersOrArguments", _this14.tsParseType.bind(_this14));
  30951. });
  30952. });
  30953. if (node.params.length === 0) {
  30954. this.raise(node.start, TSErrors.EmptyTypeArguments);
  30955. }
  30956. this.expectRelational(">");
  30957. return this.finishNode(node, "TSTypeParameterInstantiation");
  30958. };
  30959. _proto.tsIsDeclarationStart = function tsIsDeclarationStart() {
  30960. if (this.match(types$1.name)) {
  30961. switch (this.state.value) {
  30962. case "abstract":
  30963. case "declare":
  30964. case "enum":
  30965. case "interface":
  30966. case "module":
  30967. case "namespace":
  30968. case "type":
  30969. return true;
  30970. }
  30971. }
  30972. return false;
  30973. };
  30974. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  30975. if (this.tsIsDeclarationStart()) return false;
  30976. return _superClass.prototype.isExportDefaultSpecifier.call(this);
  30977. };
  30978. _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
  30979. var startPos = this.state.start;
  30980. var startLoc = this.state.startLoc;
  30981. var accessibility;
  30982. var readonly = false;
  30983. var override = false;
  30984. if (allowModifiers !== undefined) {
  30985. var modified = {};
  30986. this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]);
  30987. accessibility = modified.accessibility;
  30988. override = modified.override;
  30989. readonly = modified.readonly;
  30990. if (allowModifiers === false && (accessibility || readonly || override)) {
  30991. this.raise(startPos, TSErrors.UnexpectedParameterModifier);
  30992. }
  30993. }
  30994. var left = this.parseMaybeDefault();
  30995. this.parseAssignableListItemTypes(left);
  30996. var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  30997. if (accessibility || readonly || override) {
  30998. var pp = this.startNodeAt(startPos, startLoc);
  30999. if (decorators.length) {
  31000. pp.decorators = decorators;
  31001. }
  31002. if (accessibility) pp.accessibility = accessibility;
  31003. if (readonly) pp.readonly = readonly;
  31004. if (override) pp.override = override;
  31005. if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
  31006. this.raise(pp.start, TSErrors.UnsupportedParameterPropertyKind);
  31007. }
  31008. pp.parameter = elt;
  31009. return this.finishNode(pp, "TSParameterProperty");
  31010. }
  31011. if (decorators.length) {
  31012. left.decorators = decorators;
  31013. }
  31014. return elt;
  31015. };
  31016. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  31017. if (isMethod === void 0) {
  31018. isMethod = false;
  31019. }
  31020. if (this.match(types$1.colon)) {
  31021. node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types$1.colon);
  31022. }
  31023. var bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" ? "TSDeclareMethod" : undefined;
  31024. if (bodilessType && !this.match(types$1.braceL) && this.isLineTerminator()) {
  31025. this.finishNode(node, bodilessType);
  31026. return;
  31027. }
  31028. if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
  31029. this.raise(node.start, TSErrors.DeclareFunctionHasImplementation);
  31030. if (node.declare) {
  31031. _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, bodilessType, isMethod);
  31032. return;
  31033. }
  31034. }
  31035. _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, isMethod);
  31036. };
  31037. _proto.registerFunctionStatementId = function registerFunctionStatementId(node) {
  31038. if (!node.body && node.id) {
  31039. this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
  31040. } else {
  31041. _superClass.prototype.registerFunctionStatementId.apply(this, arguments);
  31042. }
  31043. };
  31044. _proto.tsCheckForInvalidTypeCasts = function tsCheckForInvalidTypeCasts(items) {
  31045. var _this15 = this;
  31046. items.forEach(function (node) {
  31047. if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
  31048. _this15.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation);
  31049. }
  31050. });
  31051. };
  31052. _proto.toReferencedList = function toReferencedList(exprList, isInParens) {
  31053. this.tsCheckForInvalidTypeCasts(exprList);
  31054. return exprList;
  31055. };
  31056. _proto.parseArrayLike = function parseArrayLike() {
  31057. var _superClass$prototype;
  31058. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  31059. args[_key] = arguments[_key];
  31060. }
  31061. var node = (_superClass$prototype = _superClass.prototype.parseArrayLike).call.apply(_superClass$prototype, [this].concat(args));
  31062. if (node.type === "ArrayExpression") {
  31063. this.tsCheckForInvalidTypeCasts(node.elements);
  31064. }
  31065. return node;
  31066. };
  31067. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
  31068. var _this16 = this;
  31069. if (!this.hasPrecedingLineBreak() && this.match(types$1.bang)) {
  31070. this.state.exprAllowed = false;
  31071. this.next();
  31072. var nonNullExpression = this.startNodeAt(startPos, startLoc);
  31073. nonNullExpression.expression = base;
  31074. return this.finishNode(nonNullExpression, "TSNonNullExpression");
  31075. }
  31076. if (this.isRelational("<")) {
  31077. var result = this.tsTryParseAndCatch(function () {
  31078. if (!noCalls && _this16.atPossibleAsyncArrow(base)) {
  31079. var asyncArrowFn = _this16.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
  31080. if (asyncArrowFn) {
  31081. return asyncArrowFn;
  31082. }
  31083. }
  31084. var node = _this16.startNodeAt(startPos, startLoc);
  31085. node.callee = base;
  31086. var typeArguments = _this16.tsParseTypeArguments();
  31087. if (typeArguments) {
  31088. if (!noCalls && _this16.eat(types$1.parenL)) {
  31089. node.arguments = _this16.parseCallExpressionArguments(types$1.parenR, false);
  31090. _this16.tsCheckForInvalidTypeCasts(node.arguments);
  31091. node.typeParameters = typeArguments;
  31092. if (state.optionalChainMember) {
  31093. node.optional = false;
  31094. }
  31095. return _this16.finishCallExpression(node, state.optionalChainMember);
  31096. } else if (_this16.match(types$1.backQuote)) {
  31097. var _result = _this16.parseTaggedTemplateExpression(base, startPos, startLoc, state);
  31098. _result.typeParameters = typeArguments;
  31099. return _result;
  31100. }
  31101. }
  31102. _this16.unexpected();
  31103. });
  31104. if (result) return result;
  31105. }
  31106. return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state);
  31107. };
  31108. _proto.parseNewArguments = function parseNewArguments(node) {
  31109. var _this17 = this;
  31110. if (this.isRelational("<")) {
  31111. var typeParameters = this.tsTryParseAndCatch(function () {
  31112. var args = _this17.tsParseTypeArguments();
  31113. if (!_this17.match(types$1.parenL)) _this17.unexpected();
  31114. return args;
  31115. });
  31116. if (typeParameters) {
  31117. node.typeParameters = typeParameters;
  31118. }
  31119. }
  31120. _superClass.prototype.parseNewArguments.call(this, node);
  31121. };
  31122. _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  31123. if (nonNull(types$1._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual("as")) {
  31124. var node = this.startNodeAt(leftStartPos, leftStartLoc);
  31125. node.expression = left;
  31126. var _const = this.tsTryNextParseConstantContext();
  31127. if (_const) {
  31128. node.typeAnnotation = _const;
  31129. } else {
  31130. node.typeAnnotation = this.tsNextThenParseType();
  31131. }
  31132. this.finishNode(node, "TSAsExpression");
  31133. this.reScan_lt_gt();
  31134. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  31135. }
  31136. return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec);
  31137. };
  31138. _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {};
  31139. _proto.checkDuplicateExports = function checkDuplicateExports() {};
  31140. _proto.parseImport = function parseImport(node) {
  31141. node.importKind = "value";
  31142. if (this.match(types$1.name) || this.match(types$1.star) || this.match(types$1.braceL)) {
  31143. var ahead = this.lookahead();
  31144. if (this.isContextual("type") && ahead.type !== types$1.comma && !(ahead.type === types$1.name && ahead.value === "from") && ahead.type !== types$1.eq) {
  31145. node.importKind = "type";
  31146. this.next();
  31147. ahead = this.lookahead();
  31148. }
  31149. if (this.match(types$1.name) && ahead.type === types$1.eq) {
  31150. return this.tsParseImportEqualsDeclaration(node);
  31151. }
  31152. }
  31153. var importNode = _superClass.prototype.parseImport.call(this, node);
  31154. if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
  31155. this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed);
  31156. }
  31157. return importNode;
  31158. };
  31159. _proto.parseExport = function parseExport(node) {
  31160. if (this.match(types$1._import)) {
  31161. this.next();
  31162. if (this.isContextual("type") && this.lookaheadCharCode() !== 61) {
  31163. node.importKind = "type";
  31164. this.next();
  31165. } else {
  31166. node.importKind = "value";
  31167. }
  31168. return this.tsParseImportEqualsDeclaration(node, true);
  31169. } else if (this.eat(types$1.eq)) {
  31170. var assign = node;
  31171. assign.expression = this.parseExpression();
  31172. this.semicolon();
  31173. return this.finishNode(assign, "TSExportAssignment");
  31174. } else if (this.eatContextual("as")) {
  31175. var decl = node;
  31176. this.expectContextual("namespace");
  31177. decl.id = this.parseIdentifier();
  31178. this.semicolon();
  31179. return this.finishNode(decl, "TSNamespaceExportDeclaration");
  31180. } else {
  31181. if (this.isContextual("type") && this.lookahead().type === types$1.braceL) {
  31182. this.next();
  31183. node.exportKind = "type";
  31184. } else {
  31185. node.exportKind = "value";
  31186. }
  31187. return _superClass.prototype.parseExport.call(this, node);
  31188. }
  31189. };
  31190. _proto.isAbstractClass = function isAbstractClass() {
  31191. return this.isContextual("abstract") && this.lookahead().type === types$1._class;
  31192. };
  31193. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  31194. if (this.isAbstractClass()) {
  31195. var cls = this.startNode();
  31196. this.next();
  31197. cls["abstract"] = true;
  31198. this.parseClass(cls, true, true);
  31199. return cls;
  31200. }
  31201. if (this.state.value === "interface") {
  31202. var result = this.tsParseDeclaration(this.startNode(), this.state.value, true);
  31203. if (result) return result;
  31204. }
  31205. return _superClass.prototype.parseExportDefaultExpression.call(this);
  31206. };
  31207. _proto.parseStatementContent = function parseStatementContent(context, topLevel) {
  31208. if (this.state.type === types$1._const) {
  31209. var ahead = this.lookahead();
  31210. if (ahead.type === types$1.name && ahead.value === "enum") {
  31211. var node = this.startNode();
  31212. this.expect(types$1._const);
  31213. this.expectContextual("enum");
  31214. return this.tsParseEnumDeclaration(node, true);
  31215. }
  31216. }
  31217. return _superClass.prototype.parseStatementContent.call(this, context, topLevel);
  31218. };
  31219. _proto.parseAccessModifier = function parseAccessModifier() {
  31220. return this.tsParseModifier(["public", "protected", "private"]);
  31221. };
  31222. _proto.tsHasSomeModifiers = function tsHasSomeModifiers(member, modifiers) {
  31223. return modifiers.some(function (modifier) {
  31224. if (tsIsAccessModifier(modifier)) {
  31225. return member.accessibility === modifier;
  31226. }
  31227. return !!member[modifier];
  31228. });
  31229. };
  31230. _proto.parseClassMember = function parseClassMember(classBody, member, state) {
  31231. var _this18 = this;
  31232. var invalidModifersForStaticBlocks = ["declare", "private", "public", "protected", "override", "abstract", "readonly"];
  31233. this.tsParseModifiers(member, invalidModifersForStaticBlocks.concat(["static"]));
  31234. var callParseClassMemberWithIsStatic = function callParseClassMemberWithIsStatic() {
  31235. var isStatic = !!member["static"];
  31236. if (isStatic && _this18.eat(types$1.braceL)) {
  31237. if (_this18.tsHasSomeModifiers(member, invalidModifersForStaticBlocks)) {
  31238. _this18.raise(_this18.state.pos, TSErrors.StaticBlockCannotHaveModifier);
  31239. }
  31240. _this18.parseClassStaticBlock(classBody, member);
  31241. } else {
  31242. _this18.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  31243. }
  31244. };
  31245. if (member.declare) {
  31246. this.tsInAmbientContext(callParseClassMemberWithIsStatic);
  31247. } else {
  31248. callParseClassMemberWithIsStatic();
  31249. }
  31250. };
  31251. _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  31252. var idx = this.tsTryParseIndexSignature(member);
  31253. if (idx) {
  31254. classBody.body.push(idx);
  31255. if (member["abstract"]) {
  31256. this.raise(member.start, TSErrors.IndexSignatureHasAbstract);
  31257. }
  31258. if (member.accessibility) {
  31259. this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility);
  31260. }
  31261. if (member.declare) {
  31262. this.raise(member.start, TSErrors.IndexSignatureHasDeclare);
  31263. }
  31264. if (member.override) {
  31265. this.raise(member.start, TSErrors.IndexSignatureHasOverride);
  31266. }
  31267. return;
  31268. }
  31269. if (!this.state.inAbstractClass && member["abstract"]) {
  31270. this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod);
  31271. }
  31272. if (member.override) {
  31273. if (!state.hadSuperClass) {
  31274. this.raise(member.start, TSErrors.OverrideNotInSubClass);
  31275. }
  31276. }
  31277. _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic);
  31278. };
  31279. _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {
  31280. var optional = this.eat(types$1.question);
  31281. if (optional) methodOrProp.optional = true;
  31282. if (methodOrProp.readonly && this.match(types$1.parenL)) {
  31283. this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly);
  31284. }
  31285. if (methodOrProp.declare && this.match(types$1.parenL)) {
  31286. this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare);
  31287. }
  31288. };
  31289. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  31290. var decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
  31291. return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr);
  31292. };
  31293. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  31294. if (this.tsIsDeclarationStart()) return true;
  31295. return _superClass.prototype.shouldParseExportDeclaration.call(this);
  31296. };
  31297. _proto.parseConditional = function parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  31298. var _this19 = this;
  31299. if (!this.state.maybeInArrowParameters || !this.match(types$1.question)) {
  31300. return _superClass.prototype.parseConditional.call(this, expr, startPos, startLoc, refExpressionErrors);
  31301. }
  31302. var result = this.tryParse(function () {
  31303. return _superClass.prototype.parseConditional.call(_this19, expr, startPos, startLoc);
  31304. });
  31305. if (!result.node) {
  31306. if (result.error) {
  31307. _superClass.prototype.setOptionalParametersError.call(this, refExpressionErrors, result.error);
  31308. }
  31309. return expr;
  31310. }
  31311. if (result.error) this.state = result.failState;
  31312. return result.node;
  31313. };
  31314. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  31315. node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);
  31316. if (this.eat(types$1.question)) {
  31317. node.optional = true;
  31318. this.resetEndLocation(node);
  31319. }
  31320. if (this.match(types$1.colon)) {
  31321. var typeCastNode = this.startNodeAt(startPos, startLoc);
  31322. typeCastNode.expression = node;
  31323. typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
  31324. return this.finishNode(typeCastNode, "TSTypeCastExpression");
  31325. }
  31326. return node;
  31327. };
  31328. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  31329. var startPos = this.state.start;
  31330. var startLoc = this.state.startLoc;
  31331. var isDeclare = this.eatContextual("declare");
  31332. if (isDeclare && (this.isContextual("declare") || !this.shouldParseExportDeclaration())) {
  31333. throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare);
  31334. }
  31335. var declaration;
  31336. if (this.match(types$1.name)) {
  31337. declaration = this.tsTryParseExportDeclaration();
  31338. }
  31339. if (!declaration) {
  31340. declaration = _superClass.prototype.parseExportDeclaration.call(this, node);
  31341. }
  31342. if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
  31343. node.exportKind = "type";
  31344. }
  31345. if (declaration && isDeclare) {
  31346. this.resetStartLocation(declaration, startPos, startLoc);
  31347. declaration.declare = true;
  31348. }
  31349. return declaration;
  31350. };
  31351. _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {
  31352. if ((!isStatement || optionalId) && this.isContextual("implements")) {
  31353. return;
  31354. }
  31355. _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
  31356. var typeParameters = this.tsTryParseTypeParameters();
  31357. if (typeParameters) node.typeParameters = typeParameters;
  31358. };
  31359. _proto.parseClassPropertyAnnotation = function parseClassPropertyAnnotation(node) {
  31360. if (!node.optional && this.eat(types$1.bang)) {
  31361. node.definite = true;
  31362. }
  31363. var type = this.tsTryParseTypeAnnotation();
  31364. if (type) node.typeAnnotation = type;
  31365. };
  31366. _proto.parseClassProperty = function parseClassProperty(node) {
  31367. this.parseClassPropertyAnnotation(node);
  31368. if (this.state.isAmbientContext && this.match(types$1.eq)) {
  31369. this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer);
  31370. }
  31371. return _superClass.prototype.parseClassProperty.call(this, node);
  31372. };
  31373. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  31374. if (node["abstract"]) {
  31375. this.raise(node.start, TSErrors.PrivateElementHasAbstract);
  31376. }
  31377. if (node.accessibility) {
  31378. this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility);
  31379. }
  31380. this.parseClassPropertyAnnotation(node);
  31381. return _superClass.prototype.parseClassPrivateProperty.call(this, node);
  31382. };
  31383. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  31384. var typeParameters = this.tsTryParseTypeParameters();
  31385. if (typeParameters && isConstructor) {
  31386. this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters);
  31387. }
  31388. if (method.declare && (method.kind === "get" || method.kind === "set")) {
  31389. this.raise(method.start, TSErrors.DeclareAccessor, method.kind);
  31390. }
  31391. if (typeParameters) method.typeParameters = typeParameters;
  31392. _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
  31393. };
  31394. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  31395. var typeParameters = this.tsTryParseTypeParameters();
  31396. if (typeParameters) method.typeParameters = typeParameters;
  31397. _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);
  31398. };
  31399. _proto.parseClassSuper = function parseClassSuper(node) {
  31400. _superClass.prototype.parseClassSuper.call(this, node);
  31401. if (node.superClass && this.isRelational("<")) {
  31402. node.superTypeParameters = this.tsParseTypeArguments();
  31403. }
  31404. if (this.eatContextual("implements")) {
  31405. node["implements"] = this.tsParseHeritageClause("implements");
  31406. }
  31407. };
  31408. _proto.parseObjPropValue = function parseObjPropValue(prop) {
  31409. var _superClass$prototype2;
  31410. var typeParameters = this.tsTryParseTypeParameters();
  31411. if (typeParameters) prop.typeParameters = typeParameters;
  31412. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  31413. args[_key2 - 1] = arguments[_key2];
  31414. }
  31415. (_superClass$prototype2 = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype2, [this, prop].concat(args));
  31416. };
  31417. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  31418. var typeParameters = this.tsTryParseTypeParameters();
  31419. if (typeParameters) node.typeParameters = typeParameters;
  31420. _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);
  31421. };
  31422. _proto.parseVarId = function parseVarId(decl, kind) {
  31423. _superClass.prototype.parseVarId.call(this, decl, kind);
  31424. if (decl.id.type === "Identifier" && this.eat(types$1.bang)) {
  31425. decl.definite = true;
  31426. }
  31427. var type = this.tsTryParseTypeAnnotation();
  31428. if (type) {
  31429. decl.id.typeAnnotation = type;
  31430. this.resetEndLocation(decl.id);
  31431. }
  31432. };
  31433. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  31434. if (this.match(types$1.colon)) {
  31435. node.returnType = this.tsParseTypeAnnotation();
  31436. }
  31437. return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);
  31438. };
  31439. _proto.parseMaybeAssign = function parseMaybeAssign() {
  31440. var _this20 = this,
  31441. _jsx,
  31442. _jsx2,
  31443. _typeCast,
  31444. _jsx3,
  31445. _typeCast2,
  31446. _jsx4,
  31447. _typeCast3;
  31448. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  31449. args[_key3] = arguments[_key3];
  31450. }
  31451. var state;
  31452. var jsx;
  31453. var typeCast;
  31454. if (this.hasPlugin("jsx") && (this.match(types$1.jsxTagStart) || this.isRelational("<"))) {
  31455. state = this.state.clone();
  31456. jsx = this.tryParse(function () {
  31457. var _superClass$prototype3;
  31458. return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [_this20].concat(args));
  31459. }, state);
  31460. if (!jsx.error) return jsx.node;
  31461. var context = this.state.context;
  31462. if (context[context.length - 1] === types.j_oTag) {
  31463. context.length -= 2;
  31464. } else if (context[context.length - 1] === types.j_expr) {
  31465. context.length -= 1;
  31466. }
  31467. }
  31468. if (!((_jsx = jsx) != null && _jsx.error) && !this.isRelational("<")) {
  31469. var _superClass$prototype4;
  31470. return (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args));
  31471. }
  31472. var typeParameters;
  31473. state = state || this.state.clone();
  31474. var arrow = this.tryParse(function (abort) {
  31475. var _superClass$prototype5, _expr$extra, _typeParameters;
  31476. typeParameters = _this20.tsParseTypeParameters();
  31477. var expr = (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [_this20].concat(args));
  31478. if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
  31479. abort();
  31480. }
  31481. if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
  31482. _this20.resetStartLocationFromNode(expr, typeParameters);
  31483. }
  31484. expr.typeParameters = typeParameters;
  31485. return expr;
  31486. }, state);
  31487. if (!arrow.error && !arrow.aborted) return arrow.node;
  31488. if (!jsx) {
  31489. assert(!this.hasPlugin("jsx"));
  31490. typeCast = this.tryParse(function () {
  31491. var _superClass$prototype6;
  31492. return (_superClass$prototype6 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype6, [_this20].concat(args));
  31493. }, state);
  31494. if (!typeCast.error) return typeCast.node;
  31495. }
  31496. if ((_jsx2 = jsx) != null && _jsx2.node) {
  31497. this.state = jsx.failState;
  31498. return jsx.node;
  31499. }
  31500. if (arrow.node) {
  31501. this.state = arrow.failState;
  31502. return arrow.node;
  31503. }
  31504. if ((_typeCast = typeCast) != null && _typeCast.node) {
  31505. this.state = typeCast.failState;
  31506. return typeCast.node;
  31507. }
  31508. if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error;
  31509. if (arrow.thrown) throw arrow.error;
  31510. if ((_typeCast2 = typeCast) != null && _typeCast2.thrown) throw typeCast.error;
  31511. throw ((_jsx4 = jsx) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
  31512. };
  31513. _proto.parseMaybeUnary = function parseMaybeUnary(refExpressionErrors) {
  31514. if (!this.hasPlugin("jsx") && this.isRelational("<")) {
  31515. return this.tsParseTypeAssertion();
  31516. } else {
  31517. return _superClass.prototype.parseMaybeUnary.call(this, refExpressionErrors);
  31518. }
  31519. };
  31520. _proto.parseArrow = function parseArrow(node) {
  31521. var _this21 = this;
  31522. if (this.match(types$1.colon)) {
  31523. var result = this.tryParse(function (abort) {
  31524. var returnType = _this21.tsParseTypeOrTypePredicateAnnotation(types$1.colon);
  31525. if (_this21.canInsertSemicolon() || !_this21.match(types$1.arrow)) abort();
  31526. return returnType;
  31527. });
  31528. if (result.aborted) return;
  31529. if (!result.thrown) {
  31530. if (result.error) this.state = result.failState;
  31531. node.returnType = result.node;
  31532. }
  31533. }
  31534. return _superClass.prototype.parseArrow.call(this, node);
  31535. };
  31536. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  31537. if (this.eat(types$1.question)) {
  31538. if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
  31539. this.raise(param.start, TSErrors.PatternIsOptional);
  31540. }
  31541. param.optional = true;
  31542. }
  31543. var type = this.tsTryParseTypeAnnotation();
  31544. if (type) param.typeAnnotation = type;
  31545. this.resetEndLocation(param);
  31546. return param;
  31547. };
  31548. _proto.toAssignable = function toAssignable(node, isLHS) {
  31549. if (isLHS === void 0) {
  31550. isLHS = false;
  31551. }
  31552. switch (node.type) {
  31553. case "TSTypeCastExpression":
  31554. return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isLHS);
  31555. case "TSParameterProperty":
  31556. return _superClass.prototype.toAssignable.call(this, node, isLHS);
  31557. case "ParenthesizedExpression":
  31558. return this.toAssignableParenthesizedExpression(node, isLHS);
  31559. case "TSAsExpression":
  31560. case "TSNonNullExpression":
  31561. case "TSTypeAssertion":
  31562. node.expression = this.toAssignable(node.expression, isLHS);
  31563. return node;
  31564. default:
  31565. return _superClass.prototype.toAssignable.call(this, node, isLHS);
  31566. }
  31567. };
  31568. _proto.toAssignableParenthesizedExpression = function toAssignableParenthesizedExpression(node, isLHS) {
  31569. switch (node.expression.type) {
  31570. case "TSAsExpression":
  31571. case "TSNonNullExpression":
  31572. case "TSTypeAssertion":
  31573. case "ParenthesizedExpression":
  31574. node.expression = this.toAssignable(node.expression, isLHS);
  31575. return node;
  31576. default:
  31577. return _superClass.prototype.toAssignable.call(this, node, isLHS);
  31578. }
  31579. };
  31580. _proto.checkLVal = function checkLVal(expr, contextDescription) {
  31581. var _expr$extra2, _superClass$prototype7;
  31582. for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
  31583. args[_key4 - 2] = arguments[_key4];
  31584. }
  31585. switch (expr.type) {
  31586. case "TSTypeCastExpression":
  31587. return;
  31588. case "TSParameterProperty":
  31589. this.checkLVal.apply(this, [expr.parameter, "parameter property"].concat(args));
  31590. return;
  31591. case "TSAsExpression":
  31592. case "TSTypeAssertion":
  31593. if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
  31594. this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription);
  31595. break;
  31596. }
  31597. this.checkLVal.apply(this, [expr.expression, "parenthesized expression"].concat(args));
  31598. return;
  31599. case "TSNonNullExpression":
  31600. this.checkLVal.apply(this, [expr.expression, contextDescription].concat(args));
  31601. return;
  31602. default:
  31603. (_superClass$prototype7 = _superClass.prototype.checkLVal).call.apply(_superClass$prototype7, [this, expr, contextDescription].concat(args));
  31604. return;
  31605. }
  31606. };
  31607. _proto.parseBindingAtom = function parseBindingAtom() {
  31608. switch (this.state.type) {
  31609. case types$1._this:
  31610. return this.parseIdentifier(true);
  31611. default:
  31612. return _superClass.prototype.parseBindingAtom.call(this);
  31613. }
  31614. };
  31615. _proto.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) {
  31616. if (this.isRelational("<")) {
  31617. var typeArguments = this.tsParseTypeArguments();
  31618. if (this.match(types$1.parenL)) {
  31619. var call = _superClass.prototype.parseMaybeDecoratorArguments.call(this, expr);
  31620. call.typeParameters = typeArguments;
  31621. return call;
  31622. }
  31623. this.unexpected(this.state.start, types$1.parenL);
  31624. }
  31625. return _superClass.prototype.parseMaybeDecoratorArguments.call(this, expr);
  31626. };
  31627. _proto.checkCommaAfterRest = function checkCommaAfterRest(close) {
  31628. if (this.state.isAmbientContext && this.match(types$1.comma) && this.lookaheadCharCode() === close) {
  31629. this.next();
  31630. } else {
  31631. _superClass.prototype.checkCommaAfterRest.call(this, close);
  31632. }
  31633. };
  31634. _proto.isClassMethod = function isClassMethod() {
  31635. return this.isRelational("<") || _superClass.prototype.isClassMethod.call(this);
  31636. };
  31637. _proto.isClassProperty = function isClassProperty() {
  31638. return this.match(types$1.bang) || this.match(types$1.colon) || _superClass.prototype.isClassProperty.call(this);
  31639. };
  31640. _proto.parseMaybeDefault = function parseMaybeDefault() {
  31641. var _superClass$prototype8;
  31642. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  31643. args[_key5] = arguments[_key5];
  31644. }
  31645. var node = (_superClass$prototype8 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype8, [this].concat(args));
  31646. if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
  31647. this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign);
  31648. }
  31649. return node;
  31650. };
  31651. _proto.getTokenFromCode = function getTokenFromCode(code) {
  31652. if (this.state.inType && (code === 62 || code === 60)) {
  31653. return this.finishOp(types$1.relational, 1);
  31654. } else {
  31655. return _superClass.prototype.getTokenFromCode.call(this, code);
  31656. }
  31657. };
  31658. _proto.reScan_lt_gt = function reScan_lt_gt() {
  31659. if (this.match(types$1.relational)) {
  31660. var code = this.input.charCodeAt(this.state.start);
  31661. if (code === 60 || code === 62) {
  31662. this.state.pos -= 1;
  31663. this.readToken_lt_gt(code);
  31664. }
  31665. }
  31666. };
  31667. _proto.toAssignableList = function toAssignableList(exprList) {
  31668. for (var i = 0; i < exprList.length; i++) {
  31669. var expr = exprList[i];
  31670. if (!expr) continue;
  31671. switch (expr.type) {
  31672. case "TSTypeCastExpression":
  31673. exprList[i] = this.typeCastToParameter(expr);
  31674. break;
  31675. case "TSAsExpression":
  31676. case "TSTypeAssertion":
  31677. if (!this.state.maybeInArrowParameters) {
  31678. exprList[i] = this.typeCastToParameter(expr);
  31679. } else {
  31680. this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter);
  31681. }
  31682. break;
  31683. }
  31684. }
  31685. return _superClass.prototype.toAssignableList.apply(this, arguments);
  31686. };
  31687. _proto.typeCastToParameter = function typeCastToParameter(node) {
  31688. node.expression.typeAnnotation = node.typeAnnotation;
  31689. this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end);
  31690. return node.expression;
  31691. };
  31692. _proto.shouldParseArrow = function shouldParseArrow() {
  31693. return this.match(types$1.colon) || _superClass.prototype.shouldParseArrow.call(this);
  31694. };
  31695. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  31696. return this.match(types$1.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);
  31697. };
  31698. _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {
  31699. return _superClass.prototype.canHaveLeadingDecorator.call(this) || this.isAbstractClass();
  31700. };
  31701. _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {
  31702. var _this22 = this;
  31703. if (this.isRelational("<")) {
  31704. var typeArguments = this.tsTryParseAndCatch(function () {
  31705. return _this22.tsParseTypeArguments();
  31706. });
  31707. if (typeArguments) node.typeParameters = typeArguments;
  31708. }
  31709. return _superClass.prototype.jsxParseOpeningElementAfterName.call(this, node);
  31710. };
  31711. _proto.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) {
  31712. var baseCount = _superClass.prototype.getGetterSetterExpectedParamCount.call(this, method);
  31713. var params = this.getObjectOrClassMethodParams(method);
  31714. var firstParam = params[0];
  31715. var hasContextParam = firstParam && this.isThisParam(firstParam);
  31716. return hasContextParam ? baseCount + 1 : baseCount;
  31717. };
  31718. _proto.parseCatchClauseParam = function parseCatchClauseParam() {
  31719. var param = _superClass.prototype.parseCatchClauseParam.call(this);
  31720. var type = this.tsTryParseTypeAnnotation();
  31721. if (type) {
  31722. param.typeAnnotation = type;
  31723. this.resetEndLocation(param);
  31724. }
  31725. return param;
  31726. };
  31727. _proto.tsInAmbientContext = function tsInAmbientContext(cb) {
  31728. var oldIsAmbientContext = this.state.isAmbientContext;
  31729. this.state.isAmbientContext = true;
  31730. try {
  31731. return cb();
  31732. } finally {
  31733. this.state.isAmbientContext = oldIsAmbientContext;
  31734. }
  31735. };
  31736. _proto.parseClass = function parseClass(node) {
  31737. var oldInAbstractClass = this.state.inAbstractClass;
  31738. this.state.inAbstractClass = !!node["abstract"];
  31739. try {
  31740. var _superClass$prototype9;
  31741. for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
  31742. args[_key6 - 1] = arguments[_key6];
  31743. }
  31744. return (_superClass$prototype9 = _superClass.prototype.parseClass).call.apply(_superClass$prototype9, [this, node].concat(args));
  31745. } finally {
  31746. this.state.inAbstractClass = oldInAbstractClass;
  31747. }
  31748. };
  31749. _proto.tsParseAbstractDeclaration = function tsParseAbstractDeclaration(node) {
  31750. if (this.match(types$1._class)) {
  31751. node["abstract"] = true;
  31752. return this.parseClass(node, true, false);
  31753. } else if (this.isContextual("interface")) {
  31754. if (!this.hasFollowingLineBreak()) {
  31755. node["abstract"] = true;
  31756. this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer);
  31757. this.next();
  31758. return this.tsParseInterfaceDeclaration(node);
  31759. }
  31760. } else {
  31761. this.unexpected(null, types$1._class);
  31762. }
  31763. };
  31764. _proto.parseMethod = function parseMethod() {
  31765. var _superClass$prototype10;
  31766. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  31767. args[_key7] = arguments[_key7];
  31768. }
  31769. var method = (_superClass$prototype10 = _superClass.prototype.parseMethod).call.apply(_superClass$prototype10, [this].concat(args));
  31770. if (method["abstract"]) {
  31771. var hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
  31772. if (hasBody) {
  31773. var _key8 = method.key;
  31774. this.raise(method.start, TSErrors.AbstractMethodHasImplementation, _key8.type === "Identifier" ? _key8.name : "[" + this.input.slice(_key8.start, _key8.end) + "]");
  31775. }
  31776. }
  31777. return method;
  31778. };
  31779. _proto.shouldParseAsAmbientContext = function shouldParseAsAmbientContext() {
  31780. return !!this.getPluginOption("typescript", "dts");
  31781. };
  31782. _proto.parse = function parse() {
  31783. if (this.shouldParseAsAmbientContext()) {
  31784. this.state.isAmbientContext = true;
  31785. }
  31786. return _superClass.prototype.parse.call(this);
  31787. };
  31788. _proto.getExpression = function getExpression() {
  31789. if (this.shouldParseAsAmbientContext()) {
  31790. this.state.isAmbientContext = true;
  31791. }
  31792. return _superClass.prototype.getExpression.call(this);
  31793. };
  31794. return _class;
  31795. }(superClass);
  31796. });
  31797. types$1.placeholder = new TokenType("%%", {
  31798. startsExpr: true
  31799. });
  31800. var PlaceHolderErrors = makeErrorTemplates({
  31801. ClassNameIsRequired: "A class name is required."
  31802. }, ErrorCodes.SyntaxError);
  31803. var placeholders = (function (superClass) {
  31804. return function (_superClass) {
  31805. _inherits(_class, _superClass);
  31806. function _class() {
  31807. return _superClass.apply(this, arguments) || this;
  31808. }
  31809. var _proto = _class.prototype;
  31810. _proto.parsePlaceholder = function parsePlaceholder(expectedNode) {
  31811. if (this.match(types$1.placeholder)) {
  31812. var node = this.startNode();
  31813. this.next();
  31814. this.assertNoSpace("Unexpected space in placeholder.");
  31815. node.name = _superClass.prototype.parseIdentifier.call(this, true);
  31816. this.assertNoSpace("Unexpected space in placeholder.");
  31817. this.expect(types$1.placeholder);
  31818. return this.finishPlaceholder(node, expectedNode);
  31819. }
  31820. };
  31821. _proto.finishPlaceholder = function finishPlaceholder(node, expectedNode) {
  31822. var isFinished = !!(node.expectedNode && node.type === "Placeholder");
  31823. node.expectedNode = expectedNode;
  31824. return isFinished ? node : this.finishNode(node, "Placeholder");
  31825. };
  31826. _proto.getTokenFromCode = function getTokenFromCode(code) {
  31827. if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
  31828. return this.finishOp(types$1.placeholder, 2);
  31829. }
  31830. return _superClass.prototype.getTokenFromCode.apply(this, arguments);
  31831. };
  31832. _proto.parseExprAtom = function parseExprAtom() {
  31833. return this.parsePlaceholder("Expression") || _superClass.prototype.parseExprAtom.apply(this, arguments);
  31834. };
  31835. _proto.parseIdentifier = function parseIdentifier() {
  31836. return this.parsePlaceholder("Identifier") || _superClass.prototype.parseIdentifier.apply(this, arguments);
  31837. };
  31838. _proto.checkReservedWord = function checkReservedWord(word) {
  31839. if (word !== undefined) _superClass.prototype.checkReservedWord.apply(this, arguments);
  31840. };
  31841. _proto.parseBindingAtom = function parseBindingAtom() {
  31842. return this.parsePlaceholder("Pattern") || _superClass.prototype.parseBindingAtom.apply(this, arguments);
  31843. };
  31844. _proto.checkLVal = function checkLVal(expr) {
  31845. if (expr.type !== "Placeholder") _superClass.prototype.checkLVal.apply(this, arguments);
  31846. };
  31847. _proto.toAssignable = function toAssignable(node) {
  31848. if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
  31849. node.expectedNode = "Pattern";
  31850. return node;
  31851. }
  31852. return _superClass.prototype.toAssignable.apply(this, arguments);
  31853. };
  31854. _proto.isLet = function isLet(context) {
  31855. if (_superClass.prototype.isLet.call(this, context)) {
  31856. return true;
  31857. }
  31858. if (!this.isContextual("let")) {
  31859. return false;
  31860. }
  31861. if (context) return false;
  31862. var nextToken = this.lookahead();
  31863. if (nextToken.type === types$1.placeholder) {
  31864. return true;
  31865. }
  31866. return false;
  31867. };
  31868. _proto.verifyBreakContinue = function verifyBreakContinue(node) {
  31869. if (node.label && node.label.type === "Placeholder") return;
  31870. _superClass.prototype.verifyBreakContinue.apply(this, arguments);
  31871. };
  31872. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  31873. if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
  31874. return _superClass.prototype.parseExpressionStatement.apply(this, arguments);
  31875. }
  31876. if (this.match(types$1.colon)) {
  31877. var stmt = node;
  31878. stmt.label = this.finishPlaceholder(expr, "Identifier");
  31879. this.next();
  31880. stmt.body = this.parseStatement("label");
  31881. return this.finishNode(stmt, "LabeledStatement");
  31882. }
  31883. this.semicolon();
  31884. node.name = expr.name;
  31885. return this.finishPlaceholder(node, "Statement");
  31886. };
  31887. _proto.parseBlock = function parseBlock() {
  31888. return this.parsePlaceholder("BlockStatement") || _superClass.prototype.parseBlock.apply(this, arguments);
  31889. };
  31890. _proto.parseFunctionId = function parseFunctionId() {
  31891. return this.parsePlaceholder("Identifier") || _superClass.prototype.parseFunctionId.apply(this, arguments);
  31892. };
  31893. _proto.parseClass = function parseClass(node, isStatement, optionalId) {
  31894. var type = isStatement ? "ClassDeclaration" : "ClassExpression";
  31895. this.next();
  31896. this.takeDecorators(node);
  31897. var oldStrict = this.state.strict;
  31898. var placeholder = this.parsePlaceholder("Identifier");
  31899. if (placeholder) {
  31900. if (this.match(types$1._extends) || this.match(types$1.placeholder) || this.match(types$1.braceL)) {
  31901. node.id = placeholder;
  31902. } else if (optionalId || !isStatement) {
  31903. node.id = null;
  31904. node.body = this.finishPlaceholder(placeholder, "ClassBody");
  31905. return this.finishNode(node, type);
  31906. } else {
  31907. this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired);
  31908. }
  31909. } else {
  31910. this.parseClassId(node, isStatement, optionalId);
  31911. }
  31912. this.parseClassSuper(node);
  31913. node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
  31914. return this.finishNode(node, type);
  31915. };
  31916. _proto.parseExport = function parseExport(node) {
  31917. var placeholder = this.parsePlaceholder("Identifier");
  31918. if (!placeholder) return _superClass.prototype.parseExport.apply(this, arguments);
  31919. if (!this.isContextual("from") && !this.match(types$1.comma)) {
  31920. node.specifiers = [];
  31921. node.source = null;
  31922. node.declaration = this.finishPlaceholder(placeholder, "Declaration");
  31923. return this.finishNode(node, "ExportNamedDeclaration");
  31924. }
  31925. this.expectPlugin("exportDefaultFrom");
  31926. var specifier = this.startNode();
  31927. specifier.exported = placeholder;
  31928. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  31929. return _superClass.prototype.parseExport.call(this, node);
  31930. };
  31931. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  31932. if (this.match(types$1._default)) {
  31933. var next = this.nextTokenStart();
  31934. if (this.isUnparsedContextual(next, "from")) {
  31935. if (this.input.startsWith(types$1.placeholder.label, this.nextTokenStartSince(next + 4))) {
  31936. return true;
  31937. }
  31938. }
  31939. }
  31940. return _superClass.prototype.isExportDefaultSpecifier.call(this);
  31941. };
  31942. _proto.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) {
  31943. if (node.specifiers && node.specifiers.length > 0) {
  31944. return true;
  31945. }
  31946. return _superClass.prototype.maybeParseExportDefaultSpecifier.apply(this, arguments);
  31947. };
  31948. _proto.checkExport = function checkExport(node) {
  31949. var specifiers = node.specifiers;
  31950. if (specifiers != null && specifiers.length) {
  31951. node.specifiers = specifiers.filter(function (node) {
  31952. return node.exported.type === "Placeholder";
  31953. });
  31954. }
  31955. _superClass.prototype.checkExport.call(this, node);
  31956. node.specifiers = specifiers;
  31957. };
  31958. _proto.parseImport = function parseImport(node) {
  31959. var placeholder = this.parsePlaceholder("Identifier");
  31960. if (!placeholder) return _superClass.prototype.parseImport.apply(this, arguments);
  31961. node.specifiers = [];
  31962. if (!this.isContextual("from") && !this.match(types$1.comma)) {
  31963. node.source = this.finishPlaceholder(placeholder, "StringLiteral");
  31964. this.semicolon();
  31965. return this.finishNode(node, "ImportDeclaration");
  31966. }
  31967. var specifier = this.startNodeAtNode(placeholder);
  31968. specifier.local = placeholder;
  31969. this.finishNode(specifier, "ImportDefaultSpecifier");
  31970. node.specifiers.push(specifier);
  31971. if (this.eat(types$1.comma)) {
  31972. var hasStarImport = this.maybeParseStarImportSpecifier(node);
  31973. if (!hasStarImport) this.parseNamedImportSpecifiers(node);
  31974. }
  31975. this.expectContextual("from");
  31976. node.source = this.parseImportSource();
  31977. this.semicolon();
  31978. return this.finishNode(node, "ImportDeclaration");
  31979. };
  31980. _proto.parseImportSource = function parseImportSource() {
  31981. return this.parsePlaceholder("StringLiteral") || _superClass.prototype.parseImportSource.apply(this, arguments);
  31982. };
  31983. return _class;
  31984. }(superClass);
  31985. });
  31986. var v8intrinsic = (function (superClass) {
  31987. return function (_superClass) {
  31988. _inherits(_class, _superClass);
  31989. function _class() {
  31990. return _superClass.apply(this, arguments) || this;
  31991. }
  31992. var _proto = _class.prototype;
  31993. _proto.parseV8Intrinsic = function parseV8Intrinsic() {
  31994. if (this.match(types$1.modulo)) {
  31995. var v8IntrinsicStart = this.state.start;
  31996. var node = this.startNode();
  31997. this.eat(types$1.modulo);
  31998. if (this.match(types$1.name)) {
  31999. var name = this.parseIdentifierName(this.state.start);
  32000. var identifier = this.createIdentifier(node, name);
  32001. identifier.type = "V8IntrinsicIdentifier";
  32002. if (this.match(types$1.parenL)) {
  32003. return identifier;
  32004. }
  32005. }
  32006. this.unexpected(v8IntrinsicStart);
  32007. }
  32008. };
  32009. _proto.parseExprAtom = function parseExprAtom() {
  32010. return this.parseV8Intrinsic() || _superClass.prototype.parseExprAtom.apply(this, arguments);
  32011. };
  32012. return _class;
  32013. }(superClass);
  32014. });
  32015. function hasPlugin(plugins, name) {
  32016. return plugins.some(function (plugin) {
  32017. if (Array.isArray(plugin)) {
  32018. return plugin[0] === name;
  32019. } else {
  32020. return plugin === name;
  32021. }
  32022. });
  32023. }
  32024. function getPluginOption(plugins, name, option) {
  32025. var plugin = plugins.find(function (plugin) {
  32026. if (Array.isArray(plugin)) {
  32027. return plugin[0] === name;
  32028. } else {
  32029. return plugin === name;
  32030. }
  32031. });
  32032. if (plugin && Array.isArray(plugin)) {
  32033. return plugin[1][option];
  32034. }
  32035. return null;
  32036. }
  32037. var PIPELINE_PROPOSALS = ["minimal", "smart", "fsharp"];
  32038. var RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
  32039. function validatePlugins(plugins) {
  32040. if (hasPlugin(plugins, "decorators")) {
  32041. if (hasPlugin(plugins, "decorators-legacy")) {
  32042. throw new Error("Cannot use the decorators and decorators-legacy plugin together");
  32043. }
  32044. var decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
  32045. if (decoratorsBeforeExport == null) {
  32046. throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'.");
  32047. } else if (typeof decoratorsBeforeExport !== "boolean") {
  32048. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  32049. }
  32050. }
  32051. if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
  32052. throw new Error("Cannot combine flow and typescript plugins.");
  32053. }
  32054. if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
  32055. throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
  32056. }
  32057. if (hasPlugin(plugins, "pipelineOperator") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, "pipelineOperator", "proposal"))) {
  32058. throw new Error("'pipelineOperator' requires 'proposal' option whose value should be one of: " + PIPELINE_PROPOSALS.map(function (p) {
  32059. return "'" + p + "'";
  32060. }).join(", "));
  32061. }
  32062. if (hasPlugin(plugins, "moduleAttributes")) {
  32063. {
  32064. if (hasPlugin(plugins, "importAssertions")) {
  32065. throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
  32066. }
  32067. var moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
  32068. if (moduleAttributesVerionPluginOption !== "may-2020") {
  32069. throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
  32070. }
  32071. }
  32072. }
  32073. if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
  32074. throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(function (p) {
  32075. return "'" + p + "'";
  32076. }).join(", "));
  32077. }
  32078. if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
  32079. var error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
  32080. error.missingPlugins = "doExpressions";
  32081. throw error;
  32082. }
  32083. }
  32084. var mixinPlugins = {
  32085. estree: estree,
  32086. jsx: jsx$1,
  32087. flow: flow,
  32088. typescript: typescript,
  32089. v8intrinsic: v8intrinsic,
  32090. placeholders: placeholders
  32091. };
  32092. var mixinPluginNames = Object.keys(mixinPlugins);
  32093. var defaultOptions = {
  32094. sourceType: "script",
  32095. sourceFilename: undefined,
  32096. startLine: 1,
  32097. allowAwaitOutsideFunction: false,
  32098. allowReturnOutsideFunction: false,
  32099. allowImportExportEverywhere: false,
  32100. allowSuperOutsideMethod: false,
  32101. allowUndeclaredExports: false,
  32102. plugins: [],
  32103. strictMode: null,
  32104. ranges: false,
  32105. tokens: false,
  32106. createParenthesizedExpressions: false,
  32107. errorRecovery: false
  32108. };
  32109. function getOptions(opts) {
  32110. var options = {};
  32111. for (var _i2 = 0, _Object$keys2 = Object.keys(defaultOptions); _i2 < _Object$keys2.length; _i2++) {
  32112. var key = _Object$keys2[_i2];
  32113. options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
  32114. }
  32115. return options;
  32116. }
  32117. var _isDigit = function isDigit(code) {
  32118. return code >= 48 && code <= 57;
  32119. };
  32120. var VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100]);
  32121. var forbiddenNumericSeparatorSiblings = {
  32122. decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
  32123. hex: [46, 88, 95, 120]
  32124. };
  32125. var allowedNumericSeparatorSiblings = {};
  32126. allowedNumericSeparatorSiblings.bin = [48, 49];
  32127. allowedNumericSeparatorSiblings.oct = [].concat(allowedNumericSeparatorSiblings.bin, [50, 51, 52, 53, 54, 55]);
  32128. allowedNumericSeparatorSiblings.dec = [].concat(allowedNumericSeparatorSiblings.oct, [56, 57]);
  32129. allowedNumericSeparatorSiblings.hex = [].concat(allowedNumericSeparatorSiblings.dec, [65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]);
  32130. var Token = function Token(state) {
  32131. this.type = state.type;
  32132. this.value = state.value;
  32133. this.start = state.start;
  32134. this.end = state.end;
  32135. this.loc = new SourceLocation(state.startLoc, state.endLoc);
  32136. };
  32137. var Tokenizer = function (_ParserErrors) {
  32138. _inherits(Tokenizer, _ParserErrors);
  32139. function Tokenizer(options, input) {
  32140. var _this;
  32141. _this = _ParserErrors.call(this) || this;
  32142. _this.isLookahead = void 0;
  32143. _this.tokens = [];
  32144. _this.state = new State();
  32145. _this.state.init(options);
  32146. _this.input = input;
  32147. _this.length = input.length;
  32148. _this.isLookahead = false;
  32149. return _this;
  32150. }
  32151. var _proto = Tokenizer.prototype;
  32152. _proto.pushToken = function pushToken(token) {
  32153. this.tokens.length = this.state.tokensLength;
  32154. this.tokens.push(token);
  32155. ++this.state.tokensLength;
  32156. };
  32157. _proto.next = function next() {
  32158. this.checkKeywordEscapes();
  32159. if (this.options.tokens) {
  32160. this.pushToken(new Token(this.state));
  32161. }
  32162. this.state.lastTokEnd = this.state.end;
  32163. this.state.lastTokStart = this.state.start;
  32164. this.state.lastTokEndLoc = this.state.endLoc;
  32165. this.state.lastTokStartLoc = this.state.startLoc;
  32166. this.nextToken();
  32167. };
  32168. _proto.eat = function eat(type) {
  32169. if (this.match(type)) {
  32170. this.next();
  32171. return true;
  32172. } else {
  32173. return false;
  32174. }
  32175. };
  32176. _proto.match = function match(type) {
  32177. return this.state.type === type;
  32178. };
  32179. _proto.createLookaheadState = function createLookaheadState(state) {
  32180. return {
  32181. pos: state.pos,
  32182. value: null,
  32183. type: state.type,
  32184. start: state.start,
  32185. end: state.end,
  32186. lastTokEnd: state.end,
  32187. context: [this.curContext()],
  32188. inType: state.inType
  32189. };
  32190. };
  32191. _proto.lookahead = function lookahead() {
  32192. var old = this.state;
  32193. this.state = this.createLookaheadState(old);
  32194. this.isLookahead = true;
  32195. this.nextToken();
  32196. this.isLookahead = false;
  32197. var curr = this.state;
  32198. this.state = old;
  32199. return curr;
  32200. };
  32201. _proto.nextTokenStart = function nextTokenStart() {
  32202. return this.nextTokenStartSince(this.state.pos);
  32203. };
  32204. _proto.nextTokenStartSince = function nextTokenStartSince(pos) {
  32205. skipWhiteSpace.lastIndex = pos;
  32206. var skip = skipWhiteSpace.exec(this.input);
  32207. return pos + skip[0].length;
  32208. };
  32209. _proto.lookaheadCharCode = function lookaheadCharCode() {
  32210. return this.input.charCodeAt(this.nextTokenStart());
  32211. };
  32212. _proto.codePointAtPos = function codePointAtPos(pos) {
  32213. var cp = this.input.charCodeAt(pos);
  32214. if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {
  32215. var trail = this.input.charCodeAt(pos);
  32216. if ((trail & 0xfc00) === 0xdc00) {
  32217. cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
  32218. }
  32219. }
  32220. return cp;
  32221. };
  32222. _proto.setStrict = function setStrict(strict) {
  32223. var _this2 = this;
  32224. this.state.strict = strict;
  32225. if (strict) {
  32226. this.state.strictErrors.forEach(function (message, pos) {
  32227. return _this2.raise(pos, message);
  32228. });
  32229. this.state.strictErrors.clear();
  32230. }
  32231. };
  32232. _proto.curContext = function curContext() {
  32233. return this.state.context[this.state.context.length - 1];
  32234. };
  32235. _proto.nextToken = function nextToken() {
  32236. var curContext = this.curContext();
  32237. if (!curContext.preserveSpace) this.skipSpace();
  32238. this.state.start = this.state.pos;
  32239. if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
  32240. if (this.state.pos >= this.length) {
  32241. this.finishToken(types$1.eof);
  32242. return;
  32243. }
  32244. if (curContext === types.template) {
  32245. this.readTmplToken();
  32246. } else {
  32247. this.getTokenFromCode(this.codePointAtPos(this.state.pos));
  32248. }
  32249. };
  32250. _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {
  32251. var comment = {
  32252. type: block ? "CommentBlock" : "CommentLine",
  32253. value: text,
  32254. start: start,
  32255. end: end,
  32256. loc: new SourceLocation(startLoc, endLoc)
  32257. };
  32258. if (this.options.tokens) this.pushToken(comment);
  32259. this.state.comments.push(comment);
  32260. this.addComment(comment);
  32261. };
  32262. _proto.skipBlockComment = function skipBlockComment() {
  32263. var startLoc;
  32264. if (!this.isLookahead) startLoc = this.state.curPosition();
  32265. var start = this.state.pos;
  32266. var end = this.input.indexOf("*/", this.state.pos + 2);
  32267. if (end === -1) throw this.raise(start, ErrorMessages.UnterminatedComment);
  32268. this.state.pos = end + 2;
  32269. lineBreakG.lastIndex = start;
  32270. var match;
  32271. while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {
  32272. ++this.state.curLine;
  32273. this.state.lineStart = match.index + match[0].length;
  32274. }
  32275. if (this.isLookahead) return;
  32276. this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());
  32277. };
  32278. _proto.skipLineComment = function skipLineComment(startSkip) {
  32279. var start = this.state.pos;
  32280. var startLoc;
  32281. if (!this.isLookahead) startLoc = this.state.curPosition();
  32282. var ch = this.input.charCodeAt(this.state.pos += startSkip);
  32283. if (this.state.pos < this.length) {
  32284. while (!isNewLine(ch) && ++this.state.pos < this.length) {
  32285. ch = this.input.charCodeAt(this.state.pos);
  32286. }
  32287. }
  32288. if (this.isLookahead) return;
  32289. this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());
  32290. };
  32291. _proto.skipSpace = function skipSpace() {
  32292. loop: while (this.state.pos < this.length) {
  32293. var ch = this.input.charCodeAt(this.state.pos);
  32294. switch (ch) {
  32295. case 32:
  32296. case 160:
  32297. case 9:
  32298. ++this.state.pos;
  32299. break;
  32300. case 13:
  32301. if (this.input.charCodeAt(this.state.pos + 1) === 10) {
  32302. ++this.state.pos;
  32303. }
  32304. case 10:
  32305. case 8232:
  32306. case 8233:
  32307. ++this.state.pos;
  32308. ++this.state.curLine;
  32309. this.state.lineStart = this.state.pos;
  32310. break;
  32311. case 47:
  32312. switch (this.input.charCodeAt(this.state.pos + 1)) {
  32313. case 42:
  32314. this.skipBlockComment();
  32315. break;
  32316. case 47:
  32317. this.skipLineComment(2);
  32318. break;
  32319. default:
  32320. break loop;
  32321. }
  32322. break;
  32323. default:
  32324. if (isWhitespace(ch)) {
  32325. ++this.state.pos;
  32326. } else {
  32327. break loop;
  32328. }
  32329. }
  32330. }
  32331. };
  32332. _proto.finishToken = function finishToken(type, val) {
  32333. this.state.end = this.state.pos;
  32334. var prevType = this.state.type;
  32335. this.state.type = type;
  32336. this.state.value = val;
  32337. if (!this.isLookahead) {
  32338. this.state.endLoc = this.state.curPosition();
  32339. this.updateContext(prevType);
  32340. }
  32341. };
  32342. _proto.readToken_numberSign = function readToken_numberSign() {
  32343. if (this.state.pos === 0 && this.readToken_interpreter()) {
  32344. return;
  32345. }
  32346. var nextPos = this.state.pos + 1;
  32347. var next = this.codePointAtPos(nextPos);
  32348. if (next >= 48 && next <= 57) {
  32349. throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash);
  32350. }
  32351. if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
  32352. this.expectPlugin("recordAndTuple");
  32353. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
  32354. throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType);
  32355. }
  32356. this.state.pos += 2;
  32357. if (next === 123) {
  32358. this.finishToken(types$1.braceHashL);
  32359. } else {
  32360. this.finishToken(types$1.bracketHashL);
  32361. }
  32362. } else if (isIdentifierStart(next)) {
  32363. ++this.state.pos;
  32364. this.finishToken(types$1.privateName, this.readWord1(next));
  32365. } else if (next === 92) {
  32366. ++this.state.pos;
  32367. this.finishToken(types$1.privateName, this.readWord1());
  32368. } else {
  32369. this.finishOp(types$1.hash, 1);
  32370. }
  32371. };
  32372. _proto.readToken_dot = function readToken_dot() {
  32373. var next = this.input.charCodeAt(this.state.pos + 1);
  32374. if (next >= 48 && next <= 57) {
  32375. this.readNumber(true);
  32376. return;
  32377. }
  32378. if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
  32379. this.state.pos += 3;
  32380. this.finishToken(types$1.ellipsis);
  32381. } else {
  32382. ++this.state.pos;
  32383. this.finishToken(types$1.dot);
  32384. }
  32385. };
  32386. _proto.readToken_slash = function readToken_slash() {
  32387. var next = this.input.charCodeAt(this.state.pos + 1);
  32388. if (next === 61) {
  32389. this.finishOp(types$1.slashAssign, 2);
  32390. } else {
  32391. this.finishOp(types$1.slash, 1);
  32392. }
  32393. };
  32394. _proto.readToken_interpreter = function readToken_interpreter() {
  32395. if (this.state.pos !== 0 || this.length < 2) return false;
  32396. var ch = this.input.charCodeAt(this.state.pos + 1);
  32397. if (ch !== 33) return false;
  32398. var start = this.state.pos;
  32399. this.state.pos += 1;
  32400. while (!isNewLine(ch) && ++this.state.pos < this.length) {
  32401. ch = this.input.charCodeAt(this.state.pos);
  32402. }
  32403. var value = this.input.slice(start + 2, this.state.pos);
  32404. this.finishToken(types$1.interpreterDirective, value);
  32405. return true;
  32406. };
  32407. _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {
  32408. var type = code === 42 ? types$1.star : types$1.modulo;
  32409. var width = 1;
  32410. var next = this.input.charCodeAt(this.state.pos + 1);
  32411. if (code === 42 && next === 42) {
  32412. width++;
  32413. next = this.input.charCodeAt(this.state.pos + 2);
  32414. type = types$1.exponent;
  32415. }
  32416. if (next === 61 && !this.state.inType) {
  32417. width++;
  32418. type = types$1.assign;
  32419. }
  32420. this.finishOp(type, width);
  32421. };
  32422. _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {
  32423. var next = this.input.charCodeAt(this.state.pos + 1);
  32424. if (next === code) {
  32425. if (this.input.charCodeAt(this.state.pos + 2) === 61) {
  32426. this.finishOp(types$1.assign, 3);
  32427. } else {
  32428. this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2);
  32429. }
  32430. return;
  32431. }
  32432. if (code === 124) {
  32433. if (next === 62) {
  32434. this.finishOp(types$1.pipeline, 2);
  32435. return;
  32436. }
  32437. if (this.hasPlugin("recordAndTuple") && next === 125) {
  32438. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  32439. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType);
  32440. }
  32441. this.state.pos += 2;
  32442. this.finishToken(types$1.braceBarR);
  32443. return;
  32444. }
  32445. if (this.hasPlugin("recordAndTuple") && next === 93) {
  32446. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  32447. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType);
  32448. }
  32449. this.state.pos += 2;
  32450. this.finishToken(types$1.bracketBarR);
  32451. return;
  32452. }
  32453. }
  32454. if (next === 61) {
  32455. this.finishOp(types$1.assign, 2);
  32456. return;
  32457. }
  32458. this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1);
  32459. };
  32460. _proto.readToken_caret = function readToken_caret() {
  32461. var next = this.input.charCodeAt(this.state.pos + 1);
  32462. if (next === 61) {
  32463. this.finishOp(types$1.assign, 2);
  32464. } else {
  32465. this.finishOp(types$1.bitwiseXOR, 1);
  32466. }
  32467. };
  32468. _proto.readToken_plus_min = function readToken_plus_min(code) {
  32469. var next = this.input.charCodeAt(this.state.pos + 1);
  32470. if (next === code) {
  32471. if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && (this.state.lastTokEnd === 0 || this.hasPrecedingLineBreak())) {
  32472. this.skipLineComment(3);
  32473. this.skipSpace();
  32474. this.nextToken();
  32475. return;
  32476. }
  32477. this.finishOp(types$1.incDec, 2);
  32478. return;
  32479. }
  32480. if (next === 61) {
  32481. this.finishOp(types$1.assign, 2);
  32482. } else {
  32483. this.finishOp(types$1.plusMin, 1);
  32484. }
  32485. };
  32486. _proto.readToken_lt_gt = function readToken_lt_gt(code) {
  32487. var next = this.input.charCodeAt(this.state.pos + 1);
  32488. var size = 1;
  32489. if (next === code) {
  32490. size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;
  32491. if (this.input.charCodeAt(this.state.pos + size) === 61) {
  32492. this.finishOp(types$1.assign, size + 1);
  32493. return;
  32494. }
  32495. this.finishOp(types$1.bitShift, size);
  32496. return;
  32497. }
  32498. if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {
  32499. this.skipLineComment(4);
  32500. this.skipSpace();
  32501. this.nextToken();
  32502. return;
  32503. }
  32504. if (next === 61) {
  32505. size = 2;
  32506. }
  32507. this.finishOp(types$1.relational, size);
  32508. };
  32509. _proto.readToken_eq_excl = function readToken_eq_excl(code) {
  32510. var next = this.input.charCodeAt(this.state.pos + 1);
  32511. if (next === 61) {
  32512. this.finishOp(types$1.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
  32513. return;
  32514. }
  32515. if (code === 61 && next === 62) {
  32516. this.state.pos += 2;
  32517. this.finishToken(types$1.arrow);
  32518. return;
  32519. }
  32520. this.finishOp(code === 61 ? types$1.eq : types$1.bang, 1);
  32521. };
  32522. _proto.readToken_question = function readToken_question() {
  32523. var next = this.input.charCodeAt(this.state.pos + 1);
  32524. var next2 = this.input.charCodeAt(this.state.pos + 2);
  32525. if (next === 63) {
  32526. if (next2 === 61) {
  32527. this.finishOp(types$1.assign, 3);
  32528. } else {
  32529. this.finishOp(types$1.nullishCoalescing, 2);
  32530. }
  32531. } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
  32532. this.state.pos += 2;
  32533. this.finishToken(types$1.questionDot);
  32534. } else {
  32535. ++this.state.pos;
  32536. this.finishToken(types$1.question);
  32537. }
  32538. };
  32539. _proto.getTokenFromCode = function getTokenFromCode(code) {
  32540. switch (code) {
  32541. case 46:
  32542. this.readToken_dot();
  32543. return;
  32544. case 40:
  32545. ++this.state.pos;
  32546. this.finishToken(types$1.parenL);
  32547. return;
  32548. case 41:
  32549. ++this.state.pos;
  32550. this.finishToken(types$1.parenR);
  32551. return;
  32552. case 59:
  32553. ++this.state.pos;
  32554. this.finishToken(types$1.semi);
  32555. return;
  32556. case 44:
  32557. ++this.state.pos;
  32558. this.finishToken(types$1.comma);
  32559. return;
  32560. case 91:
  32561. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  32562. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  32563. throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType);
  32564. }
  32565. this.state.pos += 2;
  32566. this.finishToken(types$1.bracketBarL);
  32567. } else {
  32568. ++this.state.pos;
  32569. this.finishToken(types$1.bracketL);
  32570. }
  32571. return;
  32572. case 93:
  32573. ++this.state.pos;
  32574. this.finishToken(types$1.bracketR);
  32575. return;
  32576. case 123:
  32577. if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
  32578. if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
  32579. throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType);
  32580. }
  32581. this.state.pos += 2;
  32582. this.finishToken(types$1.braceBarL);
  32583. } else {
  32584. ++this.state.pos;
  32585. this.finishToken(types$1.braceL);
  32586. }
  32587. return;
  32588. case 125:
  32589. ++this.state.pos;
  32590. this.finishToken(types$1.braceR);
  32591. return;
  32592. case 58:
  32593. if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
  32594. this.finishOp(types$1.doubleColon, 2);
  32595. } else {
  32596. ++this.state.pos;
  32597. this.finishToken(types$1.colon);
  32598. }
  32599. return;
  32600. case 63:
  32601. this.readToken_question();
  32602. return;
  32603. case 96:
  32604. ++this.state.pos;
  32605. this.finishToken(types$1.backQuote);
  32606. return;
  32607. case 48:
  32608. {
  32609. var next = this.input.charCodeAt(this.state.pos + 1);
  32610. if (next === 120 || next === 88) {
  32611. this.readRadixNumber(16);
  32612. return;
  32613. }
  32614. if (next === 111 || next === 79) {
  32615. this.readRadixNumber(8);
  32616. return;
  32617. }
  32618. if (next === 98 || next === 66) {
  32619. this.readRadixNumber(2);
  32620. return;
  32621. }
  32622. }
  32623. case 49:
  32624. case 50:
  32625. case 51:
  32626. case 52:
  32627. case 53:
  32628. case 54:
  32629. case 55:
  32630. case 56:
  32631. case 57:
  32632. this.readNumber(false);
  32633. return;
  32634. case 34:
  32635. case 39:
  32636. this.readString(code);
  32637. return;
  32638. case 47:
  32639. this.readToken_slash();
  32640. return;
  32641. case 37:
  32642. case 42:
  32643. this.readToken_mult_modulo(code);
  32644. return;
  32645. case 124:
  32646. case 38:
  32647. this.readToken_pipe_amp(code);
  32648. return;
  32649. case 94:
  32650. this.readToken_caret();
  32651. return;
  32652. case 43:
  32653. case 45:
  32654. this.readToken_plus_min(code);
  32655. return;
  32656. case 60:
  32657. case 62:
  32658. this.readToken_lt_gt(code);
  32659. return;
  32660. case 61:
  32661. case 33:
  32662. this.readToken_eq_excl(code);
  32663. return;
  32664. case 126:
  32665. this.finishOp(types$1.tilde, 1);
  32666. return;
  32667. case 64:
  32668. ++this.state.pos;
  32669. this.finishToken(types$1.at);
  32670. return;
  32671. case 35:
  32672. this.readToken_numberSign();
  32673. return;
  32674. case 92:
  32675. this.readWord();
  32676. return;
  32677. default:
  32678. if (isIdentifierStart(code)) {
  32679. this.readWord(code);
  32680. return;
  32681. }
  32682. }
  32683. throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code));
  32684. };
  32685. _proto.finishOp = function finishOp(type, size) {
  32686. var str = this.input.slice(this.state.pos, this.state.pos + size);
  32687. this.state.pos += size;
  32688. this.finishToken(type, str);
  32689. };
  32690. _proto.readRegexp = function readRegexp() {
  32691. var start = this.state.start + 1;
  32692. var escaped, inClass;
  32693. var pos = this.state.pos;
  32694. for (;; ++pos) {
  32695. if (pos >= this.length) {
  32696. throw this.raise(start, ErrorMessages.UnterminatedRegExp);
  32697. }
  32698. var ch = this.input.charCodeAt(pos);
  32699. if (isNewLine(ch)) {
  32700. throw this.raise(start, ErrorMessages.UnterminatedRegExp);
  32701. }
  32702. if (escaped) {
  32703. escaped = false;
  32704. } else {
  32705. if (ch === 91) {
  32706. inClass = true;
  32707. } else if (ch === 93 && inClass) {
  32708. inClass = false;
  32709. } else if (ch === 47 && !inClass) {
  32710. break;
  32711. }
  32712. escaped = ch === 92;
  32713. }
  32714. }
  32715. var content = this.input.slice(start, pos);
  32716. ++pos;
  32717. var mods = "";
  32718. while (pos < this.length) {
  32719. var cp = this.codePointAtPos(pos);
  32720. var _char = String.fromCharCode(cp);
  32721. if (VALID_REGEX_FLAGS.has(cp)) {
  32722. if (mods.includes(_char)) {
  32723. this.raise(pos + 1, ErrorMessages.DuplicateRegExpFlags);
  32724. }
  32725. } else if (isIdentifierChar(cp) || cp === 92) {
  32726. this.raise(pos + 1, ErrorMessages.MalformedRegExpFlags);
  32727. } else {
  32728. break;
  32729. }
  32730. ++pos;
  32731. mods += _char;
  32732. }
  32733. this.state.pos = pos;
  32734. this.finishToken(types$1.regexp, {
  32735. pattern: content,
  32736. flags: mods
  32737. });
  32738. };
  32739. _proto.readInt = function readInt(radix, len, forceLen, allowNumSeparator) {
  32740. if (allowNumSeparator === void 0) {
  32741. allowNumSeparator = true;
  32742. }
  32743. var start = this.state.pos;
  32744. var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
  32745. var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
  32746. var invalid = false;
  32747. var total = 0;
  32748. for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
  32749. var code = this.input.charCodeAt(this.state.pos);
  32750. var val = void 0;
  32751. if (code === 95) {
  32752. var prev = this.input.charCodeAt(this.state.pos - 1);
  32753. var next = this.input.charCodeAt(this.state.pos + 1);
  32754. if (allowedSiblings.indexOf(next) === -1) {
  32755. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  32756. } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
  32757. this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator);
  32758. }
  32759. if (!allowNumSeparator) {
  32760. this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence);
  32761. }
  32762. ++this.state.pos;
  32763. continue;
  32764. }
  32765. if (code >= 97) {
  32766. val = code - 97 + 10;
  32767. } else if (code >= 65) {
  32768. val = code - 65 + 10;
  32769. } else if (_isDigit(code)) {
  32770. val = code - 48;
  32771. } else {
  32772. val = Infinity;
  32773. }
  32774. if (val >= radix) {
  32775. if (this.options.errorRecovery && val <= 9) {
  32776. val = 0;
  32777. this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix);
  32778. } else if (forceLen) {
  32779. val = 0;
  32780. invalid = true;
  32781. } else {
  32782. break;
  32783. }
  32784. }
  32785. ++this.state.pos;
  32786. total = total * radix + val;
  32787. }
  32788. if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) {
  32789. return null;
  32790. }
  32791. return total;
  32792. };
  32793. _proto.readRadixNumber = function readRadixNumber(radix) {
  32794. var start = this.state.pos;
  32795. var isBigInt = false;
  32796. this.state.pos += 2;
  32797. var val = this.readInt(radix);
  32798. if (val == null) {
  32799. this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix);
  32800. }
  32801. var next = this.input.charCodeAt(this.state.pos);
  32802. if (next === 110) {
  32803. ++this.state.pos;
  32804. isBigInt = true;
  32805. } else if (next === 109) {
  32806. throw this.raise(start, ErrorMessages.InvalidDecimal);
  32807. }
  32808. if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {
  32809. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  32810. }
  32811. if (isBigInt) {
  32812. var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, "");
  32813. this.finishToken(types$1.bigint, str);
  32814. return;
  32815. }
  32816. this.finishToken(types$1.num, val);
  32817. };
  32818. _proto.readNumber = function readNumber(startsWithDot) {
  32819. var start = this.state.pos;
  32820. var isFloat = false;
  32821. var isBigInt = false;
  32822. var isDecimal = false;
  32823. var hasExponent = false;
  32824. var isOctal = false;
  32825. if (!startsWithDot && this.readInt(10) === null) {
  32826. this.raise(start, ErrorMessages.InvalidNumber);
  32827. }
  32828. var hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48;
  32829. if (hasLeadingZero) {
  32830. var integer = this.input.slice(start, this.state.pos);
  32831. this.recordStrictModeErrors(start, ErrorMessages.StrictOctalLiteral);
  32832. if (!this.state.strict) {
  32833. var underscorePos = integer.indexOf("_");
  32834. if (underscorePos > 0) {
  32835. this.raise(underscorePos + start, ErrorMessages.ZeroDigitNumericSeparator);
  32836. }
  32837. }
  32838. isOctal = hasLeadingZero && !/[89]/.test(integer);
  32839. }
  32840. var next = this.input.charCodeAt(this.state.pos);
  32841. if (next === 46 && !isOctal) {
  32842. ++this.state.pos;
  32843. this.readInt(10);
  32844. isFloat = true;
  32845. next = this.input.charCodeAt(this.state.pos);
  32846. }
  32847. if ((next === 69 || next === 101) && !isOctal) {
  32848. next = this.input.charCodeAt(++this.state.pos);
  32849. if (next === 43 || next === 45) {
  32850. ++this.state.pos;
  32851. }
  32852. if (this.readInt(10) === null) {
  32853. this.raise(start, ErrorMessages.InvalidOrMissingExponent);
  32854. }
  32855. isFloat = true;
  32856. hasExponent = true;
  32857. next = this.input.charCodeAt(this.state.pos);
  32858. }
  32859. if (next === 110) {
  32860. if (isFloat || hasLeadingZero) {
  32861. this.raise(start, ErrorMessages.InvalidBigIntLiteral);
  32862. }
  32863. ++this.state.pos;
  32864. isBigInt = true;
  32865. }
  32866. if (next === 109) {
  32867. this.expectPlugin("decimal", this.state.pos);
  32868. if (hasExponent || hasLeadingZero) {
  32869. this.raise(start, ErrorMessages.InvalidDecimal);
  32870. }
  32871. ++this.state.pos;
  32872. isDecimal = true;
  32873. }
  32874. if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {
  32875. throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier);
  32876. }
  32877. var str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
  32878. if (isBigInt) {
  32879. this.finishToken(types$1.bigint, str);
  32880. return;
  32881. }
  32882. if (isDecimal) {
  32883. this.finishToken(types$1.decimal, str);
  32884. return;
  32885. }
  32886. var val = isOctal ? parseInt(str, 8) : parseFloat(str);
  32887. this.finishToken(types$1.num, val);
  32888. };
  32889. _proto.readCodePoint = function readCodePoint(throwOnInvalid) {
  32890. var ch = this.input.charCodeAt(this.state.pos);
  32891. var code;
  32892. if (ch === 123) {
  32893. var codePos = ++this.state.pos;
  32894. code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
  32895. ++this.state.pos;
  32896. if (code !== null && code > 0x10ffff) {
  32897. if (throwOnInvalid) {
  32898. this.raise(codePos, ErrorMessages.InvalidCodePoint);
  32899. } else {
  32900. return null;
  32901. }
  32902. }
  32903. } else {
  32904. code = this.readHexChar(4, false, throwOnInvalid);
  32905. }
  32906. return code;
  32907. };
  32908. _proto.readString = function readString(quote) {
  32909. var out = "",
  32910. chunkStart = ++this.state.pos;
  32911. for (;;) {
  32912. if (this.state.pos >= this.length) {
  32913. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  32914. }
  32915. var ch = this.input.charCodeAt(this.state.pos);
  32916. if (ch === quote) break;
  32917. if (ch === 92) {
  32918. out += this.input.slice(chunkStart, this.state.pos);
  32919. out += this.readEscapedChar(false);
  32920. chunkStart = this.state.pos;
  32921. } else if (ch === 8232 || ch === 8233) {
  32922. ++this.state.pos;
  32923. ++this.state.curLine;
  32924. this.state.lineStart = this.state.pos;
  32925. } else if (isNewLine(ch)) {
  32926. throw this.raise(this.state.start, ErrorMessages.UnterminatedString);
  32927. } else {
  32928. ++this.state.pos;
  32929. }
  32930. }
  32931. out += this.input.slice(chunkStart, this.state.pos++);
  32932. this.finishToken(types$1.string, out);
  32933. };
  32934. _proto.readTmplToken = function readTmplToken() {
  32935. var out = "",
  32936. chunkStart = this.state.pos,
  32937. containsInvalid = false;
  32938. for (;;) {
  32939. if (this.state.pos >= this.length) {
  32940. throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate);
  32941. }
  32942. var ch = this.input.charCodeAt(this.state.pos);
  32943. if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
  32944. if (this.state.pos === this.state.start && this.match(types$1.template)) {
  32945. if (ch === 36) {
  32946. this.state.pos += 2;
  32947. this.finishToken(types$1.dollarBraceL);
  32948. return;
  32949. } else {
  32950. ++this.state.pos;
  32951. this.finishToken(types$1.backQuote);
  32952. return;
  32953. }
  32954. }
  32955. out += this.input.slice(chunkStart, this.state.pos);
  32956. this.finishToken(types$1.template, containsInvalid ? null : out);
  32957. return;
  32958. }
  32959. if (ch === 92) {
  32960. out += this.input.slice(chunkStart, this.state.pos);
  32961. var escaped = this.readEscapedChar(true);
  32962. if (escaped === null) {
  32963. containsInvalid = true;
  32964. } else {
  32965. out += escaped;
  32966. }
  32967. chunkStart = this.state.pos;
  32968. } else if (isNewLine(ch)) {
  32969. out += this.input.slice(chunkStart, this.state.pos);
  32970. ++this.state.pos;
  32971. switch (ch) {
  32972. case 13:
  32973. if (this.input.charCodeAt(this.state.pos) === 10) {
  32974. ++this.state.pos;
  32975. }
  32976. case 10:
  32977. out += "\n";
  32978. break;
  32979. default:
  32980. out += String.fromCharCode(ch);
  32981. break;
  32982. }
  32983. ++this.state.curLine;
  32984. this.state.lineStart = this.state.pos;
  32985. chunkStart = this.state.pos;
  32986. } else {
  32987. ++this.state.pos;
  32988. }
  32989. }
  32990. };
  32991. _proto.recordStrictModeErrors = function recordStrictModeErrors(pos, message) {
  32992. if (this.state.strict && !this.state.strictErrors.has(pos)) {
  32993. this.raise(pos, message);
  32994. } else {
  32995. this.state.strictErrors.set(pos, message);
  32996. }
  32997. };
  32998. _proto.readEscapedChar = function readEscapedChar(inTemplate) {
  32999. var throwOnInvalid = !inTemplate;
  33000. var ch = this.input.charCodeAt(++this.state.pos);
  33001. ++this.state.pos;
  33002. switch (ch) {
  33003. case 110:
  33004. return "\n";
  33005. case 114:
  33006. return "\r";
  33007. case 120:
  33008. {
  33009. var code = this.readHexChar(2, false, throwOnInvalid);
  33010. return code === null ? null : String.fromCharCode(code);
  33011. }
  33012. case 117:
  33013. {
  33014. var _code = this.readCodePoint(throwOnInvalid);
  33015. return _code === null ? null : String.fromCodePoint(_code);
  33016. }
  33017. case 116:
  33018. return "\t";
  33019. case 98:
  33020. return "\b";
  33021. case 118:
  33022. return "\x0B";
  33023. case 102:
  33024. return "\f";
  33025. case 13:
  33026. if (this.input.charCodeAt(this.state.pos) === 10) {
  33027. ++this.state.pos;
  33028. }
  33029. case 10:
  33030. this.state.lineStart = this.state.pos;
  33031. ++this.state.curLine;
  33032. case 8232:
  33033. case 8233:
  33034. return "";
  33035. case 56:
  33036. case 57:
  33037. if (inTemplate) {
  33038. return null;
  33039. } else {
  33040. this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape);
  33041. }
  33042. default:
  33043. if (ch >= 48 && ch <= 55) {
  33044. var codePos = this.state.pos - 1;
  33045. var match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
  33046. var octalStr = match[0];
  33047. var octal = parseInt(octalStr, 8);
  33048. if (octal > 255) {
  33049. octalStr = octalStr.slice(0, -1);
  33050. octal = parseInt(octalStr, 8);
  33051. }
  33052. this.state.pos += octalStr.length - 1;
  33053. var next = this.input.charCodeAt(this.state.pos);
  33054. if (octalStr !== "0" || next === 56 || next === 57) {
  33055. if (inTemplate) {
  33056. return null;
  33057. } else {
  33058. this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape);
  33059. }
  33060. }
  33061. return String.fromCharCode(octal);
  33062. }
  33063. return String.fromCharCode(ch);
  33064. }
  33065. };
  33066. _proto.readHexChar = function readHexChar(len, forceLen, throwOnInvalid) {
  33067. var codePos = this.state.pos;
  33068. var n = this.readInt(16, len, forceLen, false);
  33069. if (n === null) {
  33070. if (throwOnInvalid) {
  33071. this.raise(codePos, ErrorMessages.InvalidEscapeSequence);
  33072. } else {
  33073. this.state.pos = codePos - 1;
  33074. }
  33075. }
  33076. return n;
  33077. };
  33078. _proto.readWord1 = function readWord1(firstCode) {
  33079. this.state.containsEsc = false;
  33080. var word = "";
  33081. var start = this.state.pos;
  33082. var chunkStart = this.state.pos;
  33083. if (firstCode !== undefined) {
  33084. this.state.pos += firstCode <= 0xffff ? 1 : 2;
  33085. }
  33086. while (this.state.pos < this.length) {
  33087. var ch = this.codePointAtPos(this.state.pos);
  33088. if (isIdentifierChar(ch)) {
  33089. this.state.pos += ch <= 0xffff ? 1 : 2;
  33090. } else if (ch === 92) {
  33091. this.state.containsEsc = true;
  33092. word += this.input.slice(chunkStart, this.state.pos);
  33093. var escStart = this.state.pos;
  33094. var identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
  33095. if (this.input.charCodeAt(++this.state.pos) !== 117) {
  33096. this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape);
  33097. chunkStart = this.state.pos - 1;
  33098. continue;
  33099. }
  33100. ++this.state.pos;
  33101. var esc = this.readCodePoint(true);
  33102. if (esc !== null) {
  33103. if (!identifierCheck(esc)) {
  33104. this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier);
  33105. }
  33106. word += String.fromCodePoint(esc);
  33107. }
  33108. chunkStart = this.state.pos;
  33109. } else {
  33110. break;
  33111. }
  33112. }
  33113. return word + this.input.slice(chunkStart, this.state.pos);
  33114. };
  33115. _proto.readWord = function readWord(firstCode) {
  33116. var word = this.readWord1(firstCode);
  33117. var type = keywords.get(word) || types$1.name;
  33118. this.finishToken(type, word);
  33119. };
  33120. _proto.checkKeywordEscapes = function checkKeywordEscapes() {
  33121. var kw = this.state.type.keyword;
  33122. if (kw && this.state.containsEsc) {
  33123. this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, kw);
  33124. }
  33125. };
  33126. _proto.updateContext = function updateContext(prevType) {
  33127. var _this$state$type$upda, _this$state$type;
  33128. (_this$state$type$upda = (_this$state$type = this.state.type).updateContext) == null ? void 0 : _this$state$type$upda.call(_this$state$type, this.state.context);
  33129. };
  33130. return Tokenizer;
  33131. }(ParserError);
  33132. var ClassScope = function ClassScope() {
  33133. this.privateNames = new Set();
  33134. this.loneAccessors = new Map();
  33135. this.undefinedPrivateNames = new Map();
  33136. };
  33137. var ClassScopeHandler = function () {
  33138. function ClassScopeHandler(raise) {
  33139. this.stack = [];
  33140. this.undefinedPrivateNames = new Map();
  33141. this.raise = raise;
  33142. }
  33143. var _proto = ClassScopeHandler.prototype;
  33144. _proto.current = function current() {
  33145. return this.stack[this.stack.length - 1];
  33146. };
  33147. _proto.enter = function enter() {
  33148. this.stack.push(new ClassScope());
  33149. };
  33150. _proto.exit = function exit() {
  33151. var oldClassScope = this.stack.pop();
  33152. var current = this.current();
  33153. for (var _i2 = 0, _Array$from2 = Array.from(oldClassScope.undefinedPrivateNames); _i2 < _Array$from2.length; _i2++) {
  33154. var _Array$from2$_i = _Array$from2[_i2],
  33155. name = _Array$from2$_i[0],
  33156. pos = _Array$from2$_i[1];
  33157. if (current) {
  33158. if (!current.undefinedPrivateNames.has(name)) {
  33159. current.undefinedPrivateNames.set(name, pos);
  33160. }
  33161. } else {
  33162. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name);
  33163. }
  33164. }
  33165. };
  33166. _proto.declarePrivateName = function declarePrivateName(name, elementType, pos) {
  33167. var classScope = this.current();
  33168. var redefined = classScope.privateNames.has(name);
  33169. if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
  33170. var accessor = redefined && classScope.loneAccessors.get(name);
  33171. if (accessor) {
  33172. var oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
  33173. var newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
  33174. var oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
  33175. var newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
  33176. redefined = oldKind === newKind || oldStatic !== newStatic;
  33177. if (!redefined) classScope.loneAccessors["delete"](name);
  33178. } else if (!redefined) {
  33179. classScope.loneAccessors.set(name, elementType);
  33180. }
  33181. }
  33182. if (redefined) {
  33183. this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name);
  33184. }
  33185. classScope.privateNames.add(name);
  33186. classScope.undefinedPrivateNames["delete"](name);
  33187. };
  33188. _proto.usePrivateName = function usePrivateName(name, pos) {
  33189. var classScope;
  33190. for (var _i4 = 0, _this$stack2 = this.stack; _i4 < _this$stack2.length; _i4++) {
  33191. classScope = _this$stack2[_i4];
  33192. if (classScope.privateNames.has(name)) return;
  33193. }
  33194. if (classScope) {
  33195. classScope.undefinedPrivateNames.set(name, pos);
  33196. } else {
  33197. this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name);
  33198. }
  33199. };
  33200. return ClassScopeHandler;
  33201. }();
  33202. var kExpression = 0,
  33203. kMaybeArrowParameterDeclaration = 1,
  33204. kMaybeAsyncArrowParameterDeclaration = 2,
  33205. kParameterDeclaration = 3;
  33206. var ExpressionScope = function () {
  33207. function ExpressionScope(type) {
  33208. if (type === void 0) {
  33209. type = kExpression;
  33210. }
  33211. this.type = void 0;
  33212. this.type = type;
  33213. }
  33214. var _proto = ExpressionScope.prototype;
  33215. _proto.canBeArrowParameterDeclaration = function canBeArrowParameterDeclaration() {
  33216. return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
  33217. };
  33218. _proto.isCertainlyParameterDeclaration = function isCertainlyParameterDeclaration() {
  33219. return this.type === kParameterDeclaration;
  33220. };
  33221. return ExpressionScope;
  33222. }();
  33223. var ArrowHeadParsingScope = function (_ExpressionScope) {
  33224. _inherits(ArrowHeadParsingScope, _ExpressionScope);
  33225. function ArrowHeadParsingScope(type) {
  33226. var _this;
  33227. _this = _ExpressionScope.call(this, type) || this;
  33228. _this.errors = new Map();
  33229. return _this;
  33230. }
  33231. var _proto2 = ArrowHeadParsingScope.prototype;
  33232. _proto2.recordDeclarationError = function recordDeclarationError(pos, template) {
  33233. this.errors.set(pos, template);
  33234. };
  33235. _proto2.clearDeclarationError = function clearDeclarationError(pos) {
  33236. this.errors["delete"](pos);
  33237. };
  33238. _proto2.iterateErrors = function iterateErrors(iterator) {
  33239. this.errors.forEach(iterator);
  33240. };
  33241. return ArrowHeadParsingScope;
  33242. }(ExpressionScope);
  33243. var ExpressionScopeHandler = function () {
  33244. function ExpressionScopeHandler(raise) {
  33245. this.stack = [new ExpressionScope()];
  33246. this.raise = raise;
  33247. }
  33248. var _proto3 = ExpressionScopeHandler.prototype;
  33249. _proto3.enter = function enter(scope) {
  33250. this.stack.push(scope);
  33251. };
  33252. _proto3.exit = function exit() {
  33253. this.stack.pop();
  33254. };
  33255. _proto3.recordParameterInitializerError = function recordParameterInitializerError(pos, template) {
  33256. var stack = this.stack;
  33257. var i = stack.length - 1;
  33258. var scope = stack[i];
  33259. while (!scope.isCertainlyParameterDeclaration()) {
  33260. if (scope.canBeArrowParameterDeclaration()) {
  33261. scope.recordDeclarationError(pos, template);
  33262. } else {
  33263. return;
  33264. }
  33265. scope = stack[--i];
  33266. }
  33267. this.raise(pos, template);
  33268. };
  33269. _proto3.recordParenthesizedIdentifierError = function recordParenthesizedIdentifierError(pos, template) {
  33270. var stack = this.stack;
  33271. var scope = stack[stack.length - 1];
  33272. if (scope.isCertainlyParameterDeclaration()) {
  33273. this.raise(pos, template);
  33274. } else if (scope.canBeArrowParameterDeclaration()) {
  33275. scope.recordDeclarationError(pos, template);
  33276. } else {
  33277. return;
  33278. }
  33279. };
  33280. _proto3.recordAsyncArrowParametersError = function recordAsyncArrowParametersError(pos, template) {
  33281. var stack = this.stack;
  33282. var i = stack.length - 1;
  33283. var scope = stack[i];
  33284. while (scope.canBeArrowParameterDeclaration()) {
  33285. if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
  33286. scope.recordDeclarationError(pos, template);
  33287. }
  33288. scope = stack[--i];
  33289. }
  33290. };
  33291. _proto3.validateAsPattern = function validateAsPattern() {
  33292. var _this2 = this;
  33293. var stack = this.stack;
  33294. var currentScope = stack[stack.length - 1];
  33295. if (!currentScope.canBeArrowParameterDeclaration()) return;
  33296. currentScope.iterateErrors(function (template, pos) {
  33297. _this2.raise(pos, template);
  33298. var i = stack.length - 2;
  33299. var scope = stack[i];
  33300. while (scope.canBeArrowParameterDeclaration()) {
  33301. scope.clearDeclarationError(pos);
  33302. scope = stack[--i];
  33303. }
  33304. });
  33305. };
  33306. return ExpressionScopeHandler;
  33307. }();
  33308. function newParameterDeclarationScope() {
  33309. return new ExpressionScope(kParameterDeclaration);
  33310. }
  33311. function newArrowHeadScope() {
  33312. return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
  33313. }
  33314. function newAsyncArrowScope() {
  33315. return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
  33316. }
  33317. function newExpressionScope() {
  33318. return new ExpressionScope();
  33319. }
  33320. var UtilParser = function (_Tokenizer) {
  33321. _inherits(UtilParser, _Tokenizer);
  33322. function UtilParser() {
  33323. return _Tokenizer.apply(this, arguments) || this;
  33324. }
  33325. var _proto = UtilParser.prototype;
  33326. _proto.addExtra = function addExtra(node, key, val) {
  33327. if (!node) return;
  33328. var extra = node.extra = node.extra || {};
  33329. extra[key] = val;
  33330. };
  33331. _proto.isRelational = function isRelational(op) {
  33332. return this.match(types$1.relational) && this.state.value === op;
  33333. };
  33334. _proto.expectRelational = function expectRelational(op) {
  33335. if (this.isRelational(op)) {
  33336. this.next();
  33337. } else {
  33338. this.unexpected(null, types$1.relational);
  33339. }
  33340. };
  33341. _proto.isContextual = function isContextual(name) {
  33342. return this.match(types$1.name) && this.state.value === name && !this.state.containsEsc;
  33343. };
  33344. _proto.isUnparsedContextual = function isUnparsedContextual(nameStart, name) {
  33345. var nameEnd = nameStart + name.length;
  33346. if (this.input.slice(nameStart, nameEnd) === name) {
  33347. var nextCh = this.input.charCodeAt(nameEnd);
  33348. return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800);
  33349. }
  33350. return false;
  33351. };
  33352. _proto.isLookaheadContextual = function isLookaheadContextual(name) {
  33353. var next = this.nextTokenStart();
  33354. return this.isUnparsedContextual(next, name);
  33355. };
  33356. _proto.eatContextual = function eatContextual(name) {
  33357. return this.isContextual(name) && this.eat(types$1.name);
  33358. };
  33359. _proto.expectContextual = function expectContextual(name, template) {
  33360. if (!this.eatContextual(name)) this.unexpected(null, template);
  33361. };
  33362. _proto.canInsertSemicolon = function canInsertSemicolon() {
  33363. return this.match(types$1.eof) || this.match(types$1.braceR) || this.hasPrecedingLineBreak();
  33364. };
  33365. _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() {
  33366. return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));
  33367. };
  33368. _proto.hasFollowingLineBreak = function hasFollowingLineBreak() {
  33369. return lineBreak.test(this.input.slice(this.state.end, this.nextTokenStart()));
  33370. };
  33371. _proto.isLineTerminator = function isLineTerminator() {
  33372. return this.eat(types$1.semi) || this.canInsertSemicolon();
  33373. };
  33374. _proto.semicolon = function semicolon(allowAsi) {
  33375. if (allowAsi === void 0) {
  33376. allowAsi = true;
  33377. }
  33378. if (allowAsi ? this.isLineTerminator() : this.eat(types$1.semi)) return;
  33379. this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon);
  33380. };
  33381. _proto.expect = function expect(type, pos) {
  33382. this.eat(type) || this.unexpected(pos, type);
  33383. };
  33384. _proto.assertNoSpace = function assertNoSpace(message) {
  33385. if (message === void 0) {
  33386. message = "Unexpected space.";
  33387. }
  33388. if (this.state.start > this.state.lastTokEnd) {
  33389. this.raise(this.state.lastTokEnd, {
  33390. code: ErrorCodes.SyntaxError,
  33391. reasonCode: "UnexpectedSpace",
  33392. template: message
  33393. });
  33394. }
  33395. };
  33396. _proto.unexpected = function unexpected(pos, messageOrType) {
  33397. if (messageOrType === void 0) {
  33398. messageOrType = {
  33399. code: ErrorCodes.SyntaxError,
  33400. reasonCode: "UnexpectedToken",
  33401. template: "Unexpected token"
  33402. };
  33403. }
  33404. if (messageOrType instanceof TokenType) {
  33405. messageOrType = {
  33406. code: ErrorCodes.SyntaxError,
  33407. reasonCode: "UnexpectedToken",
  33408. template: "Unexpected token, expected \"" + messageOrType.label + "\""
  33409. };
  33410. }
  33411. throw this.raise(pos != null ? pos : this.state.start, messageOrType);
  33412. };
  33413. _proto.expectPlugin = function expectPlugin(name, pos) {
  33414. if (!this.hasPlugin(name)) {
  33415. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  33416. missingPlugin: [name]
  33417. }, "This experimental syntax requires enabling the parser plugin: '" + name + "'");
  33418. }
  33419. return true;
  33420. };
  33421. _proto.expectOnePlugin = function expectOnePlugin(names, pos) {
  33422. var _this = this;
  33423. if (!names.some(function (n) {
  33424. return _this.hasPlugin(n);
  33425. })) {
  33426. throw this.raiseWithData(pos != null ? pos : this.state.start, {
  33427. missingPlugin: names
  33428. }, "This experimental syntax requires enabling one of the following parser plugin(s): '" + names.join(", ") + "'");
  33429. }
  33430. };
  33431. _proto.tryParse = function tryParse(fn, oldState) {
  33432. if (oldState === void 0) {
  33433. oldState = this.state.clone();
  33434. }
  33435. var abortSignal = {
  33436. node: null
  33437. };
  33438. try {
  33439. var _node = fn(function (node) {
  33440. if (node === void 0) {
  33441. node = null;
  33442. }
  33443. abortSignal.node = node;
  33444. throw abortSignal;
  33445. });
  33446. if (this.state.errors.length > oldState.errors.length) {
  33447. var failState = this.state;
  33448. this.state = oldState;
  33449. this.state.tokensLength = failState.tokensLength;
  33450. return {
  33451. node: _node,
  33452. error: failState.errors[oldState.errors.length],
  33453. thrown: false,
  33454. aborted: false,
  33455. failState: failState
  33456. };
  33457. }
  33458. return {
  33459. node: _node,
  33460. error: null,
  33461. thrown: false,
  33462. aborted: false,
  33463. failState: null
  33464. };
  33465. } catch (error) {
  33466. var _failState = this.state;
  33467. this.state = oldState;
  33468. if (error instanceof SyntaxError) {
  33469. return {
  33470. node: null,
  33471. error: error,
  33472. thrown: true,
  33473. aborted: false,
  33474. failState: _failState
  33475. };
  33476. }
  33477. if (error === abortSignal) {
  33478. return {
  33479. node: abortSignal.node,
  33480. error: null,
  33481. thrown: false,
  33482. aborted: true,
  33483. failState: _failState
  33484. };
  33485. }
  33486. throw error;
  33487. }
  33488. };
  33489. _proto.checkExpressionErrors = function checkExpressionErrors(refExpressionErrors, andThrow) {
  33490. if (!refExpressionErrors) return false;
  33491. var shorthandAssign = refExpressionErrors.shorthandAssign,
  33492. doubleProto = refExpressionErrors.doubleProto,
  33493. optionalParameters = refExpressionErrors.optionalParameters;
  33494. if (!andThrow) {
  33495. return shorthandAssign >= 0 || doubleProto >= 0 || optionalParameters >= 0;
  33496. }
  33497. if (shorthandAssign >= 0) {
  33498. this.unexpected(shorthandAssign);
  33499. }
  33500. if (doubleProto >= 0) {
  33501. this.raise(doubleProto, ErrorMessages.DuplicateProto);
  33502. }
  33503. if (optionalParameters >= 0) {
  33504. this.unexpected(optionalParameters);
  33505. }
  33506. };
  33507. _proto.isLiteralPropertyName = function isLiteralPropertyName() {
  33508. return this.match(types$1.name) || !!this.state.type.keyword || this.match(types$1.string) || this.match(types$1.num) || this.match(types$1.bigint) || this.match(types$1.decimal);
  33509. };
  33510. _proto.isPrivateName = function isPrivateName(node) {
  33511. return node.type === "PrivateName";
  33512. };
  33513. _proto.getPrivateNameSV = function getPrivateNameSV(node) {
  33514. return node.id.name;
  33515. };
  33516. _proto.hasPropertyAsPrivateName = function hasPropertyAsPrivateName(node) {
  33517. return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
  33518. };
  33519. _proto.isOptionalChain = function isOptionalChain(node) {
  33520. return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
  33521. };
  33522. _proto.isObjectProperty = function isObjectProperty(node) {
  33523. return node.type === "ObjectProperty";
  33524. };
  33525. _proto.isObjectMethod = function isObjectMethod(node) {
  33526. return node.type === "ObjectMethod";
  33527. };
  33528. _proto.initializeScopes = function initializeScopes(inModule) {
  33529. var _this2 = this;
  33530. if (inModule === void 0) {
  33531. inModule = this.options.sourceType === "module";
  33532. }
  33533. var oldLabels = this.state.labels;
  33534. this.state.labels = [];
  33535. var oldExportedIdentifiers = this.exportedIdentifiers;
  33536. this.exportedIdentifiers = new Set();
  33537. var oldInModule = this.inModule;
  33538. this.inModule = inModule;
  33539. var oldScope = this.scope;
  33540. var ScopeHandler = this.getScopeHandler();
  33541. this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);
  33542. var oldProdParam = this.prodParam;
  33543. this.prodParam = new ProductionParameterHandler();
  33544. var oldClassScope = this.classScope;
  33545. this.classScope = new ClassScopeHandler(this.raise.bind(this));
  33546. var oldExpressionScope = this.expressionScope;
  33547. this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
  33548. return function () {
  33549. _this2.state.labels = oldLabels;
  33550. _this2.exportedIdentifiers = oldExportedIdentifiers;
  33551. _this2.inModule = oldInModule;
  33552. _this2.scope = oldScope;
  33553. _this2.prodParam = oldProdParam;
  33554. _this2.classScope = oldClassScope;
  33555. _this2.expressionScope = oldExpressionScope;
  33556. };
  33557. };
  33558. _proto.enterInitialScopes = function enterInitialScopes() {
  33559. var paramFlags = PARAM;
  33560. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  33561. paramFlags |= PARAM_AWAIT;
  33562. }
  33563. this.scope.enter(SCOPE_PROGRAM);
  33564. this.prodParam.enter(paramFlags);
  33565. };
  33566. return UtilParser;
  33567. }(Tokenizer);
  33568. var ExpressionErrors = function ExpressionErrors() {
  33569. this.shorthandAssign = -1;
  33570. this.doubleProto = -1;
  33571. this.optionalParameters = -1;
  33572. };
  33573. var Node$3 = function () {
  33574. function Node(parser, pos, loc) {
  33575. this.type = void 0;
  33576. this.start = void 0;
  33577. this.end = void 0;
  33578. this.loc = void 0;
  33579. this.range = void 0;
  33580. this.leadingComments = void 0;
  33581. this.trailingComments = void 0;
  33582. this.innerComments = void 0;
  33583. this.extra = void 0;
  33584. this.type = "";
  33585. this.start = pos;
  33586. this.end = 0;
  33587. this.loc = new SourceLocation(loc);
  33588. if (parser != null && parser.options.ranges) this.range = [pos, 0];
  33589. if (parser != null && parser.filename) this.loc.filename = parser.filename;
  33590. }
  33591. var _proto = Node.prototype;
  33592. _proto.__clone = function __clone() {
  33593. var newNode = new Node();
  33594. var keys = Object.keys(this);
  33595. for (var i = 0, length = keys.length; i < length; i++) {
  33596. var _key = keys[i];
  33597. if (_key !== "leadingComments" && _key !== "trailingComments" && _key !== "innerComments") {
  33598. newNode[_key] = this[_key];
  33599. }
  33600. }
  33601. return newNode;
  33602. };
  33603. return Node;
  33604. }();
  33605. var NodeUtils = function (_UtilParser) {
  33606. _inherits(NodeUtils, _UtilParser);
  33607. function NodeUtils() {
  33608. return _UtilParser.apply(this, arguments) || this;
  33609. }
  33610. var _proto2 = NodeUtils.prototype;
  33611. _proto2.startNode = function startNode() {
  33612. return new Node$3(this, this.state.start, this.state.startLoc);
  33613. };
  33614. _proto2.startNodeAt = function startNodeAt(pos, loc) {
  33615. return new Node$3(this, pos, loc);
  33616. };
  33617. _proto2.startNodeAtNode = function startNodeAtNode(type) {
  33618. return this.startNodeAt(type.start, type.loc.start);
  33619. };
  33620. _proto2.finishNode = function finishNode(node, type) {
  33621. return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);
  33622. };
  33623. _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) {
  33624. if (node.end > 0) {
  33625. throw new Error("Do not call finishNode*() twice on the same node." + " Instead use resetEndLocation() or change type directly.");
  33626. }
  33627. node.type = type;
  33628. node.end = pos;
  33629. node.loc.end = loc;
  33630. if (this.options.ranges) node.range[1] = pos;
  33631. this.processComment(node);
  33632. return node;
  33633. };
  33634. _proto2.resetStartLocation = function resetStartLocation(node, start, startLoc) {
  33635. node.start = start;
  33636. node.loc.start = startLoc;
  33637. if (this.options.ranges) node.range[0] = start;
  33638. };
  33639. _proto2.resetEndLocation = function resetEndLocation(node, end, endLoc) {
  33640. if (end === void 0) {
  33641. end = this.state.lastTokEnd;
  33642. }
  33643. if (endLoc === void 0) {
  33644. endLoc = this.state.lastTokEndLoc;
  33645. }
  33646. node.end = end;
  33647. node.loc.end = endLoc;
  33648. if (this.options.ranges) node.range[1] = end;
  33649. };
  33650. _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) {
  33651. this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
  33652. };
  33653. return NodeUtils;
  33654. }(UtilParser);
  33655. var unwrapParenthesizedExpression = function unwrapParenthesizedExpression(node) {
  33656. return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
  33657. };
  33658. var LValParser = function (_NodeUtils) {
  33659. _inherits(LValParser, _NodeUtils);
  33660. function LValParser() {
  33661. return _NodeUtils.apply(this, arguments) || this;
  33662. }
  33663. var _proto = LValParser.prototype;
  33664. _proto.toAssignable = function toAssignable(node, isLHS) {
  33665. var _node$extra, _node$extra3;
  33666. if (isLHS === void 0) {
  33667. isLHS = false;
  33668. }
  33669. var parenthesized = undefined;
  33670. if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
  33671. parenthesized = unwrapParenthesizedExpression(node);
  33672. if (isLHS) {
  33673. if (parenthesized.type === "Identifier") {
  33674. this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  33675. } else if (parenthesized.type !== "MemberExpression") {
  33676. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  33677. }
  33678. } else {
  33679. this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment);
  33680. }
  33681. }
  33682. switch (node.type) {
  33683. case "Identifier":
  33684. case "ObjectPattern":
  33685. case "ArrayPattern":
  33686. case "AssignmentPattern":
  33687. break;
  33688. case "ObjectExpression":
  33689. node.type = "ObjectPattern";
  33690. for (var i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
  33691. var _node$extra2;
  33692. var prop = node.properties[i];
  33693. var isLast = i === last;
  33694. this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
  33695. if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) {
  33696. this.raiseRestNotLast(node.extra.trailingComma);
  33697. }
  33698. }
  33699. break;
  33700. case "ObjectProperty":
  33701. this.toAssignable(node.value, isLHS);
  33702. break;
  33703. case "SpreadElement":
  33704. {
  33705. this.checkToRestConversion(node);
  33706. node.type = "RestElement";
  33707. var arg = node.argument;
  33708. this.toAssignable(arg, isLHS);
  33709. break;
  33710. }
  33711. case "ArrayExpression":
  33712. node.type = "ArrayPattern";
  33713. this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS);
  33714. break;
  33715. case "AssignmentExpression":
  33716. if (node.operator !== "=") {
  33717. this.raise(node.left.end, ErrorMessages.MissingEqInAssignment);
  33718. }
  33719. node.type = "AssignmentPattern";
  33720. delete node.operator;
  33721. this.toAssignable(node.left, isLHS);
  33722. break;
  33723. case "ParenthesizedExpression":
  33724. this.toAssignable(parenthesized, isLHS);
  33725. break;
  33726. }
  33727. return node;
  33728. };
  33729. _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isLast, isLHS) {
  33730. if (prop.type === "ObjectMethod") {
  33731. var error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod;
  33732. this.raise(prop.key.start, error);
  33733. } else if (prop.type === "SpreadElement" && !isLast) {
  33734. this.raiseRestNotLast(prop.start);
  33735. } else {
  33736. this.toAssignable(prop, isLHS);
  33737. }
  33738. };
  33739. _proto.toAssignableList = function toAssignableList(exprList, trailingCommaPos, isLHS) {
  33740. var end = exprList.length;
  33741. if (end) {
  33742. var last = exprList[end - 1];
  33743. if ((last == null ? void 0 : last.type) === "RestElement") {
  33744. --end;
  33745. } else if ((last == null ? void 0 : last.type) === "SpreadElement") {
  33746. last.type = "RestElement";
  33747. var arg = last.argument;
  33748. this.toAssignable(arg, isLHS);
  33749. arg = unwrapParenthesizedExpression(arg);
  33750. if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
  33751. this.unexpected(arg.start);
  33752. }
  33753. if (trailingCommaPos) {
  33754. this.raiseTrailingCommaAfterRest(trailingCommaPos);
  33755. }
  33756. --end;
  33757. }
  33758. }
  33759. for (var i = 0; i < end; i++) {
  33760. var elt = exprList[i];
  33761. if (elt) {
  33762. this.toAssignable(elt, isLHS);
  33763. if (elt.type === "RestElement") {
  33764. this.raiseRestNotLast(elt.start);
  33765. }
  33766. }
  33767. }
  33768. return exprList;
  33769. };
  33770. _proto.toReferencedList = function toReferencedList(exprList, isParenthesizedExpr) {
  33771. return exprList;
  33772. };
  33773. _proto.toReferencedListDeep = function toReferencedListDeep(exprList, isParenthesizedExpr) {
  33774. this.toReferencedList(exprList, isParenthesizedExpr);
  33775. for (var _i2 = 0; _i2 < exprList.length; _i2++) {
  33776. var expr = exprList[_i2];
  33777. if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
  33778. this.toReferencedListDeep(expr.elements);
  33779. }
  33780. }
  33781. };
  33782. _proto.parseSpread = function parseSpread(refExpressionErrors, refNeedsArrowPos) {
  33783. var node = this.startNode();
  33784. this.next();
  33785. node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined, refNeedsArrowPos);
  33786. return this.finishNode(node, "SpreadElement");
  33787. };
  33788. _proto.parseRestBinding = function parseRestBinding() {
  33789. var node = this.startNode();
  33790. this.next();
  33791. node.argument = this.parseBindingAtom();
  33792. return this.finishNode(node, "RestElement");
  33793. };
  33794. _proto.parseBindingAtom = function parseBindingAtom() {
  33795. switch (this.state.type) {
  33796. case types$1.bracketL:
  33797. {
  33798. var node = this.startNode();
  33799. this.next();
  33800. node.elements = this.parseBindingList(types$1.bracketR, 93, true);
  33801. return this.finishNode(node, "ArrayPattern");
  33802. }
  33803. case types$1.braceL:
  33804. return this.parseObjectLike(types$1.braceR, true);
  33805. }
  33806. return this.parseIdentifier();
  33807. };
  33808. _proto.parseBindingList = function parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
  33809. var elts = [];
  33810. var first = true;
  33811. while (!this.eat(close)) {
  33812. if (first) {
  33813. first = false;
  33814. } else {
  33815. this.expect(types$1.comma);
  33816. }
  33817. if (allowEmpty && this.match(types$1.comma)) {
  33818. elts.push(null);
  33819. } else if (this.eat(close)) {
  33820. break;
  33821. } else if (this.match(types$1.ellipsis)) {
  33822. elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
  33823. this.checkCommaAfterRest(closeCharCode);
  33824. this.expect(close);
  33825. break;
  33826. } else {
  33827. var decorators = [];
  33828. if (this.match(types$1.at) && this.hasPlugin("decorators")) {
  33829. this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator);
  33830. }
  33831. while (this.match(types$1.at)) {
  33832. decorators.push(this.parseDecorator());
  33833. }
  33834. elts.push(this.parseAssignableListItem(allowModifiers, decorators));
  33835. }
  33836. }
  33837. return elts;
  33838. };
  33839. _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {
  33840. var left = this.parseMaybeDefault();
  33841. this.parseAssignableListItemTypes(left);
  33842. var elt = this.parseMaybeDefault(left.start, left.loc.start, left);
  33843. if (decorators.length) {
  33844. left.decorators = decorators;
  33845. }
  33846. return elt;
  33847. };
  33848. _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {
  33849. return param;
  33850. };
  33851. _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {
  33852. var _startLoc, _startPos, _left;
  33853. startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
  33854. startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
  33855. left = (_left = left) != null ? _left : this.parseBindingAtom();
  33856. if (!this.eat(types$1.eq)) return left;
  33857. var node = this.startNodeAt(startPos, startLoc);
  33858. node.left = left;
  33859. node.right = this.parseMaybeAssignAllowIn();
  33860. return this.finishNode(node, "AssignmentPattern");
  33861. };
  33862. _proto.checkLVal = function checkLVal(expr, contextDescription, bindingType, checkClashes, disallowLetBinding, strictModeChanged) {
  33863. if (bindingType === void 0) {
  33864. bindingType = BIND_NONE;
  33865. }
  33866. if (strictModeChanged === void 0) {
  33867. strictModeChanged = false;
  33868. }
  33869. switch (expr.type) {
  33870. case "Identifier":
  33871. {
  33872. var name = expr.name;
  33873. if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name, this.inModule) : isStrictBindOnlyReservedWord(name))) {
  33874. this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name);
  33875. }
  33876. if (checkClashes) {
  33877. if (checkClashes.has(name)) {
  33878. this.raise(expr.start, ErrorMessages.ParamDupe);
  33879. } else {
  33880. checkClashes.add(name);
  33881. }
  33882. }
  33883. if (disallowLetBinding && name === "let") {
  33884. this.raise(expr.start, ErrorMessages.LetInLexicalBinding);
  33885. }
  33886. if (!(bindingType & BIND_NONE)) {
  33887. this.scope.declareName(name, bindingType, expr.start);
  33888. }
  33889. break;
  33890. }
  33891. case "MemberExpression":
  33892. if (bindingType !== BIND_NONE) {
  33893. this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern);
  33894. }
  33895. break;
  33896. case "ObjectPattern":
  33897. for (var _i4 = 0, _expr$properties2 = expr.properties; _i4 < _expr$properties2.length; _i4++) {
  33898. var prop = _expr$properties2[_i4];
  33899. if (this.isObjectProperty(prop)) prop = prop.value;else if (this.isObjectMethod(prop)) continue;
  33900. this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  33901. }
  33902. break;
  33903. case "ArrayPattern":
  33904. for (var _i6 = 0, _expr$elements2 = expr.elements; _i6 < _expr$elements2.length; _i6++) {
  33905. var elem = _expr$elements2[_i6];
  33906. if (elem) {
  33907. this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
  33908. }
  33909. }
  33910. break;
  33911. case "AssignmentPattern":
  33912. this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
  33913. break;
  33914. case "RestElement":
  33915. this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
  33916. break;
  33917. case "ParenthesizedExpression":
  33918. this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
  33919. break;
  33920. default:
  33921. {
  33922. this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription);
  33923. }
  33924. }
  33925. };
  33926. _proto.checkToRestConversion = function checkToRestConversion(node) {
  33927. if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
  33928. this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern);
  33929. }
  33930. };
  33931. _proto.checkCommaAfterRest = function checkCommaAfterRest(close) {
  33932. if (this.match(types$1.comma)) {
  33933. if (this.lookaheadCharCode() === close) {
  33934. this.raiseTrailingCommaAfterRest(this.state.start);
  33935. } else {
  33936. this.raiseRestNotLast(this.state.start);
  33937. }
  33938. }
  33939. };
  33940. _proto.raiseRestNotLast = function raiseRestNotLast(pos) {
  33941. throw this.raise(pos, ErrorMessages.ElementAfterRest);
  33942. };
  33943. _proto.raiseTrailingCommaAfterRest = function raiseTrailingCommaAfterRest(pos) {
  33944. this.raise(pos, ErrorMessages.RestTrailingComma);
  33945. };
  33946. return LValParser;
  33947. }(NodeUtils);
  33948. var ExpressionParser = function (_LValParser) {
  33949. _inherits(ExpressionParser, _LValParser);
  33950. function ExpressionParser() {
  33951. return _LValParser.apply(this, arguments) || this;
  33952. }
  33953. var _proto = ExpressionParser.prototype;
  33954. _proto.checkProto = function checkProto(prop, isRecord, protoRef, refExpressionErrors) {
  33955. if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
  33956. return;
  33957. }
  33958. var key = prop.key;
  33959. var name = key.type === "Identifier" ? key.name : key.value;
  33960. if (name === "__proto__") {
  33961. if (isRecord) {
  33962. this.raise(key.start, ErrorMessages.RecordNoProto);
  33963. return;
  33964. }
  33965. if (protoRef.used) {
  33966. if (refExpressionErrors) {
  33967. if (refExpressionErrors.doubleProto === -1) {
  33968. refExpressionErrors.doubleProto = key.start;
  33969. }
  33970. } else {
  33971. this.raise(key.start, ErrorMessages.DuplicateProto);
  33972. }
  33973. }
  33974. protoRef.used = true;
  33975. }
  33976. };
  33977. _proto.shouldExitDescending = function shouldExitDescending(expr, potentialArrowAt) {
  33978. return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
  33979. };
  33980. _proto.getExpression = function getExpression() {
  33981. var paramFlags = PARAM;
  33982. if (this.hasPlugin("topLevelAwait") && this.inModule) {
  33983. paramFlags |= PARAM_AWAIT;
  33984. }
  33985. this.scope.enter(SCOPE_PROGRAM);
  33986. this.prodParam.enter(paramFlags);
  33987. this.nextToken();
  33988. var expr = this.parseExpression();
  33989. if (!this.match(types$1.eof)) {
  33990. this.unexpected();
  33991. }
  33992. expr.comments = this.state.comments;
  33993. expr.errors = this.state.errors;
  33994. if (this.options.tokens) {
  33995. expr.tokens = this.tokens;
  33996. }
  33997. return expr;
  33998. };
  33999. _proto.parseExpression = function parseExpression(disallowIn, refExpressionErrors) {
  34000. var _this = this;
  34001. if (disallowIn) {
  34002. return this.disallowInAnd(function () {
  34003. return _this.parseExpressionBase(refExpressionErrors);
  34004. });
  34005. }
  34006. return this.allowInAnd(function () {
  34007. return _this.parseExpressionBase(refExpressionErrors);
  34008. });
  34009. };
  34010. _proto.parseExpressionBase = function parseExpressionBase(refExpressionErrors) {
  34011. var startPos = this.state.start;
  34012. var startLoc = this.state.startLoc;
  34013. var expr = this.parseMaybeAssign(refExpressionErrors);
  34014. if (this.match(types$1.comma)) {
  34015. var node = this.startNodeAt(startPos, startLoc);
  34016. node.expressions = [expr];
  34017. while (this.eat(types$1.comma)) {
  34018. node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
  34019. }
  34020. this.toReferencedList(node.expressions);
  34021. return this.finishNode(node, "SequenceExpression");
  34022. }
  34023. return expr;
  34024. };
  34025. _proto.parseMaybeAssignDisallowIn = function parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
  34026. var _this2 = this;
  34027. return this.disallowInAnd(function () {
  34028. return _this2.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  34029. });
  34030. };
  34031. _proto.parseMaybeAssignAllowIn = function parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
  34032. var _this3 = this;
  34033. return this.allowInAnd(function () {
  34034. return _this3.parseMaybeAssign(refExpressionErrors, afterLeftParse);
  34035. });
  34036. };
  34037. _proto.setOptionalParametersError = function setOptionalParametersError(refExpressionErrors, resultError) {
  34038. var _resultError$pos;
  34039. refExpressionErrors.optionalParameters = (_resultError$pos = resultError == null ? void 0 : resultError.pos) != null ? _resultError$pos : this.state.start;
  34040. };
  34041. _proto.parseMaybeAssign = function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
  34042. var startPos = this.state.start;
  34043. var startLoc = this.state.startLoc;
  34044. if (this.isContextual("yield")) {
  34045. if (this.prodParam.hasYield) {
  34046. var _left = this.parseYield();
  34047. if (afterLeftParse) {
  34048. _left = afterLeftParse.call(this, _left, startPos, startLoc);
  34049. }
  34050. return _left;
  34051. }
  34052. }
  34053. var ownExpressionErrors;
  34054. if (refExpressionErrors) {
  34055. ownExpressionErrors = false;
  34056. } else {
  34057. refExpressionErrors = new ExpressionErrors();
  34058. ownExpressionErrors = true;
  34059. }
  34060. if (this.match(types$1.parenL) || this.match(types$1.name)) {
  34061. this.state.potentialArrowAt = this.state.start;
  34062. }
  34063. var left = this.parseMaybeConditional(refExpressionErrors);
  34064. if (afterLeftParse) {
  34065. left = afterLeftParse.call(this, left, startPos, startLoc);
  34066. }
  34067. if (this.state.type.isAssign) {
  34068. var node = this.startNodeAt(startPos, startLoc);
  34069. var operator = this.state.value;
  34070. node.operator = operator;
  34071. if (this.match(types$1.eq)) {
  34072. node.left = this.toAssignable(left, true);
  34073. refExpressionErrors.doubleProto = -1;
  34074. } else {
  34075. node.left = left;
  34076. }
  34077. if (refExpressionErrors.shorthandAssign >= node.left.start) {
  34078. refExpressionErrors.shorthandAssign = -1;
  34079. }
  34080. this.checkLVal(left, "assignment expression");
  34081. this.next();
  34082. node.right = this.parseMaybeAssign();
  34083. return this.finishNode(node, "AssignmentExpression");
  34084. } else if (ownExpressionErrors) {
  34085. this.checkExpressionErrors(refExpressionErrors, true);
  34086. }
  34087. return left;
  34088. };
  34089. _proto.parseMaybeConditional = function parseMaybeConditional(refExpressionErrors) {
  34090. var startPos = this.state.start;
  34091. var startLoc = this.state.startLoc;
  34092. var potentialArrowAt = this.state.potentialArrowAt;
  34093. var expr = this.parseExprOps(refExpressionErrors);
  34094. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  34095. return expr;
  34096. }
  34097. return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);
  34098. };
  34099. _proto.parseConditional = function parseConditional(expr, startPos, startLoc, refExpressionErrors) {
  34100. if (this.eat(types$1.question)) {
  34101. var node = this.startNodeAt(startPos, startLoc);
  34102. node.test = expr;
  34103. node.consequent = this.parseMaybeAssignAllowIn();
  34104. this.expect(types$1.colon);
  34105. node.alternate = this.parseMaybeAssign();
  34106. return this.finishNode(node, "ConditionalExpression");
  34107. }
  34108. return expr;
  34109. };
  34110. _proto.parseExprOps = function parseExprOps(refExpressionErrors) {
  34111. var startPos = this.state.start;
  34112. var startLoc = this.state.startLoc;
  34113. var potentialArrowAt = this.state.potentialArrowAt;
  34114. var expr = this.parseMaybeUnary(refExpressionErrors);
  34115. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  34116. return expr;
  34117. }
  34118. return this.parseExprOp(expr, startPos, startLoc, -1);
  34119. };
  34120. _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
  34121. var prec = this.state.type.binop;
  34122. if (prec != null && (this.prodParam.hasIn || !this.match(types$1._in))) {
  34123. if (prec > minPrec) {
  34124. var op = this.state.type;
  34125. if (op === types$1.pipeline) {
  34126. this.expectPlugin("pipelineOperator");
  34127. if (this.state.inFSharpPipelineDirectBody) {
  34128. return left;
  34129. }
  34130. this.state.inPipeline = true;
  34131. this.checkPipelineAtInfixOperator(left, leftStartPos);
  34132. }
  34133. var node = this.startNodeAt(leftStartPos, leftStartLoc);
  34134. node.left = left;
  34135. node.operator = this.state.value;
  34136. var logical = op === types$1.logicalOR || op === types$1.logicalAND;
  34137. var coalesce = op === types$1.nullishCoalescing;
  34138. if (coalesce) {
  34139. prec = types$1.logicalAND.binop;
  34140. }
  34141. this.next();
  34142. if (op === types$1.pipeline && this.getPluginOption("pipelineOperator", "proposal") === "minimal") {
  34143. if (this.match(types$1.name) && this.state.value === "await" && this.prodParam.hasAwait) {
  34144. throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody);
  34145. }
  34146. }
  34147. node.right = this.parseExprOpRightExpr(op, prec);
  34148. this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
  34149. var nextOp = this.state.type;
  34150. if (coalesce && (nextOp === types$1.logicalOR || nextOp === types$1.logicalAND) || logical && nextOp === types$1.nullishCoalescing) {
  34151. throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical);
  34152. }
  34153. return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
  34154. }
  34155. }
  34156. return left;
  34157. };
  34158. _proto.parseExprOpRightExpr = function parseExprOpRightExpr(op, prec) {
  34159. var _this4 = this;
  34160. var startPos = this.state.start;
  34161. var startLoc = this.state.startLoc;
  34162. switch (op) {
  34163. case types$1.pipeline:
  34164. switch (this.getPluginOption("pipelineOperator", "proposal")) {
  34165. case "smart":
  34166. return this.withTopicPermittingContext(function () {
  34167. return _this4.parseSmartPipelineBody(_this4.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
  34168. });
  34169. case "fsharp":
  34170. return this.withSoloAwaitPermittingContext(function () {
  34171. return _this4.parseFSharpPipelineBody(prec);
  34172. });
  34173. }
  34174. default:
  34175. return this.parseExprOpBaseRightExpr(op, prec);
  34176. }
  34177. };
  34178. _proto.parseExprOpBaseRightExpr = function parseExprOpBaseRightExpr(op, prec) {
  34179. var startPos = this.state.start;
  34180. var startLoc = this.state.startLoc;
  34181. return this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec);
  34182. };
  34183. _proto.checkExponentialAfterUnary = function checkExponentialAfterUnary(node) {
  34184. if (this.match(types$1.exponent)) {
  34185. this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation);
  34186. }
  34187. };
  34188. _proto.parseMaybeUnary = function parseMaybeUnary(refExpressionErrors, sawUnary) {
  34189. var startPos = this.state.start;
  34190. var startLoc = this.state.startLoc;
  34191. var isAwait = this.isContextual("await");
  34192. if (isAwait && this.isAwaitAllowed()) {
  34193. this.next();
  34194. var _expr = this.parseAwait(startPos, startLoc);
  34195. if (!sawUnary) this.checkExponentialAfterUnary(_expr);
  34196. return _expr;
  34197. }
  34198. if (this.isContextual("module") && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
  34199. return this.parseModuleExpression();
  34200. }
  34201. var update = this.match(types$1.incDec);
  34202. var node = this.startNode();
  34203. if (this.state.type.prefix) {
  34204. node.operator = this.state.value;
  34205. node.prefix = true;
  34206. if (this.match(types$1._throw)) {
  34207. this.expectPlugin("throwExpressions");
  34208. }
  34209. var isDelete = this.match(types$1._delete);
  34210. this.next();
  34211. node.argument = this.parseMaybeUnary(null, true);
  34212. this.checkExpressionErrors(refExpressionErrors, true);
  34213. if (this.state.strict && isDelete) {
  34214. var arg = node.argument;
  34215. if (arg.type === "Identifier") {
  34216. this.raise(node.start, ErrorMessages.StrictDelete);
  34217. } else if (this.hasPropertyAsPrivateName(arg)) {
  34218. this.raise(node.start, ErrorMessages.DeletePrivateField);
  34219. }
  34220. }
  34221. if (!update) {
  34222. if (!sawUnary) this.checkExponentialAfterUnary(node);
  34223. return this.finishNode(node, "UnaryExpression");
  34224. }
  34225. }
  34226. var expr = this.parseUpdate(node, update, refExpressionErrors);
  34227. if (isAwait) {
  34228. var startsExpr = this.hasPlugin("v8intrinsic") ? this.state.type.startsExpr : this.state.type.startsExpr && !this.match(types$1.modulo);
  34229. if (startsExpr && !this.isAmbiguousAwait()) {
  34230. this.raiseOverwrite(startPos, this.hasPlugin("topLevelAwait") ? ErrorMessages.AwaitNotInAsyncContext : ErrorMessages.AwaitNotInAsyncFunction);
  34231. return this.parseAwait(startPos, startLoc);
  34232. }
  34233. }
  34234. return expr;
  34235. };
  34236. _proto.parseUpdate = function parseUpdate(node, update, refExpressionErrors) {
  34237. if (update) {
  34238. this.checkLVal(node.argument, "prefix operation");
  34239. return this.finishNode(node, "UpdateExpression");
  34240. }
  34241. var startPos = this.state.start;
  34242. var startLoc = this.state.startLoc;
  34243. var expr = this.parseExprSubscripts(refExpressionErrors);
  34244. if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;
  34245. while (this.state.type.postfix && !this.canInsertSemicolon()) {
  34246. var _node = this.startNodeAt(startPos, startLoc);
  34247. _node.operator = this.state.value;
  34248. _node.prefix = false;
  34249. _node.argument = expr;
  34250. this.checkLVal(expr, "postfix operation");
  34251. this.next();
  34252. expr = this.finishNode(_node, "UpdateExpression");
  34253. }
  34254. return expr;
  34255. };
  34256. _proto.parseExprSubscripts = function parseExprSubscripts(refExpressionErrors) {
  34257. var startPos = this.state.start;
  34258. var startLoc = this.state.startLoc;
  34259. var potentialArrowAt = this.state.potentialArrowAt;
  34260. var expr = this.parseExprAtom(refExpressionErrors);
  34261. if (this.shouldExitDescending(expr, potentialArrowAt)) {
  34262. return expr;
  34263. }
  34264. return this.parseSubscripts(expr, startPos, startLoc);
  34265. };
  34266. _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {
  34267. var state = {
  34268. optionalChainMember: false,
  34269. maybeAsyncArrow: this.atPossibleAsyncArrow(base),
  34270. stop: false
  34271. };
  34272. do {
  34273. base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
  34274. state.maybeAsyncArrow = false;
  34275. } while (!state.stop);
  34276. return base;
  34277. };
  34278. _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {
  34279. if (!noCalls && this.eat(types$1.doubleColon)) {
  34280. return this.parseBind(base, startPos, startLoc, noCalls, state);
  34281. } else if (this.match(types$1.backQuote)) {
  34282. return this.parseTaggedTemplateExpression(base, startPos, startLoc, state);
  34283. }
  34284. var optional = false;
  34285. if (this.match(types$1.questionDot)) {
  34286. if (noCalls && this.lookaheadCharCode() === 40) {
  34287. state.stop = true;
  34288. return base;
  34289. }
  34290. state.optionalChainMember = optional = true;
  34291. this.next();
  34292. }
  34293. if (!noCalls && this.match(types$1.parenL)) {
  34294. return this.parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional);
  34295. } else if (optional || this.match(types$1.bracketL) || this.eat(types$1.dot)) {
  34296. return this.parseMember(base, startPos, startLoc, state, optional);
  34297. } else {
  34298. state.stop = true;
  34299. return base;
  34300. }
  34301. };
  34302. _proto.parseMember = function parseMember(base, startPos, startLoc, state, optional) {
  34303. var node = this.startNodeAt(startPos, startLoc);
  34304. var computed = this.eat(types$1.bracketL);
  34305. node.object = base;
  34306. node.computed = computed;
  34307. var privateName = !computed && this.match(types$1.privateName) && this.state.value;
  34308. var property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true);
  34309. if (privateName !== false) {
  34310. if (node.object.type === "Super") {
  34311. this.raise(startPos, ErrorMessages.SuperPrivateField);
  34312. }
  34313. this.classScope.usePrivateName(privateName, property.start);
  34314. }
  34315. node.property = property;
  34316. if (computed) {
  34317. this.expect(types$1.bracketR);
  34318. }
  34319. if (state.optionalChainMember) {
  34320. node.optional = optional;
  34321. return this.finishNode(node, "OptionalMemberExpression");
  34322. } else {
  34323. return this.finishNode(node, "MemberExpression");
  34324. }
  34325. };
  34326. _proto.parseBind = function parseBind(base, startPos, startLoc, noCalls, state) {
  34327. var node = this.startNodeAt(startPos, startLoc);
  34328. node.object = base;
  34329. node.callee = this.parseNoCallExpr();
  34330. state.stop = true;
  34331. return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
  34332. };
  34333. _proto.parseCoverCallAndAsyncArrowHead = function parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional) {
  34334. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  34335. var refExpressionErrors = null;
  34336. this.state.maybeInArrowParameters = true;
  34337. this.next();
  34338. var node = this.startNodeAt(startPos, startLoc);
  34339. node.callee = base;
  34340. if (state.maybeAsyncArrow) {
  34341. this.expressionScope.enter(newAsyncArrowScope());
  34342. refExpressionErrors = new ExpressionErrors();
  34343. }
  34344. if (state.optionalChainMember) {
  34345. node.optional = optional;
  34346. }
  34347. if (optional) {
  34348. node.arguments = this.parseCallExpressionArguments(types$1.parenR);
  34349. } else {
  34350. node.arguments = this.parseCallExpressionArguments(types$1.parenR, base.type === "Import", base.type !== "Super", node, refExpressionErrors);
  34351. }
  34352. this.finishCallExpression(node, state.optionalChainMember);
  34353. if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
  34354. state.stop = true;
  34355. this.expressionScope.validateAsPattern();
  34356. this.expressionScope.exit();
  34357. node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
  34358. } else {
  34359. if (state.maybeAsyncArrow) {
  34360. this.checkExpressionErrors(refExpressionErrors, true);
  34361. this.expressionScope.exit();
  34362. }
  34363. this.toReferencedArguments(node);
  34364. }
  34365. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  34366. return node;
  34367. };
  34368. _proto.toReferencedArguments = function toReferencedArguments(node, isParenthesizedExpr) {
  34369. this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
  34370. };
  34371. _proto.parseTaggedTemplateExpression = function parseTaggedTemplateExpression(base, startPos, startLoc, state) {
  34372. var node = this.startNodeAt(startPos, startLoc);
  34373. node.tag = base;
  34374. node.quasi = this.parseTemplate(true);
  34375. if (state.optionalChainMember) {
  34376. this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate);
  34377. }
  34378. return this.finishNode(node, "TaggedTemplateExpression");
  34379. };
  34380. _proto.atPossibleAsyncArrow = function atPossibleAsyncArrow(base) {
  34381. return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt;
  34382. };
  34383. _proto.finishCallExpression = function finishCallExpression(node, optional) {
  34384. if (node.callee.type === "Import") {
  34385. if (node.arguments.length === 2) {
  34386. {
  34387. if (!this.hasPlugin("moduleAttributes")) {
  34388. this.expectPlugin("importAssertions");
  34389. }
  34390. }
  34391. }
  34392. if (node.arguments.length === 0 || node.arguments.length > 2) {
  34393. this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
  34394. } else {
  34395. for (var _i2 = 0, _node$arguments2 = node.arguments; _i2 < _node$arguments2.length; _i2++) {
  34396. var arg = _node$arguments2[_i2];
  34397. if (arg.type === "SpreadElement") {
  34398. this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument);
  34399. }
  34400. }
  34401. }
  34402. }
  34403. return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
  34404. };
  34405. _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
  34406. var elts = [];
  34407. var first = true;
  34408. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34409. this.state.inFSharpPipelineDirectBody = false;
  34410. while (!this.eat(close)) {
  34411. if (first) {
  34412. first = false;
  34413. } else {
  34414. this.expect(types$1.comma);
  34415. if (this.match(close)) {
  34416. if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
  34417. this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma);
  34418. }
  34419. if (nodeForExtra) {
  34420. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  34421. }
  34422. this.next();
  34423. break;
  34424. }
  34425. }
  34426. elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
  34427. }
  34428. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34429. return elts;
  34430. };
  34431. _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {
  34432. return this.match(types$1.arrow) && !this.canInsertSemicolon();
  34433. };
  34434. _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {
  34435. var _call$extra;
  34436. this.expect(types$1.arrow);
  34437. this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma);
  34438. return node;
  34439. };
  34440. _proto.parseNoCallExpr = function parseNoCallExpr() {
  34441. var startPos = this.state.start;
  34442. var startLoc = this.state.startLoc;
  34443. return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
  34444. };
  34445. _proto.parseExprAtom = function parseExprAtom(refExpressionErrors) {
  34446. var node;
  34447. switch (this.state.type) {
  34448. case types$1._super:
  34449. return this.parseSuper();
  34450. case types$1._import:
  34451. node = this.startNode();
  34452. this.next();
  34453. if (this.match(types$1.dot)) {
  34454. return this.parseImportMetaProperty(node);
  34455. }
  34456. if (!this.match(types$1.parenL)) {
  34457. this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport);
  34458. }
  34459. return this.finishNode(node, "Import");
  34460. case types$1._this:
  34461. node = this.startNode();
  34462. this.next();
  34463. return this.finishNode(node, "ThisExpression");
  34464. case types$1.name:
  34465. {
  34466. var canBeArrow = this.state.potentialArrowAt === this.state.start;
  34467. var containsEsc = this.state.containsEsc;
  34468. var id = this.parseIdentifier();
  34469. if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
  34470. if (this.match(types$1._function)) {
  34471. this.next();
  34472. return this.parseFunction(this.startNodeAtNode(id), undefined, true);
  34473. } else if (this.match(types$1.name)) {
  34474. if (this.lookaheadCharCode() === 61) {
  34475. return this.parseAsyncArrowUnaryFunction(id);
  34476. } else {
  34477. return id;
  34478. }
  34479. } else if (this.match(types$1._do)) {
  34480. return this.parseDo(true);
  34481. }
  34482. }
  34483. if (canBeArrow && this.match(types$1.arrow) && !this.canInsertSemicolon()) {
  34484. this.next();
  34485. return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
  34486. }
  34487. return id;
  34488. }
  34489. case types$1._do:
  34490. {
  34491. return this.parseDo(false);
  34492. }
  34493. case types$1.slash:
  34494. case types$1.slashAssign:
  34495. {
  34496. this.readRegexp();
  34497. return this.parseRegExpLiteral(this.state.value);
  34498. }
  34499. case types$1.num:
  34500. return this.parseNumericLiteral(this.state.value);
  34501. case types$1.bigint:
  34502. return this.parseBigIntLiteral(this.state.value);
  34503. case types$1.decimal:
  34504. return this.parseDecimalLiteral(this.state.value);
  34505. case types$1.string:
  34506. return this.parseStringLiteral(this.state.value);
  34507. case types$1._null:
  34508. return this.parseNullLiteral();
  34509. case types$1._true:
  34510. return this.parseBooleanLiteral(true);
  34511. case types$1._false:
  34512. return this.parseBooleanLiteral(false);
  34513. case types$1.parenL:
  34514. {
  34515. var _canBeArrow = this.state.potentialArrowAt === this.state.start;
  34516. return this.parseParenAndDistinguishExpression(_canBeArrow);
  34517. }
  34518. case types$1.bracketBarL:
  34519. case types$1.bracketHashL:
  34520. {
  34521. return this.parseArrayLike(this.state.type === types$1.bracketBarL ? types$1.bracketBarR : types$1.bracketR, false, true, refExpressionErrors);
  34522. }
  34523. case types$1.bracketL:
  34524. {
  34525. return this.parseArrayLike(types$1.bracketR, true, false, refExpressionErrors);
  34526. }
  34527. case types$1.braceBarL:
  34528. case types$1.braceHashL:
  34529. {
  34530. return this.parseObjectLike(this.state.type === types$1.braceBarL ? types$1.braceBarR : types$1.braceR, false, true, refExpressionErrors);
  34531. }
  34532. case types$1.braceL:
  34533. {
  34534. return this.parseObjectLike(types$1.braceR, false, false, refExpressionErrors);
  34535. }
  34536. case types$1._function:
  34537. return this.parseFunctionOrFunctionSent();
  34538. case types$1.at:
  34539. this.parseDecorators();
  34540. case types$1._class:
  34541. node = this.startNode();
  34542. this.takeDecorators(node);
  34543. return this.parseClass(node, false);
  34544. case types$1._new:
  34545. return this.parseNewOrNewTarget();
  34546. case types$1.backQuote:
  34547. return this.parseTemplate(false);
  34548. case types$1.doubleColon:
  34549. {
  34550. node = this.startNode();
  34551. this.next();
  34552. node.object = null;
  34553. var callee = node.callee = this.parseNoCallExpr();
  34554. if (callee.type === "MemberExpression") {
  34555. return this.finishNode(node, "BindExpression");
  34556. } else {
  34557. throw this.raise(callee.start, ErrorMessages.UnsupportedBind);
  34558. }
  34559. }
  34560. case types$1.privateName:
  34561. {
  34562. var start = this.state.start;
  34563. var value = this.state.value;
  34564. node = this.parsePrivateName();
  34565. if (this.match(types$1._in)) {
  34566. this.expectPlugin("privateIn");
  34567. this.classScope.usePrivateName(value, node.start);
  34568. } else if (this.hasPlugin("privateIn")) {
  34569. this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, value);
  34570. } else {
  34571. throw this.unexpected(start);
  34572. }
  34573. return node;
  34574. }
  34575. case types$1.hash:
  34576. {
  34577. if (this.state.inPipeline) {
  34578. node = this.startNode();
  34579. if (this.getPluginOption("pipelineOperator", "proposal") !== "smart") {
  34580. this.raise(node.start, ErrorMessages.PrimaryTopicRequiresSmartPipeline);
  34581. }
  34582. this.next();
  34583. if (!this.primaryTopicReferenceIsAllowedInCurrentTopicContext()) {
  34584. this.raise(node.start, ErrorMessages.PrimaryTopicNotAllowed);
  34585. }
  34586. this.registerTopicReference();
  34587. return this.finishNode(node, "PipelinePrimaryTopicReference");
  34588. }
  34589. }
  34590. case types$1.relational:
  34591. {
  34592. if (this.state.value === "<") {
  34593. var lookaheadCh = this.input.codePointAt(this.nextTokenStart());
  34594. if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
  34595. this.expectOnePlugin(["jsx", "flow", "typescript"]);
  34596. }
  34597. }
  34598. }
  34599. default:
  34600. throw this.unexpected();
  34601. }
  34602. };
  34603. _proto.parseAsyncArrowUnaryFunction = function parseAsyncArrowUnaryFunction(id) {
  34604. var node = this.startNodeAtNode(id);
  34605. this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));
  34606. var params = [this.parseIdentifier()];
  34607. this.prodParam.exit();
  34608. if (this.hasPrecedingLineBreak()) {
  34609. this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow);
  34610. }
  34611. this.expect(types$1.arrow);
  34612. this.parseArrowExpression(node, params, true);
  34613. return node;
  34614. };
  34615. _proto.parseDo = function parseDo(isAsync) {
  34616. this.expectPlugin("doExpressions");
  34617. if (isAsync) {
  34618. this.expectPlugin("asyncDoExpressions");
  34619. }
  34620. var node = this.startNode();
  34621. node.async = isAsync;
  34622. this.next();
  34623. var oldLabels = this.state.labels;
  34624. this.state.labels = [];
  34625. if (isAsync) {
  34626. this.prodParam.enter(PARAM_AWAIT);
  34627. node.body = this.parseBlock();
  34628. this.prodParam.exit();
  34629. } else {
  34630. node.body = this.parseBlock();
  34631. }
  34632. this.state.labels = oldLabels;
  34633. return this.finishNode(node, "DoExpression");
  34634. };
  34635. _proto.parseSuper = function parseSuper() {
  34636. var node = this.startNode();
  34637. this.next();
  34638. if (this.match(types$1.parenL) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
  34639. this.raise(node.start, ErrorMessages.SuperNotAllowed);
  34640. } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
  34641. this.raise(node.start, ErrorMessages.UnexpectedSuper);
  34642. }
  34643. if (!this.match(types$1.parenL) && !this.match(types$1.bracketL) && !this.match(types$1.dot)) {
  34644. this.raise(node.start, ErrorMessages.UnsupportedSuper);
  34645. }
  34646. return this.finishNode(node, "Super");
  34647. };
  34648. _proto.parseMaybePrivateName = function parseMaybePrivateName(isPrivateNameAllowed) {
  34649. var isPrivate = this.match(types$1.privateName);
  34650. if (isPrivate) {
  34651. if (!isPrivateNameAllowed) {
  34652. this.raise(this.state.start + 1, ErrorMessages.UnexpectedPrivateField);
  34653. }
  34654. return this.parsePrivateName();
  34655. } else {
  34656. return this.parseIdentifier(true);
  34657. }
  34658. };
  34659. _proto.parsePrivateName = function parsePrivateName() {
  34660. var node = this.startNode();
  34661. var id = this.startNodeAt(this.state.start + 1, new Position(this.state.curLine, this.state.start + 1 - this.state.lineStart));
  34662. var name = this.state.value;
  34663. this.next();
  34664. node.id = this.createIdentifier(id, name);
  34665. return this.finishNode(node, "PrivateName");
  34666. };
  34667. _proto.parseFunctionOrFunctionSent = function parseFunctionOrFunctionSent() {
  34668. var node = this.startNode();
  34669. this.next();
  34670. if (this.prodParam.hasYield && this.match(types$1.dot)) {
  34671. var meta = this.createIdentifier(this.startNodeAtNode(node), "function");
  34672. this.next();
  34673. return this.parseMetaProperty(node, meta, "sent");
  34674. }
  34675. return this.parseFunction(node);
  34676. };
  34677. _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) {
  34678. node.meta = meta;
  34679. if (meta.name === "function" && propertyName === "sent") {
  34680. if (this.isContextual(propertyName)) {
  34681. this.expectPlugin("functionSent");
  34682. } else if (!this.hasPlugin("functionSent")) {
  34683. this.unexpected();
  34684. }
  34685. }
  34686. var containsEsc = this.state.containsEsc;
  34687. node.property = this.parseIdentifier(true);
  34688. if (node.property.name !== propertyName || containsEsc) {
  34689. this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName);
  34690. }
  34691. return this.finishNode(node, "MetaProperty");
  34692. };
  34693. _proto.parseImportMetaProperty = function parseImportMetaProperty(node) {
  34694. var id = this.createIdentifier(this.startNodeAtNode(node), "import");
  34695. this.next();
  34696. if (this.isContextual("meta")) {
  34697. if (!this.inModule) {
  34698. this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule);
  34699. }
  34700. this.sawUnambiguousESM = true;
  34701. }
  34702. return this.parseMetaProperty(node, id, "meta");
  34703. };
  34704. _proto.parseLiteralAtNode = function parseLiteralAtNode(value, type, node) {
  34705. this.addExtra(node, "rawValue", value);
  34706. this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
  34707. node.value = value;
  34708. this.next();
  34709. return this.finishNode(node, type);
  34710. };
  34711. _proto.parseLiteral = function parseLiteral(value, type) {
  34712. var node = this.startNode();
  34713. return this.parseLiteralAtNode(value, type, node);
  34714. };
  34715. _proto.parseStringLiteral = function parseStringLiteral(value) {
  34716. return this.parseLiteral(value, "StringLiteral");
  34717. };
  34718. _proto.parseNumericLiteral = function parseNumericLiteral(value) {
  34719. return this.parseLiteral(value, "NumericLiteral");
  34720. };
  34721. _proto.parseBigIntLiteral = function parseBigIntLiteral(value) {
  34722. return this.parseLiteral(value, "BigIntLiteral");
  34723. };
  34724. _proto.parseDecimalLiteral = function parseDecimalLiteral(value) {
  34725. return this.parseLiteral(value, "DecimalLiteral");
  34726. };
  34727. _proto.parseRegExpLiteral = function parseRegExpLiteral(value) {
  34728. var node = this.parseLiteral(value.value, "RegExpLiteral");
  34729. node.pattern = value.pattern;
  34730. node.flags = value.flags;
  34731. return node;
  34732. };
  34733. _proto.parseBooleanLiteral = function parseBooleanLiteral(value) {
  34734. var node = this.startNode();
  34735. node.value = value;
  34736. this.next();
  34737. return this.finishNode(node, "BooleanLiteral");
  34738. };
  34739. _proto.parseNullLiteral = function parseNullLiteral() {
  34740. var node = this.startNode();
  34741. this.next();
  34742. return this.finishNode(node, "NullLiteral");
  34743. };
  34744. _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {
  34745. var startPos = this.state.start;
  34746. var startLoc = this.state.startLoc;
  34747. var val;
  34748. this.next();
  34749. this.expressionScope.enter(newArrowHeadScope());
  34750. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  34751. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34752. this.state.maybeInArrowParameters = true;
  34753. this.state.inFSharpPipelineDirectBody = false;
  34754. var innerStartPos = this.state.start;
  34755. var innerStartLoc = this.state.startLoc;
  34756. var exprList = [];
  34757. var refExpressionErrors = new ExpressionErrors();
  34758. var first = true;
  34759. var spreadStart;
  34760. var optionalCommaStart;
  34761. while (!this.match(types$1.parenR)) {
  34762. if (first) {
  34763. first = false;
  34764. } else {
  34765. this.expect(types$1.comma, refExpressionErrors.optionalParameters === -1 ? null : refExpressionErrors.optionalParameters);
  34766. if (this.match(types$1.parenR)) {
  34767. optionalCommaStart = this.state.start;
  34768. break;
  34769. }
  34770. }
  34771. if (this.match(types$1.ellipsis)) {
  34772. var spreadNodeStartPos = this.state.start;
  34773. var spreadNodeStartLoc = this.state.startLoc;
  34774. spreadStart = this.state.start;
  34775. exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
  34776. this.checkCommaAfterRest(41);
  34777. break;
  34778. } else {
  34779. exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
  34780. }
  34781. }
  34782. var innerEndPos = this.state.lastTokEnd;
  34783. var innerEndLoc = this.state.lastTokEndLoc;
  34784. this.expect(types$1.parenR);
  34785. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  34786. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34787. var arrowNode = this.startNodeAt(startPos, startLoc);
  34788. if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {
  34789. this.expressionScope.validateAsPattern();
  34790. this.expressionScope.exit();
  34791. this.parseArrowExpression(arrowNode, exprList, false);
  34792. return arrowNode;
  34793. }
  34794. this.expressionScope.exit();
  34795. if (!exprList.length) {
  34796. this.unexpected(this.state.lastTokStart);
  34797. }
  34798. if (optionalCommaStart) this.unexpected(optionalCommaStart);
  34799. if (spreadStart) this.unexpected(spreadStart);
  34800. this.checkExpressionErrors(refExpressionErrors, true);
  34801. this.toReferencedListDeep(exprList, true);
  34802. if (exprList.length > 1) {
  34803. val = this.startNodeAt(innerStartPos, innerStartLoc);
  34804. val.expressions = exprList;
  34805. this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
  34806. } else {
  34807. val = exprList[0];
  34808. }
  34809. if (!this.options.createParenthesizedExpressions) {
  34810. this.addExtra(val, "parenthesized", true);
  34811. this.addExtra(val, "parenStart", startPos);
  34812. return val;
  34813. }
  34814. var parenExpression = this.startNodeAt(startPos, startLoc);
  34815. parenExpression.expression = val;
  34816. this.finishNode(parenExpression, "ParenthesizedExpression");
  34817. return parenExpression;
  34818. };
  34819. _proto.shouldParseArrow = function shouldParseArrow() {
  34820. return !this.canInsertSemicolon();
  34821. };
  34822. _proto.parseArrow = function parseArrow(node) {
  34823. if (this.eat(types$1.arrow)) {
  34824. return node;
  34825. }
  34826. };
  34827. _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {
  34828. return node;
  34829. };
  34830. _proto.parseNewOrNewTarget = function parseNewOrNewTarget() {
  34831. var node = this.startNode();
  34832. this.next();
  34833. if (this.match(types$1.dot)) {
  34834. var meta = this.createIdentifier(this.startNodeAtNode(node), "new");
  34835. this.next();
  34836. var metaProp = this.parseMetaProperty(node, meta, "target");
  34837. if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
  34838. this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget);
  34839. }
  34840. return metaProp;
  34841. }
  34842. return this.parseNew(node);
  34843. };
  34844. _proto.parseNew = function parseNew(node) {
  34845. node.callee = this.parseNoCallExpr();
  34846. if (node.callee.type === "Import") {
  34847. this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression);
  34848. } else if (this.isOptionalChain(node.callee)) {
  34849. this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew);
  34850. } else if (this.eat(types$1.questionDot)) {
  34851. this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew);
  34852. }
  34853. this.parseNewArguments(node);
  34854. return this.finishNode(node, "NewExpression");
  34855. };
  34856. _proto.parseNewArguments = function parseNewArguments(node) {
  34857. if (this.eat(types$1.parenL)) {
  34858. var args = this.parseExprList(types$1.parenR);
  34859. this.toReferencedList(args);
  34860. node.arguments = args;
  34861. } else {
  34862. node.arguments = [];
  34863. }
  34864. };
  34865. _proto.parseTemplateElement = function parseTemplateElement(isTagged) {
  34866. var elem = this.startNode();
  34867. if (this.state.value === null) {
  34868. if (!isTagged) {
  34869. this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate);
  34870. }
  34871. }
  34872. elem.value = {
  34873. raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"),
  34874. cooked: this.state.value
  34875. };
  34876. this.next();
  34877. elem.tail = this.match(types$1.backQuote);
  34878. return this.finishNode(elem, "TemplateElement");
  34879. };
  34880. _proto.parseTemplate = function parseTemplate(isTagged) {
  34881. var node = this.startNode();
  34882. this.next();
  34883. node.expressions = [];
  34884. var curElt = this.parseTemplateElement(isTagged);
  34885. node.quasis = [curElt];
  34886. while (!curElt.tail) {
  34887. this.expect(types$1.dollarBraceL);
  34888. node.expressions.push(this.parseTemplateSubstitution());
  34889. this.expect(types$1.braceR);
  34890. node.quasis.push(curElt = this.parseTemplateElement(isTagged));
  34891. }
  34892. this.next();
  34893. return this.finishNode(node, "TemplateLiteral");
  34894. };
  34895. _proto.parseTemplateSubstitution = function parseTemplateSubstitution() {
  34896. return this.parseExpression();
  34897. };
  34898. _proto.parseObjectLike = function parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
  34899. if (isRecord) {
  34900. this.expectPlugin("recordAndTuple");
  34901. }
  34902. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  34903. this.state.inFSharpPipelineDirectBody = false;
  34904. var propHash = Object.create(null);
  34905. var first = true;
  34906. var node = this.startNode();
  34907. node.properties = [];
  34908. this.next();
  34909. while (!this.match(close)) {
  34910. if (first) {
  34911. first = false;
  34912. } else {
  34913. this.expect(types$1.comma);
  34914. if (this.match(close)) {
  34915. this.addExtra(node, "trailingComma", this.state.lastTokStart);
  34916. break;
  34917. }
  34918. }
  34919. var prop = this.parsePropertyDefinition(isPattern, refExpressionErrors);
  34920. if (!isPattern) {
  34921. this.checkProto(prop, isRecord, propHash, refExpressionErrors);
  34922. }
  34923. if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
  34924. this.raise(prop.start, ErrorMessages.InvalidRecordProperty);
  34925. }
  34926. if (prop.shorthand) {
  34927. this.addExtra(prop, "shorthand", true);
  34928. }
  34929. node.properties.push(prop);
  34930. }
  34931. this.next();
  34932. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  34933. var type = "ObjectExpression";
  34934. if (isPattern) {
  34935. type = "ObjectPattern";
  34936. } else if (isRecord) {
  34937. type = "RecordExpression";
  34938. }
  34939. return this.finishNode(node, type);
  34940. };
  34941. _proto.maybeAsyncOrAccessorProp = function maybeAsyncOrAccessorProp(prop) {
  34942. return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(types$1.bracketL) || this.match(types$1.star));
  34943. };
  34944. _proto.parsePropertyDefinition = function parsePropertyDefinition(isPattern, refExpressionErrors) {
  34945. var decorators = [];
  34946. if (this.match(types$1.at)) {
  34947. if (this.hasPlugin("decorators")) {
  34948. this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator);
  34949. }
  34950. while (this.match(types$1.at)) {
  34951. decorators.push(this.parseDecorator());
  34952. }
  34953. }
  34954. var prop = this.startNode();
  34955. var isGenerator = false;
  34956. var isAsync = false;
  34957. var isAccessor = false;
  34958. var startPos;
  34959. var startLoc;
  34960. if (this.match(types$1.ellipsis)) {
  34961. if (decorators.length) this.unexpected();
  34962. if (isPattern) {
  34963. this.next();
  34964. prop.argument = this.parseIdentifier();
  34965. this.checkCommaAfterRest(125);
  34966. return this.finishNode(prop, "RestElement");
  34967. }
  34968. return this.parseSpread();
  34969. }
  34970. if (decorators.length) {
  34971. prop.decorators = decorators;
  34972. decorators = [];
  34973. }
  34974. prop.method = false;
  34975. if (isPattern || refExpressionErrors) {
  34976. startPos = this.state.start;
  34977. startLoc = this.state.startLoc;
  34978. }
  34979. if (!isPattern) {
  34980. isGenerator = this.eat(types$1.star);
  34981. }
  34982. var containsEsc = this.state.containsEsc;
  34983. var key = this.parsePropertyName(prop, false);
  34984. if (!isPattern && !isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
  34985. var keyName = key.name;
  34986. if (keyName === "async" && !this.hasPrecedingLineBreak()) {
  34987. isAsync = true;
  34988. isGenerator = this.eat(types$1.star);
  34989. this.parsePropertyName(prop, false);
  34990. }
  34991. if (keyName === "get" || keyName === "set") {
  34992. isAccessor = true;
  34993. prop.kind = keyName;
  34994. if (this.match(types$1.star)) {
  34995. isGenerator = true;
  34996. this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName);
  34997. this.next();
  34998. }
  34999. this.parsePropertyName(prop, false);
  35000. }
  35001. }
  35002. this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
  35003. return prop;
  35004. };
  35005. _proto.getGetterSetterExpectedParamCount = function getGetterSetterExpectedParamCount(method) {
  35006. return method.kind === "get" ? 0 : 1;
  35007. };
  35008. _proto.getObjectOrClassMethodParams = function getObjectOrClassMethodParams(method) {
  35009. return method.params;
  35010. };
  35011. _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {
  35012. var _params;
  35013. var paramCount = this.getGetterSetterExpectedParamCount(method);
  35014. var params = this.getObjectOrClassMethodParams(method);
  35015. var start = method.start;
  35016. if (params.length !== paramCount) {
  35017. if (method.kind === "get") {
  35018. this.raise(start, ErrorMessages.BadGetterArity);
  35019. } else {
  35020. this.raise(start, ErrorMessages.BadSetterArity);
  35021. }
  35022. }
  35023. if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
  35024. this.raise(start, ErrorMessages.BadSetterRestParameter);
  35025. }
  35026. };
  35027. _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
  35028. if (isAccessor) {
  35029. this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
  35030. this.checkGetterSetterParams(prop);
  35031. return prop;
  35032. }
  35033. if (isAsync || isGenerator || this.match(types$1.parenL)) {
  35034. if (isPattern) this.unexpected();
  35035. prop.kind = "method";
  35036. prop.method = true;
  35037. return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
  35038. }
  35039. };
  35040. _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
  35041. prop.shorthand = false;
  35042. if (this.eat(types$1.colon)) {
  35043. prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
  35044. return this.finishNode(prop, "ObjectProperty");
  35045. }
  35046. if (!prop.computed && prop.key.type === "Identifier") {
  35047. this.checkReservedWord(prop.key.name, prop.key.start, true, false);
  35048. if (isPattern) {
  35049. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  35050. } else if (this.match(types$1.eq) && refExpressionErrors) {
  35051. if (refExpressionErrors.shorthandAssign === -1) {
  35052. refExpressionErrors.shorthandAssign = this.state.start;
  35053. }
  35054. prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());
  35055. } else {
  35056. prop.value = prop.key.__clone();
  35057. }
  35058. prop.shorthand = true;
  35059. return this.finishNode(prop, "ObjectProperty");
  35060. }
  35061. };
  35062. _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
  35063. var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
  35064. if (!node) this.unexpected();
  35065. return node;
  35066. };
  35067. _proto.parsePropertyName = function parsePropertyName(prop, isPrivateNameAllowed) {
  35068. if (this.eat(types$1.bracketL)) {
  35069. prop.computed = true;
  35070. prop.key = this.parseMaybeAssignAllowIn();
  35071. this.expect(types$1.bracketR);
  35072. } else {
  35073. var oldInPropertyName = this.state.inPropertyName;
  35074. this.state.inPropertyName = true;
  35075. var type = this.state.type;
  35076. prop.key = type === types$1.num || type === types$1.string || type === types$1.bigint || type === types$1.decimal ? this.parseExprAtom() : this.parseMaybePrivateName(isPrivateNameAllowed);
  35077. if (type !== types$1.privateName) {
  35078. prop.computed = false;
  35079. }
  35080. this.state.inPropertyName = oldInPropertyName;
  35081. }
  35082. return prop.key;
  35083. };
  35084. _proto.initFunction = function initFunction(node, isAsync) {
  35085. node.id = null;
  35086. node.generator = false;
  35087. node.async = !!isAsync;
  35088. };
  35089. _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
  35090. if (inClassScope === void 0) {
  35091. inClassScope = false;
  35092. }
  35093. this.initFunction(node, isAsync);
  35094. node.generator = !!isGenerator;
  35095. var allowModifiers = isConstructor;
  35096. this.scope.enter(SCOPE_FUNCTION | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
  35097. this.prodParam.enter(functionFlags(isAsync, node.generator));
  35098. this.parseFunctionParams(node, allowModifiers);
  35099. this.parseFunctionBodyAndFinish(node, type, true);
  35100. this.prodParam.exit();
  35101. this.scope.exit();
  35102. return node;
  35103. };
  35104. _proto.parseArrayLike = function parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
  35105. if (isTuple) {
  35106. this.expectPlugin("recordAndTuple");
  35107. }
  35108. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  35109. this.state.inFSharpPipelineDirectBody = false;
  35110. var node = this.startNode();
  35111. this.next();
  35112. node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
  35113. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  35114. return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
  35115. };
  35116. _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync, trailingCommaPos) {
  35117. this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
  35118. var flags = functionFlags(isAsync, false);
  35119. if (!this.match(types$1.bracketL) && this.prodParam.hasIn) {
  35120. flags |= PARAM_IN;
  35121. }
  35122. this.prodParam.enter(flags);
  35123. this.initFunction(node, isAsync);
  35124. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  35125. if (params) {
  35126. this.state.maybeInArrowParameters = true;
  35127. this.setArrowFunctionParameters(node, params, trailingCommaPos);
  35128. }
  35129. this.state.maybeInArrowParameters = false;
  35130. this.parseFunctionBody(node, true);
  35131. this.prodParam.exit();
  35132. this.scope.exit();
  35133. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  35134. return this.finishNode(node, "ArrowFunctionExpression");
  35135. };
  35136. _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params, trailingCommaPos) {
  35137. node.params = this.toAssignableList(params, trailingCommaPos, false);
  35138. };
  35139. _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, isMethod) {
  35140. if (isMethod === void 0) {
  35141. isMethod = false;
  35142. }
  35143. this.parseFunctionBody(node, false, isMethod);
  35144. this.finishNode(node, type);
  35145. };
  35146. _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression, isMethod) {
  35147. var _this5 = this;
  35148. if (isMethod === void 0) {
  35149. isMethod = false;
  35150. }
  35151. var isExpression = allowExpression && !this.match(types$1.braceL);
  35152. this.expressionScope.enter(newExpressionScope());
  35153. if (isExpression) {
  35154. node.body = this.parseMaybeAssign();
  35155. this.checkParams(node, false, allowExpression, false);
  35156. } else {
  35157. var oldStrict = this.state.strict;
  35158. var oldLabels = this.state.labels;
  35159. this.state.labels = [];
  35160. this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
  35161. node.body = this.parseBlock(true, false, function (hasStrictModeDirective) {
  35162. var nonSimple = !_this5.isSimpleParamList(node.params);
  35163. if (hasStrictModeDirective && nonSimple) {
  35164. var errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start;
  35165. _this5.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective);
  35166. }
  35167. var strictModeChanged = !oldStrict && _this5.state.strict;
  35168. _this5.checkParams(node, !_this5.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
  35169. if (_this5.state.strict && node.id) {
  35170. _this5.checkLVal(node.id, "function name", BIND_OUTSIDE, undefined, undefined, strictModeChanged);
  35171. }
  35172. });
  35173. this.prodParam.exit();
  35174. this.expressionScope.exit();
  35175. this.state.labels = oldLabels;
  35176. }
  35177. };
  35178. _proto.isSimpleParamList = function isSimpleParamList(params) {
  35179. for (var i = 0, len = params.length; i < len; i++) {
  35180. if (params[i].type !== "Identifier") return false;
  35181. }
  35182. return true;
  35183. };
  35184. _proto.checkParams = function checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged) {
  35185. if (strictModeChanged === void 0) {
  35186. strictModeChanged = true;
  35187. }
  35188. var checkClashes = new Set();
  35189. for (var _i4 = 0, _node$params2 = node.params; _i4 < _node$params2.length; _i4++) {
  35190. var param = _node$params2[_i4];
  35191. this.checkLVal(param, "function parameter list", BIND_VAR, allowDuplicates ? null : checkClashes, undefined, strictModeChanged);
  35192. }
  35193. };
  35194. _proto.parseExprList = function parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
  35195. var elts = [];
  35196. var first = true;
  35197. while (!this.eat(close)) {
  35198. if (first) {
  35199. first = false;
  35200. } else {
  35201. this.expect(types$1.comma);
  35202. if (this.match(close)) {
  35203. if (nodeForExtra) {
  35204. this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart);
  35205. }
  35206. this.next();
  35207. break;
  35208. }
  35209. }
  35210. elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
  35211. }
  35212. return elts;
  35213. };
  35214. _proto.parseExprListItem = function parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
  35215. var elt;
  35216. if (this.match(types$1.comma)) {
  35217. if (!allowEmpty) {
  35218. this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ",");
  35219. }
  35220. elt = null;
  35221. } else if (this.match(types$1.ellipsis)) {
  35222. var spreadNodeStartPos = this.state.start;
  35223. var spreadNodeStartLoc = this.state.startLoc;
  35224. elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc);
  35225. } else if (this.match(types$1.question)) {
  35226. this.expectPlugin("partialApplication");
  35227. if (!allowPlaceholder) {
  35228. this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder);
  35229. }
  35230. var node = this.startNode();
  35231. this.next();
  35232. elt = this.finishNode(node, "ArgumentPlaceholder");
  35233. } else {
  35234. elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
  35235. }
  35236. return elt;
  35237. };
  35238. _proto.parseIdentifier = function parseIdentifier(liberal) {
  35239. var node = this.startNode();
  35240. var name = this.parseIdentifierName(node.start, liberal);
  35241. return this.createIdentifier(node, name);
  35242. };
  35243. _proto.createIdentifier = function createIdentifier(node, name) {
  35244. node.name = name;
  35245. node.loc.identifierName = name;
  35246. return this.finishNode(node, "Identifier");
  35247. };
  35248. _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) {
  35249. var name;
  35250. var _this$state = this.state,
  35251. start = _this$state.start,
  35252. type = _this$state.type;
  35253. if (type === types$1.name) {
  35254. name = this.state.value;
  35255. } else if (type.keyword) {
  35256. name = type.keyword;
  35257. } else {
  35258. throw this.unexpected();
  35259. }
  35260. if (liberal) {
  35261. this.state.type = types$1.name;
  35262. } else {
  35263. this.checkReservedWord(name, start, !!type.keyword, false);
  35264. }
  35265. this.next();
  35266. return name;
  35267. };
  35268. _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {
  35269. if (word.length > 10) {
  35270. return;
  35271. }
  35272. if (!canBeReservedWord(word)) {
  35273. return;
  35274. }
  35275. if (word === "yield") {
  35276. if (this.prodParam.hasYield) {
  35277. this.raise(startLoc, ErrorMessages.YieldBindingIdentifier);
  35278. return;
  35279. }
  35280. } else if (word === "await") {
  35281. if (this.prodParam.hasAwait) {
  35282. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier);
  35283. return;
  35284. } else if (this.scope.inStaticBlock && !this.scope.inNonArrowFunction) {
  35285. this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock);
  35286. return;
  35287. } else {
  35288. this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier);
  35289. }
  35290. } else if (word === "arguments") {
  35291. if (this.scope.inClassAndNotInNonArrowFunction) {
  35292. this.raise(startLoc, ErrorMessages.ArgumentsInClass);
  35293. return;
  35294. }
  35295. }
  35296. if (checkKeywords && isKeyword(word)) {
  35297. this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word);
  35298. return;
  35299. }
  35300. var reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
  35301. if (reservedTest(word, this.inModule)) {
  35302. this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word);
  35303. }
  35304. };
  35305. _proto.isAwaitAllowed = function isAwaitAllowed() {
  35306. if (this.prodParam.hasAwait) return true;
  35307. if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
  35308. return true;
  35309. }
  35310. return false;
  35311. };
  35312. _proto.parseAwait = function parseAwait(startPos, startLoc) {
  35313. var node = this.startNodeAt(startPos, startLoc);
  35314. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter);
  35315. if (this.eat(types$1.star)) {
  35316. this.raise(node.start, ErrorMessages.ObsoleteAwaitStar);
  35317. }
  35318. if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
  35319. if (this.isAmbiguousAwait()) {
  35320. this.ambiguousScriptDifferentAst = true;
  35321. } else {
  35322. this.sawUnambiguousESM = true;
  35323. }
  35324. }
  35325. if (!this.state.soloAwait) {
  35326. node.argument = this.parseMaybeUnary(null, true);
  35327. }
  35328. return this.finishNode(node, "AwaitExpression");
  35329. };
  35330. _proto.isAmbiguousAwait = function isAmbiguousAwait() {
  35331. return this.hasPrecedingLineBreak() || this.match(types$1.plusMin) || this.match(types$1.parenL) || this.match(types$1.bracketL) || this.match(types$1.backQuote) || this.match(types$1.regexp) || this.match(types$1.slash) || this.hasPlugin("v8intrinsic") && this.match(types$1.modulo);
  35332. };
  35333. _proto.parseYield = function parseYield() {
  35334. var node = this.startNode();
  35335. this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter);
  35336. this.next();
  35337. var delegating = false;
  35338. var argument = null;
  35339. if (!this.hasPrecedingLineBreak()) {
  35340. delegating = this.eat(types$1.star);
  35341. switch (this.state.type) {
  35342. case types$1.semi:
  35343. case types$1.eof:
  35344. case types$1.braceR:
  35345. case types$1.parenR:
  35346. case types$1.bracketR:
  35347. case types$1.braceBarR:
  35348. case types$1.colon:
  35349. case types$1.comma:
  35350. if (!delegating) break;
  35351. default:
  35352. argument = this.parseMaybeAssign();
  35353. }
  35354. }
  35355. node.delegate = delegating;
  35356. node.argument = argument;
  35357. return this.finishNode(node, "YieldExpression");
  35358. };
  35359. _proto.checkPipelineAtInfixOperator = function checkPipelineAtInfixOperator(left, leftStartPos) {
  35360. if (this.getPluginOption("pipelineOperator", "proposal") === "smart") {
  35361. if (left.type === "SequenceExpression") {
  35362. this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression);
  35363. }
  35364. }
  35365. };
  35366. _proto.parseSmartPipelineBody = function parseSmartPipelineBody(childExpression, startPos, startLoc) {
  35367. this.checkSmartPipelineBodyEarlyErrors(childExpression, startPos);
  35368. return this.parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc);
  35369. };
  35370. _proto.checkSmartPipelineBodyEarlyErrors = function checkSmartPipelineBodyEarlyErrors(childExpression, startPos) {
  35371. if (this.match(types$1.arrow)) {
  35372. throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow);
  35373. } else if (childExpression.type === "SequenceExpression") {
  35374. this.raise(startPos, ErrorMessages.PipelineBodySequenceExpression);
  35375. }
  35376. };
  35377. _proto.parseSmartPipelineBodyInStyle = function parseSmartPipelineBodyInStyle(childExpression, startPos, startLoc) {
  35378. var bodyNode = this.startNodeAt(startPos, startLoc);
  35379. var isSimpleReference = this.isSimpleReference(childExpression);
  35380. if (isSimpleReference) {
  35381. bodyNode.callee = childExpression;
  35382. } else {
  35383. if (!this.topicReferenceWasUsedInCurrentTopicContext()) {
  35384. this.raise(startPos, ErrorMessages.PipelineTopicUnused);
  35385. }
  35386. bodyNode.expression = childExpression;
  35387. }
  35388. return this.finishNode(bodyNode, isSimpleReference ? "PipelineBareFunction" : "PipelineTopicExpression");
  35389. };
  35390. _proto.isSimpleReference = function isSimpleReference(expression) {
  35391. switch (expression.type) {
  35392. case "MemberExpression":
  35393. return !expression.computed && this.isSimpleReference(expression.object);
  35394. case "Identifier":
  35395. return true;
  35396. default:
  35397. return false;
  35398. }
  35399. };
  35400. _proto.withTopicPermittingContext = function withTopicPermittingContext(callback) {
  35401. var outerContextTopicState = this.state.topicContext;
  35402. this.state.topicContext = {
  35403. maxNumOfResolvableTopics: 1,
  35404. maxTopicIndex: null
  35405. };
  35406. try {
  35407. return callback();
  35408. } finally {
  35409. this.state.topicContext = outerContextTopicState;
  35410. }
  35411. };
  35412. _proto.withTopicForbiddingContext = function withTopicForbiddingContext(callback) {
  35413. var outerContextTopicState = this.state.topicContext;
  35414. this.state.topicContext = {
  35415. maxNumOfResolvableTopics: 0,
  35416. maxTopicIndex: null
  35417. };
  35418. try {
  35419. return callback();
  35420. } finally {
  35421. this.state.topicContext = outerContextTopicState;
  35422. }
  35423. };
  35424. _proto.withSoloAwaitPermittingContext = function withSoloAwaitPermittingContext(callback) {
  35425. var outerContextSoloAwaitState = this.state.soloAwait;
  35426. this.state.soloAwait = true;
  35427. try {
  35428. return callback();
  35429. } finally {
  35430. this.state.soloAwait = outerContextSoloAwaitState;
  35431. }
  35432. };
  35433. _proto.allowInAnd = function allowInAnd(callback) {
  35434. var flags = this.prodParam.currentFlags();
  35435. var prodParamToSet = PARAM_IN & ~flags;
  35436. if (prodParamToSet) {
  35437. this.prodParam.enter(flags | PARAM_IN);
  35438. try {
  35439. return callback();
  35440. } finally {
  35441. this.prodParam.exit();
  35442. }
  35443. }
  35444. return callback();
  35445. };
  35446. _proto.disallowInAnd = function disallowInAnd(callback) {
  35447. var flags = this.prodParam.currentFlags();
  35448. var prodParamToClear = PARAM_IN & flags;
  35449. if (prodParamToClear) {
  35450. this.prodParam.enter(flags & ~PARAM_IN);
  35451. try {
  35452. return callback();
  35453. } finally {
  35454. this.prodParam.exit();
  35455. }
  35456. }
  35457. return callback();
  35458. };
  35459. _proto.registerTopicReference = function registerTopicReference() {
  35460. this.state.topicContext.maxTopicIndex = 0;
  35461. };
  35462. _proto.primaryTopicReferenceIsAllowedInCurrentTopicContext = function primaryTopicReferenceIsAllowedInCurrentTopicContext() {
  35463. return this.state.topicContext.maxNumOfResolvableTopics >= 1;
  35464. };
  35465. _proto.topicReferenceWasUsedInCurrentTopicContext = function topicReferenceWasUsedInCurrentTopicContext() {
  35466. return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
  35467. };
  35468. _proto.parseFSharpPipelineBody = function parseFSharpPipelineBody(prec) {
  35469. var startPos = this.state.start;
  35470. var startLoc = this.state.startLoc;
  35471. this.state.potentialArrowAt = this.state.start;
  35472. var oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
  35473. this.state.inFSharpPipelineDirectBody = true;
  35474. var ret = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec);
  35475. this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
  35476. return ret;
  35477. };
  35478. _proto.parseModuleExpression = function parseModuleExpression() {
  35479. this.expectPlugin("moduleBlocks");
  35480. var node = this.startNode();
  35481. this.next();
  35482. this.eat(types$1.braceL);
  35483. var revertScopes = this.initializeScopes(true);
  35484. this.enterInitialScopes();
  35485. var program = this.startNode();
  35486. try {
  35487. node.body = this.parseProgram(program, types$1.braceR, "module");
  35488. } finally {
  35489. revertScopes();
  35490. }
  35491. this.eat(types$1.braceR);
  35492. return this.finishNode(node, "ModuleExpression");
  35493. };
  35494. return ExpressionParser;
  35495. }(LValParser);
  35496. var loopLabel = {
  35497. kind: "loop"
  35498. },
  35499. switchLabel = {
  35500. kind: "switch"
  35501. };
  35502. var FUNC_NO_FLAGS = 0,
  35503. FUNC_STATEMENT = 1,
  35504. FUNC_HANGING_STATEMENT = 2,
  35505. FUNC_NULLABLE_ID = 4;
  35506. var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
  35507. var keywordRelationalOperator = new RegExp("in(?:stanceof)?", "y");
  35508. function babel7CompatTokens(tokens) {
  35509. {
  35510. for (var i = 0; i < tokens.length; i++) {
  35511. var token = tokens[i];
  35512. if (token.type === types$1.privateName) {
  35513. var loc = token.loc,
  35514. start = token.start,
  35515. value = token.value,
  35516. end = token.end;
  35517. var hashEndPos = start + 1;
  35518. var hashEndLoc = new Position(loc.start.line, loc.start.column + 1);
  35519. tokens.splice(i, 1, new Token({
  35520. type: types$1.hash,
  35521. value: "#",
  35522. start: start,
  35523. end: hashEndPos,
  35524. startLoc: loc.start,
  35525. endLoc: hashEndLoc
  35526. }), new Token({
  35527. type: types$1.name,
  35528. value: value,
  35529. start: hashEndPos,
  35530. end: end,
  35531. startLoc: hashEndLoc,
  35532. endLoc: loc.end
  35533. }));
  35534. }
  35535. }
  35536. }
  35537. return tokens;
  35538. }
  35539. var StatementParser = function (_ExpressionParser) {
  35540. _inherits(StatementParser, _ExpressionParser);
  35541. function StatementParser() {
  35542. return _ExpressionParser.apply(this, arguments) || this;
  35543. }
  35544. var _proto = StatementParser.prototype;
  35545. _proto.parseTopLevel = function parseTopLevel(file, program) {
  35546. file.program = this.parseProgram(program);
  35547. file.comments = this.state.comments;
  35548. if (this.options.tokens) file.tokens = babel7CompatTokens(this.tokens);
  35549. return this.finishNode(file, "File");
  35550. };
  35551. _proto.parseProgram = function parseProgram(program, end, sourceType) {
  35552. if (end === void 0) {
  35553. end = types$1.eof;
  35554. }
  35555. if (sourceType === void 0) {
  35556. sourceType = this.options.sourceType;
  35557. }
  35558. program.sourceType = sourceType;
  35559. program.interpreter = this.parseInterpreterDirective();
  35560. this.parseBlockBody(program, true, true, end);
  35561. if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
  35562. for (var _i2 = 0, _Array$from2 = Array.from(this.scope.undefinedExports); _i2 < _Array$from2.length; _i2++) {
  35563. var _Array$from2$_i = _Array$from2[_i2],
  35564. name = _Array$from2$_i[0];
  35565. var pos = this.scope.undefinedExports.get(name);
  35566. this.raise(pos, ErrorMessages.ModuleExportUndefined, name);
  35567. }
  35568. }
  35569. return this.finishNode(program, "Program");
  35570. };
  35571. _proto.stmtToDirective = function stmtToDirective(stmt) {
  35572. var expr = stmt.expression;
  35573. var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);
  35574. var directive = this.startNodeAt(stmt.start, stmt.loc.start);
  35575. var raw = this.input.slice(expr.start, expr.end);
  35576. var val = directiveLiteral.value = raw.slice(1, -1);
  35577. this.addExtra(directiveLiteral, "raw", raw);
  35578. this.addExtra(directiveLiteral, "rawValue", val);
  35579. directive.value = this.finishNodeAt(directiveLiteral, "DirectiveLiteral", expr.end, expr.loc.end);
  35580. return this.finishNodeAt(directive, "Directive", stmt.end, stmt.loc.end);
  35581. };
  35582. _proto.parseInterpreterDirective = function parseInterpreterDirective() {
  35583. if (!this.match(types$1.interpreterDirective)) {
  35584. return null;
  35585. }
  35586. var node = this.startNode();
  35587. node.value = this.state.value;
  35588. this.next();
  35589. return this.finishNode(node, "InterpreterDirective");
  35590. };
  35591. _proto.isLet = function isLet(context) {
  35592. if (!this.isContextual("let")) {
  35593. return false;
  35594. }
  35595. return this.isLetKeyword(context);
  35596. };
  35597. _proto.isLetKeyword = function isLetKeyword(context) {
  35598. var next = this.nextTokenStart();
  35599. var nextCh = this.codePointAtPos(next);
  35600. if (nextCh === 92 || nextCh === 91) {
  35601. return true;
  35602. }
  35603. if (context) return false;
  35604. if (nextCh === 123) return true;
  35605. if (isIdentifierStart(nextCh)) {
  35606. keywordRelationalOperator.lastIndex = next;
  35607. var matched = keywordRelationalOperator.exec(this.input);
  35608. if (matched !== null) {
  35609. var endCh = this.codePointAtPos(next + matched[0].length);
  35610. if (!isIdentifierChar(endCh) && endCh !== 92) {
  35611. return false;
  35612. }
  35613. }
  35614. return true;
  35615. }
  35616. return false;
  35617. };
  35618. _proto.parseStatement = function parseStatement(context, topLevel) {
  35619. if (this.match(types$1.at)) {
  35620. this.parseDecorators(true);
  35621. }
  35622. return this.parseStatementContent(context, topLevel);
  35623. };
  35624. _proto.parseStatementContent = function parseStatementContent(context, topLevel) {
  35625. var starttype = this.state.type;
  35626. var node = this.startNode();
  35627. var kind;
  35628. if (this.isLet(context)) {
  35629. starttype = types$1._var;
  35630. kind = "let";
  35631. }
  35632. switch (starttype) {
  35633. case types$1._break:
  35634. case types$1._continue:
  35635. return this.parseBreakContinueStatement(node, starttype.keyword);
  35636. case types$1._debugger:
  35637. return this.parseDebuggerStatement(node);
  35638. case types$1._do:
  35639. return this.parseDoStatement(node);
  35640. case types$1._for:
  35641. return this.parseForStatement(node);
  35642. case types$1._function:
  35643. if (this.lookaheadCharCode() === 46) break;
  35644. if (context) {
  35645. if (this.state.strict) {
  35646. this.raise(this.state.start, ErrorMessages.StrictFunction);
  35647. } else if (context !== "if" && context !== "label") {
  35648. this.raise(this.state.start, ErrorMessages.SloppyFunction);
  35649. }
  35650. }
  35651. return this.parseFunctionStatement(node, false, !context);
  35652. case types$1._class:
  35653. if (context) this.unexpected();
  35654. return this.parseClass(node, true);
  35655. case types$1._if:
  35656. return this.parseIfStatement(node);
  35657. case types$1._return:
  35658. return this.parseReturnStatement(node);
  35659. case types$1._switch:
  35660. return this.parseSwitchStatement(node);
  35661. case types$1._throw:
  35662. return this.parseThrowStatement(node);
  35663. case types$1._try:
  35664. return this.parseTryStatement(node);
  35665. case types$1._const:
  35666. case types$1._var:
  35667. kind = kind || this.state.value;
  35668. if (context && kind !== "var") {
  35669. this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration);
  35670. }
  35671. return this.parseVarStatement(node, kind);
  35672. case types$1._while:
  35673. return this.parseWhileStatement(node);
  35674. case types$1._with:
  35675. return this.parseWithStatement(node);
  35676. case types$1.braceL:
  35677. return this.parseBlock();
  35678. case types$1.semi:
  35679. return this.parseEmptyStatement(node);
  35680. case types$1._import:
  35681. {
  35682. var nextTokenCharCode = this.lookaheadCharCode();
  35683. if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
  35684. break;
  35685. }
  35686. }
  35687. case types$1._export:
  35688. {
  35689. if (!this.options.allowImportExportEverywhere && !topLevel) {
  35690. this.raise(this.state.start, ErrorMessages.UnexpectedImportExport);
  35691. }
  35692. this.next();
  35693. var result;
  35694. if (starttype === types$1._import) {
  35695. result = this.parseImport(node);
  35696. if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
  35697. this.sawUnambiguousESM = true;
  35698. }
  35699. } else {
  35700. result = this.parseExport(node);
  35701. if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
  35702. this.sawUnambiguousESM = true;
  35703. }
  35704. }
  35705. this.assertModuleNodeAllowed(node);
  35706. return result;
  35707. }
  35708. default:
  35709. {
  35710. if (this.isAsyncFunction()) {
  35711. if (context) {
  35712. this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext);
  35713. }
  35714. this.next();
  35715. return this.parseFunctionStatement(node, true, !context);
  35716. }
  35717. }
  35718. }
  35719. var maybeName = this.state.value;
  35720. var expr = this.parseExpression();
  35721. if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
  35722. return this.parseLabeledStatement(node, maybeName, expr, context);
  35723. } else {
  35724. return this.parseExpressionStatement(node, expr);
  35725. }
  35726. };
  35727. _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {
  35728. if (!this.options.allowImportExportEverywhere && !this.inModule) {
  35729. this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule);
  35730. }
  35731. };
  35732. _proto.takeDecorators = function takeDecorators(node) {
  35733. var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  35734. if (decorators.length) {
  35735. node.decorators = decorators;
  35736. this.resetStartLocationFromNode(node, decorators[0]);
  35737. this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
  35738. }
  35739. };
  35740. _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {
  35741. return this.match(types$1._class);
  35742. };
  35743. _proto.parseDecorators = function parseDecorators(allowExport) {
  35744. var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  35745. while (this.match(types$1.at)) {
  35746. var decorator = this.parseDecorator();
  35747. currentContextDecorators.push(decorator);
  35748. }
  35749. if (this.match(types$1._export)) {
  35750. if (!allowExport) {
  35751. this.unexpected();
  35752. }
  35753. if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  35754. this.raise(this.state.start, ErrorMessages.DecoratorExportClass);
  35755. }
  35756. } else if (!this.canHaveLeadingDecorator()) {
  35757. throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator);
  35758. }
  35759. };
  35760. _proto.parseDecorator = function parseDecorator() {
  35761. this.expectOnePlugin(["decorators-legacy", "decorators"]);
  35762. var node = this.startNode();
  35763. this.next();
  35764. if (this.hasPlugin("decorators")) {
  35765. this.state.decoratorStack.push([]);
  35766. var startPos = this.state.start;
  35767. var startLoc = this.state.startLoc;
  35768. var expr;
  35769. if (this.eat(types$1.parenL)) {
  35770. expr = this.parseExpression();
  35771. this.expect(types$1.parenR);
  35772. } else {
  35773. expr = this.parseIdentifier(false);
  35774. while (this.eat(types$1.dot)) {
  35775. var _node = this.startNodeAt(startPos, startLoc);
  35776. _node.object = expr;
  35777. _node.property = this.parseIdentifier(true);
  35778. _node.computed = false;
  35779. expr = this.finishNode(_node, "MemberExpression");
  35780. }
  35781. }
  35782. node.expression = this.parseMaybeDecoratorArguments(expr);
  35783. this.state.decoratorStack.pop();
  35784. } else {
  35785. node.expression = this.parseExprSubscripts();
  35786. }
  35787. return this.finishNode(node, "Decorator");
  35788. };
  35789. _proto.parseMaybeDecoratorArguments = function parseMaybeDecoratorArguments(expr) {
  35790. if (this.eat(types$1.parenL)) {
  35791. var node = this.startNodeAtNode(expr);
  35792. node.callee = expr;
  35793. node.arguments = this.parseCallExpressionArguments(types$1.parenR, false);
  35794. this.toReferencedList(node.arguments);
  35795. return this.finishNode(node, "CallExpression");
  35796. }
  35797. return expr;
  35798. };
  35799. _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) {
  35800. var isBreak = keyword === "break";
  35801. this.next();
  35802. if (this.isLineTerminator()) {
  35803. node.label = null;
  35804. } else {
  35805. node.label = this.parseIdentifier();
  35806. this.semicolon();
  35807. }
  35808. this.verifyBreakContinue(node, keyword);
  35809. return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
  35810. };
  35811. _proto.verifyBreakContinue = function verifyBreakContinue(node, keyword) {
  35812. var isBreak = keyword === "break";
  35813. var i;
  35814. for (i = 0; i < this.state.labels.length; ++i) {
  35815. var lab = this.state.labels[i];
  35816. if (node.label == null || lab.name === node.label.name) {
  35817. if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
  35818. if (node.label && isBreak) break;
  35819. }
  35820. }
  35821. if (i === this.state.labels.length) {
  35822. this.raise(node.start, ErrorMessages.IllegalBreakContinue, keyword);
  35823. }
  35824. };
  35825. _proto.parseDebuggerStatement = function parseDebuggerStatement(node) {
  35826. this.next();
  35827. this.semicolon();
  35828. return this.finishNode(node, "DebuggerStatement");
  35829. };
  35830. _proto.parseHeaderExpression = function parseHeaderExpression() {
  35831. this.expect(types$1.parenL);
  35832. var val = this.parseExpression();
  35833. this.expect(types$1.parenR);
  35834. return val;
  35835. };
  35836. _proto.parseDoStatement = function parseDoStatement(node) {
  35837. var _this = this;
  35838. this.next();
  35839. this.state.labels.push(loopLabel);
  35840. node.body = this.withTopicForbiddingContext(function () {
  35841. return _this.parseStatement("do");
  35842. });
  35843. this.state.labels.pop();
  35844. this.expect(types$1._while);
  35845. node.test = this.parseHeaderExpression();
  35846. this.eat(types$1.semi);
  35847. return this.finishNode(node, "DoWhileStatement");
  35848. };
  35849. _proto.parseForStatement = function parseForStatement(node) {
  35850. this.next();
  35851. this.state.labels.push(loopLabel);
  35852. var awaitAt = -1;
  35853. if (this.isAwaitAllowed() && this.eatContextual("await")) {
  35854. awaitAt = this.state.lastTokStart;
  35855. }
  35856. this.scope.enter(SCOPE_OTHER);
  35857. this.expect(types$1.parenL);
  35858. if (this.match(types$1.semi)) {
  35859. if (awaitAt > -1) {
  35860. this.unexpected(awaitAt);
  35861. }
  35862. return this.parseFor(node, null);
  35863. }
  35864. var startsWithLet = this.isContextual("let");
  35865. var isLet = startsWithLet && this.isLetKeyword();
  35866. if (this.match(types$1._var) || this.match(types$1._const) || isLet) {
  35867. var _init = this.startNode();
  35868. var kind = isLet ? "let" : this.state.value;
  35869. this.next();
  35870. this.parseVar(_init, true, kind);
  35871. this.finishNode(_init, "VariableDeclaration");
  35872. if ((this.match(types$1._in) || this.isContextual("of")) && _init.declarations.length === 1) {
  35873. return this.parseForIn(node, _init, awaitAt);
  35874. }
  35875. if (awaitAt > -1) {
  35876. this.unexpected(awaitAt);
  35877. }
  35878. return this.parseFor(node, _init);
  35879. }
  35880. var startsWithUnescapedName = this.match(types$1.name) && !this.state.containsEsc;
  35881. var refExpressionErrors = new ExpressionErrors();
  35882. var init = this.parseExpression(true, refExpressionErrors);
  35883. var isForOf = this.isContextual("of");
  35884. if (isForOf) {
  35885. if (startsWithLet) {
  35886. this.raise(init.start, ErrorMessages.ForOfLet);
  35887. } else if (awaitAt === -1 && startsWithUnescapedName && init.type === "Identifier" && init.name === "async") {
  35888. this.raise(init.start, ErrorMessages.ForOfAsync);
  35889. }
  35890. }
  35891. if (isForOf || this.match(types$1._in)) {
  35892. this.toAssignable(init, true);
  35893. var description = isForOf ? "for-of statement" : "for-in statement";
  35894. this.checkLVal(init, description);
  35895. return this.parseForIn(node, init, awaitAt);
  35896. } else {
  35897. this.checkExpressionErrors(refExpressionErrors, true);
  35898. }
  35899. if (awaitAt > -1) {
  35900. this.unexpected(awaitAt);
  35901. }
  35902. return this.parseFor(node, init);
  35903. };
  35904. _proto.parseFunctionStatement = function parseFunctionStatement(node, isAsync, declarationPosition) {
  35905. this.next();
  35906. return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync);
  35907. };
  35908. _proto.parseIfStatement = function parseIfStatement(node) {
  35909. this.next();
  35910. node.test = this.parseHeaderExpression();
  35911. node.consequent = this.parseStatement("if");
  35912. node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null;
  35913. return this.finishNode(node, "IfStatement");
  35914. };
  35915. _proto.parseReturnStatement = function parseReturnStatement(node) {
  35916. if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
  35917. this.raise(this.state.start, ErrorMessages.IllegalReturn);
  35918. }
  35919. this.next();
  35920. if (this.isLineTerminator()) {
  35921. node.argument = null;
  35922. } else {
  35923. node.argument = this.parseExpression();
  35924. this.semicolon();
  35925. }
  35926. return this.finishNode(node, "ReturnStatement");
  35927. };
  35928. _proto.parseSwitchStatement = function parseSwitchStatement(node) {
  35929. this.next();
  35930. node.discriminant = this.parseHeaderExpression();
  35931. var cases = node.cases = [];
  35932. this.expect(types$1.braceL);
  35933. this.state.labels.push(switchLabel);
  35934. this.scope.enter(SCOPE_OTHER);
  35935. var cur;
  35936. for (var sawDefault; !this.match(types$1.braceR);) {
  35937. if (this.match(types$1._case) || this.match(types$1._default)) {
  35938. var isCase = this.match(types$1._case);
  35939. if (cur) this.finishNode(cur, "SwitchCase");
  35940. cases.push(cur = this.startNode());
  35941. cur.consequent = [];
  35942. this.next();
  35943. if (isCase) {
  35944. cur.test = this.parseExpression();
  35945. } else {
  35946. if (sawDefault) {
  35947. this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch);
  35948. }
  35949. sawDefault = true;
  35950. cur.test = null;
  35951. }
  35952. this.expect(types$1.colon);
  35953. } else {
  35954. if (cur) {
  35955. cur.consequent.push(this.parseStatement(null));
  35956. } else {
  35957. this.unexpected();
  35958. }
  35959. }
  35960. }
  35961. this.scope.exit();
  35962. if (cur) this.finishNode(cur, "SwitchCase");
  35963. this.next();
  35964. this.state.labels.pop();
  35965. return this.finishNode(node, "SwitchStatement");
  35966. };
  35967. _proto.parseThrowStatement = function parseThrowStatement(node) {
  35968. this.next();
  35969. if (this.hasPrecedingLineBreak()) {
  35970. this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow);
  35971. }
  35972. node.argument = this.parseExpression();
  35973. this.semicolon();
  35974. return this.finishNode(node, "ThrowStatement");
  35975. };
  35976. _proto.parseCatchClauseParam = function parseCatchClauseParam() {
  35977. var param = this.parseBindingAtom();
  35978. var simple = param.type === "Identifier";
  35979. this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);
  35980. this.checkLVal(param, "catch clause", BIND_LEXICAL);
  35981. return param;
  35982. };
  35983. _proto.parseTryStatement = function parseTryStatement(node) {
  35984. var _this2 = this;
  35985. this.next();
  35986. node.block = this.parseBlock();
  35987. node.handler = null;
  35988. if (this.match(types$1._catch)) {
  35989. var clause = this.startNode();
  35990. this.next();
  35991. if (this.match(types$1.parenL)) {
  35992. this.expect(types$1.parenL);
  35993. clause.param = this.parseCatchClauseParam();
  35994. this.expect(types$1.parenR);
  35995. } else {
  35996. clause.param = null;
  35997. this.scope.enter(SCOPE_OTHER);
  35998. }
  35999. clause.body = this.withTopicForbiddingContext(function () {
  36000. return _this2.parseBlock(false, false);
  36001. });
  36002. this.scope.exit();
  36003. node.handler = this.finishNode(clause, "CatchClause");
  36004. }
  36005. node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
  36006. if (!node.handler && !node.finalizer) {
  36007. this.raise(node.start, ErrorMessages.NoCatchOrFinally);
  36008. }
  36009. return this.finishNode(node, "TryStatement");
  36010. };
  36011. _proto.parseVarStatement = function parseVarStatement(node, kind) {
  36012. this.next();
  36013. this.parseVar(node, false, kind);
  36014. this.semicolon();
  36015. return this.finishNode(node, "VariableDeclaration");
  36016. };
  36017. _proto.parseWhileStatement = function parseWhileStatement(node) {
  36018. var _this3 = this;
  36019. this.next();
  36020. node.test = this.parseHeaderExpression();
  36021. this.state.labels.push(loopLabel);
  36022. node.body = this.withTopicForbiddingContext(function () {
  36023. return _this3.parseStatement("while");
  36024. });
  36025. this.state.labels.pop();
  36026. return this.finishNode(node, "WhileStatement");
  36027. };
  36028. _proto.parseWithStatement = function parseWithStatement(node) {
  36029. var _this4 = this;
  36030. if (this.state.strict) {
  36031. this.raise(this.state.start, ErrorMessages.StrictWith);
  36032. }
  36033. this.next();
  36034. node.object = this.parseHeaderExpression();
  36035. node.body = this.withTopicForbiddingContext(function () {
  36036. return _this4.parseStatement("with");
  36037. });
  36038. return this.finishNode(node, "WithStatement");
  36039. };
  36040. _proto.parseEmptyStatement = function parseEmptyStatement(node) {
  36041. this.next();
  36042. return this.finishNode(node, "EmptyStatement");
  36043. };
  36044. _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr, context) {
  36045. for (var _i4 = 0, _this$state$labels2 = this.state.labels; _i4 < _this$state$labels2.length; _i4++) {
  36046. var label = _this$state$labels2[_i4];
  36047. if (label.name === maybeName) {
  36048. this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName);
  36049. }
  36050. }
  36051. var kind = this.state.type.isLoop ? "loop" : this.match(types$1._switch) ? "switch" : null;
  36052. for (var i = this.state.labels.length - 1; i >= 0; i--) {
  36053. var _label = this.state.labels[i];
  36054. if (_label.statementStart === node.start) {
  36055. _label.statementStart = this.state.start;
  36056. _label.kind = kind;
  36057. } else {
  36058. break;
  36059. }
  36060. }
  36061. this.state.labels.push({
  36062. name: maybeName,
  36063. kind: kind,
  36064. statementStart: this.state.start
  36065. });
  36066. node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
  36067. this.state.labels.pop();
  36068. node.label = expr;
  36069. return this.finishNode(node, "LabeledStatement");
  36070. };
  36071. _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {
  36072. node.expression = expr;
  36073. this.semicolon();
  36074. return this.finishNode(node, "ExpressionStatement");
  36075. };
  36076. _proto.parseBlock = function parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) {
  36077. if (allowDirectives === void 0) {
  36078. allowDirectives = false;
  36079. }
  36080. if (createNewLexicalScope === void 0) {
  36081. createNewLexicalScope = true;
  36082. }
  36083. var node = this.startNode();
  36084. if (allowDirectives) {
  36085. this.state.strictErrors.clear();
  36086. }
  36087. this.expect(types$1.braceL);
  36088. if (createNewLexicalScope) {
  36089. this.scope.enter(SCOPE_OTHER);
  36090. }
  36091. this.parseBlockBody(node, allowDirectives, false, types$1.braceR, afterBlockParse);
  36092. if (createNewLexicalScope) {
  36093. this.scope.exit();
  36094. }
  36095. return this.finishNode(node, "BlockStatement");
  36096. };
  36097. _proto.isValidDirective = function isValidDirective(stmt) {
  36098. return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
  36099. };
  36100. _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
  36101. var body = node.body = [];
  36102. var directives = node.directives = [];
  36103. this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse);
  36104. };
  36105. _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
  36106. var oldStrict = this.state.strict;
  36107. var hasStrictModeDirective = false;
  36108. var parsedNonDirective = false;
  36109. while (!this.match(end)) {
  36110. var stmt = this.parseStatement(null, topLevel);
  36111. if (directives && !parsedNonDirective) {
  36112. if (this.isValidDirective(stmt)) {
  36113. var directive = this.stmtToDirective(stmt);
  36114. directives.push(directive);
  36115. if (!hasStrictModeDirective && directive.value.value === "use strict") {
  36116. hasStrictModeDirective = true;
  36117. this.setStrict(true);
  36118. }
  36119. continue;
  36120. }
  36121. parsedNonDirective = true;
  36122. this.state.strictErrors.clear();
  36123. }
  36124. body.push(stmt);
  36125. }
  36126. if (afterBlockParse) {
  36127. afterBlockParse.call(this, hasStrictModeDirective);
  36128. }
  36129. if (!oldStrict) {
  36130. this.setStrict(false);
  36131. }
  36132. this.next();
  36133. };
  36134. _proto.parseFor = function parseFor(node, init) {
  36135. var _this5 = this;
  36136. node.init = init;
  36137. this.semicolon(false);
  36138. node.test = this.match(types$1.semi) ? null : this.parseExpression();
  36139. this.semicolon(false);
  36140. node.update = this.match(types$1.parenR) ? null : this.parseExpression();
  36141. this.expect(types$1.parenR);
  36142. node.body = this.withTopicForbiddingContext(function () {
  36143. return _this5.parseStatement("for");
  36144. });
  36145. this.scope.exit();
  36146. this.state.labels.pop();
  36147. return this.finishNode(node, "ForStatement");
  36148. };
  36149. _proto.parseForIn = function parseForIn(node, init, awaitAt) {
  36150. var _this6 = this;
  36151. var isForIn = this.match(types$1._in);
  36152. this.next();
  36153. if (isForIn) {
  36154. if (awaitAt > -1) this.unexpected(awaitAt);
  36155. } else {
  36156. node["await"] = awaitAt > -1;
  36157. }
  36158. if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
  36159. this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of");
  36160. } else if (init.type === "AssignmentPattern") {
  36161. this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop");
  36162. }
  36163. node.left = init;
  36164. node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
  36165. this.expect(types$1.parenR);
  36166. node.body = this.withTopicForbiddingContext(function () {
  36167. return _this6.parseStatement("for");
  36168. });
  36169. this.scope.exit();
  36170. this.state.labels.pop();
  36171. return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
  36172. };
  36173. _proto.parseVar = function parseVar(node, isFor, kind) {
  36174. var declarations = node.declarations = [];
  36175. var isTypescript = this.hasPlugin("typescript");
  36176. node.kind = kind;
  36177. for (;;) {
  36178. var decl = this.startNode();
  36179. this.parseVarId(decl, kind);
  36180. if (this.eat(types$1.eq)) {
  36181. decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
  36182. } else {
  36183. if (kind === "const" && !(this.match(types$1._in) || this.isContextual("of"))) {
  36184. if (!isTypescript) {
  36185. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations");
  36186. }
  36187. } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(types$1._in) || this.isContextual("of")))) {
  36188. this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns");
  36189. }
  36190. decl.init = null;
  36191. }
  36192. declarations.push(this.finishNode(decl, "VariableDeclarator"));
  36193. if (!this.eat(types$1.comma)) break;
  36194. }
  36195. return node;
  36196. };
  36197. _proto.parseVarId = function parseVarId(decl, kind) {
  36198. decl.id = this.parseBindingAtom();
  36199. this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, kind !== "var");
  36200. };
  36201. _proto.parseFunction = function parseFunction(node, statement, isAsync) {
  36202. var _this7 = this;
  36203. if (statement === void 0) {
  36204. statement = FUNC_NO_FLAGS;
  36205. }
  36206. if (isAsync === void 0) {
  36207. isAsync = false;
  36208. }
  36209. var isStatement = statement & FUNC_STATEMENT;
  36210. var isHangingStatement = statement & FUNC_HANGING_STATEMENT;
  36211. var requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);
  36212. this.initFunction(node, isAsync);
  36213. if (this.match(types$1.star) && isHangingStatement) {
  36214. this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext);
  36215. }
  36216. node.generator = this.eat(types$1.star);
  36217. if (isStatement) {
  36218. node.id = this.parseFunctionId(requireId);
  36219. }
  36220. var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
  36221. this.state.maybeInArrowParameters = false;
  36222. this.scope.enter(SCOPE_FUNCTION);
  36223. this.prodParam.enter(functionFlags(isAsync, node.generator));
  36224. if (!isStatement) {
  36225. node.id = this.parseFunctionId();
  36226. }
  36227. this.parseFunctionParams(node, false);
  36228. this.withTopicForbiddingContext(function () {
  36229. _this7.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
  36230. });
  36231. this.prodParam.exit();
  36232. this.scope.exit();
  36233. if (isStatement && !isHangingStatement) {
  36234. this.registerFunctionStatementId(node);
  36235. }
  36236. this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
  36237. return node;
  36238. };
  36239. _proto.parseFunctionId = function parseFunctionId(requireId) {
  36240. return requireId || this.match(types$1.name) ? this.parseIdentifier() : null;
  36241. };
  36242. _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {
  36243. this.expect(types$1.parenL);
  36244. this.expressionScope.enter(newParameterDeclarationScope());
  36245. node.params = this.parseBindingList(types$1.parenR, 41, false, allowModifiers);
  36246. this.expressionScope.exit();
  36247. };
  36248. _proto.registerFunctionStatementId = function registerFunctionStatementId(node) {
  36249. if (!node.id) return;
  36250. this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, node.id.start);
  36251. };
  36252. _proto.parseClass = function parseClass(node, isStatement, optionalId) {
  36253. this.next();
  36254. this.takeDecorators(node);
  36255. var oldStrict = this.state.strict;
  36256. this.state.strict = true;
  36257. this.parseClassId(node, isStatement, optionalId);
  36258. this.parseClassSuper(node);
  36259. node.body = this.parseClassBody(!!node.superClass, oldStrict);
  36260. return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
  36261. };
  36262. _proto.isClassProperty = function isClassProperty() {
  36263. return this.match(types$1.eq) || this.match(types$1.semi) || this.match(types$1.braceR);
  36264. };
  36265. _proto.isClassMethod = function isClassMethod() {
  36266. return this.match(types$1.parenL);
  36267. };
  36268. _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {
  36269. return !method.computed && !method["static"] && (method.key.name === "constructor" || method.key.value === "constructor");
  36270. };
  36271. _proto.parseClassBody = function parseClassBody(hadSuperClass, oldStrict) {
  36272. var _this8 = this;
  36273. this.classScope.enter();
  36274. var state = {
  36275. hadConstructor: false,
  36276. hadSuperClass: hadSuperClass
  36277. };
  36278. var decorators = [];
  36279. var classBody = this.startNode();
  36280. classBody.body = [];
  36281. this.expect(types$1.braceL);
  36282. this.withTopicForbiddingContext(function () {
  36283. while (!_this8.match(types$1.braceR)) {
  36284. if (_this8.eat(types$1.semi)) {
  36285. if (decorators.length > 0) {
  36286. throw _this8.raise(_this8.state.lastTokEnd, ErrorMessages.DecoratorSemicolon);
  36287. }
  36288. continue;
  36289. }
  36290. if (_this8.match(types$1.at)) {
  36291. decorators.push(_this8.parseDecorator());
  36292. continue;
  36293. }
  36294. var member = _this8.startNode();
  36295. if (decorators.length) {
  36296. member.decorators = decorators;
  36297. _this8.resetStartLocationFromNode(member, decorators[0]);
  36298. decorators = [];
  36299. }
  36300. _this8.parseClassMember(classBody, member, state);
  36301. if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
  36302. _this8.raise(member.start, ErrorMessages.DecoratorConstructor);
  36303. }
  36304. }
  36305. });
  36306. this.state.strict = oldStrict;
  36307. this.next();
  36308. if (decorators.length) {
  36309. throw this.raise(this.state.start, ErrorMessages.TrailingDecorator);
  36310. }
  36311. this.classScope.exit();
  36312. return this.finishNode(classBody, "ClassBody");
  36313. };
  36314. _proto.parseClassMemberFromModifier = function parseClassMemberFromModifier(classBody, member) {
  36315. var key = this.parseIdentifier(true);
  36316. if (this.isClassMethod()) {
  36317. var method = member;
  36318. method.kind = "method";
  36319. method.computed = false;
  36320. method.key = key;
  36321. method["static"] = false;
  36322. this.pushClassMethod(classBody, method, false, false, false, false);
  36323. return true;
  36324. } else if (this.isClassProperty()) {
  36325. var prop = member;
  36326. prop.computed = false;
  36327. prop.key = key;
  36328. prop["static"] = false;
  36329. classBody.body.push(this.parseClassProperty(prop));
  36330. return true;
  36331. }
  36332. return false;
  36333. };
  36334. _proto.parseClassMember = function parseClassMember(classBody, member, state) {
  36335. var isStatic = this.isContextual("static");
  36336. if (isStatic) {
  36337. if (this.parseClassMemberFromModifier(classBody, member)) {
  36338. return;
  36339. }
  36340. if (this.eat(types$1.braceL)) {
  36341. this.parseClassStaticBlock(classBody, member);
  36342. return;
  36343. }
  36344. }
  36345. this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
  36346. };
  36347. _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
  36348. var publicMethod = member;
  36349. var privateMethod = member;
  36350. var publicProp = member;
  36351. var privateProp = member;
  36352. var method = publicMethod;
  36353. var publicMember = publicMethod;
  36354. member["static"] = isStatic;
  36355. if (this.eat(types$1.star)) {
  36356. method.kind = "method";
  36357. var isPrivateName = this.match(types$1.privateName);
  36358. this.parseClassElementName(method);
  36359. if (isPrivateName) {
  36360. this.pushClassPrivateMethod(classBody, privateMethod, true, false);
  36361. return;
  36362. }
  36363. if (this.isNonstaticConstructor(publicMethod)) {
  36364. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator);
  36365. }
  36366. this.pushClassMethod(classBody, publicMethod, true, false, false, false);
  36367. return;
  36368. }
  36369. var containsEsc = this.state.containsEsc;
  36370. var isPrivate = this.match(types$1.privateName);
  36371. var key = this.parseClassElementName(member);
  36372. var isSimple = key.type === "Identifier";
  36373. var maybeQuestionTokenStart = this.state.start;
  36374. this.parsePostMemberNameModifiers(publicMember);
  36375. if (this.isClassMethod()) {
  36376. method.kind = "method";
  36377. if (isPrivate) {
  36378. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  36379. return;
  36380. }
  36381. var isConstructor = this.isNonstaticConstructor(publicMethod);
  36382. var allowsDirectSuper = false;
  36383. if (isConstructor) {
  36384. publicMethod.kind = "constructor";
  36385. if (state.hadConstructor && !this.hasPlugin("typescript")) {
  36386. this.raise(key.start, ErrorMessages.DuplicateConstructor);
  36387. }
  36388. if (isConstructor && this.hasPlugin("typescript") && member.override) {
  36389. this.raise(key.start, ErrorMessages.OverrideOnConstructor);
  36390. }
  36391. state.hadConstructor = true;
  36392. allowsDirectSuper = state.hadSuperClass;
  36393. }
  36394. this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
  36395. } else if (this.isClassProperty()) {
  36396. if (isPrivate) {
  36397. this.pushClassPrivateProperty(classBody, privateProp);
  36398. } else {
  36399. this.pushClassProperty(classBody, publicProp);
  36400. }
  36401. } else if (isSimple && key.name === "async" && !containsEsc && !this.isLineTerminator()) {
  36402. var isGenerator = this.eat(types$1.star);
  36403. if (publicMember.optional) {
  36404. this.unexpected(maybeQuestionTokenStart);
  36405. }
  36406. method.kind = "method";
  36407. var _isPrivate = this.match(types$1.privateName);
  36408. this.parseClassElementName(method);
  36409. this.parsePostMemberNameModifiers(publicMember);
  36410. if (_isPrivate) {
  36411. this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
  36412. } else {
  36413. if (this.isNonstaticConstructor(publicMethod)) {
  36414. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync);
  36415. }
  36416. this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
  36417. }
  36418. } else if (isSimple && (key.name === "get" || key.name === "set") && !containsEsc && !(this.match(types$1.star) && this.isLineTerminator())) {
  36419. method.kind = key.name;
  36420. var _isPrivate2 = this.match(types$1.privateName);
  36421. this.parseClassElementName(publicMethod);
  36422. if (_isPrivate2) {
  36423. this.pushClassPrivateMethod(classBody, privateMethod, false, false);
  36424. } else {
  36425. if (this.isNonstaticConstructor(publicMethod)) {
  36426. this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor);
  36427. }
  36428. this.pushClassMethod(classBody, publicMethod, false, false, false, false);
  36429. }
  36430. this.checkGetterSetterParams(publicMethod);
  36431. } else if (this.isLineTerminator()) {
  36432. if (isPrivate) {
  36433. this.pushClassPrivateProperty(classBody, privateProp);
  36434. } else {
  36435. this.pushClassProperty(classBody, publicProp);
  36436. }
  36437. } else {
  36438. this.unexpected();
  36439. }
  36440. };
  36441. _proto.parseClassElementName = function parseClassElementName(member) {
  36442. var _this$state = this.state,
  36443. type = _this$state.type,
  36444. value = _this$state.value,
  36445. start = _this$state.start;
  36446. if ((type === types$1.name || type === types$1.string) && member["static"] && value === "prototype") {
  36447. this.raise(start, ErrorMessages.StaticPrototype);
  36448. }
  36449. if (type === types$1.privateName && value === "constructor") {
  36450. this.raise(start, ErrorMessages.ConstructorClassPrivateField);
  36451. }
  36452. return this.parsePropertyName(member, true);
  36453. };
  36454. _proto.parseClassStaticBlock = function parseClassStaticBlock(classBody, member) {
  36455. var _member$decorators;
  36456. this.expectPlugin("classStaticBlock", member.start);
  36457. this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER);
  36458. var oldLabels = this.state.labels;
  36459. this.state.labels = [];
  36460. this.prodParam.enter(PARAM);
  36461. var body = member.body = [];
  36462. this.parseBlockOrModuleBlockBody(body, undefined, false, types$1.braceR);
  36463. this.prodParam.exit();
  36464. this.scope.exit();
  36465. this.state.labels = oldLabels;
  36466. classBody.body.push(this.finishNode(member, "StaticBlock"));
  36467. if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
  36468. this.raise(member.start, ErrorMessages.DecoratorStaticBlock);
  36469. }
  36470. };
  36471. _proto.pushClassProperty = function pushClassProperty(classBody, prop) {
  36472. if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
  36473. this.raise(prop.key.start, ErrorMessages.ConstructorClassField);
  36474. }
  36475. classBody.body.push(this.parseClassProperty(prop));
  36476. };
  36477. _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) {
  36478. var node = this.parseClassPrivateProperty(prop);
  36479. classBody.body.push(node);
  36480. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start);
  36481. };
  36482. _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
  36483. classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
  36484. };
  36485. _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
  36486. var node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
  36487. classBody.body.push(node);
  36488. var kind = node.kind === "get" ? node["static"] ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node["static"] ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
  36489. this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start);
  36490. };
  36491. _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {};
  36492. _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {
  36493. this.parseInitializer(node);
  36494. this.semicolon();
  36495. return this.finishNode(node, "ClassPrivateProperty");
  36496. };
  36497. _proto.parseClassProperty = function parseClassProperty(node) {
  36498. this.parseInitializer(node);
  36499. this.semicolon();
  36500. return this.finishNode(node, "ClassProperty");
  36501. };
  36502. _proto.parseInitializer = function parseInitializer(node) {
  36503. this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
  36504. this.expressionScope.enter(newExpressionScope());
  36505. this.prodParam.enter(PARAM);
  36506. node.value = this.eat(types$1.eq) ? this.parseMaybeAssignAllowIn() : null;
  36507. this.expressionScope.exit();
  36508. this.prodParam.exit();
  36509. this.scope.exit();
  36510. };
  36511. _proto.parseClassId = function parseClassId(node, isStatement, optionalId, bindingType) {
  36512. if (bindingType === void 0) {
  36513. bindingType = BIND_CLASS;
  36514. }
  36515. if (this.match(types$1.name)) {
  36516. node.id = this.parseIdentifier();
  36517. if (isStatement) {
  36518. this.checkLVal(node.id, "class name", bindingType);
  36519. }
  36520. } else {
  36521. if (optionalId || !isStatement) {
  36522. node.id = null;
  36523. } else {
  36524. this.unexpected(null, ErrorMessages.MissingClassName);
  36525. }
  36526. }
  36527. };
  36528. _proto.parseClassSuper = function parseClassSuper(node) {
  36529. node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts() : null;
  36530. };
  36531. _proto.parseExport = function parseExport(node) {
  36532. var hasDefault = this.maybeParseExportDefaultSpecifier(node);
  36533. var parseAfterDefault = !hasDefault || this.eat(types$1.comma);
  36534. var hasStar = parseAfterDefault && this.eatExportStar(node);
  36535. var hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
  36536. var parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(types$1.comma));
  36537. var isFromRequired = hasDefault || hasStar;
  36538. if (hasStar && !hasNamespace) {
  36539. if (hasDefault) this.unexpected();
  36540. this.parseExportFrom(node, true);
  36541. return this.finishNode(node, "ExportAllDeclaration");
  36542. }
  36543. var hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
  36544. if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
  36545. throw this.unexpected(null, types$1.braceL);
  36546. }
  36547. var hasDeclaration;
  36548. if (isFromRequired || hasSpecifiers) {
  36549. hasDeclaration = false;
  36550. this.parseExportFrom(node, isFromRequired);
  36551. } else {
  36552. hasDeclaration = this.maybeParseExportDeclaration(node);
  36553. }
  36554. if (isFromRequired || hasSpecifiers || hasDeclaration) {
  36555. this.checkExport(node, true, false, !!node.source);
  36556. return this.finishNode(node, "ExportNamedDeclaration");
  36557. }
  36558. if (this.eat(types$1._default)) {
  36559. node.declaration = this.parseExportDefaultExpression();
  36560. this.checkExport(node, true, true);
  36561. return this.finishNode(node, "ExportDefaultDeclaration");
  36562. }
  36563. throw this.unexpected(null, types$1.braceL);
  36564. };
  36565. _proto.eatExportStar = function eatExportStar(node) {
  36566. return this.eat(types$1.star);
  36567. };
  36568. _proto.maybeParseExportDefaultSpecifier = function maybeParseExportDefaultSpecifier(node) {
  36569. if (this.isExportDefaultSpecifier()) {
  36570. this.expectPlugin("exportDefaultFrom");
  36571. var specifier = this.startNode();
  36572. specifier.exported = this.parseIdentifier(true);
  36573. node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
  36574. return true;
  36575. }
  36576. return false;
  36577. };
  36578. _proto.maybeParseExportNamespaceSpecifier = function maybeParseExportNamespaceSpecifier(node) {
  36579. if (this.isContextual("as")) {
  36580. if (!node.specifiers) node.specifiers = [];
  36581. var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
  36582. this.next();
  36583. specifier.exported = this.parseModuleExportName();
  36584. node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
  36585. return true;
  36586. }
  36587. return false;
  36588. };
  36589. _proto.maybeParseExportNamedSpecifiers = function maybeParseExportNamedSpecifiers(node) {
  36590. if (this.match(types$1.braceL)) {
  36591. var _node$specifiers;
  36592. if (!node.specifiers) node.specifiers = [];
  36593. (_node$specifiers = node.specifiers).push.apply(_node$specifiers, this.parseExportSpecifiers());
  36594. node.source = null;
  36595. node.declaration = null;
  36596. return true;
  36597. }
  36598. return false;
  36599. };
  36600. _proto.maybeParseExportDeclaration = function maybeParseExportDeclaration(node) {
  36601. if (this.shouldParseExportDeclaration()) {
  36602. node.specifiers = [];
  36603. node.source = null;
  36604. node.declaration = this.parseExportDeclaration(node);
  36605. return true;
  36606. }
  36607. return false;
  36608. };
  36609. _proto.isAsyncFunction = function isAsyncFunction() {
  36610. if (!this.isContextual("async")) return false;
  36611. var next = this.nextTokenStart();
  36612. return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
  36613. };
  36614. _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {
  36615. var expr = this.startNode();
  36616. var isAsync = this.isAsyncFunction();
  36617. if (this.match(types$1._function) || isAsync) {
  36618. this.next();
  36619. if (isAsync) {
  36620. this.next();
  36621. }
  36622. return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync);
  36623. } else if (this.match(types$1._class)) {
  36624. return this.parseClass(expr, true, true);
  36625. } else if (this.match(types$1.at)) {
  36626. if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  36627. this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport);
  36628. }
  36629. this.parseDecorators(false);
  36630. return this.parseClass(expr, true, true);
  36631. } else if (this.match(types$1._const) || this.match(types$1._var) || this.isLet()) {
  36632. throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport);
  36633. } else {
  36634. var res = this.parseMaybeAssignAllowIn();
  36635. this.semicolon();
  36636. return res;
  36637. }
  36638. };
  36639. _proto.parseExportDeclaration = function parseExportDeclaration(node) {
  36640. return this.parseStatement(null);
  36641. };
  36642. _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {
  36643. if (this.match(types$1.name)) {
  36644. var value = this.state.value;
  36645. if (value === "async" && !this.state.containsEsc || value === "let") {
  36646. return false;
  36647. }
  36648. if ((value === "type" || value === "interface") && !this.state.containsEsc) {
  36649. var l = this.lookahead();
  36650. if (l.type === types$1.name && l.value !== "from" || l.type === types$1.braceL) {
  36651. this.expectOnePlugin(["flow", "typescript"]);
  36652. return false;
  36653. }
  36654. }
  36655. } else if (!this.match(types$1._default)) {
  36656. return false;
  36657. }
  36658. var next = this.nextTokenStart();
  36659. var hasFrom = this.isUnparsedContextual(next, "from");
  36660. if (this.input.charCodeAt(next) === 44 || this.match(types$1.name) && hasFrom) {
  36661. return true;
  36662. }
  36663. if (this.match(types$1._default) && hasFrom) {
  36664. var nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
  36665. return nextAfterFrom === 34 || nextAfterFrom === 39;
  36666. }
  36667. return false;
  36668. };
  36669. _proto.parseExportFrom = function parseExportFrom(node, expect) {
  36670. if (this.eatContextual("from")) {
  36671. node.source = this.parseImportSource();
  36672. this.checkExport(node);
  36673. var assertions = this.maybeParseImportAssertions();
  36674. if (assertions) {
  36675. node.assertions = assertions;
  36676. }
  36677. } else {
  36678. if (expect) {
  36679. this.unexpected();
  36680. } else {
  36681. node.source = null;
  36682. }
  36683. }
  36684. this.semicolon();
  36685. };
  36686. _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {
  36687. if (this.match(types$1.at)) {
  36688. this.expectOnePlugin(["decorators", "decorators-legacy"]);
  36689. if (this.hasPlugin("decorators")) {
  36690. if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
  36691. this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport);
  36692. } else {
  36693. return true;
  36694. }
  36695. }
  36696. }
  36697. return this.state.type.keyword === "var" || this.state.type.keyword === "const" || this.state.type.keyword === "function" || this.state.type.keyword === "class" || this.isLet() || this.isAsyncFunction();
  36698. };
  36699. _proto.checkExport = function checkExport(node, checkNames, isDefault, isFrom) {
  36700. if (checkNames) {
  36701. if (isDefault) {
  36702. this.checkDuplicateExports(node, "default");
  36703. if (this.hasPlugin("exportDefaultFrom")) {
  36704. var _declaration$extra;
  36705. var declaration = node.declaration;
  36706. if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
  36707. this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier);
  36708. }
  36709. }
  36710. } else if (node.specifiers && node.specifiers.length) {
  36711. for (var _i6 = 0, _node$specifiers3 = node.specifiers; _i6 < _node$specifiers3.length; _i6++) {
  36712. var specifier = _node$specifiers3[_i6];
  36713. var exported = specifier.exported;
  36714. var exportedName = exported.type === "Identifier" ? exported.name : exported.value;
  36715. this.checkDuplicateExports(specifier, exportedName);
  36716. if (!isFrom && specifier.local) {
  36717. var local = specifier.local;
  36718. if (local.type !== "Identifier") {
  36719. this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName);
  36720. } else {
  36721. this.checkReservedWord(local.name, local.start, true, false);
  36722. this.scope.checkLocalExport(local);
  36723. }
  36724. }
  36725. }
  36726. } else if (node.declaration) {
  36727. if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
  36728. var id = node.declaration.id;
  36729. if (!id) throw new Error("Assertion failure");
  36730. this.checkDuplicateExports(node, id.name);
  36731. } else if (node.declaration.type === "VariableDeclaration") {
  36732. for (var _i8 = 0, _node$declaration$dec2 = node.declaration.declarations; _i8 < _node$declaration$dec2.length; _i8++) {
  36733. var _declaration = _node$declaration$dec2[_i8];
  36734. this.checkDeclaration(_declaration.id);
  36735. }
  36736. }
  36737. }
  36738. }
  36739. var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
  36740. if (currentContextDecorators.length) {
  36741. throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport);
  36742. }
  36743. };
  36744. _proto.checkDeclaration = function checkDeclaration(node) {
  36745. if (node.type === "Identifier") {
  36746. this.checkDuplicateExports(node, node.name);
  36747. } else if (node.type === "ObjectPattern") {
  36748. for (var _i10 = 0, _node$properties2 = node.properties; _i10 < _node$properties2.length; _i10++) {
  36749. var prop = _node$properties2[_i10];
  36750. this.checkDeclaration(prop);
  36751. }
  36752. } else if (node.type === "ArrayPattern") {
  36753. for (var _i12 = 0, _node$elements2 = node.elements; _i12 < _node$elements2.length; _i12++) {
  36754. var elem = _node$elements2[_i12];
  36755. if (elem) {
  36756. this.checkDeclaration(elem);
  36757. }
  36758. }
  36759. } else if (node.type === "ObjectProperty") {
  36760. this.checkDeclaration(node.value);
  36761. } else if (node.type === "RestElement") {
  36762. this.checkDeclaration(node.argument);
  36763. } else if (node.type === "AssignmentPattern") {
  36764. this.checkDeclaration(node.left);
  36765. }
  36766. };
  36767. _proto.checkDuplicateExports = function checkDuplicateExports(node, name) {
  36768. if (this.exportedIdentifiers.has(name)) {
  36769. this.raise(node.start, name === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name);
  36770. }
  36771. this.exportedIdentifiers.add(name);
  36772. };
  36773. _proto.parseExportSpecifiers = function parseExportSpecifiers() {
  36774. var nodes = [];
  36775. var first = true;
  36776. this.expect(types$1.braceL);
  36777. while (!this.eat(types$1.braceR)) {
  36778. if (first) {
  36779. first = false;
  36780. } else {
  36781. this.expect(types$1.comma);
  36782. if (this.eat(types$1.braceR)) break;
  36783. }
  36784. var node = this.startNode();
  36785. node.local = this.parseModuleExportName();
  36786. node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local.__clone();
  36787. nodes.push(this.finishNode(node, "ExportSpecifier"));
  36788. }
  36789. return nodes;
  36790. };
  36791. _proto.parseModuleExportName = function parseModuleExportName() {
  36792. if (this.match(types$1.string)) {
  36793. var result = this.parseStringLiteral(this.state.value);
  36794. var surrogate = result.value.match(loneSurrogate);
  36795. if (surrogate) {
  36796. this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16));
  36797. }
  36798. return result;
  36799. }
  36800. return this.parseIdentifier(true);
  36801. };
  36802. _proto.parseImport = function parseImport(node) {
  36803. node.specifiers = [];
  36804. if (!this.match(types$1.string)) {
  36805. var hasDefault = this.maybeParseDefaultImportSpecifier(node);
  36806. var parseNext = !hasDefault || this.eat(types$1.comma);
  36807. var hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
  36808. if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
  36809. this.expectContextual("from");
  36810. }
  36811. node.source = this.parseImportSource();
  36812. var assertions = this.maybeParseImportAssertions();
  36813. if (assertions) {
  36814. node.assertions = assertions;
  36815. } else {
  36816. var attributes = this.maybeParseModuleAttributes();
  36817. if (attributes) {
  36818. node.attributes = attributes;
  36819. }
  36820. }
  36821. this.semicolon();
  36822. return this.finishNode(node, "ImportDeclaration");
  36823. };
  36824. _proto.parseImportSource = function parseImportSource() {
  36825. if (!this.match(types$1.string)) this.unexpected();
  36826. return this.parseExprAtom();
  36827. };
  36828. _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {
  36829. return this.match(types$1.name);
  36830. };
  36831. _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {
  36832. specifier.local = this.parseIdentifier();
  36833. this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
  36834. node.specifiers.push(this.finishNode(specifier, type));
  36835. };
  36836. _proto.parseAssertEntries = function parseAssertEntries() {
  36837. var attrs = [];
  36838. var attrNames = new Set();
  36839. do {
  36840. if (this.match(types$1.braceR)) {
  36841. break;
  36842. }
  36843. var node = this.startNode();
  36844. var keyName = this.state.value;
  36845. if (attrNames.has(keyName)) {
  36846. this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName);
  36847. }
  36848. attrNames.add(keyName);
  36849. if (this.match(types$1.string)) {
  36850. node.key = this.parseStringLiteral(keyName);
  36851. } else {
  36852. node.key = this.parseIdentifier(true);
  36853. }
  36854. this.expect(types$1.colon);
  36855. if (!this.match(types$1.string)) {
  36856. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  36857. }
  36858. node.value = this.parseStringLiteral(this.state.value);
  36859. this.finishNode(node, "ImportAttribute");
  36860. attrs.push(node);
  36861. } while (this.eat(types$1.comma));
  36862. return attrs;
  36863. };
  36864. _proto.maybeParseModuleAttributes = function maybeParseModuleAttributes() {
  36865. if (this.match(types$1._with) && !this.hasPrecedingLineBreak()) {
  36866. this.expectPlugin("moduleAttributes");
  36867. this.next();
  36868. } else {
  36869. if (this.hasPlugin("moduleAttributes")) return [];
  36870. return null;
  36871. }
  36872. var attrs = [];
  36873. var attributes = new Set();
  36874. do {
  36875. var node = this.startNode();
  36876. node.key = this.parseIdentifier(true);
  36877. if (node.key.name !== "type") {
  36878. this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name);
  36879. }
  36880. if (attributes.has(node.key.name)) {
  36881. this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name);
  36882. }
  36883. attributes.add(node.key.name);
  36884. this.expect(types$1.colon);
  36885. if (!this.match(types$1.string)) {
  36886. throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue);
  36887. }
  36888. node.value = this.parseStringLiteral(this.state.value);
  36889. this.finishNode(node, "ImportAttribute");
  36890. attrs.push(node);
  36891. } while (this.eat(types$1.comma));
  36892. return attrs;
  36893. };
  36894. _proto.maybeParseImportAssertions = function maybeParseImportAssertions() {
  36895. if (this.isContextual("assert") && !this.hasPrecedingLineBreak()) {
  36896. this.expectPlugin("importAssertions");
  36897. this.next();
  36898. } else {
  36899. if (this.hasPlugin("importAssertions")) return [];
  36900. return null;
  36901. }
  36902. this.eat(types$1.braceL);
  36903. var attrs = this.parseAssertEntries();
  36904. this.eat(types$1.braceR);
  36905. return attrs;
  36906. };
  36907. _proto.maybeParseDefaultImportSpecifier = function maybeParseDefaultImportSpecifier(node) {
  36908. if (this.shouldParseDefaultImport(node)) {
  36909. this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
  36910. return true;
  36911. }
  36912. return false;
  36913. };
  36914. _proto.maybeParseStarImportSpecifier = function maybeParseStarImportSpecifier(node) {
  36915. if (this.match(types$1.star)) {
  36916. var specifier = this.startNode();
  36917. this.next();
  36918. this.expectContextual("as");
  36919. this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
  36920. return true;
  36921. }
  36922. return false;
  36923. };
  36924. _proto.parseNamedImportSpecifiers = function parseNamedImportSpecifiers(node) {
  36925. var first = true;
  36926. this.expect(types$1.braceL);
  36927. while (!this.eat(types$1.braceR)) {
  36928. if (first) {
  36929. first = false;
  36930. } else {
  36931. if (this.eat(types$1.colon)) {
  36932. throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport);
  36933. }
  36934. this.expect(types$1.comma);
  36935. if (this.eat(types$1.braceR)) break;
  36936. }
  36937. this.parseImportSpecifier(node);
  36938. }
  36939. };
  36940. _proto.parseImportSpecifier = function parseImportSpecifier(node) {
  36941. var specifier = this.startNode();
  36942. var importedIsString = this.match(types$1.string);
  36943. specifier.imported = this.parseModuleExportName();
  36944. if (this.eatContextual("as")) {
  36945. specifier.local = this.parseIdentifier();
  36946. } else {
  36947. var imported = specifier.imported;
  36948. if (importedIsString) {
  36949. throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value);
  36950. }
  36951. this.checkReservedWord(imported.name, specifier.start, true, true);
  36952. specifier.local = imported.__clone();
  36953. }
  36954. this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
  36955. node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
  36956. };
  36957. _proto.isThisParam = function isThisParam(param) {
  36958. return param.type === "Identifier" && param.name === "this";
  36959. };
  36960. return StatementParser;
  36961. }(ExpressionParser);
  36962. var Parser = function (_StatementParser) {
  36963. _inherits(Parser, _StatementParser);
  36964. function Parser(options, input) {
  36965. var _this;
  36966. options = getOptions(options);
  36967. _this = _StatementParser.call(this, options, input) || this;
  36968. _this.options = options;
  36969. _this.initializeScopes();
  36970. _this.plugins = pluginsMap(_this.options.plugins);
  36971. _this.filename = options.sourceFilename;
  36972. return _this;
  36973. }
  36974. var _proto = Parser.prototype;
  36975. _proto.getScopeHandler = function getScopeHandler() {
  36976. return ScopeHandler;
  36977. };
  36978. _proto.parse = function parse() {
  36979. this.enterInitialScopes();
  36980. var file = this.startNode();
  36981. var program = this.startNode();
  36982. this.nextToken();
  36983. file.errors = null;
  36984. this.parseTopLevel(file, program);
  36985. file.errors = this.state.errors;
  36986. return file;
  36987. };
  36988. return Parser;
  36989. }(StatementParser);
  36990. function pluginsMap(plugins) {
  36991. var pluginMap = new Map();
  36992. for (var _i2 = 0; _i2 < plugins.length; _i2++) {
  36993. var plugin = plugins[_i2];
  36994. var _ref = Array.isArray(plugin) ? plugin : [plugin, {}],
  36995. name = _ref[0],
  36996. options = _ref[1];
  36997. if (!pluginMap.has(name)) pluginMap.set(name, options || {});
  36998. }
  36999. return pluginMap;
  37000. }
  37001. function parse$8(input, options) {
  37002. var _options;
  37003. if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
  37004. options = Object.assign({}, options);
  37005. try {
  37006. options.sourceType = "module";
  37007. var parser = getParser(options, input);
  37008. var ast = parser.parse();
  37009. if (parser.sawUnambiguousESM) {
  37010. return ast;
  37011. }
  37012. if (parser.ambiguousScriptDifferentAst) {
  37013. try {
  37014. options.sourceType = "script";
  37015. return getParser(options, input).parse();
  37016. } catch (_unused) {}
  37017. } else {
  37018. ast.program.sourceType = "script";
  37019. }
  37020. return ast;
  37021. } catch (moduleError) {
  37022. try {
  37023. options.sourceType = "script";
  37024. return getParser(options, input).parse();
  37025. } catch (_unused2) {}
  37026. throw moduleError;
  37027. }
  37028. } else {
  37029. return getParser(options, input).parse();
  37030. }
  37031. }
  37032. function getParser(options, input) {
  37033. var cls = Parser;
  37034. if (options != null && options.plugins) {
  37035. validatePlugins(options.plugins);
  37036. cls = getParserClass(options.plugins);
  37037. }
  37038. return new cls(options, input);
  37039. }
  37040. var parserClassCache = {};
  37041. function getParserClass(pluginsFromOptions) {
  37042. var pluginList = mixinPluginNames.filter(function (name) {
  37043. return hasPlugin(pluginsFromOptions, name);
  37044. });
  37045. var key = pluginList.join("/");
  37046. var cls = parserClassCache[key];
  37047. if (!cls) {
  37048. cls = Parser;
  37049. for (var _i2 = 0; _i2 < pluginList.length; _i2++) {
  37050. var plugin = pluginList[_i2];
  37051. cls = mixinPlugins[plugin](cls);
  37052. }
  37053. parserClassCache[key] = cls;
  37054. }
  37055. return cls;
  37056. }
  37057. var visitor$3 = {
  37058. Scope: function Scope(path, state) {
  37059. if (state.kind === "let") path.skip();
  37060. },
  37061. FunctionParent: function FunctionParent(path) {
  37062. path.skip();
  37063. },
  37064. VariableDeclaration: function (_VariableDeclaration) {
  37065. function VariableDeclaration(_x, _x2) {
  37066. return _VariableDeclaration.apply(this, arguments);
  37067. }
  37068. VariableDeclaration.toString = function () {
  37069. return _VariableDeclaration.toString();
  37070. };
  37071. return VariableDeclaration;
  37072. }(function (path, state) {
  37073. if (state.kind && path.node.kind !== state.kind) return;
  37074. var nodes = [];
  37075. var declarations = path.get("declarations");
  37076. var firstId;
  37077. for (var _iterator = _createForOfIteratorHelperLoose(declarations), _step; !(_step = _iterator()).done;) {
  37078. var declar = _step.value;
  37079. firstId = declar.node.id;
  37080. if (declar.node.init) {
  37081. nodes.push(expressionStatement(assignmentExpression("=", declar.node.id, declar.node.init)));
  37082. }
  37083. for (var _i = 0, _Object$keys = Object.keys(declar.getBindingIdentifiers()); _i < _Object$keys.length; _i++) {
  37084. var name = _Object$keys[_i];
  37085. state.emit(identifier(name), name, declar.node.init !== null);
  37086. }
  37087. }
  37088. if (path.parentPath.isFor({
  37089. left: path.node
  37090. })) {
  37091. path.replaceWith(firstId);
  37092. } else {
  37093. path.replaceWithMultiple(nodes);
  37094. }
  37095. })
  37096. };
  37097. function hoistVariables(path, emit, kind) {
  37098. if (kind === void 0) {
  37099. kind = "var";
  37100. }
  37101. path.traverse(visitor$3, {
  37102. kind: kind,
  37103. emit: emit
  37104. });
  37105. }
  37106. function replaceWithMultiple(nodes) {
  37107. var _pathCache$get;
  37108. this.resync();
  37109. nodes = this._verifyNodeList(nodes);
  37110. inheritLeadingComments(nodes[0], this.node);
  37111. inheritTrailingComments(nodes[nodes.length - 1], this.node);
  37112. (_pathCache$get = path$3.get(this.parent)) == null ? void 0 : _pathCache$get["delete"](this.node);
  37113. this.node = this.container[this.key] = null;
  37114. var paths = this.insertAfter(nodes);
  37115. if (this.node) {
  37116. this.requeue();
  37117. } else {
  37118. this.remove();
  37119. }
  37120. return paths;
  37121. }
  37122. function replaceWithSourceString(replacement) {
  37123. this.resync();
  37124. try {
  37125. replacement = "(" + replacement + ")";
  37126. replacement = parse$8(replacement);
  37127. } catch (err) {
  37128. var loc = err.loc;
  37129. if (loc) {
  37130. err.message += " - make sure this is an expression.\n" + codeFrameColumns(replacement, {
  37131. start: {
  37132. line: loc.line,
  37133. column: loc.column + 1
  37134. }
  37135. });
  37136. err.code = "BABEL_REPLACE_SOURCE_ERROR";
  37137. }
  37138. throw err;
  37139. }
  37140. replacement = replacement.program.body[0].expression;
  37141. traverse.removeProperties(replacement);
  37142. return this.replaceWith(replacement);
  37143. }
  37144. function replaceWith(replacement) {
  37145. this.resync();
  37146. if (this.removed) {
  37147. throw new Error("You can't replace this node, we've already removed it");
  37148. }
  37149. if (replacement instanceof NodePath) {
  37150. replacement = replacement.node;
  37151. }
  37152. if (!replacement) {
  37153. throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
  37154. }
  37155. if (this.node === replacement) {
  37156. return [this];
  37157. }
  37158. if (this.isProgram() && !isProgram(replacement)) {
  37159. throw new Error("You can only replace a Program root node with another Program node");
  37160. }
  37161. if (Array.isArray(replacement)) {
  37162. throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
  37163. }
  37164. if (typeof replacement === "string") {
  37165. throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
  37166. }
  37167. var nodePath = "";
  37168. if (this.isNodeType("Statement") && isExpression(replacement)) {
  37169. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
  37170. replacement = expressionStatement(replacement);
  37171. nodePath = "expression";
  37172. }
  37173. }
  37174. if (this.isNodeType("Expression") && isStatement(replacement)) {
  37175. if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
  37176. return this.replaceExpressionWithStatements([replacement]);
  37177. }
  37178. }
  37179. var oldNode = this.node;
  37180. if (oldNode) {
  37181. inheritsComments(replacement, oldNode);
  37182. removeComments(oldNode);
  37183. }
  37184. this._replaceWith(replacement);
  37185. this.type = replacement.type;
  37186. this.setScope();
  37187. this.requeue();
  37188. return [nodePath ? this.get(nodePath) : this];
  37189. }
  37190. function _replaceWith(node) {
  37191. var _pathCache$get2;
  37192. if (!this.container) {
  37193. throw new ReferenceError("Container is falsy");
  37194. }
  37195. if (this.inList) {
  37196. validate$3(this.parent, this.key, [node]);
  37197. } else {
  37198. validate$3(this.parent, this.key, node);
  37199. }
  37200. this.debug("Replace with " + (node == null ? void 0 : node.type));
  37201. (_pathCache$get2 = path$3.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this)["delete"](this.node);
  37202. this.node = this.container[this.key] = node;
  37203. }
  37204. function replaceExpressionWithStatements(nodes) {
  37205. var _this = this;
  37206. this.resync();
  37207. var toSequenceExpression$1 = toSequenceExpression(nodes, this.scope);
  37208. if (toSequenceExpression$1) {
  37209. return this.replaceWith(toSequenceExpression$1)[0].get("expressions");
  37210. }
  37211. var functionParent = this.getFunctionParent();
  37212. var isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
  37213. var isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
  37214. var container = arrowFunctionExpression([], blockStatement(nodes));
  37215. this.replaceWith(callExpression(container, []));
  37216. var callee = this.get("callee");
  37217. hoistVariables(callee.get("body"), function (id) {
  37218. _this.scope.push({
  37219. id: id
  37220. });
  37221. }, "var");
  37222. var completionRecords = this.get("callee").getCompletionRecords();
  37223. for (var _iterator = _createForOfIteratorHelperLoose(completionRecords), _step; !(_step = _iterator()).done;) {
  37224. var path = _step.value;
  37225. if (!path.isExpressionStatement()) continue;
  37226. var loop = path.findParent(function (path) {
  37227. return path.isLoop();
  37228. });
  37229. if (loop) {
  37230. var uid = loop.getData("expressionReplacementReturnUid");
  37231. if (!uid) {
  37232. uid = callee.scope.generateDeclaredUidIdentifier("ret");
  37233. callee.get("body").pushContainer("body", returnStatement(cloneNode(uid)));
  37234. loop.setData("expressionReplacementReturnUid", uid);
  37235. } else {
  37236. uid = identifier(uid.name);
  37237. }
  37238. path.get("expression").replaceWith(assignmentExpression("=", cloneNode(uid), path.node.expression));
  37239. } else {
  37240. path.replaceWith(returnStatement(path.node.expression));
  37241. }
  37242. }
  37243. callee.arrowFunctionToExpression();
  37244. var newCallee = callee;
  37245. var needToAwaitFunction = isParentAsync && traverse.hasType(this.get("callee.body").node, "AwaitExpression", FUNCTION_TYPES);
  37246. var needToYieldFunction = isParentGenerator && traverse.hasType(this.get("callee.body").node, "YieldExpression", FUNCTION_TYPES);
  37247. if (needToAwaitFunction) {
  37248. newCallee.set("async", true);
  37249. if (!needToYieldFunction) {
  37250. this.replaceWith(awaitExpression(this.node));
  37251. }
  37252. }
  37253. if (needToYieldFunction) {
  37254. newCallee.set("generator", true);
  37255. this.replaceWith(yieldExpression(this.node, true));
  37256. }
  37257. return newCallee.get("body.body");
  37258. }
  37259. function replaceInline(nodes) {
  37260. this.resync();
  37261. if (Array.isArray(nodes)) {
  37262. if (Array.isArray(this.container)) {
  37263. nodes = this._verifyNodeList(nodes);
  37264. var paths = this._containerInsertAfter(nodes);
  37265. this.remove();
  37266. return paths;
  37267. } else {
  37268. return this.replaceWithMultiple(nodes);
  37269. }
  37270. } else {
  37271. return this.replaceWith(nodes);
  37272. }
  37273. }
  37274. var NodePath_replacement = /*#__PURE__*/Object.freeze({
  37275. __proto__: null,
  37276. replaceWithMultiple: replaceWithMultiple,
  37277. replaceWithSourceString: replaceWithSourceString,
  37278. replaceWith: replaceWith,
  37279. _replaceWith: _replaceWith,
  37280. replaceExpressionWithStatements: replaceExpressionWithStatements,
  37281. replaceInline: replaceInline
  37282. });
  37283. var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
  37284. var VALID_CALLEES = ["String", "Number", "Math"];
  37285. var INVALID_METHODS = ["random"];
  37286. function evaluateTruthy() {
  37287. var res = this.evaluate();
  37288. if (res.confident) return !!res.value;
  37289. }
  37290. function deopt(path, state) {
  37291. if (!state.confident) return;
  37292. state.deoptPath = path;
  37293. state.confident = false;
  37294. }
  37295. function evaluateCached(path, state) {
  37296. var node = path.node;
  37297. var seen = state.seen;
  37298. if (seen.has(node)) {
  37299. var existing = seen.get(node);
  37300. if (existing.resolved) {
  37301. return existing.value;
  37302. } else {
  37303. deopt(path, state);
  37304. return;
  37305. }
  37306. } else {
  37307. var item = {
  37308. resolved: false
  37309. };
  37310. seen.set(node, item);
  37311. var val = _evaluate(path, state);
  37312. if (state.confident) {
  37313. item.resolved = true;
  37314. item.value = val;
  37315. }
  37316. return val;
  37317. }
  37318. }
  37319. function _evaluate(path, state) {
  37320. if (!state.confident) return;
  37321. if (path.isSequenceExpression()) {
  37322. var exprs = path.get("expressions");
  37323. return evaluateCached(exprs[exprs.length - 1], state);
  37324. }
  37325. if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
  37326. return path.node.value;
  37327. }
  37328. if (path.isNullLiteral()) {
  37329. return null;
  37330. }
  37331. if (path.isTemplateLiteral()) {
  37332. return evaluateQuasis(path, path.node.quasis, state);
  37333. }
  37334. if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
  37335. var object = path.get("tag.object");
  37336. var name = object.node.name;
  37337. var property = path.get("tag.property");
  37338. if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name) && property.isIdentifier() && property.node.name === "raw") {
  37339. return evaluateQuasis(path, path.node.quasi.quasis, state, true);
  37340. }
  37341. }
  37342. if (path.isConditionalExpression()) {
  37343. var testResult = evaluateCached(path.get("test"), state);
  37344. if (!state.confident) return;
  37345. if (testResult) {
  37346. return evaluateCached(path.get("consequent"), state);
  37347. } else {
  37348. return evaluateCached(path.get("alternate"), state);
  37349. }
  37350. }
  37351. if (path.isExpressionWrapper()) {
  37352. return evaluateCached(path.get("expression"), state);
  37353. }
  37354. if (path.isMemberExpression() && !path.parentPath.isCallExpression({
  37355. callee: path.node
  37356. })) {
  37357. var _property = path.get("property");
  37358. var _object = path.get("object");
  37359. if (_object.isLiteral() && _property.isIdentifier()) {
  37360. var value = _object.node.value;
  37361. var type = typeof value;
  37362. if (type === "number" || type === "string") {
  37363. return value[_property.node.name];
  37364. }
  37365. }
  37366. }
  37367. if (path.isReferencedIdentifier()) {
  37368. var binding = path.scope.getBinding(path.node.name);
  37369. if (binding && binding.constantViolations.length > 0) {
  37370. return deopt(binding.path, state);
  37371. }
  37372. if (binding && path.node.start < binding.path.node.end) {
  37373. return deopt(binding.path, state);
  37374. }
  37375. if (binding != null && binding.hasValue) {
  37376. return binding.value;
  37377. } else {
  37378. if (path.node.name === "undefined") {
  37379. return binding ? deopt(binding.path, state) : undefined;
  37380. } else if (path.node.name === "Infinity") {
  37381. return binding ? deopt(binding.path, state) : Infinity;
  37382. } else if (path.node.name === "NaN") {
  37383. return binding ? deopt(binding.path, state) : NaN;
  37384. }
  37385. var resolved = path.resolve();
  37386. if (resolved === path) {
  37387. return deopt(path, state);
  37388. } else {
  37389. return evaluateCached(resolved, state);
  37390. }
  37391. }
  37392. }
  37393. if (path.isUnaryExpression({
  37394. prefix: true
  37395. })) {
  37396. if (path.node.operator === "void") {
  37397. return undefined;
  37398. }
  37399. var argument = path.get("argument");
  37400. if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
  37401. return "function";
  37402. }
  37403. var arg = evaluateCached(argument, state);
  37404. if (!state.confident) return;
  37405. switch (path.node.operator) {
  37406. case "!":
  37407. return !arg;
  37408. case "+":
  37409. return +arg;
  37410. case "-":
  37411. return -arg;
  37412. case "~":
  37413. return ~arg;
  37414. case "typeof":
  37415. return typeof arg;
  37416. }
  37417. }
  37418. if (path.isArrayExpression()) {
  37419. var arr = [];
  37420. var elems = path.get("elements");
  37421. for (var _iterator = _createForOfIteratorHelperLoose(elems), _step; !(_step = _iterator()).done;) {
  37422. var elem = _step.value;
  37423. var elemValue = elem.evaluate();
  37424. if (elemValue.confident) {
  37425. arr.push(elemValue.value);
  37426. } else {
  37427. return deopt(elemValue.deopt, state);
  37428. }
  37429. }
  37430. return arr;
  37431. }
  37432. if (path.isObjectExpression()) {
  37433. var obj = {};
  37434. var props = path.get("properties");
  37435. for (var _iterator2 = _createForOfIteratorHelperLoose(props), _step2; !(_step2 = _iterator2()).done;) {
  37436. var prop = _step2.value;
  37437. if (prop.isObjectMethod() || prop.isSpreadElement()) {
  37438. return deopt(prop, state);
  37439. }
  37440. var keyPath = prop.get("key");
  37441. var key = keyPath;
  37442. if (prop.node.computed) {
  37443. key = key.evaluate();
  37444. if (!key.confident) {
  37445. return deopt(key.deopt, state);
  37446. }
  37447. key = key.value;
  37448. } else if (key.isIdentifier()) {
  37449. key = key.node.name;
  37450. } else {
  37451. key = key.node.value;
  37452. }
  37453. var valuePath = prop.get("value");
  37454. var _value = valuePath.evaluate();
  37455. if (!_value.confident) {
  37456. return deopt(_value.deopt, state);
  37457. }
  37458. _value = _value.value;
  37459. obj[key] = _value;
  37460. }
  37461. return obj;
  37462. }
  37463. if (path.isLogicalExpression()) {
  37464. var wasConfident = state.confident;
  37465. var left = evaluateCached(path.get("left"), state);
  37466. var leftConfident = state.confident;
  37467. state.confident = wasConfident;
  37468. var right = evaluateCached(path.get("right"), state);
  37469. var rightConfident = state.confident;
  37470. switch (path.node.operator) {
  37471. case "||":
  37472. state.confident = leftConfident && (!!left || rightConfident);
  37473. if (!state.confident) return;
  37474. return left || right;
  37475. case "&&":
  37476. state.confident = leftConfident && (!left || rightConfident);
  37477. if (!state.confident) return;
  37478. return left && right;
  37479. }
  37480. }
  37481. if (path.isBinaryExpression()) {
  37482. var _left = evaluateCached(path.get("left"), state);
  37483. if (!state.confident) return;
  37484. var _right = evaluateCached(path.get("right"), state);
  37485. if (!state.confident) return;
  37486. switch (path.node.operator) {
  37487. case "-":
  37488. return _left - _right;
  37489. case "+":
  37490. return _left + _right;
  37491. case "/":
  37492. return _left / _right;
  37493. case "*":
  37494. return _left * _right;
  37495. case "%":
  37496. return _left % _right;
  37497. case "**":
  37498. return Math.pow(_left, _right);
  37499. case "<":
  37500. return _left < _right;
  37501. case ">":
  37502. return _left > _right;
  37503. case "<=":
  37504. return _left <= _right;
  37505. case ">=":
  37506. return _left >= _right;
  37507. case "==":
  37508. return _left == _right;
  37509. case "!=":
  37510. return _left != _right;
  37511. case "===":
  37512. return _left === _right;
  37513. case "!==":
  37514. return _left !== _right;
  37515. case "|":
  37516. return _left | _right;
  37517. case "&":
  37518. return _left & _right;
  37519. case "^":
  37520. return _left ^ _right;
  37521. case "<<":
  37522. return _left << _right;
  37523. case ">>":
  37524. return _left >> _right;
  37525. case ">>>":
  37526. return _left >>> _right;
  37527. }
  37528. }
  37529. if (path.isCallExpression()) {
  37530. var callee = path.get("callee");
  37531. var context;
  37532. var func;
  37533. if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
  37534. func = global$1[callee.node.name];
  37535. }
  37536. if (callee.isMemberExpression()) {
  37537. var _object2 = callee.get("object");
  37538. var _property2 = callee.get("property");
  37539. if (_object2.isIdentifier() && _property2.isIdentifier() && VALID_CALLEES.indexOf(_object2.node.name) >= 0 && INVALID_METHODS.indexOf(_property2.node.name) < 0) {
  37540. context = global$1[_object2.node.name];
  37541. func = context[_property2.node.name];
  37542. }
  37543. if (_object2.isLiteral() && _property2.isIdentifier()) {
  37544. var _type = typeof _object2.node.value;
  37545. if (_type === "string" || _type === "number") {
  37546. context = _object2.node.value;
  37547. func = context[_property2.node.name];
  37548. }
  37549. }
  37550. }
  37551. if (func) {
  37552. var args = path.get("arguments").map(function (arg) {
  37553. return evaluateCached(arg, state);
  37554. });
  37555. if (!state.confident) return;
  37556. return func.apply(context, args);
  37557. }
  37558. }
  37559. deopt(path, state);
  37560. }
  37561. function evaluateQuasis(path, quasis, state, raw) {
  37562. if (raw === void 0) {
  37563. raw = false;
  37564. }
  37565. var str = "";
  37566. var i = 0;
  37567. var exprs = path.get("expressions");
  37568. for (var _iterator3 = _createForOfIteratorHelperLoose(quasis), _step3; !(_step3 = _iterator3()).done;) {
  37569. var elem = _step3.value;
  37570. if (!state.confident) break;
  37571. str += raw ? elem.value.raw : elem.value.cooked;
  37572. var expr = exprs[i++];
  37573. if (expr) str += String(evaluateCached(expr, state));
  37574. }
  37575. if (!state.confident) return;
  37576. return str;
  37577. }
  37578. function evaluate$1() {
  37579. var state = {
  37580. confident: true,
  37581. deoptPath: null,
  37582. seen: new Map()
  37583. };
  37584. var value = evaluateCached(this, state);
  37585. if (!state.confident) value = undefined;
  37586. return {
  37587. confident: state.confident,
  37588. deopt: state.deoptPath,
  37589. value: value
  37590. };
  37591. }
  37592. var NodePath_evaluation = /*#__PURE__*/Object.freeze({
  37593. __proto__: null,
  37594. evaluateTruthy: evaluateTruthy,
  37595. evaluate: evaluate$1
  37596. });
  37597. function getFunctionArity (node) {
  37598. var params = node.params;
  37599. for (var i = 0; i < params.length; i++) {
  37600. var param = params[i];
  37601. if (isAssignmentPattern(param) || isRestElement(param)) {
  37602. return i;
  37603. }
  37604. }
  37605. return params.length;
  37606. }
  37607. function makeStatementFormatter(fn) {
  37608. return {
  37609. code: function code(str) {
  37610. return "/* @babel/template */;\n" + str;
  37611. },
  37612. validate: function validate() {},
  37613. unwrap: function unwrap(ast) {
  37614. return fn(ast.program.body.slice(1));
  37615. }
  37616. };
  37617. }
  37618. var smart$1 = makeStatementFormatter(function (body) {
  37619. if (body.length > 1) {
  37620. return body;
  37621. } else {
  37622. return body[0];
  37623. }
  37624. });
  37625. var statements$1 = makeStatementFormatter(function (body) {
  37626. return body;
  37627. });
  37628. var statement$1 = makeStatementFormatter(function (body) {
  37629. if (body.length === 0) {
  37630. throw new Error("Found nothing to return.");
  37631. }
  37632. if (body.length > 1) {
  37633. throw new Error("Found multiple statements but wanted one");
  37634. }
  37635. return body[0];
  37636. });
  37637. var expression$1 = {
  37638. code: function code(str) {
  37639. return "(\n" + str + "\n)";
  37640. },
  37641. validate: function validate(ast) {
  37642. if (ast.program.body.length > 1) {
  37643. throw new Error("Found multiple statements but wanted one");
  37644. }
  37645. if (expression$1.unwrap(ast).start === 0) {
  37646. throw new Error("Parse result included parens.");
  37647. }
  37648. },
  37649. unwrap: function unwrap(_ref) {
  37650. var program = _ref.program;
  37651. var _program$body = _slicedToArray$2(program.body, 1),
  37652. stmt = _program$body[0];
  37653. assertExpressionStatement(stmt);
  37654. return stmt.expression;
  37655. }
  37656. };
  37657. var program$1 = {
  37658. code: function code(str) {
  37659. return str;
  37660. },
  37661. validate: function validate() {},
  37662. unwrap: function unwrap(ast) {
  37663. return ast.program;
  37664. }
  37665. };
  37666. var _excluded$3 = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
  37667. function merge$1(a, b) {
  37668. var _b$placeholderWhiteli = b.placeholderWhitelist,
  37669. placeholderWhitelist = _b$placeholderWhiteli === void 0 ? a.placeholderWhitelist : _b$placeholderWhiteli,
  37670. _b$placeholderPattern = b.placeholderPattern,
  37671. placeholderPattern = _b$placeholderPattern === void 0 ? a.placeholderPattern : _b$placeholderPattern,
  37672. _b$preserveComments = b.preserveComments,
  37673. preserveComments = _b$preserveComments === void 0 ? a.preserveComments : _b$preserveComments,
  37674. _b$syntacticPlacehold = b.syntacticPlaceholders,
  37675. syntacticPlaceholders = _b$syntacticPlacehold === void 0 ? a.syntacticPlaceholders : _b$syntacticPlacehold;
  37676. return {
  37677. parser: Object.assign({}, a.parser, b.parser),
  37678. placeholderWhitelist: placeholderWhitelist,
  37679. placeholderPattern: placeholderPattern,
  37680. preserveComments: preserveComments,
  37681. syntacticPlaceholders: syntacticPlaceholders
  37682. };
  37683. }
  37684. function validate$1(opts) {
  37685. if (opts != null && typeof opts !== "object") {
  37686. throw new Error("Unknown template options.");
  37687. }
  37688. var _ref = opts || {},
  37689. placeholderWhitelist = _ref.placeholderWhitelist,
  37690. placeholderPattern = _ref.placeholderPattern,
  37691. preserveComments = _ref.preserveComments,
  37692. syntacticPlaceholders = _ref.syntacticPlaceholders,
  37693. parser = _objectWithoutPropertiesLoose(_ref, _excluded$3);
  37694. if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
  37695. throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
  37696. }
  37697. if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
  37698. throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
  37699. }
  37700. if (preserveComments != null && typeof preserveComments !== "boolean") {
  37701. throw new Error("'.preserveComments' must be a boolean, null, or undefined");
  37702. }
  37703. if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
  37704. throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
  37705. }
  37706. if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
  37707. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
  37708. }
  37709. return {
  37710. parser: parser,
  37711. placeholderWhitelist: placeholderWhitelist || undefined,
  37712. placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
  37713. preserveComments: preserveComments == null ? undefined : preserveComments,
  37714. syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
  37715. };
  37716. }
  37717. function normalizeReplacements(replacements) {
  37718. if (Array.isArray(replacements)) {
  37719. return replacements.reduce(function (acc, replacement, i) {
  37720. acc["$" + i] = replacement;
  37721. return acc;
  37722. }, {});
  37723. } else if (typeof replacements === "object" || replacements == null) {
  37724. return replacements || undefined;
  37725. }
  37726. throw new Error("Template replacements must be an array, object, null, or undefined");
  37727. }
  37728. var PATTERN = /^[_$A-Z0-9]+$/;
  37729. function parseAndBuildMetadata(formatter, code, opts) {
  37730. var placeholderWhitelist = opts.placeholderWhitelist,
  37731. placeholderPattern = opts.placeholderPattern,
  37732. preserveComments = opts.preserveComments,
  37733. syntacticPlaceholders = opts.syntacticPlaceholders;
  37734. var ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);
  37735. removePropertiesDeep(ast, {
  37736. preserveComments: preserveComments
  37737. });
  37738. formatter.validate(ast);
  37739. var syntactic = {
  37740. placeholders: [],
  37741. placeholderNames: new Set()
  37742. };
  37743. var legacy = {
  37744. placeholders: [],
  37745. placeholderNames: new Set()
  37746. };
  37747. var isLegacyRef = {
  37748. value: undefined
  37749. };
  37750. traverse$1(ast, placeholderVisitorHandler, {
  37751. syntactic: syntactic,
  37752. legacy: legacy,
  37753. isLegacyRef: isLegacyRef,
  37754. placeholderWhitelist: placeholderWhitelist,
  37755. placeholderPattern: placeholderPattern,
  37756. syntacticPlaceholders: syntacticPlaceholders
  37757. });
  37758. return Object.assign({
  37759. ast: ast
  37760. }, isLegacyRef.value ? legacy : syntactic);
  37761. }
  37762. function placeholderVisitorHandler(node, ancestors, state) {
  37763. var _state$placeholderWhi;
  37764. var name;
  37765. if (isPlaceholder(node)) {
  37766. if (state.syntacticPlaceholders === false) {
  37767. throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
  37768. } else {
  37769. name = node.name.name;
  37770. state.isLegacyRef.value = false;
  37771. }
  37772. } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
  37773. return;
  37774. } else if (isIdentifier(node) || isJSXIdentifier(node)) {
  37775. name = node.name;
  37776. state.isLegacyRef.value = true;
  37777. } else if (isStringLiteral(node)) {
  37778. name = node.value;
  37779. state.isLegacyRef.value = true;
  37780. } else {
  37781. return;
  37782. }
  37783. if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
  37784. throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
  37785. }
  37786. if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name))) {
  37787. return;
  37788. }
  37789. ancestors = ancestors.slice();
  37790. var _ancestors = ancestors[ancestors.length - 1],
  37791. parent = _ancestors.node,
  37792. key = _ancestors.key;
  37793. var type;
  37794. if (isStringLiteral(node) || isPlaceholder(node, {
  37795. expectedNode: "StringLiteral"
  37796. })) {
  37797. type = "string";
  37798. } else if (isNewExpression(parent) && key === "arguments" || isCallExpression(parent) && key === "arguments" || isFunction$1(parent) && key === "params") {
  37799. type = "param";
  37800. } else if (isExpressionStatement(parent) && !isPlaceholder(node)) {
  37801. type = "statement";
  37802. ancestors = ancestors.slice(0, -1);
  37803. } else if (isStatement(node) && isPlaceholder(node)) {
  37804. type = "statement";
  37805. } else {
  37806. type = "other";
  37807. }
  37808. var _ref = state.isLegacyRef.value ? state.legacy : state.syntactic,
  37809. placeholders = _ref.placeholders,
  37810. placeholderNames = _ref.placeholderNames;
  37811. placeholders.push({
  37812. name: name,
  37813. type: type,
  37814. resolve: function resolve(ast) {
  37815. return resolveAncestors(ast, ancestors);
  37816. },
  37817. isDuplicate: placeholderNames.has(name)
  37818. });
  37819. placeholderNames.add(name);
  37820. }
  37821. function resolveAncestors(ast, ancestors) {
  37822. var parent = ast;
  37823. for (var i = 0; i < ancestors.length - 1; i++) {
  37824. var _ancestors$i = ancestors[i],
  37825. _key = _ancestors$i.key,
  37826. _index = _ancestors$i.index;
  37827. if (_index === undefined) {
  37828. parent = parent[_key];
  37829. } else {
  37830. parent = parent[_key][_index];
  37831. }
  37832. }
  37833. var _ancestors2 = ancestors[ancestors.length - 1],
  37834. key = _ancestors2.key,
  37835. index = _ancestors2.index;
  37836. return {
  37837. parent: parent,
  37838. key: key,
  37839. index: index
  37840. };
  37841. }
  37842. function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
  37843. var plugins = (parserOpts.plugins || []).slice();
  37844. if (syntacticPlaceholders !== false) {
  37845. plugins.push("placeholders");
  37846. }
  37847. parserOpts = Object.assign({
  37848. allowReturnOutsideFunction: true,
  37849. allowSuperOutsideMethod: true,
  37850. sourceType: "module"
  37851. }, parserOpts, {
  37852. plugins: plugins
  37853. });
  37854. try {
  37855. return parse$8(code, parserOpts);
  37856. } catch (err) {
  37857. var loc = err.loc;
  37858. if (loc) {
  37859. err.message += "\n" + codeFrameColumns(code, {
  37860. start: loc
  37861. });
  37862. err.code = "BABEL_TEMPLATE_PARSE_ERROR";
  37863. }
  37864. throw err;
  37865. }
  37866. }
  37867. function populatePlaceholders(metadata, replacements) {
  37868. var ast = cloneNode(metadata.ast);
  37869. if (replacements) {
  37870. metadata.placeholders.forEach(function (placeholder) {
  37871. if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
  37872. var placeholderName = placeholder.name;
  37873. throw new Error("Error: No substitution given for \"" + placeholderName + "\". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['" + placeholderName + "'])}\n - { placeholderPattern: /^" + placeholderName + "$/ }");
  37874. }
  37875. });
  37876. Object.keys(replacements).forEach(function (key) {
  37877. if (!metadata.placeholderNames.has(key)) {
  37878. throw new Error("Unknown substitution \"" + key + "\" given");
  37879. }
  37880. });
  37881. }
  37882. metadata.placeholders.slice().reverse().forEach(function (placeholder) {
  37883. try {
  37884. applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
  37885. } catch (e) {
  37886. e.message = "@babel/template placeholder \"" + placeholder.name + "\": " + e.message;
  37887. throw e;
  37888. }
  37889. });
  37890. return ast;
  37891. }
  37892. function applyReplacement(placeholder, ast, replacement) {
  37893. if (placeholder.isDuplicate) {
  37894. if (Array.isArray(replacement)) {
  37895. replacement = replacement.map(function (node) {
  37896. return cloneNode(node);
  37897. });
  37898. } else if (typeof replacement === "object") {
  37899. replacement = cloneNode(replacement);
  37900. }
  37901. }
  37902. var _placeholder$resolve = placeholder.resolve(ast),
  37903. parent = _placeholder$resolve.parent,
  37904. key = _placeholder$resolve.key,
  37905. index = _placeholder$resolve.index;
  37906. if (placeholder.type === "string") {
  37907. if (typeof replacement === "string") {
  37908. replacement = stringLiteral(replacement);
  37909. }
  37910. if (!replacement || !isStringLiteral(replacement)) {
  37911. throw new Error("Expected string substitution");
  37912. }
  37913. } else if (placeholder.type === "statement") {
  37914. if (index === undefined) {
  37915. if (!replacement) {
  37916. replacement = emptyStatement();
  37917. } else if (Array.isArray(replacement)) {
  37918. replacement = blockStatement(replacement);
  37919. } else if (typeof replacement === "string") {
  37920. replacement = expressionStatement(identifier(replacement));
  37921. } else if (!isStatement(replacement)) {
  37922. replacement = expressionStatement(replacement);
  37923. }
  37924. } else {
  37925. if (replacement && !Array.isArray(replacement)) {
  37926. if (typeof replacement === "string") {
  37927. replacement = identifier(replacement);
  37928. }
  37929. if (!isStatement(replacement)) {
  37930. replacement = expressionStatement(replacement);
  37931. }
  37932. }
  37933. }
  37934. } else if (placeholder.type === "param") {
  37935. if (typeof replacement === "string") {
  37936. replacement = identifier(replacement);
  37937. }
  37938. if (index === undefined) throw new Error("Assertion failure.");
  37939. } else {
  37940. if (typeof replacement === "string") {
  37941. replacement = identifier(replacement);
  37942. }
  37943. if (Array.isArray(replacement)) {
  37944. throw new Error("Cannot replace single expression with an array.");
  37945. }
  37946. }
  37947. if (index === undefined) {
  37948. validate$3(parent, key, replacement);
  37949. parent[key] = replacement;
  37950. } else {
  37951. var items = parent[key].slice();
  37952. if (placeholder.type === "statement" || placeholder.type === "param") {
  37953. if (replacement == null) {
  37954. items.splice(index, 1);
  37955. } else if (Array.isArray(replacement)) {
  37956. items.splice.apply(items, [index, 1].concat(_toConsumableArray(replacement)));
  37957. } else {
  37958. items[index] = replacement;
  37959. }
  37960. } else {
  37961. items[index] = replacement;
  37962. }
  37963. validate$3(parent, key, items);
  37964. parent[key] = items;
  37965. }
  37966. }
  37967. function stringTemplate(formatter, code, opts) {
  37968. code = formatter.code(code);
  37969. var metadata;
  37970. return function (arg) {
  37971. var replacements = normalizeReplacements(arg);
  37972. if (!metadata) metadata = parseAndBuildMetadata(formatter, code, opts);
  37973. return formatter.unwrap(populatePlaceholders(metadata, replacements));
  37974. };
  37975. }
  37976. function literalTemplate(formatter, tpl, opts) {
  37977. var _buildLiteralData = buildLiteralData(formatter, tpl, opts),
  37978. metadata = _buildLiteralData.metadata,
  37979. names = _buildLiteralData.names;
  37980. return function (arg) {
  37981. var defaultReplacements = {};
  37982. arg.forEach(function (replacement, i) {
  37983. defaultReplacements[names[i]] = replacement;
  37984. });
  37985. return function (arg) {
  37986. var replacements = normalizeReplacements(arg);
  37987. if (replacements) {
  37988. Object.keys(replacements).forEach(function (key) {
  37989. if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
  37990. throw new Error("Unexpected replacement overlap.");
  37991. }
  37992. });
  37993. }
  37994. return formatter.unwrap(populatePlaceholders(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
  37995. };
  37996. };
  37997. }
  37998. function buildLiteralData(formatter, tpl, opts) {
  37999. var names;
  38000. var nameSet;
  38001. var metadata;
  38002. var prefix = "";
  38003. do {
  38004. prefix += "$";
  38005. var result = buildTemplateCode(tpl, prefix);
  38006. names = result.names;
  38007. nameSet = new Set(names);
  38008. metadata = parseAndBuildMetadata(formatter, formatter.code(result.code), {
  38009. parser: opts.parser,
  38010. placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
  38011. placeholderPattern: opts.placeholderPattern,
  38012. preserveComments: opts.preserveComments,
  38013. syntacticPlaceholders: opts.syntacticPlaceholders
  38014. });
  38015. } while (metadata.placeholders.some(function (placeholder) {
  38016. return placeholder.isDuplicate && nameSet.has(placeholder.name);
  38017. }));
  38018. return {
  38019. metadata: metadata,
  38020. names: names
  38021. };
  38022. }
  38023. function buildTemplateCode(tpl, prefix) {
  38024. var names = [];
  38025. var code = tpl[0];
  38026. for (var i = 1; i < tpl.length; i++) {
  38027. var value = "" + prefix + (i - 1);
  38028. names.push(value);
  38029. code += value + tpl[i];
  38030. }
  38031. return {
  38032. names: names,
  38033. code: code
  38034. };
  38035. }
  38036. var NO_PLACEHOLDER = validate$1({
  38037. placeholderPattern: false
  38038. });
  38039. function createTemplateBuilder(formatter, defaultOpts) {
  38040. var templateFnCache = new WeakMap();
  38041. var templateAstCache = new WeakMap();
  38042. var cachedOpts = defaultOpts || validate$1(null);
  38043. return Object.assign(function (tpl) {
  38044. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  38045. args[_key - 1] = arguments[_key];
  38046. }
  38047. if (typeof tpl === "string") {
  38048. if (args.length > 1) throw new Error("Unexpected extra params.");
  38049. return extendedTrace(stringTemplate(formatter, tpl, merge$1(cachedOpts, validate$1(args[0]))));
  38050. } else if (Array.isArray(tpl)) {
  38051. var builder = templateFnCache.get(tpl);
  38052. if (!builder) {
  38053. builder = literalTemplate(formatter, tpl, cachedOpts);
  38054. templateFnCache.set(tpl, builder);
  38055. }
  38056. return extendedTrace(builder(args));
  38057. } else if (typeof tpl === "object" && tpl) {
  38058. if (args.length > 0) throw new Error("Unexpected extra params.");
  38059. return createTemplateBuilder(formatter, merge$1(cachedOpts, validate$1(tpl)));
  38060. }
  38061. throw new Error("Unexpected template param " + typeof tpl);
  38062. }, {
  38063. ast: function ast(tpl) {
  38064. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  38065. args[_key2 - 1] = arguments[_key2];
  38066. }
  38067. if (typeof tpl === "string") {
  38068. if (args.length > 1) throw new Error("Unexpected extra params.");
  38069. return stringTemplate(formatter, tpl, merge$1(merge$1(cachedOpts, validate$1(args[0])), NO_PLACEHOLDER))();
  38070. } else if (Array.isArray(tpl)) {
  38071. var builder = templateAstCache.get(tpl);
  38072. if (!builder) {
  38073. builder = literalTemplate(formatter, tpl, merge$1(cachedOpts, NO_PLACEHOLDER));
  38074. templateAstCache.set(tpl, builder);
  38075. }
  38076. return builder(args)();
  38077. }
  38078. throw new Error("Unexpected template param " + typeof tpl);
  38079. }
  38080. });
  38081. }
  38082. function extendedTrace(fn) {
  38083. var rootStack = "";
  38084. try {
  38085. throw new Error();
  38086. } catch (error) {
  38087. if (error.stack) {
  38088. rootStack = error.stack.split("\n").slice(3).join("\n");
  38089. }
  38090. }
  38091. return function (arg) {
  38092. try {
  38093. return fn(arg);
  38094. } catch (err) {
  38095. err.stack += "\n =============\n" + rootStack;
  38096. throw err;
  38097. }
  38098. };
  38099. }
  38100. var smart = createTemplateBuilder(smart$1);
  38101. var statement = createTemplateBuilder(statement$1);
  38102. var statements = createTemplateBuilder(statements$1);
  38103. var expression = createTemplateBuilder(expression$1);
  38104. var program = createTemplateBuilder(program$1);
  38105. var template$2 = Object.assign(smart.bind(undefined), {
  38106. smart: smart,
  38107. statement: statement,
  38108. statements: statements,
  38109. expression: expression,
  38110. program: program,
  38111. ast: smart.ast
  38112. });
  38113. var buildPropertyMethodAssignmentWrapper = template$2("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
  38114. var buildGeneratorPropertyMethodAssignmentWrapper = template$2("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n");
  38115. var visitor$2 = {
  38116. "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
  38117. if (path.node.name !== state.name) return;
  38118. var localDeclar = path.scope.getBindingIdentifier(state.name);
  38119. if (localDeclar !== state.outerDeclar) return;
  38120. state.selfReference = true;
  38121. path.stop();
  38122. }
  38123. };
  38124. function getNameFromLiteralId(id) {
  38125. if (isNullLiteral(id)) {
  38126. return "null";
  38127. }
  38128. if (isRegExpLiteral(id)) {
  38129. return "_" + id.pattern + "_" + id.flags;
  38130. }
  38131. if (isTemplateLiteral(id)) {
  38132. return id.quasis.map(function (quasi) {
  38133. return quasi.value.raw;
  38134. }).join("");
  38135. }
  38136. if (id.value !== undefined) {
  38137. return id.value + "";
  38138. }
  38139. return "";
  38140. }
  38141. function wrap$1(state, method, id, scope) {
  38142. if (state.selfReference) {
  38143. if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
  38144. scope.rename(id.name);
  38145. } else {
  38146. if (!isFunction$1(method)) return;
  38147. var build = buildPropertyMethodAssignmentWrapper;
  38148. if (method.generator) {
  38149. build = buildGeneratorPropertyMethodAssignmentWrapper;
  38150. }
  38151. var _template = build({
  38152. FUNCTION: method,
  38153. FUNCTION_ID: id,
  38154. FUNCTION_KEY: scope.generateUidIdentifier(id.name)
  38155. }).expression;
  38156. var params = _template.callee.body.body[0].params;
  38157. for (var i = 0, len = getFunctionArity(method); i < len; i++) {
  38158. params.push(scope.generateUidIdentifier("x"));
  38159. }
  38160. return _template;
  38161. }
  38162. }
  38163. method.id = id;
  38164. scope.getProgramParent().references[id.name] = true;
  38165. }
  38166. function visit$2(node, name, scope) {
  38167. var state = {
  38168. selfAssignment: false,
  38169. selfReference: false,
  38170. outerDeclar: scope.getBindingIdentifier(name),
  38171. references: [],
  38172. name: name
  38173. };
  38174. var binding = scope.getOwnBinding(name);
  38175. if (binding) {
  38176. if (binding.kind === "param") {
  38177. state.selfReference = true;
  38178. }
  38179. } else if (state.outerDeclar || scope.hasGlobal(name)) {
  38180. scope.traverse(node, visitor$2, state);
  38181. }
  38182. return state;
  38183. }
  38184. function nameFunction (_ref, localBinding) {
  38185. var node = _ref.node,
  38186. parent = _ref.parent,
  38187. scope = _ref.scope,
  38188. id = _ref.id;
  38189. if (localBinding === void 0) {
  38190. localBinding = false;
  38191. }
  38192. if (node.id) return;
  38193. if ((isObjectProperty(parent) || isObjectMethod(parent, {
  38194. kind: "method"
  38195. })) && (!parent.computed || isLiteral(parent.key))) {
  38196. id = parent.key;
  38197. } else if (isVariableDeclarator(parent)) {
  38198. id = parent.id;
  38199. if (isIdentifier(id) && !localBinding) {
  38200. var binding = scope.parent.getBinding(id.name);
  38201. if (binding && binding.constant && scope.getBinding(id.name) === binding) {
  38202. node.id = cloneNode(id);
  38203. node.id[NOT_LOCAL_BINDING] = true;
  38204. return;
  38205. }
  38206. }
  38207. } else if (isAssignmentExpression(parent, {
  38208. operator: "="
  38209. })) {
  38210. id = parent.left;
  38211. } else if (!id) {
  38212. return;
  38213. }
  38214. var name;
  38215. if (id && isLiteral(id)) {
  38216. name = getNameFromLiteralId(id);
  38217. } else if (id && isIdentifier(id)) {
  38218. name = id.name;
  38219. }
  38220. if (name === undefined) {
  38221. return;
  38222. }
  38223. name = toBindingIdentifierName(name);
  38224. id = identifier(name);
  38225. id[NOT_LOCAL_BINDING] = true;
  38226. var state = visit$2(node, name, scope);
  38227. return wrap$1(state, node, id, scope) || node;
  38228. }
  38229. function toComputedKey() {
  38230. var key;
  38231. if (this.isMemberExpression()) {
  38232. key = this.node.property;
  38233. } else if (this.isProperty() || this.isMethod()) {
  38234. key = this.node.key;
  38235. } else {
  38236. throw new ReferenceError("todo");
  38237. }
  38238. if (!this.node.computed) {
  38239. if (isIdentifier(key)) key = stringLiteral(key.name);
  38240. }
  38241. return key;
  38242. }
  38243. function ensureBlock() {
  38244. var body = this.get("body");
  38245. var bodyNode = body.node;
  38246. if (Array.isArray(body)) {
  38247. throw new Error("Can't convert array path to a block statement");
  38248. }
  38249. if (!bodyNode) {
  38250. throw new Error("Can't convert node without a body");
  38251. }
  38252. if (body.isBlockStatement()) {
  38253. return bodyNode;
  38254. }
  38255. var statements = [];
  38256. var stringPath = "body";
  38257. var key;
  38258. var listKey;
  38259. if (body.isStatement()) {
  38260. listKey = "body";
  38261. key = 0;
  38262. statements.push(body.node);
  38263. } else {
  38264. stringPath += ".body.0";
  38265. if (this.isFunction()) {
  38266. key = "argument";
  38267. statements.push(returnStatement(body.node));
  38268. } else {
  38269. key = "expression";
  38270. statements.push(expressionStatement(body.node));
  38271. }
  38272. }
  38273. this.node.body = blockStatement(statements);
  38274. var parentPath = this.get(stringPath);
  38275. body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
  38276. return this.node;
  38277. }
  38278. function arrowFunctionToShadowed() {
  38279. if (!this.isArrowFunctionExpression()) return;
  38280. this.arrowFunctionToExpression();
  38281. }
  38282. function unwrapFunctionEnvironment() {
  38283. if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
  38284. throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
  38285. }
  38286. hoistFunctionEnvironment(this);
  38287. }
  38288. function arrowFunctionToExpression(_temp) {
  38289. var _ref = _temp === void 0 ? {} : _temp,
  38290. _ref$allowInsertArrow = _ref.allowInsertArrow,
  38291. allowInsertArrow = _ref$allowInsertArrow === void 0 ? true : _ref$allowInsertArrow,
  38292. _ref$specCompliant = _ref.specCompliant,
  38293. specCompliant = _ref$specCompliant === void 0 ? false : _ref$specCompliant,
  38294. _ref$noNewArrows = _ref.noNewArrows,
  38295. noNewArrows = _ref$noNewArrows === void 0 ? !specCompliant : _ref$noNewArrows;
  38296. if (!this.isArrowFunctionExpression()) {
  38297. throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
  38298. }
  38299. var thisBinding = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
  38300. this.ensureBlock();
  38301. this.node.type = "FunctionExpression";
  38302. if (!noNewArrows) {
  38303. var checkBinding = thisBinding ? null : this.parentPath.scope.generateUidIdentifier("arrowCheckId");
  38304. if (checkBinding) {
  38305. this.parentPath.scope.push({
  38306. id: checkBinding,
  38307. init: objectExpression([])
  38308. });
  38309. }
  38310. this.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier(checkBinding.name) : identifier(thisBinding)])));
  38311. this.replaceWith(callExpression(memberExpression(nameFunction(this, true) || this.node, identifier("bind")), [checkBinding ? identifier(checkBinding.name) : thisExpression()]));
  38312. }
  38313. }
  38314. function hoistFunctionEnvironment(fnPath, noNewArrows, allowInsertArrow) {
  38315. if (noNewArrows === void 0) {
  38316. noNewArrows = true;
  38317. }
  38318. if (allowInsertArrow === void 0) {
  38319. allowInsertArrow = true;
  38320. }
  38321. var thisEnvFn = fnPath.findParent(function (p) {
  38322. return p.isFunction() && !p.isArrowFunctionExpression() || p.isProgram() || p.isClassProperty({
  38323. "static": false
  38324. });
  38325. });
  38326. var inConstructor = (thisEnvFn == null ? void 0 : thisEnvFn.node.kind) === "constructor";
  38327. if (thisEnvFn.isClassProperty()) {
  38328. throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
  38329. }
  38330. var _getScopeInformation = getScopeInformation(fnPath),
  38331. thisPaths = _getScopeInformation.thisPaths,
  38332. argumentsPaths = _getScopeInformation.argumentsPaths,
  38333. newTargetPaths = _getScopeInformation.newTargetPaths,
  38334. superProps = _getScopeInformation.superProps,
  38335. superCalls = _getScopeInformation.superCalls;
  38336. if (inConstructor && superCalls.length > 0) {
  38337. if (!allowInsertArrow) {
  38338. throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
  38339. }
  38340. var allSuperCalls = [];
  38341. thisEnvFn.traverse({
  38342. Function: function Function(child) {
  38343. if (child.isArrowFunctionExpression()) return;
  38344. child.skip();
  38345. },
  38346. ClassProperty: function ClassProperty(child) {
  38347. child.skip();
  38348. },
  38349. CallExpression: function CallExpression(child) {
  38350. if (!child.get("callee").isSuper()) return;
  38351. allSuperCalls.push(child);
  38352. }
  38353. });
  38354. var superBinding = getSuperBinding(thisEnvFn);
  38355. allSuperCalls.forEach(function (superCall) {
  38356. var callee = identifier(superBinding);
  38357. callee.loc = superCall.node.callee.loc;
  38358. superCall.get("callee").replaceWith(callee);
  38359. });
  38360. }
  38361. if (argumentsPaths.length > 0) {
  38362. var argumentsBinding = getBinding(thisEnvFn, "arguments", function () {
  38363. return identifier("arguments");
  38364. });
  38365. argumentsPaths.forEach(function (argumentsChild) {
  38366. var argsRef = identifier(argumentsBinding);
  38367. argsRef.loc = argumentsChild.node.loc;
  38368. argumentsChild.replaceWith(argsRef);
  38369. });
  38370. }
  38371. if (newTargetPaths.length > 0) {
  38372. var newTargetBinding = getBinding(thisEnvFn, "newtarget", function () {
  38373. return metaProperty(identifier("new"), identifier("target"));
  38374. });
  38375. newTargetPaths.forEach(function (targetChild) {
  38376. var targetRef = identifier(newTargetBinding);
  38377. targetRef.loc = targetChild.node.loc;
  38378. targetChild.replaceWith(targetRef);
  38379. });
  38380. }
  38381. if (superProps.length > 0) {
  38382. if (!allowInsertArrow) {
  38383. throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
  38384. }
  38385. var flatSuperProps = superProps.reduce(function (acc, superProp) {
  38386. return acc.concat(standardizeSuperProperty(superProp));
  38387. }, []);
  38388. flatSuperProps.forEach(function (superProp) {
  38389. var key = superProp.node.computed ? "" : superProp.get("property").node.name;
  38390. var isAssignment = superProp.parentPath.isAssignmentExpression({
  38391. left: superProp.node
  38392. });
  38393. var isCall = superProp.parentPath.isCallExpression({
  38394. callee: superProp.node
  38395. });
  38396. var superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
  38397. var args = [];
  38398. if (superProp.node.computed) {
  38399. args.push(superProp.get("property").node);
  38400. }
  38401. if (isAssignment) {
  38402. var value = superProp.parentPath.node.right;
  38403. args.push(value);
  38404. }
  38405. var call = callExpression(identifier(superBinding), args);
  38406. if (isCall) {
  38407. superProp.parentPath.unshiftContainer("arguments", thisExpression());
  38408. superProp.replaceWith(memberExpression(call, identifier("call")));
  38409. thisPaths.push(superProp.parentPath.get("arguments.0"));
  38410. } else if (isAssignment) {
  38411. superProp.parentPath.replaceWith(call);
  38412. } else {
  38413. superProp.replaceWith(call);
  38414. }
  38415. });
  38416. }
  38417. var thisBinding;
  38418. if (thisPaths.length > 0 || !noNewArrows) {
  38419. thisBinding = getThisBinding(thisEnvFn, inConstructor);
  38420. if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
  38421. thisPaths.forEach(function (thisChild) {
  38422. var thisRef = thisChild.isJSX() ? jsxIdentifier(thisBinding) : identifier(thisBinding);
  38423. thisRef.loc = thisChild.node.loc;
  38424. thisChild.replaceWith(thisRef);
  38425. });
  38426. if (!noNewArrows) thisBinding = null;
  38427. }
  38428. }
  38429. return thisBinding;
  38430. }
  38431. function standardizeSuperProperty(superProp) {
  38432. if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
  38433. var assignmentPath = superProp.parentPath;
  38434. var op = assignmentPath.node.operator.slice(0, -1);
  38435. var value = assignmentPath.node.right;
  38436. assignmentPath.node.operator = "=";
  38437. if (superProp.node.computed) {
  38438. var tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  38439. assignmentPath.get("left").replaceWith(memberExpression(superProp.node.object, assignmentExpression("=", tmp, superProp.node.property), true));
  38440. assignmentPath.get("right").replaceWith(binaryExpression(op, memberExpression(superProp.node.object, identifier(tmp.name), true), value));
  38441. } else {
  38442. assignmentPath.get("left").replaceWith(memberExpression(superProp.node.object, superProp.node.property));
  38443. assignmentPath.get("right").replaceWith(binaryExpression(op, memberExpression(superProp.node.object, identifier(superProp.node.property.name)), value));
  38444. }
  38445. return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
  38446. } else if (superProp.parentPath.isUpdateExpression()) {
  38447. var updateExpr = superProp.parentPath;
  38448. var _tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
  38449. var computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
  38450. var parts = [assignmentExpression("=", _tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression("+", identifier(_tmp.name), numericLiteral(1)))];
  38451. if (!superProp.parentPath.node.prefix) {
  38452. parts.push(identifier(_tmp.name));
  38453. }
  38454. updateExpr.replaceWith(sequenceExpression(parts));
  38455. var left = updateExpr.get("expressions.0.right");
  38456. var right = updateExpr.get("expressions.1.left");
  38457. return [left, right];
  38458. }
  38459. return [superProp];
  38460. }
  38461. function hasSuperClass(thisEnvFn) {
  38462. return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
  38463. }
  38464. function getThisBinding(thisEnvFn, inConstructor) {
  38465. return getBinding(thisEnvFn, "this", function (thisBinding) {
  38466. if (!inConstructor || !hasSuperClass(thisEnvFn)) return thisExpression();
  38467. var supers = new WeakSet();
  38468. thisEnvFn.traverse({
  38469. Function: function Function(child) {
  38470. if (child.isArrowFunctionExpression()) return;
  38471. child.skip();
  38472. },
  38473. ClassProperty: function ClassProperty(child) {
  38474. child.skip();
  38475. },
  38476. CallExpression: function CallExpression(child) {
  38477. if (!child.get("callee").isSuper()) return;
  38478. if (supers.has(child.node)) return;
  38479. supers.add(child.node);
  38480. child.replaceWithMultiple([child.node, assignmentExpression("=", identifier(thisBinding), identifier("this"))]);
  38481. }
  38482. });
  38483. });
  38484. }
  38485. function getSuperBinding(thisEnvFn) {
  38486. return getBinding(thisEnvFn, "supercall", function () {
  38487. var argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
  38488. return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier(argsBinding.name))]));
  38489. });
  38490. }
  38491. function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
  38492. var op = isAssignment ? "set" : "get";
  38493. return getBinding(thisEnvFn, "superprop_" + op + ":" + (propName || ""), function () {
  38494. var argsList = [];
  38495. var fnBody;
  38496. if (propName) {
  38497. fnBody = memberExpression(_super(), identifier(propName));
  38498. } else {
  38499. var method = thisEnvFn.scope.generateUidIdentifier("prop");
  38500. argsList.unshift(method);
  38501. fnBody = memberExpression(_super(), identifier(method.name), true);
  38502. }
  38503. if (isAssignment) {
  38504. var valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
  38505. argsList.push(valueIdent);
  38506. fnBody = assignmentExpression("=", fnBody, identifier(valueIdent.name));
  38507. }
  38508. return arrowFunctionExpression(argsList, fnBody);
  38509. });
  38510. }
  38511. function getBinding(thisEnvFn, key, init) {
  38512. var cacheKey = "binding:" + key;
  38513. var data = thisEnvFn.getData(cacheKey);
  38514. if (!data) {
  38515. var id = thisEnvFn.scope.generateUidIdentifier(key);
  38516. data = id.name;
  38517. thisEnvFn.setData(cacheKey, data);
  38518. thisEnvFn.scope.push({
  38519. id: id,
  38520. init: init(data)
  38521. });
  38522. }
  38523. return data;
  38524. }
  38525. function getScopeInformation(fnPath) {
  38526. var thisPaths = [];
  38527. var argumentsPaths = [];
  38528. var newTargetPaths = [];
  38529. var superProps = [];
  38530. var superCalls = [];
  38531. fnPath.traverse({
  38532. ClassProperty: function ClassProperty(child) {
  38533. child.skip();
  38534. },
  38535. Function: function Function(child) {
  38536. if (child.isArrowFunctionExpression()) return;
  38537. child.skip();
  38538. },
  38539. ThisExpression: function ThisExpression(child) {
  38540. thisPaths.push(child);
  38541. },
  38542. JSXIdentifier: function JSXIdentifier(child) {
  38543. if (child.node.name !== "this") return;
  38544. if (!child.parentPath.isJSXMemberExpression({
  38545. object: child.node
  38546. }) && !child.parentPath.isJSXOpeningElement({
  38547. name: child.node
  38548. })) {
  38549. return;
  38550. }
  38551. thisPaths.push(child);
  38552. },
  38553. CallExpression: function CallExpression(child) {
  38554. if (child.get("callee").isSuper()) superCalls.push(child);
  38555. },
  38556. MemberExpression: function MemberExpression(child) {
  38557. if (child.get("object").isSuper()) superProps.push(child);
  38558. },
  38559. ReferencedIdentifier: function ReferencedIdentifier(child) {
  38560. if (child.node.name !== "arguments") return;
  38561. argumentsPaths.push(child);
  38562. },
  38563. MetaProperty: function MetaProperty(child) {
  38564. if (!child.get("meta").isIdentifier({
  38565. name: "new"
  38566. })) return;
  38567. if (!child.get("property").isIdentifier({
  38568. name: "target"
  38569. })) return;
  38570. newTargetPaths.push(child);
  38571. }
  38572. });
  38573. return {
  38574. thisPaths: thisPaths,
  38575. argumentsPaths: argumentsPaths,
  38576. newTargetPaths: newTargetPaths,
  38577. superProps: superProps,
  38578. superCalls: superCalls
  38579. };
  38580. }
  38581. var NodePath_conversion = /*#__PURE__*/Object.freeze({
  38582. __proto__: null,
  38583. toComputedKey: toComputedKey,
  38584. ensureBlock: ensureBlock,
  38585. arrowFunctionToShadowed: arrowFunctionToShadowed,
  38586. unwrapFunctionEnvironment: unwrapFunctionEnvironment,
  38587. arrowFunctionToExpression: arrowFunctionToExpression
  38588. });
  38589. function matchesPattern(pattern, allowPartial) {
  38590. return matchesPattern$1(this.node, pattern, allowPartial);
  38591. }
  38592. function has$b(key) {
  38593. var val = this.node && this.node[key];
  38594. if (val && Array.isArray(val)) {
  38595. return !!val.length;
  38596. } else {
  38597. return !!val;
  38598. }
  38599. }
  38600. function isStatic() {
  38601. return this.scope.isStatic(this.node);
  38602. }
  38603. var is = has$b;
  38604. function isnt(key) {
  38605. return !this.has(key);
  38606. }
  38607. function equals(key, value) {
  38608. return this.node[key] === value;
  38609. }
  38610. function isNodeType(type) {
  38611. return isType$1(this.type, type);
  38612. }
  38613. function canHaveVariableDeclarationOrExpression() {
  38614. return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
  38615. }
  38616. function canSwapBetweenExpressionAndStatement(replacement) {
  38617. if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
  38618. return false;
  38619. }
  38620. if (this.isExpression()) {
  38621. return isBlockStatement(replacement);
  38622. } else if (this.isBlockStatement()) {
  38623. return isExpression(replacement);
  38624. }
  38625. return false;
  38626. }
  38627. function isCompletionRecord(allowInsideFunction) {
  38628. var path = this;
  38629. var first = true;
  38630. do {
  38631. var container = path.container;
  38632. if (path.isFunction() && !first) {
  38633. return !!allowInsideFunction;
  38634. }
  38635. first = false;
  38636. if (Array.isArray(container) && path.key !== container.length - 1) {
  38637. return false;
  38638. }
  38639. } while ((path = path.parentPath) && !path.isProgram());
  38640. return true;
  38641. }
  38642. function isStatementOrBlock() {
  38643. if (this.parentPath.isLabeledStatement() || isBlockStatement(this.container)) {
  38644. return false;
  38645. } else {
  38646. return STATEMENT_OR_BLOCK_KEYS.includes(this.key);
  38647. }
  38648. }
  38649. function referencesImport(moduleSource, importName) {
  38650. if (!this.isReferencedIdentifier()) {
  38651. if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? isStringLiteral(this.node.property, {
  38652. value: importName
  38653. }) : this.node.property.name === importName)) {
  38654. var object = this.get("object");
  38655. return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
  38656. }
  38657. return false;
  38658. }
  38659. var binding = this.scope.getBinding(this.node.name);
  38660. if (!binding || binding.kind !== "module") return false;
  38661. var path = binding.path;
  38662. var parent = path.parentPath;
  38663. if (!parent.isImportDeclaration()) return false;
  38664. if (parent.node.source.value === moduleSource) {
  38665. if (!importName) return true;
  38666. } else {
  38667. return false;
  38668. }
  38669. if (path.isImportDefaultSpecifier() && importName === "default") {
  38670. return true;
  38671. }
  38672. if (path.isImportNamespaceSpecifier() && importName === "*") {
  38673. return true;
  38674. }
  38675. if (path.isImportSpecifier() && isIdentifier(path.node.imported, {
  38676. name: importName
  38677. })) {
  38678. return true;
  38679. }
  38680. return false;
  38681. }
  38682. function getSource$1() {
  38683. var node = this.node;
  38684. if (node.end) {
  38685. var code = this.hub.getCode();
  38686. if (code) return code.slice(node.start, node.end);
  38687. }
  38688. return "";
  38689. }
  38690. function willIMaybeExecuteBefore(target) {
  38691. return this._guessExecutionStatusRelativeTo(target) !== "after";
  38692. }
  38693. function getOuterFunction(path) {
  38694. return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
  38695. }
  38696. function isExecutionUncertain(type, key) {
  38697. switch (type) {
  38698. case "LogicalExpression":
  38699. return key === "right";
  38700. case "ConditionalExpression":
  38701. case "IfStatement":
  38702. return key === "consequent" || key === "alternate";
  38703. case "WhileStatement":
  38704. case "DoWhileStatement":
  38705. case "ForInStatement":
  38706. case "ForOfStatement":
  38707. return key === "body";
  38708. case "ForStatement":
  38709. return key === "body" || key === "update";
  38710. case "SwitchStatement":
  38711. return key === "cases";
  38712. case "TryStatement":
  38713. return key === "handler";
  38714. case "AssignmentPattern":
  38715. return key === "right";
  38716. case "OptionalMemberExpression":
  38717. return key === "property";
  38718. case "OptionalCallExpression":
  38719. return key === "arguments";
  38720. default:
  38721. return false;
  38722. }
  38723. }
  38724. function isExecutionUncertainInList(paths, maxIndex) {
  38725. for (var i = 0; i < maxIndex; i++) {
  38726. var path = paths[i];
  38727. if (isExecutionUncertain(path.parent.type, path.parentKey)) {
  38728. return true;
  38729. }
  38730. }
  38731. return false;
  38732. }
  38733. function _guessExecutionStatusRelativeTo(target) {
  38734. var funcParent = {
  38735. "this": getOuterFunction(this),
  38736. target: getOuterFunction(target)
  38737. };
  38738. if (funcParent.target.node !== funcParent["this"].node) {
  38739. return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
  38740. }
  38741. var paths = {
  38742. target: target.getAncestry(),
  38743. "this": this.getAncestry()
  38744. };
  38745. if (paths.target.indexOf(this) >= 0) return "after";
  38746. if (paths["this"].indexOf(target) >= 0) return "before";
  38747. var commonPath;
  38748. var commonIndex = {
  38749. target: 0,
  38750. "this": 0
  38751. };
  38752. while (!commonPath && commonIndex["this"] < paths["this"].length) {
  38753. var path = paths["this"][commonIndex["this"]];
  38754. commonIndex.target = paths.target.indexOf(path);
  38755. if (commonIndex.target >= 0) {
  38756. commonPath = path;
  38757. } else {
  38758. commonIndex["this"]++;
  38759. }
  38760. }
  38761. if (!commonPath) {
  38762. throw new Error("Internal Babel error - The two compared nodes" + " don't appear to belong to the same program.");
  38763. }
  38764. if (isExecutionUncertainInList(paths["this"], commonIndex["this"] - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
  38765. return "unknown";
  38766. }
  38767. var divergence = {
  38768. "this": paths["this"][commonIndex["this"] - 1],
  38769. target: paths.target[commonIndex.target - 1]
  38770. };
  38771. if (divergence.target.listKey && divergence["this"].listKey && divergence.target.container === divergence["this"].container) {
  38772. return divergence.target.key > divergence["this"].key ? "before" : "after";
  38773. }
  38774. var keys = VISITOR_KEYS[commonPath.type];
  38775. var keyPosition = {
  38776. "this": keys.indexOf(divergence["this"].parentKey),
  38777. target: keys.indexOf(divergence.target.parentKey)
  38778. };
  38779. return keyPosition.target > keyPosition["this"] ? "before" : "after";
  38780. }
  38781. var executionOrderCheckedNodes = new WeakSet();
  38782. function _guessExecutionStatusRelativeToDifferentFunctions(target) {
  38783. if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
  38784. return "unknown";
  38785. }
  38786. var binding = target.scope.getBinding(target.node.id.name);
  38787. if (!binding.references) return "before";
  38788. var referencePaths = binding.referencePaths;
  38789. var allStatus;
  38790. for (var _iterator = _createForOfIteratorHelperLoose(referencePaths), _step; !(_step = _iterator()).done;) {
  38791. var path = _step.value;
  38792. var childOfFunction = !!path.find(function (path) {
  38793. return path.node === target.node;
  38794. });
  38795. if (childOfFunction) continue;
  38796. if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
  38797. return "unknown";
  38798. }
  38799. if (executionOrderCheckedNodes.has(path.node)) continue;
  38800. executionOrderCheckedNodes.add(path.node);
  38801. var status = this._guessExecutionStatusRelativeTo(path);
  38802. executionOrderCheckedNodes["delete"](path.node);
  38803. if (allStatus && allStatus !== status) {
  38804. return "unknown";
  38805. } else {
  38806. allStatus = status;
  38807. }
  38808. }
  38809. return allStatus;
  38810. }
  38811. function resolve$4(dangerous, resolved) {
  38812. return this._resolve(dangerous, resolved) || this;
  38813. }
  38814. function _resolve(dangerous, resolved) {
  38815. if (resolved && resolved.indexOf(this) >= 0) return;
  38816. resolved = resolved || [];
  38817. resolved.push(this);
  38818. if (this.isVariableDeclarator()) {
  38819. if (this.get("id").isIdentifier()) {
  38820. return this.get("init").resolve(dangerous, resolved);
  38821. }
  38822. } else if (this.isReferencedIdentifier()) {
  38823. var binding = this.scope.getBinding(this.node.name);
  38824. if (!binding) return;
  38825. if (!binding.constant) return;
  38826. if (binding.kind === "module") return;
  38827. if (binding.path !== this) {
  38828. var ret = binding.path.resolve(dangerous, resolved);
  38829. if (this.find(function (parent) {
  38830. return parent.node === ret.node;
  38831. })) return;
  38832. return ret;
  38833. }
  38834. } else if (this.isTypeCastExpression()) {
  38835. return this.get("expression").resolve(dangerous, resolved);
  38836. } else if (dangerous && this.isMemberExpression()) {
  38837. var targetKey = this.toComputedKey();
  38838. if (!isLiteral(targetKey)) return;
  38839. var targetName = targetKey.value;
  38840. var target = this.get("object").resolve(dangerous, resolved);
  38841. if (target.isObjectExpression()) {
  38842. var props = target.get("properties");
  38843. for (var _iterator2 = _createForOfIteratorHelperLoose(props), _step2; !(_step2 = _iterator2()).done;) {
  38844. var prop = _step2.value;
  38845. if (!prop.isProperty()) continue;
  38846. var key = prop.get("key");
  38847. var match = prop.isnt("computed") && key.isIdentifier({
  38848. name: targetName
  38849. });
  38850. match = match || key.isLiteral({
  38851. value: targetName
  38852. });
  38853. if (match) return prop.get("value").resolve(dangerous, resolved);
  38854. }
  38855. } else if (target.isArrayExpression() && !isNaN(+targetName)) {
  38856. var elems = target.get("elements");
  38857. var elem = elems[targetName];
  38858. if (elem) return elem.resolve(dangerous, resolved);
  38859. }
  38860. }
  38861. }
  38862. function isConstantExpression() {
  38863. if (this.isIdentifier()) {
  38864. var binding = this.scope.getBinding(this.node.name);
  38865. if (!binding) return false;
  38866. return binding.constant;
  38867. }
  38868. if (this.isLiteral()) {
  38869. if (this.isRegExpLiteral()) {
  38870. return false;
  38871. }
  38872. if (this.isTemplateLiteral()) {
  38873. return this.get("expressions").every(function (expression) {
  38874. return expression.isConstantExpression();
  38875. });
  38876. }
  38877. return true;
  38878. }
  38879. if (this.isUnaryExpression()) {
  38880. if (this.node.operator !== "void") {
  38881. return false;
  38882. }
  38883. return this.get("argument").isConstantExpression();
  38884. }
  38885. if (this.isBinaryExpression()) {
  38886. return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
  38887. }
  38888. return false;
  38889. }
  38890. function isInStrictMode() {
  38891. var start = this.isProgram() ? this : this.parentPath;
  38892. var strictParent = start.find(function (path) {
  38893. if (path.isProgram({
  38894. sourceType: "module"
  38895. })) return true;
  38896. if (path.isClass()) return true;
  38897. if (!path.isProgram() && !path.isFunction()) return false;
  38898. if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
  38899. return false;
  38900. }
  38901. var body = path.isFunction() ? path.node.body : path.node;
  38902. for (var _iterator3 = _createForOfIteratorHelperLoose(body.directives), _step3; !(_step3 = _iterator3()).done;) {
  38903. var directive = _step3.value;
  38904. if (directive.value.value === "use strict") {
  38905. return true;
  38906. }
  38907. }
  38908. });
  38909. return !!strictParent;
  38910. }
  38911. var NodePath_introspection = /*#__PURE__*/Object.freeze({
  38912. __proto__: null,
  38913. matchesPattern: matchesPattern,
  38914. has: has$b,
  38915. isStatic: isStatic,
  38916. is: is,
  38917. isnt: isnt,
  38918. equals: equals,
  38919. isNodeType: isNodeType,
  38920. canHaveVariableDeclarationOrExpression: canHaveVariableDeclarationOrExpression,
  38921. canSwapBetweenExpressionAndStatement: canSwapBetweenExpressionAndStatement,
  38922. isCompletionRecord: isCompletionRecord,
  38923. isStatementOrBlock: isStatementOrBlock,
  38924. referencesImport: referencesImport,
  38925. getSource: getSource$1,
  38926. willIMaybeExecuteBefore: willIMaybeExecuteBefore,
  38927. _guessExecutionStatusRelativeTo: _guessExecutionStatusRelativeTo,
  38928. _guessExecutionStatusRelativeToDifferentFunctions: _guessExecutionStatusRelativeToDifferentFunctions,
  38929. resolve: resolve$4,
  38930. _resolve: _resolve,
  38931. isConstantExpression: isConstantExpression,
  38932. isInStrictMode: isInStrictMode
  38933. });
  38934. function call(key) {
  38935. var opts = this.opts;
  38936. this.debug(key);
  38937. if (this.node) {
  38938. if (this._call(opts[key])) return true;
  38939. }
  38940. if (this.node) {
  38941. return this._call(opts[this.node.type] && opts[this.node.type][key]);
  38942. }
  38943. return false;
  38944. }
  38945. function _call(fns) {
  38946. if (!fns) return false;
  38947. for (var _iterator = _createForOfIteratorHelperLoose(fns), _step; !(_step = _iterator()).done;) {
  38948. var fn = _step.value;
  38949. if (!fn) continue;
  38950. var node = this.node;
  38951. if (!node) return true;
  38952. var ret = fn.call(this.state, this, this.state);
  38953. if (ret && typeof ret === "object" && typeof ret.then === "function") {
  38954. throw new Error("You appear to be using a plugin with an async traversal visitor, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
  38955. }
  38956. if (ret) {
  38957. throw new Error("Unexpected return value from visitor method " + fn);
  38958. }
  38959. if (this.node !== node) return true;
  38960. if (this._traverseFlags > 0) return true;
  38961. }
  38962. return false;
  38963. }
  38964. function isDenylisted() {
  38965. var _this$opts$denylist;
  38966. var denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
  38967. return denylist && denylist.indexOf(this.node.type) > -1;
  38968. }
  38969. function visit$1() {
  38970. if (!this.node) {
  38971. return false;
  38972. }
  38973. if (this.isDenylisted()) {
  38974. return false;
  38975. }
  38976. if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
  38977. return false;
  38978. }
  38979. if (this.shouldSkip || this.call("enter") || this.shouldSkip) {
  38980. this.debug("Skip...");
  38981. return this.shouldStop;
  38982. }
  38983. this.debug("Recursing into...");
  38984. traverse.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
  38985. this.call("exit");
  38986. return this.shouldStop;
  38987. }
  38988. function skip() {
  38989. this.shouldSkip = true;
  38990. }
  38991. function skipKey(key) {
  38992. if (this.skipKeys == null) {
  38993. this.skipKeys = {};
  38994. }
  38995. this.skipKeys[key] = true;
  38996. }
  38997. function stop() {
  38998. this._traverseFlags |= SHOULD_SKIP | SHOULD_STOP;
  38999. }
  39000. function setScope() {
  39001. if (this.opts && this.opts.noScope) return;
  39002. var path = this.parentPath;
  39003. if (this.key === "key" && path.isMethod()) path = path.parentPath;
  39004. var target;
  39005. while (path && !target) {
  39006. if (path.opts && path.opts.noScope) return;
  39007. target = path.scope;
  39008. path = path.parentPath;
  39009. }
  39010. this.scope = this.getScope(target);
  39011. if (this.scope) this.scope.init();
  39012. }
  39013. function setContext(context) {
  39014. if (this.skipKeys != null) {
  39015. this.skipKeys = {};
  39016. }
  39017. this._traverseFlags = 0;
  39018. if (context) {
  39019. this.context = context;
  39020. this.state = context.state;
  39021. this.opts = context.opts;
  39022. }
  39023. this.setScope();
  39024. return this;
  39025. }
  39026. function resync() {
  39027. if (this.removed) return;
  39028. this._resyncParent();
  39029. this._resyncList();
  39030. this._resyncKey();
  39031. }
  39032. function _resyncParent() {
  39033. if (this.parentPath) {
  39034. this.parent = this.parentPath.node;
  39035. }
  39036. }
  39037. function _resyncKey() {
  39038. if (!this.container) return;
  39039. if (this.node === this.container[this.key]) return;
  39040. if (Array.isArray(this.container)) {
  39041. for (var i = 0; i < this.container.length; i++) {
  39042. if (this.container[i] === this.node) {
  39043. return this.setKey(i);
  39044. }
  39045. }
  39046. } else {
  39047. for (var _i = 0, _Object$keys = Object.keys(this.container); _i < _Object$keys.length; _i++) {
  39048. var key = _Object$keys[_i];
  39049. if (this.container[key] === this.node) {
  39050. return this.setKey(key);
  39051. }
  39052. }
  39053. }
  39054. this.key = null;
  39055. }
  39056. function _resyncList() {
  39057. if (!this.parent || !this.inList) return;
  39058. var newContainer = this.parent[this.listKey];
  39059. if (this.container === newContainer) return;
  39060. this.container = newContainer || null;
  39061. }
  39062. function _resyncRemoved() {
  39063. if (this.key == null || !this.container || this.container[this.key] !== this.node) {
  39064. this._markRemoved();
  39065. }
  39066. }
  39067. function popContext() {
  39068. this.contexts.pop();
  39069. if (this.contexts.length > 0) {
  39070. this.setContext(this.contexts[this.contexts.length - 1]);
  39071. } else {
  39072. this.setContext(undefined);
  39073. }
  39074. }
  39075. function pushContext(context) {
  39076. this.contexts.push(context);
  39077. this.setContext(context);
  39078. }
  39079. function setup$1(parentPath, container, listKey, key) {
  39080. this.listKey = listKey;
  39081. this.container = container;
  39082. this.parentPath = parentPath || this.parentPath;
  39083. this.setKey(key);
  39084. }
  39085. function setKey(key) {
  39086. var _this$node;
  39087. this.key = key;
  39088. this.node = this.container[this.key];
  39089. this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
  39090. }
  39091. function requeue(pathToQueue) {
  39092. if (pathToQueue === void 0) {
  39093. pathToQueue = this;
  39094. }
  39095. if (pathToQueue.removed) return;
  39096. var contexts = this.contexts;
  39097. for (var _iterator2 = _createForOfIteratorHelperLoose(contexts), _step2; !(_step2 = _iterator2()).done;) {
  39098. var context = _step2.value;
  39099. context.maybeQueue(pathToQueue);
  39100. }
  39101. }
  39102. function _getQueueContexts() {
  39103. var path = this;
  39104. var contexts = this.contexts;
  39105. while (!contexts.length) {
  39106. path = path.parentPath;
  39107. if (!path) break;
  39108. contexts = path.contexts;
  39109. }
  39110. return contexts;
  39111. }
  39112. var NodePath_context = /*#__PURE__*/Object.freeze({
  39113. __proto__: null,
  39114. call: call,
  39115. _call: _call,
  39116. isDenylisted: isDenylisted,
  39117. isBlacklisted: isDenylisted,
  39118. visit: visit$1,
  39119. skip: skip,
  39120. skipKey: skipKey,
  39121. stop: stop,
  39122. setScope: setScope,
  39123. setContext: setContext,
  39124. resync: resync,
  39125. _resyncParent: _resyncParent,
  39126. _resyncKey: _resyncKey,
  39127. _resyncList: _resyncList,
  39128. _resyncRemoved: _resyncRemoved,
  39129. popContext: popContext,
  39130. pushContext: pushContext,
  39131. setup: setup$1,
  39132. setKey: setKey,
  39133. requeue: requeue,
  39134. _getQueueContexts: _getQueueContexts
  39135. });
  39136. var hooks = [function (self, parent) {
  39137. var removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
  39138. if (removeParent) {
  39139. parent.remove();
  39140. return true;
  39141. }
  39142. }, function (self, parent) {
  39143. if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
  39144. parent.replaceWith(parent.node.expressions[0]);
  39145. return true;
  39146. }
  39147. }, function (self, parent) {
  39148. if (parent.isBinary()) {
  39149. if (self.key === "left") {
  39150. parent.replaceWith(parent.node.right);
  39151. } else {
  39152. parent.replaceWith(parent.node.left);
  39153. }
  39154. return true;
  39155. }
  39156. }, function (self, parent) {
  39157. if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
  39158. self.replaceWith({
  39159. type: "BlockStatement",
  39160. body: []
  39161. });
  39162. return true;
  39163. }
  39164. }];
  39165. function remove() {
  39166. var _this$opts;
  39167. this._assertUnremoved();
  39168. this.resync();
  39169. if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
  39170. this._removeFromScope();
  39171. }
  39172. if (this._callRemovalHooks()) {
  39173. this._markRemoved();
  39174. return;
  39175. }
  39176. this.shareCommentsWithSiblings();
  39177. this._remove();
  39178. this._markRemoved();
  39179. }
  39180. function _removeFromScope() {
  39181. var _this = this;
  39182. var bindings = this.getBindingIdentifiers();
  39183. Object.keys(bindings).forEach(function (name) {
  39184. return _this.scope.removeBinding(name);
  39185. });
  39186. }
  39187. function _callRemovalHooks() {
  39188. for (var _iterator = _createForOfIteratorHelperLoose(hooks), _step; !(_step = _iterator()).done;) {
  39189. var fn = _step.value;
  39190. if (fn(this, this.parentPath)) return true;
  39191. }
  39192. }
  39193. function _remove() {
  39194. if (Array.isArray(this.container)) {
  39195. this.container.splice(this.key, 1);
  39196. this.updateSiblingKeys(this.key, -1);
  39197. } else {
  39198. this._replaceWith(null);
  39199. }
  39200. }
  39201. function _markRemoved() {
  39202. this._traverseFlags |= SHOULD_SKIP | REMOVED;
  39203. if (this.parent) path$3.get(this.parent)["delete"](this.node);
  39204. this.node = null;
  39205. }
  39206. function _assertUnremoved() {
  39207. if (this.removed) {
  39208. throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
  39209. }
  39210. }
  39211. var NodePath_removal = /*#__PURE__*/Object.freeze({
  39212. __proto__: null,
  39213. remove: remove,
  39214. _removeFromScope: _removeFromScope,
  39215. _callRemovalHooks: _callRemovalHooks,
  39216. _remove: _remove,
  39217. _markRemoved: _markRemoved,
  39218. _assertUnremoved: _assertUnremoved
  39219. });
  39220. var referenceVisitor$1 = {
  39221. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  39222. if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
  39223. return;
  39224. }
  39225. if (path.node.name === "this") {
  39226. var scope = path.scope;
  39227. do {
  39228. if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
  39229. break;
  39230. }
  39231. } while (scope = scope.parent);
  39232. if (scope) state.breakOnScopePaths.push(scope.path);
  39233. }
  39234. var binding = path.scope.getBinding(path.node.name);
  39235. if (!binding) return;
  39236. for (var _iterator = _createForOfIteratorHelperLoose(binding.constantViolations), _step; !(_step = _iterator()).done;) {
  39237. var violation = _step.value;
  39238. if (violation.scope !== binding.path.scope) {
  39239. state.mutableBinding = true;
  39240. path.stop();
  39241. return;
  39242. }
  39243. }
  39244. if (binding !== state.scope.getBinding(path.node.name)) return;
  39245. state.bindings[path.node.name] = binding;
  39246. }
  39247. };
  39248. var PathHoister = function () {
  39249. function PathHoister(path, scope) {
  39250. this.breakOnScopePaths = void 0;
  39251. this.bindings = void 0;
  39252. this.mutableBinding = void 0;
  39253. this.scopes = void 0;
  39254. this.scope = void 0;
  39255. this.path = void 0;
  39256. this.attachAfter = void 0;
  39257. this.breakOnScopePaths = [];
  39258. this.bindings = {};
  39259. this.mutableBinding = false;
  39260. this.scopes = [];
  39261. this.scope = scope;
  39262. this.path = path;
  39263. this.attachAfter = false;
  39264. }
  39265. var _proto = PathHoister.prototype;
  39266. _proto.isCompatibleScope = function isCompatibleScope(scope) {
  39267. for (var _i = 0, _Object$keys = Object.keys(this.bindings); _i < _Object$keys.length; _i++) {
  39268. var key = _Object$keys[_i];
  39269. var binding = this.bindings[key];
  39270. if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
  39271. return false;
  39272. }
  39273. }
  39274. return true;
  39275. };
  39276. _proto.getCompatibleScopes = function getCompatibleScopes() {
  39277. var scope = this.path.scope;
  39278. do {
  39279. if (this.isCompatibleScope(scope)) {
  39280. this.scopes.push(scope);
  39281. } else {
  39282. break;
  39283. }
  39284. if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
  39285. break;
  39286. }
  39287. } while (scope = scope.parent);
  39288. };
  39289. _proto.getAttachmentPath = function getAttachmentPath() {
  39290. var path = this._getAttachmentPath();
  39291. if (!path) return;
  39292. var targetScope = path.scope;
  39293. if (targetScope.path === path) {
  39294. targetScope = path.scope.parent;
  39295. }
  39296. if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
  39297. for (var _i2 = 0, _Object$keys2 = Object.keys(this.bindings); _i2 < _Object$keys2.length; _i2++) {
  39298. var name = _Object$keys2[_i2];
  39299. if (!targetScope.hasOwnBinding(name)) continue;
  39300. var binding = this.bindings[name];
  39301. if (binding.kind === "param" || binding.path.parentKey === "params") {
  39302. continue;
  39303. }
  39304. var bindingParentPath = this.getAttachmentParentForPath(binding.path);
  39305. if (bindingParentPath.key >= path.key) {
  39306. this.attachAfter = true;
  39307. path = binding.path;
  39308. for (var _iterator2 = _createForOfIteratorHelperLoose(binding.constantViolations), _step2; !(_step2 = _iterator2()).done;) {
  39309. var violationPath = _step2.value;
  39310. if (this.getAttachmentParentForPath(violationPath).key > path.key) {
  39311. path = violationPath;
  39312. }
  39313. }
  39314. }
  39315. }
  39316. }
  39317. return path;
  39318. };
  39319. _proto._getAttachmentPath = function _getAttachmentPath() {
  39320. var scopes = this.scopes;
  39321. var scope = scopes.pop();
  39322. if (!scope) return;
  39323. if (scope.path.isFunction()) {
  39324. if (this.hasOwnParamBindings(scope)) {
  39325. if (this.scope === scope) return;
  39326. var bodies = scope.path.get("body").get("body");
  39327. for (var i = 0; i < bodies.length; i++) {
  39328. if (bodies[i].node._blockHoist) continue;
  39329. return bodies[i];
  39330. }
  39331. } else {
  39332. return this.getNextScopeAttachmentParent();
  39333. }
  39334. } else if (scope.path.isProgram()) {
  39335. return this.getNextScopeAttachmentParent();
  39336. }
  39337. };
  39338. _proto.getNextScopeAttachmentParent = function getNextScopeAttachmentParent() {
  39339. var scope = this.scopes.pop();
  39340. if (scope) return this.getAttachmentParentForPath(scope.path);
  39341. };
  39342. _proto.getAttachmentParentForPath = function getAttachmentParentForPath(path) {
  39343. do {
  39344. if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
  39345. return path;
  39346. }
  39347. } while (path = path.parentPath);
  39348. };
  39349. _proto.hasOwnParamBindings = function hasOwnParamBindings(scope) {
  39350. for (var _i3 = 0, _Object$keys3 = Object.keys(this.bindings); _i3 < _Object$keys3.length; _i3++) {
  39351. var name = _Object$keys3[_i3];
  39352. if (!scope.hasOwnBinding(name)) continue;
  39353. var binding = this.bindings[name];
  39354. if (binding.kind === "param" && binding.constant) return true;
  39355. }
  39356. return false;
  39357. };
  39358. _proto.run = function run() {
  39359. this.path.traverse(referenceVisitor$1, this);
  39360. if (this.mutableBinding) return;
  39361. this.getCompatibleScopes();
  39362. var attachTo = this.getAttachmentPath();
  39363. if (!attachTo) return;
  39364. if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
  39365. var uid = attachTo.scope.generateUidIdentifier("ref");
  39366. var declarator = variableDeclarator(uid, this.path.node);
  39367. var insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
  39368. var _attachTo$insertFn = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : variableDeclaration("var", [declarator])]),
  39369. _attachTo$insertFn2 = _slicedToArray$2(_attachTo$insertFn, 1),
  39370. attached = _attachTo$insertFn2[0];
  39371. var parent = this.path.parentPath;
  39372. if (parent.isJSXElement() && this.path.container === parent.node.children) {
  39373. uid = jsxExpressionContainer(uid);
  39374. }
  39375. this.path.replaceWith(cloneNode(uid));
  39376. return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
  39377. };
  39378. return PathHoister;
  39379. }();
  39380. function insertBefore(nodes_) {
  39381. this._assertUnremoved();
  39382. var nodes = this._verifyNodeList(nodes_);
  39383. var parentPath = this.parentPath;
  39384. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  39385. return parentPath.insertBefore(nodes);
  39386. } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  39387. if (this.node) nodes.push(this.node);
  39388. return this.replaceExpressionWithStatements(nodes);
  39389. } else if (Array.isArray(this.container)) {
  39390. return this._containerInsertBefore(nodes);
  39391. } else if (this.isStatementOrBlock()) {
  39392. var node = this.node;
  39393. var shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
  39394. this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
  39395. return this.unshiftContainer("body", nodes);
  39396. } else {
  39397. throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
  39398. }
  39399. }
  39400. function _containerInsert(from, nodes) {
  39401. var _this$container;
  39402. this.updateSiblingKeys(from, nodes.length);
  39403. var paths = [];
  39404. (_this$container = this.container).splice.apply(_this$container, [from, 0].concat(_toConsumableArray(nodes)));
  39405. for (var i = 0; i < nodes.length; i++) {
  39406. var to = from + i;
  39407. var path = this.getSibling(to);
  39408. paths.push(path);
  39409. if (this.context && this.context.queue) {
  39410. path.pushContext(this.context);
  39411. }
  39412. }
  39413. var contexts = this._getQueueContexts();
  39414. for (var _i = 0, _paths = paths; _i < _paths.length; _i++) {
  39415. var _path = _paths[_i];
  39416. _path.setScope();
  39417. _path.debug("Inserted.");
  39418. for (var _iterator = _createForOfIteratorHelperLoose(contexts), _step; !(_step = _iterator()).done;) {
  39419. var context = _step.value;
  39420. context.maybeQueue(_path, true);
  39421. }
  39422. }
  39423. return paths;
  39424. }
  39425. function _containerInsertBefore(nodes) {
  39426. return this._containerInsert(this.key, nodes);
  39427. }
  39428. function _containerInsertAfter(nodes) {
  39429. return this._containerInsert(this.key + 1, nodes);
  39430. }
  39431. function insertAfter(nodes_) {
  39432. this._assertUnremoved();
  39433. var nodes = this._verifyNodeList(nodes_);
  39434. var parentPath = this.parentPath;
  39435. if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
  39436. return parentPath.insertAfter(nodes.map(function (node) {
  39437. return isExpression(node) ? expressionStatement(node) : node;
  39438. }));
  39439. } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
  39440. if (this.node) {
  39441. var node = this.node;
  39442. var scope = this.scope;
  39443. if (scope.path.isPattern()) {
  39444. assertExpression(node);
  39445. this.replaceWith(callExpression(arrowFunctionExpression([], node), []));
  39446. this.get("callee.body").insertAfter(nodes);
  39447. return [this];
  39448. }
  39449. if (parentPath.isMethod({
  39450. computed: true,
  39451. key: node
  39452. })) {
  39453. scope = scope.parent;
  39454. }
  39455. var temp = scope.generateDeclaredUidIdentifier();
  39456. nodes.unshift(expressionStatement(assignmentExpression("=", cloneNode(temp), node)));
  39457. nodes.push(expressionStatement(cloneNode(temp)));
  39458. }
  39459. return this.replaceExpressionWithStatements(nodes);
  39460. } else if (Array.isArray(this.container)) {
  39461. return this._containerInsertAfter(nodes);
  39462. } else if (this.isStatementOrBlock()) {
  39463. var _node = this.node;
  39464. var shouldInsertCurrentNode = _node && (!this.isExpressionStatement() || _node.expression != null);
  39465. this.replaceWith(blockStatement(shouldInsertCurrentNode ? [_node] : []));
  39466. return this.pushContainer("body", nodes);
  39467. } else {
  39468. throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
  39469. }
  39470. }
  39471. function updateSiblingKeys(fromIndex, incrementBy) {
  39472. if (!this.parent) return;
  39473. var paths = path$3.get(this.parent);
  39474. for (var _iterator2 = _createForOfIteratorHelperLoose(paths), _step2; !(_step2 = _iterator2()).done;) {
  39475. var _step2$value = _slicedToArray$2(_step2.value, 2),
  39476. path = _step2$value[1];
  39477. if (path.key >= fromIndex) {
  39478. path.key += incrementBy;
  39479. }
  39480. }
  39481. }
  39482. function _verifyNodeList(nodes) {
  39483. if (!nodes) {
  39484. return [];
  39485. }
  39486. if (!Array.isArray(nodes)) {
  39487. nodes = [nodes];
  39488. }
  39489. for (var i = 0; i < nodes.length; i++) {
  39490. var node = nodes[i];
  39491. var msg = void 0;
  39492. if (!node) {
  39493. msg = "has falsy node";
  39494. } else if (typeof node !== "object") {
  39495. msg = "contains a non-object node";
  39496. } else if (!node.type) {
  39497. msg = "without a type";
  39498. } else if (node instanceof NodePath) {
  39499. msg = "has a NodePath when it expected a raw object";
  39500. }
  39501. if (msg) {
  39502. var type = Array.isArray(node) ? "array" : typeof node;
  39503. throw new Error("Node list " + msg + " with the index of " + i + " and type of " + type);
  39504. }
  39505. }
  39506. return nodes;
  39507. }
  39508. function unshiftContainer(listKey, nodes) {
  39509. this._assertUnremoved();
  39510. nodes = this._verifyNodeList(nodes);
  39511. var path = NodePath.get({
  39512. parentPath: this,
  39513. parent: this.node,
  39514. container: this.node[listKey],
  39515. listKey: listKey,
  39516. key: 0
  39517. }).setContext(this.context);
  39518. return path._containerInsertBefore(nodes);
  39519. }
  39520. function pushContainer(listKey, nodes) {
  39521. this._assertUnremoved();
  39522. var verifiedNodes = this._verifyNodeList(nodes);
  39523. var container = this.node[listKey];
  39524. var path = NodePath.get({
  39525. parentPath: this,
  39526. parent: this.node,
  39527. container: container,
  39528. listKey: listKey,
  39529. key: container.length
  39530. }).setContext(this.context);
  39531. return path.replaceWithMultiple(verifiedNodes);
  39532. }
  39533. function hoist$3(scope) {
  39534. if (scope === void 0) {
  39535. scope = this.scope;
  39536. }
  39537. var hoister = new PathHoister(this, scope);
  39538. return hoister.run();
  39539. }
  39540. var NodePath_modification = /*#__PURE__*/Object.freeze({
  39541. __proto__: null,
  39542. insertBefore: insertBefore,
  39543. _containerInsert: _containerInsert,
  39544. _containerInsertBefore: _containerInsertBefore,
  39545. _containerInsertAfter: _containerInsertAfter,
  39546. insertAfter: insertAfter,
  39547. updateSiblingKeys: updateSiblingKeys,
  39548. _verifyNodeList: _verifyNodeList,
  39549. unshiftContainer: unshiftContainer,
  39550. pushContainer: pushContainer,
  39551. hoist: hoist$3
  39552. });
  39553. var NORMAL_COMPLETION = 0;
  39554. var BREAK_COMPLETION = 1;
  39555. function NormalCompletion(path) {
  39556. return {
  39557. type: NORMAL_COMPLETION,
  39558. path: path
  39559. };
  39560. }
  39561. function BreakCompletion(path) {
  39562. return {
  39563. type: BREAK_COMPLETION,
  39564. path: path
  39565. };
  39566. }
  39567. function getOpposite() {
  39568. if (this.key === "left") {
  39569. return this.getSibling("right");
  39570. } else if (this.key === "right") {
  39571. return this.getSibling("left");
  39572. }
  39573. return null;
  39574. }
  39575. function addCompletionRecords(path, records, context) {
  39576. if (path) return records.concat(_getCompletionRecords(path, context));
  39577. return records;
  39578. }
  39579. function completionRecordForSwitch(cases, records, context) {
  39580. var lastNormalCompletions = [];
  39581. for (var i = 0; i < cases.length; i++) {
  39582. var casePath = cases[i];
  39583. var caseCompletions = _getCompletionRecords(casePath, context);
  39584. var normalCompletions = [];
  39585. var breakCompletions = [];
  39586. for (var _iterator = _createForOfIteratorHelperLoose(caseCompletions), _step; !(_step = _iterator()).done;) {
  39587. var c = _step.value;
  39588. if (c.type === NORMAL_COMPLETION) {
  39589. normalCompletions.push(c);
  39590. }
  39591. if (c.type === BREAK_COMPLETION) {
  39592. breakCompletions.push(c);
  39593. }
  39594. }
  39595. if (normalCompletions.length) {
  39596. lastNormalCompletions = normalCompletions;
  39597. }
  39598. records = records.concat(breakCompletions);
  39599. }
  39600. records = records.concat(lastNormalCompletions);
  39601. return records;
  39602. }
  39603. function normalCompletionToBreak(completions) {
  39604. completions.forEach(function (c) {
  39605. c.type = BREAK_COMPLETION;
  39606. });
  39607. }
  39608. function replaceBreakStatementInBreakCompletion(completions, reachable) {
  39609. completions.forEach(function (c) {
  39610. if (c.path.isBreakStatement({
  39611. label: null
  39612. })) {
  39613. if (reachable) {
  39614. c.path.replaceWith(unaryExpression("void", numericLiteral(0)));
  39615. } else {
  39616. c.path.remove();
  39617. }
  39618. }
  39619. });
  39620. }
  39621. function getStatementListCompletion(paths, context) {
  39622. var completions = [];
  39623. if (context.canHaveBreak) {
  39624. var lastNormalCompletions = [];
  39625. for (var i = 0; i < paths.length; i++) {
  39626. var path = paths[i];
  39627. var newContext = Object.assign({}, context, {
  39628. inCaseClause: false
  39629. });
  39630. if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
  39631. newContext.shouldPopulateBreak = true;
  39632. } else {
  39633. newContext.shouldPopulateBreak = false;
  39634. }
  39635. var statementCompletions = _getCompletionRecords(path, newContext);
  39636. if (statementCompletions.length > 0 && statementCompletions.every(function (c) {
  39637. return c.type === BREAK_COMPLETION;
  39638. })) {
  39639. if (lastNormalCompletions.length > 0 && statementCompletions.every(function (c) {
  39640. return c.path.isBreakStatement({
  39641. label: null
  39642. });
  39643. })) {
  39644. normalCompletionToBreak(lastNormalCompletions);
  39645. completions = completions.concat(lastNormalCompletions);
  39646. if (lastNormalCompletions.some(function (c) {
  39647. return c.path.isDeclaration();
  39648. })) {
  39649. completions = completions.concat(statementCompletions);
  39650. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  39651. }
  39652. replaceBreakStatementInBreakCompletion(statementCompletions, false);
  39653. } else {
  39654. completions = completions.concat(statementCompletions);
  39655. if (!context.shouldPopulateBreak) {
  39656. replaceBreakStatementInBreakCompletion(statementCompletions, true);
  39657. }
  39658. }
  39659. break;
  39660. }
  39661. if (i === paths.length - 1) {
  39662. completions = completions.concat(statementCompletions);
  39663. } else {
  39664. completions = completions.concat(statementCompletions.filter(function (c) {
  39665. return c.type === BREAK_COMPLETION;
  39666. }));
  39667. lastNormalCompletions = statementCompletions.filter(function (c) {
  39668. return c.type === NORMAL_COMPLETION;
  39669. });
  39670. }
  39671. }
  39672. } else if (paths.length) {
  39673. completions = completions.concat(_getCompletionRecords(paths[paths.length - 1], context));
  39674. }
  39675. return completions;
  39676. }
  39677. function _getCompletionRecords(path, context) {
  39678. var records = [];
  39679. if (path.isIfStatement()) {
  39680. records = addCompletionRecords(path.get("consequent"), records, context);
  39681. records = addCompletionRecords(path.get("alternate"), records, context);
  39682. } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
  39683. records = addCompletionRecords(path.get("body"), records, context);
  39684. } else if (path.isProgram() || path.isBlockStatement()) {
  39685. records = records.concat(getStatementListCompletion(path.get("body"), context));
  39686. } else if (path.isFunction()) {
  39687. return _getCompletionRecords(path.get("body"), context);
  39688. } else if (path.isTryStatement()) {
  39689. records = addCompletionRecords(path.get("block"), records, context);
  39690. records = addCompletionRecords(path.get("handler"), records, context);
  39691. } else if (path.isCatchClause()) {
  39692. records = addCompletionRecords(path.get("body"), records, context);
  39693. } else if (path.isSwitchStatement()) {
  39694. records = completionRecordForSwitch(path.get("cases"), records, context);
  39695. } else if (path.isSwitchCase()) {
  39696. records = records.concat(getStatementListCompletion(path.get("consequent"), {
  39697. canHaveBreak: true,
  39698. shouldPopulateBreak: false,
  39699. inCaseClause: true
  39700. }));
  39701. } else if (path.isBreakStatement()) {
  39702. records.push(BreakCompletion(path));
  39703. } else {
  39704. records.push(NormalCompletion(path));
  39705. }
  39706. return records;
  39707. }
  39708. function getCompletionRecords() {
  39709. var records = _getCompletionRecords(this, {
  39710. canHaveBreak: false,
  39711. shouldPopulateBreak: false,
  39712. inCaseClause: false
  39713. });
  39714. return records.map(function (r) {
  39715. return r.path;
  39716. });
  39717. }
  39718. function getSibling(key) {
  39719. return NodePath.get({
  39720. parentPath: this.parentPath,
  39721. parent: this.parent,
  39722. container: this.container,
  39723. listKey: this.listKey,
  39724. key: key
  39725. }).setContext(this.context);
  39726. }
  39727. function getPrevSibling() {
  39728. return this.getSibling(this.key - 1);
  39729. }
  39730. function getNextSibling() {
  39731. return this.getSibling(this.key + 1);
  39732. }
  39733. function getAllNextSiblings() {
  39734. var _key = this.key;
  39735. var sibling = this.getSibling(++_key);
  39736. var siblings = [];
  39737. while (sibling.node) {
  39738. siblings.push(sibling);
  39739. sibling = this.getSibling(++_key);
  39740. }
  39741. return siblings;
  39742. }
  39743. function getAllPrevSiblings() {
  39744. var _key = this.key;
  39745. var sibling = this.getSibling(--_key);
  39746. var siblings = [];
  39747. while (sibling.node) {
  39748. siblings.push(sibling);
  39749. sibling = this.getSibling(--_key);
  39750. }
  39751. return siblings;
  39752. }
  39753. function get$2(key, context) {
  39754. if (context === void 0) {
  39755. context = true;
  39756. }
  39757. if (context === true) context = this.context;
  39758. var parts = key.split(".");
  39759. if (parts.length === 1) {
  39760. return this._getKey(key, context);
  39761. } else {
  39762. return this._getPattern(parts, context);
  39763. }
  39764. }
  39765. function _getKey(key, context) {
  39766. var _this = this;
  39767. var node = this.node;
  39768. var container = node[key];
  39769. if (Array.isArray(container)) {
  39770. return container.map(function (_, i) {
  39771. return NodePath.get({
  39772. listKey: key,
  39773. parentPath: _this,
  39774. parent: node,
  39775. container: container,
  39776. key: i
  39777. }).setContext(context);
  39778. });
  39779. } else {
  39780. return NodePath.get({
  39781. parentPath: this,
  39782. parent: node,
  39783. container: node,
  39784. key: key
  39785. }).setContext(context);
  39786. }
  39787. }
  39788. function _getPattern(parts, context) {
  39789. var path = this;
  39790. for (var _iterator2 = _createForOfIteratorHelperLoose(parts), _step2; !(_step2 = _iterator2()).done;) {
  39791. var part = _step2.value;
  39792. if (part === ".") {
  39793. path = path.parentPath;
  39794. } else {
  39795. if (Array.isArray(path)) {
  39796. path = path[part];
  39797. } else {
  39798. path = path.get(part, context);
  39799. }
  39800. }
  39801. }
  39802. return path;
  39803. }
  39804. function getBindingIdentifiers(duplicates) {
  39805. return getBindingIdentifiers$1(this.node, duplicates);
  39806. }
  39807. function getOuterBindingIdentifiers(duplicates) {
  39808. return getOuterBindingIdentifiers$1(this.node, duplicates);
  39809. }
  39810. function getBindingIdentifierPaths(duplicates, outerOnly) {
  39811. if (duplicates === void 0) {
  39812. duplicates = false;
  39813. }
  39814. if (outerOnly === void 0) {
  39815. outerOnly = false;
  39816. }
  39817. var path = this;
  39818. var search = [].concat(path);
  39819. var ids = Object.create(null);
  39820. while (search.length) {
  39821. var id = search.shift();
  39822. if (!id) continue;
  39823. if (!id.node) continue;
  39824. var keys = getBindingIdentifiers$1.keys[id.node.type];
  39825. if (id.isIdentifier()) {
  39826. if (duplicates) {
  39827. var _ids = ids[id.node.name] = ids[id.node.name] || [];
  39828. _ids.push(id);
  39829. } else {
  39830. ids[id.node.name] = id;
  39831. }
  39832. continue;
  39833. }
  39834. if (id.isExportDeclaration()) {
  39835. var declaration = id.get("declaration");
  39836. if (declaration.isDeclaration()) {
  39837. search.push(declaration);
  39838. }
  39839. continue;
  39840. }
  39841. if (outerOnly) {
  39842. if (id.isFunctionDeclaration()) {
  39843. search.push(id.get("id"));
  39844. continue;
  39845. }
  39846. if (id.isFunctionExpression()) {
  39847. continue;
  39848. }
  39849. }
  39850. if (keys) {
  39851. for (var i = 0; i < keys.length; i++) {
  39852. var _key2 = keys[i];
  39853. var child = id.get(_key2);
  39854. if (Array.isArray(child) || child.node) {
  39855. search = search.concat(child);
  39856. }
  39857. }
  39858. }
  39859. }
  39860. return ids;
  39861. }
  39862. function getOuterBindingIdentifierPaths(duplicates) {
  39863. return this.getBindingIdentifierPaths(duplicates, true);
  39864. }
  39865. var NodePath_family = /*#__PURE__*/Object.freeze({
  39866. __proto__: null,
  39867. getOpposite: getOpposite,
  39868. getCompletionRecords: getCompletionRecords,
  39869. getSibling: getSibling,
  39870. getPrevSibling: getPrevSibling,
  39871. getNextSibling: getNextSibling,
  39872. getAllNextSiblings: getAllNextSiblings,
  39873. getAllPrevSiblings: getAllPrevSiblings,
  39874. get: get$2,
  39875. _getKey: _getKey,
  39876. _getPattern: _getPattern,
  39877. getBindingIdentifiers: getBindingIdentifiers,
  39878. getOuterBindingIdentifiers: getOuterBindingIdentifiers,
  39879. getBindingIdentifierPaths: getBindingIdentifierPaths,
  39880. getOuterBindingIdentifierPaths: getOuterBindingIdentifierPaths
  39881. });
  39882. function shareCommentsWithSiblings() {
  39883. if (typeof this.key === "string") return;
  39884. var node = this.node;
  39885. if (!node) return;
  39886. var trailing = node.trailingComments;
  39887. var leading = node.leadingComments;
  39888. if (!trailing && !leading) return;
  39889. var prev = this.getSibling(this.key - 1);
  39890. var next = this.getSibling(this.key + 1);
  39891. var hasPrev = Boolean(prev.node);
  39892. var hasNext = Boolean(next.node);
  39893. if (hasPrev && !hasNext) {
  39894. prev.addComments("trailing", trailing);
  39895. } else if (hasNext && !hasPrev) {
  39896. next.addComments("leading", leading);
  39897. }
  39898. }
  39899. function addComment(type, content, line) {
  39900. addComment$1(this.node, type, content, line);
  39901. }
  39902. function addComments(type, comments) {
  39903. addComments$1(this.node, type, comments);
  39904. }
  39905. var NodePath_comments = /*#__PURE__*/Object.freeze({
  39906. __proto__: null,
  39907. shareCommentsWithSiblings: shareCommentsWithSiblings,
  39908. addComment: addComment,
  39909. addComments: addComments
  39910. });
  39911. var _debug = browser$5("babel");
  39912. var REMOVED = 1 << 0;
  39913. var SHOULD_STOP = 1 << 1;
  39914. var SHOULD_SKIP = 1 << 2;
  39915. var NodePath = function () {
  39916. function NodePath(hub, parent) {
  39917. this.contexts = [];
  39918. this.state = null;
  39919. this.opts = null;
  39920. this._traverseFlags = 0;
  39921. this.skipKeys = null;
  39922. this.parentPath = null;
  39923. this.container = null;
  39924. this.listKey = null;
  39925. this.key = null;
  39926. this.node = null;
  39927. this.type = null;
  39928. this.parent = parent;
  39929. this.hub = hub;
  39930. this.data = null;
  39931. this.context = null;
  39932. this.scope = null;
  39933. }
  39934. NodePath.get = function get(_ref) {
  39935. var hub = _ref.hub,
  39936. parentPath = _ref.parentPath,
  39937. parent = _ref.parent,
  39938. container = _ref.container,
  39939. listKey = _ref.listKey,
  39940. key = _ref.key;
  39941. if (!hub && parentPath) {
  39942. hub = parentPath.hub;
  39943. }
  39944. if (!parent) {
  39945. throw new Error("To get a node path the parent needs to exist");
  39946. }
  39947. var targetNode = container[key];
  39948. var paths = path$3.get(parent);
  39949. if (!paths) {
  39950. paths = new Map();
  39951. path$3.set(parent, paths);
  39952. }
  39953. var path = paths.get(targetNode);
  39954. if (!path) {
  39955. path = new NodePath(hub, parent);
  39956. if (targetNode) paths.set(targetNode, path);
  39957. }
  39958. path.setup(parentPath, container, listKey, key);
  39959. return path;
  39960. };
  39961. var _proto = NodePath.prototype;
  39962. _proto.getScope = function getScope(scope) {
  39963. return this.isScope() ? new Scope$1(this) : scope;
  39964. };
  39965. _proto.setData = function setData(key, val) {
  39966. if (this.data == null) {
  39967. this.data = Object.create(null);
  39968. }
  39969. return this.data[key] = val;
  39970. };
  39971. _proto.getData = function getData(key, def) {
  39972. if (this.data == null) {
  39973. this.data = Object.create(null);
  39974. }
  39975. var val = this.data[key];
  39976. if (val === undefined && def !== undefined) val = this.data[key] = def;
  39977. return val;
  39978. };
  39979. _proto.buildCodeFrameError = function buildCodeFrameError(msg, Error) {
  39980. if (Error === void 0) {
  39981. Error = SyntaxError;
  39982. }
  39983. return this.hub.buildError(this.node, msg, Error);
  39984. };
  39985. _proto.traverse = function traverse$1(visitor, state) {
  39986. traverse(this.node, visitor, this.scope, state, this);
  39987. };
  39988. _proto.set = function set(key, node) {
  39989. validate$3(this.node, key, node);
  39990. this.node[key] = node;
  39991. };
  39992. _proto.getPathLocation = function getPathLocation() {
  39993. var parts = [];
  39994. var path = this;
  39995. do {
  39996. var key = path.key;
  39997. if (path.inList) key = path.listKey + "[" + key + "]";
  39998. parts.unshift(key);
  39999. } while (path = path.parentPath);
  40000. return parts.join(".");
  40001. };
  40002. _proto.debug = function debug(message) {
  40003. if (!_debug.enabled) return;
  40004. _debug(this.getPathLocation() + " " + this.type + ": " + message);
  40005. };
  40006. _proto.toString = function toString() {
  40007. return generate$1(this.node).code;
  40008. };
  40009. _createClass(NodePath, [{
  40010. key: "inList",
  40011. get: function get() {
  40012. return !!this.listKey;
  40013. },
  40014. set: function set(inList) {
  40015. if (!inList) {
  40016. this.listKey = null;
  40017. }
  40018. }
  40019. }, {
  40020. key: "parentKey",
  40021. get: function get() {
  40022. return this.listKey || this.key;
  40023. }
  40024. }, {
  40025. key: "shouldSkip",
  40026. get: function get() {
  40027. return !!(this._traverseFlags & SHOULD_SKIP);
  40028. },
  40029. set: function set(v) {
  40030. if (v) {
  40031. this._traverseFlags |= SHOULD_SKIP;
  40032. } else {
  40033. this._traverseFlags &= ~SHOULD_SKIP;
  40034. }
  40035. }
  40036. }, {
  40037. key: "shouldStop",
  40038. get: function get() {
  40039. return !!(this._traverseFlags & SHOULD_STOP);
  40040. },
  40041. set: function set(v) {
  40042. if (v) {
  40043. this._traverseFlags |= SHOULD_STOP;
  40044. } else {
  40045. this._traverseFlags &= ~SHOULD_STOP;
  40046. }
  40047. }
  40048. }, {
  40049. key: "removed",
  40050. get: function get() {
  40051. return !!(this._traverseFlags & REMOVED);
  40052. },
  40053. set: function set(v) {
  40054. if (v) {
  40055. this._traverseFlags |= REMOVED;
  40056. } else {
  40057. this._traverseFlags &= ~REMOVED;
  40058. }
  40059. }
  40060. }]);
  40061. return NodePath;
  40062. }();
  40063. Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
  40064. var _loop2 = function _loop2() {
  40065. var type = _step.value;
  40066. var typeKey = "is" + type;
  40067. var fn = t$p[typeKey];
  40068. NodePath.prototype[typeKey] = function (opts) {
  40069. return fn(this.node, opts);
  40070. };
  40071. NodePath.prototype["assert" + type] = function (opts) {
  40072. if (!fn(this.node, opts)) {
  40073. throw new TypeError("Expected node path of type " + type);
  40074. }
  40075. };
  40076. };
  40077. for (var _iterator = _createForOfIteratorHelperLoose(TYPES), _step; !(_step = _iterator()).done;) {
  40078. _loop2();
  40079. }
  40080. var _loop = function _loop() {
  40081. var type = _Object$keys$1[_i$1];
  40082. if (type[0] === "_") return "continue";
  40083. if (TYPES.indexOf(type) < 0) TYPES.push(type);
  40084. var virtualType = virtualTypes[type];
  40085. NodePath.prototype["is" + type] = function (opts) {
  40086. return virtualType.checkPath(this, opts);
  40087. };
  40088. };
  40089. for (var _i$1 = 0, _Object$keys$1 = Object.keys(virtualTypes); _i$1 < _Object$keys$1.length; _i$1++) {
  40090. var _ret = _loop();
  40091. if (_ret === "continue") continue;
  40092. }
  40093. var TraversalContext = function () {
  40094. function TraversalContext(scope, opts, state, parentPath) {
  40095. this.queue = null;
  40096. this.priorityQueue = null;
  40097. this.parentPath = parentPath;
  40098. this.scope = scope;
  40099. this.state = state;
  40100. this.opts = opts;
  40101. }
  40102. var _proto = TraversalContext.prototype;
  40103. _proto.shouldVisit = function shouldVisit(node) {
  40104. var opts = this.opts;
  40105. if (opts.enter || opts.exit) return true;
  40106. if (opts[node.type]) return true;
  40107. var keys = VISITOR_KEYS[node.type];
  40108. if (!(keys != null && keys.length)) return false;
  40109. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  40110. var key = _step.value;
  40111. if (node[key]) return true;
  40112. }
  40113. return false;
  40114. };
  40115. _proto.create = function create(node, obj, key, listKey) {
  40116. return NodePath.get({
  40117. parentPath: this.parentPath,
  40118. parent: node,
  40119. container: obj,
  40120. key: key,
  40121. listKey: listKey
  40122. });
  40123. };
  40124. _proto.maybeQueue = function maybeQueue(path, notPriority) {
  40125. if (this.queue) {
  40126. if (notPriority) {
  40127. this.queue.push(path);
  40128. } else {
  40129. this.priorityQueue.push(path);
  40130. }
  40131. }
  40132. };
  40133. _proto.visitMultiple = function visitMultiple(container, parent, listKey) {
  40134. if (container.length === 0) return false;
  40135. var queue = [];
  40136. for (var key = 0; key < container.length; key++) {
  40137. var node = container[key];
  40138. if (node && this.shouldVisit(node)) {
  40139. queue.push(this.create(parent, container, key, listKey));
  40140. }
  40141. }
  40142. return this.visitQueue(queue);
  40143. };
  40144. _proto.visitSingle = function visitSingle(node, key) {
  40145. if (this.shouldVisit(node[key])) {
  40146. return this.visitQueue([this.create(node, node, key)]);
  40147. } else {
  40148. return false;
  40149. }
  40150. };
  40151. _proto.visitQueue = function visitQueue(queue) {
  40152. this.queue = queue;
  40153. this.priorityQueue = [];
  40154. var visited = new WeakSet();
  40155. var stop = false;
  40156. for (var _iterator2 = _createForOfIteratorHelperLoose(queue), _step2; !(_step2 = _iterator2()).done;) {
  40157. var path = _step2.value;
  40158. path.resync();
  40159. if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
  40160. path.pushContext(this);
  40161. }
  40162. if (path.key === null) continue;
  40163. var node = path.node;
  40164. if (visited.has(node)) continue;
  40165. if (node) visited.add(node);
  40166. if (path.visit()) {
  40167. stop = true;
  40168. break;
  40169. }
  40170. if (this.priorityQueue.length) {
  40171. stop = this.visitQueue(this.priorityQueue);
  40172. this.priorityQueue = [];
  40173. this.queue = queue;
  40174. if (stop) break;
  40175. }
  40176. }
  40177. for (var _iterator3 = _createForOfIteratorHelperLoose(queue), _step3; !(_step3 = _iterator3()).done;) {
  40178. var _path = _step3.value;
  40179. _path.popContext();
  40180. }
  40181. this.queue = null;
  40182. return stop;
  40183. };
  40184. _proto.visit = function visit(node, key) {
  40185. var nodes = node[key];
  40186. if (!nodes) return false;
  40187. if (Array.isArray(nodes)) {
  40188. return this.visitMultiple(nodes, node, key);
  40189. } else {
  40190. return this.visitSingle(node, key);
  40191. }
  40192. };
  40193. return TraversalContext;
  40194. }();
  40195. function explode$1(visitor) {
  40196. if (visitor._exploded) return visitor;
  40197. visitor._exploded = true;
  40198. for (var _i = 0, _Object$keys = Object.keys(visitor); _i < _Object$keys.length; _i++) {
  40199. var nodeType = _Object$keys[_i];
  40200. if (shouldIgnoreKey(nodeType)) continue;
  40201. var parts = nodeType.split("|");
  40202. if (parts.length === 1) continue;
  40203. var fns = visitor[nodeType];
  40204. delete visitor[nodeType];
  40205. for (var _iterator = _createForOfIteratorHelperLoose(parts), _step; !(_step = _iterator()).done;) {
  40206. var part = _step.value;
  40207. visitor[part] = fns;
  40208. }
  40209. }
  40210. verify(visitor);
  40211. delete visitor.__esModule;
  40212. ensureEntranceObjects(visitor);
  40213. ensureCallbackArrays(visitor);
  40214. for (var _i2 = 0, _Object$keys2 = Object.keys(visitor); _i2 < _Object$keys2.length; _i2++) {
  40215. var _nodeType = _Object$keys2[_i2];
  40216. if (shouldIgnoreKey(_nodeType)) continue;
  40217. var wrapper = virtualTypes[_nodeType];
  40218. if (!wrapper) continue;
  40219. var _fns = visitor[_nodeType];
  40220. for (var _i3 = 0, _Object$keys3 = Object.keys(_fns); _i3 < _Object$keys3.length; _i3++) {
  40221. var type = _Object$keys3[_i3];
  40222. _fns[type] = wrapCheck(wrapper, _fns[type]);
  40223. }
  40224. delete visitor[_nodeType];
  40225. if (wrapper.types) {
  40226. for (var _iterator2 = _createForOfIteratorHelperLoose(wrapper.types), _step2; !(_step2 = _iterator2()).done;) {
  40227. var _type = _step2.value;
  40228. if (visitor[_type]) {
  40229. mergePair(visitor[_type], _fns);
  40230. } else {
  40231. visitor[_type] = _fns;
  40232. }
  40233. }
  40234. } else {
  40235. mergePair(visitor, _fns);
  40236. }
  40237. }
  40238. for (var _i4 = 0, _Object$keys4 = Object.keys(visitor); _i4 < _Object$keys4.length; _i4++) {
  40239. var _nodeType2 = _Object$keys4[_i4];
  40240. if (shouldIgnoreKey(_nodeType2)) continue;
  40241. var _fns2 = visitor[_nodeType2];
  40242. var aliases = FLIPPED_ALIAS_KEYS[_nodeType2];
  40243. var deprecatedKey = DEPRECATED_KEYS[_nodeType2];
  40244. if (deprecatedKey) {
  40245. console.trace("Visitor defined for " + _nodeType2 + " but it has been renamed to " + deprecatedKey);
  40246. aliases = [deprecatedKey];
  40247. }
  40248. if (!aliases) continue;
  40249. delete visitor[_nodeType2];
  40250. for (var _iterator3 = _createForOfIteratorHelperLoose(aliases), _step3; !(_step3 = _iterator3()).done;) {
  40251. var alias = _step3.value;
  40252. var existing = visitor[alias];
  40253. if (existing) {
  40254. mergePair(existing, _fns2);
  40255. } else {
  40256. visitor[alias] = Object.assign({}, _fns2);
  40257. }
  40258. }
  40259. }
  40260. for (var _i5 = 0, _Object$keys5 = Object.keys(visitor); _i5 < _Object$keys5.length; _i5++) {
  40261. var _nodeType3 = _Object$keys5[_i5];
  40262. if (shouldIgnoreKey(_nodeType3)) continue;
  40263. ensureCallbackArrays(visitor[_nodeType3]);
  40264. }
  40265. return visitor;
  40266. }
  40267. function verify(visitor) {
  40268. if (visitor._verified) return;
  40269. if (typeof visitor === "function") {
  40270. throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
  40271. }
  40272. for (var _i6 = 0, _Object$keys6 = Object.keys(visitor); _i6 < _Object$keys6.length; _i6++) {
  40273. var nodeType = _Object$keys6[_i6];
  40274. if (nodeType === "enter" || nodeType === "exit") {
  40275. validateVisitorMethods(nodeType, visitor[nodeType]);
  40276. }
  40277. if (shouldIgnoreKey(nodeType)) continue;
  40278. if (TYPES.indexOf(nodeType) < 0) {
  40279. throw new Error("You gave us a visitor for the node type " + nodeType + " but it's not a valid type");
  40280. }
  40281. var visitors = visitor[nodeType];
  40282. if (typeof visitors === "object") {
  40283. for (var _i7 = 0, _Object$keys7 = Object.keys(visitors); _i7 < _Object$keys7.length; _i7++) {
  40284. var visitorKey = _Object$keys7[_i7];
  40285. if (visitorKey === "enter" || visitorKey === "exit") {
  40286. validateVisitorMethods(nodeType + "." + visitorKey, visitors[visitorKey]);
  40287. } else {
  40288. throw new Error("You passed `traverse()` a visitor object with the property " + (nodeType + " that has the invalid property " + visitorKey));
  40289. }
  40290. }
  40291. }
  40292. }
  40293. visitor._verified = true;
  40294. }
  40295. function validateVisitorMethods(path, val) {
  40296. var fns = [].concat(val);
  40297. for (var _iterator4 = _createForOfIteratorHelperLoose(fns), _step4; !(_step4 = _iterator4()).done;) {
  40298. var fn = _step4.value;
  40299. if (typeof fn !== "function") {
  40300. throw new TypeError("Non-function found defined in " + path + " with type " + typeof fn);
  40301. }
  40302. }
  40303. }
  40304. function merge(visitors, states, wrapper) {
  40305. if (states === void 0) {
  40306. states = [];
  40307. }
  40308. var rootVisitor = {};
  40309. for (var i = 0; i < visitors.length; i++) {
  40310. var visitor = visitors[i];
  40311. var state = states[i];
  40312. explode$1(visitor);
  40313. for (var _i8 = 0, _Object$keys8 = Object.keys(visitor); _i8 < _Object$keys8.length; _i8++) {
  40314. var type = _Object$keys8[_i8];
  40315. var visitorType = visitor[type];
  40316. if (state || wrapper) {
  40317. visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
  40318. }
  40319. var nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
  40320. mergePair(nodeVisitor, visitorType);
  40321. }
  40322. }
  40323. return rootVisitor;
  40324. }
  40325. function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
  40326. var newVisitor = {};
  40327. var _loop = function _loop() {
  40328. var key = _Object$keys9[_i9];
  40329. var fns = oldVisitor[key];
  40330. if (!Array.isArray(fns)) return "continue";
  40331. fns = fns.map(function (fn) {
  40332. var newFn = fn;
  40333. if (state) {
  40334. newFn = function newFn(path) {
  40335. return fn.call(state, path, state);
  40336. };
  40337. }
  40338. if (wrapper) {
  40339. newFn = wrapper(state.key, key, newFn);
  40340. }
  40341. if (newFn !== fn) {
  40342. newFn.toString = function () {
  40343. return fn.toString();
  40344. };
  40345. }
  40346. return newFn;
  40347. });
  40348. newVisitor[key] = fns;
  40349. };
  40350. for (var _i9 = 0, _Object$keys9 = Object.keys(oldVisitor); _i9 < _Object$keys9.length; _i9++) {
  40351. var _ret = _loop();
  40352. if (_ret === "continue") continue;
  40353. }
  40354. return newVisitor;
  40355. }
  40356. function ensureEntranceObjects(obj) {
  40357. for (var _i10 = 0, _Object$keys10 = Object.keys(obj); _i10 < _Object$keys10.length; _i10++) {
  40358. var key = _Object$keys10[_i10];
  40359. if (shouldIgnoreKey(key)) continue;
  40360. var fns = obj[key];
  40361. if (typeof fns === "function") {
  40362. obj[key] = {
  40363. enter: fns
  40364. };
  40365. }
  40366. }
  40367. }
  40368. function ensureCallbackArrays(obj) {
  40369. if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
  40370. if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
  40371. }
  40372. function wrapCheck(wrapper, fn) {
  40373. var newFn = function newFn(path) {
  40374. if (wrapper.checkPath(path)) {
  40375. return fn.apply(this, arguments);
  40376. }
  40377. };
  40378. newFn.toString = function () {
  40379. return fn.toString();
  40380. };
  40381. return newFn;
  40382. }
  40383. function shouldIgnoreKey(key) {
  40384. if (key[0] === "_") return true;
  40385. if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
  40386. if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
  40387. return true;
  40388. }
  40389. return false;
  40390. }
  40391. function mergePair(dest, src) {
  40392. for (var _i11 = 0, _Object$keys11 = Object.keys(src); _i11 < _Object$keys11.length; _i11++) {
  40393. var key = _Object$keys11[_i11];
  40394. dest[key] = [].concat(dest[key] || [], src[key]);
  40395. }
  40396. }
  40397. var visitors = /*#__PURE__*/Object.freeze({
  40398. __proto__: null,
  40399. explode: explode$1,
  40400. verify: verify,
  40401. merge: merge
  40402. });
  40403. function traverse(parent, opts, scope, state, parentPath) {
  40404. if (opts === void 0) {
  40405. opts = {};
  40406. }
  40407. if (!parent) return;
  40408. if (!opts.noScope && !scope) {
  40409. if (parent.type !== "Program" && parent.type !== "File") {
  40410. throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + ("Instead of that you tried to traverse a " + parent.type + " node without ") + "passing scope and parentPath.");
  40411. }
  40412. }
  40413. if (!VISITOR_KEYS[parent.type]) {
  40414. return;
  40415. }
  40416. explode$1(opts);
  40417. traverse.node(parent, opts, scope, state, parentPath);
  40418. }
  40419. traverse.visitors = visitors;
  40420. traverse.verify = verify;
  40421. traverse.explode = explode$1;
  40422. traverse.cheap = function (node, enter) {
  40423. return traverseFast(node, enter);
  40424. };
  40425. traverse.node = function (node, opts, scope, state, parentPath, skipKeys) {
  40426. var keys = VISITOR_KEYS[node.type];
  40427. if (!keys) return;
  40428. var context = new TraversalContext(scope, opts, state, parentPath);
  40429. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  40430. var key = _step.value;
  40431. if (skipKeys && skipKeys[key]) continue;
  40432. if (context.visit(node, key)) return;
  40433. }
  40434. };
  40435. traverse.clearNode = function (node, opts) {
  40436. removeProperties(node, opts);
  40437. path$3["delete"](node);
  40438. };
  40439. traverse.removeProperties = function (tree, opts) {
  40440. traverseFast(tree, traverse.clearNode, opts);
  40441. return tree;
  40442. };
  40443. function hasDenylistedType(path, state) {
  40444. if (path.node.type === state.type) {
  40445. state.has = true;
  40446. path.stop();
  40447. }
  40448. }
  40449. traverse.hasType = function (tree, type, denylistTypes) {
  40450. if (denylistTypes != null && denylistTypes.includes(tree.type)) return false;
  40451. if (tree.type === type) return true;
  40452. var state = {
  40453. has: false,
  40454. type: type
  40455. };
  40456. traverse(tree, {
  40457. noScope: true,
  40458. denylist: denylistTypes,
  40459. enter: hasDenylistedType
  40460. }, null, state);
  40461. return state.has;
  40462. };
  40463. traverse.cache = cache$4;
  40464. var jsx = {
  40465. minVersion: "7.0.0-beta.0",
  40466. ast: function ast() {
  40467. return template$2.program.ast('\nvar REACT_ELEMENT_TYPE;\nexport default function _createRawReactElement(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE =\n (typeof Symbol === "function" &&\n \n Symbol["for"] &&\n Symbol["for"]("react.element")) ||\n 0xeac7;\n }\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n if (!props && childrenLength !== 0) {\n \n \n props = { children: void 0 };\n }\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : "" + key,\n ref: null,\n props: props,\n _owner: null,\n };\n}\n');
  40468. }
  40469. };
  40470. var objectSpread2 = {
  40471. minVersion: "7.5.0",
  40472. ast: function ast() {
  40473. return template$2.program.ast('\nimport defineProperty from "defineProperty";\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(source, key)\n );\n });\n }\n }\n return target;\n}\n');
  40474. }
  40475. };
  40476. var _typeof = {
  40477. minVersion: "7.0.0-beta.0",
  40478. ast: function ast() {
  40479. return template$2.program.ast('\nexport default function _typeof(obj) {\n "@babel/helpers - typeof";\n if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj &&\n typeof Symbol === "function" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n }\n return _typeof(obj);\n}\n');
  40480. }
  40481. };
  40482. var wrapRegExp = {
  40483. minVersion: "7.2.6",
  40484. ast: function ast() {
  40485. return template$2.program.ast('\nimport setPrototypeOf from "setPrototypeOf";\nimport inherits from "inherits";\nexport default function _wrapRegExp() {\n _wrapRegExp = function (re, groups) {\n return new BabelRegExp(re, undefined, groups);\n };\n var _super = RegExp.prototype;\n var _groups = new WeakMap();\n function BabelRegExp(re, flags, groups) {\n var _this = new RegExp(re, flags);\n \n _groups.set(_this, groups || _groups.get(re));\n return setPrototypeOf(_this, BabelRegExp.prototype);\n }\n inherits(BabelRegExp, RegExp);\n BabelRegExp.prototype.exec = function (str) {\n var result = _super.exec.call(this, str);\n if (result) result.groups = buildGroups(result, this);\n return result;\n };\n BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {\n if (typeof substitution === "string") {\n var groups = _groups.get(this);\n return _super[Symbol.replace].call(\n this,\n str,\n substitution.replace(/\\$<([^>]+)>/g, function (_, name) {\n return "$" + groups[name];\n })\n );\n } else if (typeof substitution === "function") {\n var _this = this;\n return _super[Symbol.replace].call(this, str, function () {\n var args = arguments;\n \n if (typeof args[args.length - 1] !== "object") {\n args = [].slice.call(args);\n args.push(buildGroups(args, _this));\n }\n return substitution.apply(this, args);\n });\n } else {\n return _super[Symbol.replace].call(this, str, substitution);\n }\n };\n function buildGroups(result, re) {\n \n \n var g = _groups.get(re);\n return Object.keys(g).reduce(function (groups, name) {\n groups[name] = result[g[name]];\n return groups;\n }, Object.create(null));\n }\n return _wrapRegExp.apply(this, arguments);\n}\n');
  40486. }
  40487. };
  40488. var generated = /*#__PURE__*/Object.freeze({
  40489. __proto__: null,
  40490. jsx: jsx,
  40491. objectSpread2: objectSpread2,
  40492. 'typeof': _typeof,
  40493. wrapRegExp: wrapRegExp
  40494. });
  40495. var _templateObject$n, _templateObject2$b, _templateObject3$a, _templateObject4$6, _templateObject5$4, _templateObject6$4, _templateObject7$3, _templateObject8$2, _templateObject9$2, _templateObject10$2, _templateObject11$2, _templateObject12$2, _templateObject13$2, _templateObject14$1, _templateObject15$1, _templateObject16$1, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75, _templateObject76, _templateObject77, _templateObject78, _templateObject79, _templateObject80, _templateObject81, _templateObject82, _templateObject83, _templateObject84;
  40496. var helpers$1 = Object.assign({
  40497. __proto__: null
  40498. }, generated);
  40499. var helper$2 = function helper(minVersion) {
  40500. return function (tpl) {
  40501. return {
  40502. minVersion: minVersion,
  40503. ast: function ast() {
  40504. return template$2.program.ast(tpl);
  40505. }
  40506. };
  40507. };
  40508. };
  40509. helpers$1.asyncIterator = helper$2("7.0.0-beta.0")(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n export default function _asyncIterator(iterable) {\n var method;\n if (typeof Symbol !== \"undefined\") {\n if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];\n if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];\n }\n if (method == null) method = iterable[\"@@asyncIterator\"];\n if (method == null) method = iterable[\"@@iterator\"]\n if (method == null) throw new TypeError(\"Object is not async iterable\");\n return method.call(iterable);\n }\n"])));
  40510. helpers$1.AwaitValue = helper$2("7.0.0-beta.0")(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n export default function _AwaitValue(value) {\n this.wrapped = value;\n }\n"])));
  40511. helpers$1.AsyncGenerator = helper$2("7.0.0-beta.0")(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n import AwaitValue from \"AwaitValue\";\n\n export default function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null,\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n var wrappedAwait = value instanceof AwaitValue;\n\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(\n function (arg) {\n if (wrappedAwait) {\n resume(key === \"return\" ? \"return\" : \"next\", arg);\n return\n }\n\n settle(result.done ? \"return\" : \"normal\", arg);\n },\n function (err) { resume(\"throw\", err); });\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({ value: value, done: true });\n break;\n case \"throw\":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide \"return\" method if generator return is not supported\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n }\n\n AsyncGenerator.prototype[typeof Symbol === \"function\" && Symbol.asyncIterator || \"@@asyncIterator\"] = function () { return this; };\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke(\"next\", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke(\"throw\", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke(\"return\", arg); };\n"])));
  40512. helpers$1.wrapAsyncGenerator = helper$2("7.0.0-beta.0")(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["\n import AsyncGenerator from \"AsyncGenerator\";\n\n export default function _wrapAsyncGenerator(fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n }\n"])));
  40513. helpers$1.awaitAsyncGenerator = helper$2("7.0.0-beta.0")(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["\n import AwaitValue from \"AwaitValue\";\n\n export default function _awaitAsyncGenerator(value) {\n return new AwaitValue(value);\n }\n"])));
  40514. helpers$1.asyncGeneratorDelegate = helper$2("7.0.0-beta.0")(_templateObject6$4 || (_templateObject6$4 = _taggedTemplateLiteralLoose(["\n export default function _asyncGeneratorDelegate(inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n iter[typeof Symbol !== \"undefined\" && Symbol.iterator || \"@@iterator\"] = function () { return this; };\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump(\"return\", value);\n };\n }\n\n return iter;\n }\n"])));
  40515. helpers$1.asyncToGenerator = helper$2("7.0.0-beta.0")(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n\n export default function _asyncToGenerator(fn) {\n return function () {\n var self = this, args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n }\n"])));
  40516. helpers$1.classCallCheck = helper$2("7.0.0-beta.0")(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n"])));
  40517. helpers$1.createClass = helper$2("7.0.0-beta.0")(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n export default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n"])));
  40518. helpers$1.defineEnumerableProperties = helper$2("7.0.0-beta.0")(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n export default function _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n // Symbols are not enumerated over by for-in loops. If native\n // Symbols are available, fetch all of the descs object's own\n // symbol properties and define them on our target object too.\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n var desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n return obj;\n }\n"])));
  40519. helpers$1.defaults = helper$2("7.0.0-beta.0")(_templateObject11$2 || (_templateObject11$2 = _taggedTemplateLiteralLoose(["\n export default function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n }\n"])));
  40520. helpers$1.defineProperty = helper$2("7.0.0-beta.0")(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteralLoose(["\n export default function _defineProperty(obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n }\n"])));
  40521. helpers$1["extends"] = helper$2("7.0.0-beta.0")(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteralLoose(["\n export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n"])));
  40522. helpers$1.objectSpread = helper$2("7.0.0-beta.0")(_templateObject14$1 || (_templateObject14$1 = _taggedTemplateLiteralLoose(["\n import defineProperty from \"defineProperty\";\n\n export default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = (arguments[i] != null) ? Object(arguments[i]) : {};\n var ownKeys = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n ownKeys.forEach(function(key) {\n defineProperty(target, key, source[key]);\n });\n }\n return target;\n }\n"])));
  40523. helpers$1.inherits = helper$2("7.0.0-beta.0")(_templateObject15$1 || (_templateObject15$1 = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n\n export default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n }\n"])));
  40524. helpers$1.inheritsLoose = helper$2("7.0.0-beta.0")(_templateObject16$1 || (_templateObject16$1 = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n\n export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n }\n"])));
  40525. helpers$1.getPrototypeOf = helper$2("7.0.0-beta.0")(_templateObject17 || (_templateObject17 = _taggedTemplateLiteralLoose(["\n export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf\n ? Object.getPrototypeOf\n : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n"])));
  40526. helpers$1.setPrototypeOf = helper$2("7.0.0-beta.0")(_templateObject18 || (_templateObject18 = _taggedTemplateLiteralLoose(["\n export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n"])));
  40527. helpers$1.isNativeReflectConstruct = helper$2("7.9.0")(_templateObject19 || (_templateObject19 = _taggedTemplateLiteralLoose(["\n export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n // core-js@3\n if (Reflect.construct.sham) return false;\n\n // Proxy can't be polyfilled. Every browser implemented\n // proxies before or at the same time as Reflect.construct,\n // so if they support Proxy they also support Reflect.construct.\n if (typeof Proxy === \"function\") return true;\n\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n"])));
  40528. helpers$1.construct = helper$2("7.0.0-beta.0")(_templateObject20 || (_templateObject20 = _taggedTemplateLiteralLoose(["\n import setPrototypeOf from \"setPrototypeOf\";\n import isNativeReflectConstruct from \"isNativeReflectConstruct\";\n\n export default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n // NOTE: If Parent !== Class, the correct __proto__ is set *after*\n // calling the constructor.\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n // Avoid issues with Class being present but undefined when it wasn't\n // present in the original call.\n return _construct.apply(null, arguments);\n }\n"])));
  40529. helpers$1.isNativeFunction = helper$2("7.0.0-beta.0")(_templateObject21 || (_templateObject21 = _taggedTemplateLiteralLoose(["\n export default function _isNativeFunction(fn) {\n // Note: This function returns \"true\" for core-js functions.\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n }\n"])));
  40530. helpers$1.wrapNativeSuper = helper$2("7.0.0-beta.0")(_templateObject22 || (_templateObject22 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n import setPrototypeOf from \"setPrototypeOf\";\n import isNativeFunction from \"isNativeFunction\";\n import construct from \"construct\";\n\n export default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor)\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n }\n });\n\n return setPrototypeOf(Wrapper, Class);\n }\n\n return _wrapNativeSuper(Class)\n }\n"])));
  40531. helpers$1["instanceof"] = helper$2("7.0.0-beta.0")(_templateObject23 || (_templateObject23 = _taggedTemplateLiteralLoose(["\n export default function _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n }\n"])));
  40532. helpers$1.interopRequireDefault = helper$2("7.0.0-beta.0")(_templateObject24 || (_templateObject24 = _taggedTemplateLiteralLoose(["\n export default function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n"])));
  40533. helpers$1.interopRequireWildcard = helper$2("7.14.0")(_templateObject25 || (_templateObject25 = _taggedTemplateLiteralLoose(["\n function _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function (nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n }\n\n export default function _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || (typeof obj !== \"object\" && typeof obj !== \"function\")) {\n return { default: obj }\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n }\n"])));
  40534. helpers$1.newArrowCheck = helper$2("7.0.0-beta.0")(_templateObject26 || (_templateObject26 = _taggedTemplateLiteralLoose(["\n export default function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n }\n"])));
  40535. helpers$1.objectDestructuringEmpty = helper$2("7.0.0-beta.0")(_templateObject27 || (_templateObject27 = _taggedTemplateLiteralLoose(["\n export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n }\n"])));
  40536. helpers$1.objectWithoutPropertiesLoose = helper$2("7.0.0-beta.0")(_templateObject28 || (_templateObject28 = _taggedTemplateLiteralLoose(["\n export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n"])));
  40537. helpers$1.objectWithoutProperties = helper$2("7.0.0-beta.0")(_templateObject29 || (_templateObject29 = _taggedTemplateLiteralLoose(["\n import objectWithoutPropertiesLoose from \"objectWithoutPropertiesLoose\";\n\n export default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n"])));
  40538. helpers$1.assertThisInitialized = helper$2("7.0.0-beta.0")(_templateObject30 || (_templateObject30 = _taggedTemplateLiteralLoose(["\n export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n"])));
  40539. helpers$1.possibleConstructorReturn = helper$2("7.0.0-beta.0")(_templateObject31 || (_templateObject31 = _taggedTemplateLiteralLoose(["\n import assertThisInitialized from \"assertThisInitialized\";\n\n export default function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return assertThisInitialized(self);\n }\n"])));
  40540. helpers$1.createSuper = helper$2("7.9.0")(_templateObject32 || (_templateObject32 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n import isNativeReflectConstruct from \"isNativeReflectConstruct\";\n import possibleConstructorReturn from \"possibleConstructorReturn\";\n\n export default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived), result;\n if (hasNativeReflectConstruct) {\n // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n }\n }\n "])));
  40541. helpers$1.superPropBase = helper$2("7.0.0-beta.0")(_templateObject33 || (_templateObject33 = _taggedTemplateLiteralLoose(["\n import getPrototypeOf from \"getPrototypeOf\";\n\n export default function _superPropBase(object, property) {\n // Yes, this throws if object is null to being with, that's on purpose.\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n }\n"])));
  40542. helpers$1.get = helper$2("7.0.0-beta.0")(_templateObject34 || (_templateObject34 = _taggedTemplateLiteralLoose(["\n import superPropBase from \"superPropBase\";\n\n export default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n\n if (!base) return;\n\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n return _get(target, property, receiver || target);\n }\n"])));
  40543. helpers$1.set = helper$2("7.0.0-beta.0")(_templateObject35 || (_templateObject35 = _taggedTemplateLiteralLoose(["\n import superPropBase from \"superPropBase\";\n import defineProperty from \"defineProperty\";\n\n function set(target, property, value, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = superPropBase(target, property);\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n // Both getter and non-writable fall into this.\n return false;\n }\n }\n\n // Without a super that defines the property, spec boils down to\n // \"define on receiver\" for some reason.\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n if (desc) {\n if (!desc.writable) {\n // Setter, getter, and non-writable fall into this.\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n // Avoid setters that may be defined on Sub's prototype, but not on\n // the instance.\n defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n }\n\n export default function _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n }\n"])));
  40544. helpers$1.taggedTemplateLiteral = helper$2("7.0.0-beta.0")(_templateObject36 || (_templateObject36 = _taggedTemplateLiteralLoose(["\n export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) { raw = strings.slice(0); }\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n }\n"])));
  40545. helpers$1.taggedTemplateLiteralLoose = helper$2("7.0.0-beta.0")(_templateObject37 || (_templateObject37 = _taggedTemplateLiteralLoose(["\n export default function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) { raw = strings.slice(0); }\n strings.raw = raw;\n return strings;\n }\n"])));
  40546. helpers$1.readOnlyError = helper$2("7.0.0-beta.0")(_templateObject38 || (_templateObject38 = _taggedTemplateLiteralLoose(["\n export default function _readOnlyError(name) {\n throw new TypeError(\"\\\"\" + name + \"\\\" is read-only\");\n }\n"], ["\n export default function _readOnlyError(name) {\n throw new TypeError(\"\\\\\"\" + name + \"\\\\\" is read-only\");\n }\n"])));
  40547. helpers$1.writeOnlyError = helper$2("7.12.13")(_templateObject39 || (_templateObject39 = _taggedTemplateLiteralLoose(["\n export default function _writeOnlyError(name) {\n throw new TypeError(\"\\\"\" + name + \"\\\" is write-only\");\n }\n"], ["\n export default function _writeOnlyError(name) {\n throw new TypeError(\"\\\\\"\" + name + \"\\\\\" is write-only\");\n }\n"])));
  40548. helpers$1.classNameTDZError = helper$2("7.0.0-beta.0")(_templateObject40 || (_templateObject40 = _taggedTemplateLiteralLoose(["\n export default function _classNameTDZError(name) {\n throw new Error(\"Class \\\"\" + name + \"\\\" cannot be referenced in computed property keys.\");\n }\n"], ["\n export default function _classNameTDZError(name) {\n throw new Error(\"Class \\\\\"\" + name + \"\\\\\" cannot be referenced in computed property keys.\");\n }\n"])));
  40549. helpers$1.temporalUndefined = helper$2("7.0.0-beta.0")(_templateObject41 || (_templateObject41 = _taggedTemplateLiteralLoose(["\n // This function isn't mean to be called, but to be used as a reference.\n // We can't use a normal object because it isn't hoisted.\n export default function _temporalUndefined() {}\n"])));
  40550. helpers$1.tdz = helper$2("7.5.5")(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n export default function _tdzError(name) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n }\n"])));
  40551. helpers$1.temporalRef = helper$2("7.0.0-beta.0")(_templateObject43 || (_templateObject43 = _taggedTemplateLiteralLoose(["\n import undef from \"temporalUndefined\";\n import err from \"tdz\";\n\n export default function _temporalRef(val, name) {\n return val === undef ? err(name) : val;\n }\n"])));
  40552. helpers$1.slicedToArray = helper$2("7.0.0-beta.0")(_templateObject44 || (_templateObject44 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimit from \"iterableToArrayLimit\";\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArray(arr, i) {\n return (\n arrayWithHoles(arr) ||\n iterableToArrayLimit(arr, i) ||\n unsupportedIterableToArray(arr, i) ||\n nonIterableRest()\n );\n }\n"])));
  40553. helpers$1.slicedToArrayLoose = helper$2("7.0.0-beta.0")(_templateObject45 || (_templateObject45 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArrayLimitLoose from \"iterableToArrayLimitLoose\";\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _slicedToArrayLoose(arr, i) {\n return (\n arrayWithHoles(arr) ||\n iterableToArrayLimitLoose(arr, i) ||\n unsupportedIterableToArray(arr, i) ||\n nonIterableRest()\n );\n }\n"])));
  40554. helpers$1.toArray = helper$2("7.0.0-beta.0")(_templateObject46 || (_templateObject46 = _taggedTemplateLiteralLoose(["\n import arrayWithHoles from \"arrayWithHoles\";\n import iterableToArray from \"iterableToArray\";\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n import nonIterableRest from \"nonIterableRest\";\n\n export default function _toArray(arr) {\n return (\n arrayWithHoles(arr) ||\n iterableToArray(arr) ||\n unsupportedIterableToArray(arr) ||\n nonIterableRest()\n );\n }\n"])));
  40555. helpers$1.toConsumableArray = helper$2("7.0.0-beta.0")(_templateObject47 || (_templateObject47 = _taggedTemplateLiteralLoose(["\n import arrayWithoutHoles from \"arrayWithoutHoles\";\n import iterableToArray from \"iterableToArray\";\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n import nonIterableSpread from \"nonIterableSpread\";\n\n export default function _toConsumableArray(arr) {\n return (\n arrayWithoutHoles(arr) ||\n iterableToArray(arr) ||\n unsupportedIterableToArray(arr) ||\n nonIterableSpread()\n );\n }\n"])));
  40556. helpers$1.arrayWithoutHoles = helper$2("7.0.0-beta.0")(_templateObject48 || (_templateObject48 = _taggedTemplateLiteralLoose(["\n import arrayLikeToArray from \"arrayLikeToArray\";\n\n export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n }\n"])));
  40557. helpers$1.arrayWithHoles = helper$2("7.0.0-beta.0")(_templateObject49 || (_templateObject49 = _taggedTemplateLiteralLoose(["\n export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n"])));
  40558. helpers$1.maybeArrayLike = helper$2("7.9.0")(_templateObject50 || (_templateObject50 = _taggedTemplateLiteralLoose(["\n import arrayLikeToArray from \"arrayLikeToArray\";\n\n export default function _maybeArrayLike(next, arr, i) {\n if (arr && !Array.isArray(arr) && typeof arr.length === \"number\") {\n var len = arr.length;\n return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);\n }\n return next(arr, i);\n }\n"])));
  40559. helpers$1.iterableToArray = helper$2("7.0.0-beta.0")(_templateObject51 || (_templateObject51 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n"])));
  40560. helpers$1.iterableToArrayLimit = helper$2("7.0.0-beta.0")(_templateObject52 || (_templateObject52 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArrayLimit(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliance is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _i = arr == null ? null : (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n if (_i == null) return;\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n"], ["\n export default function _iterableToArrayLimit(arr, i) {\n // this is an expanded form of \\`for...of\\` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliance is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _i = arr == null ? null : (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n if (_i == null) return;\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _s, _e;\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n"])));
  40561. helpers$1.iterableToArrayLimitLoose = helper$2("7.0.0-beta.0")(_templateObject53 || (_templateObject53 = _taggedTemplateLiteralLoose(["\n export default function _iterableToArrayLimitLoose(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n if (_i == null) return;\n\n var _arr = [];\n for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n }\n"])));
  40562. helpers$1.unsupportedIterableToArray = helper$2("7.9.0")(_templateObject54 || (_templateObject54 = _taggedTemplateLiteralLoose(["\n import arrayLikeToArray from \"arrayLikeToArray\";\n\n export default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))\n return arrayLikeToArray(o, minLen);\n }\n"])));
  40563. helpers$1.arrayLikeToArray = helper$2("7.9.0")(_templateObject55 || (_templateObject55 = _taggedTemplateLiteralLoose(["\n export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n }\n"])));
  40564. helpers$1.nonIterableSpread = helper$2("7.0.0-beta.0")(_templateObject56 || (_templateObject56 = _taggedTemplateLiteralLoose(["\n export default function _nonIterableSpread() {\n throw new TypeError(\n \"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n );\n }\n"], ["\n export default function _nonIterableSpread() {\n throw new TypeError(\n \"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n );\n }\n"])));
  40565. helpers$1.nonIterableRest = helper$2("7.0.0-beta.0")(_templateObject57 || (_templateObject57 = _taggedTemplateLiteralLoose(["\n export default function _nonIterableRest() {\n throw new TypeError(\n \"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n );\n }\n"], ["\n export default function _nonIterableRest() {\n throw new TypeError(\n \"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"\n );\n }\n"])));
  40566. helpers$1.createForOfIteratorHelper = helper$2("7.9.0")(_templateObject58 || (_templateObject58 = _taggedTemplateLiteralLoose(["\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n // s: start (create the iterator)\n // n: next\n // e: error (called whenever something throws)\n // f: finish (always called at the end)\n\n export default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n // Fallback for engines without symbol support\n if (\n Array.isArray(o) ||\n (it = unsupportedIterableToArray(o)) ||\n (allowArrayLike && o && typeof o.length === \"number\")\n ) {\n if (it) o = it;\n var i = 0;\n var F = function(){};\n return {\n s: F,\n n: function() {\n if (i >= o.length) return { done: true };\n return { done: false, value: o[i++] };\n },\n e: function(e) { throw e; },\n f: F,\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true, didErr = false, err;\n\n return {\n s: function() {\n it = it.call(o);\n },\n n: function() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function(e) {\n didErr = true;\n err = e;\n },\n f: function() {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n }\n"], ["\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n // s: start (create the iterator)\n // n: next\n // e: error (called whenever something throws)\n // f: finish (always called at the end)\n\n export default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (!it) {\n // Fallback for engines without symbol support\n if (\n Array.isArray(o) ||\n (it = unsupportedIterableToArray(o)) ||\n (allowArrayLike && o && typeof o.length === \"number\")\n ) {\n if (it) o = it;\n var i = 0;\n var F = function(){};\n return {\n s: F,\n n: function() {\n if (i >= o.length) return { done: true };\n return { done: false, value: o[i++] };\n },\n e: function(e) { throw e; },\n f: F,\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true, didErr = false, err;\n\n return {\n s: function() {\n it = it.call(o);\n },\n n: function() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function(e) {\n didErr = true;\n err = e;\n },\n f: function() {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n }\n"])));
  40567. helpers$1.createForOfIteratorHelperLoose = helper$2("7.9.0")(_templateObject59 || (_templateObject59 = _taggedTemplateLiteralLoose(["\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (it) return (it = it.call(o)).next.bind(it);\n\n // Fallback for engines without symbol support\n if (\n Array.isArray(o) ||\n (it = unsupportedIterableToArray(o)) ||\n (allowArrayLike && o && typeof o.length === \"number\")\n ) {\n if (it) o = it;\n var i = 0;\n return function() {\n if (i >= o.length) return { done: true };\n return { done: false, value: o[i++] };\n }\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n"], ["\n import unsupportedIterableToArray from \"unsupportedIterableToArray\";\n\n export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\n if (it) return (it = it.call(o)).next.bind(it);\n\n // Fallback for engines without symbol support\n if (\n Array.isArray(o) ||\n (it = unsupportedIterableToArray(o)) ||\n (allowArrayLike && o && typeof o.length === \"number\")\n ) {\n if (it) o = it;\n var i = 0;\n return function() {\n if (i >= o.length) return { done: true };\n return { done: false, value: o[i++] };\n }\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n"])));
  40568. helpers$1.skipFirstGeneratorNext = helper$2("7.0.0-beta.0")(_templateObject60 || (_templateObject60 = _taggedTemplateLiteralLoose(["\n export default function _skipFirstGeneratorNext(fn) {\n return function () {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n }\n }\n"])));
  40569. helpers$1.toPrimitive = helper$2("7.1.5")(_templateObject61 || (_templateObject61 = _taggedTemplateLiteralLoose(["\n export default function _toPrimitive(\n input,\n hint /*: \"default\" | \"string\" | \"number\" | void */\n ) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n }\n"])));
  40570. helpers$1.toPropertyKey = helper$2("7.1.5")(_templateObject62 || (_templateObject62 = _taggedTemplateLiteralLoose(["\n import toPrimitive from \"toPrimitive\";\n\n export default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n }\n"])));
  40571. helpers$1.initializerWarningHelper = helper$2("7.0.0-beta.0")(_templateObject63 || (_templateObject63 = _taggedTemplateLiteralLoose(["\n export default function _initializerWarningHelper(descriptor, context){\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'proposal-class-properties is enabled and runs after the decorators transform.'\n );\n }\n"])));
  40572. helpers$1.initializerDefineProperty = helper$2("7.0.0-beta.0")(_templateObject64 || (_templateObject64 = _taggedTemplateLiteralLoose(["\n export default function _initializerDefineProperty(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n"])));
  40573. helpers$1.applyDecoratedDescriptor = helper$2("7.0.0-beta.0")(_templateObject65 || (_templateObject65 = _taggedTemplateLiteralLoose(["\n export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){\n var desc = {};\n Object.keys(descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n"])));
  40574. helpers$1.classPrivateFieldLooseKey = helper$2("7.0.0-beta.0")(_templateObject66 || (_templateObject66 = _taggedTemplateLiteralLoose(["\n var id = 0;\n export default function _classPrivateFieldKey(name) {\n return \"__private_\" + (id++) + \"_\" + name;\n }\n"])));
  40575. helpers$1.classPrivateFieldLooseBase = helper$2("7.0.0-beta.0")(_templateObject67 || (_templateObject67 = _taggedTemplateLiteralLoose(["\n export default function _classPrivateFieldBase(receiver, privateKey) {\n if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {\n throw new TypeError(\"attempted to use private field on non-instance\");\n }\n return receiver;\n }\n"])));
  40576. helpers$1.classPrivateFieldGet = helper$2("7.0.0-beta.0")(_templateObject68 || (_templateObject68 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorGet from \"classApplyDescriptorGet\";\n import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n export default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n }\n"])));
  40577. helpers$1.classPrivateFieldSet = helper$2("7.0.0-beta.0")(_templateObject69 || (_templateObject69 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorSet from \"classApplyDescriptorSet\";\n import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n export default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n }\n"])));
  40578. helpers$1.classPrivateFieldDestructureSet = helper$2("7.4.4")(_templateObject70 || (_templateObject70 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorDestructureSet from \"classApplyDescriptorDestructureSet\";\n import classExtractFieldDescriptor from \"classExtractFieldDescriptor\";\n export default function _classPrivateFieldDestructureSet(receiver, privateMap) {\n var descriptor = classExtractFieldDescriptor(receiver, privateMap, \"set\");\n return classApplyDescriptorDestructureSet(receiver, descriptor);\n }\n"])));
  40579. helpers$1.classExtractFieldDescriptor = helper$2("7.13.10")(_templateObject71 || (_templateObject71 = _taggedTemplateLiteralLoose(["\n export default function _classExtractFieldDescriptor(receiver, privateMap, action) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to \" + action + \" private field on non-instance\");\n }\n return privateMap.get(receiver);\n }\n"])));
  40580. helpers$1.classStaticPrivateFieldSpecGet = helper$2("7.0.2")(_templateObject72 || (_templateObject72 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorGet from \"classApplyDescriptorGet\";\n import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {\n classCheckPrivateStaticAccess(receiver, classConstructor);\n classCheckPrivateStaticFieldDescriptor(descriptor, \"get\");\n return classApplyDescriptorGet(receiver, descriptor);\n }\n"])));
  40581. helpers$1.classStaticPrivateFieldSpecSet = helper$2("7.0.2")(_templateObject73 || (_templateObject73 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorSet from \"classApplyDescriptorSet\";\n import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {\n classCheckPrivateStaticAccess(receiver, classConstructor);\n classCheckPrivateStaticFieldDescriptor(descriptor, \"set\");\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n }\n"])));
  40582. helpers$1.classStaticPrivateMethodGet = helper$2("7.3.2")(_templateObject74 || (_templateObject74 = _taggedTemplateLiteralLoose(["\n import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {\n classCheckPrivateStaticAccess(receiver, classConstructor);\n return method;\n }\n"])));
  40583. helpers$1.classStaticPrivateMethodSet = helper$2("7.3.2")(_templateObject75 || (_templateObject75 = _taggedTemplateLiteralLoose(["\n export default function _classStaticPrivateMethodSet() {\n throw new TypeError(\"attempted to set read only static private field\");\n }\n"])));
  40584. helpers$1.classApplyDescriptorGet = helper$2("7.13.10")(_templateObject76 || (_templateObject76 = _taggedTemplateLiteralLoose(["\n export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n }\n"])));
  40585. helpers$1.classApplyDescriptorSet = helper$2("7.13.10")(_templateObject77 || (_templateObject77 = _taggedTemplateLiteralLoose(["\n export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n }\n"])));
  40586. helpers$1.classApplyDescriptorDestructureSet = helper$2("7.13.10")(_templateObject78 || (_templateObject78 = _taggedTemplateLiteralLoose(["\n export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {\n if (descriptor.set) {\n if (!(\"__destrObj\" in descriptor)) {\n descriptor.__destrObj = {\n set value(v) {\n descriptor.set.call(receiver, v)\n },\n };\n }\n return descriptor.__destrObj;\n } else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n return descriptor;\n }\n }\n"])));
  40587. helpers$1.classStaticPrivateFieldDestructureSet = helper$2("7.13.10")(_templateObject79 || (_templateObject79 = _taggedTemplateLiteralLoose(["\n import classApplyDescriptorDestructureSet from \"classApplyDescriptorDestructureSet\";\n import classCheckPrivateStaticAccess from \"classCheckPrivateStaticAccess\";\n import classCheckPrivateStaticFieldDescriptor from \"classCheckPrivateStaticFieldDescriptor\";\n export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {\n classCheckPrivateStaticAccess(receiver, classConstructor);\n classCheckPrivateStaticFieldDescriptor(descriptor, \"set\");\n return classApplyDescriptorDestructureSet(receiver, descriptor);\n }\n"])));
  40588. helpers$1.classCheckPrivateStaticAccess = helper$2("7.13.10")(_templateObject80 || (_templateObject80 = _taggedTemplateLiteralLoose(["\n export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {\n if (receiver !== classConstructor) {\n throw new TypeError(\"Private static access of wrong provenance\");\n }\n }\n"])));
  40589. helpers$1.classCheckPrivateStaticFieldDescriptor = helper$2("7.13.10")(_templateObject81 || (_templateObject81 = _taggedTemplateLiteralLoose(["\n export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {\n if (descriptor === undefined) {\n throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\");\n }\n }\n"])));
  40590. helpers$1.decorate = helper$2("7.1.5")(_templateObject82 || (_templateObject82 = _taggedTemplateLiteralLoose(["\n import toArray from \"toArray\";\n import toPropertyKey from \"toPropertyKey\";\n\n // These comments are stripped by @babel/template\n /*::\n type PropertyDescriptor =\n | {\n value: any,\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n }\n | {\n get?: () => any,\n set?: (v: any) => void,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type FieldDescriptor ={\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type Placement = \"static\" | \"prototype\" | \"own\";\n type Key = string | symbol; // PrivateName is not supported yet.\n\n type ElementDescriptor =\n | {\n kind: \"method\",\n key: Key,\n placement: Placement,\n descriptor: PropertyDescriptor\n }\n | {\n kind: \"field\",\n key: Key,\n placement: Placement,\n descriptor: FieldDescriptor,\n initializer?: () => any,\n };\n\n // This is exposed to the user code\n type ElementObjectInput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n };\n\n // This is exposed to the user code\n type ElementObjectOutput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n extras?: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n // This is exposed to the user code\n type ClassObject = {\n [@@toStringTag]?: \"Descriptor\",\n kind: \"class\",\n elements: ElementDescriptor[],\n };\n\n type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;\n type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;\n type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;\n\n // Only used by Babel in the transform output, not part of the spec.\n type ElementDefinition =\n | {\n kind: \"method\",\n value: any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n }\n | {\n kind: \"field\",\n value: () => any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n };\n\n declare function ClassFactory<C>(initialize: (instance: C) => void): {\n F: Class<C>,\n d: ElementDefinition[]\n }\n\n */\n\n /*::\n // Various combinations with/without extras and with one or many finishers\n\n type ElementFinisherExtras = {\n element: ElementDescriptor,\n finisher?: ClassFinisher,\n extras?: ElementDescriptor[],\n };\n\n type ElementFinishersExtras = {\n element: ElementDescriptor,\n finishers: ClassFinisher[],\n extras: ElementDescriptor[],\n };\n\n type ElementsFinisher = {\n elements: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n type ElementsFinishers = {\n elements: ElementDescriptor[],\n finishers: ClassFinisher[],\n };\n\n */\n\n /*::\n\n type Placements = {\n static: Key[],\n prototype: Key[],\n own: Key[],\n };\n\n */\n\n // ClassDefinitionEvaluation (Steps 26-*)\n export default function _decorate(\n decorators /*: ClassDecorator[] */,\n factory /*: ClassFactory */,\n superClass /*: ?Class<*> */,\n mixins /*: ?Array<Function> */,\n ) /*: Class<*> */ {\n var api = _getDecoratorsApi();\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n api = mixins[i](api);\n }\n }\n\n var r = factory(function initialize(O) {\n api.initializeInstanceElements(O, decorated.elements);\n }, superClass);\n var decorated = api.decorateClass(\n _coalesceClassElements(r.d.map(_createElementDescriptor)),\n decorators,\n );\n\n api.initializeClassElements(r.F, decorated.elements);\n\n return api.runClassFinishers(r.F, decorated.finishers);\n }\n\n function _getDecoratorsApi() {\n _getDecoratorsApi = function() {\n return api;\n };\n\n var api = {\n elementsDefinitionOrder: [[\"method\"], [\"field\"]],\n\n // InitializeInstanceElements\n initializeInstanceElements: function(\n /*::<C>*/ O /*: C */,\n elements /*: ElementDescriptor[] */,\n ) {\n [\"method\", \"field\"].forEach(function(kind) {\n elements.forEach(function(element /*: ElementDescriptor */) {\n if (element.kind === kind && element.placement === \"own\") {\n this.defineClassElement(O, element);\n }\n }, this);\n }, this);\n },\n\n // InitializeClassElements\n initializeClassElements: function(\n /*::<C>*/ F /*: Class<C> */,\n elements /*: ElementDescriptor[] */,\n ) {\n var proto = F.prototype;\n\n [\"method\", \"field\"].forEach(function(kind) {\n elements.forEach(function(element /*: ElementDescriptor */) {\n var placement = element.placement;\n if (\n element.kind === kind &&\n (placement === \"static\" || placement === \"prototype\")\n ) {\n var receiver = placement === \"static\" ? F : proto;\n this.defineClassElement(receiver, element);\n }\n }, this);\n }, this);\n },\n\n // DefineClassElement\n defineClassElement: function(\n /*::<C>*/ receiver /*: C | Class<C> */,\n element /*: ElementDescriptor */,\n ) {\n var descriptor /*: PropertyDescriptor */ = element.descriptor;\n if (element.kind === \"field\") {\n var initializer = element.initializer;\n descriptor = {\n enumerable: descriptor.enumerable,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n value: initializer === void 0 ? void 0 : initializer.call(receiver),\n };\n }\n Object.defineProperty(receiver, element.key, descriptor);\n },\n\n // DecorateClass\n decorateClass: function(\n elements /*: ElementDescriptor[] */,\n decorators /*: ClassDecorator[] */,\n ) /*: ElementsFinishers */ {\n var newElements /*: ElementDescriptor[] */ = [];\n var finishers /*: ClassFinisher[] */ = [];\n var placements /*: Placements */ = {\n static: [],\n prototype: [],\n own: [],\n };\n\n elements.forEach(function(element /*: ElementDescriptor */) {\n this.addElementPlacement(element, placements);\n }, this);\n\n elements.forEach(function(element /*: ElementDescriptor */) {\n if (!_hasDecorators(element)) return newElements.push(element);\n\n var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(\n element,\n placements,\n );\n newElements.push(elementFinishersExtras.element);\n newElements.push.apply(newElements, elementFinishersExtras.extras);\n finishers.push.apply(finishers, elementFinishersExtras.finishers);\n }, this);\n\n if (!decorators) {\n return { elements: newElements, finishers: finishers };\n }\n\n var result /*: ElementsFinishers */ = this.decorateConstructor(\n newElements,\n decorators,\n );\n finishers.push.apply(finishers, result.finishers);\n result.finishers = finishers;\n\n return result;\n },\n\n // AddElementPlacement\n addElementPlacement: function(\n element /*: ElementDescriptor */,\n placements /*: Placements */,\n silent /*: boolean */,\n ) {\n var keys = placements[element.placement];\n if (!silent && keys.indexOf(element.key) !== -1) {\n throw new TypeError(\"Duplicated element (\" + element.key + \")\");\n }\n keys.push(element.key);\n },\n\n // DecorateElement\n decorateElement: function(\n element /*: ElementDescriptor */,\n placements /*: Placements */,\n ) /*: ElementFinishersExtras */ {\n var extras /*: ElementDescriptor[] */ = [];\n var finishers /*: ClassFinisher[] */ = [];\n\n for (\n var decorators = element.decorators, i = decorators.length - 1;\n i >= 0;\n i--\n ) {\n // (inlined) RemoveElementPlacement\n var keys = placements[element.placement];\n keys.splice(keys.indexOf(element.key), 1);\n\n var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(\n element,\n );\n var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(\n (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||\n elementObject,\n );\n\n element = elementFinisherExtras.element;\n this.addElementPlacement(element, placements);\n\n if (elementFinisherExtras.finisher) {\n finishers.push(elementFinisherExtras.finisher);\n }\n\n var newExtras /*: ElementDescriptor[] | void */ =\n elementFinisherExtras.extras;\n if (newExtras) {\n for (var j = 0; j < newExtras.length; j++) {\n this.addElementPlacement(newExtras[j], placements);\n }\n extras.push.apply(extras, newExtras);\n }\n }\n\n return { element: element, finishers: finishers, extras: extras };\n },\n\n // DecorateConstructor\n decorateConstructor: function(\n elements /*: ElementDescriptor[] */,\n decorators /*: ClassDecorator[] */,\n ) /*: ElementsFinishers */ {\n var finishers /*: ClassFinisher[] */ = [];\n\n for (var i = decorators.length - 1; i >= 0; i--) {\n var obj /*: ClassObject */ = this.fromClassDescriptor(elements);\n var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(\n (0, decorators[i])(obj) /*: ClassObject */ || obj,\n );\n\n if (elementsAndFinisher.finisher !== undefined) {\n finishers.push(elementsAndFinisher.finisher);\n }\n\n if (elementsAndFinisher.elements !== undefined) {\n elements = elementsAndFinisher.elements;\n\n for (var j = 0; j < elements.length - 1; j++) {\n for (var k = j + 1; k < elements.length; k++) {\n if (\n elements[j].key === elements[k].key &&\n elements[j].placement === elements[k].placement\n ) {\n throw new TypeError(\n \"Duplicated element (\" + elements[j].key + \")\",\n );\n }\n }\n }\n }\n }\n\n return { elements: elements, finishers: finishers };\n },\n\n // FromElementDescriptor\n fromElementDescriptor: function(\n element /*: ElementDescriptor */,\n ) /*: ElementObject */ {\n var obj /*: ElementObject */ = {\n kind: element.kind,\n key: element.key,\n placement: element.placement,\n descriptor: element.descriptor,\n };\n\n var desc = {\n value: \"Descriptor\",\n configurable: true,\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n if (element.kind === \"field\") obj.initializer = element.initializer;\n\n return obj;\n },\n\n // ToElementDescriptors\n toElementDescriptors: function(\n elementObjects /*: ElementObject[] */,\n ) /*: ElementDescriptor[] */ {\n if (elementObjects === undefined) return;\n return toArray(elementObjects).map(function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n this.disallowProperty(elementObject, \"finisher\", \"An element descriptor\");\n this.disallowProperty(elementObject, \"extras\", \"An element descriptor\");\n return element;\n }, this);\n },\n\n // ToElementDescriptor\n toElementDescriptor: function(\n elementObject /*: ElementObject */,\n ) /*: ElementDescriptor */ {\n var kind = String(elementObject.kind);\n if (kind !== \"method\" && kind !== \"field\") {\n throw new TypeError(\n 'An element descriptor\\'s .kind property must be either \"method\" or' +\n ' \"field\", but a decorator created an element descriptor with' +\n ' .kind \"' +\n kind +\n '\"',\n );\n }\n\n var key = toPropertyKey(elementObject.key);\n\n var placement = String(elementObject.placement);\n if (\n placement !== \"static\" &&\n placement !== \"prototype\" &&\n placement !== \"own\"\n ) {\n throw new TypeError(\n 'An element descriptor\\'s .placement property must be one of \"static\",' +\n ' \"prototype\" or \"own\", but a decorator created an element descriptor' +\n ' with .placement \"' +\n placement +\n '\"',\n );\n }\n\n var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;\n\n this.disallowProperty(elementObject, \"elements\", \"An element descriptor\");\n\n var element /*: ElementDescriptor */ = {\n kind: kind,\n key: key,\n placement: placement,\n descriptor: Object.assign({}, descriptor),\n };\n\n if (kind !== \"field\") {\n this.disallowProperty(elementObject, \"initializer\", \"A method descriptor\");\n } else {\n this.disallowProperty(\n descriptor,\n \"get\",\n \"The property descriptor of a field descriptor\",\n );\n this.disallowProperty(\n descriptor,\n \"set\",\n \"The property descriptor of a field descriptor\",\n );\n this.disallowProperty(\n descriptor,\n \"value\",\n \"The property descriptor of a field descriptor\",\n );\n\n element.initializer = elementObject.initializer;\n }\n\n return element;\n },\n\n toElementFinisherExtras: function(\n elementObject /*: ElementObject */,\n ) /*: ElementFinisherExtras */ {\n var element /*: ElementDescriptor */ = this.toElementDescriptor(\n elementObject,\n );\n var finisher /*: ClassFinisher */ = _optionalCallableProperty(\n elementObject,\n \"finisher\",\n );\n var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(\n elementObject.extras,\n );\n\n return { element: element, finisher: finisher, extras: extras };\n },\n\n // FromClassDescriptor\n fromClassDescriptor: function(\n elements /*: ElementDescriptor[] */,\n ) /*: ClassObject */ {\n var obj = {\n kind: \"class\",\n elements: elements.map(this.fromElementDescriptor, this),\n };\n\n var desc = { value: \"Descriptor\", configurable: true };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n return obj;\n },\n\n // ToClassDescriptor\n toClassDescriptor: function(\n obj /*: ClassObject */,\n ) /*: ElementsFinisher */ {\n var kind = String(obj.kind);\n if (kind !== \"class\") {\n throw new TypeError(\n 'A class descriptor\\'s .kind property must be \"class\", but a decorator' +\n ' created a class descriptor with .kind \"' +\n kind +\n '\"',\n );\n }\n\n this.disallowProperty(obj, \"key\", \"A class descriptor\");\n this.disallowProperty(obj, \"placement\", \"A class descriptor\");\n this.disallowProperty(obj, \"descriptor\", \"A class descriptor\");\n this.disallowProperty(obj, \"initializer\", \"A class descriptor\");\n this.disallowProperty(obj, \"extras\", \"A class descriptor\");\n\n var finisher = _optionalCallableProperty(obj, \"finisher\");\n var elements = this.toElementDescriptors(obj.elements);\n\n return { elements: elements, finisher: finisher };\n },\n\n // RunClassFinishers\n runClassFinishers: function(\n constructor /*: Class<*> */,\n finishers /*: ClassFinisher[] */,\n ) /*: Class<*> */ {\n for (var i = 0; i < finishers.length; i++) {\n var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);\n if (newConstructor !== undefined) {\n // NOTE: This should check if IsConstructor(newConstructor) is false.\n if (typeof newConstructor !== \"function\") {\n throw new TypeError(\"Finishers must return a constructor.\");\n }\n constructor = newConstructor;\n }\n }\n return constructor;\n },\n\n disallowProperty: function(obj, name, objectType) {\n if (obj[name] !== undefined) {\n throw new TypeError(objectType + \" can't have a .\" + name + \" property.\");\n }\n }\n };\n\n return api;\n }\n\n // ClassElementEvaluation\n function _createElementDescriptor(\n def /*: ElementDefinition */,\n ) /*: ElementDescriptor */ {\n var key = toPropertyKey(def.key);\n\n var descriptor /*: PropertyDescriptor */;\n if (def.kind === \"method\") {\n descriptor = {\n value: def.value,\n writable: true,\n configurable: true,\n enumerable: false,\n };\n } else if (def.kind === \"get\") {\n descriptor = { get: def.value, configurable: true, enumerable: false };\n } else if (def.kind === \"set\") {\n descriptor = { set: def.value, configurable: true, enumerable: false };\n } else if (def.kind === \"field\") {\n descriptor = { configurable: true, writable: true, enumerable: true };\n }\n\n var element /*: ElementDescriptor */ = {\n kind: def.kind === \"field\" ? \"field\" : \"method\",\n key: key,\n placement: def.static\n ? \"static\"\n : def.kind === \"field\"\n ? \"own\"\n : \"prototype\",\n descriptor: descriptor,\n };\n if (def.decorators) element.decorators = def.decorators;\n if (def.kind === \"field\") element.initializer = def.value;\n\n return element;\n }\n\n // CoalesceGetterSetter\n function _coalesceGetterSetter(\n element /*: ElementDescriptor */,\n other /*: ElementDescriptor */,\n ) {\n if (element.descriptor.get !== undefined) {\n other.descriptor.get = element.descriptor.get;\n } else {\n other.descriptor.set = element.descriptor.set;\n }\n }\n\n // CoalesceClassElements\n function _coalesceClassElements(\n elements /*: ElementDescriptor[] */,\n ) /*: ElementDescriptor[] */ {\n var newElements /*: ElementDescriptor[] */ = [];\n\n var isSameElement = function(\n other /*: ElementDescriptor */,\n ) /*: boolean */ {\n return (\n other.kind === \"method\" &&\n other.key === element.key &&\n other.placement === element.placement\n );\n };\n\n for (var i = 0; i < elements.length; i++) {\n var element /*: ElementDescriptor */ = elements[i];\n var other /*: ElementDescriptor */;\n\n if (\n element.kind === \"method\" &&\n (other = newElements.find(isSameElement))\n ) {\n if (\n _isDataDescriptor(element.descriptor) ||\n _isDataDescriptor(other.descriptor)\n ) {\n if (_hasDecorators(element) || _hasDecorators(other)) {\n throw new ReferenceError(\n \"Duplicated methods (\" + element.key + \") can't be decorated.\",\n );\n }\n other.descriptor = element.descriptor;\n } else {\n if (_hasDecorators(element)) {\n if (_hasDecorators(other)) {\n throw new ReferenceError(\n \"Decorators can't be placed on different accessors with for \" +\n \"the same property (\" +\n element.key +\n \").\",\n );\n }\n other.decorators = element.decorators;\n }\n _coalesceGetterSetter(element, other);\n }\n } else {\n newElements.push(element);\n }\n }\n\n return newElements;\n }\n\n function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {\n return element.decorators && element.decorators.length;\n }\n\n function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {\n return (\n desc !== undefined &&\n !(desc.value === undefined && desc.writable === undefined)\n );\n }\n\n function _optionalCallableProperty /*::<T>*/(\n obj /*: T */,\n name /*: $Keys<T> */,\n ) /*: ?Function */ {\n var value = obj[name];\n if (value !== undefined && typeof value !== \"function\") {\n throw new TypeError(\"Expected '\" + name + \"' to be a function\");\n }\n return value;\n }\n\n"], ["\n import toArray from \"toArray\";\n import toPropertyKey from \"toPropertyKey\";\n\n // These comments are stripped by @babel/template\n /*::\n type PropertyDescriptor =\n | {\n value: any,\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n }\n | {\n get?: () => any,\n set?: (v: any) => void,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type FieldDescriptor ={\n writable: boolean,\n configurable: boolean,\n enumerable: boolean,\n };\n\n type Placement = \"static\" | \"prototype\" | \"own\";\n type Key = string | symbol; // PrivateName is not supported yet.\n\n type ElementDescriptor =\n | {\n kind: \"method\",\n key: Key,\n placement: Placement,\n descriptor: PropertyDescriptor\n }\n | {\n kind: \"field\",\n key: Key,\n placement: Placement,\n descriptor: FieldDescriptor,\n initializer?: () => any,\n };\n\n // This is exposed to the user code\n type ElementObjectInput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n };\n\n // This is exposed to the user code\n type ElementObjectOutput = ElementDescriptor & {\n [@@toStringTag]?: \"Descriptor\"\n extras?: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n // This is exposed to the user code\n type ClassObject = {\n [@@toStringTag]?: \"Descriptor\",\n kind: \"class\",\n elements: ElementDescriptor[],\n };\n\n type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;\n type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;\n type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;\n\n // Only used by Babel in the transform output, not part of the spec.\n type ElementDefinition =\n | {\n kind: \"method\",\n value: any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n }\n | {\n kind: \"field\",\n value: () => any,\n key: Key,\n static?: boolean,\n decorators?: ElementDecorator[],\n };\n\n declare function ClassFactory<C>(initialize: (instance: C) => void): {\n F: Class<C>,\n d: ElementDefinition[]\n }\n\n */\n\n /*::\n // Various combinations with/without extras and with one or many finishers\n\n type ElementFinisherExtras = {\n element: ElementDescriptor,\n finisher?: ClassFinisher,\n extras?: ElementDescriptor[],\n };\n\n type ElementFinishersExtras = {\n element: ElementDescriptor,\n finishers: ClassFinisher[],\n extras: ElementDescriptor[],\n };\n\n type ElementsFinisher = {\n elements: ElementDescriptor[],\n finisher?: ClassFinisher,\n };\n\n type ElementsFinishers = {\n elements: ElementDescriptor[],\n finishers: ClassFinisher[],\n };\n\n */\n\n /*::\n\n type Placements = {\n static: Key[],\n prototype: Key[],\n own: Key[],\n };\n\n */\n\n // ClassDefinitionEvaluation (Steps 26-*)\n export default function _decorate(\n decorators /*: ClassDecorator[] */,\n factory /*: ClassFactory */,\n superClass /*: ?Class<*> */,\n mixins /*: ?Array<Function> */,\n ) /*: Class<*> */ {\n var api = _getDecoratorsApi();\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n api = mixins[i](api);\n }\n }\n\n var r = factory(function initialize(O) {\n api.initializeInstanceElements(O, decorated.elements);\n }, superClass);\n var decorated = api.decorateClass(\n _coalesceClassElements(r.d.map(_createElementDescriptor)),\n decorators,\n );\n\n api.initializeClassElements(r.F, decorated.elements);\n\n return api.runClassFinishers(r.F, decorated.finishers);\n }\n\n function _getDecoratorsApi() {\n _getDecoratorsApi = function() {\n return api;\n };\n\n var api = {\n elementsDefinitionOrder: [[\"method\"], [\"field\"]],\n\n // InitializeInstanceElements\n initializeInstanceElements: function(\n /*::<C>*/ O /*: C */,\n elements /*: ElementDescriptor[] */,\n ) {\n [\"method\", \"field\"].forEach(function(kind) {\n elements.forEach(function(element /*: ElementDescriptor */) {\n if (element.kind === kind && element.placement === \"own\") {\n this.defineClassElement(O, element);\n }\n }, this);\n }, this);\n },\n\n // InitializeClassElements\n initializeClassElements: function(\n /*::<C>*/ F /*: Class<C> */,\n elements /*: ElementDescriptor[] */,\n ) {\n var proto = F.prototype;\n\n [\"method\", \"field\"].forEach(function(kind) {\n elements.forEach(function(element /*: ElementDescriptor */) {\n var placement = element.placement;\n if (\n element.kind === kind &&\n (placement === \"static\" || placement === \"prototype\")\n ) {\n var receiver = placement === \"static\" ? F : proto;\n this.defineClassElement(receiver, element);\n }\n }, this);\n }, this);\n },\n\n // DefineClassElement\n defineClassElement: function(\n /*::<C>*/ receiver /*: C | Class<C> */,\n element /*: ElementDescriptor */,\n ) {\n var descriptor /*: PropertyDescriptor */ = element.descriptor;\n if (element.kind === \"field\") {\n var initializer = element.initializer;\n descriptor = {\n enumerable: descriptor.enumerable,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n value: initializer === void 0 ? void 0 : initializer.call(receiver),\n };\n }\n Object.defineProperty(receiver, element.key, descriptor);\n },\n\n // DecorateClass\n decorateClass: function(\n elements /*: ElementDescriptor[] */,\n decorators /*: ClassDecorator[] */,\n ) /*: ElementsFinishers */ {\n var newElements /*: ElementDescriptor[] */ = [];\n var finishers /*: ClassFinisher[] */ = [];\n var placements /*: Placements */ = {\n static: [],\n prototype: [],\n own: [],\n };\n\n elements.forEach(function(element /*: ElementDescriptor */) {\n this.addElementPlacement(element, placements);\n }, this);\n\n elements.forEach(function(element /*: ElementDescriptor */) {\n if (!_hasDecorators(element)) return newElements.push(element);\n\n var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(\n element,\n placements,\n );\n newElements.push(elementFinishersExtras.element);\n newElements.push.apply(newElements, elementFinishersExtras.extras);\n finishers.push.apply(finishers, elementFinishersExtras.finishers);\n }, this);\n\n if (!decorators) {\n return { elements: newElements, finishers: finishers };\n }\n\n var result /*: ElementsFinishers */ = this.decorateConstructor(\n newElements,\n decorators,\n );\n finishers.push.apply(finishers, result.finishers);\n result.finishers = finishers;\n\n return result;\n },\n\n // AddElementPlacement\n addElementPlacement: function(\n element /*: ElementDescriptor */,\n placements /*: Placements */,\n silent /*: boolean */,\n ) {\n var keys = placements[element.placement];\n if (!silent && keys.indexOf(element.key) !== -1) {\n throw new TypeError(\"Duplicated element (\" + element.key + \")\");\n }\n keys.push(element.key);\n },\n\n // DecorateElement\n decorateElement: function(\n element /*: ElementDescriptor */,\n placements /*: Placements */,\n ) /*: ElementFinishersExtras */ {\n var extras /*: ElementDescriptor[] */ = [];\n var finishers /*: ClassFinisher[] */ = [];\n\n for (\n var decorators = element.decorators, i = decorators.length - 1;\n i >= 0;\n i--\n ) {\n // (inlined) RemoveElementPlacement\n var keys = placements[element.placement];\n keys.splice(keys.indexOf(element.key), 1);\n\n var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(\n element,\n );\n var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(\n (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||\n elementObject,\n );\n\n element = elementFinisherExtras.element;\n this.addElementPlacement(element, placements);\n\n if (elementFinisherExtras.finisher) {\n finishers.push(elementFinisherExtras.finisher);\n }\n\n var newExtras /*: ElementDescriptor[] | void */ =\n elementFinisherExtras.extras;\n if (newExtras) {\n for (var j = 0; j < newExtras.length; j++) {\n this.addElementPlacement(newExtras[j], placements);\n }\n extras.push.apply(extras, newExtras);\n }\n }\n\n return { element: element, finishers: finishers, extras: extras };\n },\n\n // DecorateConstructor\n decorateConstructor: function(\n elements /*: ElementDescriptor[] */,\n decorators /*: ClassDecorator[] */,\n ) /*: ElementsFinishers */ {\n var finishers /*: ClassFinisher[] */ = [];\n\n for (var i = decorators.length - 1; i >= 0; i--) {\n var obj /*: ClassObject */ = this.fromClassDescriptor(elements);\n var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(\n (0, decorators[i])(obj) /*: ClassObject */ || obj,\n );\n\n if (elementsAndFinisher.finisher !== undefined) {\n finishers.push(elementsAndFinisher.finisher);\n }\n\n if (elementsAndFinisher.elements !== undefined) {\n elements = elementsAndFinisher.elements;\n\n for (var j = 0; j < elements.length - 1; j++) {\n for (var k = j + 1; k < elements.length; k++) {\n if (\n elements[j].key === elements[k].key &&\n elements[j].placement === elements[k].placement\n ) {\n throw new TypeError(\n \"Duplicated element (\" + elements[j].key + \")\",\n );\n }\n }\n }\n }\n }\n\n return { elements: elements, finishers: finishers };\n },\n\n // FromElementDescriptor\n fromElementDescriptor: function(\n element /*: ElementDescriptor */,\n ) /*: ElementObject */ {\n var obj /*: ElementObject */ = {\n kind: element.kind,\n key: element.key,\n placement: element.placement,\n descriptor: element.descriptor,\n };\n\n var desc = {\n value: \"Descriptor\",\n configurable: true,\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n if (element.kind === \"field\") obj.initializer = element.initializer;\n\n return obj;\n },\n\n // ToElementDescriptors\n toElementDescriptors: function(\n elementObjects /*: ElementObject[] */,\n ) /*: ElementDescriptor[] */ {\n if (elementObjects === undefined) return;\n return toArray(elementObjects).map(function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n this.disallowProperty(elementObject, \"finisher\", \"An element descriptor\");\n this.disallowProperty(elementObject, \"extras\", \"An element descriptor\");\n return element;\n }, this);\n },\n\n // ToElementDescriptor\n toElementDescriptor: function(\n elementObject /*: ElementObject */,\n ) /*: ElementDescriptor */ {\n var kind = String(elementObject.kind);\n if (kind !== \"method\" && kind !== \"field\") {\n throw new TypeError(\n 'An element descriptor\\\\'s .kind property must be either \"method\" or' +\n ' \"field\", but a decorator created an element descriptor with' +\n ' .kind \"' +\n kind +\n '\"',\n );\n }\n\n var key = toPropertyKey(elementObject.key);\n\n var placement = String(elementObject.placement);\n if (\n placement !== \"static\" &&\n placement !== \"prototype\" &&\n placement !== \"own\"\n ) {\n throw new TypeError(\n 'An element descriptor\\\\'s .placement property must be one of \"static\",' +\n ' \"prototype\" or \"own\", but a decorator created an element descriptor' +\n ' with .placement \"' +\n placement +\n '\"',\n );\n }\n\n var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;\n\n this.disallowProperty(elementObject, \"elements\", \"An element descriptor\");\n\n var element /*: ElementDescriptor */ = {\n kind: kind,\n key: key,\n placement: placement,\n descriptor: Object.assign({}, descriptor),\n };\n\n if (kind !== \"field\") {\n this.disallowProperty(elementObject, \"initializer\", \"A method descriptor\");\n } else {\n this.disallowProperty(\n descriptor,\n \"get\",\n \"The property descriptor of a field descriptor\",\n );\n this.disallowProperty(\n descriptor,\n \"set\",\n \"The property descriptor of a field descriptor\",\n );\n this.disallowProperty(\n descriptor,\n \"value\",\n \"The property descriptor of a field descriptor\",\n );\n\n element.initializer = elementObject.initializer;\n }\n\n return element;\n },\n\n toElementFinisherExtras: function(\n elementObject /*: ElementObject */,\n ) /*: ElementFinisherExtras */ {\n var element /*: ElementDescriptor */ = this.toElementDescriptor(\n elementObject,\n );\n var finisher /*: ClassFinisher */ = _optionalCallableProperty(\n elementObject,\n \"finisher\",\n );\n var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(\n elementObject.extras,\n );\n\n return { element: element, finisher: finisher, extras: extras };\n },\n\n // FromClassDescriptor\n fromClassDescriptor: function(\n elements /*: ElementDescriptor[] */,\n ) /*: ClassObject */ {\n var obj = {\n kind: \"class\",\n elements: elements.map(this.fromElementDescriptor, this),\n };\n\n var desc = { value: \"Descriptor\", configurable: true };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n\n return obj;\n },\n\n // ToClassDescriptor\n toClassDescriptor: function(\n obj /*: ClassObject */,\n ) /*: ElementsFinisher */ {\n var kind = String(obj.kind);\n if (kind !== \"class\") {\n throw new TypeError(\n 'A class descriptor\\\\'s .kind property must be \"class\", but a decorator' +\n ' created a class descriptor with .kind \"' +\n kind +\n '\"',\n );\n }\n\n this.disallowProperty(obj, \"key\", \"A class descriptor\");\n this.disallowProperty(obj, \"placement\", \"A class descriptor\");\n this.disallowProperty(obj, \"descriptor\", \"A class descriptor\");\n this.disallowProperty(obj, \"initializer\", \"A class descriptor\");\n this.disallowProperty(obj, \"extras\", \"A class descriptor\");\n\n var finisher = _optionalCallableProperty(obj, \"finisher\");\n var elements = this.toElementDescriptors(obj.elements);\n\n return { elements: elements, finisher: finisher };\n },\n\n // RunClassFinishers\n runClassFinishers: function(\n constructor /*: Class<*> */,\n finishers /*: ClassFinisher[] */,\n ) /*: Class<*> */ {\n for (var i = 0; i < finishers.length; i++) {\n var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);\n if (newConstructor !== undefined) {\n // NOTE: This should check if IsConstructor(newConstructor) is false.\n if (typeof newConstructor !== \"function\") {\n throw new TypeError(\"Finishers must return a constructor.\");\n }\n constructor = newConstructor;\n }\n }\n return constructor;\n },\n\n disallowProperty: function(obj, name, objectType) {\n if (obj[name] !== undefined) {\n throw new TypeError(objectType + \" can't have a .\" + name + \" property.\");\n }\n }\n };\n\n return api;\n }\n\n // ClassElementEvaluation\n function _createElementDescriptor(\n def /*: ElementDefinition */,\n ) /*: ElementDescriptor */ {\n var key = toPropertyKey(def.key);\n\n var descriptor /*: PropertyDescriptor */;\n if (def.kind === \"method\") {\n descriptor = {\n value: def.value,\n writable: true,\n configurable: true,\n enumerable: false,\n };\n } else if (def.kind === \"get\") {\n descriptor = { get: def.value, configurable: true, enumerable: false };\n } else if (def.kind === \"set\") {\n descriptor = { set: def.value, configurable: true, enumerable: false };\n } else if (def.kind === \"field\") {\n descriptor = { configurable: true, writable: true, enumerable: true };\n }\n\n var element /*: ElementDescriptor */ = {\n kind: def.kind === \"field\" ? \"field\" : \"method\",\n key: key,\n placement: def.static\n ? \"static\"\n : def.kind === \"field\"\n ? \"own\"\n : \"prototype\",\n descriptor: descriptor,\n };\n if (def.decorators) element.decorators = def.decorators;\n if (def.kind === \"field\") element.initializer = def.value;\n\n return element;\n }\n\n // CoalesceGetterSetter\n function _coalesceGetterSetter(\n element /*: ElementDescriptor */,\n other /*: ElementDescriptor */,\n ) {\n if (element.descriptor.get !== undefined) {\n other.descriptor.get = element.descriptor.get;\n } else {\n other.descriptor.set = element.descriptor.set;\n }\n }\n\n // CoalesceClassElements\n function _coalesceClassElements(\n elements /*: ElementDescriptor[] */,\n ) /*: ElementDescriptor[] */ {\n var newElements /*: ElementDescriptor[] */ = [];\n\n var isSameElement = function(\n other /*: ElementDescriptor */,\n ) /*: boolean */ {\n return (\n other.kind === \"method\" &&\n other.key === element.key &&\n other.placement === element.placement\n );\n };\n\n for (var i = 0; i < elements.length; i++) {\n var element /*: ElementDescriptor */ = elements[i];\n var other /*: ElementDescriptor */;\n\n if (\n element.kind === \"method\" &&\n (other = newElements.find(isSameElement))\n ) {\n if (\n _isDataDescriptor(element.descriptor) ||\n _isDataDescriptor(other.descriptor)\n ) {\n if (_hasDecorators(element) || _hasDecorators(other)) {\n throw new ReferenceError(\n \"Duplicated methods (\" + element.key + \") can't be decorated.\",\n );\n }\n other.descriptor = element.descriptor;\n } else {\n if (_hasDecorators(element)) {\n if (_hasDecorators(other)) {\n throw new ReferenceError(\n \"Decorators can't be placed on different accessors with for \" +\n \"the same property (\" +\n element.key +\n \").\",\n );\n }\n other.decorators = element.decorators;\n }\n _coalesceGetterSetter(element, other);\n }\n } else {\n newElements.push(element);\n }\n }\n\n return newElements;\n }\n\n function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {\n return element.decorators && element.decorators.length;\n }\n\n function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {\n return (\n desc !== undefined &&\n !(desc.value === undefined && desc.writable === undefined)\n );\n }\n\n function _optionalCallableProperty /*::<T>*/(\n obj /*: T */,\n name /*: $Keys<T> */,\n ) /*: ?Function */ {\n var value = obj[name];\n if (value !== undefined && typeof value !== \"function\") {\n throw new TypeError(\"Expected '\" + name + \"' to be a function\");\n }\n return value;\n }\n\n"])));
  40591. helpers$1.classPrivateMethodGet = helper$2("7.1.6")(_templateObject83 || (_templateObject83 = _taggedTemplateLiteralLoose(["\n export default function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return fn;\n }\n"])));
  40592. {
  40593. helpers$1.classPrivateMethodSet = helper$2("7.1.6")(_templateObject84 || (_templateObject84 = _taggedTemplateLiteralLoose(["\n export default function _classPrivateMethodSet() {\n throw new TypeError(\"attempted to reassign private method\");\n }\n "])));
  40594. }
  40595. function makePath(path) {
  40596. var parts = [];
  40597. for (; path.parentPath; path = path.parentPath) {
  40598. parts.push(path.key);
  40599. if (path.inList) parts.push(path.listKey);
  40600. }
  40601. return parts.reverse().join(".");
  40602. }
  40603. var fileClass = undefined;
  40604. function getHelperMetadata(file) {
  40605. var globals = new Set();
  40606. var localBindingNames = new Set();
  40607. var dependencies = new Map();
  40608. var exportName;
  40609. var exportPath;
  40610. var exportBindingAssignments = [];
  40611. var importPaths = [];
  40612. var importBindingsReferences = [];
  40613. var dependencyVisitor = {
  40614. ImportDeclaration: function ImportDeclaration(child) {
  40615. var name = child.node.source.value;
  40616. if (!helpers$1[name]) {
  40617. throw child.buildCodeFrameError("Unknown helper " + name);
  40618. }
  40619. if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) {
  40620. throw child.buildCodeFrameError("Helpers can only import a default value");
  40621. }
  40622. var bindingIdentifier = child.node.specifiers[0].local;
  40623. dependencies.set(bindingIdentifier, name);
  40624. importPaths.push(makePath(child));
  40625. },
  40626. ExportDefaultDeclaration: function ExportDefaultDeclaration(child) {
  40627. var decl = child.get("declaration");
  40628. if (decl.isFunctionDeclaration()) {
  40629. if (!decl.node.id) {
  40630. throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration");
  40631. }
  40632. exportName = decl.node.id.name;
  40633. }
  40634. exportPath = makePath(child);
  40635. },
  40636. ExportAllDeclaration: function ExportAllDeclaration(child) {
  40637. throw child.buildCodeFrameError("Helpers can only export default");
  40638. },
  40639. ExportNamedDeclaration: function ExportNamedDeclaration(child) {
  40640. throw child.buildCodeFrameError("Helpers can only export default");
  40641. },
  40642. Statement: function Statement(child) {
  40643. if (child.isModuleDeclaration()) return;
  40644. child.skip();
  40645. }
  40646. };
  40647. var referenceVisitor = {
  40648. Program: function Program(path) {
  40649. var bindings = path.scope.getAllBindings();
  40650. Object.keys(bindings).forEach(function (name) {
  40651. if (name === exportName) return;
  40652. if (dependencies.has(bindings[name].identifier)) return;
  40653. localBindingNames.add(name);
  40654. });
  40655. },
  40656. ReferencedIdentifier: function ReferencedIdentifier(child) {
  40657. var name = child.node.name;
  40658. var binding = child.scope.getBinding(name, true);
  40659. if (!binding) {
  40660. globals.add(name);
  40661. } else if (dependencies.has(binding.identifier)) {
  40662. importBindingsReferences.push(makePath(child));
  40663. }
  40664. },
  40665. AssignmentExpression: function AssignmentExpression(child) {
  40666. var left = child.get("left");
  40667. if (!(exportName in left.getBindingIdentifiers())) return;
  40668. if (!left.isIdentifier()) {
  40669. throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");
  40670. }
  40671. var binding = child.scope.getBinding(exportName);
  40672. if (binding != null && binding.scope.path.isProgram()) {
  40673. exportBindingAssignments.push(makePath(child));
  40674. }
  40675. }
  40676. };
  40677. traverse(file.ast, dependencyVisitor, file.scope);
  40678. traverse(file.ast, referenceVisitor, file.scope);
  40679. if (!exportPath) throw new Error("Helpers must default-export something.");
  40680. exportBindingAssignments.reverse();
  40681. return {
  40682. globals: Array.from(globals),
  40683. localBindingNames: Array.from(localBindingNames),
  40684. dependencies: dependencies,
  40685. exportBindingAssignments: exportBindingAssignments,
  40686. exportPath: exportPath,
  40687. exportName: exportName,
  40688. importBindingsReferences: importBindingsReferences,
  40689. importPaths: importPaths
  40690. };
  40691. }
  40692. function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
  40693. if (localBindings && !id) {
  40694. throw new Error("Unexpected local bindings for module-based helpers.");
  40695. }
  40696. if (!id) return;
  40697. var localBindingNames = metadata.localBindingNames,
  40698. dependencies = metadata.dependencies,
  40699. exportBindingAssignments = metadata.exportBindingAssignments,
  40700. exportPath = metadata.exportPath,
  40701. exportName = metadata.exportName,
  40702. importBindingsReferences = metadata.importBindingsReferences,
  40703. importPaths = metadata.importPaths;
  40704. var dependenciesRefs = {};
  40705. dependencies.forEach(function (name, id) {
  40706. dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id;
  40707. });
  40708. var toRename = {};
  40709. var bindings = new Set(localBindings || []);
  40710. localBindingNames.forEach(function (name) {
  40711. var newName = name;
  40712. while (bindings.has(newName)) {
  40713. newName = "_" + newName;
  40714. }
  40715. if (newName !== name) toRename[name] = newName;
  40716. });
  40717. if (id.type === "Identifier" && exportName !== id.name) {
  40718. toRename[exportName] = id.name;
  40719. }
  40720. var visitor = {
  40721. Program: function Program(path) {
  40722. var exp = path.get(exportPath);
  40723. var imps = importPaths.map(function (p) {
  40724. return path.get(p);
  40725. });
  40726. var impsBindingRefs = importBindingsReferences.map(function (p) {
  40727. return path.get(p);
  40728. });
  40729. var decl = exp.get("declaration");
  40730. if (id.type === "Identifier") {
  40731. if (decl.isFunctionDeclaration()) {
  40732. exp.replaceWith(decl);
  40733. } else {
  40734. exp.replaceWith(variableDeclaration("var", [variableDeclarator(id, decl.node)]));
  40735. }
  40736. } else if (id.type === "MemberExpression") {
  40737. if (decl.isFunctionDeclaration()) {
  40738. exportBindingAssignments.forEach(function (assignPath) {
  40739. var assign = path.get(assignPath);
  40740. assign.replaceWith(assignmentExpression("=", id, assign.node));
  40741. });
  40742. exp.replaceWith(decl);
  40743. path.pushContainer("body", expressionStatement(assignmentExpression("=", id, identifier(exportName))));
  40744. } else {
  40745. exp.replaceWith(expressionStatement(assignmentExpression("=", id, decl.node)));
  40746. }
  40747. } else {
  40748. throw new Error("Unexpected helper format.");
  40749. }
  40750. Object.keys(toRename).forEach(function (name) {
  40751. path.scope.rename(name, toRename[name]);
  40752. });
  40753. for (var _iterator = _createForOfIteratorHelperLoose(imps), _step; !(_step = _iterator()).done;) {
  40754. var _path = _step.value;
  40755. _path.remove();
  40756. }
  40757. for (var _iterator2 = _createForOfIteratorHelperLoose(impsBindingRefs), _step2; !(_step2 = _iterator2()).done;) {
  40758. var _path2 = _step2.value;
  40759. var node = cloneNode(dependenciesRefs[_path2.node.name]);
  40760. _path2.replaceWith(node);
  40761. }
  40762. path.stop();
  40763. }
  40764. };
  40765. traverse(file.ast, visitor, file.scope);
  40766. }
  40767. var helperData = Object.create(null);
  40768. function loadHelper(name) {
  40769. if (!helperData[name]) {
  40770. var helper = helpers$1[name];
  40771. if (!helper) {
  40772. throw Object.assign(new ReferenceError("Unknown helper " + name), {
  40773. code: "BABEL_HELPER_UNKNOWN",
  40774. helper: name
  40775. });
  40776. }
  40777. var fn = function fn() {
  40778. var file$1 = {
  40779. ast: file(helper.ast())
  40780. };
  40781. if (fileClass) {
  40782. return new fileClass({
  40783. filename: "babel-helper://" + name
  40784. }, file$1);
  40785. }
  40786. return file$1;
  40787. };
  40788. var metadata = getHelperMetadata(fn());
  40789. helperData[name] = {
  40790. build: function build(getDependency, id, localBindings) {
  40791. var file = fn();
  40792. permuteHelperAST(file, metadata, id, localBindings, getDependency);
  40793. return {
  40794. nodes: file.ast.program.body,
  40795. globals: metadata.globals
  40796. };
  40797. },
  40798. minVersion: function minVersion() {
  40799. return helper.minVersion;
  40800. },
  40801. dependencies: metadata.dependencies
  40802. };
  40803. }
  40804. return helperData[name];
  40805. }
  40806. function get$1(name, getDependency, id, localBindings) {
  40807. return loadHelper(name).build(getDependency, id, localBindings);
  40808. }
  40809. function minVersion$3(name) {
  40810. return loadHelper(name).minVersion();
  40811. }
  40812. function getDependencies(name) {
  40813. return Array.from(loadHelper(name).dependencies.values());
  40814. }
  40815. function ensure(name, newFileClass) {
  40816. if (!fileClass) {
  40817. fileClass = newFileClass;
  40818. }
  40819. loadHelper(name);
  40820. }
  40821. var list = Object.keys(helpers$1).map(function (name) {
  40822. return name.replace(/^_/, "");
  40823. }).filter(function (name) {
  40824. return name !== "__esModule";
  40825. });
  40826. /*
  40827. object-assign
  40828. (c) Sindre Sorhus
  40829. @license MIT
  40830. */
  40831. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  40832. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  40833. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  40834. function toObject(val) {
  40835. if (val === null || val === undefined) {
  40836. throw new TypeError('Object.assign cannot be called with null or undefined');
  40837. }
  40838. return Object(val);
  40839. }
  40840. function shouldUseNative() {
  40841. try {
  40842. if (!Object.assign) {
  40843. return false;
  40844. }
  40845. var test1 = new String('abc');
  40846. test1[5] = 'de';
  40847. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  40848. return false;
  40849. }
  40850. var test2 = {};
  40851. for (var i = 0; i < 10; i++) {
  40852. test2['_' + String.fromCharCode(i)] = i;
  40853. }
  40854. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  40855. return test2[n];
  40856. });
  40857. if (order2.join('') !== '0123456789') {
  40858. return false;
  40859. }
  40860. var test3 = {};
  40861. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  40862. test3[letter] = letter;
  40863. });
  40864. if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
  40865. return false;
  40866. }
  40867. return true;
  40868. } catch (err) {
  40869. return false;
  40870. }
  40871. }
  40872. var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
  40873. var from;
  40874. var to = toObject(target);
  40875. var symbols;
  40876. for (var s = 1; s < arguments.length; s++) {
  40877. from = Object(arguments[s]);
  40878. for (var key in from) {
  40879. if (hasOwnProperty$1.call(from, key)) {
  40880. to[key] = from[key];
  40881. }
  40882. }
  40883. if (getOwnPropertySymbols) {
  40884. symbols = getOwnPropertySymbols(from);
  40885. for (var i = 0; i < symbols.length; i++) {
  40886. if (propIsEnumerable.call(from, symbols[i])) {
  40887. to[symbols[i]] = from[symbols[i]];
  40888. }
  40889. }
  40890. }
  40891. }
  40892. return to;
  40893. };
  40894. var isBufferBrowser = function isBuffer(arg) {
  40895. return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function';
  40896. };
  40897. var inherits_browser = createCommonjsModule(function (module) {
  40898. if (typeof Object.create === 'function') {
  40899. module.exports = function inherits(ctor, superCtor) {
  40900. ctor.super_ = superCtor;
  40901. ctor.prototype = Object.create(superCtor.prototype, {
  40902. constructor: {
  40903. value: ctor,
  40904. enumerable: false,
  40905. writable: true,
  40906. configurable: true
  40907. }
  40908. });
  40909. };
  40910. } else {
  40911. module.exports = function inherits(ctor, superCtor) {
  40912. ctor.super_ = superCtor;
  40913. var TempCtor = function TempCtor() {};
  40914. TempCtor.prototype = superCtor.prototype;
  40915. ctor.prototype = new TempCtor();
  40916. ctor.prototype.constructor = ctor;
  40917. };
  40918. }
  40919. }, "/$$rollup_base$$/node_modules/util/node_modules/inherits");
  40920. var util$5 = createCommonjsModule(function (module, exports) {
  40921. var formatRegExp = /%[sdj%]/g;
  40922. exports.format = function (f) {
  40923. if (!isString(f)) {
  40924. var objects = [];
  40925. for (var i = 0; i < arguments.length; i++) {
  40926. objects.push(inspect(arguments[i]));
  40927. }
  40928. return objects.join(' ');
  40929. }
  40930. var i = 1;
  40931. var args = arguments;
  40932. var len = args.length;
  40933. var str = String(f).replace(formatRegExp, function (x) {
  40934. if (x === '%%') return '%';
  40935. if (i >= len) return x;
  40936. switch (x) {
  40937. case '%s':
  40938. return String(args[i++]);
  40939. case '%d':
  40940. return Number(args[i++]);
  40941. case '%j':
  40942. try {
  40943. return JSON.stringify(args[i++]);
  40944. } catch (_) {
  40945. return '[Circular]';
  40946. }
  40947. default:
  40948. return x;
  40949. }
  40950. });
  40951. for (var x = args[i]; i < len; x = args[++i]) {
  40952. if (isNull(x) || !isObject(x)) {
  40953. str += ' ' + x;
  40954. } else {
  40955. str += ' ' + inspect(x);
  40956. }
  40957. }
  40958. return str;
  40959. };
  40960. exports.deprecate = function (fn, msg) {
  40961. if (isUndefined(commonjsGlobal.process)) {
  40962. return function () {
  40963. return exports.deprecate(fn, msg).apply(this, arguments);
  40964. };
  40965. }
  40966. if (browser$6.noDeprecation === true) {
  40967. return fn;
  40968. }
  40969. var warned = false;
  40970. function deprecated() {
  40971. if (!warned) {
  40972. if (browser$6.throwDeprecation) {
  40973. throw new Error(msg);
  40974. } else if (browser$6.traceDeprecation) {
  40975. console.trace(msg);
  40976. } else {
  40977. console.error(msg);
  40978. }
  40979. warned = true;
  40980. }
  40981. return fn.apply(this, arguments);
  40982. }
  40983. return deprecated;
  40984. };
  40985. var debugs = {};
  40986. var debugEnviron;
  40987. exports.debuglog = function (set) {
  40988. if (isUndefined(debugEnviron)) debugEnviron = browser$6.env.NODE_DEBUG || '';
  40989. set = set.toUpperCase();
  40990. if (!debugs[set]) {
  40991. if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
  40992. var pid = browser$6.pid;
  40993. debugs[set] = function () {
  40994. var msg = exports.format.apply(exports, arguments);
  40995. console.error('%s %d: %s', set, pid, msg);
  40996. };
  40997. } else {
  40998. debugs[set] = function () {};
  40999. }
  41000. }
  41001. return debugs[set];
  41002. };
  41003. function inspect(obj, opts) {
  41004. var ctx = {
  41005. seen: [],
  41006. stylize: stylizeNoColor
  41007. };
  41008. if (arguments.length >= 3) ctx.depth = arguments[2];
  41009. if (arguments.length >= 4) ctx.colors = arguments[3];
  41010. if (isBoolean(opts)) {
  41011. ctx.showHidden = opts;
  41012. } else if (opts) {
  41013. exports._extend(ctx, opts);
  41014. }
  41015. if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  41016. if (isUndefined(ctx.depth)) ctx.depth = 2;
  41017. if (isUndefined(ctx.colors)) ctx.colors = false;
  41018. if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  41019. if (ctx.colors) ctx.stylize = stylizeWithColor;
  41020. return formatValue(ctx, obj, ctx.depth);
  41021. }
  41022. exports.inspect = inspect;
  41023. inspect.colors = {
  41024. 'bold': [1, 22],
  41025. 'italic': [3, 23],
  41026. 'underline': [4, 24],
  41027. 'inverse': [7, 27],
  41028. 'white': [37, 39],
  41029. 'grey': [90, 39],
  41030. 'black': [30, 39],
  41031. 'blue': [34, 39],
  41032. 'cyan': [36, 39],
  41033. 'green': [32, 39],
  41034. 'magenta': [35, 39],
  41035. 'red': [31, 39],
  41036. 'yellow': [33, 39]
  41037. };
  41038. inspect.styles = {
  41039. 'special': 'cyan',
  41040. 'number': 'yellow',
  41041. 'boolean': 'yellow',
  41042. 'undefined': 'grey',
  41043. 'null': 'bold',
  41044. 'string': 'green',
  41045. 'date': 'magenta',
  41046. 'regexp': 'red'
  41047. };
  41048. function stylizeWithColor(str, styleType) {
  41049. var style = inspect.styles[styleType];
  41050. if (style) {
  41051. return "\x1B[" + inspect.colors[style][0] + 'm' + str + "\x1B[" + inspect.colors[style][1] + 'm';
  41052. } else {
  41053. return str;
  41054. }
  41055. }
  41056. function stylizeNoColor(str, styleType) {
  41057. return str;
  41058. }
  41059. function arrayToHash(array) {
  41060. var hash = {};
  41061. array.forEach(function (val, idx) {
  41062. hash[val] = true;
  41063. });
  41064. return hash;
  41065. }
  41066. function formatValue(ctx, value, recurseTimes) {
  41067. if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports.inspect && !(value.constructor && value.constructor.prototype === value)) {
  41068. var ret = value.inspect(recurseTimes, ctx);
  41069. if (!isString(ret)) {
  41070. ret = formatValue(ctx, ret, recurseTimes);
  41071. }
  41072. return ret;
  41073. }
  41074. var primitive = formatPrimitive(ctx, value);
  41075. if (primitive) {
  41076. return primitive;
  41077. }
  41078. var keys = Object.keys(value);
  41079. var visibleKeys = arrayToHash(keys);
  41080. if (ctx.showHidden) {
  41081. keys = Object.getOwnPropertyNames(value);
  41082. }
  41083. if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  41084. return formatError(value);
  41085. }
  41086. if (keys.length === 0) {
  41087. if (isFunction(value)) {
  41088. var name = value.name ? ': ' + value.name : '';
  41089. return ctx.stylize('[Function' + name + ']', 'special');
  41090. }
  41091. if (isRegExp(value)) {
  41092. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  41093. }
  41094. if (isDate(value)) {
  41095. return ctx.stylize(Date.prototype.toString.call(value), 'date');
  41096. }
  41097. if (isError(value)) {
  41098. return formatError(value);
  41099. }
  41100. }
  41101. var base = '',
  41102. array = false,
  41103. braces = ['{', '}'];
  41104. if (isArray(value)) {
  41105. array = true;
  41106. braces = ['[', ']'];
  41107. }
  41108. if (isFunction(value)) {
  41109. var n = value.name ? ': ' + value.name : '';
  41110. base = ' [Function' + n + ']';
  41111. }
  41112. if (isRegExp(value)) {
  41113. base = ' ' + RegExp.prototype.toString.call(value);
  41114. }
  41115. if (isDate(value)) {
  41116. base = ' ' + Date.prototype.toUTCString.call(value);
  41117. }
  41118. if (isError(value)) {
  41119. base = ' ' + formatError(value);
  41120. }
  41121. if (keys.length === 0 && (!array || value.length == 0)) {
  41122. return braces[0] + base + braces[1];
  41123. }
  41124. if (recurseTimes < 0) {
  41125. if (isRegExp(value)) {
  41126. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  41127. } else {
  41128. return ctx.stylize('[Object]', 'special');
  41129. }
  41130. }
  41131. ctx.seen.push(value);
  41132. var output;
  41133. if (array) {
  41134. output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  41135. } else {
  41136. output = keys.map(function (key) {
  41137. return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  41138. });
  41139. }
  41140. ctx.seen.pop();
  41141. return reduceToSingleString(output, base, braces);
  41142. }
  41143. function formatPrimitive(ctx, value) {
  41144. if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
  41145. if (isString(value)) {
  41146. var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + '\'';
  41147. return ctx.stylize(simple, 'string');
  41148. }
  41149. if (isNumber(value)) return ctx.stylize('' + value, 'number');
  41150. if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
  41151. if (isNull(value)) return ctx.stylize('null', 'null');
  41152. }
  41153. function formatError(value) {
  41154. return '[' + Error.prototype.toString.call(value) + ']';
  41155. }
  41156. function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  41157. var output = [];
  41158. for (var i = 0, l = value.length; i < l; ++i) {
  41159. if (hasOwnProperty(value, String(i))) {
  41160. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
  41161. } else {
  41162. output.push('');
  41163. }
  41164. }
  41165. keys.forEach(function (key) {
  41166. if (!key.match(/^\d+$/)) {
  41167. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
  41168. }
  41169. });
  41170. return output;
  41171. }
  41172. function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  41173. var name, str, desc;
  41174. desc = Object.getOwnPropertyDescriptor(value, key) || {
  41175. value: value[key]
  41176. };
  41177. if (desc.get) {
  41178. if (desc.set) {
  41179. str = ctx.stylize('[Getter/Setter]', 'special');
  41180. } else {
  41181. str = ctx.stylize('[Getter]', 'special');
  41182. }
  41183. } else {
  41184. if (desc.set) {
  41185. str = ctx.stylize('[Setter]', 'special');
  41186. }
  41187. }
  41188. if (!hasOwnProperty(visibleKeys, key)) {
  41189. name = '[' + key + ']';
  41190. }
  41191. if (!str) {
  41192. if (ctx.seen.indexOf(desc.value) < 0) {
  41193. if (isNull(recurseTimes)) {
  41194. str = formatValue(ctx, desc.value, null);
  41195. } else {
  41196. str = formatValue(ctx, desc.value, recurseTimes - 1);
  41197. }
  41198. if (str.indexOf('\n') > -1) {
  41199. if (array) {
  41200. str = str.split('\n').map(function (line) {
  41201. return ' ' + line;
  41202. }).join('\n').substr(2);
  41203. } else {
  41204. str = '\n' + str.split('\n').map(function (line) {
  41205. return ' ' + line;
  41206. }).join('\n');
  41207. }
  41208. }
  41209. } else {
  41210. str = ctx.stylize('[Circular]', 'special');
  41211. }
  41212. }
  41213. if (isUndefined(name)) {
  41214. if (array && key.match(/^\d+$/)) {
  41215. return str;
  41216. }
  41217. name = JSON.stringify('' + key);
  41218. if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
  41219. name = name.substr(1, name.length - 2);
  41220. name = ctx.stylize(name, 'name');
  41221. } else {
  41222. name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
  41223. name = ctx.stylize(name, 'string');
  41224. }
  41225. }
  41226. return name + ': ' + str;
  41227. }
  41228. function reduceToSingleString(output, base, braces) {
  41229. var length = output.reduce(function (prev, cur) {
  41230. if (cur.indexOf('\n') >= 0) ;
  41231. return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  41232. }, 0);
  41233. if (length > 60) {
  41234. return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
  41235. }
  41236. return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
  41237. }
  41238. function isArray(ar) {
  41239. return Array.isArray(ar);
  41240. }
  41241. exports.isArray = isArray;
  41242. function isBoolean(arg) {
  41243. return typeof arg === 'boolean';
  41244. }
  41245. exports.isBoolean = isBoolean;
  41246. function isNull(arg) {
  41247. return arg === null;
  41248. }
  41249. exports.isNull = isNull;
  41250. function isNullOrUndefined(arg) {
  41251. return arg == null;
  41252. }
  41253. exports.isNullOrUndefined = isNullOrUndefined;
  41254. function isNumber(arg) {
  41255. return typeof arg === 'number';
  41256. }
  41257. exports.isNumber = isNumber;
  41258. function isString(arg) {
  41259. return typeof arg === 'string';
  41260. }
  41261. exports.isString = isString;
  41262. function isSymbol(arg) {
  41263. return typeof arg === 'symbol';
  41264. }
  41265. exports.isSymbol = isSymbol;
  41266. function isUndefined(arg) {
  41267. return arg === void 0;
  41268. }
  41269. exports.isUndefined = isUndefined;
  41270. function isRegExp(re) {
  41271. return isObject(re) && objectToString(re) === '[object RegExp]';
  41272. }
  41273. exports.isRegExp = isRegExp;
  41274. function isObject(arg) {
  41275. return typeof arg === 'object' && arg !== null;
  41276. }
  41277. exports.isObject = isObject;
  41278. function isDate(d) {
  41279. return isObject(d) && objectToString(d) === '[object Date]';
  41280. }
  41281. exports.isDate = isDate;
  41282. function isError(e) {
  41283. return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
  41284. }
  41285. exports.isError = isError;
  41286. function isFunction(arg) {
  41287. return typeof arg === 'function';
  41288. }
  41289. exports.isFunction = isFunction;
  41290. function isPrimitive(arg) {
  41291. return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || typeof arg === 'undefined';
  41292. }
  41293. exports.isPrimitive = isPrimitive;
  41294. exports.isBuffer = isBufferBrowser;
  41295. function objectToString(o) {
  41296. return Object.prototype.toString.call(o);
  41297. }
  41298. function pad(n) {
  41299. return n < 10 ? '0' + n.toString(10) : n.toString(10);
  41300. }
  41301. var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  41302. function timestamp() {
  41303. var d = new Date();
  41304. var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':');
  41305. return [d.getDate(), months[d.getMonth()], time].join(' ');
  41306. }
  41307. exports.log = function () {
  41308. console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
  41309. };
  41310. exports.inherits = inherits_browser;
  41311. exports._extend = function (origin, add) {
  41312. if (!add || !isObject(add)) return origin;
  41313. var keys = Object.keys(add);
  41314. var i = keys.length;
  41315. while (i--) {
  41316. origin[keys[i]] = add[keys[i]];
  41317. }
  41318. return origin;
  41319. };
  41320. function hasOwnProperty(obj, prop) {
  41321. return Object.prototype.hasOwnProperty.call(obj, prop);
  41322. }
  41323. }, "/$$rollup_base$$/node_modules/util");
  41324. var assert_1 = createCommonjsModule(function (module) {
  41325. /*!
  41326. * The buffer module from node.js, for the browser.
  41327. *
  41328. * @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
  41329. * @license MIT
  41330. */
  41331. function compare(a, b) {
  41332. if (a === b) {
  41333. return 0;
  41334. }
  41335. var x = a.length;
  41336. var y = b.length;
  41337. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  41338. if (a[i] !== b[i]) {
  41339. x = a[i];
  41340. y = b[i];
  41341. break;
  41342. }
  41343. }
  41344. if (x < y) {
  41345. return -1;
  41346. }
  41347. if (y < x) {
  41348. return 1;
  41349. }
  41350. return 0;
  41351. }
  41352. function isBuffer(b) {
  41353. if (commonjsGlobal.Buffer && typeof commonjsGlobal.Buffer.isBuffer === 'function') {
  41354. return commonjsGlobal.Buffer.isBuffer(b);
  41355. }
  41356. return !!(b != null && b._isBuffer);
  41357. }
  41358. var hasOwn = Object.prototype.hasOwnProperty;
  41359. var pSlice = Array.prototype.slice;
  41360. var functionsHaveNames = function () {
  41361. return function foo() {}.name === 'foo';
  41362. }();
  41363. function pToString(obj) {
  41364. return Object.prototype.toString.call(obj);
  41365. }
  41366. function isView(arrbuf) {
  41367. if (isBuffer(arrbuf)) {
  41368. return false;
  41369. }
  41370. if (typeof commonjsGlobal.ArrayBuffer !== 'function') {
  41371. return false;
  41372. }
  41373. if (typeof ArrayBuffer.isView === 'function') {
  41374. return ArrayBuffer.isView(arrbuf);
  41375. }
  41376. if (!arrbuf) {
  41377. return false;
  41378. }
  41379. if (arrbuf instanceof DataView) {
  41380. return true;
  41381. }
  41382. if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
  41383. return true;
  41384. }
  41385. return false;
  41386. }
  41387. var assert = module.exports = ok;
  41388. var regex = /\s*function\s+([^\(\s]*)\s*/;
  41389. function getName(func) {
  41390. if (!util$5.isFunction(func)) {
  41391. return;
  41392. }
  41393. if (functionsHaveNames) {
  41394. return func.name;
  41395. }
  41396. var str = func.toString();
  41397. var match = str.match(regex);
  41398. return match && match[1];
  41399. }
  41400. assert.AssertionError = function AssertionError(options) {
  41401. this.name = 'AssertionError';
  41402. this.actual = options.actual;
  41403. this.expected = options.expected;
  41404. this.operator = options.operator;
  41405. if (options.message) {
  41406. this.message = options.message;
  41407. this.generatedMessage = false;
  41408. } else {
  41409. this.message = getMessage(this);
  41410. this.generatedMessage = true;
  41411. }
  41412. var stackStartFunction = options.stackStartFunction || fail;
  41413. if (Error.captureStackTrace) {
  41414. Error.captureStackTrace(this, stackStartFunction);
  41415. } else {
  41416. var err = new Error();
  41417. if (err.stack) {
  41418. var out = err.stack;
  41419. var fn_name = getName(stackStartFunction);
  41420. var idx = out.indexOf('\n' + fn_name);
  41421. if (idx >= 0) {
  41422. var next_line = out.indexOf('\n', idx + 1);
  41423. out = out.substring(next_line + 1);
  41424. }
  41425. this.stack = out;
  41426. }
  41427. }
  41428. };
  41429. util$5.inherits(assert.AssertionError, Error);
  41430. function truncate(s, n) {
  41431. if (typeof s === 'string') {
  41432. return s.length < n ? s : s.slice(0, n);
  41433. } else {
  41434. return s;
  41435. }
  41436. }
  41437. function inspect(something) {
  41438. if (functionsHaveNames || !util$5.isFunction(something)) {
  41439. return util$5.inspect(something);
  41440. }
  41441. var rawname = getName(something);
  41442. var name = rawname ? ': ' + rawname : '';
  41443. return '[Function' + name + ']';
  41444. }
  41445. function getMessage(self) {
  41446. return truncate(inspect(self.actual), 128) + ' ' + self.operator + ' ' + truncate(inspect(self.expected), 128);
  41447. }
  41448. function fail(actual, expected, message, operator, stackStartFunction) {
  41449. throw new assert.AssertionError({
  41450. message: message,
  41451. actual: actual,
  41452. expected: expected,
  41453. operator: operator,
  41454. stackStartFunction: stackStartFunction
  41455. });
  41456. }
  41457. assert.fail = fail;
  41458. function ok(value, message) {
  41459. if (!value) fail(value, true, message, '==', assert.ok);
  41460. }
  41461. assert.ok = ok;
  41462. assert.equal = function equal(actual, expected, message) {
  41463. if (actual != expected) fail(actual, expected, message, '==', assert.equal);
  41464. };
  41465. assert.notEqual = function notEqual(actual, expected, message) {
  41466. if (actual == expected) {
  41467. fail(actual, expected, message, '!=', assert.notEqual);
  41468. }
  41469. };
  41470. assert.deepEqual = function deepEqual(actual, expected, message) {
  41471. if (!_deepEqual(actual, expected, false)) {
  41472. fail(actual, expected, message, 'deepEqual', assert.deepEqual);
  41473. }
  41474. };
  41475. assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
  41476. if (!_deepEqual(actual, expected, true)) {
  41477. fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
  41478. }
  41479. };
  41480. function _deepEqual(actual, expected, strict, memos) {
  41481. if (actual === expected) {
  41482. return true;
  41483. } else if (isBuffer(actual) && isBuffer(expected)) {
  41484. return compare(actual, expected) === 0;
  41485. } else if (util$5.isDate(actual) && util$5.isDate(expected)) {
  41486. return actual.getTime() === expected.getTime();
  41487. } else if (util$5.isRegExp(actual) && util$5.isRegExp(expected)) {
  41488. return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase;
  41489. } else if ((actual === null || typeof actual !== 'object') && (expected === null || typeof expected !== 'object')) {
  41490. return strict ? actual === expected : actual == expected;
  41491. } else if (isView(actual) && isView(expected) && pToString(actual) === pToString(expected) && !(actual instanceof Float32Array || actual instanceof Float64Array)) {
  41492. return compare(new Uint8Array(actual.buffer), new Uint8Array(expected.buffer)) === 0;
  41493. } else if (isBuffer(actual) !== isBuffer(expected)) {
  41494. return false;
  41495. } else {
  41496. memos = memos || {
  41497. actual: [],
  41498. expected: []
  41499. };
  41500. var actualIndex = memos.actual.indexOf(actual);
  41501. if (actualIndex !== -1) {
  41502. if (actualIndex === memos.expected.indexOf(expected)) {
  41503. return true;
  41504. }
  41505. }
  41506. memos.actual.push(actual);
  41507. memos.expected.push(expected);
  41508. return objEquiv(actual, expected, strict, memos);
  41509. }
  41510. }
  41511. function isArguments(object) {
  41512. return Object.prototype.toString.call(object) == '[object Arguments]';
  41513. }
  41514. function objEquiv(a, b, strict, actualVisitedObjects) {
  41515. if (a === null || a === undefined || b === null || b === undefined) return false;
  41516. if (util$5.isPrimitive(a) || util$5.isPrimitive(b)) return a === b;
  41517. if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;
  41518. var aIsArgs = isArguments(a);
  41519. var bIsArgs = isArguments(b);
  41520. if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false;
  41521. if (aIsArgs) {
  41522. a = pSlice.call(a);
  41523. b = pSlice.call(b);
  41524. return _deepEqual(a, b, strict);
  41525. }
  41526. var ka = objectKeys(a);
  41527. var kb = objectKeys(b);
  41528. var key, i;
  41529. if (ka.length !== kb.length) return false;
  41530. ka.sort();
  41531. kb.sort();
  41532. for (i = ka.length - 1; i >= 0; i--) {
  41533. if (ka[i] !== kb[i]) return false;
  41534. }
  41535. for (i = ka.length - 1; i >= 0; i--) {
  41536. key = ka[i];
  41537. if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) return false;
  41538. }
  41539. return true;
  41540. }
  41541. assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
  41542. if (_deepEqual(actual, expected, false)) {
  41543. fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
  41544. }
  41545. };
  41546. assert.notDeepStrictEqual = notDeepStrictEqual;
  41547. function notDeepStrictEqual(actual, expected, message) {
  41548. if (_deepEqual(actual, expected, true)) {
  41549. fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
  41550. }
  41551. }
  41552. assert.strictEqual = function strictEqual(actual, expected, message) {
  41553. if (actual !== expected) {
  41554. fail(actual, expected, message, '===', assert.strictEqual);
  41555. }
  41556. };
  41557. assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
  41558. if (actual === expected) {
  41559. fail(actual, expected, message, '!==', assert.notStrictEqual);
  41560. }
  41561. };
  41562. function expectedException(actual, expected) {
  41563. if (!actual || !expected) {
  41564. return false;
  41565. }
  41566. if (Object.prototype.toString.call(expected) == '[object RegExp]') {
  41567. return expected.test(actual);
  41568. }
  41569. try {
  41570. if (actual instanceof expected) {
  41571. return true;
  41572. }
  41573. } catch (e) {}
  41574. if (Error.isPrototypeOf(expected)) {
  41575. return false;
  41576. }
  41577. return expected.call({}, actual) === true;
  41578. }
  41579. function _tryBlock(block) {
  41580. var error;
  41581. try {
  41582. block();
  41583. } catch (e) {
  41584. error = e;
  41585. }
  41586. return error;
  41587. }
  41588. function _throws(shouldThrow, block, expected, message) {
  41589. var actual;
  41590. if (typeof block !== 'function') {
  41591. throw new TypeError('"block" argument must be a function');
  41592. }
  41593. if (typeof expected === 'string') {
  41594. message = expected;
  41595. expected = null;
  41596. }
  41597. actual = _tryBlock(block);
  41598. message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.');
  41599. if (shouldThrow && !actual) {
  41600. fail(actual, expected, 'Missing expected exception' + message);
  41601. }
  41602. var userProvidedMessage = typeof message === 'string';
  41603. var isUnwantedException = !shouldThrow && util$5.isError(actual);
  41604. var isUnexpectedException = !shouldThrow && actual && !expected;
  41605. if (isUnwantedException && userProvidedMessage && expectedException(actual, expected) || isUnexpectedException) {
  41606. fail(actual, expected, 'Got unwanted exception' + message);
  41607. }
  41608. if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) {
  41609. throw actual;
  41610. }
  41611. }
  41612. assert["throws"] = function (block, error, message) {
  41613. _throws(true, block, error, message);
  41614. };
  41615. assert.doesNotThrow = function (block, error, message) {
  41616. _throws(false, block, error, message);
  41617. };
  41618. assert.ifError = function (err) {
  41619. if (err) throw err;
  41620. };
  41621. function strict(value, message) {
  41622. if (!value) fail(value, true, message, '==', strict);
  41623. }
  41624. assert.strict = objectAssign(strict, assert, {
  41625. equal: assert.strictEqual,
  41626. deepEqual: assert.deepStrictEqual,
  41627. notEqual: assert.notStrictEqual,
  41628. notDeepEqual: assert.notDeepStrictEqual
  41629. });
  41630. assert.strict.strict = assert.strict;
  41631. var objectKeys = Object.keys || function (obj) {
  41632. var keys = [];
  41633. for (var key in obj) {
  41634. if (hasOwn.call(obj, key)) keys.push(key);
  41635. }
  41636. return keys;
  41637. };
  41638. }, "/$$rollup_base$$/node_modules/assert");
  41639. var ImportBuilder = function () {
  41640. function ImportBuilder(importedSource, scope, hub) {
  41641. this._statements = [];
  41642. this._resultName = null;
  41643. this._scope = null;
  41644. this._hub = null;
  41645. this._importedSource = void 0;
  41646. this._scope = scope;
  41647. this._hub = hub;
  41648. this._importedSource = importedSource;
  41649. }
  41650. var _proto = ImportBuilder.prototype;
  41651. _proto.done = function done() {
  41652. return {
  41653. statements: this._statements,
  41654. resultName: this._resultName
  41655. };
  41656. };
  41657. _proto["import"] = function _import() {
  41658. this._statements.push(importDeclaration([], stringLiteral(this._importedSource)));
  41659. return this;
  41660. };
  41661. _proto.require = function require() {
  41662. this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral(this._importedSource)])));
  41663. return this;
  41664. };
  41665. _proto.namespace = function namespace(name) {
  41666. if (name === void 0) {
  41667. name = "namespace";
  41668. }
  41669. var local = this._scope.generateUidIdentifier(name);
  41670. var statement = this._statements[this._statements.length - 1];
  41671. assert_1(statement.type === "ImportDeclaration");
  41672. assert_1(statement.specifiers.length === 0);
  41673. statement.specifiers = [importNamespaceSpecifier(local)];
  41674. this._resultName = cloneNode(local);
  41675. return this;
  41676. };
  41677. _proto["default"] = function _default(name) {
  41678. name = this._scope.generateUidIdentifier(name);
  41679. var statement = this._statements[this._statements.length - 1];
  41680. assert_1(statement.type === "ImportDeclaration");
  41681. assert_1(statement.specifiers.length === 0);
  41682. statement.specifiers = [importDefaultSpecifier(name)];
  41683. this._resultName = cloneNode(name);
  41684. return this;
  41685. };
  41686. _proto.named = function named(name, importName) {
  41687. if (importName === "default") return this["default"](name);
  41688. name = this._scope.generateUidIdentifier(name);
  41689. var statement = this._statements[this._statements.length - 1];
  41690. assert_1(statement.type === "ImportDeclaration");
  41691. assert_1(statement.specifiers.length === 0);
  41692. statement.specifiers = [importSpecifier(name, identifier(importName))];
  41693. this._resultName = cloneNode(name);
  41694. return this;
  41695. };
  41696. _proto["var"] = function _var(name) {
  41697. name = this._scope.generateUidIdentifier(name);
  41698. var statement = this._statements[this._statements.length - 1];
  41699. if (statement.type !== "ExpressionStatement") {
  41700. assert_1(this._resultName);
  41701. statement = expressionStatement(this._resultName);
  41702. this._statements.push(statement);
  41703. }
  41704. this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(name, statement.expression)]);
  41705. this._resultName = cloneNode(name);
  41706. return this;
  41707. };
  41708. _proto.defaultInterop = function defaultInterop() {
  41709. return this._interop(this._hub.addHelper("interopRequireDefault"));
  41710. };
  41711. _proto.wildcardInterop = function wildcardInterop() {
  41712. return this._interop(this._hub.addHelper("interopRequireWildcard"));
  41713. };
  41714. _proto._interop = function _interop(callee) {
  41715. var statement = this._statements[this._statements.length - 1];
  41716. if (statement.type === "ExpressionStatement") {
  41717. statement.expression = callExpression(callee, [statement.expression]);
  41718. } else if (statement.type === "VariableDeclaration") {
  41719. assert_1(statement.declarations.length === 1);
  41720. statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]);
  41721. } else {
  41722. assert_1.fail("Unexpected type.");
  41723. }
  41724. return this;
  41725. };
  41726. _proto.prop = function prop(name) {
  41727. var statement = this._statements[this._statements.length - 1];
  41728. if (statement.type === "ExpressionStatement") {
  41729. statement.expression = memberExpression(statement.expression, identifier(name));
  41730. } else if (statement.type === "VariableDeclaration") {
  41731. assert_1(statement.declarations.length === 1);
  41732. statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name));
  41733. } else {
  41734. assert_1.fail("Unexpected type:" + statement.type);
  41735. }
  41736. return this;
  41737. };
  41738. _proto.read = function read(name) {
  41739. this._resultName = memberExpression(this._resultName, identifier(name));
  41740. };
  41741. return ImportBuilder;
  41742. }();
  41743. function isModule(path) {
  41744. var sourceType = path.node.sourceType;
  41745. if (sourceType !== "module" && sourceType !== "script") {
  41746. throw path.buildCodeFrameError("Unknown sourceType \"" + sourceType + "\", cannot transform.");
  41747. }
  41748. return path.node.sourceType === "module";
  41749. }
  41750. var ImportInjector = function () {
  41751. function ImportInjector(path, importedSource, opts) {
  41752. this._defaultOpts = {
  41753. importedSource: null,
  41754. importedType: "commonjs",
  41755. importedInterop: "babel",
  41756. importingInterop: "babel",
  41757. ensureLiveReference: false,
  41758. ensureNoContext: false,
  41759. importPosition: "before"
  41760. };
  41761. var programPath = path.find(function (p) {
  41762. return p.isProgram();
  41763. });
  41764. this._programPath = programPath;
  41765. this._programScope = programPath.scope;
  41766. this._hub = programPath.hub;
  41767. this._defaultOpts = this._applyDefaults(importedSource, opts, true);
  41768. }
  41769. var _proto = ImportInjector.prototype;
  41770. _proto.addDefault = function addDefault(importedSourceIn, opts) {
  41771. return this.addNamed("default", importedSourceIn, opts);
  41772. };
  41773. _proto.addNamed = function addNamed(importName, importedSourceIn, opts) {
  41774. assert_1(typeof importName === "string");
  41775. return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
  41776. };
  41777. _proto.addNamespace = function addNamespace(importedSourceIn, opts) {
  41778. return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
  41779. };
  41780. _proto.addSideEffect = function addSideEffect(importedSourceIn, opts) {
  41781. return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
  41782. };
  41783. _proto._applyDefaults = function _applyDefaults(importedSource, opts, isInit) {
  41784. if (isInit === void 0) {
  41785. isInit = false;
  41786. }
  41787. var optsList = [];
  41788. if (typeof importedSource === "string") {
  41789. optsList.push({
  41790. importedSource: importedSource
  41791. });
  41792. optsList.push(opts);
  41793. } else {
  41794. assert_1(!opts, "Unexpected secondary arguments.");
  41795. optsList.push(importedSource);
  41796. }
  41797. var newOpts = Object.assign({}, this._defaultOpts);
  41798. var _loop = function _loop() {
  41799. var opts = _optsList[_i];
  41800. if (!opts) return "continue";
  41801. Object.keys(newOpts).forEach(function (key) {
  41802. if (opts[key] !== undefined) newOpts[key] = opts[key];
  41803. });
  41804. if (!isInit) {
  41805. if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
  41806. if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
  41807. }
  41808. };
  41809. for (var _i = 0, _optsList = optsList; _i < _optsList.length; _i++) {
  41810. var _ret = _loop();
  41811. if (_ret === "continue") continue;
  41812. }
  41813. return newOpts;
  41814. };
  41815. _proto._generateImport = function _generateImport(opts, importName) {
  41816. var isDefault = importName === "default";
  41817. var isNamed = !!importName && !isDefault;
  41818. var isNamespace = importName === null;
  41819. var importedSource = opts.importedSource,
  41820. importedType = opts.importedType,
  41821. importedInterop = opts.importedInterop,
  41822. importingInterop = opts.importingInterop,
  41823. ensureLiveReference = opts.ensureLiveReference,
  41824. ensureNoContext = opts.ensureNoContext,
  41825. nameHint = opts.nameHint,
  41826. importPosition = opts.importPosition,
  41827. blockHoist = opts.blockHoist;
  41828. var name = nameHint || importName;
  41829. var isMod = isModule(this._programPath);
  41830. var isModuleForNode = isMod && importingInterop === "node";
  41831. var isModuleForBabel = isMod && importingInterop === "babel";
  41832. if (importPosition === "after" && !isMod) {
  41833. throw new Error("\"importPosition\": \"after\" is only supported in modules");
  41834. }
  41835. var builder = new ImportBuilder(importedSource, this._programScope, this._hub);
  41836. if (importedType === "es6") {
  41837. if (!isModuleForNode && !isModuleForBabel) {
  41838. throw new Error("Cannot import an ES6 module from CommonJS");
  41839. }
  41840. builder["import"]();
  41841. if (isNamespace) {
  41842. builder.namespace(nameHint || importedSource);
  41843. } else if (isDefault || isNamed) {
  41844. builder.named(name, importName);
  41845. }
  41846. } else if (importedType !== "commonjs") {
  41847. throw new Error("Unexpected interopType \"" + importedType + "\"");
  41848. } else if (importedInterop === "babel") {
  41849. if (isModuleForNode) {
  41850. name = name !== "default" ? name : importedSource;
  41851. var es6Default = importedSource + "$es6Default";
  41852. builder["import"]();
  41853. if (isNamespace) {
  41854. builder["default"](es6Default)["var"](name || importedSource).wildcardInterop();
  41855. } else if (isDefault) {
  41856. if (ensureLiveReference) {
  41857. builder["default"](es6Default)["var"](name || importedSource).defaultInterop().read("default");
  41858. } else {
  41859. builder["default"](es6Default)["var"](name).defaultInterop().prop(importName);
  41860. }
  41861. } else if (isNamed) {
  41862. builder["default"](es6Default).read(importName);
  41863. }
  41864. } else if (isModuleForBabel) {
  41865. builder["import"]();
  41866. if (isNamespace) {
  41867. builder.namespace(name || importedSource);
  41868. } else if (isDefault || isNamed) {
  41869. builder.named(name, importName);
  41870. }
  41871. } else {
  41872. builder.require();
  41873. if (isNamespace) {
  41874. builder["var"](name || importedSource).wildcardInterop();
  41875. } else if ((isDefault || isNamed) && ensureLiveReference) {
  41876. if (isDefault) {
  41877. name = name !== "default" ? name : importedSource;
  41878. builder["var"](name).read(importName);
  41879. builder.defaultInterop();
  41880. } else {
  41881. builder["var"](importedSource).read(importName);
  41882. }
  41883. } else if (isDefault) {
  41884. builder["var"](name).defaultInterop().prop(importName);
  41885. } else if (isNamed) {
  41886. builder["var"](name).prop(importName);
  41887. }
  41888. }
  41889. } else if (importedInterop === "compiled") {
  41890. if (isModuleForNode) {
  41891. builder["import"]();
  41892. if (isNamespace) {
  41893. builder["default"](name || importedSource);
  41894. } else if (isDefault || isNamed) {
  41895. builder["default"](importedSource).read(name);
  41896. }
  41897. } else if (isModuleForBabel) {
  41898. builder["import"]();
  41899. if (isNamespace) {
  41900. builder.namespace(name || importedSource);
  41901. } else if (isDefault || isNamed) {
  41902. builder.named(name, importName);
  41903. }
  41904. } else {
  41905. builder.require();
  41906. if (isNamespace) {
  41907. builder["var"](name || importedSource);
  41908. } else if (isDefault || isNamed) {
  41909. if (ensureLiveReference) {
  41910. builder["var"](importedSource).read(name);
  41911. } else {
  41912. builder.prop(importName)["var"](name);
  41913. }
  41914. }
  41915. }
  41916. } else if (importedInterop === "uncompiled") {
  41917. if (isDefault && ensureLiveReference) {
  41918. throw new Error("No live reference for commonjs default");
  41919. }
  41920. if (isModuleForNode) {
  41921. builder["import"]();
  41922. if (isNamespace) {
  41923. builder["default"](name || importedSource);
  41924. } else if (isDefault) {
  41925. builder["default"](name);
  41926. } else if (isNamed) {
  41927. builder["default"](importedSource).read(name);
  41928. }
  41929. } else if (isModuleForBabel) {
  41930. builder["import"]();
  41931. if (isNamespace) {
  41932. builder["default"](name || importedSource);
  41933. } else if (isDefault) {
  41934. builder["default"](name);
  41935. } else if (isNamed) {
  41936. builder.named(name, importName);
  41937. }
  41938. } else {
  41939. builder.require();
  41940. if (isNamespace) {
  41941. builder["var"](name || importedSource);
  41942. } else if (isDefault) {
  41943. builder["var"](name);
  41944. } else if (isNamed) {
  41945. if (ensureLiveReference) {
  41946. builder["var"](importedSource).read(name);
  41947. } else {
  41948. builder["var"](name).prop(importName);
  41949. }
  41950. }
  41951. }
  41952. } else {
  41953. throw new Error("Unknown importedInterop \"" + importedInterop + "\".");
  41954. }
  41955. var _builder$done = builder.done(),
  41956. statements = _builder$done.statements,
  41957. resultName = _builder$done.resultName;
  41958. this._insertStatements(statements, importPosition, blockHoist);
  41959. if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
  41960. return sequenceExpression([numericLiteral(0), resultName]);
  41961. }
  41962. return resultName;
  41963. };
  41964. _proto._insertStatements = function _insertStatements(statements, importPosition, blockHoist) {
  41965. if (importPosition === void 0) {
  41966. importPosition = "before";
  41967. }
  41968. if (blockHoist === void 0) {
  41969. blockHoist = 3;
  41970. }
  41971. var body = this._programPath.get("body");
  41972. if (importPosition === "after") {
  41973. for (var i = body.length - 1; i >= 0; i--) {
  41974. if (body[i].isImportDeclaration()) {
  41975. body[i].insertAfter(statements);
  41976. return;
  41977. }
  41978. }
  41979. } else {
  41980. statements.forEach(function (node) {
  41981. node._blockHoist = blockHoist;
  41982. });
  41983. var targetPath = body.find(function (p) {
  41984. var val = p.node._blockHoist;
  41985. return Number.isFinite(val) && val < 4;
  41986. });
  41987. if (targetPath) {
  41988. targetPath.insertBefore(statements);
  41989. return;
  41990. }
  41991. }
  41992. this._programPath.unshiftContainer("body", statements);
  41993. };
  41994. return ImportInjector;
  41995. }();
  41996. function addDefault(path, importedSource, opts) {
  41997. return new ImportInjector(path).addDefault(importedSource, opts);
  41998. }
  41999. function addNamed(path, name, importedSource, opts) {
  42000. return new ImportInjector(path).addNamed(name, importedSource, opts);
  42001. }
  42002. function addNamespace(path, importedSource, opts) {
  42003. return new ImportInjector(path).addNamespace(importedSource, opts);
  42004. }
  42005. function willPathCastToBoolean$1(path) {
  42006. var maybeWrapped = path;
  42007. var node = maybeWrapped.node,
  42008. parentPath = maybeWrapped.parentPath;
  42009. if (parentPath.isLogicalExpression()) {
  42010. var _parentPath$node = parentPath.node,
  42011. operator = _parentPath$node.operator,
  42012. right = _parentPath$node.right;
  42013. if (operator === "&&" || operator === "||" || operator === "??" && node === right) {
  42014. return willPathCastToBoolean$1(parentPath);
  42015. }
  42016. }
  42017. if (parentPath.isSequenceExpression()) {
  42018. var expressions = parentPath.node.expressions;
  42019. if (expressions[expressions.length - 1] === node) {
  42020. return willPathCastToBoolean$1(parentPath);
  42021. } else {
  42022. return true;
  42023. }
  42024. }
  42025. return parentPath.isConditional({
  42026. test: node
  42027. }) || parentPath.isUnaryExpression({
  42028. operator: "!"
  42029. }) || parentPath.isLoop({
  42030. test: node
  42031. });
  42032. }
  42033. var AssignmentMemoiser = function () {
  42034. function AssignmentMemoiser() {
  42035. this._map = void 0;
  42036. this._map = new WeakMap();
  42037. }
  42038. var _proto = AssignmentMemoiser.prototype;
  42039. _proto.has = function has(key) {
  42040. return this._map.has(key);
  42041. };
  42042. _proto.get = function get(key) {
  42043. if (!this.has(key)) return;
  42044. var record = this._map.get(key);
  42045. var value = record.value;
  42046. record.count--;
  42047. if (record.count === 0) {
  42048. return assignmentExpression("=", value, key);
  42049. }
  42050. return value;
  42051. };
  42052. _proto.set = function set(key, value, count) {
  42053. return this._map.set(key, {
  42054. count: count,
  42055. value: value
  42056. });
  42057. };
  42058. return AssignmentMemoiser;
  42059. }();
  42060. function toNonOptional(path, base) {
  42061. var node = path.node;
  42062. if (path.isOptionalMemberExpression()) {
  42063. return memberExpression(base, node.property, node.computed);
  42064. }
  42065. if (path.isOptionalCallExpression()) {
  42066. var callee = path.get("callee");
  42067. if (path.node.optional && callee.isOptionalMemberExpression()) {
  42068. var object = callee.node.object;
  42069. var context = path.scope.maybeGenerateMemoised(object) || object;
  42070. callee.get("object").replaceWith(assignmentExpression("=", context, object));
  42071. return callExpression(memberExpression(base, identifier("call")), [context].concat(_toConsumableArray(node.arguments)));
  42072. }
  42073. return callExpression(base, node.arguments);
  42074. }
  42075. return path.node;
  42076. }
  42077. function isInDetachedTree(path) {
  42078. while (path) {
  42079. if (path.isProgram()) break;
  42080. var _path = path,
  42081. parentPath = _path.parentPath,
  42082. container = _path.container,
  42083. listKey = _path.listKey;
  42084. var parentNode = parentPath.node;
  42085. if (listKey) {
  42086. if (container !== parentNode[listKey]) return true;
  42087. } else {
  42088. if (container !== parentNode) return true;
  42089. }
  42090. path = parentPath;
  42091. }
  42092. return false;
  42093. }
  42094. var handle = {
  42095. memoise: function memoise() {},
  42096. handle: function handle(member, noDocumentAll) {
  42097. var node = member.node,
  42098. parent = member.parent,
  42099. parentPath = member.parentPath,
  42100. scope = member.scope;
  42101. if (member.isOptionalMemberExpression()) {
  42102. if (isInDetachedTree(member)) return;
  42103. var endPath = member.find(function (_ref) {
  42104. var node = _ref.node,
  42105. parent = _ref.parent,
  42106. parentPath = _ref.parentPath;
  42107. if (parentPath.isOptionalMemberExpression()) {
  42108. return parent.optional || parent.object !== node;
  42109. }
  42110. if (parentPath.isOptionalCallExpression()) {
  42111. return node !== member.node && parent.optional || parent.callee !== node;
  42112. }
  42113. return true;
  42114. });
  42115. if (scope.path.isPattern()) {
  42116. endPath.replaceWith(callExpression(arrowFunctionExpression([], endPath.node), []));
  42117. return;
  42118. }
  42119. var willEndPathCastToBoolean = willPathCastToBoolean$1(endPath);
  42120. var rootParentPath = endPath.parentPath;
  42121. if (rootParentPath.isUpdateExpression({
  42122. argument: node
  42123. }) || rootParentPath.isAssignmentExpression({
  42124. left: node
  42125. })) {
  42126. throw member.buildCodeFrameError("can't handle assignment");
  42127. }
  42128. var isDeleteOperation = rootParentPath.isUnaryExpression({
  42129. operator: "delete"
  42130. });
  42131. if (isDeleteOperation && endPath.isOptionalMemberExpression() && endPath.get("property").isPrivateName()) {
  42132. throw member.buildCodeFrameError("can't delete a private class element");
  42133. }
  42134. var startingOptional = member;
  42135. for (;;) {
  42136. if (startingOptional.isOptionalMemberExpression()) {
  42137. if (startingOptional.node.optional) break;
  42138. startingOptional = startingOptional.get("object");
  42139. continue;
  42140. } else if (startingOptional.isOptionalCallExpression()) {
  42141. if (startingOptional.node.optional) break;
  42142. startingOptional = startingOptional.get("callee");
  42143. continue;
  42144. }
  42145. throw new Error("Internal error: unexpected " + startingOptional.node.type);
  42146. }
  42147. var startingProp = startingOptional.isOptionalMemberExpression() ? "object" : "callee";
  42148. var startingNode = startingOptional.node[startingProp];
  42149. var baseNeedsMemoised = scope.maybeGenerateMemoised(startingNode);
  42150. var baseRef = baseNeedsMemoised != null ? baseNeedsMemoised : startingNode;
  42151. var parentIsOptionalCall = parentPath.isOptionalCallExpression({
  42152. callee: node
  42153. });
  42154. var parentIsCall = parentPath.isCallExpression({
  42155. callee: node
  42156. });
  42157. startingOptional.replaceWith(toNonOptional(startingOptional, baseRef));
  42158. if (parentIsOptionalCall) {
  42159. if (parent.optional) {
  42160. parentPath.replaceWith(this.optionalCall(member, parent.arguments));
  42161. } else {
  42162. parentPath.replaceWith(this.call(member, parent.arguments));
  42163. }
  42164. } else if (parentIsCall) {
  42165. member.replaceWith(this.boundGet(member));
  42166. } else {
  42167. member.replaceWith(this.get(member));
  42168. }
  42169. var regular = member.node;
  42170. for (var current = member; current !== endPath;) {
  42171. var _current = current,
  42172. _parentPath = _current.parentPath;
  42173. if (_parentPath === endPath && parentIsOptionalCall && parent.optional) {
  42174. regular = _parentPath.node;
  42175. break;
  42176. }
  42177. regular = toNonOptional(_parentPath, regular);
  42178. current = _parentPath;
  42179. }
  42180. var context;
  42181. var endParentPath = endPath.parentPath;
  42182. if (isMemberExpression(regular) && endParentPath.isOptionalCallExpression({
  42183. callee: endPath.node,
  42184. optional: true
  42185. })) {
  42186. var _regular = regular,
  42187. object = _regular.object;
  42188. context = member.scope.maybeGenerateMemoised(object);
  42189. if (context) {
  42190. regular.object = assignmentExpression("=", context, object);
  42191. }
  42192. }
  42193. var replacementPath = endPath;
  42194. if (isDeleteOperation) {
  42195. replacementPath = endParentPath;
  42196. regular = endParentPath.node;
  42197. }
  42198. var baseMemoised = baseNeedsMemoised ? assignmentExpression("=", cloneNode(baseRef), cloneNode(startingNode)) : cloneNode(baseRef);
  42199. if (willEndPathCastToBoolean) {
  42200. var nonNullishCheck;
  42201. if (noDocumentAll) {
  42202. nonNullishCheck = binaryExpression("!=", baseMemoised, nullLiteral());
  42203. } else {
  42204. nonNullishCheck = logicalExpression("&&", binaryExpression("!==", baseMemoised, nullLiteral()), binaryExpression("!==", cloneNode(baseRef), scope.buildUndefinedNode()));
  42205. }
  42206. replacementPath.replaceWith(logicalExpression("&&", nonNullishCheck, regular));
  42207. } else {
  42208. var nullishCheck;
  42209. if (noDocumentAll) {
  42210. nullishCheck = binaryExpression("==", baseMemoised, nullLiteral());
  42211. } else {
  42212. nullishCheck = logicalExpression("||", binaryExpression("===", baseMemoised, nullLiteral()), binaryExpression("===", cloneNode(baseRef), scope.buildUndefinedNode()));
  42213. }
  42214. replacementPath.replaceWith(conditionalExpression(nullishCheck, isDeleteOperation ? booleanLiteral(true) : scope.buildUndefinedNode(), regular));
  42215. }
  42216. if (context) {
  42217. var endParent = endParentPath.node;
  42218. endParentPath.replaceWith(optionalCallExpression(optionalMemberExpression(endParent.callee, identifier("call"), false, true), [cloneNode(context)].concat(_toConsumableArray(endParent.arguments)), false));
  42219. }
  42220. return;
  42221. }
  42222. if (parentPath.isUpdateExpression({
  42223. argument: node
  42224. })) {
  42225. if (this.simpleSet) {
  42226. member.replaceWith(this.simpleSet(member));
  42227. return;
  42228. }
  42229. var operator = parent.operator,
  42230. prefix = parent.prefix;
  42231. this.memoise(member, 2);
  42232. var value = binaryExpression(operator[0], unaryExpression("+", this.get(member)), numericLiteral(1));
  42233. if (prefix) {
  42234. parentPath.replaceWith(this.set(member, value));
  42235. } else {
  42236. var _scope = member.scope;
  42237. var ref = _scope.generateUidIdentifierBasedOnNode(node);
  42238. _scope.push({
  42239. id: ref
  42240. });
  42241. value.left = assignmentExpression("=", cloneNode(ref), value.left);
  42242. parentPath.replaceWith(sequenceExpression([this.set(member, value), cloneNode(ref)]));
  42243. }
  42244. return;
  42245. }
  42246. if (parentPath.isAssignmentExpression({
  42247. left: node
  42248. })) {
  42249. if (this.simpleSet) {
  42250. member.replaceWith(this.simpleSet(member));
  42251. return;
  42252. }
  42253. var _operator = parent.operator,
  42254. _value = parent.right;
  42255. if (_operator === "=") {
  42256. parentPath.replaceWith(this.set(member, _value));
  42257. } else {
  42258. var operatorTrunc = _operator.slice(0, -1);
  42259. if (LOGICAL_OPERATORS.includes(operatorTrunc)) {
  42260. this.memoise(member, 1);
  42261. parentPath.replaceWith(logicalExpression(operatorTrunc, this.get(member), this.set(member, _value)));
  42262. } else {
  42263. this.memoise(member, 2);
  42264. parentPath.replaceWith(this.set(member, binaryExpression(operatorTrunc, this.get(member), _value)));
  42265. }
  42266. }
  42267. return;
  42268. }
  42269. if (parentPath.isCallExpression({
  42270. callee: node
  42271. })) {
  42272. parentPath.replaceWith(this.call(member, parent.arguments));
  42273. return;
  42274. }
  42275. if (parentPath.isOptionalCallExpression({
  42276. callee: node
  42277. })) {
  42278. if (scope.path.isPattern()) {
  42279. parentPath.replaceWith(callExpression(arrowFunctionExpression([], parentPath.node), []));
  42280. return;
  42281. }
  42282. parentPath.replaceWith(this.optionalCall(member, parent.arguments));
  42283. return;
  42284. }
  42285. if (parentPath.isForXStatement({
  42286. left: node
  42287. }) || parentPath.isObjectProperty({
  42288. value: node
  42289. }) && parentPath.parentPath.isObjectPattern() || parentPath.isAssignmentPattern({
  42290. left: node
  42291. }) && parentPath.parentPath.isObjectProperty({
  42292. value: parent
  42293. }) && parentPath.parentPath.parentPath.isObjectPattern() || parentPath.isArrayPattern() || parentPath.isAssignmentPattern({
  42294. left: node
  42295. }) && parentPath.parentPath.isArrayPattern() || parentPath.isRestElement()) {
  42296. member.replaceWith(this.destructureSet(member));
  42297. return;
  42298. }
  42299. if (parentPath.isTaggedTemplateExpression()) {
  42300. member.replaceWith(this.boundGet(member));
  42301. } else {
  42302. member.replaceWith(this.get(member));
  42303. }
  42304. }
  42305. };
  42306. function memberExpressionToFunctions(path, visitor, state) {
  42307. path.traverse(visitor, Object.assign({}, handle, state, {
  42308. memoiser: new AssignmentMemoiser()
  42309. }));
  42310. }
  42311. function optimiseCallExpression(callee, thisNode, args, optional) {
  42312. if (args.length === 1 && isSpreadElement(args[0]) && isIdentifier(args[0].argument, {
  42313. name: "arguments"
  42314. })) {
  42315. if (optional) {
  42316. return optionalCallExpression(optionalMemberExpression(callee, identifier("apply"), false, true), [thisNode, args[0].argument], false);
  42317. }
  42318. return callExpression(memberExpression(callee, identifier("apply")), [thisNode, args[0].argument]);
  42319. } else {
  42320. if (optional) {
  42321. return optionalCallExpression(optionalMemberExpression(callee, identifier("call"), false, true), [thisNode].concat(_toConsumableArray(args)), false);
  42322. }
  42323. return callExpression(memberExpression(callee, identifier("call")), [thisNode].concat(_toConsumableArray(args)));
  42324. }
  42325. }
  42326. var _environmentVisitor;
  42327. function getPrototypeOfExpression(objectRef, isStatic, file, isPrivateMethod) {
  42328. objectRef = cloneNode(objectRef);
  42329. var targetRef = isStatic || isPrivateMethod ? objectRef : memberExpression(objectRef, identifier("prototype"));
  42330. return callExpression(file.addHelper("getPrototypeOf"), [targetRef]);
  42331. }
  42332. function skipAllButComputedKey(path) {
  42333. if (!path.node.computed) {
  42334. path.skip();
  42335. return;
  42336. }
  42337. var keys = VISITOR_KEYS[path.type];
  42338. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  42339. var key = _step.value;
  42340. if (key !== "key") path.skipKey(key);
  42341. }
  42342. }
  42343. var environmentVisitor = (_environmentVisitor = {}, _environmentVisitor[(staticBlock ? "StaticBlock|" : "") + "ClassPrivateProperty|TypeAnnotation"] = function ClassPrivatePropertyTypeAnnotation(path) {
  42344. path.skip();
  42345. }, _environmentVisitor.Function = function Function(path) {
  42346. if (path.isMethod()) return;
  42347. if (path.isArrowFunctionExpression()) return;
  42348. path.skip();
  42349. }, _environmentVisitor["Method|ClassProperty"] = function MethodClassProperty(path) {
  42350. skipAllButComputedKey(path);
  42351. }, _environmentVisitor);
  42352. var visitor$1 = traverse.visitors.merge([environmentVisitor, {
  42353. Super: function Super(path, state) {
  42354. var node = path.node,
  42355. parentPath = path.parentPath;
  42356. if (!parentPath.isMemberExpression({
  42357. object: node
  42358. })) return;
  42359. state.handle(parentPath);
  42360. }
  42361. }]);
  42362. var unshadowSuperBindingVisitor = traverse.visitors.merge([environmentVisitor, {
  42363. Scopable: function Scopable(path, _ref) {
  42364. var refName = _ref.refName;
  42365. var binding = path.scope.getOwnBinding(refName);
  42366. if (binding && binding.identifier.name === refName) {
  42367. path.scope.rename(refName);
  42368. }
  42369. }
  42370. }]);
  42371. var specHandlers = {
  42372. memoise: function memoise(superMember, count) {
  42373. var scope = superMember.scope,
  42374. node = superMember.node;
  42375. var computed = node.computed,
  42376. property = node.property;
  42377. if (!computed) {
  42378. return;
  42379. }
  42380. var memo = scope.maybeGenerateMemoised(property);
  42381. if (!memo) {
  42382. return;
  42383. }
  42384. this.memoiser.set(property, memo, count);
  42385. },
  42386. prop: function prop(superMember) {
  42387. var _superMember$node = superMember.node,
  42388. computed = _superMember$node.computed,
  42389. property = _superMember$node.property;
  42390. if (this.memoiser.has(property)) {
  42391. return cloneNode(this.memoiser.get(property));
  42392. }
  42393. if (computed) {
  42394. return cloneNode(property);
  42395. }
  42396. return stringLiteral(property.name);
  42397. },
  42398. get: function get(superMember) {
  42399. return this._get(superMember, this._getThisRefs());
  42400. },
  42401. _get: function _get(superMember, thisRefs) {
  42402. var proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
  42403. return callExpression(this.file.addHelper("get"), [thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto, this.prop(superMember), thisRefs["this"]]);
  42404. },
  42405. _getThisRefs: function _getThisRefs() {
  42406. if (!this.isDerivedConstructor) {
  42407. return {
  42408. "this": thisExpression()
  42409. };
  42410. }
  42411. var thisRef = this.scope.generateDeclaredUidIdentifier("thisSuper");
  42412. return {
  42413. memo: assignmentExpression("=", thisRef, thisExpression()),
  42414. "this": cloneNode(thisRef)
  42415. };
  42416. },
  42417. set: function set(superMember, value) {
  42418. var thisRefs = this._getThisRefs();
  42419. var proto = getPrototypeOfExpression(this.getObjectRef(), this.isStatic, this.file, this.isPrivateMethod);
  42420. return callExpression(this.file.addHelper("set"), [thisRefs.memo ? sequenceExpression([thisRefs.memo, proto]) : proto, this.prop(superMember), value, thisRefs["this"], booleanLiteral(superMember.isInStrictMode())]);
  42421. },
  42422. destructureSet: function destructureSet(superMember) {
  42423. throw superMember.buildCodeFrameError("Destructuring to a super field is not supported yet.");
  42424. },
  42425. call: function call(superMember, args) {
  42426. var thisRefs = this._getThisRefs();
  42427. return optimiseCallExpression(this._get(superMember, thisRefs), cloneNode(thisRefs["this"]), args, false);
  42428. },
  42429. optionalCall: function optionalCall(superMember, args) {
  42430. var thisRefs = this._getThisRefs();
  42431. return optimiseCallExpression(this._get(superMember, thisRefs), cloneNode(thisRefs["this"]), args, true);
  42432. }
  42433. };
  42434. var looseHandlers = Object.assign({}, specHandlers, {
  42435. prop: function prop(superMember) {
  42436. var property = superMember.node.property;
  42437. if (this.memoiser.has(property)) {
  42438. return cloneNode(this.memoiser.get(property));
  42439. }
  42440. return cloneNode(property);
  42441. },
  42442. get: function get(superMember) {
  42443. var isStatic = this.isStatic,
  42444. getSuperRef = this.getSuperRef;
  42445. var computed = superMember.node.computed;
  42446. var prop = this.prop(superMember);
  42447. var object;
  42448. if (isStatic) {
  42449. var _getSuperRef;
  42450. object = (_getSuperRef = getSuperRef()) != null ? _getSuperRef : memberExpression(identifier("Function"), identifier("prototype"));
  42451. } else {
  42452. var _getSuperRef2;
  42453. object = memberExpression((_getSuperRef2 = getSuperRef()) != null ? _getSuperRef2 : identifier("Object"), identifier("prototype"));
  42454. }
  42455. return memberExpression(object, prop, computed);
  42456. },
  42457. set: function set(superMember, value) {
  42458. var computed = superMember.node.computed;
  42459. var prop = this.prop(superMember);
  42460. return assignmentExpression("=", memberExpression(thisExpression(), prop, computed), value);
  42461. },
  42462. destructureSet: function destructureSet(superMember) {
  42463. var computed = superMember.node.computed;
  42464. var prop = this.prop(superMember);
  42465. return memberExpression(thisExpression(), prop, computed);
  42466. },
  42467. call: function call(superMember, args) {
  42468. return optimiseCallExpression(this.get(superMember), thisExpression(), args, false);
  42469. },
  42470. optionalCall: function optionalCall(superMember, args) {
  42471. return optimiseCallExpression(this.get(superMember), thisExpression(), args, true);
  42472. }
  42473. });
  42474. var ReplaceSupers = function () {
  42475. function ReplaceSupers(opts) {
  42476. var _opts$constantSuper;
  42477. var path = opts.methodPath;
  42478. this.methodPath = path;
  42479. this.isDerivedConstructor = path.isClassMethod({
  42480. kind: "constructor"
  42481. }) && !!opts.superRef;
  42482. this.isStatic = path.isObjectMethod() || path.node["static"] || (path.isStaticBlock == null ? void 0 : path.isStaticBlock());
  42483. this.isPrivateMethod = path.isPrivate() && path.isMethod();
  42484. this.file = opts.file;
  42485. this.constantSuper = (_opts$constantSuper = opts.constantSuper) != null ? _opts$constantSuper : opts.isLoose;
  42486. this.opts = opts;
  42487. }
  42488. var _proto = ReplaceSupers.prototype;
  42489. _proto.getObjectRef = function getObjectRef() {
  42490. return cloneNode(this.opts.objectRef || this.opts.getObjectRef());
  42491. };
  42492. _proto.getSuperRef = function getSuperRef() {
  42493. if (this.opts.superRef) return cloneNode(this.opts.superRef);
  42494. if (this.opts.getSuperRef) return cloneNode(this.opts.getSuperRef());
  42495. };
  42496. _proto.replace = function replace() {
  42497. if (this.opts.refToPreserve) {
  42498. this.methodPath.traverse(unshadowSuperBindingVisitor, {
  42499. refName: this.opts.refToPreserve.name
  42500. });
  42501. }
  42502. var handler = this.constantSuper ? looseHandlers : specHandlers;
  42503. memberExpressionToFunctions(this.methodPath, visitor$1, Object.assign({
  42504. file: this.file,
  42505. scope: this.methodPath.scope,
  42506. isDerivedConstructor: this.isDerivedConstructor,
  42507. isStatic: this.isStatic,
  42508. isPrivateMethod: this.isPrivateMethod,
  42509. getObjectRef: this.getObjectRef.bind(this),
  42510. getSuperRef: this.getSuperRef.bind(this)
  42511. }, handler));
  42512. };
  42513. return ReplaceSupers;
  42514. }();
  42515. function rewriteThis(programPath) {
  42516. traverse(programPath.node, Object.assign({}, rewriteThisVisitor, {
  42517. noScope: true
  42518. }));
  42519. }
  42520. var rewriteThisVisitor = traverse.visitors.merge([environmentVisitor, {
  42521. ThisExpression: function (_ThisExpression) {
  42522. function ThisExpression(_x) {
  42523. return _ThisExpression.apply(this, arguments);
  42524. }
  42525. ThisExpression.toString = function () {
  42526. return _ThisExpression.toString();
  42527. };
  42528. return ThisExpression;
  42529. }(function (path) {
  42530. path.replaceWith(unaryExpression("void", numericLiteral(0), true));
  42531. })
  42532. }]);
  42533. function simplifyAccess(path, bindingNames) {
  42534. path.traverse(simpleAssignmentVisitor, {
  42535. scope: path.scope,
  42536. bindingNames: bindingNames,
  42537. seen: new WeakSet()
  42538. });
  42539. }
  42540. var simpleAssignmentVisitor = {
  42541. UpdateExpression: {
  42542. exit: function exit(path) {
  42543. var scope = this.scope,
  42544. bindingNames = this.bindingNames;
  42545. var arg = path.get("argument");
  42546. if (!arg.isIdentifier()) return;
  42547. var localName = arg.node.name;
  42548. if (!bindingNames.has(localName)) return;
  42549. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  42550. return;
  42551. }
  42552. if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) {
  42553. var operator = path.node.operator == "++" ? "+=" : "-=";
  42554. path.replaceWith(assignmentExpression(operator, arg.node, numericLiteral(1)));
  42555. } else if (path.node.prefix) {
  42556. path.replaceWith(assignmentExpression("=", identifier(localName), binaryExpression(path.node.operator[0], unaryExpression("+", arg.node), numericLiteral(1))));
  42557. } else {
  42558. var old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old");
  42559. var varName = old.name;
  42560. path.scope.push({
  42561. id: old
  42562. });
  42563. var binary = binaryExpression(path.node.operator[0], identifier(varName), numericLiteral(1));
  42564. path.replaceWith(sequenceExpression([assignmentExpression("=", identifier(varName), unaryExpression("+", arg.node)), assignmentExpression("=", cloneNode(arg.node), binary), identifier(varName)]));
  42565. }
  42566. }
  42567. },
  42568. AssignmentExpression: {
  42569. exit: function exit(path) {
  42570. var scope = this.scope,
  42571. seen = this.seen,
  42572. bindingNames = this.bindingNames;
  42573. if (path.node.operator === "=") return;
  42574. if (seen.has(path.node)) return;
  42575. seen.add(path.node);
  42576. var left = path.get("left");
  42577. if (!left.isIdentifier()) return;
  42578. var localName = left.node.name;
  42579. if (!bindingNames.has(localName)) return;
  42580. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  42581. return;
  42582. }
  42583. path.node.right = binaryExpression(path.node.operator.slice(0, -1), cloneNode(path.node.left), path.node.right);
  42584. path.node.operator = "=";
  42585. }
  42586. }
  42587. };
  42588. var _templateObject$m;
  42589. function rewriteLiveReferences(programPath, metadata) {
  42590. var imported = new Map();
  42591. var exported = new Map();
  42592. var requeueInParent = function requeueInParent(path) {
  42593. programPath.requeue(path);
  42594. };
  42595. for (var _iterator = _createForOfIteratorHelperLoose(metadata.source), _step; !(_step = _iterator()).done;) {
  42596. var _step$value = _slicedToArray$2(_step.value, 2),
  42597. source = _step$value[0],
  42598. data = _step$value[1];
  42599. for (var _iterator3 = _createForOfIteratorHelperLoose(data.imports), _step3; !(_step3 = _iterator3()).done;) {
  42600. var _step3$value = _slicedToArray$2(_step3.value, 2),
  42601. localName = _step3$value[0],
  42602. importName = _step3$value[1];
  42603. imported.set(localName, [source, importName, null]);
  42604. }
  42605. for (var _iterator4 = _createForOfIteratorHelperLoose(data.importsNamespace), _step4; !(_step4 = _iterator4()).done;) {
  42606. var _localName = _step4.value;
  42607. imported.set(_localName, [source, null, _localName]);
  42608. }
  42609. }
  42610. for (var _iterator2 = _createForOfIteratorHelperLoose(metadata.local), _step2; !(_step2 = _iterator2()).done;) {
  42611. var _exportMeta;
  42612. var _step2$value = _slicedToArray$2(_step2.value, 2),
  42613. local = _step2$value[0],
  42614. _data = _step2$value[1];
  42615. var exportMeta = exported.get(local);
  42616. if (!exportMeta) {
  42617. exportMeta = [];
  42618. exported.set(local, exportMeta);
  42619. }
  42620. (_exportMeta = exportMeta).push.apply(_exportMeta, _toConsumableArray(_data.names));
  42621. }
  42622. var rewriteBindingInitVisitorState = {
  42623. metadata: metadata,
  42624. requeueInParent: requeueInParent,
  42625. scope: programPath.scope,
  42626. exported: exported
  42627. };
  42628. programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState);
  42629. simplifyAccess(programPath, new Set([].concat(_toConsumableArray(Array.from(imported.keys())), _toConsumableArray(Array.from(exported.keys())))));
  42630. var rewriteReferencesVisitorState = {
  42631. seen: new WeakSet(),
  42632. metadata: metadata,
  42633. requeueInParent: requeueInParent,
  42634. scope: programPath.scope,
  42635. imported: imported,
  42636. exported: exported,
  42637. buildImportReference: function buildImportReference(_ref, identNode) {
  42638. var _ref2 = _slicedToArray$2(_ref, 3),
  42639. source = _ref2[0],
  42640. importName = _ref2[1],
  42641. localName = _ref2[2];
  42642. var meta = metadata.source.get(source);
  42643. if (localName) {
  42644. if (meta.lazy) identNode = callExpression(identNode, []);
  42645. return identNode;
  42646. }
  42647. var namespace = identifier(meta.name);
  42648. if (meta.lazy) namespace = callExpression(namespace, []);
  42649. if (importName === "default" && meta.interop === "node-default") {
  42650. return namespace;
  42651. }
  42652. var computed = metadata.stringSpecifiers.has(importName);
  42653. return memberExpression(namespace, computed ? stringLiteral(importName) : identifier(importName), computed);
  42654. }
  42655. };
  42656. programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);
  42657. }
  42658. var rewriteBindingInitVisitor = {
  42659. Scope: function Scope(path) {
  42660. path.skip();
  42661. },
  42662. ClassDeclaration: function ClassDeclaration(path) {
  42663. var requeueInParent = this.requeueInParent,
  42664. exported = this.exported,
  42665. metadata = this.metadata;
  42666. var id = path.node.id;
  42667. if (!id) throw new Error("Expected class to have a name");
  42668. var localName = id.name;
  42669. var exportNames = exported.get(localName) || [];
  42670. if (exportNames.length > 0) {
  42671. var statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName)));
  42672. statement._blockHoist = path.node._blockHoist;
  42673. requeueInParent(path.insertAfter(statement)[0]);
  42674. }
  42675. },
  42676. VariableDeclaration: function VariableDeclaration(path) {
  42677. var requeueInParent = this.requeueInParent,
  42678. exported = this.exported,
  42679. metadata = this.metadata;
  42680. Object.keys(path.getOuterBindingIdentifiers()).forEach(function (localName) {
  42681. var exportNames = exported.get(localName) || [];
  42682. if (exportNames.length > 0) {
  42683. var statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName)));
  42684. statement._blockHoist = path.node._blockHoist;
  42685. requeueInParent(path.insertAfter(statement)[0]);
  42686. }
  42687. });
  42688. }
  42689. };
  42690. var buildBindingExportAssignmentExpression = function buildBindingExportAssignmentExpression(metadata, exportNames, localExpr) {
  42691. return (exportNames || []).reduce(function (expr, exportName) {
  42692. var stringSpecifiers = metadata.stringSpecifiers;
  42693. var computed = stringSpecifiers.has(exportName);
  42694. return assignmentExpression("=", memberExpression(identifier(metadata.exportName), computed ? stringLiteral(exportName) : identifier(exportName), computed), expr);
  42695. }, localExpr);
  42696. };
  42697. var buildImportThrow = function buildImportThrow(localName) {
  42698. return template$2.expression.ast(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n (function() {\n throw new Error('\"' + '", "' + '\" is read-only.');\n })()\n "])), localName);
  42699. };
  42700. var rewriteReferencesVisitor = {
  42701. ReferencedIdentifier: function ReferencedIdentifier(path) {
  42702. var seen = this.seen,
  42703. buildImportReference = this.buildImportReference,
  42704. scope = this.scope,
  42705. imported = this.imported,
  42706. requeueInParent = this.requeueInParent;
  42707. if (seen.has(path.node)) return;
  42708. seen.add(path.node);
  42709. var localName = path.node.name;
  42710. var importData = imported.get(localName);
  42711. if (importData) {
  42712. var localBinding = path.scope.getBinding(localName);
  42713. var rootBinding = scope.getBinding(localName);
  42714. if (rootBinding !== localBinding) return;
  42715. var ref = buildImportReference(importData, path.node);
  42716. ref.loc = path.node.loc;
  42717. if ((path.parentPath.isCallExpression({
  42718. callee: path.node
  42719. }) || path.parentPath.isOptionalCallExpression({
  42720. callee: path.node
  42721. }) || path.parentPath.isTaggedTemplateExpression({
  42722. tag: path.node
  42723. })) && isMemberExpression(ref)) {
  42724. path.replaceWith(sequenceExpression([numericLiteral(0), ref]));
  42725. } else if (path.isJSXIdentifier() && isMemberExpression(ref)) {
  42726. var object = ref.object,
  42727. property = ref.property;
  42728. path.replaceWith(jsxMemberExpression(jsxIdentifier(object.name), jsxIdentifier(property.name)));
  42729. } else {
  42730. path.replaceWith(ref);
  42731. }
  42732. requeueInParent(path);
  42733. path.skip();
  42734. }
  42735. },
  42736. AssignmentExpression: {
  42737. exit: function exit(path) {
  42738. var _this = this;
  42739. var scope = this.scope,
  42740. seen = this.seen,
  42741. imported = this.imported,
  42742. exported = this.exported,
  42743. requeueInParent = this.requeueInParent,
  42744. buildImportReference = this.buildImportReference;
  42745. if (seen.has(path.node)) return;
  42746. seen.add(path.node);
  42747. var left = path.get("left");
  42748. if (left.isMemberExpression()) return;
  42749. if (left.isIdentifier()) {
  42750. var localName = left.node.name;
  42751. if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
  42752. return;
  42753. }
  42754. var exportedNames = exported.get(localName);
  42755. var importData = imported.get(localName);
  42756. if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
  42757. assert_1(path.node.operator === "=", "Path was not simplified");
  42758. var assignment = path.node;
  42759. if (importData) {
  42760. assignment.left = buildImportReference(importData, assignment.left);
  42761. assignment.right = sequenceExpression([assignment.right, buildImportThrow(localName)]);
  42762. }
  42763. path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment));
  42764. requeueInParent(path);
  42765. }
  42766. } else {
  42767. var ids = left.getOuterBindingIdentifiers();
  42768. var programScopeIds = Object.keys(ids).filter(function (localName) {
  42769. return scope.getBinding(localName) === path.scope.getBinding(localName);
  42770. });
  42771. var id = programScopeIds.find(function (localName) {
  42772. return imported.has(localName);
  42773. });
  42774. if (id) {
  42775. path.node.right = sequenceExpression([path.node.right, buildImportThrow(id)]);
  42776. }
  42777. var items = [];
  42778. programScopeIds.forEach(function (localName) {
  42779. var exportedNames = exported.get(localName) || [];
  42780. if (exportedNames.length > 0) {
  42781. items.push(buildBindingExportAssignmentExpression(_this.metadata, exportedNames, identifier(localName)));
  42782. }
  42783. });
  42784. if (items.length > 0) {
  42785. var node = sequenceExpression(items);
  42786. if (path.parentPath.isExpressionStatement()) {
  42787. node = expressionStatement(node);
  42788. node._blockHoist = path.parentPath.node._blockHoist;
  42789. }
  42790. var statement = path.insertAfter(node)[0];
  42791. requeueInParent(statement);
  42792. }
  42793. }
  42794. }
  42795. },
  42796. "ForOfStatement|ForInStatement": function ForOfStatementForInStatement(path) {
  42797. var scope = path.scope,
  42798. node = path.node;
  42799. var left = node.left;
  42800. var exported = this.exported,
  42801. programScope = this.scope;
  42802. if (!isVariableDeclaration(left)) {
  42803. var didTransform = false;
  42804. var bodyPath = path.get("body");
  42805. var loopBodyScope = bodyPath.scope;
  42806. for (var _i = 0, _Object$keys = Object.keys(getOuterBindingIdentifiers$1(left)); _i < _Object$keys.length; _i++) {
  42807. var name = _Object$keys[_i];
  42808. if (exported.get(name) && programScope.getBinding(name) === scope.getBinding(name)) {
  42809. didTransform = true;
  42810. if (loopBodyScope.hasOwnBinding(name)) {
  42811. loopBodyScope.rename(name);
  42812. }
  42813. }
  42814. }
  42815. if (!didTransform) {
  42816. return;
  42817. }
  42818. var newLoopId = scope.generateUidIdentifierBasedOnNode(left);
  42819. bodyPath.unshiftContainer("body", expressionStatement(assignmentExpression("=", left, newLoopId)));
  42820. path.get("left").replaceWith(variableDeclaration("let", [variableDeclarator(cloneNode(newLoopId))]));
  42821. scope.registerDeclaration(path.get("left"));
  42822. }
  42823. }
  42824. };
  42825. function normalizeArray(parts, allowAboveRoot) {
  42826. var up = 0;
  42827. for (var i = parts.length - 1; i >= 0; i--) {
  42828. var last = parts[i];
  42829. if (last === '.') {
  42830. parts.splice(i, 1);
  42831. } else if (last === '..') {
  42832. parts.splice(i, 1);
  42833. up++;
  42834. } else if (up) {
  42835. parts.splice(i, 1);
  42836. up--;
  42837. }
  42838. }
  42839. if (allowAboveRoot) {
  42840. for (; up--; up) {
  42841. parts.unshift('..');
  42842. }
  42843. }
  42844. return parts;
  42845. }
  42846. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
  42847. var splitPath = function splitPath(filename) {
  42848. return splitPathRe.exec(filename).slice(1);
  42849. };
  42850. function resolve$3() {
  42851. var resolvedPath = '',
  42852. resolvedAbsolute = false;
  42853. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  42854. var path = i >= 0 ? arguments[i] : '/';
  42855. if (typeof path !== 'string') {
  42856. throw new TypeError('Arguments to path.resolve must be strings');
  42857. } else if (!path) {
  42858. continue;
  42859. }
  42860. resolvedPath = path + '/' + resolvedPath;
  42861. resolvedAbsolute = path.charAt(0) === '/';
  42862. }
  42863. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {
  42864. return !!p;
  42865. }), !resolvedAbsolute).join('/');
  42866. return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
  42867. }
  42868. function normalize$1(path) {
  42869. var isPathAbsolute = isAbsolute(path),
  42870. trailingSlash = substr(path, -1) === '/';
  42871. path = normalizeArray(filter(path.split('/'), function (p) {
  42872. return !!p;
  42873. }), !isPathAbsolute).join('/');
  42874. if (!path && !isPathAbsolute) {
  42875. path = '.';
  42876. }
  42877. if (path && trailingSlash) {
  42878. path += '/';
  42879. }
  42880. return (isPathAbsolute ? '/' : '') + path;
  42881. }
  42882. function isAbsolute(path) {
  42883. return path.charAt(0) === '/';
  42884. }
  42885. function join() {
  42886. var paths = Array.prototype.slice.call(arguments, 0);
  42887. return normalize$1(filter(paths, function (p, index) {
  42888. if (typeof p !== 'string') {
  42889. throw new TypeError('Arguments to path.join must be strings');
  42890. }
  42891. return p;
  42892. }).join('/'));
  42893. }
  42894. function relative(from, to) {
  42895. from = resolve$3(from).substr(1);
  42896. to = resolve$3(to).substr(1);
  42897. function trim(arr) {
  42898. var start = 0;
  42899. for (; start < arr.length; start++) {
  42900. if (arr[start] !== '') break;
  42901. }
  42902. var end = arr.length - 1;
  42903. for (; end >= 0; end--) {
  42904. if (arr[end] !== '') break;
  42905. }
  42906. if (start > end) return [];
  42907. return arr.slice(start, end - start + 1);
  42908. }
  42909. var fromParts = trim(from.split('/'));
  42910. var toParts = trim(to.split('/'));
  42911. var length = Math.min(fromParts.length, toParts.length);
  42912. var samePartsLength = length;
  42913. for (var i = 0; i < length; i++) {
  42914. if (fromParts[i] !== toParts[i]) {
  42915. samePartsLength = i;
  42916. break;
  42917. }
  42918. }
  42919. var outputParts = [];
  42920. for (var i = samePartsLength; i < fromParts.length; i++) {
  42921. outputParts.push('..');
  42922. }
  42923. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  42924. return outputParts.join('/');
  42925. }
  42926. var sep$1 = '/';
  42927. var delimiter = ':';
  42928. function dirname(path) {
  42929. var result = splitPath(path),
  42930. root = result[0],
  42931. dir = result[1];
  42932. if (!root && !dir) {
  42933. return '.';
  42934. }
  42935. if (dir) {
  42936. dir = dir.substr(0, dir.length - 1);
  42937. }
  42938. return root + dir;
  42939. }
  42940. function basename(path, ext) {
  42941. var f = splitPath(path)[2];
  42942. if (ext && f.substr(-1 * ext.length) === ext) {
  42943. f = f.substr(0, f.length - ext.length);
  42944. }
  42945. return f;
  42946. }
  42947. function extname(path) {
  42948. return splitPath(path)[3];
  42949. }
  42950. var path$1 = {
  42951. extname: extname,
  42952. basename: basename,
  42953. dirname: dirname,
  42954. sep: sep$1,
  42955. delimiter: delimiter,
  42956. relative: relative,
  42957. join: join,
  42958. isAbsolute: isAbsolute,
  42959. normalize: normalize$1,
  42960. resolve: resolve$3
  42961. };
  42962. function filter(xs, f) {
  42963. if (xs.filter) return xs.filter(f);
  42964. var res = [];
  42965. for (var i = 0; i < xs.length; i++) {
  42966. if (f(xs[i], i, xs)) res.push(xs[i]);
  42967. }
  42968. return res;
  42969. }
  42970. var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {
  42971. return str.substr(start, len);
  42972. } : function (str, start, len) {
  42973. if (start < 0) start = str.length + start;
  42974. return str.substr(start, len);
  42975. };
  42976. var path$2 = /*#__PURE__*/Object.freeze({
  42977. __proto__: null,
  42978. resolve: resolve$3,
  42979. normalize: normalize$1,
  42980. isAbsolute: isAbsolute,
  42981. join: join,
  42982. relative: relative,
  42983. sep: sep$1,
  42984. delimiter: delimiter,
  42985. dirname: dirname,
  42986. basename: basename,
  42987. extname: extname,
  42988. 'default': path$1
  42989. });
  42990. function hasExports(metadata) {
  42991. return metadata.hasExports;
  42992. }
  42993. function isSideEffectImport(source) {
  42994. return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
  42995. }
  42996. function validateImportInteropOption(importInterop) {
  42997. if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") {
  42998. throw new Error(".importInterop must be one of \"none\", \"babel\", \"node\", or a function returning one of those values (received " + importInterop + ").");
  42999. }
  43000. return importInterop;
  43001. }
  43002. function resolveImportInterop(importInterop, source) {
  43003. if (typeof importInterop === "function") {
  43004. return validateImportInteropOption(importInterop(source));
  43005. }
  43006. return importInterop;
  43007. }
  43008. function normalizeModuleAndLoadMetadata(programPath, exportName, _ref) {
  43009. var importInterop = _ref.importInterop,
  43010. _ref$initializeReexpo = _ref.initializeReexports,
  43011. initializeReexports = _ref$initializeReexpo === void 0 ? false : _ref$initializeReexpo,
  43012. _ref$lazy = _ref.lazy,
  43013. lazy = _ref$lazy === void 0 ? false : _ref$lazy,
  43014. _ref$esNamespaceOnly = _ref.esNamespaceOnly,
  43015. esNamespaceOnly = _ref$esNamespaceOnly === void 0 ? false : _ref$esNamespaceOnly;
  43016. if (!exportName) {
  43017. exportName = programPath.scope.generateUidIdentifier("exports").name;
  43018. }
  43019. var stringSpecifiers = new Set();
  43020. nameAnonymousExports(programPath);
  43021. var _getModuleMetadata = getModuleMetadata(programPath, {
  43022. initializeReexports: initializeReexports,
  43023. lazy: lazy
  43024. }, stringSpecifiers),
  43025. local = _getModuleMetadata.local,
  43026. source = _getModuleMetadata.source,
  43027. hasExports = _getModuleMetadata.hasExports;
  43028. removeModuleDeclarations(programPath);
  43029. for (var _iterator = _createForOfIteratorHelperLoose(source), _step; !(_step = _iterator()).done;) {
  43030. var _step$value = _slicedToArray$2(_step.value, 2),
  43031. metadata = _step$value[1];
  43032. if (metadata.importsNamespace.size > 0) {
  43033. metadata.name = metadata.importsNamespace.values().next().value;
  43034. }
  43035. var resolvedInterop = resolveImportInterop(importInterop, metadata.source);
  43036. if (resolvedInterop === "none") {
  43037. metadata.interop = "none";
  43038. } else if (resolvedInterop === "node" && metadata.interop === "namespace") {
  43039. metadata.interop = "node-namespace";
  43040. } else if (resolvedInterop === "node" && metadata.interop === "default") {
  43041. metadata.interop = "node-default";
  43042. } else if (esNamespaceOnly && metadata.interop === "namespace") {
  43043. metadata.interop = "default";
  43044. }
  43045. }
  43046. return {
  43047. exportName: exportName,
  43048. exportNameListName: null,
  43049. hasExports: hasExports,
  43050. local: local,
  43051. source: source,
  43052. stringSpecifiers: stringSpecifiers
  43053. };
  43054. }
  43055. function getExportSpecifierName$1(path, stringSpecifiers) {
  43056. if (path.isIdentifier()) {
  43057. return path.node.name;
  43058. } else if (path.isStringLiteral()) {
  43059. var stringValue = path.node.value;
  43060. if (!isIdentifierName(stringValue)) {
  43061. stringSpecifiers.add(stringValue);
  43062. }
  43063. return stringValue;
  43064. } else {
  43065. throw new Error("Expected export specifier to be either Identifier or StringLiteral, got " + path.node.type);
  43066. }
  43067. }
  43068. function assertExportSpecifier(path) {
  43069. if (path.isExportSpecifier()) {
  43070. return;
  43071. } else if (path.isExportNamespaceSpecifier()) {
  43072. throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.");
  43073. } else {
  43074. throw path.buildCodeFrameError("Unexpected export specifier type");
  43075. }
  43076. }
  43077. function getModuleMetadata(programPath, _ref2, stringSpecifiers) {
  43078. var lazy = _ref2.lazy,
  43079. initializeReexports = _ref2.initializeReexports;
  43080. var localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers);
  43081. var sourceData = new Map();
  43082. var getData = function getData(sourceNode) {
  43083. var source = sourceNode.value;
  43084. var data = sourceData.get(source);
  43085. if (!data) {
  43086. data = {
  43087. name: programPath.scope.generateUidIdentifier(basename(source, extname(source))).name,
  43088. interop: "none",
  43089. loc: null,
  43090. imports: new Map(),
  43091. importsNamespace: new Set(),
  43092. reexports: new Map(),
  43093. reexportNamespace: new Set(),
  43094. reexportAll: null,
  43095. lazy: false,
  43096. source: source
  43097. };
  43098. sourceData.set(source, data);
  43099. }
  43100. return data;
  43101. };
  43102. var hasExports = false;
  43103. programPath.get("body").forEach(function (child) {
  43104. if (child.isImportDeclaration()) {
  43105. var data = getData(child.node.source);
  43106. if (!data.loc) data.loc = child.node.loc;
  43107. child.get("specifiers").forEach(function (spec) {
  43108. if (spec.isImportDefaultSpecifier()) {
  43109. var localName = spec.get("local").node.name;
  43110. data.imports.set(localName, "default");
  43111. var reexport = localData.get(localName);
  43112. if (reexport) {
  43113. localData["delete"](localName);
  43114. reexport.names.forEach(function (name) {
  43115. data.reexports.set(name, "default");
  43116. });
  43117. }
  43118. } else if (spec.isImportNamespaceSpecifier()) {
  43119. var _localName = spec.get("local").node.name;
  43120. data.importsNamespace.add(_localName);
  43121. var _reexport = localData.get(_localName);
  43122. if (_reexport) {
  43123. localData["delete"](_localName);
  43124. _reexport.names.forEach(function (name) {
  43125. data.reexportNamespace.add(name);
  43126. });
  43127. }
  43128. } else if (spec.isImportSpecifier()) {
  43129. var importName = getExportSpecifierName$1(spec.get("imported"), stringSpecifiers);
  43130. var _localName2 = spec.get("local").node.name;
  43131. data.imports.set(_localName2, importName);
  43132. var _reexport2 = localData.get(_localName2);
  43133. if (_reexport2) {
  43134. localData["delete"](_localName2);
  43135. _reexport2.names.forEach(function (name) {
  43136. data.reexports.set(name, importName);
  43137. });
  43138. }
  43139. }
  43140. });
  43141. } else if (child.isExportAllDeclaration()) {
  43142. hasExports = true;
  43143. var _data = getData(child.node.source);
  43144. if (!_data.loc) _data.loc = child.node.loc;
  43145. _data.reexportAll = {
  43146. loc: child.node.loc
  43147. };
  43148. } else if (child.isExportNamedDeclaration() && child.node.source) {
  43149. hasExports = true;
  43150. var _data2 = getData(child.node.source);
  43151. if (!_data2.loc) _data2.loc = child.node.loc;
  43152. child.get("specifiers").forEach(function (spec) {
  43153. assertExportSpecifier(spec);
  43154. var importName = getExportSpecifierName$1(spec.get("local"), stringSpecifiers);
  43155. var exportName = getExportSpecifierName$1(spec.get("exported"), stringSpecifiers);
  43156. _data2.reexports.set(exportName, importName);
  43157. if (exportName === "__esModule") {
  43158. throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".');
  43159. }
  43160. });
  43161. } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
  43162. hasExports = true;
  43163. }
  43164. });
  43165. for (var _iterator2 = _createForOfIteratorHelperLoose(sourceData.values()), _step2; !(_step2 = _iterator2()).done;) {
  43166. var metadata = _step2.value;
  43167. var needsDefault = false;
  43168. var needsNamed = false;
  43169. if (metadata.importsNamespace.size > 0) {
  43170. needsDefault = true;
  43171. needsNamed = true;
  43172. }
  43173. if (metadata.reexportAll) {
  43174. needsNamed = true;
  43175. }
  43176. for (var _iterator4 = _createForOfIteratorHelperLoose(metadata.imports.values()), _step4; !(_step4 = _iterator4()).done;) {
  43177. var importName = _step4.value;
  43178. if (importName === "default") needsDefault = true;else needsNamed = true;
  43179. }
  43180. for (var _iterator5 = _createForOfIteratorHelperLoose(metadata.reexports.values()), _step5; !(_step5 = _iterator5()).done;) {
  43181. var _importName = _step5.value;
  43182. if (_importName === "default") needsDefault = true;else needsNamed = true;
  43183. }
  43184. if (needsDefault && needsNamed) {
  43185. metadata.interop = "namespace";
  43186. } else if (needsDefault) {
  43187. metadata.interop = "default";
  43188. }
  43189. }
  43190. for (var _iterator3 = _createForOfIteratorHelperLoose(sourceData), _step3; !(_step3 = _iterator3()).done;) {
  43191. var _step3$value = _slicedToArray$2(_step3.value, 2),
  43192. source = _step3$value[0],
  43193. _metadata = _step3$value[1];
  43194. if (lazy !== false && !(isSideEffectImport(_metadata) || _metadata.reexportAll)) {
  43195. if (lazy === true) {
  43196. _metadata.lazy = !/\./.test(source);
  43197. } else if (Array.isArray(lazy)) {
  43198. _metadata.lazy = lazy.indexOf(source) !== -1;
  43199. } else if (typeof lazy === "function") {
  43200. _metadata.lazy = lazy(source);
  43201. } else {
  43202. throw new Error(".lazy must be a boolean, string array, or function");
  43203. }
  43204. }
  43205. }
  43206. return {
  43207. hasExports: hasExports,
  43208. local: localData,
  43209. source: sourceData
  43210. };
  43211. }
  43212. function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) {
  43213. var bindingKindLookup = new Map();
  43214. programPath.get("body").forEach(function (child) {
  43215. var kind;
  43216. if (child.isImportDeclaration()) {
  43217. kind = "import";
  43218. } else {
  43219. if (child.isExportDefaultDeclaration()) child = child.get("declaration");
  43220. if (child.isExportNamedDeclaration()) {
  43221. if (child.node.declaration) {
  43222. child = child.get("declaration");
  43223. } else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) {
  43224. child.get("specifiers").forEach(function (spec) {
  43225. assertExportSpecifier(spec);
  43226. bindingKindLookup.set(spec.get("local").node.name, "block");
  43227. });
  43228. return;
  43229. }
  43230. }
  43231. if (child.isFunctionDeclaration()) {
  43232. kind = "hoisted";
  43233. } else if (child.isClassDeclaration()) {
  43234. kind = "block";
  43235. } else if (child.isVariableDeclaration({
  43236. kind: "var"
  43237. })) {
  43238. kind = "var";
  43239. } else if (child.isVariableDeclaration()) {
  43240. kind = "block";
  43241. } else {
  43242. return;
  43243. }
  43244. }
  43245. Object.keys(child.getOuterBindingIdentifiers()).forEach(function (name) {
  43246. bindingKindLookup.set(name, kind);
  43247. });
  43248. });
  43249. var localMetadata = new Map();
  43250. var getLocalMetadata = function getLocalMetadata(idPath) {
  43251. var localName = idPath.node.name;
  43252. var metadata = localMetadata.get(localName);
  43253. if (!metadata) {
  43254. var kind = bindingKindLookup.get(localName);
  43255. if (kind === undefined) {
  43256. throw idPath.buildCodeFrameError("Exporting local \"" + localName + "\", which is not declared.");
  43257. }
  43258. metadata = {
  43259. names: [],
  43260. kind: kind
  43261. };
  43262. localMetadata.set(localName, metadata);
  43263. }
  43264. return metadata;
  43265. };
  43266. programPath.get("body").forEach(function (child) {
  43267. if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) {
  43268. if (child.node.declaration) {
  43269. var declaration = child.get("declaration");
  43270. var ids = declaration.getOuterBindingIdentifierPaths();
  43271. Object.keys(ids).forEach(function (name) {
  43272. if (name === "__esModule") {
  43273. throw declaration.buildCodeFrameError('Illegal export "__esModule".');
  43274. }
  43275. getLocalMetadata(ids[name]).names.push(name);
  43276. });
  43277. } else {
  43278. child.get("specifiers").forEach(function (spec) {
  43279. var local = spec.get("local");
  43280. var exported = spec.get("exported");
  43281. var localMetadata = getLocalMetadata(local);
  43282. var exportName = getExportSpecifierName$1(exported, stringSpecifiers);
  43283. if (exportName === "__esModule") {
  43284. throw exported.buildCodeFrameError('Illegal export "__esModule".');
  43285. }
  43286. localMetadata.names.push(exportName);
  43287. });
  43288. }
  43289. } else if (child.isExportDefaultDeclaration()) {
  43290. var _declaration = child.get("declaration");
  43291. if (_declaration.isFunctionDeclaration() || _declaration.isClassDeclaration()) {
  43292. getLocalMetadata(_declaration.get("id")).names.push("default");
  43293. } else {
  43294. throw _declaration.buildCodeFrameError("Unexpected default expression export.");
  43295. }
  43296. }
  43297. });
  43298. return localMetadata;
  43299. }
  43300. function nameAnonymousExports(programPath) {
  43301. programPath.get("body").forEach(function (child) {
  43302. if (!child.isExportDefaultDeclaration()) return;
  43303. splitExportDeclaration(child);
  43304. });
  43305. }
  43306. function removeModuleDeclarations(programPath) {
  43307. programPath.get("body").forEach(function (child) {
  43308. if (child.isImportDeclaration()) {
  43309. child.remove();
  43310. } else if (child.isExportNamedDeclaration()) {
  43311. if (child.node.declaration) {
  43312. child.node.declaration._blockHoist = child.node._blockHoist;
  43313. child.replaceWith(child.node.declaration);
  43314. } else {
  43315. child.remove();
  43316. }
  43317. } else if (child.isExportDefaultDeclaration()) {
  43318. var declaration = child.get("declaration");
  43319. if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
  43320. declaration._blockHoist = child.node._blockHoist;
  43321. child.replaceWith(declaration);
  43322. } else {
  43323. throw declaration.buildCodeFrameError("Unexpected default expression export.");
  43324. }
  43325. } else if (child.isExportAllDeclaration()) {
  43326. child.remove();
  43327. }
  43328. });
  43329. }
  43330. {
  43331. var originalGetModuleName = getModuleName;
  43332. getModuleName = function getModuleName(rootOpts, pluginOpts) {
  43333. var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
  43334. return originalGetModuleName(rootOpts, {
  43335. moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
  43336. moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
  43337. getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
  43338. moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
  43339. });
  43340. };
  43341. }
  43342. function getModuleName(rootOpts, pluginOpts) {
  43343. var filename = rootOpts.filename,
  43344. _rootOpts$filenameRel = rootOpts.filenameRelative,
  43345. filenameRelative = _rootOpts$filenameRel === void 0 ? filename : _rootOpts$filenameRel,
  43346. _rootOpts$sourceRoot = rootOpts.sourceRoot,
  43347. sourceRoot = _rootOpts$sourceRoot === void 0 ? pluginOpts.moduleRoot : _rootOpts$sourceRoot;
  43348. var moduleId = pluginOpts.moduleId,
  43349. _pluginOpts$moduleIds2 = pluginOpts.moduleIds,
  43350. moduleIds = _pluginOpts$moduleIds2 === void 0 ? !!moduleId : _pluginOpts$moduleIds2,
  43351. getModuleId = pluginOpts.getModuleId,
  43352. _pluginOpts$moduleRoo2 = pluginOpts.moduleRoot,
  43353. moduleRoot = _pluginOpts$moduleRoo2 === void 0 ? sourceRoot : _pluginOpts$moduleRoo2;
  43354. if (!moduleIds) return null;
  43355. if (moduleId != null && !getModuleId) {
  43356. return moduleId;
  43357. }
  43358. var moduleName = moduleRoot != null ? moduleRoot + "/" : "";
  43359. if (filenameRelative) {
  43360. var sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
  43361. moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
  43362. }
  43363. moduleName = moduleName.replace(/\\/g, "/");
  43364. if (getModuleId) {
  43365. return getModuleId(moduleName) || moduleName;
  43366. } else {
  43367. return moduleName;
  43368. }
  43369. }
  43370. var _templateObject$l, _templateObject2$a, _templateObject3$9, _templateObject4$5, _templateObject5$3, _templateObject6$3, _templateObject7$2, _templateObject8$1, _templateObject9$1, _templateObject10$1, _templateObject11$1, _templateObject12$1, _templateObject13$1;
  43371. function rewriteModuleStatementsAndPrepareHeader(path, _ref) {
  43372. var loose = _ref.loose,
  43373. exportName = _ref.exportName,
  43374. strict = _ref.strict,
  43375. allowTopLevelThis = _ref.allowTopLevelThis,
  43376. strictMode = _ref.strictMode,
  43377. noInterop = _ref.noInterop,
  43378. _ref$importInterop = _ref.importInterop,
  43379. importInterop = _ref$importInterop === void 0 ? noInterop ? "none" : "babel" : _ref$importInterop,
  43380. lazy = _ref.lazy,
  43381. esNamespaceOnly = _ref.esNamespaceOnly,
  43382. _ref$constantReexport = _ref.constantReexports,
  43383. constantReexports = _ref$constantReexport === void 0 ? loose : _ref$constantReexport,
  43384. _ref$enumerableModule = _ref.enumerableModuleMeta,
  43385. enumerableModuleMeta = _ref$enumerableModule === void 0 ? loose : _ref$enumerableModule;
  43386. validateImportInteropOption(importInterop);
  43387. assert_1(isModule(path), "Cannot process module statements in a script");
  43388. path.node.sourceType = "script";
  43389. var meta = normalizeModuleAndLoadMetadata(path, exportName, {
  43390. importInterop: importInterop,
  43391. initializeReexports: constantReexports,
  43392. lazy: lazy,
  43393. esNamespaceOnly: esNamespaceOnly
  43394. });
  43395. if (!allowTopLevelThis) {
  43396. rewriteThis(path);
  43397. }
  43398. rewriteLiveReferences(path, meta);
  43399. if (strictMode !== false) {
  43400. var hasStrict = path.node.directives.some(function (directive) {
  43401. return directive.value.value === "use strict";
  43402. });
  43403. if (!hasStrict) {
  43404. path.unshiftContainer("directives", directive(directiveLiteral("use strict")));
  43405. }
  43406. }
  43407. var headers = [];
  43408. if (hasExports(meta) && !strict) {
  43409. headers.push(buildESModuleHeader(meta, enumerableModuleMeta));
  43410. }
  43411. var nameList = buildExportNameListDeclaration(path, meta);
  43412. if (nameList) {
  43413. meta.exportNameListName = nameList.name;
  43414. headers.push(nameList.statement);
  43415. }
  43416. headers.push.apply(headers, _toConsumableArray(buildExportInitializationStatements(path, meta, constantReexports)));
  43417. return {
  43418. meta: meta,
  43419. headers: headers
  43420. };
  43421. }
  43422. function ensureStatementsHoisted(statements) {
  43423. statements.forEach(function (header) {
  43424. header._blockHoist = 3;
  43425. });
  43426. }
  43427. function wrapInterop(programPath, expr, type) {
  43428. if (type === "none") {
  43429. return null;
  43430. }
  43431. if (type === "node-namespace") {
  43432. return callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, booleanLiteral(true)]);
  43433. } else if (type === "node-default") {
  43434. return null;
  43435. }
  43436. var helper;
  43437. if (type === "default") {
  43438. helper = "interopRequireDefault";
  43439. } else if (type === "namespace") {
  43440. helper = "interopRequireWildcard";
  43441. } else {
  43442. throw new Error("Unknown interop: " + type);
  43443. }
  43444. return callExpression(programPath.hub.addHelper(helper), [expr]);
  43445. }
  43446. function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports) {
  43447. if (constantReexports === void 0) {
  43448. constantReexports = false;
  43449. }
  43450. var statements = [];
  43451. var srcNamespace = identifier(sourceMetadata.name);
  43452. if (sourceMetadata.lazy) srcNamespace = callExpression(srcNamespace, []);
  43453. for (var _iterator = _createForOfIteratorHelperLoose(sourceMetadata.importsNamespace), _step; !(_step = _iterator()).done;) {
  43454. var localName = _step.value;
  43455. if (localName === sourceMetadata.name) continue;
  43456. statements.push(template$2.statement(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["var NAME = SOURCE;"])))({
  43457. NAME: localName,
  43458. SOURCE: cloneNode(srcNamespace)
  43459. }));
  43460. }
  43461. if (constantReexports) {
  43462. statements.push.apply(statements, _toConsumableArray(buildReexportsFromMeta(metadata, sourceMetadata, true)));
  43463. }
  43464. for (var _iterator2 = _createForOfIteratorHelperLoose(sourceMetadata.reexportNamespace), _step2; !(_step2 = _iterator2()).done;) {
  43465. var exportName = _step2.value;
  43466. statements.push((sourceMetadata.lazy ? template$2.statement(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE;\n }\n });\n "]))) : template$2.statement(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["EXPORTS.NAME = NAMESPACE;"]))))({
  43467. EXPORTS: metadata.exportName,
  43468. NAME: exportName,
  43469. NAMESPACE: cloneNode(srcNamespace)
  43470. }));
  43471. }
  43472. if (sourceMetadata.reexportAll) {
  43473. var statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), constantReexports);
  43474. statement.loc = sourceMetadata.reexportAll.loc;
  43475. statements.push(statement);
  43476. }
  43477. return statements;
  43478. }
  43479. var ReexportTemplate = {
  43480. constant: template$2.statement(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;"]))),
  43481. constantComputed: template$2.statement(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["EXPORTS[\"EXPORT_NAME\"] = NAMESPACE_IMPORT;"]))),
  43482. spec: template$2(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"EXPORT_NAME\", {\n enumerable: true,\n get: function() {\n return NAMESPACE_IMPORT;\n },\n });\n "])))
  43483. };
  43484. var buildReexportsFromMeta = function buildReexportsFromMeta(meta, metadata, constantReexports) {
  43485. var namespace = metadata.lazy ? callExpression(identifier(metadata.name), []) : identifier(metadata.name);
  43486. var stringSpecifiers = meta.stringSpecifiers;
  43487. return Array.from(metadata.reexports, function (_ref2) {
  43488. var _ref3 = _slicedToArray$2(_ref2, 2),
  43489. exportName = _ref3[0],
  43490. importName = _ref3[1];
  43491. var NAMESPACE_IMPORT = cloneNode(namespace);
  43492. if (importName === "default" && metadata.interop === "node-default") ; else if (stringSpecifiers.has(importName)) {
  43493. NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, stringLiteral(importName), true);
  43494. } else {
  43495. NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, identifier(importName));
  43496. }
  43497. var astNodes = {
  43498. EXPORTS: meta.exportName,
  43499. EXPORT_NAME: exportName,
  43500. NAMESPACE_IMPORT: NAMESPACE_IMPORT
  43501. };
  43502. if (constantReexports || isIdentifier(NAMESPACE_IMPORT)) {
  43503. if (stringSpecifiers.has(exportName)) {
  43504. return ReexportTemplate.constantComputed(astNodes);
  43505. } else {
  43506. return ReexportTemplate.constant(astNodes);
  43507. }
  43508. } else {
  43509. return ReexportTemplate.spec(astNodes);
  43510. }
  43511. });
  43512. };
  43513. function buildESModuleHeader(metadata, enumerableModuleMeta) {
  43514. if (enumerableModuleMeta === void 0) {
  43515. enumerableModuleMeta = false;
  43516. }
  43517. return (enumerableModuleMeta ? template$2.statement(_templateObject7$2 || (_templateObject7$2 = _taggedTemplateLiteralLoose(["\n EXPORTS.__esModule = true;\n "]))) : template$2.statement(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(EXPORTS, \"__esModule\", {\n value: true,\n });\n "]))))({
  43518. EXPORTS: metadata.exportName
  43519. });
  43520. }
  43521. function buildNamespaceReexport(metadata, namespace, constantReexports) {
  43522. return (constantReexports ? template$2.statement(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n EXPORTS[key] = NAMESPACE[key];\n });\n "]))) : template$2.statement(_templateObject10$1 || (_templateObject10$1 = _taggedTemplateLiteralLoose(["\n Object.keys(NAMESPACE).forEach(function(key) {\n if (key === \"default\" || key === \"__esModule\") return;\n VERIFY_NAME_LIST;\n if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;\n\n Object.defineProperty(EXPORTS, key, {\n enumerable: true,\n get: function() {\n return NAMESPACE[key];\n },\n });\n });\n "]))))({
  43523. NAMESPACE: namespace,
  43524. EXPORTS: metadata.exportName,
  43525. VERIFY_NAME_LIST: metadata.exportNameListName ? template$2(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;\n "])))({
  43526. EXPORTS_LIST: metadata.exportNameListName
  43527. }) : null
  43528. });
  43529. }
  43530. function buildExportNameListDeclaration(programPath, metadata) {
  43531. var exportedVars = Object.create(null);
  43532. for (var _iterator3 = _createForOfIteratorHelperLoose(metadata.local.values()), _step3; !(_step3 = _iterator3()).done;) {
  43533. var data = _step3.value;
  43534. for (var _iterator5 = _createForOfIteratorHelperLoose(data.names), _step5; !(_step5 = _iterator5()).done;) {
  43535. var _name = _step5.value;
  43536. exportedVars[_name] = true;
  43537. }
  43538. }
  43539. var hasReexport = false;
  43540. for (var _iterator4 = _createForOfIteratorHelperLoose(metadata.source.values()), _step4; !(_step4 = _iterator4()).done;) {
  43541. var _data = _step4.value;
  43542. for (var _iterator6 = _createForOfIteratorHelperLoose(_data.reexports.keys()), _step6; !(_step6 = _iterator6()).done;) {
  43543. var exportName = _step6.value;
  43544. exportedVars[exportName] = true;
  43545. }
  43546. for (var _iterator7 = _createForOfIteratorHelperLoose(_data.reexportNamespace), _step7; !(_step7 = _iterator7()).done;) {
  43547. var _exportName = _step7.value;
  43548. exportedVars[_exportName] = true;
  43549. }
  43550. hasReexport = hasReexport || !!_data.reexportAll;
  43551. }
  43552. if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
  43553. var name = programPath.scope.generateUidIdentifier("exportNames");
  43554. delete exportedVars["default"];
  43555. return {
  43556. name: name.name,
  43557. statement: variableDeclaration("var", [variableDeclarator(name, valueToNode(exportedVars))])
  43558. };
  43559. }
  43560. function buildExportInitializationStatements(programPath, metadata, constantReexports) {
  43561. if (constantReexports === void 0) {
  43562. constantReexports = false;
  43563. }
  43564. var initStatements = [];
  43565. var exportNames = [];
  43566. for (var _iterator8 = _createForOfIteratorHelperLoose(metadata.local), _step8; !(_step8 = _iterator8()).done;) {
  43567. var _step8$value = _slicedToArray$2(_step8.value, 2),
  43568. localName = _step8$value[0],
  43569. data = _step8$value[1];
  43570. if (data.kind === "import") ; else if (data.kind === "hoisted") {
  43571. initStatements.push(buildInitStatement(metadata, data.names, identifier(localName)));
  43572. } else {
  43573. exportNames.push.apply(exportNames, _toConsumableArray(data.names));
  43574. }
  43575. }
  43576. for (var _iterator9 = _createForOfIteratorHelperLoose(metadata.source.values()), _step9; !(_step9 = _iterator9()).done;) {
  43577. var _data2 = _step9.value;
  43578. if (!constantReexports) {
  43579. initStatements.push.apply(initStatements, _toConsumableArray(buildReexportsFromMeta(metadata, _data2, false)));
  43580. }
  43581. for (var _iterator10 = _createForOfIteratorHelperLoose(_data2.reexportNamespace), _step10; !(_step10 = _iterator10()).done;) {
  43582. var exportName = _step10.value;
  43583. exportNames.push(exportName);
  43584. }
  43585. }
  43586. initStatements.push.apply(initStatements, _toConsumableArray(chunk(exportNames, 100).map(function (members) {
  43587. return buildInitStatement(metadata, members, programPath.scope.buildUndefinedNode());
  43588. })));
  43589. return initStatements;
  43590. }
  43591. var InitTemplate = {
  43592. computed: template$2.expression(_templateObject12$1 || (_templateObject12$1 = _taggedTemplateLiteralLoose(["EXPORTS[\"NAME\"] = VALUE"]))),
  43593. "default": template$2.expression(_templateObject13$1 || (_templateObject13$1 = _taggedTemplateLiteralLoose(["EXPORTS.NAME = VALUE"])))
  43594. };
  43595. function buildInitStatement(metadata, exportNames, initExpr) {
  43596. var stringSpecifiers = metadata.stringSpecifiers,
  43597. EXPORTS = metadata.exportName;
  43598. return expressionStatement(exportNames.reduce(function (acc, exportName) {
  43599. var params = {
  43600. EXPORTS: EXPORTS,
  43601. NAME: exportName,
  43602. VALUE: acc
  43603. };
  43604. if (stringSpecifiers.has(exportName)) {
  43605. return InitTemplate.computed(params);
  43606. } else {
  43607. return InitTemplate["default"](params);
  43608. }
  43609. }, initExpr));
  43610. }
  43611. function chunk(array, size) {
  43612. var chunks = [];
  43613. for (var i = 0; i < array.length; i += size) {
  43614. chunks.push(array.slice(i, i + size));
  43615. }
  43616. return chunks;
  43617. }
  43618. var SEMVER_SPEC_VERSION$3 = '2.0.0';
  43619. var MAX_LENGTH$b = 256;
  43620. var MAX_SAFE_INTEGER$7 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  43621. var MAX_SAFE_COMPONENT_LENGTH$3 = 16;
  43622. var constants$3 = {
  43623. SEMVER_SPEC_VERSION: SEMVER_SPEC_VERSION$3,
  43624. MAX_LENGTH: MAX_LENGTH$b,
  43625. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$7,
  43626. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$3
  43627. };
  43628. var debug$5 = typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG) ? function () {
  43629. var _console;
  43630. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  43631. args[_key] = arguments[_key];
  43632. }
  43633. return (_console = console).error.apply(_console, ['SEMVER'].concat(args));
  43634. } : function () {};
  43635. var debug_1$3 = debug$5;
  43636. var re_1$3 = createCommonjsModule(function (module, exports) {
  43637. var MAX_SAFE_COMPONENT_LENGTH = constants$3.MAX_SAFE_COMPONENT_LENGTH;
  43638. exports = module.exports = {};
  43639. var re = exports.re = [];
  43640. var src = exports.src = [];
  43641. var t = exports.t = {};
  43642. var R = 0;
  43643. var createToken = function createToken(name, value, isGlobal) {
  43644. var index = R++;
  43645. debug_1$3(index, value);
  43646. t[name] = index;
  43647. src[index] = value;
  43648. re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
  43649. };
  43650. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
  43651. createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
  43652. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
  43653. createToken('MAINVERSION', "(" + src[t.NUMERICIDENTIFIER] + ")\\." + ("(" + src[t.NUMERICIDENTIFIER] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIER] + ")"));
  43654. createToken('MAINVERSIONLOOSE', "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\." + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"));
  43655. createToken('PRERELEASEIDENTIFIER', "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  43656. createToken('PRERELEASEIDENTIFIERLOOSE', "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  43657. createToken('PRERELEASE', "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))");
  43658. createToken('PRERELEASELOOSE', "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))");
  43659. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
  43660. createToken('BUILD', "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))");
  43661. createToken('FULLPLAIN', "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?");
  43662. createToken('FULL', "^" + src[t.FULLPLAIN] + "$");
  43663. createToken('LOOSEPLAIN', "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?");
  43664. createToken('LOOSE', "^" + src[t.LOOSEPLAIN] + "$");
  43665. createToken('GTLT', '((?:<|>)?=?)');
  43666. createToken('XRANGEIDENTIFIERLOOSE', src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*");
  43667. createToken('XRANGEIDENTIFIER', src[t.NUMERICIDENTIFIER] + "|x|X|\\*");
  43668. createToken('XRANGEPLAIN', "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  43669. createToken('XRANGEPLAINLOOSE', "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  43670. createToken('XRANGE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$");
  43671. createToken('XRANGELOOSE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$");
  43672. createToken('COERCE', "" + ('(^|[^\\d])' + '(\\d{1,') + MAX_SAFE_COMPONENT_LENGTH + "})" + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + "(?:$|[^\\d])");
  43673. createToken('COERCERTL', src[t.COERCE], true);
  43674. createToken('LONETILDE', '(?:~>?)');
  43675. createToken('TILDETRIM', "(\\s*)" + src[t.LONETILDE] + "\\s+", true);
  43676. exports.tildeTrimReplace = '$1~';
  43677. createToken('TILDE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$");
  43678. createToken('TILDELOOSE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$");
  43679. createToken('LONECARET', '(?:\\^)');
  43680. createToken('CARETTRIM', "(\\s*)" + src[t.LONECARET] + "\\s+", true);
  43681. exports.caretTrimReplace = '$1^';
  43682. createToken('CARET', "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$");
  43683. createToken('CARETLOOSE', "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$");
  43684. createToken('COMPARATORLOOSE', "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$");
  43685. createToken('COMPARATOR', "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$");
  43686. createToken('COMPARATORTRIM', "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")", true);
  43687. exports.comparatorTrimReplace = '$1$2$3';
  43688. createToken('HYPHENRANGE', "^\\s*(" + src[t.XRANGEPLAIN] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAIN] + ")") + "\\s*$");
  43689. createToken('HYPHENRANGELOOSE', "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAINLOOSE] + ")") + "\\s*$");
  43690. createToken('STAR', '(<|>)?=?\\s*\\*');
  43691. createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$');
  43692. createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$');
  43693. }, "/$$rollup_base$$/packages/babel-core/node_modules/semver/node_modules/semver-BABEL_8_BREAKING-true/internal");
  43694. var opts$2 = ['includePrerelease', 'loose', 'rtl'];
  43695. var parseOptions$2 = function parseOptions(options) {
  43696. return !options ? {} : typeof options !== 'object' ? {
  43697. loose: true
  43698. } : opts$2.filter(function (k) {
  43699. return options[k];
  43700. }).reduce(function (options, k) {
  43701. options[k] = true;
  43702. return options;
  43703. }, {});
  43704. };
  43705. var parseOptions_1$2 = parseOptions$2;
  43706. var numeric$3 = /^[0-9]+$/;
  43707. var compareIdentifiers$7 = function compareIdentifiers(a, b) {
  43708. var anum = numeric$3.test(a);
  43709. var bnum = numeric$3.test(b);
  43710. if (anum && bnum) {
  43711. a = +a;
  43712. b = +b;
  43713. }
  43714. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  43715. };
  43716. var rcompareIdentifiers$3 = function rcompareIdentifiers(a, b) {
  43717. return compareIdentifiers$7(b, a);
  43718. };
  43719. var identifiers$3 = {
  43720. compareIdentifiers: compareIdentifiers$7,
  43721. rcompareIdentifiers: rcompareIdentifiers$3
  43722. };
  43723. var MAX_LENGTH$a = constants$3.MAX_LENGTH,
  43724. MAX_SAFE_INTEGER$6 = constants$3.MAX_SAFE_INTEGER;
  43725. var re$h = re_1$3.re,
  43726. t$o = re_1$3.t;
  43727. var compareIdentifiers$6 = identifiers$3.compareIdentifiers;
  43728. var SemVer$3 = function () {
  43729. function SemVer(version, options) {
  43730. options = parseOptions_1$2(options);
  43731. if (version instanceof SemVer) {
  43732. if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
  43733. return version;
  43734. } else {
  43735. version = version.version;
  43736. }
  43737. } else if (typeof version !== 'string') {
  43738. throw new TypeError("Invalid Version: " + version);
  43739. }
  43740. if (version.length > MAX_LENGTH$a) {
  43741. throw new TypeError("version is longer than " + MAX_LENGTH$a + " characters");
  43742. }
  43743. debug_1$3('SemVer', version, options);
  43744. this.options = options;
  43745. this.loose = !!options.loose;
  43746. this.includePrerelease = !!options.includePrerelease;
  43747. var m = version.trim().match(options.loose ? re$h[t$o.LOOSE] : re$h[t$o.FULL]);
  43748. if (!m) {
  43749. throw new TypeError("Invalid Version: " + version);
  43750. }
  43751. this.raw = version;
  43752. this.major = +m[1];
  43753. this.minor = +m[2];
  43754. this.patch = +m[3];
  43755. if (this.major > MAX_SAFE_INTEGER$6 || this.major < 0) {
  43756. throw new TypeError('Invalid major version');
  43757. }
  43758. if (this.minor > MAX_SAFE_INTEGER$6 || this.minor < 0) {
  43759. throw new TypeError('Invalid minor version');
  43760. }
  43761. if (this.patch > MAX_SAFE_INTEGER$6 || this.patch < 0) {
  43762. throw new TypeError('Invalid patch version');
  43763. }
  43764. if (!m[4]) {
  43765. this.prerelease = [];
  43766. } else {
  43767. this.prerelease = m[4].split('.').map(function (id) {
  43768. if (/^[0-9]+$/.test(id)) {
  43769. var num = +id;
  43770. if (num >= 0 && num < MAX_SAFE_INTEGER$6) {
  43771. return num;
  43772. }
  43773. }
  43774. return id;
  43775. });
  43776. }
  43777. this.build = m[5] ? m[5].split('.') : [];
  43778. this.format();
  43779. }
  43780. var _proto = SemVer.prototype;
  43781. _proto.format = function format() {
  43782. this.version = this.major + "." + this.minor + "." + this.patch;
  43783. if (this.prerelease.length) {
  43784. this.version += "-" + this.prerelease.join('.');
  43785. }
  43786. return this.version;
  43787. };
  43788. _proto.toString = function toString() {
  43789. return this.version;
  43790. };
  43791. _proto.compare = function compare(other) {
  43792. debug_1$3('SemVer.compare', this.version, this.options, other);
  43793. if (!(other instanceof SemVer)) {
  43794. if (typeof other === 'string' && other === this.version) {
  43795. return 0;
  43796. }
  43797. other = new SemVer(other, this.options);
  43798. }
  43799. if (other.version === this.version) {
  43800. return 0;
  43801. }
  43802. return this.compareMain(other) || this.comparePre(other);
  43803. };
  43804. _proto.compareMain = function compareMain(other) {
  43805. if (!(other instanceof SemVer)) {
  43806. other = new SemVer(other, this.options);
  43807. }
  43808. return compareIdentifiers$6(this.major, other.major) || compareIdentifiers$6(this.minor, other.minor) || compareIdentifiers$6(this.patch, other.patch);
  43809. };
  43810. _proto.comparePre = function comparePre(other) {
  43811. if (!(other instanceof SemVer)) {
  43812. other = new SemVer(other, this.options);
  43813. }
  43814. if (this.prerelease.length && !other.prerelease.length) {
  43815. return -1;
  43816. } else if (!this.prerelease.length && other.prerelease.length) {
  43817. return 1;
  43818. } else if (!this.prerelease.length && !other.prerelease.length) {
  43819. return 0;
  43820. }
  43821. var i = 0;
  43822. do {
  43823. var a = this.prerelease[i];
  43824. var b = other.prerelease[i];
  43825. debug_1$3('prerelease compare', i, a, b);
  43826. if (a === undefined && b === undefined) {
  43827. return 0;
  43828. } else if (b === undefined) {
  43829. return 1;
  43830. } else if (a === undefined) {
  43831. return -1;
  43832. } else if (a === b) {
  43833. continue;
  43834. } else {
  43835. return compareIdentifiers$6(a, b);
  43836. }
  43837. } while (++i);
  43838. };
  43839. _proto.compareBuild = function compareBuild(other) {
  43840. if (!(other instanceof SemVer)) {
  43841. other = new SemVer(other, this.options);
  43842. }
  43843. var i = 0;
  43844. do {
  43845. var a = this.build[i];
  43846. var b = other.build[i];
  43847. debug_1$3('prerelease compare', i, a, b);
  43848. if (a === undefined && b === undefined) {
  43849. return 0;
  43850. } else if (b === undefined) {
  43851. return 1;
  43852. } else if (a === undefined) {
  43853. return -1;
  43854. } else if (a === b) {
  43855. continue;
  43856. } else {
  43857. return compareIdentifiers$6(a, b);
  43858. }
  43859. } while (++i);
  43860. };
  43861. _proto.inc = function inc(release, identifier) {
  43862. switch (release) {
  43863. case 'premajor':
  43864. this.prerelease.length = 0;
  43865. this.patch = 0;
  43866. this.minor = 0;
  43867. this.major++;
  43868. this.inc('pre', identifier);
  43869. break;
  43870. case 'preminor':
  43871. this.prerelease.length = 0;
  43872. this.patch = 0;
  43873. this.minor++;
  43874. this.inc('pre', identifier);
  43875. break;
  43876. case 'prepatch':
  43877. this.prerelease.length = 0;
  43878. this.inc('patch', identifier);
  43879. this.inc('pre', identifier);
  43880. break;
  43881. case 'prerelease':
  43882. if (this.prerelease.length === 0) {
  43883. this.inc('patch', identifier);
  43884. }
  43885. this.inc('pre', identifier);
  43886. break;
  43887. case 'major':
  43888. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  43889. this.major++;
  43890. }
  43891. this.minor = 0;
  43892. this.patch = 0;
  43893. this.prerelease = [];
  43894. break;
  43895. case 'minor':
  43896. if (this.patch !== 0 || this.prerelease.length === 0) {
  43897. this.minor++;
  43898. }
  43899. this.patch = 0;
  43900. this.prerelease = [];
  43901. break;
  43902. case 'patch':
  43903. if (this.prerelease.length === 0) {
  43904. this.patch++;
  43905. }
  43906. this.prerelease = [];
  43907. break;
  43908. case 'pre':
  43909. if (this.prerelease.length === 0) {
  43910. this.prerelease = [0];
  43911. } else {
  43912. var i = this.prerelease.length;
  43913. while (--i >= 0) {
  43914. if (typeof this.prerelease[i] === 'number') {
  43915. this.prerelease[i]++;
  43916. i = -2;
  43917. }
  43918. }
  43919. if (i === -1) {
  43920. this.prerelease.push(0);
  43921. }
  43922. }
  43923. if (identifier) {
  43924. if (this.prerelease[0] === identifier) {
  43925. if (isNaN(this.prerelease[1])) {
  43926. this.prerelease = [identifier, 0];
  43927. }
  43928. } else {
  43929. this.prerelease = [identifier, 0];
  43930. }
  43931. }
  43932. break;
  43933. default:
  43934. throw new Error("invalid increment argument: " + release);
  43935. }
  43936. this.format();
  43937. this.raw = this.version;
  43938. return this;
  43939. };
  43940. return SemVer;
  43941. }();
  43942. var semver$c = SemVer$3;
  43943. var MAX_LENGTH$9 = constants$3.MAX_LENGTH;
  43944. var re$g = re_1$3.re,
  43945. t$n = re_1$3.t;
  43946. var parse$7 = function parse(version, options) {
  43947. options = parseOptions_1$2(options);
  43948. if (version instanceof semver$c) {
  43949. return version;
  43950. }
  43951. if (typeof version !== 'string') {
  43952. return null;
  43953. }
  43954. if (version.length > MAX_LENGTH$9) {
  43955. return null;
  43956. }
  43957. var r = options.loose ? re$g[t$n.LOOSE] : re$g[t$n.FULL];
  43958. if (!r.test(version)) {
  43959. return null;
  43960. }
  43961. try {
  43962. return new semver$c(version, options);
  43963. } catch (er) {
  43964. return null;
  43965. }
  43966. };
  43967. var parse_1$3 = parse$7;
  43968. var valid$5 = function valid(version, options) {
  43969. var v = parse_1$3(version, options);
  43970. return v ? v.version : null;
  43971. };
  43972. var valid_1$2 = valid$5;
  43973. var clean$2 = function clean(version, options) {
  43974. var s = parse_1$3(version.trim().replace(/^[=v]+/, ''), options);
  43975. return s ? s.version : null;
  43976. };
  43977. var clean_1$2 = clean$2;
  43978. var inc$2 = function inc(version, release, options, identifier) {
  43979. if (typeof options === 'string') {
  43980. identifier = options;
  43981. options = undefined;
  43982. }
  43983. try {
  43984. return new semver$c(version, options).inc(release, identifier).version;
  43985. } catch (er) {
  43986. return null;
  43987. }
  43988. };
  43989. var inc_1$2 = inc$2;
  43990. var compare$6 = function compare(a, b, loose) {
  43991. return new semver$c(a, loose).compare(new semver$c(b, loose));
  43992. };
  43993. var compare_1$3 = compare$6;
  43994. var eq$3 = function eq(a, b, loose) {
  43995. return compare_1$3(a, b, loose) === 0;
  43996. };
  43997. var eq_1$3 = eq$3;
  43998. var diff$2 = function diff(version1, version2) {
  43999. if (eq_1$3(version1, version2)) {
  44000. return null;
  44001. } else {
  44002. var v1 = parse_1$3(version1);
  44003. var v2 = parse_1$3(version2);
  44004. var hasPre = v1.prerelease.length || v2.prerelease.length;
  44005. var prefix = hasPre ? 'pre' : '';
  44006. var defaultResult = hasPre ? 'prerelease' : '';
  44007. for (var key in v1) {
  44008. if (key === 'major' || key === 'minor' || key === 'patch') {
  44009. if (v1[key] !== v2[key]) {
  44010. return prefix + key;
  44011. }
  44012. }
  44013. }
  44014. return defaultResult;
  44015. }
  44016. };
  44017. var diff_1$2 = diff$2;
  44018. var major$2 = function major(a, loose) {
  44019. return new semver$c(a, loose).major;
  44020. };
  44021. var major_1$2 = major$2;
  44022. var minor$2 = function minor(a, loose) {
  44023. return new semver$c(a, loose).minor;
  44024. };
  44025. var minor_1$2 = minor$2;
  44026. var patch$2 = function patch(a, loose) {
  44027. return new semver$c(a, loose).patch;
  44028. };
  44029. var patch_1$2 = patch$2;
  44030. var prerelease$2 = function prerelease(version, options) {
  44031. var parsed = parse_1$3(version, options);
  44032. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  44033. };
  44034. var prerelease_1$2 = prerelease$2;
  44035. var rcompare$2 = function rcompare(a, b, loose) {
  44036. return compare_1$3(b, a, loose);
  44037. };
  44038. var rcompare_1$2 = rcompare$2;
  44039. var compareLoose$2 = function compareLoose(a, b) {
  44040. return compare_1$3(a, b, true);
  44041. };
  44042. var compareLoose_1$2 = compareLoose$2;
  44043. var compareBuild$2 = function compareBuild(a, b, loose) {
  44044. var versionA = new semver$c(a, loose);
  44045. var versionB = new semver$c(b, loose);
  44046. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  44047. };
  44048. var compareBuild_1$2 = compareBuild$2;
  44049. var sort$2 = function sort(list, loose) {
  44050. return list.sort(function (a, b) {
  44051. return compareBuild_1$2(a, b, loose);
  44052. });
  44053. };
  44054. var sort_1$2 = sort$2;
  44055. var rsort$2 = function rsort(list, loose) {
  44056. return list.sort(function (a, b) {
  44057. return compareBuild_1$2(b, a, loose);
  44058. });
  44059. };
  44060. var rsort_1$2 = rsort$2;
  44061. var gt$3 = function gt(a, b, loose) {
  44062. return compare_1$3(a, b, loose) > 0;
  44063. };
  44064. var gt_1$3 = gt$3;
  44065. var lt$3 = function lt(a, b, loose) {
  44066. return compare_1$3(a, b, loose) < 0;
  44067. };
  44068. var lt_1$3 = lt$3;
  44069. var neq$3 = function neq(a, b, loose) {
  44070. return compare_1$3(a, b, loose) !== 0;
  44071. };
  44072. var neq_1$3 = neq$3;
  44073. var gte$3 = function gte(a, b, loose) {
  44074. return compare_1$3(a, b, loose) >= 0;
  44075. };
  44076. var gte_1$3 = gte$3;
  44077. var lte$3 = function lte(a, b, loose) {
  44078. return compare_1$3(a, b, loose) <= 0;
  44079. };
  44080. var lte_1$3 = lte$3;
  44081. var cmp$3 = function cmp(a, op, b, loose) {
  44082. switch (op) {
  44083. case '===':
  44084. if (typeof a === 'object') a = a.version;
  44085. if (typeof b === 'object') b = b.version;
  44086. return a === b;
  44087. case '!==':
  44088. if (typeof a === 'object') a = a.version;
  44089. if (typeof b === 'object') b = b.version;
  44090. return a !== b;
  44091. case '':
  44092. case '=':
  44093. case '==':
  44094. return eq_1$3(a, b, loose);
  44095. case '!=':
  44096. return neq_1$3(a, b, loose);
  44097. case '>':
  44098. return gt_1$3(a, b, loose);
  44099. case '>=':
  44100. return gte_1$3(a, b, loose);
  44101. case '<':
  44102. return lt_1$3(a, b, loose);
  44103. case '<=':
  44104. return lte_1$3(a, b, loose);
  44105. default:
  44106. throw new TypeError("Invalid operator: " + op);
  44107. }
  44108. };
  44109. var cmp_1$3 = cmp$3;
  44110. var re$f = re_1$3.re,
  44111. t$m = re_1$3.t;
  44112. var coerce$3 = function coerce(version, options) {
  44113. if (version instanceof semver$c) {
  44114. return version;
  44115. }
  44116. if (typeof version === 'number') {
  44117. version = String(version);
  44118. }
  44119. if (typeof version !== 'string') {
  44120. return null;
  44121. }
  44122. options = options || {};
  44123. var match = null;
  44124. if (!options.rtl) {
  44125. match = version.match(re$f[t$m.COERCE]);
  44126. } else {
  44127. var next;
  44128. while ((next = re$f[t$m.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  44129. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  44130. match = next;
  44131. }
  44132. re$f[t$m.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  44133. }
  44134. re$f[t$m.COERCERTL].lastIndex = -1;
  44135. }
  44136. if (match === null) return null;
  44137. return parse_1$3(match[2] + "." + (match[3] || '0') + "." + (match[4] || '0'), options);
  44138. };
  44139. var coerce_1$3 = coerce$3;
  44140. var iterator$2 = function iterator(Yallist) {
  44141. Yallist.prototype[Symbol.iterator] = regenerator.mark(function _callee() {
  44142. var walker;
  44143. return regenerator.wrap(function _callee$(_context) {
  44144. while (1) {
  44145. switch (_context.prev = _context.next) {
  44146. case 0:
  44147. walker = this.head;
  44148. case 1:
  44149. if (!walker) {
  44150. _context.next = 7;
  44151. break;
  44152. }
  44153. _context.next = 4;
  44154. return walker.value;
  44155. case 4:
  44156. walker = walker.next;
  44157. _context.next = 1;
  44158. break;
  44159. case 7:
  44160. case "end":
  44161. return _context.stop();
  44162. }
  44163. }
  44164. }, _callee, this);
  44165. });
  44166. };
  44167. var yallist$2 = Yallist$2;
  44168. Yallist$2.Node = Node$2;
  44169. Yallist$2.create = Yallist$2;
  44170. function Yallist$2(list) {
  44171. var self = this;
  44172. if (!(self instanceof Yallist$2)) {
  44173. self = new Yallist$2();
  44174. }
  44175. self.tail = null;
  44176. self.head = null;
  44177. self.length = 0;
  44178. if (list && typeof list.forEach === 'function') {
  44179. list.forEach(function (item) {
  44180. self.push(item);
  44181. });
  44182. } else if (arguments.length > 0) {
  44183. for (var i = 0, l = arguments.length; i < l; i++) {
  44184. self.push(arguments[i]);
  44185. }
  44186. }
  44187. return self;
  44188. }
  44189. Yallist$2.prototype.removeNode = function (node) {
  44190. if (node.list !== this) {
  44191. throw new Error('removing node which does not belong to this list');
  44192. }
  44193. var next = node.next;
  44194. var prev = node.prev;
  44195. if (next) {
  44196. next.prev = prev;
  44197. }
  44198. if (prev) {
  44199. prev.next = next;
  44200. }
  44201. if (node === this.head) {
  44202. this.head = next;
  44203. }
  44204. if (node === this.tail) {
  44205. this.tail = prev;
  44206. }
  44207. node.list.length--;
  44208. node.next = null;
  44209. node.prev = null;
  44210. node.list = null;
  44211. return next;
  44212. };
  44213. Yallist$2.prototype.unshiftNode = function (node) {
  44214. if (node === this.head) {
  44215. return;
  44216. }
  44217. if (node.list) {
  44218. node.list.removeNode(node);
  44219. }
  44220. var head = this.head;
  44221. node.list = this;
  44222. node.next = head;
  44223. if (head) {
  44224. head.prev = node;
  44225. }
  44226. this.head = node;
  44227. if (!this.tail) {
  44228. this.tail = node;
  44229. }
  44230. this.length++;
  44231. };
  44232. Yallist$2.prototype.pushNode = function (node) {
  44233. if (node === this.tail) {
  44234. return;
  44235. }
  44236. if (node.list) {
  44237. node.list.removeNode(node);
  44238. }
  44239. var tail = this.tail;
  44240. node.list = this;
  44241. node.prev = tail;
  44242. if (tail) {
  44243. tail.next = node;
  44244. }
  44245. this.tail = node;
  44246. if (!this.head) {
  44247. this.head = node;
  44248. }
  44249. this.length++;
  44250. };
  44251. Yallist$2.prototype.push = function () {
  44252. for (var i = 0, l = arguments.length; i < l; i++) {
  44253. push$3(this, arguments[i]);
  44254. }
  44255. return this.length;
  44256. };
  44257. Yallist$2.prototype.unshift = function () {
  44258. for (var i = 0, l = arguments.length; i < l; i++) {
  44259. unshift$2(this, arguments[i]);
  44260. }
  44261. return this.length;
  44262. };
  44263. Yallist$2.prototype.pop = function () {
  44264. if (!this.tail) {
  44265. return undefined;
  44266. }
  44267. var res = this.tail.value;
  44268. this.tail = this.tail.prev;
  44269. if (this.tail) {
  44270. this.tail.next = null;
  44271. } else {
  44272. this.head = null;
  44273. }
  44274. this.length--;
  44275. return res;
  44276. };
  44277. Yallist$2.prototype.shift = function () {
  44278. if (!this.head) {
  44279. return undefined;
  44280. }
  44281. var res = this.head.value;
  44282. this.head = this.head.next;
  44283. if (this.head) {
  44284. this.head.prev = null;
  44285. } else {
  44286. this.tail = null;
  44287. }
  44288. this.length--;
  44289. return res;
  44290. };
  44291. Yallist$2.prototype.forEach = function (fn, thisp) {
  44292. thisp = thisp || this;
  44293. for (var walker = this.head, i = 0; walker !== null; i++) {
  44294. fn.call(thisp, walker.value, i, this);
  44295. walker = walker.next;
  44296. }
  44297. };
  44298. Yallist$2.prototype.forEachReverse = function (fn, thisp) {
  44299. thisp = thisp || this;
  44300. for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
  44301. fn.call(thisp, walker.value, i, this);
  44302. walker = walker.prev;
  44303. }
  44304. };
  44305. Yallist$2.prototype.get = function (n) {
  44306. for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
  44307. walker = walker.next;
  44308. }
  44309. if (i === n && walker !== null) {
  44310. return walker.value;
  44311. }
  44312. };
  44313. Yallist$2.prototype.getReverse = function (n) {
  44314. for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
  44315. walker = walker.prev;
  44316. }
  44317. if (i === n && walker !== null) {
  44318. return walker.value;
  44319. }
  44320. };
  44321. Yallist$2.prototype.map = function (fn, thisp) {
  44322. thisp = thisp || this;
  44323. var res = new Yallist$2();
  44324. for (var walker = this.head; walker !== null;) {
  44325. res.push(fn.call(thisp, walker.value, this));
  44326. walker = walker.next;
  44327. }
  44328. return res;
  44329. };
  44330. Yallist$2.prototype.mapReverse = function (fn, thisp) {
  44331. thisp = thisp || this;
  44332. var res = new Yallist$2();
  44333. for (var walker = this.tail; walker !== null;) {
  44334. res.push(fn.call(thisp, walker.value, this));
  44335. walker = walker.prev;
  44336. }
  44337. return res;
  44338. };
  44339. Yallist$2.prototype.reduce = function (fn, initial) {
  44340. var acc;
  44341. var walker = this.head;
  44342. if (arguments.length > 1) {
  44343. acc = initial;
  44344. } else if (this.head) {
  44345. walker = this.head.next;
  44346. acc = this.head.value;
  44347. } else {
  44348. throw new TypeError('Reduce of empty list with no initial value');
  44349. }
  44350. for (var i = 0; walker !== null; i++) {
  44351. acc = fn(acc, walker.value, i);
  44352. walker = walker.next;
  44353. }
  44354. return acc;
  44355. };
  44356. Yallist$2.prototype.reduceReverse = function (fn, initial) {
  44357. var acc;
  44358. var walker = this.tail;
  44359. if (arguments.length > 1) {
  44360. acc = initial;
  44361. } else if (this.tail) {
  44362. walker = this.tail.prev;
  44363. acc = this.tail.value;
  44364. } else {
  44365. throw new TypeError('Reduce of empty list with no initial value');
  44366. }
  44367. for (var i = this.length - 1; walker !== null; i--) {
  44368. acc = fn(acc, walker.value, i);
  44369. walker = walker.prev;
  44370. }
  44371. return acc;
  44372. };
  44373. Yallist$2.prototype.toArray = function () {
  44374. var arr = new Array(this.length);
  44375. for (var i = 0, walker = this.head; walker !== null; i++) {
  44376. arr[i] = walker.value;
  44377. walker = walker.next;
  44378. }
  44379. return arr;
  44380. };
  44381. Yallist$2.prototype.toArrayReverse = function () {
  44382. var arr = new Array(this.length);
  44383. for (var i = 0, walker = this.tail; walker !== null; i++) {
  44384. arr[i] = walker.value;
  44385. walker = walker.prev;
  44386. }
  44387. return arr;
  44388. };
  44389. Yallist$2.prototype.slice = function (from, to) {
  44390. to = to || this.length;
  44391. if (to < 0) {
  44392. to += this.length;
  44393. }
  44394. from = from || 0;
  44395. if (from < 0) {
  44396. from += this.length;
  44397. }
  44398. var ret = new Yallist$2();
  44399. if (to < from || to < 0) {
  44400. return ret;
  44401. }
  44402. if (from < 0) {
  44403. from = 0;
  44404. }
  44405. if (to > this.length) {
  44406. to = this.length;
  44407. }
  44408. for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
  44409. walker = walker.next;
  44410. }
  44411. for (; walker !== null && i < to; i++, walker = walker.next) {
  44412. ret.push(walker.value);
  44413. }
  44414. return ret;
  44415. };
  44416. Yallist$2.prototype.sliceReverse = function (from, to) {
  44417. to = to || this.length;
  44418. if (to < 0) {
  44419. to += this.length;
  44420. }
  44421. from = from || 0;
  44422. if (from < 0) {
  44423. from += this.length;
  44424. }
  44425. var ret = new Yallist$2();
  44426. if (to < from || to < 0) {
  44427. return ret;
  44428. }
  44429. if (from < 0) {
  44430. from = 0;
  44431. }
  44432. if (to > this.length) {
  44433. to = this.length;
  44434. }
  44435. for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
  44436. walker = walker.prev;
  44437. }
  44438. for (; walker !== null && i > from; i--, walker = walker.prev) {
  44439. ret.push(walker.value);
  44440. }
  44441. return ret;
  44442. };
  44443. Yallist$2.prototype.splice = function (start, deleteCount) {
  44444. if (start > this.length) {
  44445. start = this.length - 1;
  44446. }
  44447. if (start < 0) {
  44448. start = this.length + start;
  44449. }
  44450. for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
  44451. walker = walker.next;
  44452. }
  44453. var ret = [];
  44454. for (var i = 0; walker && i < deleteCount; i++) {
  44455. ret.push(walker.value);
  44456. walker = this.removeNode(walker);
  44457. }
  44458. if (walker === null) {
  44459. walker = this.tail;
  44460. }
  44461. if (walker !== this.head && walker !== this.tail) {
  44462. walker = walker.prev;
  44463. }
  44464. for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) {
  44465. walker = insert$2(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]);
  44466. }
  44467. return ret;
  44468. };
  44469. Yallist$2.prototype.reverse = function () {
  44470. var head = this.head;
  44471. var tail = this.tail;
  44472. for (var walker = head; walker !== null; walker = walker.prev) {
  44473. var p = walker.prev;
  44474. walker.prev = walker.next;
  44475. walker.next = p;
  44476. }
  44477. this.head = tail;
  44478. this.tail = head;
  44479. return this;
  44480. };
  44481. function insert$2(self, node, value) {
  44482. var inserted = node === self.head ? new Node$2(value, null, node, self) : new Node$2(value, node, node.next, self);
  44483. if (inserted.next === null) {
  44484. self.tail = inserted;
  44485. }
  44486. if (inserted.prev === null) {
  44487. self.head = inserted;
  44488. }
  44489. self.length++;
  44490. return inserted;
  44491. }
  44492. function push$3(self, item) {
  44493. self.tail = new Node$2(item, self.tail, null, self);
  44494. if (!self.head) {
  44495. self.head = self.tail;
  44496. }
  44497. self.length++;
  44498. }
  44499. function unshift$2(self, item) {
  44500. self.head = new Node$2(item, null, self.head, self);
  44501. if (!self.tail) {
  44502. self.tail = self.head;
  44503. }
  44504. self.length++;
  44505. }
  44506. function Node$2(value, prev, next, list) {
  44507. if (!(this instanceof Node$2)) {
  44508. return new Node$2(value, prev, next, list);
  44509. }
  44510. this.list = list;
  44511. this.value = value;
  44512. if (prev) {
  44513. prev.next = this;
  44514. this.prev = prev;
  44515. } else {
  44516. this.prev = null;
  44517. }
  44518. if (next) {
  44519. next.prev = this;
  44520. this.next = next;
  44521. } else {
  44522. this.next = null;
  44523. }
  44524. }
  44525. try {
  44526. iterator$2(Yallist$2);
  44527. } catch (er) {}
  44528. var MAX$2 = Symbol('max');
  44529. var LENGTH$2 = Symbol('length');
  44530. var LENGTH_CALCULATOR$2 = Symbol('lengthCalculator');
  44531. var ALLOW_STALE$2 = Symbol('allowStale');
  44532. var MAX_AGE$2 = Symbol('maxAge');
  44533. var DISPOSE$2 = Symbol('dispose');
  44534. var NO_DISPOSE_ON_SET$2 = Symbol('noDisposeOnSet');
  44535. var LRU_LIST$2 = Symbol('lruList');
  44536. var CACHE$2 = Symbol('cache');
  44537. var UPDATE_AGE_ON_GET$2 = Symbol('updateAgeOnGet');
  44538. var naiveLength$2 = function naiveLength() {
  44539. return 1;
  44540. };
  44541. var LRUCache$2 = function () {
  44542. function LRUCache(options) {
  44543. if (typeof options === 'number') options = {
  44544. max: options
  44545. };
  44546. if (!options) options = {};
  44547. if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number');
  44548. this[MAX$2] = options.max || Infinity;
  44549. var lc = options.length || naiveLength$2;
  44550. this[LENGTH_CALCULATOR$2] = typeof lc !== 'function' ? naiveLength$2 : lc;
  44551. this[ALLOW_STALE$2] = options.stale || false;
  44552. if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number');
  44553. this[MAX_AGE$2] = options.maxAge || 0;
  44554. this[DISPOSE$2] = options.dispose;
  44555. this[NO_DISPOSE_ON_SET$2] = options.noDisposeOnSet || false;
  44556. this[UPDATE_AGE_ON_GET$2] = options.updateAgeOnGet || false;
  44557. this.reset();
  44558. }
  44559. var _proto = LRUCache.prototype;
  44560. _proto.rforEach = function rforEach(fn, thisp) {
  44561. thisp = thisp || this;
  44562. for (var walker = this[LRU_LIST$2].tail; walker !== null;) {
  44563. var prev = walker.prev;
  44564. forEachStep$2(this, fn, walker, thisp);
  44565. walker = prev;
  44566. }
  44567. };
  44568. _proto.forEach = function forEach(fn, thisp) {
  44569. thisp = thisp || this;
  44570. for (var walker = this[LRU_LIST$2].head; walker !== null;) {
  44571. var next = walker.next;
  44572. forEachStep$2(this, fn, walker, thisp);
  44573. walker = next;
  44574. }
  44575. };
  44576. _proto.keys = function keys() {
  44577. return this[LRU_LIST$2].toArray().map(function (k) {
  44578. return k.key;
  44579. });
  44580. };
  44581. _proto.values = function values() {
  44582. return this[LRU_LIST$2].toArray().map(function (k) {
  44583. return k.value;
  44584. });
  44585. };
  44586. _proto.reset = function reset() {
  44587. var _this = this;
  44588. if (this[DISPOSE$2] && this[LRU_LIST$2] && this[LRU_LIST$2].length) {
  44589. this[LRU_LIST$2].forEach(function (hit) {
  44590. return _this[DISPOSE$2](hit.key, hit.value);
  44591. });
  44592. }
  44593. this[CACHE$2] = new Map();
  44594. this[LRU_LIST$2] = new yallist$2();
  44595. this[LENGTH$2] = 0;
  44596. };
  44597. _proto.dump = function dump() {
  44598. var _this2 = this;
  44599. return this[LRU_LIST$2].map(function (hit) {
  44600. return isStale$2(_this2, hit) ? false : {
  44601. k: hit.key,
  44602. v: hit.value,
  44603. e: hit.now + (hit.maxAge || 0)
  44604. };
  44605. }).toArray().filter(function (h) {
  44606. return h;
  44607. });
  44608. };
  44609. _proto.dumpLru = function dumpLru() {
  44610. return this[LRU_LIST$2];
  44611. };
  44612. _proto.set = function set(key, value, maxAge) {
  44613. maxAge = maxAge || this[MAX_AGE$2];
  44614. if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number');
  44615. var now = maxAge ? Date.now() : 0;
  44616. var len = this[LENGTH_CALCULATOR$2](value, key);
  44617. if (this[CACHE$2].has(key)) {
  44618. if (len > this[MAX$2]) {
  44619. _del$2(this, this[CACHE$2].get(key));
  44620. return false;
  44621. }
  44622. var node = this[CACHE$2].get(key);
  44623. var item = node.value;
  44624. if (this[DISPOSE$2]) {
  44625. if (!this[NO_DISPOSE_ON_SET$2]) this[DISPOSE$2](key, item.value);
  44626. }
  44627. item.now = now;
  44628. item.maxAge = maxAge;
  44629. item.value = value;
  44630. this[LENGTH$2] += len - item.length;
  44631. item.length = len;
  44632. this.get(key);
  44633. trim$2(this);
  44634. return true;
  44635. }
  44636. var hit = new Entry$3(key, value, len, now, maxAge);
  44637. if (hit.length > this[MAX$2]) {
  44638. if (this[DISPOSE$2]) this[DISPOSE$2](key, value);
  44639. return false;
  44640. }
  44641. this[LENGTH$2] += hit.length;
  44642. this[LRU_LIST$2].unshift(hit);
  44643. this[CACHE$2].set(key, this[LRU_LIST$2].head);
  44644. trim$2(this);
  44645. return true;
  44646. };
  44647. _proto.has = function has(key) {
  44648. if (!this[CACHE$2].has(key)) return false;
  44649. var hit = this[CACHE$2].get(key).value;
  44650. return !isStale$2(this, hit);
  44651. };
  44652. _proto.get = function get(key) {
  44653. return _get$2(this, key, true);
  44654. };
  44655. _proto.peek = function peek(key) {
  44656. return _get$2(this, key, false);
  44657. };
  44658. _proto.pop = function pop() {
  44659. var node = this[LRU_LIST$2].tail;
  44660. if (!node) return null;
  44661. _del$2(this, node);
  44662. return node.value;
  44663. };
  44664. _proto.del = function del(key) {
  44665. _del$2(this, this[CACHE$2].get(key));
  44666. };
  44667. _proto.load = function load(arr) {
  44668. this.reset();
  44669. var now = Date.now();
  44670. for (var l = arr.length - 1; l >= 0; l--) {
  44671. var hit = arr[l];
  44672. var expiresAt = hit.e || 0;
  44673. if (expiresAt === 0) this.set(hit.k, hit.v);else {
  44674. var maxAge = expiresAt - now;
  44675. if (maxAge > 0) {
  44676. this.set(hit.k, hit.v, maxAge);
  44677. }
  44678. }
  44679. }
  44680. };
  44681. _proto.prune = function prune() {
  44682. var _this3 = this;
  44683. this[CACHE$2].forEach(function (value, key) {
  44684. return _get$2(_this3, key, false);
  44685. });
  44686. };
  44687. _createClass(LRUCache, [{
  44688. key: "max",
  44689. get: function get() {
  44690. return this[MAX$2];
  44691. },
  44692. set: function set(mL) {
  44693. if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number');
  44694. this[MAX$2] = mL || Infinity;
  44695. trim$2(this);
  44696. }
  44697. }, {
  44698. key: "allowStale",
  44699. get: function get() {
  44700. return this[ALLOW_STALE$2];
  44701. },
  44702. set: function set(allowStale) {
  44703. this[ALLOW_STALE$2] = !!allowStale;
  44704. }
  44705. }, {
  44706. key: "maxAge",
  44707. get: function get() {
  44708. return this[MAX_AGE$2];
  44709. },
  44710. set: function set(mA) {
  44711. if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number');
  44712. this[MAX_AGE$2] = mA;
  44713. trim$2(this);
  44714. }
  44715. }, {
  44716. key: "lengthCalculator",
  44717. get: function get() {
  44718. return this[LENGTH_CALCULATOR$2];
  44719. },
  44720. set: function set(lC) {
  44721. var _this4 = this;
  44722. if (typeof lC !== 'function') lC = naiveLength$2;
  44723. if (lC !== this[LENGTH_CALCULATOR$2]) {
  44724. this[LENGTH_CALCULATOR$2] = lC;
  44725. this[LENGTH$2] = 0;
  44726. this[LRU_LIST$2].forEach(function (hit) {
  44727. hit.length = _this4[LENGTH_CALCULATOR$2](hit.value, hit.key);
  44728. _this4[LENGTH$2] += hit.length;
  44729. });
  44730. }
  44731. trim$2(this);
  44732. }
  44733. }, {
  44734. key: "length",
  44735. get: function get() {
  44736. return this[LENGTH$2];
  44737. }
  44738. }, {
  44739. key: "itemCount",
  44740. get: function get() {
  44741. return this[LRU_LIST$2].length;
  44742. }
  44743. }]);
  44744. return LRUCache;
  44745. }();
  44746. var _get$2 = function _get(self, key, doUse) {
  44747. var node = self[CACHE$2].get(key);
  44748. if (node) {
  44749. var hit = node.value;
  44750. if (isStale$2(self, hit)) {
  44751. _del$2(self, node);
  44752. if (!self[ALLOW_STALE$2]) return undefined;
  44753. } else {
  44754. if (doUse) {
  44755. if (self[UPDATE_AGE_ON_GET$2]) node.value.now = Date.now();
  44756. self[LRU_LIST$2].unshiftNode(node);
  44757. }
  44758. }
  44759. return hit.value;
  44760. }
  44761. };
  44762. var isStale$2 = function isStale(self, hit) {
  44763. if (!hit || !hit.maxAge && !self[MAX_AGE$2]) return false;
  44764. var diff = Date.now() - hit.now;
  44765. return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE$2] && diff > self[MAX_AGE$2];
  44766. };
  44767. var trim$2 = function trim(self) {
  44768. if (self[LENGTH$2] > self[MAX$2]) {
  44769. for (var walker = self[LRU_LIST$2].tail; self[LENGTH$2] > self[MAX$2] && walker !== null;) {
  44770. var prev = walker.prev;
  44771. _del$2(self, walker);
  44772. walker = prev;
  44773. }
  44774. }
  44775. };
  44776. var _del$2 = function _del(self, node) {
  44777. if (node) {
  44778. var hit = node.value;
  44779. if (self[DISPOSE$2]) self[DISPOSE$2](hit.key, hit.value);
  44780. self[LENGTH$2] -= hit.length;
  44781. self[CACHE$2]["delete"](hit.key);
  44782. self[LRU_LIST$2].removeNode(node);
  44783. }
  44784. };
  44785. var Entry$3 = function Entry(key, value, length, now, maxAge) {
  44786. this.key = key;
  44787. this.value = value;
  44788. this.length = length;
  44789. this.now = now;
  44790. this.maxAge = maxAge || 0;
  44791. };
  44792. var forEachStep$2 = function forEachStep(self, fn, node, thisp) {
  44793. var hit = node.value;
  44794. if (isStale$2(self, hit)) {
  44795. _del$2(self, node);
  44796. if (!self[ALLOW_STALE$2]) hit = undefined;
  44797. }
  44798. if (hit) fn.call(thisp, hit.value, hit.key, self);
  44799. };
  44800. var lruCache$2 = LRUCache$2;
  44801. var Range$2 = function () {
  44802. function Range(range, options) {
  44803. var _this = this;
  44804. options = parseOptions_1$2(options);
  44805. if (range instanceof Range) {
  44806. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  44807. return range;
  44808. } else {
  44809. return new Range(range.raw, options);
  44810. }
  44811. }
  44812. if (range instanceof comparator$2) {
  44813. this.raw = range.value;
  44814. this.set = [[range]];
  44815. this.format();
  44816. return this;
  44817. }
  44818. this.options = options;
  44819. this.loose = !!options.loose;
  44820. this.includePrerelease = !!options.includePrerelease;
  44821. this.raw = range;
  44822. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  44823. return _this.parseRange(range.trim());
  44824. }).filter(function (c) {
  44825. return c.length;
  44826. });
  44827. if (!this.set.length) {
  44828. throw new TypeError("Invalid SemVer Range: " + range);
  44829. }
  44830. if (this.set.length > 1) {
  44831. var first = this.set[0];
  44832. this.set = this.set.filter(function (c) {
  44833. return !isNullSet$2(c[0]);
  44834. });
  44835. if (this.set.length === 0) this.set = [first];else if (this.set.length > 1) {
  44836. for (var _iterator = _createForOfIteratorHelperLoose(this.set), _step; !(_step = _iterator()).done;) {
  44837. var c = _step.value;
  44838. if (c.length === 1 && isAny$2(c[0])) {
  44839. this.set = [c];
  44840. break;
  44841. }
  44842. }
  44843. }
  44844. }
  44845. this.format();
  44846. }
  44847. var _proto = Range.prototype;
  44848. _proto.format = function format() {
  44849. this.range = this.set.map(function (comps) {
  44850. return comps.join(' ').trim();
  44851. }).join('||').trim();
  44852. return this.range;
  44853. };
  44854. _proto.toString = function toString() {
  44855. return this.range;
  44856. };
  44857. _proto.parseRange = function parseRange(range) {
  44858. var _this2 = this;
  44859. range = range.trim();
  44860. var memoOpts = Object.keys(this.options).join(',');
  44861. var memoKey = "parseRange:" + memoOpts + ":" + range;
  44862. var cached = cache$3.get(memoKey);
  44863. if (cached) return cached;
  44864. var loose = this.options.loose;
  44865. var hr = loose ? re$e[t$l.HYPHENRANGELOOSE] : re$e[t$l.HYPHENRANGE];
  44866. range = range.replace(hr, hyphenReplace$2(this.options.includePrerelease));
  44867. debug_1$3('hyphen replace', range);
  44868. range = range.replace(re$e[t$l.COMPARATORTRIM], comparatorTrimReplace$2);
  44869. debug_1$3('comparator trim', range, re$e[t$l.COMPARATORTRIM]);
  44870. range = range.replace(re$e[t$l.TILDETRIM], tildeTrimReplace$2);
  44871. range = range.replace(re$e[t$l.CARETTRIM], caretTrimReplace$2);
  44872. range = range.split(/\s+/).join(' ');
  44873. var compRe = loose ? re$e[t$l.COMPARATORLOOSE] : re$e[t$l.COMPARATOR];
  44874. var rangeList = range.split(' ').map(function (comp) {
  44875. return parseComparator$2(comp, _this2.options);
  44876. }).join(' ').split(/\s+/).map(function (comp) {
  44877. return replaceGTE0$2(comp, _this2.options);
  44878. }).filter(this.options.loose ? function (comp) {
  44879. return !!comp.match(compRe);
  44880. } : function () {
  44881. return true;
  44882. }).map(function (comp) {
  44883. return new comparator$2(comp, _this2.options);
  44884. });
  44885. rangeList.length;
  44886. var rangeMap = new Map();
  44887. for (var _iterator2 = _createForOfIteratorHelperLoose(rangeList), _step2; !(_step2 = _iterator2()).done;) {
  44888. var comp = _step2.value;
  44889. if (isNullSet$2(comp)) return [comp];
  44890. rangeMap.set(comp.value, comp);
  44891. }
  44892. if (rangeMap.size > 1 && rangeMap.has('')) rangeMap["delete"]('');
  44893. var result = _toConsumableArray(rangeMap.values());
  44894. cache$3.set(memoKey, result);
  44895. return result;
  44896. };
  44897. _proto.intersects = function intersects(range, options) {
  44898. if (!(range instanceof Range)) {
  44899. throw new TypeError('a Range is required');
  44900. }
  44901. return this.set.some(function (thisComparators) {
  44902. return isSatisfiable$2(thisComparators, options) && range.set.some(function (rangeComparators) {
  44903. return isSatisfiable$2(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  44904. return rangeComparators.every(function (rangeComparator) {
  44905. return thisComparator.intersects(rangeComparator, options);
  44906. });
  44907. });
  44908. });
  44909. });
  44910. };
  44911. _proto.test = function test(version) {
  44912. if (!version) {
  44913. return false;
  44914. }
  44915. if (typeof version === 'string') {
  44916. try {
  44917. version = new semver$c(version, this.options);
  44918. } catch (er) {
  44919. return false;
  44920. }
  44921. }
  44922. for (var i = 0; i < this.set.length; i++) {
  44923. if (testSet$2(this.set[i], version, this.options)) {
  44924. return true;
  44925. }
  44926. }
  44927. return false;
  44928. };
  44929. return Range;
  44930. }();
  44931. var range$2 = Range$2;
  44932. var cache$3 = new lruCache$2({
  44933. max: 1000
  44934. });
  44935. var re$e = re_1$3.re,
  44936. t$l = re_1$3.t,
  44937. comparatorTrimReplace$2 = re_1$3.comparatorTrimReplace,
  44938. tildeTrimReplace$2 = re_1$3.tildeTrimReplace,
  44939. caretTrimReplace$2 = re_1$3.caretTrimReplace;
  44940. var isNullSet$2 = function isNullSet(c) {
  44941. return c.value === '<0.0.0-0';
  44942. };
  44943. var isAny$2 = function isAny(c) {
  44944. return c.value === '';
  44945. };
  44946. var isSatisfiable$2 = function isSatisfiable(comparators, options) {
  44947. var result = true;
  44948. var remainingComparators = comparators.slice();
  44949. var testComparator = remainingComparators.pop();
  44950. while (result && remainingComparators.length) {
  44951. result = remainingComparators.every(function (otherComparator) {
  44952. return testComparator.intersects(otherComparator, options);
  44953. });
  44954. testComparator = remainingComparators.pop();
  44955. }
  44956. return result;
  44957. };
  44958. var parseComparator$2 = function parseComparator(comp, options) {
  44959. debug_1$3('comp', comp, options);
  44960. comp = replaceCarets$2(comp, options);
  44961. debug_1$3('caret', comp);
  44962. comp = replaceTildes$2(comp, options);
  44963. debug_1$3('tildes', comp);
  44964. comp = replaceXRanges$2(comp, options);
  44965. debug_1$3('xrange', comp);
  44966. comp = replaceStars$2(comp, options);
  44967. debug_1$3('stars', comp);
  44968. return comp;
  44969. };
  44970. var isX$2 = function isX(id) {
  44971. return !id || id.toLowerCase() === 'x' || id === '*';
  44972. };
  44973. var replaceTildes$2 = function replaceTildes(comp, options) {
  44974. return comp.trim().split(/\s+/).map(function (comp) {
  44975. return replaceTilde$2(comp, options);
  44976. }).join(' ');
  44977. };
  44978. var replaceTilde$2 = function replaceTilde(comp, options) {
  44979. var r = options.loose ? re$e[t$l.TILDELOOSE] : re$e[t$l.TILDE];
  44980. return comp.replace(r, function (_, M, m, p, pr) {
  44981. debug_1$3('tilde', comp, _, M, m, p, pr);
  44982. var ret;
  44983. if (isX$2(M)) {
  44984. ret = '';
  44985. } else if (isX$2(m)) {
  44986. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0-0";
  44987. } else if (isX$2(p)) {
  44988. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0-0";
  44989. } else if (pr) {
  44990. debug_1$3('replaceTilde pr', pr);
  44991. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  44992. } else {
  44993. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0-0";
  44994. }
  44995. debug_1$3('tilde return', ret);
  44996. return ret;
  44997. });
  44998. };
  44999. var replaceCarets$2 = function replaceCarets(comp, options) {
  45000. return comp.trim().split(/\s+/).map(function (comp) {
  45001. return replaceCaret$2(comp, options);
  45002. }).join(' ');
  45003. };
  45004. var replaceCaret$2 = function replaceCaret(comp, options) {
  45005. debug_1$3('caret', comp, options);
  45006. var r = options.loose ? re$e[t$l.CARETLOOSE] : re$e[t$l.CARET];
  45007. var z = options.includePrerelease ? '-0' : '';
  45008. return comp.replace(r, function (_, M, m, p, pr) {
  45009. debug_1$3('caret', comp, _, M, m, p, pr);
  45010. var ret;
  45011. if (isX$2(M)) {
  45012. ret = '';
  45013. } else if (isX$2(m)) {
  45014. ret = ">=" + M + ".0.0" + z + " <" + (+M + 1) + ".0.0-0";
  45015. } else if (isX$2(p)) {
  45016. if (M === '0') {
  45017. ret = ">=" + M + "." + m + ".0" + z + " <" + M + "." + (+m + 1) + ".0-0";
  45018. } else {
  45019. ret = ">=" + M + "." + m + ".0" + z + " <" + (+M + 1) + ".0.0-0";
  45020. }
  45021. } else if (pr) {
  45022. debug_1$3('replaceCaret pr', pr);
  45023. if (M === '0') {
  45024. if (m === '0') {
  45025. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1) + "-0";
  45026. } else {
  45027. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  45028. }
  45029. } else {
  45030. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0-0";
  45031. }
  45032. } else {
  45033. debug_1$3('no pr');
  45034. if (M === '0') {
  45035. if (m === '0') {
  45036. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + m + "." + (+p + 1) + "-0";
  45037. } else {
  45038. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + (+m + 1) + ".0-0";
  45039. }
  45040. } else {
  45041. ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0-0";
  45042. }
  45043. }
  45044. debug_1$3('caret return', ret);
  45045. return ret;
  45046. });
  45047. };
  45048. var replaceXRanges$2 = function replaceXRanges(comp, options) {
  45049. debug_1$3('replaceXRanges', comp, options);
  45050. return comp.split(/\s+/).map(function (comp) {
  45051. return replaceXRange$2(comp, options);
  45052. }).join(' ');
  45053. };
  45054. var replaceXRange$2 = function replaceXRange(comp, options) {
  45055. comp = comp.trim();
  45056. var r = options.loose ? re$e[t$l.XRANGELOOSE] : re$e[t$l.XRANGE];
  45057. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  45058. debug_1$3('xRange', comp, ret, gtlt, M, m, p, pr);
  45059. var xM = isX$2(M);
  45060. var xm = xM || isX$2(m);
  45061. var xp = xm || isX$2(p);
  45062. var anyX = xp;
  45063. if (gtlt === '=' && anyX) {
  45064. gtlt = '';
  45065. }
  45066. pr = options.includePrerelease ? '-0' : '';
  45067. if (xM) {
  45068. if (gtlt === '>' || gtlt === '<') {
  45069. ret = '<0.0.0-0';
  45070. } else {
  45071. ret = '*';
  45072. }
  45073. } else if (gtlt && anyX) {
  45074. if (xm) {
  45075. m = 0;
  45076. }
  45077. p = 0;
  45078. if (gtlt === '>') {
  45079. gtlt = '>=';
  45080. if (xm) {
  45081. M = +M + 1;
  45082. m = 0;
  45083. p = 0;
  45084. } else {
  45085. m = +m + 1;
  45086. p = 0;
  45087. }
  45088. } else if (gtlt === '<=') {
  45089. gtlt = '<';
  45090. if (xm) {
  45091. M = +M + 1;
  45092. } else {
  45093. m = +m + 1;
  45094. }
  45095. }
  45096. if (gtlt === '<') pr = '-0';
  45097. ret = gtlt + M + "." + m + "." + p + pr;
  45098. } else if (xm) {
  45099. ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0-0";
  45100. } else if (xp) {
  45101. ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  45102. }
  45103. debug_1$3('xRange return', ret);
  45104. return ret;
  45105. });
  45106. };
  45107. var replaceStars$2 = function replaceStars(comp, options) {
  45108. debug_1$3('replaceStars', comp, options);
  45109. return comp.trim().replace(re$e[t$l.STAR], '');
  45110. };
  45111. var replaceGTE0$2 = function replaceGTE0(comp, options) {
  45112. debug_1$3('replaceGTE0', comp, options);
  45113. return comp.trim().replace(re$e[options.includePrerelease ? t$l.GTE0PRE : t$l.GTE0], '');
  45114. };
  45115. var hyphenReplace$2 = function hyphenReplace(incPr) {
  45116. return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  45117. if (isX$2(fM)) {
  45118. from = '';
  45119. } else if (isX$2(fm)) {
  45120. from = ">=" + fM + ".0.0" + (incPr ? '-0' : '');
  45121. } else if (isX$2(fp)) {
  45122. from = ">=" + fM + "." + fm + ".0" + (incPr ? '-0' : '');
  45123. } else if (fpr) {
  45124. from = ">=" + from;
  45125. } else {
  45126. from = ">=" + from + (incPr ? '-0' : '');
  45127. }
  45128. if (isX$2(tM)) {
  45129. to = '';
  45130. } else if (isX$2(tm)) {
  45131. to = "<" + (+tM + 1) + ".0.0-0";
  45132. } else if (isX$2(tp)) {
  45133. to = "<" + tM + "." + (+tm + 1) + ".0-0";
  45134. } else if (tpr) {
  45135. to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
  45136. } else if (incPr) {
  45137. to = "<" + tM + "." + tm + "." + (+tp + 1) + "-0";
  45138. } else {
  45139. to = "<=" + to;
  45140. }
  45141. return (from + " " + to).trim();
  45142. };
  45143. };
  45144. var testSet$2 = function testSet(set, version, options) {
  45145. for (var i = 0; i < set.length; i++) {
  45146. if (!set[i].test(version)) {
  45147. return false;
  45148. }
  45149. }
  45150. if (version.prerelease.length && !options.includePrerelease) {
  45151. for (var _i = 0; _i < set.length; _i++) {
  45152. debug_1$3(set[_i].semver);
  45153. if (set[_i].semver === comparator$2.ANY) {
  45154. continue;
  45155. }
  45156. if (set[_i].semver.prerelease.length > 0) {
  45157. var allowed = set[_i].semver;
  45158. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  45159. return true;
  45160. }
  45161. }
  45162. }
  45163. return false;
  45164. }
  45165. return true;
  45166. };
  45167. var ANY$8 = Symbol('SemVer ANY');
  45168. var Comparator$2 = function () {
  45169. function Comparator(comp, options) {
  45170. options = parseOptions_1$2(options);
  45171. if (comp instanceof Comparator) {
  45172. if (comp.loose === !!options.loose) {
  45173. return comp;
  45174. } else {
  45175. comp = comp.value;
  45176. }
  45177. }
  45178. debug_1$3('comparator', comp, options);
  45179. this.options = options;
  45180. this.loose = !!options.loose;
  45181. this.parse(comp);
  45182. if (this.semver === ANY$8) {
  45183. this.value = '';
  45184. } else {
  45185. this.value = this.operator + this.semver.version;
  45186. }
  45187. debug_1$3('comp', this);
  45188. }
  45189. var _proto = Comparator.prototype;
  45190. _proto.parse = function parse(comp) {
  45191. var r = this.options.loose ? re$d[t$k.COMPARATORLOOSE] : re$d[t$k.COMPARATOR];
  45192. var m = comp.match(r);
  45193. if (!m) {
  45194. throw new TypeError("Invalid comparator: " + comp);
  45195. }
  45196. this.operator = m[1] !== undefined ? m[1] : '';
  45197. if (this.operator === '=') {
  45198. this.operator = '';
  45199. }
  45200. if (!m[2]) {
  45201. this.semver = ANY$8;
  45202. } else {
  45203. this.semver = new semver$c(m[2], this.options.loose);
  45204. }
  45205. };
  45206. _proto.toString = function toString() {
  45207. return this.value;
  45208. };
  45209. _proto.test = function test(version) {
  45210. debug_1$3('Comparator.test', version, this.options.loose);
  45211. if (this.semver === ANY$8 || version === ANY$8) {
  45212. return true;
  45213. }
  45214. if (typeof version === 'string') {
  45215. try {
  45216. version = new semver$c(version, this.options);
  45217. } catch (er) {
  45218. return false;
  45219. }
  45220. }
  45221. return cmp_1$3(version, this.operator, this.semver, this.options);
  45222. };
  45223. _proto.intersects = function intersects(comp, options) {
  45224. if (!(comp instanceof Comparator)) {
  45225. throw new TypeError('a Comparator is required');
  45226. }
  45227. if (!options || typeof options !== 'object') {
  45228. options = {
  45229. loose: !!options,
  45230. includePrerelease: false
  45231. };
  45232. }
  45233. if (this.operator === '') {
  45234. if (this.value === '') {
  45235. return true;
  45236. }
  45237. return new range$2(comp.value, options).test(this.value);
  45238. } else if (comp.operator === '') {
  45239. if (comp.value === '') {
  45240. return true;
  45241. }
  45242. return new range$2(this.value, options).test(comp.semver);
  45243. }
  45244. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  45245. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  45246. var sameSemVer = this.semver.version === comp.semver.version;
  45247. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  45248. var oppositeDirectionsLessThan = cmp_1$3(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  45249. var oppositeDirectionsGreaterThan = cmp_1$3(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  45250. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  45251. };
  45252. _createClass(Comparator, null, [{
  45253. key: "ANY",
  45254. get: function get() {
  45255. return ANY$8;
  45256. }
  45257. }]);
  45258. return Comparator;
  45259. }();
  45260. var comparator$2 = Comparator$2;
  45261. var re$d = re_1$3.re,
  45262. t$k = re_1$3.t;
  45263. var satisfies$2 = function satisfies(version, range, options) {
  45264. try {
  45265. range = new range$2(range, options);
  45266. } catch (er) {
  45267. return false;
  45268. }
  45269. return range.test(version);
  45270. };
  45271. var satisfies_1$2 = satisfies$2;
  45272. var toComparators$2 = function toComparators(range, options) {
  45273. return new range$2(range, options).set.map(function (comp) {
  45274. return comp.map(function (c) {
  45275. return c.value;
  45276. }).join(' ').trim().split(' ');
  45277. });
  45278. };
  45279. var toComparators_1$2 = toComparators$2;
  45280. var maxSatisfying$2 = function maxSatisfying(versions, range, options) {
  45281. var max = null;
  45282. var maxSV = null;
  45283. var rangeObj = null;
  45284. try {
  45285. rangeObj = new range$2(range, options);
  45286. } catch (er) {
  45287. return null;
  45288. }
  45289. versions.forEach(function (v) {
  45290. if (rangeObj.test(v)) {
  45291. if (!max || maxSV.compare(v) === -1) {
  45292. max = v;
  45293. maxSV = new semver$c(max, options);
  45294. }
  45295. }
  45296. });
  45297. return max;
  45298. };
  45299. var maxSatisfying_1$2 = maxSatisfying$2;
  45300. var minSatisfying$2 = function minSatisfying(versions, range, options) {
  45301. var min = null;
  45302. var minSV = null;
  45303. var rangeObj = null;
  45304. try {
  45305. rangeObj = new range$2(range, options);
  45306. } catch (er) {
  45307. return null;
  45308. }
  45309. versions.forEach(function (v) {
  45310. if (rangeObj.test(v)) {
  45311. if (!min || minSV.compare(v) === 1) {
  45312. min = v;
  45313. minSV = new semver$c(min, options);
  45314. }
  45315. }
  45316. });
  45317. return min;
  45318. };
  45319. var minSatisfying_1$2 = minSatisfying$2;
  45320. var minVersion$2 = function minVersion(range, loose) {
  45321. range = new range$2(range, loose);
  45322. var minver = new semver$c('0.0.0');
  45323. if (range.test(minver)) {
  45324. return minver;
  45325. }
  45326. minver = new semver$c('0.0.0-0');
  45327. if (range.test(minver)) {
  45328. return minver;
  45329. }
  45330. minver = null;
  45331. var _loop = function _loop(i) {
  45332. var comparators = range.set[i];
  45333. var setMin = null;
  45334. comparators.forEach(function (comparator) {
  45335. var compver = new semver$c(comparator.semver.version);
  45336. switch (comparator.operator) {
  45337. case '>':
  45338. if (compver.prerelease.length === 0) {
  45339. compver.patch++;
  45340. } else {
  45341. compver.prerelease.push(0);
  45342. }
  45343. compver.raw = compver.format();
  45344. case '':
  45345. case '>=':
  45346. if (!setMin || gt_1$3(compver, setMin)) {
  45347. setMin = compver;
  45348. }
  45349. break;
  45350. case '<':
  45351. case '<=':
  45352. break;
  45353. default:
  45354. throw new Error("Unexpected operation: " + comparator.operator);
  45355. }
  45356. });
  45357. if (setMin && (!minver || gt_1$3(minver, setMin))) minver = setMin;
  45358. };
  45359. for (var i = 0; i < range.set.length; ++i) {
  45360. _loop(i);
  45361. }
  45362. if (minver && range.test(minver)) {
  45363. return minver;
  45364. }
  45365. return null;
  45366. };
  45367. var minVersion_1$2 = minVersion$2;
  45368. var validRange$2 = function validRange(range, options) {
  45369. try {
  45370. return new range$2(range, options).range || '*';
  45371. } catch (er) {
  45372. return null;
  45373. }
  45374. };
  45375. var valid$4 = validRange$2;
  45376. var ANY$7 = comparator$2.ANY;
  45377. var outside$2 = function outside(version, range, hilo, options) {
  45378. version = new semver$c(version, options);
  45379. range = new range$2(range, options);
  45380. var gtfn, ltefn, ltfn, comp, ecomp;
  45381. switch (hilo) {
  45382. case '>':
  45383. gtfn = gt_1$3;
  45384. ltefn = lte_1$3;
  45385. ltfn = lt_1$3;
  45386. comp = '>';
  45387. ecomp = '>=';
  45388. break;
  45389. case '<':
  45390. gtfn = lt_1$3;
  45391. ltefn = gte_1$3;
  45392. ltfn = gt_1$3;
  45393. comp = '<';
  45394. ecomp = '<=';
  45395. break;
  45396. default:
  45397. throw new TypeError('Must provide a hilo val of "<" or ">"');
  45398. }
  45399. if (satisfies_1$2(version, range, options)) {
  45400. return false;
  45401. }
  45402. var _loop = function _loop(i) {
  45403. var comparators = range.set[i];
  45404. var high = null;
  45405. var low = null;
  45406. comparators.forEach(function (comparator) {
  45407. if (comparator.semver === ANY$7) {
  45408. comparator = new comparator$2('>=0.0.0');
  45409. }
  45410. high = high || comparator;
  45411. low = low || comparator;
  45412. if (gtfn(comparator.semver, high.semver, options)) {
  45413. high = comparator;
  45414. } else if (ltfn(comparator.semver, low.semver, options)) {
  45415. low = comparator;
  45416. }
  45417. });
  45418. if (high.operator === comp || high.operator === ecomp) {
  45419. return {
  45420. v: false
  45421. };
  45422. }
  45423. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  45424. return {
  45425. v: false
  45426. };
  45427. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  45428. return {
  45429. v: false
  45430. };
  45431. }
  45432. };
  45433. for (var i = 0; i < range.set.length; ++i) {
  45434. var _ret = _loop(i);
  45435. if (typeof _ret === "object") return _ret.v;
  45436. }
  45437. return true;
  45438. };
  45439. var outside_1$2 = outside$2;
  45440. var gtr$2 = function gtr(version, range, options) {
  45441. return outside_1$2(version, range, '>', options);
  45442. };
  45443. var gtr_1$2 = gtr$2;
  45444. var ltr$2 = function ltr(version, range, options) {
  45445. return outside_1$2(version, range, '<', options);
  45446. };
  45447. var ltr_1$2 = ltr$2;
  45448. var intersects$2 = function intersects(r1, r2, options) {
  45449. r1 = new range$2(r1, options);
  45450. r2 = new range$2(r2, options);
  45451. return r1.intersects(r2);
  45452. };
  45453. var intersects_1$2 = intersects$2;
  45454. var simplify$2 = function simplify(versions, range, options) {
  45455. var set = [];
  45456. var min = null;
  45457. var prev = null;
  45458. var v = versions.sort(function (a, b) {
  45459. return compare_1$3(a, b, options);
  45460. });
  45461. for (var _iterator = _createForOfIteratorHelperLoose(v), _step; !(_step = _iterator()).done;) {
  45462. var version = _step.value;
  45463. var included = satisfies_1$2(version, range, options);
  45464. if (included) {
  45465. prev = version;
  45466. if (!min) min = version;
  45467. } else {
  45468. if (prev) {
  45469. set.push([min, prev]);
  45470. }
  45471. prev = null;
  45472. min = null;
  45473. }
  45474. }
  45475. if (min) set.push([min, null]);
  45476. var ranges = [];
  45477. for (var _i = 0, _set = set; _i < _set.length; _i++) {
  45478. var _set$_i = _slicedToArray$2(_set[_i], 2),
  45479. _min = _set$_i[0],
  45480. max = _set$_i[1];
  45481. if (_min === max) ranges.push(_min);else if (!max && _min === v[0]) ranges.push('*');else if (!max) ranges.push(">=" + _min);else if (_min === v[0]) ranges.push("<=" + max);else ranges.push(_min + " - " + max);
  45482. }
  45483. var simplified = ranges.join(' || ');
  45484. var original = typeof range.raw === 'string' ? range.raw : String(range);
  45485. return simplified.length < original.length ? simplified : range;
  45486. };
  45487. var ANY$6 = comparator$2.ANY;
  45488. var subset$2 = function subset(sub, dom, options) {
  45489. if (sub === dom) return true;
  45490. sub = new range$2(sub, options);
  45491. dom = new range$2(dom, options);
  45492. var sawNonNull = false;
  45493. OUTER: for (var _iterator = _createForOfIteratorHelperLoose(sub.set), _step; !(_step = _iterator()).done;) {
  45494. var simpleSub = _step.value;
  45495. for (var _iterator2 = _createForOfIteratorHelperLoose(dom.set), _step2; !(_step2 = _iterator2()).done;) {
  45496. var simpleDom = _step2.value;
  45497. var isSub = simpleSubset$2(simpleSub, simpleDom, options);
  45498. sawNonNull = sawNonNull || isSub !== null;
  45499. if (isSub) continue OUTER;
  45500. }
  45501. if (sawNonNull) return false;
  45502. }
  45503. return true;
  45504. };
  45505. var simpleSubset$2 = function simpleSubset(sub, dom, options) {
  45506. if (sub === dom) return true;
  45507. if (sub.length === 1 && sub[0].semver === ANY$6) return dom.length === 1 && dom[0].semver === ANY$6;
  45508. var eqSet = new Set();
  45509. var gt, lt;
  45510. for (var _iterator3 = _createForOfIteratorHelperLoose(sub), _step3; !(_step3 = _iterator3()).done;) {
  45511. var c = _step3.value;
  45512. if (c.operator === '>' || c.operator === '>=') gt = higherGT$2(gt, c, options);else if (c.operator === '<' || c.operator === '<=') lt = lowerLT$2(lt, c, options);else eqSet.add(c.semver);
  45513. }
  45514. if (eqSet.size > 1) return null;
  45515. var gtltComp;
  45516. if (gt && lt) {
  45517. gtltComp = compare_1$3(gt.semver, lt.semver, options);
  45518. if (gtltComp > 0) return null;else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null;
  45519. }
  45520. for (var _iterator4 = _createForOfIteratorHelperLoose(eqSet), _step4; !(_step4 = _iterator4()).done;) {
  45521. var eq = _step4.value;
  45522. if (gt && !satisfies_1$2(eq, String(gt), options)) return null;
  45523. if (lt && !satisfies_1$2(eq, String(lt), options)) return null;
  45524. for (var _iterator6 = _createForOfIteratorHelperLoose(dom), _step6; !(_step6 = _iterator6()).done;) {
  45525. var _c = _step6.value;
  45526. if (!satisfies_1$2(eq, String(_c), options)) return false;
  45527. }
  45528. return true;
  45529. }
  45530. var higher, lower;
  45531. var hasDomLT, hasDomGT;
  45532. for (var _iterator5 = _createForOfIteratorHelperLoose(dom), _step5; !(_step5 = _iterator5()).done;) {
  45533. var _c2 = _step5.value;
  45534. hasDomGT = hasDomGT || _c2.operator === '>' || _c2.operator === '>=';
  45535. hasDomLT = hasDomLT || _c2.operator === '<' || _c2.operator === '<=';
  45536. if (gt) {
  45537. if (_c2.operator === '>' || _c2.operator === '>=') {
  45538. higher = higherGT$2(gt, _c2, options);
  45539. if (higher === _c2 && higher !== gt) return false;
  45540. } else if (gt.operator === '>=' && !satisfies_1$2(gt.semver, String(_c2), options)) return false;
  45541. }
  45542. if (lt) {
  45543. if (_c2.operator === '<' || _c2.operator === '<=') {
  45544. lower = lowerLT$2(lt, _c2, options);
  45545. if (lower === _c2 && lower !== lt) return false;
  45546. } else if (lt.operator === '<=' && !satisfies_1$2(lt.semver, String(_c2), options)) return false;
  45547. }
  45548. if (!_c2.operator && (lt || gt) && gtltComp !== 0) return false;
  45549. }
  45550. if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
  45551. if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
  45552. return true;
  45553. };
  45554. var higherGT$2 = function higherGT(a, b, options) {
  45555. if (!a) return b;
  45556. var comp = compare_1$3(a.semver, b.semver, options);
  45557. return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a;
  45558. };
  45559. var lowerLT$2 = function lowerLT(a, b, options) {
  45560. if (!a) return b;
  45561. var comp = compare_1$3(a.semver, b.semver, options);
  45562. return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a;
  45563. };
  45564. var subset_1$2 = subset$2;
  45565. ({
  45566. re: re_1$3.re,
  45567. src: re_1$3.src,
  45568. tokens: re_1$3.t,
  45569. SEMVER_SPEC_VERSION: constants$3.SEMVER_SPEC_VERSION,
  45570. SemVer: semver$c,
  45571. compareIdentifiers: identifiers$3.compareIdentifiers,
  45572. rcompareIdentifiers: identifiers$3.rcompareIdentifiers,
  45573. parse: parse_1$3,
  45574. valid: valid_1$2,
  45575. clean: clean_1$2,
  45576. inc: inc_1$2,
  45577. diff: diff_1$2,
  45578. major: major_1$2,
  45579. minor: minor_1$2,
  45580. patch: patch_1$2,
  45581. prerelease: prerelease_1$2,
  45582. compare: compare_1$3,
  45583. rcompare: rcompare_1$2,
  45584. compareLoose: compareLoose_1$2,
  45585. compareBuild: compareBuild_1$2,
  45586. sort: sort_1$2,
  45587. rsort: rsort_1$2,
  45588. gt: gt_1$3,
  45589. lt: lt_1$3,
  45590. eq: eq_1$3,
  45591. neq: neq_1$3,
  45592. gte: gte_1$3,
  45593. lte: lte_1$3,
  45594. cmp: cmp_1$3,
  45595. coerce: coerce_1$3,
  45596. Comparator: comparator$2,
  45597. Range: range$2,
  45598. satisfies: satisfies_1$2,
  45599. toComparators: toComparators_1$2,
  45600. maxSatisfying: maxSatisfying_1$2,
  45601. minSatisfying: minSatisfying_1$2,
  45602. minVersion: minVersion_1$2,
  45603. validRange: valid$4,
  45604. outside: outside_1$2,
  45605. gtr: gtr_1$2,
  45606. ltr: ltr_1$2,
  45607. intersects: intersects_1$2,
  45608. simplifyRange: simplify$2,
  45609. subset: subset_1$2
  45610. });
  45611. var semver$b = createCommonjsModule(function (module, exports) {
  45612. exports = module.exports = SemVer;
  45613. var debug;
  45614. if (typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG)) {
  45615. debug = function debug() {
  45616. var args = Array.prototype.slice.call(arguments, 0);
  45617. args.unshift('SEMVER');
  45618. console.log.apply(console, args);
  45619. };
  45620. } else {
  45621. debug = function debug() {};
  45622. }
  45623. exports.SEMVER_SPEC_VERSION = '2.0.0';
  45624. var MAX_LENGTH = 256;
  45625. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  45626. var MAX_SAFE_COMPONENT_LENGTH = 16;
  45627. var re = exports.re = [];
  45628. var src = exports.src = [];
  45629. var t = exports.tokens = {};
  45630. var R = 0;
  45631. function tok(n) {
  45632. t[n] = R++;
  45633. }
  45634. tok('NUMERICIDENTIFIER');
  45635. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  45636. tok('NUMERICIDENTIFIERLOOSE');
  45637. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  45638. tok('NONNUMERICIDENTIFIER');
  45639. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  45640. tok('MAINVERSION');
  45641. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  45642. tok('MAINVERSIONLOOSE');
  45643. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  45644. tok('PRERELEASEIDENTIFIER');
  45645. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  45646. tok('PRERELEASEIDENTIFIERLOOSE');
  45647. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  45648. tok('PRERELEASE');
  45649. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  45650. tok('PRERELEASELOOSE');
  45651. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  45652. tok('BUILDIDENTIFIER');
  45653. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  45654. tok('BUILD');
  45655. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  45656. tok('FULL');
  45657. tok('FULLPLAIN');
  45658. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  45659. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  45660. tok('LOOSEPLAIN');
  45661. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  45662. tok('LOOSE');
  45663. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  45664. tok('GTLT');
  45665. src[t.GTLT] = '((?:<|>)?=?)';
  45666. tok('XRANGEIDENTIFIERLOOSE');
  45667. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  45668. tok('XRANGEIDENTIFIER');
  45669. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  45670. tok('XRANGEPLAIN');
  45671. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  45672. tok('XRANGEPLAINLOOSE');
  45673. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  45674. tok('XRANGE');
  45675. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  45676. tok('XRANGELOOSE');
  45677. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  45678. tok('COERCE');
  45679. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  45680. tok('COERCERTL');
  45681. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  45682. tok('LONETILDE');
  45683. src[t.LONETILDE] = '(?:~>?)';
  45684. tok('TILDETRIM');
  45685. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  45686. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  45687. var tildeTrimReplace = '$1~';
  45688. tok('TILDE');
  45689. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  45690. tok('TILDELOOSE');
  45691. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  45692. tok('LONECARET');
  45693. src[t.LONECARET] = '(?:\\^)';
  45694. tok('CARETTRIM');
  45695. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  45696. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  45697. var caretTrimReplace = '$1^';
  45698. tok('CARET');
  45699. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  45700. tok('CARETLOOSE');
  45701. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  45702. tok('COMPARATORLOOSE');
  45703. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  45704. tok('COMPARATOR');
  45705. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  45706. tok('COMPARATORTRIM');
  45707. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  45708. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  45709. var comparatorTrimReplace = '$1$2$3';
  45710. tok('HYPHENRANGE');
  45711. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  45712. tok('HYPHENRANGELOOSE');
  45713. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  45714. tok('STAR');
  45715. src[t.STAR] = '(<|>)?=?\\s*\\*';
  45716. for (var i = 0; i < R; i++) {
  45717. debug(i, src[i]);
  45718. if (!re[i]) {
  45719. re[i] = new RegExp(src[i]);
  45720. }
  45721. }
  45722. exports.parse = parse;
  45723. function parse(version, options) {
  45724. if (!options || typeof options !== 'object') {
  45725. options = {
  45726. loose: !!options,
  45727. includePrerelease: false
  45728. };
  45729. }
  45730. if (version instanceof SemVer) {
  45731. return version;
  45732. }
  45733. if (typeof version !== 'string') {
  45734. return null;
  45735. }
  45736. if (version.length > MAX_LENGTH) {
  45737. return null;
  45738. }
  45739. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  45740. if (!r.test(version)) {
  45741. return null;
  45742. }
  45743. try {
  45744. return new SemVer(version, options);
  45745. } catch (er) {
  45746. return null;
  45747. }
  45748. }
  45749. exports.valid = valid;
  45750. function valid(version, options) {
  45751. var v = parse(version, options);
  45752. return v ? v.version : null;
  45753. }
  45754. exports.clean = clean;
  45755. function clean(version, options) {
  45756. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  45757. return s ? s.version : null;
  45758. }
  45759. exports.SemVer = SemVer;
  45760. function SemVer(version, options) {
  45761. if (!options || typeof options !== 'object') {
  45762. options = {
  45763. loose: !!options,
  45764. includePrerelease: false
  45765. };
  45766. }
  45767. if (version instanceof SemVer) {
  45768. if (version.loose === options.loose) {
  45769. return version;
  45770. } else {
  45771. version = version.version;
  45772. }
  45773. } else if (typeof version !== 'string') {
  45774. throw new TypeError('Invalid Version: ' + version);
  45775. }
  45776. if (version.length > MAX_LENGTH) {
  45777. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  45778. }
  45779. if (!(this instanceof SemVer)) {
  45780. return new SemVer(version, options);
  45781. }
  45782. debug('SemVer', version, options);
  45783. this.options = options;
  45784. this.loose = !!options.loose;
  45785. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  45786. if (!m) {
  45787. throw new TypeError('Invalid Version: ' + version);
  45788. }
  45789. this.raw = version;
  45790. this.major = +m[1];
  45791. this.minor = +m[2];
  45792. this.patch = +m[3];
  45793. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  45794. throw new TypeError('Invalid major version');
  45795. }
  45796. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  45797. throw new TypeError('Invalid minor version');
  45798. }
  45799. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  45800. throw new TypeError('Invalid patch version');
  45801. }
  45802. if (!m[4]) {
  45803. this.prerelease = [];
  45804. } else {
  45805. this.prerelease = m[4].split('.').map(function (id) {
  45806. if (/^[0-9]+$/.test(id)) {
  45807. var num = +id;
  45808. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  45809. return num;
  45810. }
  45811. }
  45812. return id;
  45813. });
  45814. }
  45815. this.build = m[5] ? m[5].split('.') : [];
  45816. this.format();
  45817. }
  45818. SemVer.prototype.format = function () {
  45819. this.version = this.major + '.' + this.minor + '.' + this.patch;
  45820. if (this.prerelease.length) {
  45821. this.version += '-' + this.prerelease.join('.');
  45822. }
  45823. return this.version;
  45824. };
  45825. SemVer.prototype.toString = function () {
  45826. return this.version;
  45827. };
  45828. SemVer.prototype.compare = function (other) {
  45829. debug('SemVer.compare', this.version, this.options, other);
  45830. if (!(other instanceof SemVer)) {
  45831. other = new SemVer(other, this.options);
  45832. }
  45833. return this.compareMain(other) || this.comparePre(other);
  45834. };
  45835. SemVer.prototype.compareMain = function (other) {
  45836. if (!(other instanceof SemVer)) {
  45837. other = new SemVer(other, this.options);
  45838. }
  45839. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  45840. };
  45841. SemVer.prototype.comparePre = function (other) {
  45842. if (!(other instanceof SemVer)) {
  45843. other = new SemVer(other, this.options);
  45844. }
  45845. if (this.prerelease.length && !other.prerelease.length) {
  45846. return -1;
  45847. } else if (!this.prerelease.length && other.prerelease.length) {
  45848. return 1;
  45849. } else if (!this.prerelease.length && !other.prerelease.length) {
  45850. return 0;
  45851. }
  45852. var i = 0;
  45853. do {
  45854. var a = this.prerelease[i];
  45855. var b = other.prerelease[i];
  45856. debug('prerelease compare', i, a, b);
  45857. if (a === undefined && b === undefined) {
  45858. return 0;
  45859. } else if (b === undefined) {
  45860. return 1;
  45861. } else if (a === undefined) {
  45862. return -1;
  45863. } else if (a === b) {
  45864. continue;
  45865. } else {
  45866. return compareIdentifiers(a, b);
  45867. }
  45868. } while (++i);
  45869. };
  45870. SemVer.prototype.compareBuild = function (other) {
  45871. if (!(other instanceof SemVer)) {
  45872. other = new SemVer(other, this.options);
  45873. }
  45874. var i = 0;
  45875. do {
  45876. var a = this.build[i];
  45877. var b = other.build[i];
  45878. debug('prerelease compare', i, a, b);
  45879. if (a === undefined && b === undefined) {
  45880. return 0;
  45881. } else if (b === undefined) {
  45882. return 1;
  45883. } else if (a === undefined) {
  45884. return -1;
  45885. } else if (a === b) {
  45886. continue;
  45887. } else {
  45888. return compareIdentifiers(a, b);
  45889. }
  45890. } while (++i);
  45891. };
  45892. SemVer.prototype.inc = function (release, identifier) {
  45893. switch (release) {
  45894. case 'premajor':
  45895. this.prerelease.length = 0;
  45896. this.patch = 0;
  45897. this.minor = 0;
  45898. this.major++;
  45899. this.inc('pre', identifier);
  45900. break;
  45901. case 'preminor':
  45902. this.prerelease.length = 0;
  45903. this.patch = 0;
  45904. this.minor++;
  45905. this.inc('pre', identifier);
  45906. break;
  45907. case 'prepatch':
  45908. this.prerelease.length = 0;
  45909. this.inc('patch', identifier);
  45910. this.inc('pre', identifier);
  45911. break;
  45912. case 'prerelease':
  45913. if (this.prerelease.length === 0) {
  45914. this.inc('patch', identifier);
  45915. }
  45916. this.inc('pre', identifier);
  45917. break;
  45918. case 'major':
  45919. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  45920. this.major++;
  45921. }
  45922. this.minor = 0;
  45923. this.patch = 0;
  45924. this.prerelease = [];
  45925. break;
  45926. case 'minor':
  45927. if (this.patch !== 0 || this.prerelease.length === 0) {
  45928. this.minor++;
  45929. }
  45930. this.patch = 0;
  45931. this.prerelease = [];
  45932. break;
  45933. case 'patch':
  45934. if (this.prerelease.length === 0) {
  45935. this.patch++;
  45936. }
  45937. this.prerelease = [];
  45938. break;
  45939. case 'pre':
  45940. if (this.prerelease.length === 0) {
  45941. this.prerelease = [0];
  45942. } else {
  45943. var i = this.prerelease.length;
  45944. while (--i >= 0) {
  45945. if (typeof this.prerelease[i] === 'number') {
  45946. this.prerelease[i]++;
  45947. i = -2;
  45948. }
  45949. }
  45950. if (i === -1) {
  45951. this.prerelease.push(0);
  45952. }
  45953. }
  45954. if (identifier) {
  45955. if (this.prerelease[0] === identifier) {
  45956. if (isNaN(this.prerelease[1])) {
  45957. this.prerelease = [identifier, 0];
  45958. }
  45959. } else {
  45960. this.prerelease = [identifier, 0];
  45961. }
  45962. }
  45963. break;
  45964. default:
  45965. throw new Error('invalid increment argument: ' + release);
  45966. }
  45967. this.format();
  45968. this.raw = this.version;
  45969. return this;
  45970. };
  45971. exports.inc = inc;
  45972. function inc(version, release, loose, identifier) {
  45973. if (typeof loose === 'string') {
  45974. identifier = loose;
  45975. loose = undefined;
  45976. }
  45977. try {
  45978. return new SemVer(version, loose).inc(release, identifier).version;
  45979. } catch (er) {
  45980. return null;
  45981. }
  45982. }
  45983. exports.diff = diff;
  45984. function diff(version1, version2) {
  45985. if (eq(version1, version2)) {
  45986. return null;
  45987. } else {
  45988. var v1 = parse(version1);
  45989. var v2 = parse(version2);
  45990. var prefix = '';
  45991. if (v1.prerelease.length || v2.prerelease.length) {
  45992. prefix = 'pre';
  45993. var defaultResult = 'prerelease';
  45994. }
  45995. for (var key in v1) {
  45996. if (key === 'major' || key === 'minor' || key === 'patch') {
  45997. if (v1[key] !== v2[key]) {
  45998. return prefix + key;
  45999. }
  46000. }
  46001. }
  46002. return defaultResult;
  46003. }
  46004. }
  46005. exports.compareIdentifiers = compareIdentifiers;
  46006. var numeric = /^[0-9]+$/;
  46007. function compareIdentifiers(a, b) {
  46008. var anum = numeric.test(a);
  46009. var bnum = numeric.test(b);
  46010. if (anum && bnum) {
  46011. a = +a;
  46012. b = +b;
  46013. }
  46014. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  46015. }
  46016. exports.rcompareIdentifiers = rcompareIdentifiers;
  46017. function rcompareIdentifiers(a, b) {
  46018. return compareIdentifiers(b, a);
  46019. }
  46020. exports.major = major;
  46021. function major(a, loose) {
  46022. return new SemVer(a, loose).major;
  46023. }
  46024. exports.minor = minor;
  46025. function minor(a, loose) {
  46026. return new SemVer(a, loose).minor;
  46027. }
  46028. exports.patch = patch;
  46029. function patch(a, loose) {
  46030. return new SemVer(a, loose).patch;
  46031. }
  46032. exports.compare = compare;
  46033. function compare(a, b, loose) {
  46034. return new SemVer(a, loose).compare(new SemVer(b, loose));
  46035. }
  46036. exports.compareLoose = compareLoose;
  46037. function compareLoose(a, b) {
  46038. return compare(a, b, true);
  46039. }
  46040. exports.compareBuild = compareBuild;
  46041. function compareBuild(a, b, loose) {
  46042. var versionA = new SemVer(a, loose);
  46043. var versionB = new SemVer(b, loose);
  46044. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  46045. }
  46046. exports.rcompare = rcompare;
  46047. function rcompare(a, b, loose) {
  46048. return compare(b, a, loose);
  46049. }
  46050. exports.sort = sort;
  46051. function sort(list, loose) {
  46052. return list.sort(function (a, b) {
  46053. return exports.compareBuild(a, b, loose);
  46054. });
  46055. }
  46056. exports.rsort = rsort;
  46057. function rsort(list, loose) {
  46058. return list.sort(function (a, b) {
  46059. return exports.compareBuild(b, a, loose);
  46060. });
  46061. }
  46062. exports.gt = gt;
  46063. function gt(a, b, loose) {
  46064. return compare(a, b, loose) > 0;
  46065. }
  46066. exports.lt = lt;
  46067. function lt(a, b, loose) {
  46068. return compare(a, b, loose) < 0;
  46069. }
  46070. exports.eq = eq;
  46071. function eq(a, b, loose) {
  46072. return compare(a, b, loose) === 0;
  46073. }
  46074. exports.neq = neq;
  46075. function neq(a, b, loose) {
  46076. return compare(a, b, loose) !== 0;
  46077. }
  46078. exports.gte = gte;
  46079. function gte(a, b, loose) {
  46080. return compare(a, b, loose) >= 0;
  46081. }
  46082. exports.lte = lte;
  46083. function lte(a, b, loose) {
  46084. return compare(a, b, loose) <= 0;
  46085. }
  46086. exports.cmp = cmp;
  46087. function cmp(a, op, b, loose) {
  46088. switch (op) {
  46089. case '===':
  46090. if (typeof a === 'object') a = a.version;
  46091. if (typeof b === 'object') b = b.version;
  46092. return a === b;
  46093. case '!==':
  46094. if (typeof a === 'object') a = a.version;
  46095. if (typeof b === 'object') b = b.version;
  46096. return a !== b;
  46097. case '':
  46098. case '=':
  46099. case '==':
  46100. return eq(a, b, loose);
  46101. case '!=':
  46102. return neq(a, b, loose);
  46103. case '>':
  46104. return gt(a, b, loose);
  46105. case '>=':
  46106. return gte(a, b, loose);
  46107. case '<':
  46108. return lt(a, b, loose);
  46109. case '<=':
  46110. return lte(a, b, loose);
  46111. default:
  46112. throw new TypeError('Invalid operator: ' + op);
  46113. }
  46114. }
  46115. exports.Comparator = Comparator;
  46116. function Comparator(comp, options) {
  46117. if (!options || typeof options !== 'object') {
  46118. options = {
  46119. loose: !!options,
  46120. includePrerelease: false
  46121. };
  46122. }
  46123. if (comp instanceof Comparator) {
  46124. if (comp.loose === !!options.loose) {
  46125. return comp;
  46126. } else {
  46127. comp = comp.value;
  46128. }
  46129. }
  46130. if (!(this instanceof Comparator)) {
  46131. return new Comparator(comp, options);
  46132. }
  46133. debug('comparator', comp, options);
  46134. this.options = options;
  46135. this.loose = !!options.loose;
  46136. this.parse(comp);
  46137. if (this.semver === ANY) {
  46138. this.value = '';
  46139. } else {
  46140. this.value = this.operator + this.semver.version;
  46141. }
  46142. debug('comp', this);
  46143. }
  46144. var ANY = {};
  46145. Comparator.prototype.parse = function (comp) {
  46146. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  46147. var m = comp.match(r);
  46148. if (!m) {
  46149. throw new TypeError('Invalid comparator: ' + comp);
  46150. }
  46151. this.operator = m[1] !== undefined ? m[1] : '';
  46152. if (this.operator === '=') {
  46153. this.operator = '';
  46154. }
  46155. if (!m[2]) {
  46156. this.semver = ANY;
  46157. } else {
  46158. this.semver = new SemVer(m[2], this.options.loose);
  46159. }
  46160. };
  46161. Comparator.prototype.toString = function () {
  46162. return this.value;
  46163. };
  46164. Comparator.prototype.test = function (version) {
  46165. debug('Comparator.test', version, this.options.loose);
  46166. if (this.semver === ANY || version === ANY) {
  46167. return true;
  46168. }
  46169. if (typeof version === 'string') {
  46170. try {
  46171. version = new SemVer(version, this.options);
  46172. } catch (er) {
  46173. return false;
  46174. }
  46175. }
  46176. return cmp(version, this.operator, this.semver, this.options);
  46177. };
  46178. Comparator.prototype.intersects = function (comp, options) {
  46179. if (!(comp instanceof Comparator)) {
  46180. throw new TypeError('a Comparator is required');
  46181. }
  46182. if (!options || typeof options !== 'object') {
  46183. options = {
  46184. loose: !!options,
  46185. includePrerelease: false
  46186. };
  46187. }
  46188. var rangeTmp;
  46189. if (this.operator === '') {
  46190. if (this.value === '') {
  46191. return true;
  46192. }
  46193. rangeTmp = new Range(comp.value, options);
  46194. return satisfies(this.value, rangeTmp, options);
  46195. } else if (comp.operator === '') {
  46196. if (comp.value === '') {
  46197. return true;
  46198. }
  46199. rangeTmp = new Range(this.value, options);
  46200. return satisfies(comp.semver, rangeTmp, options);
  46201. }
  46202. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  46203. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  46204. var sameSemVer = this.semver.version === comp.semver.version;
  46205. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  46206. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  46207. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  46208. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  46209. };
  46210. exports.Range = Range;
  46211. function Range(range, options) {
  46212. if (!options || typeof options !== 'object') {
  46213. options = {
  46214. loose: !!options,
  46215. includePrerelease: false
  46216. };
  46217. }
  46218. if (range instanceof Range) {
  46219. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  46220. return range;
  46221. } else {
  46222. return new Range(range.raw, options);
  46223. }
  46224. }
  46225. if (range instanceof Comparator) {
  46226. return new Range(range.value, options);
  46227. }
  46228. if (!(this instanceof Range)) {
  46229. return new Range(range, options);
  46230. }
  46231. this.options = options;
  46232. this.loose = !!options.loose;
  46233. this.includePrerelease = !!options.includePrerelease;
  46234. this.raw = range;
  46235. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  46236. return this.parseRange(range.trim());
  46237. }, this).filter(function (c) {
  46238. return c.length;
  46239. });
  46240. if (!this.set.length) {
  46241. throw new TypeError('Invalid SemVer Range: ' + range);
  46242. }
  46243. this.format();
  46244. }
  46245. Range.prototype.format = function () {
  46246. this.range = this.set.map(function (comps) {
  46247. return comps.join(' ').trim();
  46248. }).join('||').trim();
  46249. return this.range;
  46250. };
  46251. Range.prototype.toString = function () {
  46252. return this.range;
  46253. };
  46254. Range.prototype.parseRange = function (range) {
  46255. var loose = this.options.loose;
  46256. range = range.trim();
  46257. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  46258. range = range.replace(hr, hyphenReplace);
  46259. debug('hyphen replace', range);
  46260. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  46261. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  46262. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  46263. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  46264. range = range.split(/\s+/).join(' ');
  46265. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  46266. var set = range.split(' ').map(function (comp) {
  46267. return parseComparator(comp, this.options);
  46268. }, this).join(' ').split(/\s+/);
  46269. if (this.options.loose) {
  46270. set = set.filter(function (comp) {
  46271. return !!comp.match(compRe);
  46272. });
  46273. }
  46274. set = set.map(function (comp) {
  46275. return new Comparator(comp, this.options);
  46276. }, this);
  46277. return set;
  46278. };
  46279. Range.prototype.intersects = function (range, options) {
  46280. if (!(range instanceof Range)) {
  46281. throw new TypeError('a Range is required');
  46282. }
  46283. return this.set.some(function (thisComparators) {
  46284. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  46285. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  46286. return rangeComparators.every(function (rangeComparator) {
  46287. return thisComparator.intersects(rangeComparator, options);
  46288. });
  46289. });
  46290. });
  46291. });
  46292. };
  46293. function isSatisfiable(comparators, options) {
  46294. var result = true;
  46295. var remainingComparators = comparators.slice();
  46296. var testComparator = remainingComparators.pop();
  46297. while (result && remainingComparators.length) {
  46298. result = remainingComparators.every(function (otherComparator) {
  46299. return testComparator.intersects(otherComparator, options);
  46300. });
  46301. testComparator = remainingComparators.pop();
  46302. }
  46303. return result;
  46304. }
  46305. exports.toComparators = toComparators;
  46306. function toComparators(range, options) {
  46307. return new Range(range, options).set.map(function (comp) {
  46308. return comp.map(function (c) {
  46309. return c.value;
  46310. }).join(' ').trim().split(' ');
  46311. });
  46312. }
  46313. function parseComparator(comp, options) {
  46314. debug('comp', comp, options);
  46315. comp = replaceCarets(comp, options);
  46316. debug('caret', comp);
  46317. comp = replaceTildes(comp, options);
  46318. debug('tildes', comp);
  46319. comp = replaceXRanges(comp, options);
  46320. debug('xrange', comp);
  46321. comp = replaceStars(comp, options);
  46322. debug('stars', comp);
  46323. return comp;
  46324. }
  46325. function isX(id) {
  46326. return !id || id.toLowerCase() === 'x' || id === '*';
  46327. }
  46328. function replaceTildes(comp, options) {
  46329. return comp.trim().split(/\s+/).map(function (comp) {
  46330. return replaceTilde(comp, options);
  46331. }).join(' ');
  46332. }
  46333. function replaceTilde(comp, options) {
  46334. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  46335. return comp.replace(r, function (_, M, m, p, pr) {
  46336. debug('tilde', comp, _, M, m, p, pr);
  46337. var ret;
  46338. if (isX(M)) {
  46339. ret = '';
  46340. } else if (isX(m)) {
  46341. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  46342. } else if (isX(p)) {
  46343. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  46344. } else if (pr) {
  46345. debug('replaceTilde pr', pr);
  46346. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  46347. } else {
  46348. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  46349. }
  46350. debug('tilde return', ret);
  46351. return ret;
  46352. });
  46353. }
  46354. function replaceCarets(comp, options) {
  46355. return comp.trim().split(/\s+/).map(function (comp) {
  46356. return replaceCaret(comp, options);
  46357. }).join(' ');
  46358. }
  46359. function replaceCaret(comp, options) {
  46360. debug('caret', comp, options);
  46361. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  46362. return comp.replace(r, function (_, M, m, p, pr) {
  46363. debug('caret', comp, _, M, m, p, pr);
  46364. var ret;
  46365. if (isX(M)) {
  46366. ret = '';
  46367. } else if (isX(m)) {
  46368. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  46369. } else if (isX(p)) {
  46370. if (M === '0') {
  46371. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  46372. } else {
  46373. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  46374. }
  46375. } else if (pr) {
  46376. debug('replaceCaret pr', pr);
  46377. if (M === '0') {
  46378. if (m === '0') {
  46379. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  46380. } else {
  46381. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  46382. }
  46383. } else {
  46384. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  46385. }
  46386. } else {
  46387. debug('no pr');
  46388. if (M === '0') {
  46389. if (m === '0') {
  46390. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  46391. } else {
  46392. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  46393. }
  46394. } else {
  46395. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  46396. }
  46397. }
  46398. debug('caret return', ret);
  46399. return ret;
  46400. });
  46401. }
  46402. function replaceXRanges(comp, options) {
  46403. debug('replaceXRanges', comp, options);
  46404. return comp.split(/\s+/).map(function (comp) {
  46405. return replaceXRange(comp, options);
  46406. }).join(' ');
  46407. }
  46408. function replaceXRange(comp, options) {
  46409. comp = comp.trim();
  46410. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  46411. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  46412. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  46413. var xM = isX(M);
  46414. var xm = xM || isX(m);
  46415. var xp = xm || isX(p);
  46416. var anyX = xp;
  46417. if (gtlt === '=' && anyX) {
  46418. gtlt = '';
  46419. }
  46420. pr = options.includePrerelease ? '-0' : '';
  46421. if (xM) {
  46422. if (gtlt === '>' || gtlt === '<') {
  46423. ret = '<0.0.0-0';
  46424. } else {
  46425. ret = '*';
  46426. }
  46427. } else if (gtlt && anyX) {
  46428. if (xm) {
  46429. m = 0;
  46430. }
  46431. p = 0;
  46432. if (gtlt === '>') {
  46433. gtlt = '>=';
  46434. if (xm) {
  46435. M = +M + 1;
  46436. m = 0;
  46437. p = 0;
  46438. } else {
  46439. m = +m + 1;
  46440. p = 0;
  46441. }
  46442. } else if (gtlt === '<=') {
  46443. gtlt = '<';
  46444. if (xm) {
  46445. M = +M + 1;
  46446. } else {
  46447. m = +m + 1;
  46448. }
  46449. }
  46450. ret = gtlt + M + '.' + m + '.' + p + pr;
  46451. } else if (xm) {
  46452. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  46453. } else if (xp) {
  46454. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  46455. }
  46456. debug('xRange return', ret);
  46457. return ret;
  46458. });
  46459. }
  46460. function replaceStars(comp, options) {
  46461. debug('replaceStars', comp, options);
  46462. return comp.trim().replace(re[t.STAR], '');
  46463. }
  46464. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  46465. if (isX(fM)) {
  46466. from = '';
  46467. } else if (isX(fm)) {
  46468. from = '>=' + fM + '.0.0';
  46469. } else if (isX(fp)) {
  46470. from = '>=' + fM + '.' + fm + '.0';
  46471. } else {
  46472. from = '>=' + from;
  46473. }
  46474. if (isX(tM)) {
  46475. to = '';
  46476. } else if (isX(tm)) {
  46477. to = '<' + (+tM + 1) + '.0.0';
  46478. } else if (isX(tp)) {
  46479. to = '<' + tM + '.' + (+tm + 1) + '.0';
  46480. } else if (tpr) {
  46481. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  46482. } else {
  46483. to = '<=' + to;
  46484. }
  46485. return (from + ' ' + to).trim();
  46486. }
  46487. Range.prototype.test = function (version) {
  46488. if (!version) {
  46489. return false;
  46490. }
  46491. if (typeof version === 'string') {
  46492. try {
  46493. version = new SemVer(version, this.options);
  46494. } catch (er) {
  46495. return false;
  46496. }
  46497. }
  46498. for (var i = 0; i < this.set.length; i++) {
  46499. if (testSet(this.set[i], version, this.options)) {
  46500. return true;
  46501. }
  46502. }
  46503. return false;
  46504. };
  46505. function testSet(set, version, options) {
  46506. for (var i = 0; i < set.length; i++) {
  46507. if (!set[i].test(version)) {
  46508. return false;
  46509. }
  46510. }
  46511. if (version.prerelease.length && !options.includePrerelease) {
  46512. for (i = 0; i < set.length; i++) {
  46513. debug(set[i].semver);
  46514. if (set[i].semver === ANY) {
  46515. continue;
  46516. }
  46517. if (set[i].semver.prerelease.length > 0) {
  46518. var allowed = set[i].semver;
  46519. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  46520. return true;
  46521. }
  46522. }
  46523. }
  46524. return false;
  46525. }
  46526. return true;
  46527. }
  46528. exports.satisfies = satisfies;
  46529. function satisfies(version, range, options) {
  46530. try {
  46531. range = new Range(range, options);
  46532. } catch (er) {
  46533. return false;
  46534. }
  46535. return range.test(version);
  46536. }
  46537. exports.maxSatisfying = maxSatisfying;
  46538. function maxSatisfying(versions, range, options) {
  46539. var max = null;
  46540. var maxSV = null;
  46541. try {
  46542. var rangeObj = new Range(range, options);
  46543. } catch (er) {
  46544. return null;
  46545. }
  46546. versions.forEach(function (v) {
  46547. if (rangeObj.test(v)) {
  46548. if (!max || maxSV.compare(v) === -1) {
  46549. max = v;
  46550. maxSV = new SemVer(max, options);
  46551. }
  46552. }
  46553. });
  46554. return max;
  46555. }
  46556. exports.minSatisfying = minSatisfying;
  46557. function minSatisfying(versions, range, options) {
  46558. var min = null;
  46559. var minSV = null;
  46560. try {
  46561. var rangeObj = new Range(range, options);
  46562. } catch (er) {
  46563. return null;
  46564. }
  46565. versions.forEach(function (v) {
  46566. if (rangeObj.test(v)) {
  46567. if (!min || minSV.compare(v) === 1) {
  46568. min = v;
  46569. minSV = new SemVer(min, options);
  46570. }
  46571. }
  46572. });
  46573. return min;
  46574. }
  46575. exports.minVersion = minVersion;
  46576. function minVersion(range, loose) {
  46577. range = new Range(range, loose);
  46578. var minver = new SemVer('0.0.0');
  46579. if (range.test(minver)) {
  46580. return minver;
  46581. }
  46582. minver = new SemVer('0.0.0-0');
  46583. if (range.test(minver)) {
  46584. return minver;
  46585. }
  46586. minver = null;
  46587. for (var i = 0; i < range.set.length; ++i) {
  46588. var comparators = range.set[i];
  46589. comparators.forEach(function (comparator) {
  46590. var compver = new SemVer(comparator.semver.version);
  46591. switch (comparator.operator) {
  46592. case '>':
  46593. if (compver.prerelease.length === 0) {
  46594. compver.patch++;
  46595. } else {
  46596. compver.prerelease.push(0);
  46597. }
  46598. compver.raw = compver.format();
  46599. case '':
  46600. case '>=':
  46601. if (!minver || gt(minver, compver)) {
  46602. minver = compver;
  46603. }
  46604. break;
  46605. case '<':
  46606. case '<=':
  46607. break;
  46608. default:
  46609. throw new Error('Unexpected operation: ' + comparator.operator);
  46610. }
  46611. });
  46612. }
  46613. if (minver && range.test(minver)) {
  46614. return minver;
  46615. }
  46616. return null;
  46617. }
  46618. exports.validRange = validRange;
  46619. function validRange(range, options) {
  46620. try {
  46621. return new Range(range, options).range || '*';
  46622. } catch (er) {
  46623. return null;
  46624. }
  46625. }
  46626. exports.ltr = ltr;
  46627. function ltr(version, range, options) {
  46628. return outside(version, range, '<', options);
  46629. }
  46630. exports.gtr = gtr;
  46631. function gtr(version, range, options) {
  46632. return outside(version, range, '>', options);
  46633. }
  46634. exports.outside = outside;
  46635. function outside(version, range, hilo, options) {
  46636. version = new SemVer(version, options);
  46637. range = new Range(range, options);
  46638. var gtfn, ltefn, ltfn, comp, ecomp;
  46639. switch (hilo) {
  46640. case '>':
  46641. gtfn = gt;
  46642. ltefn = lte;
  46643. ltfn = lt;
  46644. comp = '>';
  46645. ecomp = '>=';
  46646. break;
  46647. case '<':
  46648. gtfn = lt;
  46649. ltefn = gte;
  46650. ltfn = gt;
  46651. comp = '<';
  46652. ecomp = '<=';
  46653. break;
  46654. default:
  46655. throw new TypeError('Must provide a hilo val of "<" or ">"');
  46656. }
  46657. if (satisfies(version, range, options)) {
  46658. return false;
  46659. }
  46660. for (var i = 0; i < range.set.length; ++i) {
  46661. var comparators = range.set[i];
  46662. var high = null;
  46663. var low = null;
  46664. comparators.forEach(function (comparator) {
  46665. if (comparator.semver === ANY) {
  46666. comparator = new Comparator('>=0.0.0');
  46667. }
  46668. high = high || comparator;
  46669. low = low || comparator;
  46670. if (gtfn(comparator.semver, high.semver, options)) {
  46671. high = comparator;
  46672. } else if (ltfn(comparator.semver, low.semver, options)) {
  46673. low = comparator;
  46674. }
  46675. });
  46676. if (high.operator === comp || high.operator === ecomp) {
  46677. return false;
  46678. }
  46679. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  46680. return false;
  46681. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  46682. return false;
  46683. }
  46684. }
  46685. return true;
  46686. }
  46687. exports.prerelease = prerelease;
  46688. function prerelease(version, options) {
  46689. var parsed = parse(version, options);
  46690. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  46691. }
  46692. exports.intersects = intersects;
  46693. function intersects(r1, r2, options) {
  46694. r1 = new Range(r1, options);
  46695. r2 = new Range(r2, options);
  46696. return r1.intersects(r2);
  46697. }
  46698. exports.coerce = coerce;
  46699. function coerce(version, options) {
  46700. if (version instanceof SemVer) {
  46701. return version;
  46702. }
  46703. if (typeof version === 'number') {
  46704. version = String(version);
  46705. }
  46706. if (typeof version !== 'string') {
  46707. return null;
  46708. }
  46709. options = options || {};
  46710. var match = null;
  46711. if (!options.rtl) {
  46712. match = version.match(re[t.COERCE]);
  46713. } else {
  46714. var next;
  46715. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  46716. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  46717. match = next;
  46718. }
  46719. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  46720. }
  46721. re[t.COERCERTL].lastIndex = -1;
  46722. }
  46723. if (match === null) {
  46724. return null;
  46725. }
  46726. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  46727. }
  46728. }, "/$$rollup_base$$/packages/babel-core/node_modules/semver/node_modules/semver-BABEL_8_BREAKING-false");
  46729. var semver$a = semver$b;
  46730. var errorVisitor = {
  46731. enter: function enter(path, state) {
  46732. var loc = path.node.loc;
  46733. if (loc) {
  46734. state.loc = loc;
  46735. path.stop();
  46736. }
  46737. }
  46738. };
  46739. var File = function () {
  46740. function File(options, _ref) {
  46741. var _this = this;
  46742. var code = _ref.code,
  46743. ast = _ref.ast,
  46744. inputMap = _ref.inputMap;
  46745. this._map = new Map();
  46746. this.opts = void 0;
  46747. this.declarations = {};
  46748. this.path = null;
  46749. this.ast = {};
  46750. this.scope = void 0;
  46751. this.metadata = {};
  46752. this.code = "";
  46753. this.inputMap = null;
  46754. this.hub = {
  46755. file: this,
  46756. getCode: function getCode() {
  46757. return _this.code;
  46758. },
  46759. getScope: function getScope() {
  46760. return _this.scope;
  46761. },
  46762. addHelper: this.addHelper.bind(this),
  46763. buildError: this.buildCodeFrameError.bind(this)
  46764. };
  46765. this.opts = options;
  46766. this.code = code;
  46767. this.ast = ast;
  46768. this.inputMap = inputMap;
  46769. this.path = NodePath.get({
  46770. hub: this.hub,
  46771. parentPath: null,
  46772. parent: this.ast,
  46773. container: this.ast,
  46774. key: "program"
  46775. }).setContext();
  46776. this.scope = this.path.scope;
  46777. }
  46778. var _proto = File.prototype;
  46779. _proto.set = function set(key, val) {
  46780. if (key === "helpersNamespace") {
  46781. throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'.");
  46782. }
  46783. this._map.set(key, val);
  46784. };
  46785. _proto.get = function get(key) {
  46786. return this._map.get(key);
  46787. };
  46788. _proto.has = function has(key) {
  46789. return this._map.has(key);
  46790. };
  46791. _proto.getModuleName = function getModuleName$1() {
  46792. return getModuleName(this.opts, this.opts);
  46793. };
  46794. _proto.addImport = function addImport() {
  46795. throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'.");
  46796. };
  46797. _proto.availableHelper = function availableHelper(name, versionRange) {
  46798. var minVersion;
  46799. try {
  46800. minVersion = minVersion$3(name);
  46801. } catch (err) {
  46802. if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
  46803. return false;
  46804. }
  46805. if (typeof versionRange !== "string") return true;
  46806. if (semver$a.valid(versionRange)) versionRange = "^" + versionRange;
  46807. return !semver$a.intersects("<" + minVersion, versionRange) && !semver$a.intersects(">=8.0.0", versionRange);
  46808. };
  46809. _proto.addHelper = function addHelper(name) {
  46810. var _this2 = this;
  46811. var declar = this.declarations[name];
  46812. if (declar) return cloneNode(declar);
  46813. var generator = this.get("helperGenerator");
  46814. if (generator) {
  46815. var res = generator(name);
  46816. if (res) return res;
  46817. }
  46818. ensure(name, File);
  46819. var uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
  46820. var dependencies = {};
  46821. for (var _iterator = _createForOfIteratorHelperLoose(getDependencies(name)), _step; !(_step = _iterator()).done;) {
  46822. var dep = _step.value;
  46823. dependencies[dep] = this.addHelper(dep);
  46824. }
  46825. var _helpers$get = get$1(name, function (dep) {
  46826. return dependencies[dep];
  46827. }, uid, Object.keys(this.scope.getAllBindings())),
  46828. nodes = _helpers$get.nodes,
  46829. globals = _helpers$get.globals;
  46830. globals.forEach(function (name) {
  46831. if (_this2.path.scope.hasBinding(name, true)) {
  46832. _this2.path.scope.rename(name);
  46833. }
  46834. });
  46835. nodes.forEach(function (node) {
  46836. node._compact = true;
  46837. });
  46838. this.path.unshiftContainer("body", nodes);
  46839. this.path.get("body").forEach(function (path) {
  46840. if (nodes.indexOf(path.node) === -1) return;
  46841. if (path.isVariableDeclaration()) _this2.scope.registerDeclaration(path);
  46842. });
  46843. return uid;
  46844. };
  46845. _proto.addTemplateObject = function addTemplateObject() {
  46846. throw new Error("This function has been moved into the template literal transform itself.");
  46847. };
  46848. _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, _Error) {
  46849. if (_Error === void 0) {
  46850. _Error = SyntaxError;
  46851. }
  46852. var loc = node && (node.loc || node._loc);
  46853. if (!loc && node) {
  46854. var state = {
  46855. loc: null
  46856. };
  46857. traverse(node, errorVisitor, this.scope, state);
  46858. loc = state.loc;
  46859. var txt = "This is an error on an internal node. Probably an internal error.";
  46860. if (loc) txt += " Location has been estimated.";
  46861. msg += " (" + txt + ")";
  46862. }
  46863. if (loc) {
  46864. var _this$opts$highlightC = this.opts.highlightCode,
  46865. highlightCode = _this$opts$highlightC === void 0 ? true : _this$opts$highlightC;
  46866. msg += "\n" + codeFrameColumns(this.code, {
  46867. start: {
  46868. line: loc.start.line,
  46869. column: loc.start.column + 1
  46870. },
  46871. end: loc.end && loc.start.line === loc.end.line ? {
  46872. line: loc.end.line,
  46873. column: loc.end.column + 1
  46874. } : undefined
  46875. }, {
  46876. highlightCode: highlightCode
  46877. });
  46878. }
  46879. return new _Error(msg);
  46880. };
  46881. _createClass(File, [{
  46882. key: "shebang",
  46883. get: function get() {
  46884. var interpreter = this.path.node.interpreter;
  46885. return interpreter ? interpreter.value : "";
  46886. },
  46887. set: function set(value) {
  46888. if (value) {
  46889. this.path.get("interpreter").replaceWith(interpreterDirective(value));
  46890. } else {
  46891. this.path.get("interpreter").remove();
  46892. }
  46893. }
  46894. }]);
  46895. return File;
  46896. }();
  46897. var _templateObject$k;
  46898. var buildUmdWrapper = function buildUmdWrapper(replacements) {
  46899. return template$2(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n (function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === \"object\") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n "])))(replacements);
  46900. };
  46901. function buildGlobal(allowlist) {
  46902. var namespace = identifier("babelHelpers");
  46903. var body = [];
  46904. var container = functionExpression(null, [identifier("global")], blockStatement(body));
  46905. var tree = program$2([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral("undefined")), identifier("self"), identifier("global"))]))]);
  46906. body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))]));
  46907. buildHelpers(body, namespace, allowlist);
  46908. return tree;
  46909. }
  46910. function buildModule(allowlist) {
  46911. var body = [];
  46912. var refs = buildHelpers(body, null, allowlist);
  46913. body.unshift(exportNamedDeclaration(null, Object.keys(refs).map(function (name) {
  46914. return exportSpecifier(cloneNode(refs[name]), identifier(name));
  46915. })));
  46916. return program$2(body, [], "module");
  46917. }
  46918. function buildUmd(allowlist) {
  46919. var namespace = identifier("babelHelpers");
  46920. var body = [];
  46921. body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))]));
  46922. buildHelpers(body, namespace, allowlist);
  46923. return program$2([buildUmdWrapper({
  46924. FACTORY_PARAMETERS: identifier("global"),
  46925. BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])),
  46926. COMMON_ARGUMENTS: identifier("exports"),
  46927. AMD_ARGUMENTS: arrayExpression([stringLiteral("exports")]),
  46928. FACTORY_BODY: body,
  46929. UMD_ROOT: identifier("this")
  46930. })]);
  46931. }
  46932. function buildVar(allowlist) {
  46933. var namespace = identifier("babelHelpers");
  46934. var body = [];
  46935. body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))]));
  46936. var tree = program$2(body);
  46937. buildHelpers(body, namespace, allowlist);
  46938. body.push(expressionStatement(namespace));
  46939. return tree;
  46940. }
  46941. function buildHelpers(body, namespace, allowlist) {
  46942. var getHelperReference = function getHelperReference(name) {
  46943. return namespace ? memberExpression(namespace, identifier(name)) : identifier("_" + name);
  46944. };
  46945. var refs = {};
  46946. list.forEach(function (name) {
  46947. if (allowlist && allowlist.indexOf(name) < 0) return;
  46948. var ref = refs[name] = getHelperReference(name);
  46949. ensure(name, File);
  46950. var _helpers$get = get$1(name, getHelperReference, ref),
  46951. nodes = _helpers$get.nodes;
  46952. body.push.apply(body, _toConsumableArray(nodes));
  46953. });
  46954. return refs;
  46955. }
  46956. function babelBuildExternalHelpers (allowlist, outputType) {
  46957. if (outputType === void 0) {
  46958. outputType = "global";
  46959. }
  46960. var tree;
  46961. var build = {
  46962. global: buildGlobal,
  46963. module: buildModule,
  46964. umd: buildUmd,
  46965. "var": buildVar
  46966. }[outputType];
  46967. if (build) {
  46968. tree = build(allowlist);
  46969. } else {
  46970. throw new Error("Unsupported output type " + outputType);
  46971. }
  46972. return generate$1(tree).code;
  46973. }
  46974. var _marked$9 = regenerator.mark(findPackageData),
  46975. _marked2$5 = regenerator.mark(findRelativeConfig),
  46976. _marked3$3 = regenerator.mark(findRootConfig),
  46977. _marked4$2 = regenerator.mark(loadConfig$1),
  46978. _marked5$2 = regenerator.mark(resolveShowConfigPath);
  46979. function findConfigUpwards(rootDir) {
  46980. return null;
  46981. }
  46982. function findPackageData(filepath) {
  46983. return regenerator.wrap(function findPackageData$(_context) {
  46984. while (1) {
  46985. switch (_context.prev = _context.next) {
  46986. case 0:
  46987. return _context.abrupt("return", {
  46988. filepath: filepath,
  46989. directories: [],
  46990. pkg: null,
  46991. isPackage: false
  46992. });
  46993. case 1:
  46994. case "end":
  46995. return _context.stop();
  46996. }
  46997. }
  46998. }, _marked$9);
  46999. }
  47000. function findRelativeConfig(pkgData, envName, caller) {
  47001. return regenerator.wrap(function findRelativeConfig$(_context2) {
  47002. while (1) {
  47003. switch (_context2.prev = _context2.next) {
  47004. case 0:
  47005. return _context2.abrupt("return", {
  47006. config: null,
  47007. ignore: null
  47008. });
  47009. case 1:
  47010. case "end":
  47011. return _context2.stop();
  47012. }
  47013. }
  47014. }, _marked2$5);
  47015. }
  47016. function findRootConfig(dirname, envName, caller) {
  47017. return regenerator.wrap(function findRootConfig$(_context3) {
  47018. while (1) {
  47019. switch (_context3.prev = _context3.next) {
  47020. case 0:
  47021. return _context3.abrupt("return", null);
  47022. case 1:
  47023. case "end":
  47024. return _context3.stop();
  47025. }
  47026. }
  47027. }, _marked3$3);
  47028. }
  47029. function loadConfig$1(name, dirname, envName, caller) {
  47030. return regenerator.wrap(function loadConfig$(_context4) {
  47031. while (1) {
  47032. switch (_context4.prev = _context4.next) {
  47033. case 0:
  47034. throw new Error("Cannot load " + name + " relative to " + dirname + " in a browser");
  47035. case 1:
  47036. case "end":
  47037. return _context4.stop();
  47038. }
  47039. }
  47040. }, _marked4$2);
  47041. }
  47042. function resolveShowConfigPath(dirname) {
  47043. return regenerator.wrap(function resolveShowConfigPath$(_context5) {
  47044. while (1) {
  47045. switch (_context5.prev = _context5.next) {
  47046. case 0:
  47047. return _context5.abrupt("return", null);
  47048. case 1:
  47049. case "end":
  47050. return _context5.stop();
  47051. }
  47052. }
  47053. }, _marked5$2);
  47054. }
  47055. var ROOT_CONFIG_FILENAMES = [];
  47056. function resolvePlugin(name, dirname) {
  47057. return null;
  47058. }
  47059. function resolvePreset(name, dirname) {
  47060. return null;
  47061. }
  47062. function loadPlugin(name, dirname) {
  47063. throw new Error("Cannot load plugin " + name + " relative to " + dirname + " in a browser");
  47064. }
  47065. function loadPreset(name, dirname) {
  47066. throw new Error("Cannot load preset " + name + " relative to " + dirname + " in a browser");
  47067. }
  47068. function getEnv(defaultValue) {
  47069. if (defaultValue === void 0) {
  47070. defaultValue = "development";
  47071. }
  47072. return browser$6.env.BABEL_ENV || undefined || defaultValue;
  47073. }
  47074. var GENSYNC_START = Symbol["for"]("gensync:v1:start");
  47075. var GENSYNC_SUSPEND = Symbol["for"]("gensync:v1:suspend");
  47076. var GENSYNC_EXPECTED_START = "GENSYNC_EXPECTED_START";
  47077. var GENSYNC_EXPECTED_SUSPEND = "GENSYNC_EXPECTED_SUSPEND";
  47078. var GENSYNC_OPTIONS_ERROR = "GENSYNC_OPTIONS_ERROR";
  47079. var GENSYNC_RACE_NONEMPTY = "GENSYNC_RACE_NONEMPTY";
  47080. var GENSYNC_ERRBACK_NO_CALLBACK = "GENSYNC_ERRBACK_NO_CALLBACK";
  47081. var gensync = Object.assign(function gensync(optsOrFn) {
  47082. var genFn = optsOrFn;
  47083. if (typeof optsOrFn !== "function") {
  47084. genFn = newGenerator(optsOrFn);
  47085. } else {
  47086. genFn = wrapGenerator(optsOrFn);
  47087. }
  47088. return Object.assign(genFn, makeFunctionAPI(genFn));
  47089. }, {
  47090. all: buildOperation({
  47091. name: "all",
  47092. arity: 1,
  47093. sync: function sync(args) {
  47094. var items = Array.from(args[0]);
  47095. return items.map(function (item) {
  47096. return evaluateSync(item);
  47097. });
  47098. },
  47099. async: function async(args, resolve, reject) {
  47100. var items = Array.from(args[0]);
  47101. if (items.length === 0) {
  47102. Promise.resolve().then(function () {
  47103. return resolve([]);
  47104. });
  47105. return;
  47106. }
  47107. var count = 0;
  47108. var results = items.map(function () {
  47109. return undefined;
  47110. });
  47111. items.forEach(function (item, i) {
  47112. evaluateAsync(item, function (val) {
  47113. results[i] = val;
  47114. count += 1;
  47115. if (count === results.length) resolve(results);
  47116. }, reject);
  47117. });
  47118. }
  47119. }),
  47120. race: buildOperation({
  47121. name: "race",
  47122. arity: 1,
  47123. sync: function sync(args) {
  47124. var items = Array.from(args[0]);
  47125. if (items.length === 0) {
  47126. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  47127. }
  47128. return evaluateSync(items[0]);
  47129. },
  47130. async: function async(args, resolve, reject) {
  47131. var items = Array.from(args[0]);
  47132. if (items.length === 0) {
  47133. throw makeError("Must race at least 1 item", GENSYNC_RACE_NONEMPTY);
  47134. }
  47135. for (var _i = 0, _items = items; _i < _items.length; _i++) {
  47136. var item = _items[_i];
  47137. evaluateAsync(item, resolve, reject);
  47138. }
  47139. }
  47140. })
  47141. });
  47142. function makeFunctionAPI(genFn) {
  47143. var fns = {
  47144. sync: function sync() {
  47145. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  47146. args[_key] = arguments[_key];
  47147. }
  47148. return evaluateSync(genFn.apply(this, args));
  47149. },
  47150. async: function async() {
  47151. var _this = this;
  47152. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  47153. args[_key2] = arguments[_key2];
  47154. }
  47155. return new Promise(function (resolve, reject) {
  47156. evaluateAsync(genFn.apply(_this, args), resolve, reject);
  47157. });
  47158. },
  47159. errback: function errback() {
  47160. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  47161. args[_key3] = arguments[_key3];
  47162. }
  47163. var cb = args.pop();
  47164. if (typeof cb !== "function") {
  47165. throw makeError("Asynchronous function called without callback", GENSYNC_ERRBACK_NO_CALLBACK);
  47166. }
  47167. var gen;
  47168. try {
  47169. gen = genFn.apply(this, args);
  47170. } catch (err) {
  47171. cb(err);
  47172. return;
  47173. }
  47174. evaluateAsync(gen, function (val) {
  47175. return cb(undefined, val);
  47176. }, function (err) {
  47177. return cb(err);
  47178. });
  47179. }
  47180. };
  47181. return fns;
  47182. }
  47183. function assertTypeof(type, name, value, allowUndefined) {
  47184. if (typeof value === type || allowUndefined && typeof value === "undefined") {
  47185. return;
  47186. }
  47187. var msg;
  47188. if (allowUndefined) {
  47189. msg = "Expected opts." + name + " to be either a " + type + ", or undefined.";
  47190. } else {
  47191. msg = "Expected opts." + name + " to be a " + type + ".";
  47192. }
  47193. throw makeError(msg, GENSYNC_OPTIONS_ERROR);
  47194. }
  47195. function makeError(msg, code) {
  47196. return Object.assign(new Error(msg), {
  47197. code: code
  47198. });
  47199. }
  47200. function newGenerator(_ref) {
  47201. var name = _ref.name,
  47202. arity = _ref.arity,
  47203. _sync = _ref.sync,
  47204. _async = _ref.async,
  47205. errback = _ref.errback;
  47206. assertTypeof("string", "name", name, true);
  47207. assertTypeof("number", "arity", arity, true);
  47208. assertTypeof("function", "sync", _sync);
  47209. assertTypeof("function", "async", _async, true);
  47210. assertTypeof("function", "errback", errback, true);
  47211. if (_async && errback) {
  47212. throw makeError("Expected one of either opts.async or opts.errback, but got _both_.", GENSYNC_OPTIONS_ERROR);
  47213. }
  47214. if (typeof name !== "string") {
  47215. var fnName;
  47216. if (errback && errback.name && errback.name !== "errback") {
  47217. fnName = errback.name;
  47218. }
  47219. if (_async && _async.name && _async.name !== "async") {
  47220. fnName = _async.name.replace(/Async$/, "");
  47221. }
  47222. if (_sync && _sync.name && _sync.name !== "sync") {
  47223. fnName = _sync.name.replace(/Sync$/, "");
  47224. }
  47225. if (typeof fnName === "string") {
  47226. name = fnName;
  47227. }
  47228. }
  47229. if (typeof arity !== "number") {
  47230. arity = _sync.length;
  47231. }
  47232. return buildOperation({
  47233. name: name,
  47234. arity: arity,
  47235. sync: function sync(args) {
  47236. return _sync.apply(this, args);
  47237. },
  47238. async: function async(args, resolve, reject) {
  47239. if (_async) {
  47240. _async.apply(this, args).then(resolve, reject);
  47241. } else if (errback) {
  47242. errback.call.apply(errback, [this].concat(_toConsumableArray(args), [function (err, value) {
  47243. if (err == null) resolve(value);else reject(err);
  47244. }]));
  47245. } else {
  47246. resolve(_sync.apply(this, args));
  47247. }
  47248. }
  47249. });
  47250. }
  47251. function wrapGenerator(genFn) {
  47252. return setFunctionMetadata(genFn.name, genFn.length, function () {
  47253. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  47254. args[_key4] = arguments[_key4];
  47255. }
  47256. return genFn.apply(this, args);
  47257. });
  47258. }
  47259. function buildOperation(_ref2) {
  47260. var name = _ref2.name,
  47261. arity = _ref2.arity,
  47262. sync = _ref2.sync,
  47263. async = _ref2.async;
  47264. return setFunctionMetadata(name, arity, regenerator.mark(function _callee() {
  47265. var resume,
  47266. _len5,
  47267. args,
  47268. _key5,
  47269. res,
  47270. result,
  47271. _args = arguments;
  47272. return regenerator.wrap(function _callee$(_context) {
  47273. while (1) {
  47274. switch (_context.prev = _context.next) {
  47275. case 0:
  47276. _context.next = 2;
  47277. return GENSYNC_START;
  47278. case 2:
  47279. resume = _context.sent;
  47280. for (_len5 = _args.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  47281. args[_key5] = _args[_key5];
  47282. }
  47283. if (resume) {
  47284. _context.next = 7;
  47285. break;
  47286. }
  47287. res = sync.call(this, args);
  47288. return _context.abrupt("return", res);
  47289. case 7:
  47290. try {
  47291. async.call(this, args, function (value) {
  47292. if (result) return;
  47293. result = {
  47294. value: value
  47295. };
  47296. resume();
  47297. }, function (err) {
  47298. if (result) return;
  47299. result = {
  47300. err: err
  47301. };
  47302. resume();
  47303. });
  47304. } catch (err) {
  47305. result = {
  47306. err: err
  47307. };
  47308. resume();
  47309. }
  47310. _context.next = 10;
  47311. return GENSYNC_SUSPEND;
  47312. case 10:
  47313. if (!result.hasOwnProperty("err")) {
  47314. _context.next = 12;
  47315. break;
  47316. }
  47317. throw result.err;
  47318. case 12:
  47319. return _context.abrupt("return", result.value);
  47320. case 13:
  47321. case "end":
  47322. return _context.stop();
  47323. }
  47324. }
  47325. }, _callee, this);
  47326. }));
  47327. }
  47328. function evaluateSync(gen) {
  47329. var value;
  47330. while (!(_gen$next = gen.next(), value = _gen$next.value, _gen$next).done) {
  47331. var _gen$next;
  47332. assertStart(value, gen);
  47333. }
  47334. return value;
  47335. }
  47336. function evaluateAsync(gen, resolve, reject) {
  47337. (function step() {
  47338. try {
  47339. var value;
  47340. var _loop = function _loop() {
  47341. assertStart(value, gen);
  47342. var sync = true;
  47343. var didSyncResume = false;
  47344. var out = gen.next(function () {
  47345. if (sync) {
  47346. didSyncResume = true;
  47347. } else {
  47348. step();
  47349. }
  47350. });
  47351. sync = false;
  47352. assertSuspend(out, gen);
  47353. if (!didSyncResume) {
  47354. return {
  47355. v: void 0
  47356. };
  47357. }
  47358. };
  47359. while (!(_gen$next2 = gen.next(), value = _gen$next2.value, _gen$next2).done) {
  47360. var _gen$next2;
  47361. var _ret = _loop();
  47362. if (typeof _ret === "object") return _ret.v;
  47363. }
  47364. return resolve(value);
  47365. } catch (err) {
  47366. return reject(err);
  47367. }
  47368. })();
  47369. }
  47370. function assertStart(value, gen) {
  47371. if (value === GENSYNC_START) return;
  47372. throwError(gen, makeError("Got unexpected yielded value in gensync generator: " + JSON.stringify(value) + ". Did you perhaps mean to use 'yield*' instead of 'yield'?", GENSYNC_EXPECTED_START));
  47373. }
  47374. function assertSuspend(_ref3, gen) {
  47375. var value = _ref3.value,
  47376. done = _ref3.done;
  47377. if (!done && value === GENSYNC_SUSPEND) return;
  47378. throwError(gen, makeError(done ? "Unexpected generator completion. If you get this, it is probably a gensync bug." : "Expected GENSYNC_SUSPEND, got " + JSON.stringify(value) + ". If you get this, it is probably a gensync bug.", GENSYNC_EXPECTED_SUSPEND));
  47379. }
  47380. function throwError(gen, err) {
  47381. if (gen["throw"]) gen["throw"](err);
  47382. throw err;
  47383. }
  47384. function setFunctionMetadata(name, arity, fn) {
  47385. if (typeof name === "string") {
  47386. var nameDesc = Object.getOwnPropertyDescriptor(fn, "name");
  47387. if (!nameDesc || nameDesc.configurable) {
  47388. Object.defineProperty(fn, "name", Object.assign(nameDesc || {}, {
  47389. configurable: true,
  47390. value: name
  47391. }));
  47392. }
  47393. }
  47394. if (typeof arity === "number") {
  47395. var lengthDesc = Object.getOwnPropertyDescriptor(fn, "length");
  47396. if (!lengthDesc || lengthDesc.configurable) {
  47397. Object.defineProperty(fn, "length", Object.assign(lengthDesc || {}, {
  47398. configurable: true,
  47399. value: arity
  47400. }));
  47401. }
  47402. }
  47403. return fn;
  47404. }
  47405. var id = function id(x) {
  47406. return x;
  47407. };
  47408. var runGenerator = gensync(regenerator.mark(function _callee(item) {
  47409. return regenerator.wrap(function _callee$(_context) {
  47410. while (1) {
  47411. switch (_context.prev = _context.next) {
  47412. case 0:
  47413. return _context.delegateYield(item, "t0", 1);
  47414. case 1:
  47415. return _context.abrupt("return", _context.t0);
  47416. case 2:
  47417. case "end":
  47418. return _context.stop();
  47419. }
  47420. }
  47421. }, _callee);
  47422. }));
  47423. var isAsync = gensync({
  47424. sync: function sync() {
  47425. return false;
  47426. },
  47427. errback: function errback(cb) {
  47428. return cb(null, true);
  47429. }
  47430. });
  47431. function maybeAsync(fn, message) {
  47432. return gensync({
  47433. sync: function sync() {
  47434. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  47435. args[_key] = arguments[_key];
  47436. }
  47437. var result = fn.apply(this, args);
  47438. if (isThenable$1(result)) throw new Error(message);
  47439. return result;
  47440. },
  47441. async: function async() {
  47442. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  47443. args[_key2] = arguments[_key2];
  47444. }
  47445. return Promise.resolve(fn.apply(this, args));
  47446. }
  47447. });
  47448. }
  47449. var withKind = gensync({
  47450. sync: function sync(cb) {
  47451. return cb("sync");
  47452. },
  47453. async: function async(cb) {
  47454. return cb("async");
  47455. }
  47456. });
  47457. function forwardAsync(action, cb) {
  47458. var g = gensync(action);
  47459. return withKind(function (kind) {
  47460. var adapted = g[kind];
  47461. return cb(adapted);
  47462. });
  47463. }
  47464. var onFirstPause = gensync({
  47465. name: "onFirstPause",
  47466. arity: 2,
  47467. sync: function sync(item) {
  47468. return runGenerator.sync(item);
  47469. },
  47470. errback: function errback(item, firstPause, cb) {
  47471. var completed = false;
  47472. runGenerator.errback(item, function (err, value) {
  47473. completed = true;
  47474. cb(err, value);
  47475. });
  47476. if (!completed) {
  47477. firstPause();
  47478. }
  47479. }
  47480. });
  47481. var waitFor = gensync({
  47482. sync: id,
  47483. async: id
  47484. });
  47485. function isThenable$1(val) {
  47486. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  47487. }
  47488. function mergeOptions(target, source) {
  47489. for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
  47490. var k = _Object$keys[_i];
  47491. if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) {
  47492. var parserOpts = source[k];
  47493. var targetObj = target[k] || (target[k] = {});
  47494. mergeDefaultFields(targetObj, parserOpts);
  47495. } else {
  47496. var val = source[k];
  47497. if (val !== undefined) target[k] = val;
  47498. }
  47499. }
  47500. }
  47501. function mergeDefaultFields(target, source) {
  47502. for (var _i2 = 0, _Object$keys2 = Object.keys(source); _i2 < _Object$keys2.length; _i2++) {
  47503. var k = _Object$keys2[_i2];
  47504. var val = source[k];
  47505. if (val !== undefined) target[k] = val;
  47506. }
  47507. }
  47508. function isIterableIterator(value) {
  47509. return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
  47510. }
  47511. var Plugin$1 = function Plugin(plugin, options, key) {
  47512. this.key = void 0;
  47513. this.manipulateOptions = void 0;
  47514. this.post = void 0;
  47515. this.pre = void 0;
  47516. this.visitor = void 0;
  47517. this.parserOverride = void 0;
  47518. this.generatorOverride = void 0;
  47519. this.options = void 0;
  47520. this.key = plugin.name || key;
  47521. this.manipulateOptions = plugin.manipulateOptions;
  47522. this.post = plugin.post;
  47523. this.pre = plugin.pre;
  47524. this.visitor = plugin.visitor || {};
  47525. this.parserOverride = plugin.parserOverride;
  47526. this.generatorOverride = plugin.generatorOverride;
  47527. this.options = options;
  47528. };
  47529. var _marked$8 = regenerator.mark(genTrue),
  47530. _marked2$4 = regenerator.mark(getCachedValue),
  47531. _marked3$2 = regenerator.mark(getCachedValueOrWait);
  47532. var synchronize = function synchronize(gen) {
  47533. return gensync(gen).sync;
  47534. };
  47535. function genTrue() {
  47536. return regenerator.wrap(function genTrue$(_context) {
  47537. while (1) {
  47538. switch (_context.prev = _context.next) {
  47539. case 0:
  47540. return _context.abrupt("return", true);
  47541. case 1:
  47542. case "end":
  47543. return _context.stop();
  47544. }
  47545. }
  47546. }, _marked$8);
  47547. }
  47548. function makeWeakCache(handler) {
  47549. return makeCachedFunction(WeakMap, handler);
  47550. }
  47551. function makeWeakCacheSync(handler) {
  47552. return synchronize(makeWeakCache(handler));
  47553. }
  47554. function makeStrongCache(handler) {
  47555. return makeCachedFunction(Map, handler);
  47556. }
  47557. function makeStrongCacheSync(handler) {
  47558. return synchronize(makeStrongCache(handler));
  47559. }
  47560. function makeCachedFunction(CallCache, handler) {
  47561. var callCacheSync = new CallCache();
  47562. var callCacheAsync = new CallCache();
  47563. var futureCache = new CallCache();
  47564. return regenerator.mark(function cachedFunction(arg, data) {
  47565. var asyncContext, callCache, cached, cache, handlerResult, finishLock, value, gen;
  47566. return regenerator.wrap(function cachedFunction$(_context2) {
  47567. while (1) {
  47568. switch (_context2.prev = _context2.next) {
  47569. case 0:
  47570. return _context2.delegateYield(isAsync(), "t0", 1);
  47571. case 1:
  47572. asyncContext = _context2.t0;
  47573. callCache = asyncContext ? callCacheAsync : callCacheSync;
  47574. return _context2.delegateYield(getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data), "t1", 4);
  47575. case 4:
  47576. cached = _context2.t1;
  47577. if (!cached.valid) {
  47578. _context2.next = 7;
  47579. break;
  47580. }
  47581. return _context2.abrupt("return", cached.value);
  47582. case 7:
  47583. cache = new CacheConfigurator(data);
  47584. handlerResult = handler(arg, cache);
  47585. if (!isIterableIterator(handlerResult)) {
  47586. _context2.next = 15;
  47587. break;
  47588. }
  47589. gen = handlerResult;
  47590. return _context2.delegateYield(onFirstPause(gen, function () {
  47591. finishLock = setupAsyncLocks(cache, futureCache, arg);
  47592. }), "t2", 12);
  47593. case 12:
  47594. value = _context2.t2;
  47595. _context2.next = 16;
  47596. break;
  47597. case 15:
  47598. value = handlerResult;
  47599. case 16:
  47600. updateFunctionCache(callCache, cache, arg, value);
  47601. if (finishLock) {
  47602. futureCache["delete"](arg);
  47603. finishLock.release(value);
  47604. }
  47605. return _context2.abrupt("return", value);
  47606. case 19:
  47607. case "end":
  47608. return _context2.stop();
  47609. }
  47610. }
  47611. }, cachedFunction);
  47612. });
  47613. }
  47614. function getCachedValue(cache, arg, data) {
  47615. var cachedValue, _iterator, _step, _step$value, _value, valid;
  47616. return regenerator.wrap(function getCachedValue$(_context3) {
  47617. while (1) {
  47618. switch (_context3.prev = _context3.next) {
  47619. case 0:
  47620. cachedValue = cache.get(arg);
  47621. if (!cachedValue) {
  47622. _context3.next = 10;
  47623. break;
  47624. }
  47625. _iterator = _createForOfIteratorHelperLoose(cachedValue);
  47626. case 3:
  47627. if ((_step = _iterator()).done) {
  47628. _context3.next = 10;
  47629. break;
  47630. }
  47631. _step$value = _step.value, _value = _step$value.value, valid = _step$value.valid;
  47632. return _context3.delegateYield(valid(data), "t0", 6);
  47633. case 6:
  47634. if (!_context3.t0) {
  47635. _context3.next = 8;
  47636. break;
  47637. }
  47638. return _context3.abrupt("return", {
  47639. valid: true,
  47640. value: _value
  47641. });
  47642. case 8:
  47643. _context3.next = 3;
  47644. break;
  47645. case 10:
  47646. return _context3.abrupt("return", {
  47647. valid: false,
  47648. value: null
  47649. });
  47650. case 11:
  47651. case "end":
  47652. return _context3.stop();
  47653. }
  47654. }
  47655. }, _marked2$4);
  47656. }
  47657. function getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) {
  47658. var cached, _cached, _value2;
  47659. return regenerator.wrap(function getCachedValueOrWait$(_context4) {
  47660. while (1) {
  47661. switch (_context4.prev = _context4.next) {
  47662. case 0:
  47663. return _context4.delegateYield(getCachedValue(callCache, arg, data), "t0", 1);
  47664. case 1:
  47665. cached = _context4.t0;
  47666. if (!cached.valid) {
  47667. _context4.next = 4;
  47668. break;
  47669. }
  47670. return _context4.abrupt("return", cached);
  47671. case 4:
  47672. if (!asyncContext) {
  47673. _context4.next = 11;
  47674. break;
  47675. }
  47676. return _context4.delegateYield(getCachedValue(futureCache, arg, data), "t1", 6);
  47677. case 6:
  47678. _cached = _context4.t1;
  47679. if (!_cached.valid) {
  47680. _context4.next = 11;
  47681. break;
  47682. }
  47683. return _context4.delegateYield(waitFor(_cached.value.promise), "t2", 9);
  47684. case 9:
  47685. _value2 = _context4.t2;
  47686. return _context4.abrupt("return", {
  47687. valid: true,
  47688. value: _value2
  47689. });
  47690. case 11:
  47691. return _context4.abrupt("return", {
  47692. valid: false,
  47693. value: null
  47694. });
  47695. case 12:
  47696. case "end":
  47697. return _context4.stop();
  47698. }
  47699. }
  47700. }, _marked3$2);
  47701. }
  47702. function setupAsyncLocks(config, futureCache, arg) {
  47703. var finishLock = new Lock();
  47704. updateFunctionCache(futureCache, config, arg, finishLock);
  47705. return finishLock;
  47706. }
  47707. function updateFunctionCache(cache, config, arg, value) {
  47708. if (!config.configured()) config.forever();
  47709. var cachedValue = cache.get(arg);
  47710. config.deactivate();
  47711. switch (config.mode()) {
  47712. case "forever":
  47713. cachedValue = [{
  47714. value: value,
  47715. valid: genTrue
  47716. }];
  47717. cache.set(arg, cachedValue);
  47718. break;
  47719. case "invalidate":
  47720. cachedValue = [{
  47721. value: value,
  47722. valid: config.validator()
  47723. }];
  47724. cache.set(arg, cachedValue);
  47725. break;
  47726. case "valid":
  47727. if (cachedValue) {
  47728. cachedValue.push({
  47729. value: value,
  47730. valid: config.validator()
  47731. });
  47732. } else {
  47733. cachedValue = [{
  47734. value: value,
  47735. valid: config.validator()
  47736. }];
  47737. cache.set(arg, cachedValue);
  47738. }
  47739. }
  47740. }
  47741. var CacheConfigurator = function () {
  47742. function CacheConfigurator(data) {
  47743. this._active = true;
  47744. this._never = false;
  47745. this._forever = false;
  47746. this._invalidate = false;
  47747. this._configured = false;
  47748. this._pairs = [];
  47749. this._data = void 0;
  47750. this._data = data;
  47751. }
  47752. var _proto = CacheConfigurator.prototype;
  47753. _proto.simple = function simple() {
  47754. return makeSimpleConfigurator(this);
  47755. };
  47756. _proto.mode = function mode() {
  47757. if (this._never) return "never";
  47758. if (this._forever) return "forever";
  47759. if (this._invalidate) return "invalidate";
  47760. return "valid";
  47761. };
  47762. _proto.forever = function forever() {
  47763. if (!this._active) {
  47764. throw new Error("Cannot change caching after evaluation has completed.");
  47765. }
  47766. if (this._never) {
  47767. throw new Error("Caching has already been configured with .never()");
  47768. }
  47769. this._forever = true;
  47770. this._configured = true;
  47771. };
  47772. _proto.never = function never() {
  47773. if (!this._active) {
  47774. throw new Error("Cannot change caching after evaluation has completed.");
  47775. }
  47776. if (this._forever) {
  47777. throw new Error("Caching has already been configured with .forever()");
  47778. }
  47779. this._never = true;
  47780. this._configured = true;
  47781. };
  47782. _proto.using = function using(handler) {
  47783. var _this = this;
  47784. if (!this._active) {
  47785. throw new Error("Cannot change caching after evaluation has completed.");
  47786. }
  47787. if (this._never || this._forever) {
  47788. throw new Error("Caching has already been configured with .never or .forever()");
  47789. }
  47790. this._configured = true;
  47791. var key = handler(this._data);
  47792. var fn = maybeAsync(handler, "You appear to be using an async cache handler, but Babel has been called synchronously");
  47793. if (isThenable$1(key)) {
  47794. return key.then(function (key) {
  47795. _this._pairs.push([key, fn]);
  47796. return key;
  47797. });
  47798. }
  47799. this._pairs.push([key, fn]);
  47800. return key;
  47801. };
  47802. _proto.invalidate = function invalidate(handler) {
  47803. this._invalidate = true;
  47804. return this.using(handler);
  47805. };
  47806. _proto.validator = function validator() {
  47807. var pairs = this._pairs;
  47808. return regenerator.mark(function _callee(data) {
  47809. var _iterator2, _step2, _step2$value, key, fn;
  47810. return regenerator.wrap(function _callee$(_context5) {
  47811. while (1) {
  47812. switch (_context5.prev = _context5.next) {
  47813. case 0:
  47814. _iterator2 = _createForOfIteratorHelperLoose(pairs);
  47815. case 1:
  47816. if ((_step2 = _iterator2()).done) {
  47817. _context5.next = 10;
  47818. break;
  47819. }
  47820. _step2$value = _slicedToArray$2(_step2.value, 2), key = _step2$value[0], fn = _step2$value[1];
  47821. _context5.t0 = key;
  47822. return _context5.delegateYield(fn(data), "t1", 5);
  47823. case 5:
  47824. _context5.t2 = _context5.t1;
  47825. if (!(_context5.t0 !== _context5.t2)) {
  47826. _context5.next = 8;
  47827. break;
  47828. }
  47829. return _context5.abrupt("return", false);
  47830. case 8:
  47831. _context5.next = 1;
  47832. break;
  47833. case 10:
  47834. return _context5.abrupt("return", true);
  47835. case 11:
  47836. case "end":
  47837. return _context5.stop();
  47838. }
  47839. }
  47840. }, _callee);
  47841. });
  47842. };
  47843. _proto.deactivate = function deactivate() {
  47844. this._active = false;
  47845. };
  47846. _proto.configured = function configured() {
  47847. return this._configured;
  47848. };
  47849. return CacheConfigurator;
  47850. }();
  47851. function makeSimpleConfigurator(cache) {
  47852. function cacheFn(val) {
  47853. if (typeof val === "boolean") {
  47854. if (val) cache.forever();else cache.never();
  47855. return;
  47856. }
  47857. return cache.using(function () {
  47858. return assertSimpleType(val());
  47859. });
  47860. }
  47861. cacheFn.forever = function () {
  47862. return cache.forever();
  47863. };
  47864. cacheFn.never = function () {
  47865. return cache.never();
  47866. };
  47867. cacheFn.using = function (cb) {
  47868. return cache.using(function () {
  47869. return assertSimpleType(cb());
  47870. });
  47871. };
  47872. cacheFn.invalidate = function (cb) {
  47873. return cache.invalidate(function () {
  47874. return assertSimpleType(cb());
  47875. });
  47876. };
  47877. return cacheFn;
  47878. }
  47879. function assertSimpleType(value) {
  47880. if (isThenable$1(value)) {
  47881. throw new Error("You appear to be using an async cache handler, " + "which your current version of Babel does not support. " + "We may add support for this in the future, " + "but if you're on the most recent version of @babel/core and still " + "seeing this error, then you'll need to synchronously handle your caching logic.");
  47882. }
  47883. if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") {
  47884. throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
  47885. }
  47886. return value;
  47887. }
  47888. var Lock = function () {
  47889. function Lock() {
  47890. var _this2 = this;
  47891. this.released = false;
  47892. this.promise = void 0;
  47893. this._resolve = void 0;
  47894. this.promise = new Promise(function (resolve) {
  47895. _this2._resolve = resolve;
  47896. });
  47897. }
  47898. var _proto2 = Lock.prototype;
  47899. _proto2.release = function release(value) {
  47900. this.released = true;
  47901. this._resolve(value);
  47902. };
  47903. return Lock;
  47904. }();
  47905. var jsReleases = [
  47906. {
  47907. name: "nodejs",
  47908. version: "0.2.0",
  47909. date: "2011-08-26",
  47910. lts: false,
  47911. security: false
  47912. },
  47913. {
  47914. name: "nodejs",
  47915. version: "0.3.0",
  47916. date: "2011-08-26",
  47917. lts: false,
  47918. security: false
  47919. },
  47920. {
  47921. name: "nodejs",
  47922. version: "0.4.0",
  47923. date: "2011-08-26",
  47924. lts: false,
  47925. security: false
  47926. },
  47927. {
  47928. name: "nodejs",
  47929. version: "0.5.0",
  47930. date: "2011-08-26",
  47931. lts: false,
  47932. security: false
  47933. },
  47934. {
  47935. name: "nodejs",
  47936. version: "0.6.0",
  47937. date: "2011-11-04",
  47938. lts: false,
  47939. security: false
  47940. },
  47941. {
  47942. name: "nodejs",
  47943. version: "0.7.0",
  47944. date: "2012-01-17",
  47945. lts: false,
  47946. security: false
  47947. },
  47948. {
  47949. name: "nodejs",
  47950. version: "0.8.0",
  47951. date: "2012-06-22",
  47952. lts: false,
  47953. security: false
  47954. },
  47955. {
  47956. name: "nodejs",
  47957. version: "0.9.0",
  47958. date: "2012-07-20",
  47959. lts: false,
  47960. security: false
  47961. },
  47962. {
  47963. name: "nodejs",
  47964. version: "0.10.0",
  47965. date: "2013-03-11",
  47966. lts: false,
  47967. security: false
  47968. },
  47969. {
  47970. name: "nodejs",
  47971. version: "0.11.0",
  47972. date: "2013-03-28",
  47973. lts: false,
  47974. security: false
  47975. },
  47976. {
  47977. name: "nodejs",
  47978. version: "0.12.0",
  47979. date: "2015-02-06",
  47980. lts: false,
  47981. security: false
  47982. },
  47983. {
  47984. name: "iojs",
  47985. version: "1.0.0",
  47986. date: "2015-01-14"
  47987. },
  47988. {
  47989. name: "iojs",
  47990. version: "1.1.0",
  47991. date: "2015-02-03"
  47992. },
  47993. {
  47994. name: "iojs",
  47995. version: "1.2.0",
  47996. date: "2015-02-11"
  47997. },
  47998. {
  47999. name: "iojs",
  48000. version: "1.3.0",
  48001. date: "2015-02-20"
  48002. },
  48003. {
  48004. name: "iojs",
  48005. version: "1.5.0",
  48006. date: "2015-03-06"
  48007. },
  48008. {
  48009. name: "iojs",
  48010. version: "1.6.0",
  48011. date: "2015-03-20"
  48012. },
  48013. {
  48014. name: "iojs",
  48015. version: "2.0.0",
  48016. date: "2015-05-04"
  48017. },
  48018. {
  48019. name: "iojs",
  48020. version: "2.1.0",
  48021. date: "2015-05-24"
  48022. },
  48023. {
  48024. name: "iojs",
  48025. version: "2.2.0",
  48026. date: "2015-06-01"
  48027. },
  48028. {
  48029. name: "iojs",
  48030. version: "2.3.0",
  48031. date: "2015-06-13"
  48032. },
  48033. {
  48034. name: "iojs",
  48035. version: "2.4.0",
  48036. date: "2015-07-17"
  48037. },
  48038. {
  48039. name: "iojs",
  48040. version: "2.5.0",
  48041. date: "2015-07-28"
  48042. },
  48043. {
  48044. name: "iojs",
  48045. version: "3.0.0",
  48046. date: "2015-08-04"
  48047. },
  48048. {
  48049. name: "iojs",
  48050. version: "3.1.0",
  48051. date: "2015-08-19"
  48052. },
  48053. {
  48054. name: "iojs",
  48055. version: "3.2.0",
  48056. date: "2015-08-25"
  48057. },
  48058. {
  48059. name: "iojs",
  48060. version: "3.3.0",
  48061. date: "2015-09-02"
  48062. },
  48063. {
  48064. name: "nodejs",
  48065. version: "4.0.0",
  48066. date: "2015-09-08",
  48067. lts: false,
  48068. security: false
  48069. },
  48070. {
  48071. name: "nodejs",
  48072. version: "4.1.0",
  48073. date: "2015-09-17",
  48074. lts: false,
  48075. security: false
  48076. },
  48077. {
  48078. name: "nodejs",
  48079. version: "4.2.0",
  48080. date: "2015-10-12",
  48081. lts: "Argon",
  48082. security: false
  48083. },
  48084. {
  48085. name: "nodejs",
  48086. version: "4.3.0",
  48087. date: "2016-02-09",
  48088. lts: "Argon",
  48089. security: false
  48090. },
  48091. {
  48092. name: "nodejs",
  48093. version: "4.4.0",
  48094. date: "2016-03-08",
  48095. lts: "Argon",
  48096. security: false
  48097. },
  48098. {
  48099. name: "nodejs",
  48100. version: "4.5.0",
  48101. date: "2016-08-16",
  48102. lts: "Argon",
  48103. security: false
  48104. },
  48105. {
  48106. name: "nodejs",
  48107. version: "4.6.0",
  48108. date: "2016-09-27",
  48109. lts: "Argon",
  48110. security: true
  48111. },
  48112. {
  48113. name: "nodejs",
  48114. version: "4.7.0",
  48115. date: "2016-12-06",
  48116. lts: "Argon",
  48117. security: false
  48118. },
  48119. {
  48120. name: "nodejs",
  48121. version: "4.8.0",
  48122. date: "2017-02-21",
  48123. lts: "Argon",
  48124. security: false
  48125. },
  48126. {
  48127. name: "nodejs",
  48128. version: "4.9.0",
  48129. date: "2018-03-28",
  48130. lts: "Argon",
  48131. security: true
  48132. },
  48133. {
  48134. name: "nodejs",
  48135. version: "5.0.0",
  48136. date: "2015-10-29",
  48137. lts: false,
  48138. security: false
  48139. },
  48140. {
  48141. name: "nodejs",
  48142. version: "5.1.0",
  48143. date: "2015-11-17",
  48144. lts: false,
  48145. security: false
  48146. },
  48147. {
  48148. name: "nodejs",
  48149. version: "5.2.0",
  48150. date: "2015-12-09",
  48151. lts: false,
  48152. security: false
  48153. },
  48154. {
  48155. name: "nodejs",
  48156. version: "5.3.0",
  48157. date: "2015-12-15",
  48158. lts: false,
  48159. security: false
  48160. },
  48161. {
  48162. name: "nodejs",
  48163. version: "5.4.0",
  48164. date: "2016-01-06",
  48165. lts: false,
  48166. security: false
  48167. },
  48168. {
  48169. name: "nodejs",
  48170. version: "5.5.0",
  48171. date: "2016-01-21",
  48172. lts: false,
  48173. security: false
  48174. },
  48175. {
  48176. name: "nodejs",
  48177. version: "5.6.0",
  48178. date: "2016-02-09",
  48179. lts: false,
  48180. security: false
  48181. },
  48182. {
  48183. name: "nodejs",
  48184. version: "5.7.0",
  48185. date: "2016-02-23",
  48186. lts: false,
  48187. security: false
  48188. },
  48189. {
  48190. name: "nodejs",
  48191. version: "5.8.0",
  48192. date: "2016-03-09",
  48193. lts: false,
  48194. security: false
  48195. },
  48196. {
  48197. name: "nodejs",
  48198. version: "5.9.0",
  48199. date: "2016-03-16",
  48200. lts: false,
  48201. security: false
  48202. },
  48203. {
  48204. name: "nodejs",
  48205. version: "5.10.0",
  48206. date: "2016-04-01",
  48207. lts: false,
  48208. security: false
  48209. },
  48210. {
  48211. name: "nodejs",
  48212. version: "5.11.0",
  48213. date: "2016-04-21",
  48214. lts: false,
  48215. security: false
  48216. },
  48217. {
  48218. name: "nodejs",
  48219. version: "5.12.0",
  48220. date: "2016-06-23",
  48221. lts: false,
  48222. security: false
  48223. },
  48224. {
  48225. name: "nodejs",
  48226. version: "6.0.0",
  48227. date: "2016-04-26",
  48228. lts: false,
  48229. security: false
  48230. },
  48231. {
  48232. name: "nodejs",
  48233. version: "6.1.0",
  48234. date: "2016-05-05",
  48235. lts: false,
  48236. security: false
  48237. },
  48238. {
  48239. name: "nodejs",
  48240. version: "6.2.0",
  48241. date: "2016-05-17",
  48242. lts: false,
  48243. security: false
  48244. },
  48245. {
  48246. name: "nodejs",
  48247. version: "6.3.0",
  48248. date: "2016-07-06",
  48249. lts: false,
  48250. security: false
  48251. },
  48252. {
  48253. name: "nodejs",
  48254. version: "6.4.0",
  48255. date: "2016-08-12",
  48256. lts: false,
  48257. security: false
  48258. },
  48259. {
  48260. name: "nodejs",
  48261. version: "6.5.0",
  48262. date: "2016-08-26",
  48263. lts: false,
  48264. security: false
  48265. },
  48266. {
  48267. name: "nodejs",
  48268. version: "6.6.0",
  48269. date: "2016-09-14",
  48270. lts: false,
  48271. security: false
  48272. },
  48273. {
  48274. name: "nodejs",
  48275. version: "6.7.0",
  48276. date: "2016-09-27",
  48277. lts: false,
  48278. security: true
  48279. },
  48280. {
  48281. name: "nodejs",
  48282. version: "6.8.0",
  48283. date: "2016-10-12",
  48284. lts: false,
  48285. security: false
  48286. },
  48287. {
  48288. name: "nodejs",
  48289. version: "6.9.0",
  48290. date: "2016-10-18",
  48291. lts: "Boron",
  48292. security: false
  48293. },
  48294. {
  48295. name: "nodejs",
  48296. version: "6.10.0",
  48297. date: "2017-02-21",
  48298. lts: "Boron",
  48299. security: false
  48300. },
  48301. {
  48302. name: "nodejs",
  48303. version: "6.11.0",
  48304. date: "2017-06-06",
  48305. lts: "Boron",
  48306. security: false
  48307. },
  48308. {
  48309. name: "nodejs",
  48310. version: "6.12.0",
  48311. date: "2017-11-06",
  48312. lts: "Boron",
  48313. security: false
  48314. },
  48315. {
  48316. name: "nodejs",
  48317. version: "6.13.0",
  48318. date: "2018-02-10",
  48319. lts: "Boron",
  48320. security: false
  48321. },
  48322. {
  48323. name: "nodejs",
  48324. version: "6.14.0",
  48325. date: "2018-03-28",
  48326. lts: "Boron",
  48327. security: true
  48328. },
  48329. {
  48330. name: "nodejs",
  48331. version: "6.15.0",
  48332. date: "2018-11-27",
  48333. lts: "Boron",
  48334. security: true
  48335. },
  48336. {
  48337. name: "nodejs",
  48338. version: "6.16.0",
  48339. date: "2018-12-26",
  48340. lts: "Boron",
  48341. security: false
  48342. },
  48343. {
  48344. name: "nodejs",
  48345. version: "6.17.0",
  48346. date: "2019-02-28",
  48347. lts: "Boron",
  48348. security: true
  48349. },
  48350. {
  48351. name: "nodejs",
  48352. version: "7.0.0",
  48353. date: "2016-10-25",
  48354. lts: false,
  48355. security: false
  48356. },
  48357. {
  48358. name: "nodejs",
  48359. version: "7.1.0",
  48360. date: "2016-11-08",
  48361. lts: false,
  48362. security: false
  48363. },
  48364. {
  48365. name: "nodejs",
  48366. version: "7.2.0",
  48367. date: "2016-11-22",
  48368. lts: false,
  48369. security: false
  48370. },
  48371. {
  48372. name: "nodejs",
  48373. version: "7.3.0",
  48374. date: "2016-12-20",
  48375. lts: false,
  48376. security: false
  48377. },
  48378. {
  48379. name: "nodejs",
  48380. version: "7.4.0",
  48381. date: "2017-01-04",
  48382. lts: false,
  48383. security: false
  48384. },
  48385. {
  48386. name: "nodejs",
  48387. version: "7.5.0",
  48388. date: "2017-01-31",
  48389. lts: false,
  48390. security: false
  48391. },
  48392. {
  48393. name: "nodejs",
  48394. version: "7.6.0",
  48395. date: "2017-02-21",
  48396. lts: false,
  48397. security: false
  48398. },
  48399. {
  48400. name: "nodejs",
  48401. version: "7.7.0",
  48402. date: "2017-02-28",
  48403. lts: false,
  48404. security: false
  48405. },
  48406. {
  48407. name: "nodejs",
  48408. version: "7.8.0",
  48409. date: "2017-03-29",
  48410. lts: false,
  48411. security: false
  48412. },
  48413. {
  48414. name: "nodejs",
  48415. version: "7.9.0",
  48416. date: "2017-04-11",
  48417. lts: false,
  48418. security: false
  48419. },
  48420. {
  48421. name: "nodejs",
  48422. version: "7.10.0",
  48423. date: "2017-05-02",
  48424. lts: false,
  48425. security: false
  48426. },
  48427. {
  48428. name: "nodejs",
  48429. version: "8.0.0",
  48430. date: "2017-05-30",
  48431. lts: false,
  48432. security: false
  48433. },
  48434. {
  48435. name: "nodejs",
  48436. version: "8.1.0",
  48437. date: "2017-06-08",
  48438. lts: false,
  48439. security: false
  48440. },
  48441. {
  48442. name: "nodejs",
  48443. version: "8.2.0",
  48444. date: "2017-07-19",
  48445. lts: false,
  48446. security: false
  48447. },
  48448. {
  48449. name: "nodejs",
  48450. version: "8.3.0",
  48451. date: "2017-08-08",
  48452. lts: false,
  48453. security: false
  48454. },
  48455. {
  48456. name: "nodejs",
  48457. version: "8.4.0",
  48458. date: "2017-08-15",
  48459. lts: false,
  48460. security: false
  48461. },
  48462. {
  48463. name: "nodejs",
  48464. version: "8.5.0",
  48465. date: "2017-09-12",
  48466. lts: false,
  48467. security: false
  48468. },
  48469. {
  48470. name: "nodejs",
  48471. version: "8.6.0",
  48472. date: "2017-09-26",
  48473. lts: false,
  48474. security: false
  48475. },
  48476. {
  48477. name: "nodejs",
  48478. version: "8.7.0",
  48479. date: "2017-10-11",
  48480. lts: false,
  48481. security: false
  48482. },
  48483. {
  48484. name: "nodejs",
  48485. version: "8.8.0",
  48486. date: "2017-10-24",
  48487. lts: false,
  48488. security: false
  48489. },
  48490. {
  48491. name: "nodejs",
  48492. version: "8.9.0",
  48493. date: "2017-10-31",
  48494. lts: "Carbon",
  48495. security: false
  48496. },
  48497. {
  48498. name: "nodejs",
  48499. version: "8.10.0",
  48500. date: "2018-03-06",
  48501. lts: "Carbon",
  48502. security: false
  48503. },
  48504. {
  48505. name: "nodejs",
  48506. version: "8.11.0",
  48507. date: "2018-03-28",
  48508. lts: "Carbon",
  48509. security: true
  48510. },
  48511. {
  48512. name: "nodejs",
  48513. version: "8.12.0",
  48514. date: "2018-09-10",
  48515. lts: "Carbon",
  48516. security: false
  48517. },
  48518. {
  48519. name: "nodejs",
  48520. version: "8.13.0",
  48521. date: "2018-11-20",
  48522. lts: "Carbon",
  48523. security: false
  48524. },
  48525. {
  48526. name: "nodejs",
  48527. version: "8.14.0",
  48528. date: "2018-11-27",
  48529. lts: "Carbon",
  48530. security: true
  48531. },
  48532. {
  48533. name: "nodejs",
  48534. version: "8.15.0",
  48535. date: "2018-12-26",
  48536. lts: "Carbon",
  48537. security: false
  48538. },
  48539. {
  48540. name: "nodejs",
  48541. version: "8.16.0",
  48542. date: "2019-04-16",
  48543. lts: "Carbon",
  48544. security: false
  48545. },
  48546. {
  48547. name: "nodejs",
  48548. version: "8.17.0",
  48549. date: "2019-12-17",
  48550. lts: "Carbon",
  48551. security: true
  48552. },
  48553. {
  48554. name: "nodejs",
  48555. version: "9.0.0",
  48556. date: "2017-10-31",
  48557. lts: false,
  48558. security: false
  48559. },
  48560. {
  48561. name: "nodejs",
  48562. version: "9.1.0",
  48563. date: "2017-11-07",
  48564. lts: false,
  48565. security: false
  48566. },
  48567. {
  48568. name: "nodejs",
  48569. version: "9.2.0",
  48570. date: "2017-11-14",
  48571. lts: false,
  48572. security: false
  48573. },
  48574. {
  48575. name: "nodejs",
  48576. version: "9.3.0",
  48577. date: "2017-12-12",
  48578. lts: false,
  48579. security: false
  48580. },
  48581. {
  48582. name: "nodejs",
  48583. version: "9.4.0",
  48584. date: "2018-01-10",
  48585. lts: false,
  48586. security: false
  48587. },
  48588. {
  48589. name: "nodejs",
  48590. version: "9.5.0",
  48591. date: "2018-01-31",
  48592. lts: false,
  48593. security: false
  48594. },
  48595. {
  48596. name: "nodejs",
  48597. version: "9.6.0",
  48598. date: "2018-02-21",
  48599. lts: false,
  48600. security: false
  48601. },
  48602. {
  48603. name: "nodejs",
  48604. version: "9.7.0",
  48605. date: "2018-03-01",
  48606. lts: false,
  48607. security: false
  48608. },
  48609. {
  48610. name: "nodejs",
  48611. version: "9.8.0",
  48612. date: "2018-03-07",
  48613. lts: false,
  48614. security: false
  48615. },
  48616. {
  48617. name: "nodejs",
  48618. version: "9.9.0",
  48619. date: "2018-03-21",
  48620. lts: false,
  48621. security: false
  48622. },
  48623. {
  48624. name: "nodejs",
  48625. version: "9.10.0",
  48626. date: "2018-03-28",
  48627. lts: false,
  48628. security: true
  48629. },
  48630. {
  48631. name: "nodejs",
  48632. version: "9.11.0",
  48633. date: "2018-04-04",
  48634. lts: false,
  48635. security: false
  48636. },
  48637. {
  48638. name: "nodejs",
  48639. version: "10.0.0",
  48640. date: "2018-04-24",
  48641. lts: false,
  48642. security: false
  48643. },
  48644. {
  48645. name: "nodejs",
  48646. version: "10.1.0",
  48647. date: "2018-05-08",
  48648. lts: false,
  48649. security: false
  48650. },
  48651. {
  48652. name: "nodejs",
  48653. version: "10.2.0",
  48654. date: "2018-05-23",
  48655. lts: false,
  48656. security: false
  48657. },
  48658. {
  48659. name: "nodejs",
  48660. version: "10.3.0",
  48661. date: "2018-05-29",
  48662. lts: false,
  48663. security: false
  48664. },
  48665. {
  48666. name: "nodejs",
  48667. version: "10.4.0",
  48668. date: "2018-06-06",
  48669. lts: false,
  48670. security: false
  48671. },
  48672. {
  48673. name: "nodejs",
  48674. version: "10.5.0",
  48675. date: "2018-06-20",
  48676. lts: false,
  48677. security: false
  48678. },
  48679. {
  48680. name: "nodejs",
  48681. version: "10.6.0",
  48682. date: "2018-07-04",
  48683. lts: false,
  48684. security: false
  48685. },
  48686. {
  48687. name: "nodejs",
  48688. version: "10.7.0",
  48689. date: "2018-07-18",
  48690. lts: false,
  48691. security: false
  48692. },
  48693. {
  48694. name: "nodejs",
  48695. version: "10.8.0",
  48696. date: "2018-08-01",
  48697. lts: false,
  48698. security: false
  48699. },
  48700. {
  48701. name: "nodejs",
  48702. version: "10.9.0",
  48703. date: "2018-08-15",
  48704. lts: false,
  48705. security: false
  48706. },
  48707. {
  48708. name: "nodejs",
  48709. version: "10.10.0",
  48710. date: "2018-09-06",
  48711. lts: false,
  48712. security: false
  48713. },
  48714. {
  48715. name: "nodejs",
  48716. version: "10.11.0",
  48717. date: "2018-09-19",
  48718. lts: false,
  48719. security: false
  48720. },
  48721. {
  48722. name: "nodejs",
  48723. version: "10.12.0",
  48724. date: "2018-10-10",
  48725. lts: false,
  48726. security: false
  48727. },
  48728. {
  48729. name: "nodejs",
  48730. version: "10.13.0",
  48731. date: "2018-10-30",
  48732. lts: "Dubnium",
  48733. security: false
  48734. },
  48735. {
  48736. name: "nodejs",
  48737. version: "10.14.0",
  48738. date: "2018-11-27",
  48739. lts: "Dubnium",
  48740. security: true
  48741. },
  48742. {
  48743. name: "nodejs",
  48744. version: "10.15.0",
  48745. date: "2018-12-26",
  48746. lts: "Dubnium",
  48747. security: false
  48748. },
  48749. {
  48750. name: "nodejs",
  48751. version: "10.16.0",
  48752. date: "2019-05-28",
  48753. lts: "Dubnium",
  48754. security: false
  48755. },
  48756. {
  48757. name: "nodejs",
  48758. version: "10.17.0",
  48759. date: "2019-10-22",
  48760. lts: "Dubnium",
  48761. security: false
  48762. },
  48763. {
  48764. name: "nodejs",
  48765. version: "10.18.0",
  48766. date: "2019-12-17",
  48767. lts: "Dubnium",
  48768. security: true
  48769. },
  48770. {
  48771. name: "nodejs",
  48772. version: "10.19.0",
  48773. date: "2020-02-05",
  48774. lts: "Dubnium",
  48775. security: true
  48776. },
  48777. {
  48778. name: "nodejs",
  48779. version: "10.20.0",
  48780. date: "2020-03-26",
  48781. lts: "Dubnium",
  48782. security: false
  48783. },
  48784. {
  48785. name: "nodejs",
  48786. version: "10.21.0",
  48787. date: "2020-06-02",
  48788. lts: "Dubnium",
  48789. security: true
  48790. },
  48791. {
  48792. name: "nodejs",
  48793. version: "10.22.0",
  48794. date: "2020-07-21",
  48795. lts: "Dubnium",
  48796. security: false
  48797. },
  48798. {
  48799. name: "nodejs",
  48800. version: "10.23.0",
  48801. date: "2020-10-27",
  48802. lts: "Dubnium",
  48803. security: false
  48804. },
  48805. {
  48806. name: "nodejs",
  48807. version: "10.24.0",
  48808. date: "2021-02-23",
  48809. lts: "Dubnium",
  48810. security: true
  48811. },
  48812. {
  48813. name: "nodejs",
  48814. version: "11.0.0",
  48815. date: "2018-10-23",
  48816. lts: false,
  48817. security: false
  48818. },
  48819. {
  48820. name: "nodejs",
  48821. version: "11.1.0",
  48822. date: "2018-10-30",
  48823. lts: false,
  48824. security: false
  48825. },
  48826. {
  48827. name: "nodejs",
  48828. version: "11.2.0",
  48829. date: "2018-11-15",
  48830. lts: false,
  48831. security: false
  48832. },
  48833. {
  48834. name: "nodejs",
  48835. version: "11.3.0",
  48836. date: "2018-11-27",
  48837. lts: false,
  48838. security: true
  48839. },
  48840. {
  48841. name: "nodejs",
  48842. version: "11.4.0",
  48843. date: "2018-12-07",
  48844. lts: false,
  48845. security: false
  48846. },
  48847. {
  48848. name: "nodejs",
  48849. version: "11.5.0",
  48850. date: "2018-12-18",
  48851. lts: false,
  48852. security: false
  48853. },
  48854. {
  48855. name: "nodejs",
  48856. version: "11.6.0",
  48857. date: "2018-12-26",
  48858. lts: false,
  48859. security: false
  48860. },
  48861. {
  48862. name: "nodejs",
  48863. version: "11.7.0",
  48864. date: "2019-01-17",
  48865. lts: false,
  48866. security: false
  48867. },
  48868. {
  48869. name: "nodejs",
  48870. version: "11.8.0",
  48871. date: "2019-01-24",
  48872. lts: false,
  48873. security: false
  48874. },
  48875. {
  48876. name: "nodejs",
  48877. version: "11.9.0",
  48878. date: "2019-01-30",
  48879. lts: false,
  48880. security: false
  48881. },
  48882. {
  48883. name: "nodejs",
  48884. version: "11.10.0",
  48885. date: "2019-02-14",
  48886. lts: false,
  48887. security: false
  48888. },
  48889. {
  48890. name: "nodejs",
  48891. version: "11.11.0",
  48892. date: "2019-03-05",
  48893. lts: false,
  48894. security: false
  48895. },
  48896. {
  48897. name: "nodejs",
  48898. version: "11.12.0",
  48899. date: "2019-03-14",
  48900. lts: false,
  48901. security: false
  48902. },
  48903. {
  48904. name: "nodejs",
  48905. version: "11.13.0",
  48906. date: "2019-03-28",
  48907. lts: false,
  48908. security: false
  48909. },
  48910. {
  48911. name: "nodejs",
  48912. version: "11.14.0",
  48913. date: "2019-04-10",
  48914. lts: false,
  48915. security: false
  48916. },
  48917. {
  48918. name: "nodejs",
  48919. version: "11.15.0",
  48920. date: "2019-04-30",
  48921. lts: false,
  48922. security: false
  48923. },
  48924. {
  48925. name: "nodejs",
  48926. version: "12.0.0",
  48927. date: "2019-04-23",
  48928. lts: false,
  48929. security: false
  48930. },
  48931. {
  48932. name: "nodejs",
  48933. version: "12.1.0",
  48934. date: "2019-04-29",
  48935. lts: false,
  48936. security: false
  48937. },
  48938. {
  48939. name: "nodejs",
  48940. version: "12.2.0",
  48941. date: "2019-05-07",
  48942. lts: false,
  48943. security: false
  48944. },
  48945. {
  48946. name: "nodejs",
  48947. version: "12.3.0",
  48948. date: "2019-05-21",
  48949. lts: false,
  48950. security: false
  48951. },
  48952. {
  48953. name: "nodejs",
  48954. version: "12.4.0",
  48955. date: "2019-06-04",
  48956. lts: false,
  48957. security: false
  48958. },
  48959. {
  48960. name: "nodejs",
  48961. version: "12.5.0",
  48962. date: "2019-06-26",
  48963. lts: false,
  48964. security: false
  48965. },
  48966. {
  48967. name: "nodejs",
  48968. version: "12.6.0",
  48969. date: "2019-07-03",
  48970. lts: false,
  48971. security: false
  48972. },
  48973. {
  48974. name: "nodejs",
  48975. version: "12.7.0",
  48976. date: "2019-07-23",
  48977. lts: false,
  48978. security: false
  48979. },
  48980. {
  48981. name: "nodejs",
  48982. version: "12.8.0",
  48983. date: "2019-08-06",
  48984. lts: false,
  48985. security: false
  48986. },
  48987. {
  48988. name: "nodejs",
  48989. version: "12.9.0",
  48990. date: "2019-08-20",
  48991. lts: false,
  48992. security: false
  48993. },
  48994. {
  48995. name: "nodejs",
  48996. version: "12.10.0",
  48997. date: "2019-09-04",
  48998. lts: false,
  48999. security: false
  49000. },
  49001. {
  49002. name: "nodejs",
  49003. version: "12.11.0",
  49004. date: "2019-09-25",
  49005. lts: false,
  49006. security: false
  49007. },
  49008. {
  49009. name: "nodejs",
  49010. version: "12.12.0",
  49011. date: "2019-10-11",
  49012. lts: false,
  49013. security: false
  49014. },
  49015. {
  49016. name: "nodejs",
  49017. version: "12.13.0",
  49018. date: "2019-10-21",
  49019. lts: "Erbium",
  49020. security: false
  49021. },
  49022. {
  49023. name: "nodejs",
  49024. version: "12.14.0",
  49025. date: "2019-12-17",
  49026. lts: "Erbium",
  49027. security: true
  49028. },
  49029. {
  49030. name: "nodejs",
  49031. version: "12.15.0",
  49032. date: "2020-02-05",
  49033. lts: "Erbium",
  49034. security: true
  49035. },
  49036. {
  49037. name: "nodejs",
  49038. version: "12.16.0",
  49039. date: "2020-02-11",
  49040. lts: "Erbium",
  49041. security: false
  49042. },
  49043. {
  49044. name: "nodejs",
  49045. version: "12.17.0",
  49046. date: "2020-05-26",
  49047. lts: "Erbium",
  49048. security: false
  49049. },
  49050. {
  49051. name: "nodejs",
  49052. version: "12.18.0",
  49053. date: "2020-06-02",
  49054. lts: "Erbium",
  49055. security: true
  49056. },
  49057. {
  49058. name: "nodejs",
  49059. version: "12.19.0",
  49060. date: "2020-10-06",
  49061. lts: "Erbium",
  49062. security: false
  49063. },
  49064. {
  49065. name: "nodejs",
  49066. version: "12.20.0",
  49067. date: "2020-11-24",
  49068. lts: "Erbium",
  49069. security: false
  49070. },
  49071. {
  49072. name: "nodejs",
  49073. version: "12.21.0",
  49074. date: "2021-02-23",
  49075. lts: "Erbium",
  49076. security: true
  49077. },
  49078. {
  49079. name: "nodejs",
  49080. version: "13.0.0",
  49081. date: "2019-10-22",
  49082. lts: false,
  49083. security: false
  49084. },
  49085. {
  49086. name: "nodejs",
  49087. version: "13.1.0",
  49088. date: "2019-11-05",
  49089. lts: false,
  49090. security: false
  49091. },
  49092. {
  49093. name: "nodejs",
  49094. version: "13.2.0",
  49095. date: "2019-11-21",
  49096. lts: false,
  49097. security: false
  49098. },
  49099. {
  49100. name: "nodejs",
  49101. version: "13.3.0",
  49102. date: "2019-12-03",
  49103. lts: false,
  49104. security: false
  49105. },
  49106. {
  49107. name: "nodejs",
  49108. version: "13.4.0",
  49109. date: "2019-12-17",
  49110. lts: false,
  49111. security: true
  49112. },
  49113. {
  49114. name: "nodejs",
  49115. version: "13.5.0",
  49116. date: "2019-12-18",
  49117. lts: false,
  49118. security: false
  49119. },
  49120. {
  49121. name: "nodejs",
  49122. version: "13.6.0",
  49123. date: "2020-01-07",
  49124. lts: false,
  49125. security: false
  49126. },
  49127. {
  49128. name: "nodejs",
  49129. version: "13.7.0",
  49130. date: "2020-01-21",
  49131. lts: false,
  49132. security: false
  49133. },
  49134. {
  49135. name: "nodejs",
  49136. version: "13.8.0",
  49137. date: "2020-02-05",
  49138. lts: false,
  49139. security: true
  49140. },
  49141. {
  49142. name: "nodejs",
  49143. version: "13.9.0",
  49144. date: "2020-02-18",
  49145. lts: false,
  49146. security: false
  49147. },
  49148. {
  49149. name: "nodejs",
  49150. version: "13.10.0",
  49151. date: "2020-03-04",
  49152. lts: false,
  49153. security: false
  49154. },
  49155. {
  49156. name: "nodejs",
  49157. version: "13.11.0",
  49158. date: "2020-03-12",
  49159. lts: false,
  49160. security: false
  49161. },
  49162. {
  49163. name: "nodejs",
  49164. version: "13.12.0",
  49165. date: "2020-03-26",
  49166. lts: false,
  49167. security: false
  49168. },
  49169. {
  49170. name: "nodejs",
  49171. version: "13.13.0",
  49172. date: "2020-04-14",
  49173. lts: false,
  49174. security: false
  49175. },
  49176. {
  49177. name: "nodejs",
  49178. version: "13.14.0",
  49179. date: "2020-04-29",
  49180. lts: false,
  49181. security: false
  49182. },
  49183. {
  49184. name: "nodejs",
  49185. version: "14.0.0",
  49186. date: "2020-04-21",
  49187. lts: false,
  49188. security: false
  49189. },
  49190. {
  49191. name: "nodejs",
  49192. version: "14.1.0",
  49193. date: "2020-04-29",
  49194. lts: false,
  49195. security: false
  49196. },
  49197. {
  49198. name: "nodejs",
  49199. version: "14.2.0",
  49200. date: "2020-05-05",
  49201. lts: false,
  49202. security: false
  49203. },
  49204. {
  49205. name: "nodejs",
  49206. version: "14.3.0",
  49207. date: "2020-05-19",
  49208. lts: false,
  49209. security: false
  49210. },
  49211. {
  49212. name: "nodejs",
  49213. version: "14.4.0",
  49214. date: "2020-06-02",
  49215. lts: false,
  49216. security: true
  49217. },
  49218. {
  49219. name: "nodejs",
  49220. version: "14.5.0",
  49221. date: "2020-06-30",
  49222. lts: false,
  49223. security: false
  49224. },
  49225. {
  49226. name: "nodejs",
  49227. version: "14.6.0",
  49228. date: "2020-07-20",
  49229. lts: false,
  49230. security: false
  49231. },
  49232. {
  49233. name: "nodejs",
  49234. version: "14.7.0",
  49235. date: "2020-07-29",
  49236. lts: false,
  49237. security: false
  49238. },
  49239. {
  49240. name: "nodejs",
  49241. version: "14.8.0",
  49242. date: "2020-08-11",
  49243. lts: false,
  49244. security: false
  49245. },
  49246. {
  49247. name: "nodejs",
  49248. version: "14.9.0",
  49249. date: "2020-08-27",
  49250. lts: false,
  49251. security: false
  49252. },
  49253. {
  49254. name: "nodejs",
  49255. version: "14.10.0",
  49256. date: "2020-09-08",
  49257. lts: false,
  49258. security: false
  49259. },
  49260. {
  49261. name: "nodejs",
  49262. version: "14.11.0",
  49263. date: "2020-09-15",
  49264. lts: false,
  49265. security: true
  49266. },
  49267. {
  49268. name: "nodejs",
  49269. version: "14.12.0",
  49270. date: "2020-09-22",
  49271. lts: false,
  49272. security: false
  49273. },
  49274. {
  49275. name: "nodejs",
  49276. version: "14.13.0",
  49277. date: "2020-09-29",
  49278. lts: false,
  49279. security: false
  49280. },
  49281. {
  49282. name: "nodejs",
  49283. version: "14.14.0",
  49284. date: "2020-10-15",
  49285. lts: false,
  49286. security: false
  49287. },
  49288. {
  49289. name: "nodejs",
  49290. version: "14.15.0",
  49291. date: "2020-10-27",
  49292. lts: "Fermium",
  49293. security: false
  49294. },
  49295. {
  49296. name: "nodejs",
  49297. version: "14.16.0",
  49298. date: "2021-02-23",
  49299. lts: "Fermium",
  49300. security: true
  49301. },
  49302. {
  49303. name: "nodejs",
  49304. version: "15.0.0",
  49305. date: "2020-10-20",
  49306. lts: false,
  49307. security: false
  49308. },
  49309. {
  49310. name: "nodejs",
  49311. version: "15.1.0",
  49312. date: "2020-11-04",
  49313. lts: false,
  49314. security: false
  49315. },
  49316. {
  49317. name: "nodejs",
  49318. version: "15.2.0",
  49319. date: "2020-11-10",
  49320. lts: false,
  49321. security: false
  49322. },
  49323. {
  49324. name: "nodejs",
  49325. version: "15.3.0",
  49326. date: "2020-11-24",
  49327. lts: false,
  49328. security: false
  49329. },
  49330. {
  49331. name: "nodejs",
  49332. version: "15.4.0",
  49333. date: "2020-12-09",
  49334. lts: false,
  49335. security: false
  49336. },
  49337. {
  49338. name: "nodejs",
  49339. version: "15.5.0",
  49340. date: "2020-12-22",
  49341. lts: false,
  49342. security: false
  49343. },
  49344. {
  49345. name: "nodejs",
  49346. version: "15.6.0",
  49347. date: "2021-01-14",
  49348. lts: false,
  49349. security: false
  49350. },
  49351. {
  49352. name: "nodejs",
  49353. version: "15.7.0",
  49354. date: "2021-01-25",
  49355. lts: false,
  49356. security: false
  49357. },
  49358. {
  49359. name: "nodejs",
  49360. version: "15.8.0",
  49361. date: "2021-02-02",
  49362. lts: false,
  49363. security: false
  49364. },
  49365. {
  49366. name: "nodejs",
  49367. version: "15.9.0",
  49368. date: "2021-02-18",
  49369. lts: false,
  49370. security: false
  49371. },
  49372. {
  49373. name: "nodejs",
  49374. version: "15.10.0",
  49375. date: "2021-02-23",
  49376. lts: false,
  49377. security: true
  49378. }
  49379. ];
  49380. var browsers$2 = {
  49381. A: "ie",
  49382. B: "edge",
  49383. C: "firefox",
  49384. D: "chrome",
  49385. E: "safari",
  49386. F: "opera",
  49387. G: "ios_saf",
  49388. H: "op_mini",
  49389. I: "android",
  49390. J: "bb",
  49391. K: "op_mob",
  49392. L: "and_chr",
  49393. M: "and_ff",
  49394. N: "ie_mob",
  49395. O: "and_uc",
  49396. P: "samsung",
  49397. Q: "and_qq",
  49398. R: "baidu",
  49399. S: "kaios"
  49400. };
  49401. var browsers_1 = browsers$2;
  49402. var browsers$1 = {
  49403. browsers: browsers_1
  49404. };
  49405. var browserVersions$1 = {
  49406. "0": "43",
  49407. "1": "44",
  49408. "2": "45",
  49409. "3": "46",
  49410. "4": "47",
  49411. "5": "48",
  49412. "6": "49",
  49413. "7": "50",
  49414. "8": "51",
  49415. "9": "52",
  49416. A: "10",
  49417. B: "11",
  49418. C: "12",
  49419. D: "7",
  49420. E: "8",
  49421. F: "9",
  49422. G: "90",
  49423. H: "4",
  49424. I: "6",
  49425. J: "13",
  49426. K: "14",
  49427. L: "15",
  49428. M: "16",
  49429. N: "17",
  49430. O: "18",
  49431. P: "87",
  49432. Q: "62",
  49433. R: "79",
  49434. S: "80",
  49435. T: "81",
  49436. U: "83",
  49437. V: "84",
  49438. W: "85",
  49439. X: "86",
  49440. Y: "88",
  49441. Z: "89",
  49442. a: "91",
  49443. b: "5",
  49444. c: "19",
  49445. d: "20",
  49446. e: "21",
  49447. f: "22",
  49448. g: "23",
  49449. h: "24",
  49450. i: "25",
  49451. j: "26",
  49452. k: "27",
  49453. l: "28",
  49454. m: "29",
  49455. n: "30",
  49456. o: "31",
  49457. p: "32",
  49458. q: "33",
  49459. r: "34",
  49460. s: "35",
  49461. t: "36",
  49462. u: "37",
  49463. v: "38",
  49464. w: "39",
  49465. x: "40",
  49466. y: "41",
  49467. z: "42",
  49468. AB: "53",
  49469. BB: "54",
  49470. CB: "55",
  49471. DB: "56",
  49472. EB: "57",
  49473. FB: "58",
  49474. GB: "60",
  49475. HB: "63",
  49476. IB: "64",
  49477. JB: "65",
  49478. KB: "66",
  49479. LB: "67",
  49480. MB: "68",
  49481. NB: "69",
  49482. OB: "70",
  49483. PB: "71",
  49484. QB: "72",
  49485. RB: "73",
  49486. SB: "74",
  49487. TB: "75",
  49488. UB: "76",
  49489. VB: "11.1",
  49490. WB: "12.1",
  49491. XB: "3",
  49492. YB: "59",
  49493. ZB: "61",
  49494. aB: "77",
  49495. bB: "78",
  49496. cB: "3.2",
  49497. dB: "10.1",
  49498. eB: "11.5",
  49499. fB: "4.2-4.3",
  49500. gB: "5.5",
  49501. hB: "2",
  49502. iB: "82",
  49503. jB: "3.5",
  49504. kB: "3.6",
  49505. lB: "92",
  49506. mB: "93",
  49507. nB: "94",
  49508. oB: "3.1",
  49509. pB: "5.1",
  49510. qB: "6.1",
  49511. rB: "7.1",
  49512. sB: "9.1",
  49513. tB: "13.1",
  49514. uB: "14.1",
  49515. vB: "TP",
  49516. wB: "9.5-9.6",
  49517. xB: "10.0-10.1",
  49518. yB: "10.5",
  49519. zB: "10.6",
  49520. "0B": "11.6",
  49521. "1B": "4.0-4.1",
  49522. "2B": "5.0-5.1",
  49523. "3B": "6.0-6.1",
  49524. "4B": "7.0-7.1",
  49525. "5B": "8.1-8.4",
  49526. "6B": "9.0-9.2",
  49527. "7B": "9.3",
  49528. "8B": "10.0-10.2",
  49529. "9B": "10.3",
  49530. AC: "11.0-11.2",
  49531. BC: "11.3-11.4",
  49532. CC: "12.0-12.1",
  49533. DC: "12.2-12.4",
  49534. EC: "13.0-13.1",
  49535. FC: "13.2",
  49536. GC: "13.3",
  49537. HC: "13.4-13.7",
  49538. IC: "14.0-14.4",
  49539. JC: "14.5-14.6",
  49540. KC: "all",
  49541. LC: "2.1",
  49542. MC: "2.2",
  49543. NC: "2.3",
  49544. OC: "4.1",
  49545. PC: "4.4",
  49546. QC: "4.4.3-4.4.4",
  49547. RC: "12.12",
  49548. SC: "5.0-5.4",
  49549. TC: "6.2-6.4",
  49550. UC: "7.2-7.4",
  49551. VC: "8.2",
  49552. WC: "9.2",
  49553. XC: "11.1-11.2",
  49554. YC: "12.0",
  49555. ZC: "13.0",
  49556. aC: "14.0",
  49557. bC: "10.4",
  49558. cC: "7.12",
  49559. dC: "2.5"
  49560. };
  49561. var browserVersions_1 = browserVersions$1;
  49562. var browserVersions = {
  49563. browserVersions: browserVersions_1
  49564. };
  49565. var agents$2 = {
  49566. A: {
  49567. A: {
  49568. I: 0.0131217,
  49569. D: 0.00621152,
  49570. E: 0.0199047,
  49571. F: 0.0928884,
  49572. A: 0.0132698,
  49573. B: 0.849265,
  49574. gB: 0.009298
  49575. },
  49576. B: "ms",
  49577. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "gB", "I", "D", "E", "F", "A", "B", "", "", ""],
  49578. E: "IE",
  49579. F: {
  49580. gB: 962323200,
  49581. I: 998870400,
  49582. D: 1161129600,
  49583. E: 1237420800,
  49584. F: 1300060800,
  49585. A: 1346716800,
  49586. B: 1381968000
  49587. }
  49588. },
  49589. B: {
  49590. A: {
  49591. C: 0.008408,
  49592. J: 0.004267,
  49593. K: 0.004204,
  49594. L: 0.004204,
  49595. M: 0.008408,
  49596. N: 0.033632,
  49597. O: 0.092488,
  49598. R: 0,
  49599. S: 0.004298,
  49600. T: 0.00944,
  49601. U: 0.00415,
  49602. V: 0.008408,
  49603. W: 0.008408,
  49604. X: 0.012612,
  49605. P: 0.012612,
  49606. Y: 0.016816,
  49607. Z: 0.079876,
  49608. G: 3.01006,
  49609. a: 0.2102
  49610. },
  49611. B: "webkit",
  49612. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "C", "J", "K", "L", "M", "N", "O", "R", "S", "T", "U", "V", "W", "X", "P", "Y", "Z", "G", "a", "", "", ""],
  49613. E: "Edge",
  49614. F: {
  49615. C: 1438128000,
  49616. J: 1447286400,
  49617. K: 1470096000,
  49618. L: 1491868800,
  49619. M: 1508198400,
  49620. N: 1525046400,
  49621. O: 1542067200,
  49622. R: 1579046400,
  49623. S: 1581033600,
  49624. T: 1586736000,
  49625. U: 1590019200,
  49626. V: 1594857600,
  49627. W: 1598486400,
  49628. X: 1602201600,
  49629. P: 1605830400,
  49630. Y: 1611360000,
  49631. Z: 1614816000,
  49632. G: 1618358400,
  49633. a: 1622073600
  49634. },
  49635. D: {
  49636. C: "ms",
  49637. J: "ms",
  49638. K: "ms",
  49639. L: "ms",
  49640. M: "ms",
  49641. N: "ms",
  49642. O: "ms"
  49643. }
  49644. },
  49645. C: {
  49646. A: {
  49647. "0": 0.058856,
  49648. "1": 0.004204,
  49649. "2": 0.004204,
  49650. "3": 0.004525,
  49651. "4": 0.004271,
  49652. "5": 0.008408,
  49653. "6": 0.004538,
  49654. "7": 0.004267,
  49655. "8": 0.004204,
  49656. "9": 0.071468,
  49657. hB: 0.012813,
  49658. XB: 0.004271,
  49659. H: 0.02102,
  49660. b: 0.004879,
  49661. I: 0.020136,
  49662. D: 0.005725,
  49663. E: 0.004525,
  49664. F: 0.00533,
  49665. A: 0.004283,
  49666. B: 0.008408,
  49667. C: 0.004471,
  49668. J: 0.004486,
  49669. K: 0.00453,
  49670. L: 0.008542,
  49671. M: 0.004417,
  49672. N: 0.004425,
  49673. O: 0.008542,
  49674. c: 0.004443,
  49675. d: 0.004283,
  49676. e: 0.008542,
  49677. f: 0.013698,
  49678. g: 0.008542,
  49679. h: 0.008786,
  49680. i: 0.017084,
  49681. j: 0.004317,
  49682. k: 0.004393,
  49683. l: 0.004418,
  49684. m: 0.008834,
  49685. n: 0.008542,
  49686. o: 0.008928,
  49687. p: 0.004471,
  49688. q: 0.009284,
  49689. r: 0.004707,
  49690. s: 0.009076,
  49691. t: 0.004425,
  49692. u: 0.004783,
  49693. v: 0.004271,
  49694. w: 0.004783,
  49695. x: 0.00487,
  49696. y: 0.005029,
  49697. z: 0.0047,
  49698. AB: 0.004335,
  49699. BB: 0.004204,
  49700. CB: 0.004204,
  49701. DB: 0.012612,
  49702. EB: 0.004425,
  49703. FB: 0.004204,
  49704. YB: 0.004204,
  49705. GB: 0.008408,
  49706. ZB: 0.00472,
  49707. Q: 0.004425,
  49708. HB: 0.02102,
  49709. IB: 0.00415,
  49710. JB: 0.004267,
  49711. KB: 0.008408,
  49712. LB: 0.004267,
  49713. MB: 0.012612,
  49714. NB: 0.00415,
  49715. OB: 0.004204,
  49716. PB: 0.004425,
  49717. QB: 0.008408,
  49718. RB: 0.00415,
  49719. SB: 0.00415,
  49720. TB: 0.008542,
  49721. UB: 0.004298,
  49722. aB: 0.004204,
  49723. bB: 0.14714,
  49724. R: 0.008408,
  49725. S: 0.008408,
  49726. T: 0.012612,
  49727. iB: 0.016816,
  49728. U: 0.012612,
  49729. V: 0.025224,
  49730. W: 0.02102,
  49731. X: 0.033632,
  49732. P: 0.071468,
  49733. Y: 2.3122,
  49734. Z: 0.029428,
  49735. G: 0,
  49736. a: 0,
  49737. jB: 0.008786,
  49738. kB: 0.00487
  49739. },
  49740. B: "moz",
  49741. C: ["hB", "XB", "jB", "kB", "H", "b", "I", "D", "E", "F", "A", "B", "C", "J", "K", "L", "M", "N", "O", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "YB", "GB", "ZB", "Q", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "aB", "bB", "R", "S", "T", "iB", "U", "V", "W", "X", "P", "Y", "Z", "G", "a", ""],
  49742. E: "Firefox",
  49743. F: {
  49744. "0": 1450137600,
  49745. "1": 1453852800,
  49746. "2": 1457395200,
  49747. "3": 1461628800,
  49748. "4": 1465257600,
  49749. "5": 1470096000,
  49750. "6": 1474329600,
  49751. "7": 1479168000,
  49752. "8": 1485216000,
  49753. "9": 1488844800,
  49754. hB: 1161648000,
  49755. XB: 1213660800,
  49756. jB: 1246320000,
  49757. kB: 1264032000,
  49758. H: 1300752000,
  49759. b: 1308614400,
  49760. I: 1313452800,
  49761. D: 1317081600,
  49762. E: 1317081600,
  49763. F: 1320710400,
  49764. A: 1324339200,
  49765. B: 1327968000,
  49766. C: 1331596800,
  49767. J: 1335225600,
  49768. K: 1338854400,
  49769. L: 1342483200,
  49770. M: 1346112000,
  49771. N: 1349740800,
  49772. O: 1353628800,
  49773. c: 1357603200,
  49774. d: 1361232000,
  49775. e: 1364860800,
  49776. f: 1368489600,
  49777. g: 1372118400,
  49778. h: 1375747200,
  49779. i: 1379376000,
  49780. j: 1386633600,
  49781. k: 1391472000,
  49782. l: 1395100800,
  49783. m: 1398729600,
  49784. n: 1402358400,
  49785. o: 1405987200,
  49786. p: 1409616000,
  49787. q: 1413244800,
  49788. r: 1417392000,
  49789. s: 1421107200,
  49790. t: 1424736000,
  49791. u: 1428278400,
  49792. v: 1431475200,
  49793. w: 1435881600,
  49794. x: 1439251200,
  49795. y: 1442880000,
  49796. z: 1446508800,
  49797. AB: 1492560000,
  49798. BB: 1497312000,
  49799. CB: 1502150400,
  49800. DB: 1506556800,
  49801. EB: 1510617600,
  49802. FB: 1516665600,
  49803. YB: 1520985600,
  49804. GB: 1525824000,
  49805. ZB: 1529971200,
  49806. Q: 1536105600,
  49807. HB: 1540252800,
  49808. IB: 1544486400,
  49809. JB: 1548720000,
  49810. KB: 1552953600,
  49811. LB: 1558396800,
  49812. MB: 1562630400,
  49813. NB: 1567468800,
  49814. OB: 1571788800,
  49815. PB: 1575331200,
  49816. QB: 1578355200,
  49817. RB: 1581379200,
  49818. SB: 1583798400,
  49819. TB: 1586304000,
  49820. UB: 1588636800,
  49821. aB: 1591056000,
  49822. bB: 1593475200,
  49823. R: 1595894400,
  49824. S: 1598313600,
  49825. T: 1600732800,
  49826. iB: 1603152000,
  49827. U: 1605571200,
  49828. V: 1607990400,
  49829. W: 1611619200,
  49830. X: 1614038400,
  49831. P: 1616457600,
  49832. Y: 1618790400,
  49833. Z: 1622505600,
  49834. G: null,
  49835. a: null
  49836. }
  49837. },
  49838. D: {
  49839. A: {
  49840. "0": 0.008408,
  49841. "1": 0.004465,
  49842. "2": 0.004642,
  49843. "3": 0.004891,
  49844. "4": 0.008408,
  49845. "5": 0.02102,
  49846. "6": 0.214404,
  49847. "7": 0.004204,
  49848. "8": 0.016816,
  49849. "9": 0.004204,
  49850. H: 0.004706,
  49851. b: 0.004879,
  49852. I: 0.004879,
  49853. D: 0.005591,
  49854. E: 0.005591,
  49855. F: 0.005591,
  49856. A: 0.004534,
  49857. B: 0.004464,
  49858. C: 0.010424,
  49859. J: 0.0083,
  49860. K: 0.004706,
  49861. L: 0.015087,
  49862. M: 0.004393,
  49863. N: 0.004393,
  49864. O: 0.008652,
  49865. c: 0.008542,
  49866. d: 0.004393,
  49867. e: 0.004317,
  49868. f: 0.012612,
  49869. g: 0.008786,
  49870. h: 0.008408,
  49871. i: 0.004461,
  49872. j: 0.004298,
  49873. k: 0.004326,
  49874. l: 0.0047,
  49875. m: 0.004538,
  49876. n: 0.008542,
  49877. o: 0.008596,
  49878. p: 0.004566,
  49879. q: 0.004204,
  49880. r: 0.008408,
  49881. s: 0.012612,
  49882. t: 0.004335,
  49883. u: 0.004464,
  49884. v: 0.025224,
  49885. w: 0.004464,
  49886. x: 0.012612,
  49887. y: 0.0236,
  49888. z: 0.004403,
  49889. AB: 0.058856,
  49890. BB: 0.008408,
  49891. CB: 0.012612,
  49892. DB: 0.04204,
  49893. EB: 0.008408,
  49894. FB: 0.008408,
  49895. YB: 0.008408,
  49896. GB: 0.016816,
  49897. ZB: 0.121916,
  49898. Q: 0.008408,
  49899. HB: 0.02102,
  49900. IB: 0.025224,
  49901. JB: 0.02102,
  49902. KB: 0.02102,
  49903. LB: 0.033632,
  49904. MB: 0.029428,
  49905. NB: 0.067264,
  49906. OB: 0.071468,
  49907. PB: 0.025224,
  49908. QB: 0.058856,
  49909. RB: 0.02102,
  49910. SB: 0.113508,
  49911. TB: 0.092488,
  49912. UB: 0.067264,
  49913. aB: 0.029428,
  49914. bB: 0.075672,
  49915. R: 0.18918,
  49916. S: 0.1051,
  49917. T: 0.079876,
  49918. U: 0.130324,
  49919. V: 0.100896,
  49920. W: 0.243832,
  49921. X: 0.16816,
  49922. P: 0.311096,
  49923. Y: 0.344728,
  49924. Z: 1.0468,
  49925. G: 21.4866,
  49926. a: 0.790352,
  49927. lB: 0.025224,
  49928. mB: 0.004204,
  49929. nB: 0
  49930. },
  49931. B: "webkit",
  49932. C: ["", "", "", "H", "b", "I", "D", "E", "F", "A", "B", "C", "J", "K", "L", "M", "N", "O", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "YB", "GB", "ZB", "Q", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "aB", "bB", "R", "S", "T", "U", "V", "W", "X", "P", "Y", "Z", "G", "a", "lB", "mB", "nB"],
  49933. E: "Chrome",
  49934. F: {
  49935. "0": 1432080000,
  49936. "1": 1437523200,
  49937. "2": 1441152000,
  49938. "3": 1444780800,
  49939. "4": 1449014400,
  49940. "5": 1453248000,
  49941. "6": 1456963200,
  49942. "7": 1460592000,
  49943. "8": 1464134400,
  49944. "9": 1469059200,
  49945. H: 1264377600,
  49946. b: 1274745600,
  49947. I: 1283385600,
  49948. D: 1287619200,
  49949. E: 1291248000,
  49950. F: 1296777600,
  49951. A: 1299542400,
  49952. B: 1303862400,
  49953. C: 1307404800,
  49954. J: 1312243200,
  49955. K: 1316131200,
  49956. L: 1316131200,
  49957. M: 1319500800,
  49958. N: 1323734400,
  49959. O: 1328659200,
  49960. c: 1332892800,
  49961. d: 1337040000,
  49962. e: 1340668800,
  49963. f: 1343692800,
  49964. g: 1348531200,
  49965. h: 1352246400,
  49966. i: 1357862400,
  49967. j: 1361404800,
  49968. k: 1364428800,
  49969. l: 1369094400,
  49970. m: 1374105600,
  49971. n: 1376956800,
  49972. o: 1384214400,
  49973. p: 1389657600,
  49974. q: 1392940800,
  49975. r: 1397001600,
  49976. s: 1400544000,
  49977. t: 1405468800,
  49978. u: 1409011200,
  49979. v: 1412640000,
  49980. w: 1416268800,
  49981. x: 1421798400,
  49982. y: 1425513600,
  49983. z: 1429401600,
  49984. AB: 1472601600,
  49985. BB: 1476230400,
  49986. CB: 1480550400,
  49987. DB: 1485302400,
  49988. EB: 1489017600,
  49989. FB: 1492560000,
  49990. YB: 1496707200,
  49991. GB: 1500940800,
  49992. ZB: 1504569600,
  49993. Q: 1508198400,
  49994. HB: 1512518400,
  49995. IB: 1516752000,
  49996. JB: 1520294400,
  49997. KB: 1523923200,
  49998. LB: 1527552000,
  49999. MB: 1532390400,
  50000. NB: 1536019200,
  50001. OB: 1539648000,
  50002. PB: 1543968000,
  50003. QB: 1548720000,
  50004. RB: 1552348800,
  50005. SB: 1555977600,
  50006. TB: 1559606400,
  50007. UB: 1564444800,
  50008. aB: 1568073600,
  50009. bB: 1571702400,
  50010. R: 1575936000,
  50011. S: 1580860800,
  50012. T: 1586304000,
  50013. U: 1589846400,
  50014. V: 1594684800,
  50015. W: 1598313600,
  50016. X: 1601942400,
  50017. P: 1605571200,
  50018. Y: 1611014400,
  50019. Z: 1614556800,
  50020. G: 1618272000,
  50021. a: 1621987200,
  50022. lB: null,
  50023. mB: null,
  50024. nB: null
  50025. }
  50026. },
  50027. E: {
  50028. A: {
  50029. H: 0,
  50030. b: 0.008542,
  50031. I: 0.004656,
  50032. D: 0.004465,
  50033. E: 0.218608,
  50034. F: 0.004891,
  50035. A: 0.004425,
  50036. B: 0.008408,
  50037. C: 0.012612,
  50038. J: 0.088284,
  50039. K: 2.26175,
  50040. oB: 0,
  50041. cB: 0.008692,
  50042. pB: 0.109304,
  50043. qB: 0.00456,
  50044. rB: 0.004283,
  50045. sB: 0.02102,
  50046. dB: 0.02102,
  50047. VB: 0.058856,
  50048. WB: 0.088284,
  50049. tB: 0.395176,
  50050. uB: 0.748312,
  50051. vB: 0
  50052. },
  50053. B: "webkit",
  50054. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "oB", "cB", "H", "b", "pB", "I", "qB", "D", "rB", "E", "F", "sB", "A", "dB", "B", "VB", "C", "WB", "J", "tB", "K", "uB", "vB", "", ""],
  50055. E: "Safari",
  50056. F: {
  50057. oB: 1205798400,
  50058. cB: 1226534400,
  50059. H: 1244419200,
  50060. b: 1275868800,
  50061. pB: 1311120000,
  50062. I: 1343174400,
  50063. qB: 1382400000,
  50064. D: 1382400000,
  50065. rB: 1410998400,
  50066. E: 1413417600,
  50067. F: 1443657600,
  50068. sB: 1458518400,
  50069. A: 1474329600,
  50070. dB: 1490572800,
  50071. B: 1505779200,
  50072. VB: 1522281600,
  50073. C: 1537142400,
  50074. WB: 1553472000,
  50075. J: 1568851200,
  50076. tB: 1585008000,
  50077. K: 1600214400,
  50078. uB: 1619395200,
  50079. vB: null
  50080. }
  50081. },
  50082. F: {
  50083. A: {
  50084. "0": 0.008542,
  50085. "1": 0.004227,
  50086. "2": 0.004725,
  50087. "3": 0.008408,
  50088. "4": 0.008942,
  50089. "5": 0.004707,
  50090. "6": 0.004827,
  50091. "7": 0.004707,
  50092. "8": 0.004707,
  50093. "9": 0.004326,
  50094. F: 0.0082,
  50095. B: 0.016581,
  50096. C: 0.004317,
  50097. L: 0.00685,
  50098. M: 0.00685,
  50099. N: 0.00685,
  50100. O: 0.005014,
  50101. c: 0.006015,
  50102. d: 0.004879,
  50103. e: 0.006597,
  50104. f: 0.006597,
  50105. g: 0.013434,
  50106. h: 0.006702,
  50107. i: 0.006015,
  50108. j: 0.005595,
  50109. k: 0.004393,
  50110. l: 0.008652,
  50111. m: 0.004879,
  50112. n: 0.004879,
  50113. o: 0.004711,
  50114. p: 0.005152,
  50115. q: 0.005014,
  50116. r: 0.009758,
  50117. s: 0.004879,
  50118. t: 0.008408,
  50119. u: 0.004283,
  50120. v: 0.004367,
  50121. w: 0.004534,
  50122. x: 0.008408,
  50123. y: 0.004227,
  50124. z: 0.004418,
  50125. AB: 0.008922,
  50126. BB: 0.014349,
  50127. CB: 0.004425,
  50128. DB: 0.00472,
  50129. EB: 0.004425,
  50130. FB: 0.004425,
  50131. GB: 0.00472,
  50132. Q: 0.004532,
  50133. HB: 0.004566,
  50134. IB: 0.02283,
  50135. JB: 0.00867,
  50136. KB: 0.004656,
  50137. LB: 0.004642,
  50138. MB: 0.004298,
  50139. NB: 0.00944,
  50140. OB: 0.00415,
  50141. PB: 0.004271,
  50142. QB: 0.004298,
  50143. RB: 0.096692,
  50144. SB: 0.008408,
  50145. TB: 0.433012,
  50146. UB: 0.437216,
  50147. wB: 0.00685,
  50148. xB: 0,
  50149. yB: 0.008392,
  50150. zB: 0.004706,
  50151. VB: 0.006229,
  50152. eB: 0.004879,
  50153. "0B": 0.008786,
  50154. WB: 0.00472
  50155. },
  50156. B: "webkit",
  50157. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "F", "wB", "xB", "yB", "zB", "B", "VB", "eB", "0B", "C", "WB", "L", "M", "N", "O", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "AB", "BB", "CB", "DB", "EB", "FB", "GB", "Q", "HB", "IB", "JB", "KB", "LB", "MB", "NB", "OB", "PB", "QB", "RB", "SB", "TB", "UB", "", "", ""],
  50158. E: "Opera",
  50159. F: {
  50160. "0": 1486425600,
  50161. "1": 1490054400,
  50162. "2": 1494374400,
  50163. "3": 1498003200,
  50164. "4": 1502236800,
  50165. "5": 1506470400,
  50166. "6": 1510099200,
  50167. "7": 1515024000,
  50168. "8": 1517961600,
  50169. "9": 1521676800,
  50170. F: 1150761600,
  50171. wB: 1223424000,
  50172. xB: 1251763200,
  50173. yB: 1267488000,
  50174. zB: 1277942400,
  50175. B: 1292457600,
  50176. VB: 1302566400,
  50177. eB: 1309219200,
  50178. "0B": 1323129600,
  50179. C: 1323129600,
  50180. WB: 1352073600,
  50181. L: 1372723200,
  50182. M: 1377561600,
  50183. N: 1381104000,
  50184. O: 1386288000,
  50185. c: 1390867200,
  50186. d: 1393891200,
  50187. e: 1399334400,
  50188. f: 1401753600,
  50189. g: 1405987200,
  50190. h: 1409616000,
  50191. i: 1413331200,
  50192. j: 1417132800,
  50193. k: 1422316800,
  50194. l: 1425945600,
  50195. m: 1430179200,
  50196. n: 1433808000,
  50197. o: 1438646400,
  50198. p: 1442448000,
  50199. q: 1445904000,
  50200. r: 1449100800,
  50201. s: 1454371200,
  50202. t: 1457308800,
  50203. u: 1462320000,
  50204. v: 1465344000,
  50205. w: 1470096000,
  50206. x: 1474329600,
  50207. y: 1477267200,
  50208. z: 1481587200,
  50209. AB: 1525910400,
  50210. BB: 1530144000,
  50211. CB: 1534982400,
  50212. DB: 1537833600,
  50213. EB: 1543363200,
  50214. FB: 1548201600,
  50215. GB: 1554768000,
  50216. Q: 1561593600,
  50217. HB: 1566259200,
  50218. IB: 1570406400,
  50219. JB: 1573689600,
  50220. KB: 1578441600,
  50221. LB: 1583971200,
  50222. MB: 1587513600,
  50223. NB: 1592956800,
  50224. OB: 1595894400,
  50225. PB: 1600128000,
  50226. QB: 1603238400,
  50227. RB: 1613520000,
  50228. SB: 1612224000,
  50229. TB: 1616544000,
  50230. UB: 1619568000
  50231. },
  50232. D: {
  50233. F: "o",
  50234. B: "o",
  50235. C: "o",
  50236. wB: "o",
  50237. xB: "o",
  50238. yB: "o",
  50239. zB: "o",
  50240. VB: "o",
  50241. eB: "o",
  50242. "0B": "o",
  50243. WB: "o"
  50244. }
  50245. },
  50246. G: {
  50247. A: {
  50248. E: 0.00144955,
  50249. cB: 0,
  50250. "1B": 0,
  50251. fB: 0.00289911,
  50252. "2B": 0.00869732,
  50253. "3B": 0.0449361,
  50254. "4B": 0.0304406,
  50255. "5B": 0.0202937,
  50256. "6B": 0.0217433,
  50257. "7B": 0.147854,
  50258. "8B": 0.0347893,
  50259. "9B": 0.149304,
  50260. AC: 0.0855236,
  50261. BC: 0.0739272,
  50262. CC: 0.0768263,
  50263. DC: 0.246424,
  50264. EC: 0.0666794,
  50265. FC: 0.0333397,
  50266. GC: 0.172497,
  50267. HC: 0.572573,
  50268. IC: 10.1498,
  50269. JC: 1.93225
  50270. },
  50271. B: "webkit",
  50272. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "cB", "1B", "fB", "2B", "3B", "4B", "E", "5B", "6B", "7B", "8B", "9B", "AC", "BC", "CC", "DC", "EC", "FC", "GC", "HC", "IC", "JC", "", "", ""],
  50273. E: "Safari on iOS",
  50274. F: {
  50275. cB: 1270252800,
  50276. "1B": 1283904000,
  50277. fB: 1299628800,
  50278. "2B": 1331078400,
  50279. "3B": 1359331200,
  50280. "4B": 1394409600,
  50281. E: 1410912000,
  50282. "5B": 1413763200,
  50283. "6B": 1442361600,
  50284. "7B": 1458518400,
  50285. "8B": 1473724800,
  50286. "9B": 1490572800,
  50287. AC: 1505779200,
  50288. BC: 1522281600,
  50289. CC: 1537142400,
  50290. DC: 1553472000,
  50291. EC: 1568851200,
  50292. FC: 1572220800,
  50293. GC: 1580169600,
  50294. HC: 1585008000,
  50295. IC: 1600214400,
  50296. JC: 1619395200
  50297. }
  50298. },
  50299. H: {
  50300. A: {
  50301. KC: 1.18546
  50302. },
  50303. B: "o",
  50304. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "KC", "", "", ""],
  50305. E: "Opera Mini",
  50306. F: {
  50307. KC: 1426464000
  50308. }
  50309. },
  50310. I: {
  50311. A: {
  50312. XB: 0,
  50313. H: 0.0263634,
  50314. G: 0,
  50315. LC: 0,
  50316. MC: 0,
  50317. NC: 0,
  50318. OC: 0.0301296,
  50319. fB: 0.0979213,
  50320. PC: 0,
  50321. QC: 0.43688
  50322. },
  50323. B: "webkit",
  50324. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "LC", "MC", "NC", "XB", "H", "OC", "fB", "PC", "QC", "G", "", "", ""],
  50325. E: "Android Browser",
  50326. F: {
  50327. LC: 1256515200,
  50328. MC: 1274313600,
  50329. NC: 1291593600,
  50330. XB: 1298332800,
  50331. H: 1318896000,
  50332. OC: 1341792000,
  50333. fB: 1374624000,
  50334. PC: 1386547200,
  50335. QC: 1401667200,
  50336. G: 1618704000
  50337. }
  50338. },
  50339. J: {
  50340. A: {
  50341. D: 0,
  50342. A: 0
  50343. },
  50344. B: "webkit",
  50345. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "D", "A", "", "", ""],
  50346. E: "Blackberry Browser",
  50347. F: {
  50348. D: 1325376000,
  50349. A: 1359504000
  50350. }
  50351. },
  50352. K: {
  50353. A: {
  50354. A: 0,
  50355. B: 0,
  50356. C: 0,
  50357. Q: 0.0111391,
  50358. VB: 0,
  50359. eB: 0,
  50360. WB: 0
  50361. },
  50362. B: "o",
  50363. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "VB", "eB", "C", "WB", "Q", "", "", ""],
  50364. E: "Opera Mobile",
  50365. F: {
  50366. A: 1287100800,
  50367. B: 1300752000,
  50368. VB: 1314835200,
  50369. eB: 1318291200,
  50370. C: 1330300800,
  50371. WB: 1349740800,
  50372. Q: 1613433600
  50373. },
  50374. D: {
  50375. Q: "webkit"
  50376. }
  50377. },
  50378. L: {
  50379. A: {
  50380. G: 38.7167
  50381. },
  50382. B: "webkit",
  50383. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "G", "", "", ""],
  50384. E: "Chrome for Android",
  50385. F: {
  50386. G: 1618704000
  50387. }
  50388. },
  50389. M: {
  50390. A: {
  50391. P: 0.278256
  50392. },
  50393. B: "moz",
  50394. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "P", "", "", ""],
  50395. E: "Firefox for Android",
  50396. F: {
  50397. P: 1616457600
  50398. }
  50399. },
  50400. N: {
  50401. A: {
  50402. A: 0.0115934,
  50403. B: 0.022664
  50404. },
  50405. B: "ms",
  50406. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "A", "B", "", "", ""],
  50407. E: "IE Mobile",
  50408. F: {
  50409. A: 1340150400,
  50410. B: 1353456000
  50411. }
  50412. },
  50413. O: {
  50414. A: {
  50415. RC: 1.36809
  50416. },
  50417. B: "webkit",
  50418. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "RC", "", "", ""],
  50419. E: "UC Browser for Android",
  50420. F: {
  50421. RC: 1471392000
  50422. },
  50423. D: {
  50424. RC: "webkit"
  50425. }
  50426. },
  50427. P: {
  50428. A: {
  50429. H: 0.309232,
  50430. SC: 0.0103543,
  50431. TC: 0.010304,
  50432. UC: 0.0824619,
  50433. VC: 0.0103584,
  50434. WC: 0.0721541,
  50435. dB: 0.0412309,
  50436. XC: 0.164924,
  50437. YC: 0.113385,
  50438. ZC: 0.412309,
  50439. aC: 2.19555
  50440. },
  50441. B: "webkit",
  50442. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "H", "SC", "TC", "UC", "VC", "WC", "dB", "XC", "YC", "ZC", "aC", "", "", ""],
  50443. E: "Samsung Internet",
  50444. F: {
  50445. H: 1461024000,
  50446. SC: 1481846400,
  50447. TC: 1509408000,
  50448. UC: 1528329600,
  50449. VC: 1546128000,
  50450. WC: 1554163200,
  50451. dB: 1567900800,
  50452. XC: 1582588800,
  50453. YC: 1593475200,
  50454. ZC: 1605657600,
  50455. aC: 1618531200
  50456. }
  50457. },
  50458. Q: {
  50459. A: {
  50460. bC: 0.185504
  50461. },
  50462. B: "webkit",
  50463. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "bC", "", "", ""],
  50464. E: "QQ Browser",
  50465. F: {
  50466. bC: 1589846400
  50467. }
  50468. },
  50469. R: {
  50470. A: {
  50471. cC: 0
  50472. },
  50473. B: "webkit",
  50474. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "cC", "", "", ""],
  50475. E: "Baidu Browser",
  50476. F: {
  50477. cC: 1491004800
  50478. }
  50479. },
  50480. S: {
  50481. A: {
  50482. dC: 0.098549
  50483. },
  50484. B: "moz",
  50485. C: ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "dC", "", "", ""],
  50486. E: "KaiOS Browser",
  50487. F: {
  50488. dC: 1527811200
  50489. }
  50490. }
  50491. };
  50492. var browsers = browsers$1.browsers;
  50493. var versions$1 = browserVersions.browserVersions;
  50494. function unpackBrowserVersions(versionsData) {
  50495. return Object.keys(versionsData).reduce(function (usage, version) {
  50496. usage[versions$1[version]] = versionsData[version];
  50497. return usage;
  50498. }, {});
  50499. }
  50500. var agents_1 = Object.keys(agents$2).reduce(function (map, key) {
  50501. var versionsData = agents$2[key];
  50502. map[browsers[key]] = Object.keys(versionsData).reduce(function (data, entry) {
  50503. if (entry === 'A') {
  50504. data.usage_global = unpackBrowserVersions(versionsData[entry]);
  50505. } else if (entry === 'C') {
  50506. data.versions = versionsData[entry].reduce(function (list, version) {
  50507. if (version === '') {
  50508. list.push(null);
  50509. } else {
  50510. list.push(versions$1[version]);
  50511. }
  50512. return list;
  50513. }, []);
  50514. } else if (entry === 'D') {
  50515. data.prefix_exceptions = unpackBrowserVersions(versionsData[entry]);
  50516. } else if (entry === 'E') {
  50517. data.browser = versionsData[entry];
  50518. } else if (entry === 'F') {
  50519. data.release_date = Object.keys(versionsData[entry]).reduce(function (map2, key2) {
  50520. map2[versions$1[key2]] = versionsData[entry][key2];
  50521. return map2;
  50522. }, {});
  50523. } else {
  50524. data.prefix = versionsData[entry];
  50525. }
  50526. return data;
  50527. }, {});
  50528. return map;
  50529. }, {});
  50530. var agents$1 = {
  50531. agents: agents_1
  50532. };
  50533. var v4 = {
  50534. start: "2015-09-08",
  50535. lts: "2015-10-12",
  50536. maintenance: "2017-04-01",
  50537. end: "2018-04-30",
  50538. codename: "Argon"
  50539. };
  50540. var v5 = {
  50541. start: "2015-10-29",
  50542. maintenance: "2016-04-30",
  50543. end: "2016-06-30"
  50544. };
  50545. var v6 = {
  50546. start: "2016-04-26",
  50547. lts: "2016-10-18",
  50548. maintenance: "2018-04-30",
  50549. end: "2019-04-30",
  50550. codename: "Boron"
  50551. };
  50552. var v7 = {
  50553. start: "2016-10-25",
  50554. maintenance: "2017-04-30",
  50555. end: "2017-06-30"
  50556. };
  50557. var v8 = {
  50558. start: "2017-05-30",
  50559. lts: "2017-10-31",
  50560. maintenance: "2019-01-01",
  50561. end: "2019-12-31",
  50562. codename: "Carbon"
  50563. };
  50564. var v9 = {
  50565. start: "2017-10-01",
  50566. maintenance: "2018-04-01",
  50567. end: "2018-06-30"
  50568. };
  50569. var v10 = {
  50570. start: "2018-04-24",
  50571. lts: "2018-10-30",
  50572. maintenance: "2020-05-19",
  50573. end: "2021-04-30",
  50574. codename: "Dubnium"
  50575. };
  50576. var v11 = {
  50577. start: "2018-10-23",
  50578. maintenance: "2019-04-22",
  50579. end: "2019-06-01"
  50580. };
  50581. var v12 = {
  50582. start: "2019-04-23",
  50583. lts: "2019-10-21",
  50584. maintenance: "2020-11-30",
  50585. end: "2022-04-30",
  50586. codename: "Erbium"
  50587. };
  50588. var v13 = {
  50589. start: "2019-10-22",
  50590. maintenance: "2020-04-01",
  50591. end: "2020-06-01"
  50592. };
  50593. var v14 = {
  50594. start: "2020-04-21",
  50595. lts: "2020-10-27",
  50596. maintenance: "2021-10-19",
  50597. end: "2023-04-30",
  50598. codename: "Fermium"
  50599. };
  50600. var v15 = {
  50601. start: "2020-10-20",
  50602. maintenance: "2021-04-01",
  50603. end: "2021-06-01"
  50604. };
  50605. var v16 = {
  50606. start: "2021-04-20",
  50607. lts: "2021-10-26",
  50608. maintenance: "2022-10-18",
  50609. end: "2024-04-30",
  50610. codename: ""
  50611. };
  50612. var jsEOL = {
  50613. "v0.8": {
  50614. start: "2012-06-25",
  50615. end: "2014-07-31"
  50616. },
  50617. "v0.10": {
  50618. start: "2013-03-11",
  50619. end: "2016-10-31"
  50620. },
  50621. "v0.12": {
  50622. start: "2015-02-06",
  50623. end: "2016-12-31"
  50624. },
  50625. v4: v4,
  50626. v5: v5,
  50627. v6: v6,
  50628. v7: v7,
  50629. v8: v8,
  50630. v9: v9,
  50631. v10: v10,
  50632. v11: v11,
  50633. v12: v12,
  50634. v13: v13,
  50635. v14: v14,
  50636. v15: v15,
  50637. v16: v16
  50638. };
  50639. var _nodeResolve_empty = {};
  50640. var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
  50641. __proto__: null,
  50642. 'default': _nodeResolve_empty
  50643. });
  50644. var versions = {
  50645. "0.20": "39",
  50646. "0.21": "41",
  50647. "0.22": "41",
  50648. "0.23": "41",
  50649. "0.24": "41",
  50650. "0.25": "42",
  50651. "0.26": "42",
  50652. "0.27": "43",
  50653. "0.28": "43",
  50654. "0.29": "43",
  50655. "0.30": "44",
  50656. "0.31": "45",
  50657. "0.32": "45",
  50658. "0.33": "45",
  50659. "0.34": "45",
  50660. "0.35": "45",
  50661. "0.36": "47",
  50662. "0.37": "49",
  50663. "1.0": "49",
  50664. "1.1": "50",
  50665. "1.2": "51",
  50666. "1.3": "52",
  50667. "1.4": "53",
  50668. "1.5": "54",
  50669. "1.6": "56",
  50670. "1.7": "58",
  50671. "1.8": "59",
  50672. "2.0": "61",
  50673. "2.1": "61",
  50674. "3.0": "66",
  50675. "3.1": "66",
  50676. "4.0": "69",
  50677. "4.1": "69",
  50678. "4.2": "69",
  50679. "5.0": "73",
  50680. "6.0": "76",
  50681. "6.1": "76",
  50682. "7.0": "78",
  50683. "7.1": "78",
  50684. "7.2": "78",
  50685. "7.3": "78",
  50686. "8.0": "80",
  50687. "8.1": "80",
  50688. "8.2": "80",
  50689. "8.3": "80",
  50690. "8.4": "80",
  50691. "8.5": "80",
  50692. "9.0": "83",
  50693. "9.1": "83",
  50694. "9.2": "83",
  50695. "9.3": "83",
  50696. "9.4": "83",
  50697. "10.0": "85",
  50698. "10.1": "85",
  50699. "10.2": "85",
  50700. "10.3": "85",
  50701. "10.4": "85",
  50702. "11.0": "87",
  50703. "11.1": "87",
  50704. "11.2": "87",
  50705. "11.3": "87",
  50706. "11.4": "87",
  50707. "12.0": "89",
  50708. "13.0": "91",
  50709. "13.1": "91",
  50710. "14.0": "92"
  50711. };
  50712. function BrowserslistError(message) {
  50713. this.name = 'BrowserslistError';
  50714. this.message = message;
  50715. this.browserslist = true;
  50716. if (Error.captureStackTrace) {
  50717. Error.captureStackTrace(this, BrowserslistError);
  50718. }
  50719. }
  50720. BrowserslistError.prototype = Error.prototype;
  50721. var error = BrowserslistError;
  50722. function noop() {}
  50723. var browser$2 = {
  50724. loadQueries: function loadQueries() {
  50725. throw new error('Sharable configs are not supported in client-side build of Browserslist');
  50726. },
  50727. getStat: function getStat(opts) {
  50728. return opts.stats;
  50729. },
  50730. loadConfig: function loadConfig(opts) {
  50731. if (opts.config) {
  50732. throw new error('Browserslist config are not supported in client-side build');
  50733. }
  50734. },
  50735. loadCountry: function loadCountry() {
  50736. throw new error('Country statistics are not supported ' + 'in client-side build of Browserslist');
  50737. },
  50738. loadFeature: function loadFeature() {
  50739. throw new error('Supports queries are not available in client-side build of Browserslist');
  50740. },
  50741. currentNode: function currentNode(resolve, context) {
  50742. return resolve(['maintained node versions'], context)[0];
  50743. },
  50744. parseConfig: noop,
  50745. readConfig: noop,
  50746. findConfig: noop,
  50747. clearCaches: noop,
  50748. oldDataWarning: noop
  50749. };
  50750. var fs$1 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
  50751. var agents = agents$1.agents;
  50752. var YEAR = 365.259641 * 24 * 60 * 60 * 1000;
  50753. var ANDROID_EVERGREEN_FIRST = 37;
  50754. var QUERY_OR = 1;
  50755. var QUERY_AND = 2;
  50756. function isVersionsMatch(versionA, versionB) {
  50757. return (versionA + '.').indexOf(versionB + '.') === 0;
  50758. }
  50759. function isEolReleased(name) {
  50760. var version = name.slice(1);
  50761. return jsReleases.some(function (i) {
  50762. return isVersionsMatch(i.version, version);
  50763. });
  50764. }
  50765. function normalize(versions) {
  50766. return versions.filter(function (version) {
  50767. return typeof version === 'string';
  50768. });
  50769. }
  50770. function normalizeElectron(version) {
  50771. var versionToUse = version;
  50772. if (version.split('.').length === 3) {
  50773. versionToUse = version.split('.').slice(0, -1).join('.');
  50774. }
  50775. return versionToUse;
  50776. }
  50777. function nameMapper(name) {
  50778. return function mapName(version) {
  50779. return name + ' ' + version;
  50780. };
  50781. }
  50782. function getMajor(version) {
  50783. return parseInt(version.split('.')[0]);
  50784. }
  50785. function getMajorVersions(released, number) {
  50786. if (released.length === 0) return [];
  50787. var majorVersions = uniq(released.map(getMajor));
  50788. var minimum = majorVersions[majorVersions.length - number];
  50789. if (!minimum) {
  50790. return released;
  50791. }
  50792. var selected = [];
  50793. for (var i = released.length - 1; i >= 0; i--) {
  50794. if (minimum > getMajor(released[i])) break;
  50795. selected.unshift(released[i]);
  50796. }
  50797. return selected;
  50798. }
  50799. function uniq(array) {
  50800. var filtered = [];
  50801. for (var i = 0; i < array.length; i++) {
  50802. if (filtered.indexOf(array[i]) === -1) filtered.push(array[i]);
  50803. }
  50804. return filtered;
  50805. }
  50806. function fillUsage(result, name, data) {
  50807. for (var i in data) {
  50808. result[name + ' ' + i] = data[i];
  50809. }
  50810. }
  50811. function generateFilter(sign, version) {
  50812. version = parseFloat(version);
  50813. if (sign === '>') {
  50814. return function (v) {
  50815. return parseFloat(v) > version;
  50816. };
  50817. } else if (sign === '>=') {
  50818. return function (v) {
  50819. return parseFloat(v) >= version;
  50820. };
  50821. } else if (sign === '<') {
  50822. return function (v) {
  50823. return parseFloat(v) < version;
  50824. };
  50825. } else {
  50826. return function (v) {
  50827. return parseFloat(v) <= version;
  50828. };
  50829. }
  50830. }
  50831. function generateSemverFilter(sign, version) {
  50832. version = version.split('.').map(parseSimpleInt);
  50833. version[1] = version[1] || 0;
  50834. version[2] = version[2] || 0;
  50835. if (sign === '>') {
  50836. return function (v) {
  50837. v = v.split('.').map(parseSimpleInt);
  50838. return compareSemver(v, version) > 0;
  50839. };
  50840. } else if (sign === '>=') {
  50841. return function (v) {
  50842. v = v.split('.').map(parseSimpleInt);
  50843. return compareSemver(v, version) >= 0;
  50844. };
  50845. } else if (sign === '<') {
  50846. return function (v) {
  50847. v = v.split('.').map(parseSimpleInt);
  50848. return compareSemver(version, v) > 0;
  50849. };
  50850. } else {
  50851. return function (v) {
  50852. v = v.split('.').map(parseSimpleInt);
  50853. return compareSemver(version, v) >= 0;
  50854. };
  50855. }
  50856. }
  50857. function parseSimpleInt(x) {
  50858. return parseInt(x);
  50859. }
  50860. function compare$5(a, b) {
  50861. if (a < b) return -1;
  50862. if (a > b) return +1;
  50863. return 0;
  50864. }
  50865. function compareSemver(a, b) {
  50866. return compare$5(parseInt(a[0]), parseInt(b[0])) || compare$5(parseInt(a[1] || '0'), parseInt(b[1] || '0')) || compare$5(parseInt(a[2] || '0'), parseInt(b[2] || '0'));
  50867. }
  50868. function semverFilterLoose(operator, range) {
  50869. range = range.split('.').map(parseSimpleInt);
  50870. if (typeof range[1] === 'undefined') {
  50871. range[1] = 'x';
  50872. }
  50873. switch (operator) {
  50874. case '<=':
  50875. return function (version) {
  50876. version = version.split('.').map(parseSimpleInt);
  50877. return compareSemverLoose(version, range) <= 0;
  50878. };
  50879. default:
  50880. case '>=':
  50881. return function (version) {
  50882. version = version.split('.').map(parseSimpleInt);
  50883. return compareSemverLoose(version, range) >= 0;
  50884. };
  50885. }
  50886. }
  50887. function compareSemverLoose(version, range) {
  50888. if (version[0] !== range[0]) {
  50889. return version[0] < range[0] ? -1 : +1;
  50890. }
  50891. if (range[1] === 'x') {
  50892. return 0;
  50893. }
  50894. if (version[1] !== range[1]) {
  50895. return version[1] < range[1] ? -1 : +1;
  50896. }
  50897. return 0;
  50898. }
  50899. function resolveVersion(data, version) {
  50900. if (data.versions.indexOf(version) !== -1) {
  50901. return version;
  50902. } else if (browserslist.versionAliases[data.name][version]) {
  50903. return browserslist.versionAliases[data.name][version];
  50904. } else {
  50905. return false;
  50906. }
  50907. }
  50908. function normalizeVersion(data, version) {
  50909. var resolved = resolveVersion(data, version);
  50910. if (resolved) {
  50911. return resolved;
  50912. } else if (data.versions.length === 1) {
  50913. return data.versions[0];
  50914. } else {
  50915. return false;
  50916. }
  50917. }
  50918. function filterByYear(since, context) {
  50919. since = since / 1000;
  50920. return Object.keys(agents).reduce(function (selected, name) {
  50921. var data = byName(name, context);
  50922. if (!data) return selected;
  50923. var versions = Object.keys(data.releaseDate).filter(function (v) {
  50924. return data.releaseDate[v] >= since;
  50925. });
  50926. return selected.concat(versions.map(nameMapper(data.name)));
  50927. }, []);
  50928. }
  50929. function cloneData(data) {
  50930. return {
  50931. name: data.name,
  50932. versions: data.versions,
  50933. released: data.released,
  50934. releaseDate: data.releaseDate
  50935. };
  50936. }
  50937. function mapVersions(data, map) {
  50938. data.versions = data.versions.map(function (i) {
  50939. return map[i] || i;
  50940. });
  50941. data.released = data.versions.map(function (i) {
  50942. return map[i] || i;
  50943. });
  50944. var fixedDate = {};
  50945. for (var i in data.releaseDate) {
  50946. fixedDate[map[i] || i] = data.releaseDate[i];
  50947. }
  50948. data.releaseDate = fixedDate;
  50949. return data;
  50950. }
  50951. function byName(name, context) {
  50952. name = name.toLowerCase();
  50953. name = browserslist.aliases[name] || name;
  50954. if (context.mobileToDesktop && browserslist.desktopNames[name]) {
  50955. var desktop = browserslist.data[browserslist.desktopNames[name]];
  50956. if (name === 'android') {
  50957. return normalizeAndroidData(cloneData(browserslist.data[name]), desktop);
  50958. } else {
  50959. var cloned = cloneData(desktop);
  50960. cloned.name = name;
  50961. if (name === 'op_mob') {
  50962. cloned = mapVersions(cloned, {
  50963. '10.0-10.1': '10'
  50964. });
  50965. }
  50966. return cloned;
  50967. }
  50968. }
  50969. return browserslist.data[name];
  50970. }
  50971. function normalizeAndroidVersions(androidVersions, chromeVersions) {
  50972. var firstEvergreen = ANDROID_EVERGREEN_FIRST;
  50973. var last = chromeVersions[chromeVersions.length - 1];
  50974. return androidVersions.filter(function (version) {
  50975. return /^(?:[2-4]\.|[34]$)/.test(version);
  50976. }).concat(chromeVersions.slice(firstEvergreen - last - 1));
  50977. }
  50978. function normalizeAndroidData(android, chrome) {
  50979. android.released = normalizeAndroidVersions(android.released, chrome.released);
  50980. android.versions = normalizeAndroidVersions(android.versions, chrome.versions);
  50981. return android;
  50982. }
  50983. function checkName(name, context) {
  50984. var data = byName(name, context);
  50985. if (!data) throw new error('Unknown browser ' + name);
  50986. return data;
  50987. }
  50988. function unknownQuery(query) {
  50989. return new error('Unknown browser query `' + query + '`. ' + 'Maybe you are using old Browserslist or made typo in query.');
  50990. }
  50991. function filterAndroid(list, versions, context) {
  50992. if (context.mobileToDesktop) return list;
  50993. var released = browserslist.data.android.released;
  50994. var last = released[released.length - 1];
  50995. var diff = last - ANDROID_EVERGREEN_FIRST - versions;
  50996. if (diff > 0) {
  50997. return list.slice(-1);
  50998. } else {
  50999. return list.slice(diff - 1);
  51000. }
  51001. }
  51002. function resolve$2(queries, context) {
  51003. if (Array.isArray(queries)) {
  51004. queries = flatten$1(queries.map(parse$6));
  51005. } else {
  51006. queries = parse$6(queries);
  51007. }
  51008. return queries.reduce(function (result, query, index) {
  51009. var selection = query.queryString;
  51010. var isExclude = selection.indexOf('not ') === 0;
  51011. if (isExclude) {
  51012. if (index === 0) {
  51013. throw new error('Write any browsers query (for instance, `defaults`) ' + 'before `' + selection + '`');
  51014. }
  51015. selection = selection.slice(4);
  51016. }
  51017. for (var i = 0; i < QUERIES.length; i++) {
  51018. var type = QUERIES[i];
  51019. var match = selection.match(type.regexp);
  51020. if (match) {
  51021. var args = [context].concat(match.slice(1));
  51022. var array = type.select.apply(browserslist, args).map(function (j) {
  51023. var parts = j.split(' ');
  51024. if (parts[1] === '0') {
  51025. return parts[0] + ' ' + byName(parts[0], context).versions[0];
  51026. } else {
  51027. return j;
  51028. }
  51029. });
  51030. switch (query.type) {
  51031. case QUERY_AND:
  51032. if (isExclude) {
  51033. return result.filter(function (j) {
  51034. return array.indexOf(j) === -1;
  51035. });
  51036. } else {
  51037. return result.filter(function (j) {
  51038. return array.indexOf(j) !== -1;
  51039. });
  51040. }
  51041. case QUERY_OR:
  51042. default:
  51043. if (isExclude) {
  51044. var filter = {};
  51045. array.forEach(function (j) {
  51046. filter[j] = true;
  51047. });
  51048. return result.filter(function (j) {
  51049. return !filter[j];
  51050. });
  51051. }
  51052. return result.concat(array);
  51053. }
  51054. }
  51055. }
  51056. throw unknownQuery(selection);
  51057. }, []);
  51058. }
  51059. var cache$2 = {};
  51060. function browserslist(queries, opts) {
  51061. if (typeof opts === 'undefined') opts = {};
  51062. if (typeof opts.path === 'undefined') {
  51063. opts.path = fs$1.resolve ? fs$1.resolve('.') : '.';
  51064. }
  51065. if (typeof queries === 'undefined' || queries === null) {
  51066. var config = browserslist.loadConfig(opts);
  51067. if (config) {
  51068. queries = config;
  51069. } else {
  51070. queries = browserslist.defaults;
  51071. }
  51072. }
  51073. if (!(typeof queries === 'string' || Array.isArray(queries))) {
  51074. throw new error('Browser queries must be an array or string. Got ' + typeof queries + '.');
  51075. }
  51076. var context = {
  51077. ignoreUnknownVersions: opts.ignoreUnknownVersions,
  51078. dangerousExtend: opts.dangerousExtend,
  51079. mobileToDesktop: opts.mobileToDesktop,
  51080. path: opts.path,
  51081. env: opts.env
  51082. };
  51083. browser$2.oldDataWarning(browserslist.data);
  51084. var stats = browser$2.getStat(opts, browserslist.data);
  51085. if (stats) {
  51086. context.customUsage = {};
  51087. for (var browser in stats) {
  51088. fillUsage(context.customUsage, browser, stats[browser]);
  51089. }
  51090. }
  51091. var cacheKey = JSON.stringify([queries, context]);
  51092. if (cache$2[cacheKey]) return cache$2[cacheKey];
  51093. var result = uniq(resolve$2(queries, context)).sort(function (name1, name2) {
  51094. name1 = name1.split(' ');
  51095. name2 = name2.split(' ');
  51096. if (name1[0] === name2[0]) {
  51097. var version1 = name1[1].split('-')[0];
  51098. var version2 = name2[1].split('-')[0];
  51099. return compareSemver(version2.split('.'), version1.split('.'));
  51100. } else {
  51101. return compare$5(name1[0], name2[0]);
  51102. }
  51103. });
  51104. if (!browser$6.env.BROWSERSLIST_DISABLE_CACHE) {
  51105. cache$2[cacheKey] = result;
  51106. }
  51107. return result;
  51108. }
  51109. function parse$6(queries) {
  51110. var qs = [];
  51111. do {
  51112. queries = doMatch(queries, qs);
  51113. } while (queries);
  51114. return qs;
  51115. }
  51116. function doMatch(string, qs) {
  51117. var or = /^(?:,\s*|\s+or\s+)(.*)/i;
  51118. var and = /^\s+and\s+(.*)/i;
  51119. return find(string, function (parsed, n, max) {
  51120. if (and.test(parsed)) {
  51121. qs.unshift({
  51122. type: QUERY_AND,
  51123. queryString: parsed.match(and)[1]
  51124. });
  51125. return true;
  51126. } else if (or.test(parsed)) {
  51127. qs.unshift({
  51128. type: QUERY_OR,
  51129. queryString: parsed.match(or)[1]
  51130. });
  51131. return true;
  51132. } else if (n === max) {
  51133. qs.unshift({
  51134. type: QUERY_OR,
  51135. queryString: parsed.trim()
  51136. });
  51137. return true;
  51138. }
  51139. return false;
  51140. });
  51141. }
  51142. function find(string, predicate) {
  51143. for (var n = 1, max = string.length; n <= max; n++) {
  51144. var parsed = string.substr(-n, n);
  51145. if (predicate(parsed, n, max)) {
  51146. return string.slice(0, -n);
  51147. }
  51148. }
  51149. return '';
  51150. }
  51151. function flatten$1(array) {
  51152. if (!Array.isArray(array)) return [array];
  51153. return array.reduce(function (a, b) {
  51154. return a.concat(flatten$1(b));
  51155. }, []);
  51156. }
  51157. browserslist.cache = {};
  51158. browserslist.data = {};
  51159. browserslist.usage = {
  51160. global: {},
  51161. custom: null
  51162. };
  51163. browserslist.defaults = ['> 0.5%', 'last 2 versions', 'Firefox ESR', 'not dead'];
  51164. browserslist.aliases = {
  51165. fx: 'firefox',
  51166. ff: 'firefox',
  51167. ios: 'ios_saf',
  51168. explorer: 'ie',
  51169. blackberry: 'bb',
  51170. explorermobile: 'ie_mob',
  51171. operamini: 'op_mini',
  51172. operamobile: 'op_mob',
  51173. chromeandroid: 'and_chr',
  51174. firefoxandroid: 'and_ff',
  51175. ucandroid: 'and_uc',
  51176. qqandroid: 'and_qq'
  51177. };
  51178. browserslist.desktopNames = {
  51179. and_chr: 'chrome',
  51180. and_ff: 'firefox',
  51181. ie_mob: 'ie',
  51182. op_mob: 'opera',
  51183. android: 'chrome'
  51184. };
  51185. browserslist.versionAliases = {};
  51186. browserslist.clearCaches = browser$2.clearCaches;
  51187. browserslist.parseConfig = browser$2.parseConfig;
  51188. browserslist.readConfig = browser$2.readConfig;
  51189. browserslist.findConfig = browser$2.findConfig;
  51190. browserslist.loadConfig = browser$2.loadConfig;
  51191. browserslist.coverage = function (browsers, stats) {
  51192. var data;
  51193. if (typeof stats === 'undefined') {
  51194. data = browserslist.usage.global;
  51195. } else if (stats === 'my stats') {
  51196. var opts = {};
  51197. opts.path = fs$1.resolve ? fs$1.resolve('.') : '.';
  51198. var customStats = browser$2.getStat(opts);
  51199. if (!customStats) {
  51200. throw new error('Custom usage statistics was not provided');
  51201. }
  51202. data = {};
  51203. for (var browser in customStats) {
  51204. fillUsage(data, browser, customStats[browser]);
  51205. }
  51206. } else if (typeof stats === 'string') {
  51207. if (stats.length > 2) {
  51208. stats = stats.toLowerCase();
  51209. } else {
  51210. stats = stats.toUpperCase();
  51211. }
  51212. browser$2.loadCountry(browserslist.usage, stats, browserslist.data);
  51213. data = browserslist.usage[stats];
  51214. } else {
  51215. if ('dataByBrowser' in stats) {
  51216. stats = stats.dataByBrowser;
  51217. }
  51218. data = {};
  51219. for (var name in stats) {
  51220. for (var version in stats[name]) {
  51221. data[name + ' ' + version] = stats[name][version];
  51222. }
  51223. }
  51224. }
  51225. return browsers.reduce(function (all, i) {
  51226. var usage = data[i];
  51227. if (usage === undefined) {
  51228. usage = data[i.replace(/ \S+$/, ' 0')];
  51229. }
  51230. return all + (usage || 0);
  51231. }, 0);
  51232. };
  51233. function nodeQuery(context, version) {
  51234. var nodeReleases = jsReleases.filter(function (i) {
  51235. return i.name === 'nodejs';
  51236. });
  51237. var matched = nodeReleases.filter(function (i) {
  51238. return isVersionsMatch(i.version, version);
  51239. });
  51240. if (matched.length === 0) {
  51241. if (context.ignoreUnknownVersions) {
  51242. return [];
  51243. } else {
  51244. throw new error('Unknown version ' + version + ' of Node.js');
  51245. }
  51246. }
  51247. return ['node ' + matched[matched.length - 1].version];
  51248. }
  51249. function sinceQuery(context, year, month, date) {
  51250. year = parseInt(year);
  51251. month = parseInt(month || '01') - 1;
  51252. date = parseInt(date || '01');
  51253. return filterByYear(Date.UTC(year, month, date, 0, 0, 0), context);
  51254. }
  51255. function coverQuery(context, coverage, statMode) {
  51256. coverage = parseFloat(coverage);
  51257. var usage = browserslist.usage.global;
  51258. if (statMode) {
  51259. if (statMode.match(/^my\s+stats$/)) {
  51260. if (!context.customUsage) {
  51261. throw new error('Custom usage statistics was not provided');
  51262. }
  51263. usage = context.customUsage;
  51264. } else {
  51265. var place;
  51266. if (statMode.length === 2) {
  51267. place = statMode.toUpperCase();
  51268. } else {
  51269. place = statMode.toLowerCase();
  51270. }
  51271. browser$2.loadCountry(browserslist.usage, place, browserslist.data);
  51272. usage = browserslist.usage[place];
  51273. }
  51274. }
  51275. var versions = Object.keys(usage).sort(function (a, b) {
  51276. return usage[b] - usage[a];
  51277. });
  51278. var coveraged = 0;
  51279. var result = [];
  51280. var version;
  51281. for (var i = 0; i <= versions.length; i++) {
  51282. version = versions[i];
  51283. if (usage[version] === 0) break;
  51284. coveraged += usage[version];
  51285. result.push(version);
  51286. if (coveraged >= coverage) break;
  51287. }
  51288. return result;
  51289. }
  51290. var QUERIES = [{
  51291. regexp: /^last\s+(\d+)\s+major\s+versions?$/i,
  51292. select: function select(context, versions) {
  51293. return Object.keys(agents).reduce(function (selected, name) {
  51294. var data = byName(name, context);
  51295. if (!data) return selected;
  51296. var list = getMajorVersions(data.released, versions);
  51297. list = list.map(nameMapper(data.name));
  51298. if (data.name === 'android') {
  51299. list = filterAndroid(list, versions, context);
  51300. }
  51301. return selected.concat(list);
  51302. }, []);
  51303. }
  51304. }, {
  51305. regexp: /^last\s+(\d+)\s+versions?$/i,
  51306. select: function select(context, versions) {
  51307. return Object.keys(agents).reduce(function (selected, name) {
  51308. var data = byName(name, context);
  51309. if (!data) return selected;
  51310. var list = data.released.slice(-versions);
  51311. list = list.map(nameMapper(data.name));
  51312. if (data.name === 'android') {
  51313. list = filterAndroid(list, versions, context);
  51314. }
  51315. return selected.concat(list);
  51316. }, []);
  51317. }
  51318. }, {
  51319. regexp: /^last\s+(\d+)\s+electron\s+major\s+versions?$/i,
  51320. select: function select(context, versions$1) {
  51321. var validVersions = getMajorVersions(Object.keys(versions), versions$1);
  51322. return validVersions.map(function (i) {
  51323. return 'chrome ' + versions[i];
  51324. });
  51325. }
  51326. }, {
  51327. regexp: /^last\s+(\d+)\s+(\w+)\s+major\s+versions?$/i,
  51328. select: function select(context, versions, name) {
  51329. var data = checkName(name, context);
  51330. var validVersions = getMajorVersions(data.released, versions);
  51331. var list = validVersions.map(nameMapper(data.name));
  51332. if (data.name === 'android') {
  51333. list = filterAndroid(list, versions, context);
  51334. }
  51335. return list;
  51336. }
  51337. }, {
  51338. regexp: /^last\s+(\d+)\s+electron\s+versions?$/i,
  51339. select: function select(context, versions$1) {
  51340. return Object.keys(versions).slice(-versions$1).map(function (i) {
  51341. return 'chrome ' + versions[i];
  51342. });
  51343. }
  51344. }, {
  51345. regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i,
  51346. select: function select(context, versions, name) {
  51347. var data = checkName(name, context);
  51348. var list = data.released.slice(-versions).map(nameMapper(data.name));
  51349. if (data.name === 'android') {
  51350. list = filterAndroid(list, versions, context);
  51351. }
  51352. return list;
  51353. }
  51354. }, {
  51355. regexp: /^unreleased\s+versions$/i,
  51356. select: function select(context) {
  51357. return Object.keys(agents).reduce(function (selected, name) {
  51358. var data = byName(name, context);
  51359. if (!data) return selected;
  51360. var list = data.versions.filter(function (v) {
  51361. return data.released.indexOf(v) === -1;
  51362. });
  51363. list = list.map(nameMapper(data.name));
  51364. return selected.concat(list);
  51365. }, []);
  51366. }
  51367. }, {
  51368. regexp: /^unreleased\s+electron\s+versions?$/i,
  51369. select: function select() {
  51370. return [];
  51371. }
  51372. }, {
  51373. regexp: /^unreleased\s+(\w+)\s+versions?$/i,
  51374. select: function select(context, name) {
  51375. var data = checkName(name, context);
  51376. return data.versions.filter(function (v) {
  51377. return data.released.indexOf(v) === -1;
  51378. }).map(nameMapper(data.name));
  51379. }
  51380. }, {
  51381. regexp: /^last\s+(\d*.?\d+)\s+years?$/i,
  51382. select: function select(context, years) {
  51383. return filterByYear(Date.now() - YEAR * years, context);
  51384. }
  51385. }, {
  51386. regexp: /^since (\d+)$/i,
  51387. select: sinceQuery
  51388. }, {
  51389. regexp: /^since (\d+)-(\d+)$/i,
  51390. select: sinceQuery
  51391. }, {
  51392. regexp: /^since (\d+)-(\d+)-(\d+)$/i,
  51393. select: sinceQuery
  51394. }, {
  51395. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,
  51396. select: function select(context, sign, popularity) {
  51397. popularity = parseFloat(popularity);
  51398. var usage = browserslist.usage.global;
  51399. return Object.keys(usage).reduce(function (result, version) {
  51400. if (sign === '>') {
  51401. if (usage[version] > popularity) {
  51402. result.push(version);
  51403. }
  51404. } else if (sign === '<') {
  51405. if (usage[version] < popularity) {
  51406. result.push(version);
  51407. }
  51408. } else if (sign === '<=') {
  51409. if (usage[version] <= popularity) {
  51410. result.push(version);
  51411. }
  51412. } else if (usage[version] >= popularity) {
  51413. result.push(version);
  51414. }
  51415. return result;
  51416. }, []);
  51417. }
  51418. }, {
  51419. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,
  51420. select: function select(context, sign, popularity) {
  51421. popularity = parseFloat(popularity);
  51422. if (!context.customUsage) {
  51423. throw new error('Custom usage statistics was not provided');
  51424. }
  51425. var usage = context.customUsage;
  51426. return Object.keys(usage).reduce(function (result, version) {
  51427. if (sign === '>') {
  51428. if (usage[version] > popularity) {
  51429. result.push(version);
  51430. }
  51431. } else if (sign === '<') {
  51432. if (usage[version] < popularity) {
  51433. result.push(version);
  51434. }
  51435. } else if (sign === '<=') {
  51436. if (usage[version] <= popularity) {
  51437. result.push(version);
  51438. }
  51439. } else if (usage[version] >= popularity) {
  51440. result.push(version);
  51441. }
  51442. return result;
  51443. }, []);
  51444. }
  51445. }, {
  51446. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,
  51447. select: function select(context, sign, popularity, name) {
  51448. popularity = parseFloat(popularity);
  51449. var stats = browser$2.loadStat(context, name, browserslist.data);
  51450. if (stats) {
  51451. context.customUsage = {};
  51452. for (var browser in stats) {
  51453. fillUsage(context.customUsage, browser, stats[browser]);
  51454. }
  51455. }
  51456. if (!context.customUsage) {
  51457. throw new error('Custom usage statistics was not provided');
  51458. }
  51459. var usage = context.customUsage;
  51460. return Object.keys(usage).reduce(function (result, version) {
  51461. if (sign === '>') {
  51462. if (usage[version] > popularity) {
  51463. result.push(version);
  51464. }
  51465. } else if (sign === '<') {
  51466. if (usage[version] < popularity) {
  51467. result.push(version);
  51468. }
  51469. } else if (sign === '<=') {
  51470. if (usage[version] <= popularity) {
  51471. result.push(version);
  51472. }
  51473. } else if (usage[version] >= popularity) {
  51474. result.push(version);
  51475. }
  51476. return result;
  51477. }, []);
  51478. }
  51479. }, {
  51480. regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,
  51481. select: function select(context, sign, popularity, place) {
  51482. popularity = parseFloat(popularity);
  51483. if (place.length === 2) {
  51484. place = place.toUpperCase();
  51485. } else {
  51486. place = place.toLowerCase();
  51487. }
  51488. browser$2.loadCountry(browserslist.usage, place, browserslist.data);
  51489. var usage = browserslist.usage[place];
  51490. return Object.keys(usage).reduce(function (result, version) {
  51491. if (sign === '>') {
  51492. if (usage[version] > popularity) {
  51493. result.push(version);
  51494. }
  51495. } else if (sign === '<') {
  51496. if (usage[version] < popularity) {
  51497. result.push(version);
  51498. }
  51499. } else if (sign === '<=') {
  51500. if (usage[version] <= popularity) {
  51501. result.push(version);
  51502. }
  51503. } else if (usage[version] >= popularity) {
  51504. result.push(version);
  51505. }
  51506. return result;
  51507. }, []);
  51508. }
  51509. }, {
  51510. regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/,
  51511. select: coverQuery
  51512. }, {
  51513. regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/,
  51514. select: coverQuery
  51515. }, {
  51516. regexp: /^supports\s+([\w-]+)$/,
  51517. select: function select(context, feature) {
  51518. browser$2.loadFeature(browserslist.cache, feature);
  51519. var features = browserslist.cache[feature];
  51520. return Object.keys(features).reduce(function (result, version) {
  51521. var flags = features[version];
  51522. if (flags.indexOf('y') >= 0 || flags.indexOf('a') >= 0) {
  51523. result.push(version);
  51524. }
  51525. return result;
  51526. }, []);
  51527. }
  51528. }, {
  51529. regexp: /^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  51530. select: function select(context, from, to) {
  51531. var fromToUse = normalizeElectron(from);
  51532. var toToUse = normalizeElectron(to);
  51533. if (!versions[fromToUse]) {
  51534. throw new error('Unknown version ' + from + ' of electron');
  51535. }
  51536. if (!versions[toToUse]) {
  51537. throw new error('Unknown version ' + to + ' of electron');
  51538. }
  51539. from = parseFloat(from);
  51540. to = parseFloat(to);
  51541. return Object.keys(versions).filter(function (i) {
  51542. var parsed = parseFloat(i);
  51543. return parsed >= from && parsed <= to;
  51544. }).map(function (i) {
  51545. return 'chrome ' + versions[i];
  51546. });
  51547. }
  51548. }, {
  51549. regexp: /^node\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  51550. select: function select(context, from, to) {
  51551. var nodeVersions = jsReleases.filter(function (i) {
  51552. return i.name === 'nodejs';
  51553. }).map(function (i) {
  51554. return i.version;
  51555. });
  51556. return nodeVersions.filter(semverFilterLoose('>=', from)).filter(semverFilterLoose('<=', to)).map(function (v) {
  51557. return 'node ' + v;
  51558. });
  51559. }
  51560. }, {
  51561. regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i,
  51562. select: function select(context, name, from, to) {
  51563. var data = checkName(name, context);
  51564. from = parseFloat(normalizeVersion(data, from) || from);
  51565. to = parseFloat(normalizeVersion(data, to) || to);
  51566. function filter(v) {
  51567. var parsed = parseFloat(v);
  51568. return parsed >= from && parsed <= to;
  51569. }
  51570. return data.released.filter(filter).map(nameMapper(data.name));
  51571. }
  51572. }, {
  51573. regexp: /^electron\s*(>=?|<=?)\s*([\d.]+)$/i,
  51574. select: function select(context, sign, version) {
  51575. var versionToUse = normalizeElectron(version);
  51576. return Object.keys(versions).filter(generateFilter(sign, versionToUse)).map(function (i) {
  51577. return 'chrome ' + versions[i];
  51578. });
  51579. }
  51580. }, {
  51581. regexp: /^node\s*(>=?|<=?)\s*([\d.]+)$/i,
  51582. select: function select(context, sign, version) {
  51583. var nodeVersions = jsReleases.filter(function (i) {
  51584. return i.name === 'nodejs';
  51585. }).map(function (i) {
  51586. return i.version;
  51587. });
  51588. return nodeVersions.filter(generateSemverFilter(sign, version)).map(function (v) {
  51589. return 'node ' + v;
  51590. });
  51591. }
  51592. }, {
  51593. regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/,
  51594. select: function select(context, name, sign, version) {
  51595. var data = checkName(name, context);
  51596. var alias = browserslist.versionAliases[data.name][version];
  51597. if (alias) {
  51598. version = alias;
  51599. }
  51600. return data.released.filter(generateFilter(sign, version)).map(function (v) {
  51601. return data.name + ' ' + v;
  51602. });
  51603. }
  51604. }, {
  51605. regexp: /^(firefox|ff|fx)\s+esr$/i,
  51606. select: function select() {
  51607. return ['firefox 78'];
  51608. }
  51609. }, {
  51610. regexp: /(operamini|op_mini)\s+all/i,
  51611. select: function select() {
  51612. return ['op_mini all'];
  51613. }
  51614. }, {
  51615. regexp: /^electron\s+([\d.]+)$/i,
  51616. select: function select(context, version) {
  51617. var versionToUse = normalizeElectron(version);
  51618. var chrome = versions[versionToUse];
  51619. if (!chrome) {
  51620. throw new error('Unknown version ' + version + ' of electron');
  51621. }
  51622. return ['chrome ' + chrome];
  51623. }
  51624. }, {
  51625. regexp: /^node\s+(\d+)$/i,
  51626. select: nodeQuery
  51627. }, {
  51628. regexp: /^node\s+(\d+\.\d+)$/i,
  51629. select: nodeQuery
  51630. }, {
  51631. regexp: /^node\s+(\d+\.\d+\.\d+)$/i,
  51632. select: nodeQuery
  51633. }, {
  51634. regexp: /^current\s+node$/i,
  51635. select: function select(context) {
  51636. return [browser$2.currentNode(resolve$2, context)];
  51637. }
  51638. }, {
  51639. regexp: /^maintained\s+node\s+versions$/i,
  51640. select: function select(context) {
  51641. var now = Date.now();
  51642. var queries = Object.keys(jsEOL).filter(function (key) {
  51643. return now < Date.parse(jsEOL[key].end) && now > Date.parse(jsEOL[key].start) && isEolReleased(key);
  51644. }).map(function (key) {
  51645. return 'node ' + key.slice(1);
  51646. });
  51647. return resolve$2(queries, context);
  51648. }
  51649. }, {
  51650. regexp: /^phantomjs\s+1.9$/i,
  51651. select: function select() {
  51652. return ['safari 5'];
  51653. }
  51654. }, {
  51655. regexp: /^phantomjs\s+2.1$/i,
  51656. select: function select() {
  51657. return ['safari 6'];
  51658. }
  51659. }, {
  51660. regexp: /^(\w+)\s+(tp|[\d.]+)$/i,
  51661. select: function select(context, name, version) {
  51662. if (/^tp$/i.test(version)) version = 'TP';
  51663. var data = checkName(name, context);
  51664. var alias = normalizeVersion(data, version);
  51665. if (alias) {
  51666. version = alias;
  51667. } else {
  51668. if (version.indexOf('.') === -1) {
  51669. alias = version + '.0';
  51670. } else {
  51671. alias = version.replace(/\.0$/, '');
  51672. }
  51673. alias = normalizeVersion(data, alias);
  51674. if (alias) {
  51675. version = alias;
  51676. } else if (context.ignoreUnknownVersions) {
  51677. return [];
  51678. } else {
  51679. throw new error('Unknown version ' + version + ' of ' + name);
  51680. }
  51681. }
  51682. return [data.name + ' ' + version];
  51683. }
  51684. }, {
  51685. regexp: /^browserslist config$/i,
  51686. select: function select(context) {
  51687. return browserslist(undefined, context);
  51688. }
  51689. }, {
  51690. regexp: /^extends (.+)$/i,
  51691. select: function select(context, name) {
  51692. return resolve$2(browser$2.loadQueries(context, name), context);
  51693. }
  51694. }, {
  51695. regexp: /^defaults$/i,
  51696. select: function select(context) {
  51697. return resolve$2(browserslist.defaults, context);
  51698. }
  51699. }, {
  51700. regexp: /^dead$/i,
  51701. select: function select(context) {
  51702. var dead = ['ie <= 10', 'ie_mob <= 11', 'bb <= 10', 'op_mob <= 12.1', 'samsung 4'];
  51703. return resolve$2(dead, context);
  51704. }
  51705. }, {
  51706. regexp: /^(\w+)$/i,
  51707. select: function select(context, name) {
  51708. if (byName(name, context)) {
  51709. throw new error('Specify versions in Browserslist query for browser ' + name);
  51710. } else {
  51711. throw unknownQuery(name);
  51712. }
  51713. }
  51714. }];
  51715. (function () {
  51716. for (var name in agents) {
  51717. var browser = agents[name];
  51718. browserslist.data[name] = {
  51719. name: name,
  51720. versions: normalize(agents[name].versions),
  51721. released: normalize(agents[name].versions.slice(0, -3)),
  51722. releaseDate: agents[name].release_date
  51723. };
  51724. fillUsage(browserslist.usage.global, name, browser.usage_global);
  51725. browserslist.versionAliases[name] = {};
  51726. for (var i = 0; i < browser.versions.length; i++) {
  51727. var full = browser.versions[i];
  51728. if (!full) continue;
  51729. if (full.indexOf('-') !== -1) {
  51730. var interval = full.split('-');
  51731. for (var j = 0; j < interval.length; j++) {
  51732. browserslist.versionAliases[name][interval[j]] = full;
  51733. }
  51734. }
  51735. }
  51736. }
  51737. browserslist.versionAliases.op_mob['59'] = '58';
  51738. })();
  51739. var browserslist_1 = browserslist;
  51740. var min = Math.min;
  51741. function levenshtein(a, b) {
  51742. var t = [],
  51743. u = [],
  51744. i,
  51745. j;
  51746. var m = a.length,
  51747. n = b.length;
  51748. if (!m) {
  51749. return n;
  51750. }
  51751. if (!n) {
  51752. return m;
  51753. }
  51754. for (j = 0; j <= n; j++) {
  51755. t[j] = j;
  51756. }
  51757. for (i = 1; i <= m; i++) {
  51758. for (u = [i], j = 1; j <= n; j++) {
  51759. u[j] = a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;
  51760. }
  51761. t = u;
  51762. }
  51763. return u[n];
  51764. }
  51765. function findSuggestion(str, arr) {
  51766. var distances = arr.map(function (el) {
  51767. return levenshtein(el, str);
  51768. });
  51769. return arr[distances.indexOf(min.apply(void 0, _toConsumableArray(distances)))];
  51770. }
  51771. var OptionValidator = function () {
  51772. function OptionValidator(descriptor) {
  51773. this.descriptor = descriptor;
  51774. }
  51775. var _proto = OptionValidator.prototype;
  51776. _proto.validateTopLevelOptions = function validateTopLevelOptions(options, TopLevelOptionShape) {
  51777. var validOptionNames = Object.keys(TopLevelOptionShape);
  51778. for (var _i = 0, _Object$keys = Object.keys(options); _i < _Object$keys.length; _i++) {
  51779. var option = _Object$keys[_i];
  51780. if (!validOptionNames.includes(option)) {
  51781. throw new Error(this.formatMessage("'" + option + "' is not a valid top-level option.\n- Did you mean '" + findSuggestion(option, validOptionNames) + "'?"));
  51782. }
  51783. }
  51784. };
  51785. _proto.validateBooleanOption = function validateBooleanOption(name, value, defaultValue) {
  51786. if (value === undefined) {
  51787. return defaultValue;
  51788. } else {
  51789. this.invariant(typeof value === "boolean", "'" + name + "' option must be a boolean.");
  51790. }
  51791. return value;
  51792. };
  51793. _proto.validateStringOption = function validateStringOption(name, value, defaultValue) {
  51794. if (value === undefined) {
  51795. return defaultValue;
  51796. } else {
  51797. this.invariant(typeof value === "string", "'" + name + "' option must be a string.");
  51798. }
  51799. return value;
  51800. };
  51801. _proto.invariant = function invariant(condition, message) {
  51802. if (!condition) {
  51803. throw new Error(this.formatMessage(message));
  51804. }
  51805. };
  51806. _proto.formatMessage = function formatMessage(message) {
  51807. return this.descriptor + ": " + message;
  51808. };
  51809. return OptionValidator;
  51810. }();
  51811. var require$$0$7 = {
  51812. "es6.module": {
  51813. chrome: "61",
  51814. and_chr: "61",
  51815. edge: "16",
  51816. firefox: "60",
  51817. and_ff: "60",
  51818. node: "13.2.0",
  51819. opera: "48",
  51820. op_mob: "48",
  51821. safari: "10.1",
  51822. ios: "10.3",
  51823. samsung: "8.2",
  51824. android: "61",
  51825. electron: "2.0",
  51826. ios_saf: "10.3"
  51827. }
  51828. };
  51829. var nativeModules = require$$0$7;
  51830. var SEMVER_SPEC_VERSION$2 = '2.0.0';
  51831. var MAX_LENGTH$8 = 256;
  51832. var MAX_SAFE_INTEGER$5 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  51833. var MAX_SAFE_COMPONENT_LENGTH$2 = 16;
  51834. var constants$2 = {
  51835. SEMVER_SPEC_VERSION: SEMVER_SPEC_VERSION$2,
  51836. MAX_LENGTH: MAX_LENGTH$8,
  51837. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$5,
  51838. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$2
  51839. };
  51840. var debug$4 = typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG) ? function () {
  51841. var _console;
  51842. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  51843. args[_key] = arguments[_key];
  51844. }
  51845. return (_console = console).error.apply(_console, ['SEMVER'].concat(args));
  51846. } : function () {};
  51847. var debug_1$2 = debug$4;
  51848. var re_1$2 = createCommonjsModule(function (module, exports) {
  51849. var MAX_SAFE_COMPONENT_LENGTH = constants$2.MAX_SAFE_COMPONENT_LENGTH;
  51850. exports = module.exports = {};
  51851. var re = exports.re = [];
  51852. var src = exports.src = [];
  51853. var t = exports.t = {};
  51854. var R = 0;
  51855. var createToken = function createToken(name, value, isGlobal) {
  51856. var index = R++;
  51857. debug_1$2(index, value);
  51858. t[name] = index;
  51859. src[index] = value;
  51860. re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
  51861. };
  51862. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
  51863. createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
  51864. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
  51865. createToken('MAINVERSION', "(" + src[t.NUMERICIDENTIFIER] + ")\\." + ("(" + src[t.NUMERICIDENTIFIER] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIER] + ")"));
  51866. createToken('MAINVERSIONLOOSE', "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\." + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"));
  51867. createToken('PRERELEASEIDENTIFIER', "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  51868. createToken('PRERELEASEIDENTIFIERLOOSE', "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  51869. createToken('PRERELEASE', "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))");
  51870. createToken('PRERELEASELOOSE', "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))");
  51871. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
  51872. createToken('BUILD', "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))");
  51873. createToken('FULLPLAIN', "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?");
  51874. createToken('FULL', "^" + src[t.FULLPLAIN] + "$");
  51875. createToken('LOOSEPLAIN', "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?");
  51876. createToken('LOOSE', "^" + src[t.LOOSEPLAIN] + "$");
  51877. createToken('GTLT', '((?:<|>)?=?)');
  51878. createToken('XRANGEIDENTIFIERLOOSE', src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*");
  51879. createToken('XRANGEIDENTIFIER', src[t.NUMERICIDENTIFIER] + "|x|X|\\*");
  51880. createToken('XRANGEPLAIN', "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  51881. createToken('XRANGEPLAINLOOSE', "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  51882. createToken('XRANGE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$");
  51883. createToken('XRANGELOOSE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$");
  51884. createToken('COERCE', "" + ('(^|[^\\d])' + '(\\d{1,') + MAX_SAFE_COMPONENT_LENGTH + "})" + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + "(?:$|[^\\d])");
  51885. createToken('COERCERTL', src[t.COERCE], true);
  51886. createToken('LONETILDE', '(?:~>?)');
  51887. createToken('TILDETRIM', "(\\s*)" + src[t.LONETILDE] + "\\s+", true);
  51888. exports.tildeTrimReplace = '$1~';
  51889. createToken('TILDE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$");
  51890. createToken('TILDELOOSE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$");
  51891. createToken('LONECARET', '(?:\\^)');
  51892. createToken('CARETTRIM', "(\\s*)" + src[t.LONECARET] + "\\s+", true);
  51893. exports.caretTrimReplace = '$1^';
  51894. createToken('CARET', "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$");
  51895. createToken('CARETLOOSE', "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$");
  51896. createToken('COMPARATORLOOSE', "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$");
  51897. createToken('COMPARATOR', "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$");
  51898. createToken('COMPARATORTRIM', "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")", true);
  51899. exports.comparatorTrimReplace = '$1$2$3';
  51900. createToken('HYPHENRANGE', "^\\s*(" + src[t.XRANGEPLAIN] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAIN] + ")") + "\\s*$");
  51901. createToken('HYPHENRANGELOOSE', "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAINLOOSE] + ")") + "\\s*$");
  51902. createToken('STAR', '(<|>)?=?\\s*\\*');
  51903. createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$');
  51904. createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$');
  51905. }, "/$$rollup_base$$/packages/babel-helper-compilation-targets/node_modules/semver/node_modules/semver-BABEL_8_BREAKING-true/internal");
  51906. var opts$1 = ['includePrerelease', 'loose', 'rtl'];
  51907. var parseOptions$1 = function parseOptions(options) {
  51908. return !options ? {} : typeof options !== 'object' ? {
  51909. loose: true
  51910. } : opts$1.filter(function (k) {
  51911. return options[k];
  51912. }).reduce(function (options, k) {
  51913. options[k] = true;
  51914. return options;
  51915. }, {});
  51916. };
  51917. var parseOptions_1$1 = parseOptions$1;
  51918. var numeric$2 = /^[0-9]+$/;
  51919. var compareIdentifiers$5 = function compareIdentifiers(a, b) {
  51920. var anum = numeric$2.test(a);
  51921. var bnum = numeric$2.test(b);
  51922. if (anum && bnum) {
  51923. a = +a;
  51924. b = +b;
  51925. }
  51926. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  51927. };
  51928. var rcompareIdentifiers$2 = function rcompareIdentifiers(a, b) {
  51929. return compareIdentifiers$5(b, a);
  51930. };
  51931. var identifiers$2 = {
  51932. compareIdentifiers: compareIdentifiers$5,
  51933. rcompareIdentifiers: rcompareIdentifiers$2
  51934. };
  51935. var MAX_LENGTH$7 = constants$2.MAX_LENGTH,
  51936. MAX_SAFE_INTEGER$4 = constants$2.MAX_SAFE_INTEGER;
  51937. var re$c = re_1$2.re,
  51938. t$j = re_1$2.t;
  51939. var compareIdentifiers$4 = identifiers$2.compareIdentifiers;
  51940. var SemVer$2 = function () {
  51941. function SemVer(version, options) {
  51942. options = parseOptions_1$1(options);
  51943. if (version instanceof SemVer) {
  51944. if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
  51945. return version;
  51946. } else {
  51947. version = version.version;
  51948. }
  51949. } else if (typeof version !== 'string') {
  51950. throw new TypeError("Invalid Version: " + version);
  51951. }
  51952. if (version.length > MAX_LENGTH$7) {
  51953. throw new TypeError("version is longer than " + MAX_LENGTH$7 + " characters");
  51954. }
  51955. debug_1$2('SemVer', version, options);
  51956. this.options = options;
  51957. this.loose = !!options.loose;
  51958. this.includePrerelease = !!options.includePrerelease;
  51959. var m = version.trim().match(options.loose ? re$c[t$j.LOOSE] : re$c[t$j.FULL]);
  51960. if (!m) {
  51961. throw new TypeError("Invalid Version: " + version);
  51962. }
  51963. this.raw = version;
  51964. this.major = +m[1];
  51965. this.minor = +m[2];
  51966. this.patch = +m[3];
  51967. if (this.major > MAX_SAFE_INTEGER$4 || this.major < 0) {
  51968. throw new TypeError('Invalid major version');
  51969. }
  51970. if (this.minor > MAX_SAFE_INTEGER$4 || this.minor < 0) {
  51971. throw new TypeError('Invalid minor version');
  51972. }
  51973. if (this.patch > MAX_SAFE_INTEGER$4 || this.patch < 0) {
  51974. throw new TypeError('Invalid patch version');
  51975. }
  51976. if (!m[4]) {
  51977. this.prerelease = [];
  51978. } else {
  51979. this.prerelease = m[4].split('.').map(function (id) {
  51980. if (/^[0-9]+$/.test(id)) {
  51981. var num = +id;
  51982. if (num >= 0 && num < MAX_SAFE_INTEGER$4) {
  51983. return num;
  51984. }
  51985. }
  51986. return id;
  51987. });
  51988. }
  51989. this.build = m[5] ? m[5].split('.') : [];
  51990. this.format();
  51991. }
  51992. var _proto = SemVer.prototype;
  51993. _proto.format = function format() {
  51994. this.version = this.major + "." + this.minor + "." + this.patch;
  51995. if (this.prerelease.length) {
  51996. this.version += "-" + this.prerelease.join('.');
  51997. }
  51998. return this.version;
  51999. };
  52000. _proto.toString = function toString() {
  52001. return this.version;
  52002. };
  52003. _proto.compare = function compare(other) {
  52004. debug_1$2('SemVer.compare', this.version, this.options, other);
  52005. if (!(other instanceof SemVer)) {
  52006. if (typeof other === 'string' && other === this.version) {
  52007. return 0;
  52008. }
  52009. other = new SemVer(other, this.options);
  52010. }
  52011. if (other.version === this.version) {
  52012. return 0;
  52013. }
  52014. return this.compareMain(other) || this.comparePre(other);
  52015. };
  52016. _proto.compareMain = function compareMain(other) {
  52017. if (!(other instanceof SemVer)) {
  52018. other = new SemVer(other, this.options);
  52019. }
  52020. return compareIdentifiers$4(this.major, other.major) || compareIdentifiers$4(this.minor, other.minor) || compareIdentifiers$4(this.patch, other.patch);
  52021. };
  52022. _proto.comparePre = function comparePre(other) {
  52023. if (!(other instanceof SemVer)) {
  52024. other = new SemVer(other, this.options);
  52025. }
  52026. if (this.prerelease.length && !other.prerelease.length) {
  52027. return -1;
  52028. } else if (!this.prerelease.length && other.prerelease.length) {
  52029. return 1;
  52030. } else if (!this.prerelease.length && !other.prerelease.length) {
  52031. return 0;
  52032. }
  52033. var i = 0;
  52034. do {
  52035. var a = this.prerelease[i];
  52036. var b = other.prerelease[i];
  52037. debug_1$2('prerelease compare', i, a, b);
  52038. if (a === undefined && b === undefined) {
  52039. return 0;
  52040. } else if (b === undefined) {
  52041. return 1;
  52042. } else if (a === undefined) {
  52043. return -1;
  52044. } else if (a === b) {
  52045. continue;
  52046. } else {
  52047. return compareIdentifiers$4(a, b);
  52048. }
  52049. } while (++i);
  52050. };
  52051. _proto.compareBuild = function compareBuild(other) {
  52052. if (!(other instanceof SemVer)) {
  52053. other = new SemVer(other, this.options);
  52054. }
  52055. var i = 0;
  52056. do {
  52057. var a = this.build[i];
  52058. var b = other.build[i];
  52059. debug_1$2('prerelease compare', i, a, b);
  52060. if (a === undefined && b === undefined) {
  52061. return 0;
  52062. } else if (b === undefined) {
  52063. return 1;
  52064. } else if (a === undefined) {
  52065. return -1;
  52066. } else if (a === b) {
  52067. continue;
  52068. } else {
  52069. return compareIdentifiers$4(a, b);
  52070. }
  52071. } while (++i);
  52072. };
  52073. _proto.inc = function inc(release, identifier) {
  52074. switch (release) {
  52075. case 'premajor':
  52076. this.prerelease.length = 0;
  52077. this.patch = 0;
  52078. this.minor = 0;
  52079. this.major++;
  52080. this.inc('pre', identifier);
  52081. break;
  52082. case 'preminor':
  52083. this.prerelease.length = 0;
  52084. this.patch = 0;
  52085. this.minor++;
  52086. this.inc('pre', identifier);
  52087. break;
  52088. case 'prepatch':
  52089. this.prerelease.length = 0;
  52090. this.inc('patch', identifier);
  52091. this.inc('pre', identifier);
  52092. break;
  52093. case 'prerelease':
  52094. if (this.prerelease.length === 0) {
  52095. this.inc('patch', identifier);
  52096. }
  52097. this.inc('pre', identifier);
  52098. break;
  52099. case 'major':
  52100. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  52101. this.major++;
  52102. }
  52103. this.minor = 0;
  52104. this.patch = 0;
  52105. this.prerelease = [];
  52106. break;
  52107. case 'minor':
  52108. if (this.patch !== 0 || this.prerelease.length === 0) {
  52109. this.minor++;
  52110. }
  52111. this.patch = 0;
  52112. this.prerelease = [];
  52113. break;
  52114. case 'patch':
  52115. if (this.prerelease.length === 0) {
  52116. this.patch++;
  52117. }
  52118. this.prerelease = [];
  52119. break;
  52120. case 'pre':
  52121. if (this.prerelease.length === 0) {
  52122. this.prerelease = [0];
  52123. } else {
  52124. var i = this.prerelease.length;
  52125. while (--i >= 0) {
  52126. if (typeof this.prerelease[i] === 'number') {
  52127. this.prerelease[i]++;
  52128. i = -2;
  52129. }
  52130. }
  52131. if (i === -1) {
  52132. this.prerelease.push(0);
  52133. }
  52134. }
  52135. if (identifier) {
  52136. if (this.prerelease[0] === identifier) {
  52137. if (isNaN(this.prerelease[1])) {
  52138. this.prerelease = [identifier, 0];
  52139. }
  52140. } else {
  52141. this.prerelease = [identifier, 0];
  52142. }
  52143. }
  52144. break;
  52145. default:
  52146. throw new Error("invalid increment argument: " + release);
  52147. }
  52148. this.format();
  52149. this.raw = this.version;
  52150. return this;
  52151. };
  52152. return SemVer;
  52153. }();
  52154. var semver$9 = SemVer$2;
  52155. var MAX_LENGTH$6 = constants$2.MAX_LENGTH;
  52156. var re$b = re_1$2.re,
  52157. t$i = re_1$2.t;
  52158. var parse$5 = function parse(version, options) {
  52159. options = parseOptions_1$1(options);
  52160. if (version instanceof semver$9) {
  52161. return version;
  52162. }
  52163. if (typeof version !== 'string') {
  52164. return null;
  52165. }
  52166. if (version.length > MAX_LENGTH$6) {
  52167. return null;
  52168. }
  52169. var r = options.loose ? re$b[t$i.LOOSE] : re$b[t$i.FULL];
  52170. if (!r.test(version)) {
  52171. return null;
  52172. }
  52173. try {
  52174. return new semver$9(version, options);
  52175. } catch (er) {
  52176. return null;
  52177. }
  52178. };
  52179. var parse_1$2 = parse$5;
  52180. var valid$3 = function valid(version, options) {
  52181. var v = parse_1$2(version, options);
  52182. return v ? v.version : null;
  52183. };
  52184. var valid_1$1 = valid$3;
  52185. var clean$1 = function clean(version, options) {
  52186. var s = parse_1$2(version.trim().replace(/^[=v]+/, ''), options);
  52187. return s ? s.version : null;
  52188. };
  52189. var clean_1$1 = clean$1;
  52190. var inc$1 = function inc(version, release, options, identifier) {
  52191. if (typeof options === 'string') {
  52192. identifier = options;
  52193. options = undefined;
  52194. }
  52195. try {
  52196. return new semver$9(version, options).inc(release, identifier).version;
  52197. } catch (er) {
  52198. return null;
  52199. }
  52200. };
  52201. var inc_1$1 = inc$1;
  52202. var compare$4 = function compare(a, b, loose) {
  52203. return new semver$9(a, loose).compare(new semver$9(b, loose));
  52204. };
  52205. var compare_1$2 = compare$4;
  52206. var eq$2 = function eq(a, b, loose) {
  52207. return compare_1$2(a, b, loose) === 0;
  52208. };
  52209. var eq_1$2 = eq$2;
  52210. var diff$1 = function diff(version1, version2) {
  52211. if (eq_1$2(version1, version2)) {
  52212. return null;
  52213. } else {
  52214. var v1 = parse_1$2(version1);
  52215. var v2 = parse_1$2(version2);
  52216. var hasPre = v1.prerelease.length || v2.prerelease.length;
  52217. var prefix = hasPre ? 'pre' : '';
  52218. var defaultResult = hasPre ? 'prerelease' : '';
  52219. for (var key in v1) {
  52220. if (key === 'major' || key === 'minor' || key === 'patch') {
  52221. if (v1[key] !== v2[key]) {
  52222. return prefix + key;
  52223. }
  52224. }
  52225. }
  52226. return defaultResult;
  52227. }
  52228. };
  52229. var diff_1$1 = diff$1;
  52230. var major$1 = function major(a, loose) {
  52231. return new semver$9(a, loose).major;
  52232. };
  52233. var major_1$1 = major$1;
  52234. var minor$1 = function minor(a, loose) {
  52235. return new semver$9(a, loose).minor;
  52236. };
  52237. var minor_1$1 = minor$1;
  52238. var patch$1 = function patch(a, loose) {
  52239. return new semver$9(a, loose).patch;
  52240. };
  52241. var patch_1$1 = patch$1;
  52242. var prerelease$1 = function prerelease(version, options) {
  52243. var parsed = parse_1$2(version, options);
  52244. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  52245. };
  52246. var prerelease_1$1 = prerelease$1;
  52247. var rcompare$1 = function rcompare(a, b, loose) {
  52248. return compare_1$2(b, a, loose);
  52249. };
  52250. var rcompare_1$1 = rcompare$1;
  52251. var compareLoose$1 = function compareLoose(a, b) {
  52252. return compare_1$2(a, b, true);
  52253. };
  52254. var compareLoose_1$1 = compareLoose$1;
  52255. var compareBuild$1 = function compareBuild(a, b, loose) {
  52256. var versionA = new semver$9(a, loose);
  52257. var versionB = new semver$9(b, loose);
  52258. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  52259. };
  52260. var compareBuild_1$1 = compareBuild$1;
  52261. var sort$1 = function sort(list, loose) {
  52262. return list.sort(function (a, b) {
  52263. return compareBuild_1$1(a, b, loose);
  52264. });
  52265. };
  52266. var sort_1$1 = sort$1;
  52267. var rsort$1 = function rsort(list, loose) {
  52268. return list.sort(function (a, b) {
  52269. return compareBuild_1$1(b, a, loose);
  52270. });
  52271. };
  52272. var rsort_1$1 = rsort$1;
  52273. var gt$2 = function gt(a, b, loose) {
  52274. return compare_1$2(a, b, loose) > 0;
  52275. };
  52276. var gt_1$2 = gt$2;
  52277. var lt$2 = function lt(a, b, loose) {
  52278. return compare_1$2(a, b, loose) < 0;
  52279. };
  52280. var lt_1$2 = lt$2;
  52281. var neq$2 = function neq(a, b, loose) {
  52282. return compare_1$2(a, b, loose) !== 0;
  52283. };
  52284. var neq_1$2 = neq$2;
  52285. var gte$2 = function gte(a, b, loose) {
  52286. return compare_1$2(a, b, loose) >= 0;
  52287. };
  52288. var gte_1$2 = gte$2;
  52289. var lte$2 = function lte(a, b, loose) {
  52290. return compare_1$2(a, b, loose) <= 0;
  52291. };
  52292. var lte_1$2 = lte$2;
  52293. var cmp$2 = function cmp(a, op, b, loose) {
  52294. switch (op) {
  52295. case '===':
  52296. if (typeof a === 'object') a = a.version;
  52297. if (typeof b === 'object') b = b.version;
  52298. return a === b;
  52299. case '!==':
  52300. if (typeof a === 'object') a = a.version;
  52301. if (typeof b === 'object') b = b.version;
  52302. return a !== b;
  52303. case '':
  52304. case '=':
  52305. case '==':
  52306. return eq_1$2(a, b, loose);
  52307. case '!=':
  52308. return neq_1$2(a, b, loose);
  52309. case '>':
  52310. return gt_1$2(a, b, loose);
  52311. case '>=':
  52312. return gte_1$2(a, b, loose);
  52313. case '<':
  52314. return lt_1$2(a, b, loose);
  52315. case '<=':
  52316. return lte_1$2(a, b, loose);
  52317. default:
  52318. throw new TypeError("Invalid operator: " + op);
  52319. }
  52320. };
  52321. var cmp_1$2 = cmp$2;
  52322. var re$a = re_1$2.re,
  52323. t$h = re_1$2.t;
  52324. var coerce$2 = function coerce(version, options) {
  52325. if (version instanceof semver$9) {
  52326. return version;
  52327. }
  52328. if (typeof version === 'number') {
  52329. version = String(version);
  52330. }
  52331. if (typeof version !== 'string') {
  52332. return null;
  52333. }
  52334. options = options || {};
  52335. var match = null;
  52336. if (!options.rtl) {
  52337. match = version.match(re$a[t$h.COERCE]);
  52338. } else {
  52339. var next;
  52340. while ((next = re$a[t$h.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  52341. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  52342. match = next;
  52343. }
  52344. re$a[t$h.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  52345. }
  52346. re$a[t$h.COERCERTL].lastIndex = -1;
  52347. }
  52348. if (match === null) return null;
  52349. return parse_1$2(match[2] + "." + (match[3] || '0') + "." + (match[4] || '0'), options);
  52350. };
  52351. var coerce_1$2 = coerce$2;
  52352. var iterator$1 = function iterator(Yallist) {
  52353. Yallist.prototype[Symbol.iterator] = regenerator.mark(function _callee() {
  52354. var walker;
  52355. return regenerator.wrap(function _callee$(_context) {
  52356. while (1) {
  52357. switch (_context.prev = _context.next) {
  52358. case 0:
  52359. walker = this.head;
  52360. case 1:
  52361. if (!walker) {
  52362. _context.next = 7;
  52363. break;
  52364. }
  52365. _context.next = 4;
  52366. return walker.value;
  52367. case 4:
  52368. walker = walker.next;
  52369. _context.next = 1;
  52370. break;
  52371. case 7:
  52372. case "end":
  52373. return _context.stop();
  52374. }
  52375. }
  52376. }, _callee, this);
  52377. });
  52378. };
  52379. var yallist$1 = Yallist$1;
  52380. Yallist$1.Node = Node$1;
  52381. Yallist$1.create = Yallist$1;
  52382. function Yallist$1(list) {
  52383. var self = this;
  52384. if (!(self instanceof Yallist$1)) {
  52385. self = new Yallist$1();
  52386. }
  52387. self.tail = null;
  52388. self.head = null;
  52389. self.length = 0;
  52390. if (list && typeof list.forEach === 'function') {
  52391. list.forEach(function (item) {
  52392. self.push(item);
  52393. });
  52394. } else if (arguments.length > 0) {
  52395. for (var i = 0, l = arguments.length; i < l; i++) {
  52396. self.push(arguments[i]);
  52397. }
  52398. }
  52399. return self;
  52400. }
  52401. Yallist$1.prototype.removeNode = function (node) {
  52402. if (node.list !== this) {
  52403. throw new Error('removing node which does not belong to this list');
  52404. }
  52405. var next = node.next;
  52406. var prev = node.prev;
  52407. if (next) {
  52408. next.prev = prev;
  52409. }
  52410. if (prev) {
  52411. prev.next = next;
  52412. }
  52413. if (node === this.head) {
  52414. this.head = next;
  52415. }
  52416. if (node === this.tail) {
  52417. this.tail = prev;
  52418. }
  52419. node.list.length--;
  52420. node.next = null;
  52421. node.prev = null;
  52422. node.list = null;
  52423. return next;
  52424. };
  52425. Yallist$1.prototype.unshiftNode = function (node) {
  52426. if (node === this.head) {
  52427. return;
  52428. }
  52429. if (node.list) {
  52430. node.list.removeNode(node);
  52431. }
  52432. var head = this.head;
  52433. node.list = this;
  52434. node.next = head;
  52435. if (head) {
  52436. head.prev = node;
  52437. }
  52438. this.head = node;
  52439. if (!this.tail) {
  52440. this.tail = node;
  52441. }
  52442. this.length++;
  52443. };
  52444. Yallist$1.prototype.pushNode = function (node) {
  52445. if (node === this.tail) {
  52446. return;
  52447. }
  52448. if (node.list) {
  52449. node.list.removeNode(node);
  52450. }
  52451. var tail = this.tail;
  52452. node.list = this;
  52453. node.prev = tail;
  52454. if (tail) {
  52455. tail.next = node;
  52456. }
  52457. this.tail = node;
  52458. if (!this.head) {
  52459. this.head = node;
  52460. }
  52461. this.length++;
  52462. };
  52463. Yallist$1.prototype.push = function () {
  52464. for (var i = 0, l = arguments.length; i < l; i++) {
  52465. push$2(this, arguments[i]);
  52466. }
  52467. return this.length;
  52468. };
  52469. Yallist$1.prototype.unshift = function () {
  52470. for (var i = 0, l = arguments.length; i < l; i++) {
  52471. unshift$1(this, arguments[i]);
  52472. }
  52473. return this.length;
  52474. };
  52475. Yallist$1.prototype.pop = function () {
  52476. if (!this.tail) {
  52477. return undefined;
  52478. }
  52479. var res = this.tail.value;
  52480. this.tail = this.tail.prev;
  52481. if (this.tail) {
  52482. this.tail.next = null;
  52483. } else {
  52484. this.head = null;
  52485. }
  52486. this.length--;
  52487. return res;
  52488. };
  52489. Yallist$1.prototype.shift = function () {
  52490. if (!this.head) {
  52491. return undefined;
  52492. }
  52493. var res = this.head.value;
  52494. this.head = this.head.next;
  52495. if (this.head) {
  52496. this.head.prev = null;
  52497. } else {
  52498. this.tail = null;
  52499. }
  52500. this.length--;
  52501. return res;
  52502. };
  52503. Yallist$1.prototype.forEach = function (fn, thisp) {
  52504. thisp = thisp || this;
  52505. for (var walker = this.head, i = 0; walker !== null; i++) {
  52506. fn.call(thisp, walker.value, i, this);
  52507. walker = walker.next;
  52508. }
  52509. };
  52510. Yallist$1.prototype.forEachReverse = function (fn, thisp) {
  52511. thisp = thisp || this;
  52512. for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
  52513. fn.call(thisp, walker.value, i, this);
  52514. walker = walker.prev;
  52515. }
  52516. };
  52517. Yallist$1.prototype.get = function (n) {
  52518. for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
  52519. walker = walker.next;
  52520. }
  52521. if (i === n && walker !== null) {
  52522. return walker.value;
  52523. }
  52524. };
  52525. Yallist$1.prototype.getReverse = function (n) {
  52526. for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
  52527. walker = walker.prev;
  52528. }
  52529. if (i === n && walker !== null) {
  52530. return walker.value;
  52531. }
  52532. };
  52533. Yallist$1.prototype.map = function (fn, thisp) {
  52534. thisp = thisp || this;
  52535. var res = new Yallist$1();
  52536. for (var walker = this.head; walker !== null;) {
  52537. res.push(fn.call(thisp, walker.value, this));
  52538. walker = walker.next;
  52539. }
  52540. return res;
  52541. };
  52542. Yallist$1.prototype.mapReverse = function (fn, thisp) {
  52543. thisp = thisp || this;
  52544. var res = new Yallist$1();
  52545. for (var walker = this.tail; walker !== null;) {
  52546. res.push(fn.call(thisp, walker.value, this));
  52547. walker = walker.prev;
  52548. }
  52549. return res;
  52550. };
  52551. Yallist$1.prototype.reduce = function (fn, initial) {
  52552. var acc;
  52553. var walker = this.head;
  52554. if (arguments.length > 1) {
  52555. acc = initial;
  52556. } else if (this.head) {
  52557. walker = this.head.next;
  52558. acc = this.head.value;
  52559. } else {
  52560. throw new TypeError('Reduce of empty list with no initial value');
  52561. }
  52562. for (var i = 0; walker !== null; i++) {
  52563. acc = fn(acc, walker.value, i);
  52564. walker = walker.next;
  52565. }
  52566. return acc;
  52567. };
  52568. Yallist$1.prototype.reduceReverse = function (fn, initial) {
  52569. var acc;
  52570. var walker = this.tail;
  52571. if (arguments.length > 1) {
  52572. acc = initial;
  52573. } else if (this.tail) {
  52574. walker = this.tail.prev;
  52575. acc = this.tail.value;
  52576. } else {
  52577. throw new TypeError('Reduce of empty list with no initial value');
  52578. }
  52579. for (var i = this.length - 1; walker !== null; i--) {
  52580. acc = fn(acc, walker.value, i);
  52581. walker = walker.prev;
  52582. }
  52583. return acc;
  52584. };
  52585. Yallist$1.prototype.toArray = function () {
  52586. var arr = new Array(this.length);
  52587. for (var i = 0, walker = this.head; walker !== null; i++) {
  52588. arr[i] = walker.value;
  52589. walker = walker.next;
  52590. }
  52591. return arr;
  52592. };
  52593. Yallist$1.prototype.toArrayReverse = function () {
  52594. var arr = new Array(this.length);
  52595. for (var i = 0, walker = this.tail; walker !== null; i++) {
  52596. arr[i] = walker.value;
  52597. walker = walker.prev;
  52598. }
  52599. return arr;
  52600. };
  52601. Yallist$1.prototype.slice = function (from, to) {
  52602. to = to || this.length;
  52603. if (to < 0) {
  52604. to += this.length;
  52605. }
  52606. from = from || 0;
  52607. if (from < 0) {
  52608. from += this.length;
  52609. }
  52610. var ret = new Yallist$1();
  52611. if (to < from || to < 0) {
  52612. return ret;
  52613. }
  52614. if (from < 0) {
  52615. from = 0;
  52616. }
  52617. if (to > this.length) {
  52618. to = this.length;
  52619. }
  52620. for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
  52621. walker = walker.next;
  52622. }
  52623. for (; walker !== null && i < to; i++, walker = walker.next) {
  52624. ret.push(walker.value);
  52625. }
  52626. return ret;
  52627. };
  52628. Yallist$1.prototype.sliceReverse = function (from, to) {
  52629. to = to || this.length;
  52630. if (to < 0) {
  52631. to += this.length;
  52632. }
  52633. from = from || 0;
  52634. if (from < 0) {
  52635. from += this.length;
  52636. }
  52637. var ret = new Yallist$1();
  52638. if (to < from || to < 0) {
  52639. return ret;
  52640. }
  52641. if (from < 0) {
  52642. from = 0;
  52643. }
  52644. if (to > this.length) {
  52645. to = this.length;
  52646. }
  52647. for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
  52648. walker = walker.prev;
  52649. }
  52650. for (; walker !== null && i > from; i--, walker = walker.prev) {
  52651. ret.push(walker.value);
  52652. }
  52653. return ret;
  52654. };
  52655. Yallist$1.prototype.splice = function (start, deleteCount) {
  52656. if (start > this.length) {
  52657. start = this.length - 1;
  52658. }
  52659. if (start < 0) {
  52660. start = this.length + start;
  52661. }
  52662. for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
  52663. walker = walker.next;
  52664. }
  52665. var ret = [];
  52666. for (var i = 0; walker && i < deleteCount; i++) {
  52667. ret.push(walker.value);
  52668. walker = this.removeNode(walker);
  52669. }
  52670. if (walker === null) {
  52671. walker = this.tail;
  52672. }
  52673. if (walker !== this.head && walker !== this.tail) {
  52674. walker = walker.prev;
  52675. }
  52676. for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) {
  52677. walker = insert$1(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]);
  52678. }
  52679. return ret;
  52680. };
  52681. Yallist$1.prototype.reverse = function () {
  52682. var head = this.head;
  52683. var tail = this.tail;
  52684. for (var walker = head; walker !== null; walker = walker.prev) {
  52685. var p = walker.prev;
  52686. walker.prev = walker.next;
  52687. walker.next = p;
  52688. }
  52689. this.head = tail;
  52690. this.tail = head;
  52691. return this;
  52692. };
  52693. function insert$1(self, node, value) {
  52694. var inserted = node === self.head ? new Node$1(value, null, node, self) : new Node$1(value, node, node.next, self);
  52695. if (inserted.next === null) {
  52696. self.tail = inserted;
  52697. }
  52698. if (inserted.prev === null) {
  52699. self.head = inserted;
  52700. }
  52701. self.length++;
  52702. return inserted;
  52703. }
  52704. function push$2(self, item) {
  52705. self.tail = new Node$1(item, self.tail, null, self);
  52706. if (!self.head) {
  52707. self.head = self.tail;
  52708. }
  52709. self.length++;
  52710. }
  52711. function unshift$1(self, item) {
  52712. self.head = new Node$1(item, null, self.head, self);
  52713. if (!self.tail) {
  52714. self.tail = self.head;
  52715. }
  52716. self.length++;
  52717. }
  52718. function Node$1(value, prev, next, list) {
  52719. if (!(this instanceof Node$1)) {
  52720. return new Node$1(value, prev, next, list);
  52721. }
  52722. this.list = list;
  52723. this.value = value;
  52724. if (prev) {
  52725. prev.next = this;
  52726. this.prev = prev;
  52727. } else {
  52728. this.prev = null;
  52729. }
  52730. if (next) {
  52731. next.prev = this;
  52732. this.next = next;
  52733. } else {
  52734. this.next = null;
  52735. }
  52736. }
  52737. try {
  52738. iterator$1(Yallist$1);
  52739. } catch (er) {}
  52740. var MAX$1 = Symbol('max');
  52741. var LENGTH$1 = Symbol('length');
  52742. var LENGTH_CALCULATOR$1 = Symbol('lengthCalculator');
  52743. var ALLOW_STALE$1 = Symbol('allowStale');
  52744. var MAX_AGE$1 = Symbol('maxAge');
  52745. var DISPOSE$1 = Symbol('dispose');
  52746. var NO_DISPOSE_ON_SET$1 = Symbol('noDisposeOnSet');
  52747. var LRU_LIST$1 = Symbol('lruList');
  52748. var CACHE$1 = Symbol('cache');
  52749. var UPDATE_AGE_ON_GET$1 = Symbol('updateAgeOnGet');
  52750. var naiveLength$1 = function naiveLength() {
  52751. return 1;
  52752. };
  52753. var LRUCache$1 = function () {
  52754. function LRUCache(options) {
  52755. if (typeof options === 'number') options = {
  52756. max: options
  52757. };
  52758. if (!options) options = {};
  52759. if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number');
  52760. this[MAX$1] = options.max || Infinity;
  52761. var lc = options.length || naiveLength$1;
  52762. this[LENGTH_CALCULATOR$1] = typeof lc !== 'function' ? naiveLength$1 : lc;
  52763. this[ALLOW_STALE$1] = options.stale || false;
  52764. if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number');
  52765. this[MAX_AGE$1] = options.maxAge || 0;
  52766. this[DISPOSE$1] = options.dispose;
  52767. this[NO_DISPOSE_ON_SET$1] = options.noDisposeOnSet || false;
  52768. this[UPDATE_AGE_ON_GET$1] = options.updateAgeOnGet || false;
  52769. this.reset();
  52770. }
  52771. var _proto = LRUCache.prototype;
  52772. _proto.rforEach = function rforEach(fn, thisp) {
  52773. thisp = thisp || this;
  52774. for (var walker = this[LRU_LIST$1].tail; walker !== null;) {
  52775. var prev = walker.prev;
  52776. forEachStep$1(this, fn, walker, thisp);
  52777. walker = prev;
  52778. }
  52779. };
  52780. _proto.forEach = function forEach(fn, thisp) {
  52781. thisp = thisp || this;
  52782. for (var walker = this[LRU_LIST$1].head; walker !== null;) {
  52783. var next = walker.next;
  52784. forEachStep$1(this, fn, walker, thisp);
  52785. walker = next;
  52786. }
  52787. };
  52788. _proto.keys = function keys() {
  52789. return this[LRU_LIST$1].toArray().map(function (k) {
  52790. return k.key;
  52791. });
  52792. };
  52793. _proto.values = function values() {
  52794. return this[LRU_LIST$1].toArray().map(function (k) {
  52795. return k.value;
  52796. });
  52797. };
  52798. _proto.reset = function reset() {
  52799. var _this = this;
  52800. if (this[DISPOSE$1] && this[LRU_LIST$1] && this[LRU_LIST$1].length) {
  52801. this[LRU_LIST$1].forEach(function (hit) {
  52802. return _this[DISPOSE$1](hit.key, hit.value);
  52803. });
  52804. }
  52805. this[CACHE$1] = new Map();
  52806. this[LRU_LIST$1] = new yallist$1();
  52807. this[LENGTH$1] = 0;
  52808. };
  52809. _proto.dump = function dump() {
  52810. var _this2 = this;
  52811. return this[LRU_LIST$1].map(function (hit) {
  52812. return isStale$1(_this2, hit) ? false : {
  52813. k: hit.key,
  52814. v: hit.value,
  52815. e: hit.now + (hit.maxAge || 0)
  52816. };
  52817. }).toArray().filter(function (h) {
  52818. return h;
  52819. });
  52820. };
  52821. _proto.dumpLru = function dumpLru() {
  52822. return this[LRU_LIST$1];
  52823. };
  52824. _proto.set = function set(key, value, maxAge) {
  52825. maxAge = maxAge || this[MAX_AGE$1];
  52826. if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number');
  52827. var now = maxAge ? Date.now() : 0;
  52828. var len = this[LENGTH_CALCULATOR$1](value, key);
  52829. if (this[CACHE$1].has(key)) {
  52830. if (len > this[MAX$1]) {
  52831. _del$1(this, this[CACHE$1].get(key));
  52832. return false;
  52833. }
  52834. var node = this[CACHE$1].get(key);
  52835. var item = node.value;
  52836. if (this[DISPOSE$1]) {
  52837. if (!this[NO_DISPOSE_ON_SET$1]) this[DISPOSE$1](key, item.value);
  52838. }
  52839. item.now = now;
  52840. item.maxAge = maxAge;
  52841. item.value = value;
  52842. this[LENGTH$1] += len - item.length;
  52843. item.length = len;
  52844. this.get(key);
  52845. trim$1(this);
  52846. return true;
  52847. }
  52848. var hit = new Entry$2(key, value, len, now, maxAge);
  52849. if (hit.length > this[MAX$1]) {
  52850. if (this[DISPOSE$1]) this[DISPOSE$1](key, value);
  52851. return false;
  52852. }
  52853. this[LENGTH$1] += hit.length;
  52854. this[LRU_LIST$1].unshift(hit);
  52855. this[CACHE$1].set(key, this[LRU_LIST$1].head);
  52856. trim$1(this);
  52857. return true;
  52858. };
  52859. _proto.has = function has(key) {
  52860. if (!this[CACHE$1].has(key)) return false;
  52861. var hit = this[CACHE$1].get(key).value;
  52862. return !isStale$1(this, hit);
  52863. };
  52864. _proto.get = function get(key) {
  52865. return _get$1(this, key, true);
  52866. };
  52867. _proto.peek = function peek(key) {
  52868. return _get$1(this, key, false);
  52869. };
  52870. _proto.pop = function pop() {
  52871. var node = this[LRU_LIST$1].tail;
  52872. if (!node) return null;
  52873. _del$1(this, node);
  52874. return node.value;
  52875. };
  52876. _proto.del = function del(key) {
  52877. _del$1(this, this[CACHE$1].get(key));
  52878. };
  52879. _proto.load = function load(arr) {
  52880. this.reset();
  52881. var now = Date.now();
  52882. for (var l = arr.length - 1; l >= 0; l--) {
  52883. var hit = arr[l];
  52884. var expiresAt = hit.e || 0;
  52885. if (expiresAt === 0) this.set(hit.k, hit.v);else {
  52886. var maxAge = expiresAt - now;
  52887. if (maxAge > 0) {
  52888. this.set(hit.k, hit.v, maxAge);
  52889. }
  52890. }
  52891. }
  52892. };
  52893. _proto.prune = function prune() {
  52894. var _this3 = this;
  52895. this[CACHE$1].forEach(function (value, key) {
  52896. return _get$1(_this3, key, false);
  52897. });
  52898. };
  52899. _createClass(LRUCache, [{
  52900. key: "max",
  52901. get: function get() {
  52902. return this[MAX$1];
  52903. },
  52904. set: function set(mL) {
  52905. if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number');
  52906. this[MAX$1] = mL || Infinity;
  52907. trim$1(this);
  52908. }
  52909. }, {
  52910. key: "allowStale",
  52911. get: function get() {
  52912. return this[ALLOW_STALE$1];
  52913. },
  52914. set: function set(allowStale) {
  52915. this[ALLOW_STALE$1] = !!allowStale;
  52916. }
  52917. }, {
  52918. key: "maxAge",
  52919. get: function get() {
  52920. return this[MAX_AGE$1];
  52921. },
  52922. set: function set(mA) {
  52923. if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number');
  52924. this[MAX_AGE$1] = mA;
  52925. trim$1(this);
  52926. }
  52927. }, {
  52928. key: "lengthCalculator",
  52929. get: function get() {
  52930. return this[LENGTH_CALCULATOR$1];
  52931. },
  52932. set: function set(lC) {
  52933. var _this4 = this;
  52934. if (typeof lC !== 'function') lC = naiveLength$1;
  52935. if (lC !== this[LENGTH_CALCULATOR$1]) {
  52936. this[LENGTH_CALCULATOR$1] = lC;
  52937. this[LENGTH$1] = 0;
  52938. this[LRU_LIST$1].forEach(function (hit) {
  52939. hit.length = _this4[LENGTH_CALCULATOR$1](hit.value, hit.key);
  52940. _this4[LENGTH$1] += hit.length;
  52941. });
  52942. }
  52943. trim$1(this);
  52944. }
  52945. }, {
  52946. key: "length",
  52947. get: function get() {
  52948. return this[LENGTH$1];
  52949. }
  52950. }, {
  52951. key: "itemCount",
  52952. get: function get() {
  52953. return this[LRU_LIST$1].length;
  52954. }
  52955. }]);
  52956. return LRUCache;
  52957. }();
  52958. var _get$1 = function _get(self, key, doUse) {
  52959. var node = self[CACHE$1].get(key);
  52960. if (node) {
  52961. var hit = node.value;
  52962. if (isStale$1(self, hit)) {
  52963. _del$1(self, node);
  52964. if (!self[ALLOW_STALE$1]) return undefined;
  52965. } else {
  52966. if (doUse) {
  52967. if (self[UPDATE_AGE_ON_GET$1]) node.value.now = Date.now();
  52968. self[LRU_LIST$1].unshiftNode(node);
  52969. }
  52970. }
  52971. return hit.value;
  52972. }
  52973. };
  52974. var isStale$1 = function isStale(self, hit) {
  52975. if (!hit || !hit.maxAge && !self[MAX_AGE$1]) return false;
  52976. var diff = Date.now() - hit.now;
  52977. return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE$1] && diff > self[MAX_AGE$1];
  52978. };
  52979. var trim$1 = function trim(self) {
  52980. if (self[LENGTH$1] > self[MAX$1]) {
  52981. for (var walker = self[LRU_LIST$1].tail; self[LENGTH$1] > self[MAX$1] && walker !== null;) {
  52982. var prev = walker.prev;
  52983. _del$1(self, walker);
  52984. walker = prev;
  52985. }
  52986. }
  52987. };
  52988. var _del$1 = function _del(self, node) {
  52989. if (node) {
  52990. var hit = node.value;
  52991. if (self[DISPOSE$1]) self[DISPOSE$1](hit.key, hit.value);
  52992. self[LENGTH$1] -= hit.length;
  52993. self[CACHE$1]["delete"](hit.key);
  52994. self[LRU_LIST$1].removeNode(node);
  52995. }
  52996. };
  52997. var Entry$2 = function Entry(key, value, length, now, maxAge) {
  52998. this.key = key;
  52999. this.value = value;
  53000. this.length = length;
  53001. this.now = now;
  53002. this.maxAge = maxAge || 0;
  53003. };
  53004. var forEachStep$1 = function forEachStep(self, fn, node, thisp) {
  53005. var hit = node.value;
  53006. if (isStale$1(self, hit)) {
  53007. _del$1(self, node);
  53008. if (!self[ALLOW_STALE$1]) hit = undefined;
  53009. }
  53010. if (hit) fn.call(thisp, hit.value, hit.key, self);
  53011. };
  53012. var lruCache$1 = LRUCache$1;
  53013. var Range$1 = function () {
  53014. function Range(range, options) {
  53015. var _this = this;
  53016. options = parseOptions_1$1(options);
  53017. if (range instanceof Range) {
  53018. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  53019. return range;
  53020. } else {
  53021. return new Range(range.raw, options);
  53022. }
  53023. }
  53024. if (range instanceof comparator$1) {
  53025. this.raw = range.value;
  53026. this.set = [[range]];
  53027. this.format();
  53028. return this;
  53029. }
  53030. this.options = options;
  53031. this.loose = !!options.loose;
  53032. this.includePrerelease = !!options.includePrerelease;
  53033. this.raw = range;
  53034. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  53035. return _this.parseRange(range.trim());
  53036. }).filter(function (c) {
  53037. return c.length;
  53038. });
  53039. if (!this.set.length) {
  53040. throw new TypeError("Invalid SemVer Range: " + range);
  53041. }
  53042. if (this.set.length > 1) {
  53043. var first = this.set[0];
  53044. this.set = this.set.filter(function (c) {
  53045. return !isNullSet$1(c[0]);
  53046. });
  53047. if (this.set.length === 0) this.set = [first];else if (this.set.length > 1) {
  53048. for (var _iterator = _createForOfIteratorHelperLoose(this.set), _step; !(_step = _iterator()).done;) {
  53049. var c = _step.value;
  53050. if (c.length === 1 && isAny$1(c[0])) {
  53051. this.set = [c];
  53052. break;
  53053. }
  53054. }
  53055. }
  53056. }
  53057. this.format();
  53058. }
  53059. var _proto = Range.prototype;
  53060. _proto.format = function format() {
  53061. this.range = this.set.map(function (comps) {
  53062. return comps.join(' ').trim();
  53063. }).join('||').trim();
  53064. return this.range;
  53065. };
  53066. _proto.toString = function toString() {
  53067. return this.range;
  53068. };
  53069. _proto.parseRange = function parseRange(range) {
  53070. var _this2 = this;
  53071. range = range.trim();
  53072. var memoOpts = Object.keys(this.options).join(',');
  53073. var memoKey = "parseRange:" + memoOpts + ":" + range;
  53074. var cached = cache$1.get(memoKey);
  53075. if (cached) return cached;
  53076. var loose = this.options.loose;
  53077. var hr = loose ? re$9[t$g.HYPHENRANGELOOSE] : re$9[t$g.HYPHENRANGE];
  53078. range = range.replace(hr, hyphenReplace$1(this.options.includePrerelease));
  53079. debug_1$2('hyphen replace', range);
  53080. range = range.replace(re$9[t$g.COMPARATORTRIM], comparatorTrimReplace$1);
  53081. debug_1$2('comparator trim', range, re$9[t$g.COMPARATORTRIM]);
  53082. range = range.replace(re$9[t$g.TILDETRIM], tildeTrimReplace$1);
  53083. range = range.replace(re$9[t$g.CARETTRIM], caretTrimReplace$1);
  53084. range = range.split(/\s+/).join(' ');
  53085. var compRe = loose ? re$9[t$g.COMPARATORLOOSE] : re$9[t$g.COMPARATOR];
  53086. var rangeList = range.split(' ').map(function (comp) {
  53087. return parseComparator$1(comp, _this2.options);
  53088. }).join(' ').split(/\s+/).map(function (comp) {
  53089. return replaceGTE0$1(comp, _this2.options);
  53090. }).filter(this.options.loose ? function (comp) {
  53091. return !!comp.match(compRe);
  53092. } : function () {
  53093. return true;
  53094. }).map(function (comp) {
  53095. return new comparator$1(comp, _this2.options);
  53096. });
  53097. rangeList.length;
  53098. var rangeMap = new Map();
  53099. for (var _iterator2 = _createForOfIteratorHelperLoose(rangeList), _step2; !(_step2 = _iterator2()).done;) {
  53100. var comp = _step2.value;
  53101. if (isNullSet$1(comp)) return [comp];
  53102. rangeMap.set(comp.value, comp);
  53103. }
  53104. if (rangeMap.size > 1 && rangeMap.has('')) rangeMap["delete"]('');
  53105. var result = _toConsumableArray(rangeMap.values());
  53106. cache$1.set(memoKey, result);
  53107. return result;
  53108. };
  53109. _proto.intersects = function intersects(range, options) {
  53110. if (!(range instanceof Range)) {
  53111. throw new TypeError('a Range is required');
  53112. }
  53113. return this.set.some(function (thisComparators) {
  53114. return isSatisfiable$1(thisComparators, options) && range.set.some(function (rangeComparators) {
  53115. return isSatisfiable$1(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  53116. return rangeComparators.every(function (rangeComparator) {
  53117. return thisComparator.intersects(rangeComparator, options);
  53118. });
  53119. });
  53120. });
  53121. });
  53122. };
  53123. _proto.test = function test(version) {
  53124. if (!version) {
  53125. return false;
  53126. }
  53127. if (typeof version === 'string') {
  53128. try {
  53129. version = new semver$9(version, this.options);
  53130. } catch (er) {
  53131. return false;
  53132. }
  53133. }
  53134. for (var i = 0; i < this.set.length; i++) {
  53135. if (testSet$1(this.set[i], version, this.options)) {
  53136. return true;
  53137. }
  53138. }
  53139. return false;
  53140. };
  53141. return Range;
  53142. }();
  53143. var range$1 = Range$1;
  53144. var cache$1 = new lruCache$1({
  53145. max: 1000
  53146. });
  53147. var re$9 = re_1$2.re,
  53148. t$g = re_1$2.t,
  53149. comparatorTrimReplace$1 = re_1$2.comparatorTrimReplace,
  53150. tildeTrimReplace$1 = re_1$2.tildeTrimReplace,
  53151. caretTrimReplace$1 = re_1$2.caretTrimReplace;
  53152. var isNullSet$1 = function isNullSet(c) {
  53153. return c.value === '<0.0.0-0';
  53154. };
  53155. var isAny$1 = function isAny(c) {
  53156. return c.value === '';
  53157. };
  53158. var isSatisfiable$1 = function isSatisfiable(comparators, options) {
  53159. var result = true;
  53160. var remainingComparators = comparators.slice();
  53161. var testComparator = remainingComparators.pop();
  53162. while (result && remainingComparators.length) {
  53163. result = remainingComparators.every(function (otherComparator) {
  53164. return testComparator.intersects(otherComparator, options);
  53165. });
  53166. testComparator = remainingComparators.pop();
  53167. }
  53168. return result;
  53169. };
  53170. var parseComparator$1 = function parseComparator(comp, options) {
  53171. debug_1$2('comp', comp, options);
  53172. comp = replaceCarets$1(comp, options);
  53173. debug_1$2('caret', comp);
  53174. comp = replaceTildes$1(comp, options);
  53175. debug_1$2('tildes', comp);
  53176. comp = replaceXRanges$1(comp, options);
  53177. debug_1$2('xrange', comp);
  53178. comp = replaceStars$1(comp, options);
  53179. debug_1$2('stars', comp);
  53180. return comp;
  53181. };
  53182. var isX$1 = function isX(id) {
  53183. return !id || id.toLowerCase() === 'x' || id === '*';
  53184. };
  53185. var replaceTildes$1 = function replaceTildes(comp, options) {
  53186. return comp.trim().split(/\s+/).map(function (comp) {
  53187. return replaceTilde$1(comp, options);
  53188. }).join(' ');
  53189. };
  53190. var replaceTilde$1 = function replaceTilde(comp, options) {
  53191. var r = options.loose ? re$9[t$g.TILDELOOSE] : re$9[t$g.TILDE];
  53192. return comp.replace(r, function (_, M, m, p, pr) {
  53193. debug_1$2('tilde', comp, _, M, m, p, pr);
  53194. var ret;
  53195. if (isX$1(M)) {
  53196. ret = '';
  53197. } else if (isX$1(m)) {
  53198. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0-0";
  53199. } else if (isX$1(p)) {
  53200. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0-0";
  53201. } else if (pr) {
  53202. debug_1$2('replaceTilde pr', pr);
  53203. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  53204. } else {
  53205. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0-0";
  53206. }
  53207. debug_1$2('tilde return', ret);
  53208. return ret;
  53209. });
  53210. };
  53211. var replaceCarets$1 = function replaceCarets(comp, options) {
  53212. return comp.trim().split(/\s+/).map(function (comp) {
  53213. return replaceCaret$1(comp, options);
  53214. }).join(' ');
  53215. };
  53216. var replaceCaret$1 = function replaceCaret(comp, options) {
  53217. debug_1$2('caret', comp, options);
  53218. var r = options.loose ? re$9[t$g.CARETLOOSE] : re$9[t$g.CARET];
  53219. var z = options.includePrerelease ? '-0' : '';
  53220. return comp.replace(r, function (_, M, m, p, pr) {
  53221. debug_1$2('caret', comp, _, M, m, p, pr);
  53222. var ret;
  53223. if (isX$1(M)) {
  53224. ret = '';
  53225. } else if (isX$1(m)) {
  53226. ret = ">=" + M + ".0.0" + z + " <" + (+M + 1) + ".0.0-0";
  53227. } else if (isX$1(p)) {
  53228. if (M === '0') {
  53229. ret = ">=" + M + "." + m + ".0" + z + " <" + M + "." + (+m + 1) + ".0-0";
  53230. } else {
  53231. ret = ">=" + M + "." + m + ".0" + z + " <" + (+M + 1) + ".0.0-0";
  53232. }
  53233. } else if (pr) {
  53234. debug_1$2('replaceCaret pr', pr);
  53235. if (M === '0') {
  53236. if (m === '0') {
  53237. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1) + "-0";
  53238. } else {
  53239. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  53240. }
  53241. } else {
  53242. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0-0";
  53243. }
  53244. } else {
  53245. debug_1$2('no pr');
  53246. if (M === '0') {
  53247. if (m === '0') {
  53248. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + m + "." + (+p + 1) + "-0";
  53249. } else {
  53250. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + (+m + 1) + ".0-0";
  53251. }
  53252. } else {
  53253. ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0-0";
  53254. }
  53255. }
  53256. debug_1$2('caret return', ret);
  53257. return ret;
  53258. });
  53259. };
  53260. var replaceXRanges$1 = function replaceXRanges(comp, options) {
  53261. debug_1$2('replaceXRanges', comp, options);
  53262. return comp.split(/\s+/).map(function (comp) {
  53263. return replaceXRange$1(comp, options);
  53264. }).join(' ');
  53265. };
  53266. var replaceXRange$1 = function replaceXRange(comp, options) {
  53267. comp = comp.trim();
  53268. var r = options.loose ? re$9[t$g.XRANGELOOSE] : re$9[t$g.XRANGE];
  53269. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  53270. debug_1$2('xRange', comp, ret, gtlt, M, m, p, pr);
  53271. var xM = isX$1(M);
  53272. var xm = xM || isX$1(m);
  53273. var xp = xm || isX$1(p);
  53274. var anyX = xp;
  53275. if (gtlt === '=' && anyX) {
  53276. gtlt = '';
  53277. }
  53278. pr = options.includePrerelease ? '-0' : '';
  53279. if (xM) {
  53280. if (gtlt === '>' || gtlt === '<') {
  53281. ret = '<0.0.0-0';
  53282. } else {
  53283. ret = '*';
  53284. }
  53285. } else if (gtlt && anyX) {
  53286. if (xm) {
  53287. m = 0;
  53288. }
  53289. p = 0;
  53290. if (gtlt === '>') {
  53291. gtlt = '>=';
  53292. if (xm) {
  53293. M = +M + 1;
  53294. m = 0;
  53295. p = 0;
  53296. } else {
  53297. m = +m + 1;
  53298. p = 0;
  53299. }
  53300. } else if (gtlt === '<=') {
  53301. gtlt = '<';
  53302. if (xm) {
  53303. M = +M + 1;
  53304. } else {
  53305. m = +m + 1;
  53306. }
  53307. }
  53308. if (gtlt === '<') pr = '-0';
  53309. ret = gtlt + M + "." + m + "." + p + pr;
  53310. } else if (xm) {
  53311. ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0-0";
  53312. } else if (xp) {
  53313. ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  53314. }
  53315. debug_1$2('xRange return', ret);
  53316. return ret;
  53317. });
  53318. };
  53319. var replaceStars$1 = function replaceStars(comp, options) {
  53320. debug_1$2('replaceStars', comp, options);
  53321. return comp.trim().replace(re$9[t$g.STAR], '');
  53322. };
  53323. var replaceGTE0$1 = function replaceGTE0(comp, options) {
  53324. debug_1$2('replaceGTE0', comp, options);
  53325. return comp.trim().replace(re$9[options.includePrerelease ? t$g.GTE0PRE : t$g.GTE0], '');
  53326. };
  53327. var hyphenReplace$1 = function hyphenReplace(incPr) {
  53328. return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  53329. if (isX$1(fM)) {
  53330. from = '';
  53331. } else if (isX$1(fm)) {
  53332. from = ">=" + fM + ".0.0" + (incPr ? '-0' : '');
  53333. } else if (isX$1(fp)) {
  53334. from = ">=" + fM + "." + fm + ".0" + (incPr ? '-0' : '');
  53335. } else if (fpr) {
  53336. from = ">=" + from;
  53337. } else {
  53338. from = ">=" + from + (incPr ? '-0' : '');
  53339. }
  53340. if (isX$1(tM)) {
  53341. to = '';
  53342. } else if (isX$1(tm)) {
  53343. to = "<" + (+tM + 1) + ".0.0-0";
  53344. } else if (isX$1(tp)) {
  53345. to = "<" + tM + "." + (+tm + 1) + ".0-0";
  53346. } else if (tpr) {
  53347. to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
  53348. } else if (incPr) {
  53349. to = "<" + tM + "." + tm + "." + (+tp + 1) + "-0";
  53350. } else {
  53351. to = "<=" + to;
  53352. }
  53353. return (from + " " + to).trim();
  53354. };
  53355. };
  53356. var testSet$1 = function testSet(set, version, options) {
  53357. for (var i = 0; i < set.length; i++) {
  53358. if (!set[i].test(version)) {
  53359. return false;
  53360. }
  53361. }
  53362. if (version.prerelease.length && !options.includePrerelease) {
  53363. for (var _i = 0; _i < set.length; _i++) {
  53364. debug_1$2(set[_i].semver);
  53365. if (set[_i].semver === comparator$1.ANY) {
  53366. continue;
  53367. }
  53368. if (set[_i].semver.prerelease.length > 0) {
  53369. var allowed = set[_i].semver;
  53370. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  53371. return true;
  53372. }
  53373. }
  53374. }
  53375. return false;
  53376. }
  53377. return true;
  53378. };
  53379. var ANY$5 = Symbol('SemVer ANY');
  53380. var Comparator$1 = function () {
  53381. function Comparator(comp, options) {
  53382. options = parseOptions_1$1(options);
  53383. if (comp instanceof Comparator) {
  53384. if (comp.loose === !!options.loose) {
  53385. return comp;
  53386. } else {
  53387. comp = comp.value;
  53388. }
  53389. }
  53390. debug_1$2('comparator', comp, options);
  53391. this.options = options;
  53392. this.loose = !!options.loose;
  53393. this.parse(comp);
  53394. if (this.semver === ANY$5) {
  53395. this.value = '';
  53396. } else {
  53397. this.value = this.operator + this.semver.version;
  53398. }
  53399. debug_1$2('comp', this);
  53400. }
  53401. var _proto = Comparator.prototype;
  53402. _proto.parse = function parse(comp) {
  53403. var r = this.options.loose ? re$8[t$f.COMPARATORLOOSE] : re$8[t$f.COMPARATOR];
  53404. var m = comp.match(r);
  53405. if (!m) {
  53406. throw new TypeError("Invalid comparator: " + comp);
  53407. }
  53408. this.operator = m[1] !== undefined ? m[1] : '';
  53409. if (this.operator === '=') {
  53410. this.operator = '';
  53411. }
  53412. if (!m[2]) {
  53413. this.semver = ANY$5;
  53414. } else {
  53415. this.semver = new semver$9(m[2], this.options.loose);
  53416. }
  53417. };
  53418. _proto.toString = function toString() {
  53419. return this.value;
  53420. };
  53421. _proto.test = function test(version) {
  53422. debug_1$2('Comparator.test', version, this.options.loose);
  53423. if (this.semver === ANY$5 || version === ANY$5) {
  53424. return true;
  53425. }
  53426. if (typeof version === 'string') {
  53427. try {
  53428. version = new semver$9(version, this.options);
  53429. } catch (er) {
  53430. return false;
  53431. }
  53432. }
  53433. return cmp_1$2(version, this.operator, this.semver, this.options);
  53434. };
  53435. _proto.intersects = function intersects(comp, options) {
  53436. if (!(comp instanceof Comparator)) {
  53437. throw new TypeError('a Comparator is required');
  53438. }
  53439. if (!options || typeof options !== 'object') {
  53440. options = {
  53441. loose: !!options,
  53442. includePrerelease: false
  53443. };
  53444. }
  53445. if (this.operator === '') {
  53446. if (this.value === '') {
  53447. return true;
  53448. }
  53449. return new range$1(comp.value, options).test(this.value);
  53450. } else if (comp.operator === '') {
  53451. if (comp.value === '') {
  53452. return true;
  53453. }
  53454. return new range$1(this.value, options).test(comp.semver);
  53455. }
  53456. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  53457. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  53458. var sameSemVer = this.semver.version === comp.semver.version;
  53459. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  53460. var oppositeDirectionsLessThan = cmp_1$2(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  53461. var oppositeDirectionsGreaterThan = cmp_1$2(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  53462. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  53463. };
  53464. _createClass(Comparator, null, [{
  53465. key: "ANY",
  53466. get: function get() {
  53467. return ANY$5;
  53468. }
  53469. }]);
  53470. return Comparator;
  53471. }();
  53472. var comparator$1 = Comparator$1;
  53473. var re$8 = re_1$2.re,
  53474. t$f = re_1$2.t;
  53475. var satisfies$1 = function satisfies(version, range, options) {
  53476. try {
  53477. range = new range$1(range, options);
  53478. } catch (er) {
  53479. return false;
  53480. }
  53481. return range.test(version);
  53482. };
  53483. var satisfies_1$1 = satisfies$1;
  53484. var toComparators$1 = function toComparators(range, options) {
  53485. return new range$1(range, options).set.map(function (comp) {
  53486. return comp.map(function (c) {
  53487. return c.value;
  53488. }).join(' ').trim().split(' ');
  53489. });
  53490. };
  53491. var toComparators_1$1 = toComparators$1;
  53492. var maxSatisfying$1 = function maxSatisfying(versions, range, options) {
  53493. var max = null;
  53494. var maxSV = null;
  53495. var rangeObj = null;
  53496. try {
  53497. rangeObj = new range$1(range, options);
  53498. } catch (er) {
  53499. return null;
  53500. }
  53501. versions.forEach(function (v) {
  53502. if (rangeObj.test(v)) {
  53503. if (!max || maxSV.compare(v) === -1) {
  53504. max = v;
  53505. maxSV = new semver$9(max, options);
  53506. }
  53507. }
  53508. });
  53509. return max;
  53510. };
  53511. var maxSatisfying_1$1 = maxSatisfying$1;
  53512. var minSatisfying$1 = function minSatisfying(versions, range, options) {
  53513. var min = null;
  53514. var minSV = null;
  53515. var rangeObj = null;
  53516. try {
  53517. rangeObj = new range$1(range, options);
  53518. } catch (er) {
  53519. return null;
  53520. }
  53521. versions.forEach(function (v) {
  53522. if (rangeObj.test(v)) {
  53523. if (!min || minSV.compare(v) === 1) {
  53524. min = v;
  53525. minSV = new semver$9(min, options);
  53526. }
  53527. }
  53528. });
  53529. return min;
  53530. };
  53531. var minSatisfying_1$1 = minSatisfying$1;
  53532. var minVersion$1 = function minVersion(range, loose) {
  53533. range = new range$1(range, loose);
  53534. var minver = new semver$9('0.0.0');
  53535. if (range.test(minver)) {
  53536. return minver;
  53537. }
  53538. minver = new semver$9('0.0.0-0');
  53539. if (range.test(minver)) {
  53540. return minver;
  53541. }
  53542. minver = null;
  53543. var _loop = function _loop(i) {
  53544. var comparators = range.set[i];
  53545. var setMin = null;
  53546. comparators.forEach(function (comparator) {
  53547. var compver = new semver$9(comparator.semver.version);
  53548. switch (comparator.operator) {
  53549. case '>':
  53550. if (compver.prerelease.length === 0) {
  53551. compver.patch++;
  53552. } else {
  53553. compver.prerelease.push(0);
  53554. }
  53555. compver.raw = compver.format();
  53556. case '':
  53557. case '>=':
  53558. if (!setMin || gt_1$2(compver, setMin)) {
  53559. setMin = compver;
  53560. }
  53561. break;
  53562. case '<':
  53563. case '<=':
  53564. break;
  53565. default:
  53566. throw new Error("Unexpected operation: " + comparator.operator);
  53567. }
  53568. });
  53569. if (setMin && (!minver || gt_1$2(minver, setMin))) minver = setMin;
  53570. };
  53571. for (var i = 0; i < range.set.length; ++i) {
  53572. _loop(i);
  53573. }
  53574. if (minver && range.test(minver)) {
  53575. return minver;
  53576. }
  53577. return null;
  53578. };
  53579. var minVersion_1$1 = minVersion$1;
  53580. var validRange$1 = function validRange(range, options) {
  53581. try {
  53582. return new range$1(range, options).range || '*';
  53583. } catch (er) {
  53584. return null;
  53585. }
  53586. };
  53587. var valid$2 = validRange$1;
  53588. var ANY$4 = comparator$1.ANY;
  53589. var outside$1 = function outside(version, range, hilo, options) {
  53590. version = new semver$9(version, options);
  53591. range = new range$1(range, options);
  53592. var gtfn, ltefn, ltfn, comp, ecomp;
  53593. switch (hilo) {
  53594. case '>':
  53595. gtfn = gt_1$2;
  53596. ltefn = lte_1$2;
  53597. ltfn = lt_1$2;
  53598. comp = '>';
  53599. ecomp = '>=';
  53600. break;
  53601. case '<':
  53602. gtfn = lt_1$2;
  53603. ltefn = gte_1$2;
  53604. ltfn = gt_1$2;
  53605. comp = '<';
  53606. ecomp = '<=';
  53607. break;
  53608. default:
  53609. throw new TypeError('Must provide a hilo val of "<" or ">"');
  53610. }
  53611. if (satisfies_1$1(version, range, options)) {
  53612. return false;
  53613. }
  53614. var _loop = function _loop(i) {
  53615. var comparators = range.set[i];
  53616. var high = null;
  53617. var low = null;
  53618. comparators.forEach(function (comparator) {
  53619. if (comparator.semver === ANY$4) {
  53620. comparator = new comparator$1('>=0.0.0');
  53621. }
  53622. high = high || comparator;
  53623. low = low || comparator;
  53624. if (gtfn(comparator.semver, high.semver, options)) {
  53625. high = comparator;
  53626. } else if (ltfn(comparator.semver, low.semver, options)) {
  53627. low = comparator;
  53628. }
  53629. });
  53630. if (high.operator === comp || high.operator === ecomp) {
  53631. return {
  53632. v: false
  53633. };
  53634. }
  53635. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  53636. return {
  53637. v: false
  53638. };
  53639. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  53640. return {
  53641. v: false
  53642. };
  53643. }
  53644. };
  53645. for (var i = 0; i < range.set.length; ++i) {
  53646. var _ret = _loop(i);
  53647. if (typeof _ret === "object") return _ret.v;
  53648. }
  53649. return true;
  53650. };
  53651. var outside_1$1 = outside$1;
  53652. var gtr$1 = function gtr(version, range, options) {
  53653. return outside_1$1(version, range, '>', options);
  53654. };
  53655. var gtr_1$1 = gtr$1;
  53656. var ltr$1 = function ltr(version, range, options) {
  53657. return outside_1$1(version, range, '<', options);
  53658. };
  53659. var ltr_1$1 = ltr$1;
  53660. var intersects$1 = function intersects(r1, r2, options) {
  53661. r1 = new range$1(r1, options);
  53662. r2 = new range$1(r2, options);
  53663. return r1.intersects(r2);
  53664. };
  53665. var intersects_1$1 = intersects$1;
  53666. var simplify$1 = function simplify(versions, range, options) {
  53667. var set = [];
  53668. var min = null;
  53669. var prev = null;
  53670. var v = versions.sort(function (a, b) {
  53671. return compare_1$2(a, b, options);
  53672. });
  53673. for (var _iterator = _createForOfIteratorHelperLoose(v), _step; !(_step = _iterator()).done;) {
  53674. var version = _step.value;
  53675. var included = satisfies_1$1(version, range, options);
  53676. if (included) {
  53677. prev = version;
  53678. if (!min) min = version;
  53679. } else {
  53680. if (prev) {
  53681. set.push([min, prev]);
  53682. }
  53683. prev = null;
  53684. min = null;
  53685. }
  53686. }
  53687. if (min) set.push([min, null]);
  53688. var ranges = [];
  53689. for (var _i = 0, _set = set; _i < _set.length; _i++) {
  53690. var _set$_i = _slicedToArray$2(_set[_i], 2),
  53691. _min = _set$_i[0],
  53692. max = _set$_i[1];
  53693. if (_min === max) ranges.push(_min);else if (!max && _min === v[0]) ranges.push('*');else if (!max) ranges.push(">=" + _min);else if (_min === v[0]) ranges.push("<=" + max);else ranges.push(_min + " - " + max);
  53694. }
  53695. var simplified = ranges.join(' || ');
  53696. var original = typeof range.raw === 'string' ? range.raw : String(range);
  53697. return simplified.length < original.length ? simplified : range;
  53698. };
  53699. var ANY$3 = comparator$1.ANY;
  53700. var subset$1 = function subset(sub, dom, options) {
  53701. if (sub === dom) return true;
  53702. sub = new range$1(sub, options);
  53703. dom = new range$1(dom, options);
  53704. var sawNonNull = false;
  53705. OUTER: for (var _iterator = _createForOfIteratorHelperLoose(sub.set), _step; !(_step = _iterator()).done;) {
  53706. var simpleSub = _step.value;
  53707. for (var _iterator2 = _createForOfIteratorHelperLoose(dom.set), _step2; !(_step2 = _iterator2()).done;) {
  53708. var simpleDom = _step2.value;
  53709. var isSub = simpleSubset$1(simpleSub, simpleDom, options);
  53710. sawNonNull = sawNonNull || isSub !== null;
  53711. if (isSub) continue OUTER;
  53712. }
  53713. if (sawNonNull) return false;
  53714. }
  53715. return true;
  53716. };
  53717. var simpleSubset$1 = function simpleSubset(sub, dom, options) {
  53718. if (sub === dom) return true;
  53719. if (sub.length === 1 && sub[0].semver === ANY$3) return dom.length === 1 && dom[0].semver === ANY$3;
  53720. var eqSet = new Set();
  53721. var gt, lt;
  53722. for (var _iterator3 = _createForOfIteratorHelperLoose(sub), _step3; !(_step3 = _iterator3()).done;) {
  53723. var c = _step3.value;
  53724. if (c.operator === '>' || c.operator === '>=') gt = higherGT$1(gt, c, options);else if (c.operator === '<' || c.operator === '<=') lt = lowerLT$1(lt, c, options);else eqSet.add(c.semver);
  53725. }
  53726. if (eqSet.size > 1) return null;
  53727. var gtltComp;
  53728. if (gt && lt) {
  53729. gtltComp = compare_1$2(gt.semver, lt.semver, options);
  53730. if (gtltComp > 0) return null;else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null;
  53731. }
  53732. for (var _iterator4 = _createForOfIteratorHelperLoose(eqSet), _step4; !(_step4 = _iterator4()).done;) {
  53733. var eq = _step4.value;
  53734. if (gt && !satisfies_1$1(eq, String(gt), options)) return null;
  53735. if (lt && !satisfies_1$1(eq, String(lt), options)) return null;
  53736. for (var _iterator6 = _createForOfIteratorHelperLoose(dom), _step6; !(_step6 = _iterator6()).done;) {
  53737. var _c = _step6.value;
  53738. if (!satisfies_1$1(eq, String(_c), options)) return false;
  53739. }
  53740. return true;
  53741. }
  53742. var higher, lower;
  53743. var hasDomLT, hasDomGT;
  53744. for (var _iterator5 = _createForOfIteratorHelperLoose(dom), _step5; !(_step5 = _iterator5()).done;) {
  53745. var _c2 = _step5.value;
  53746. hasDomGT = hasDomGT || _c2.operator === '>' || _c2.operator === '>=';
  53747. hasDomLT = hasDomLT || _c2.operator === '<' || _c2.operator === '<=';
  53748. if (gt) {
  53749. if (_c2.operator === '>' || _c2.operator === '>=') {
  53750. higher = higherGT$1(gt, _c2, options);
  53751. if (higher === _c2 && higher !== gt) return false;
  53752. } else if (gt.operator === '>=' && !satisfies_1$1(gt.semver, String(_c2), options)) return false;
  53753. }
  53754. if (lt) {
  53755. if (_c2.operator === '<' || _c2.operator === '<=') {
  53756. lower = lowerLT$1(lt, _c2, options);
  53757. if (lower === _c2 && lower !== lt) return false;
  53758. } else if (lt.operator === '<=' && !satisfies_1$1(lt.semver, String(_c2), options)) return false;
  53759. }
  53760. if (!_c2.operator && (lt || gt) && gtltComp !== 0) return false;
  53761. }
  53762. if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
  53763. if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
  53764. return true;
  53765. };
  53766. var higherGT$1 = function higherGT(a, b, options) {
  53767. if (!a) return b;
  53768. var comp = compare_1$2(a.semver, b.semver, options);
  53769. return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a;
  53770. };
  53771. var lowerLT$1 = function lowerLT(a, b, options) {
  53772. if (!a) return b;
  53773. var comp = compare_1$2(a.semver, b.semver, options);
  53774. return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a;
  53775. };
  53776. var subset_1$1 = subset$1;
  53777. ({
  53778. re: re_1$2.re,
  53779. src: re_1$2.src,
  53780. tokens: re_1$2.t,
  53781. SEMVER_SPEC_VERSION: constants$2.SEMVER_SPEC_VERSION,
  53782. SemVer: semver$9,
  53783. compareIdentifiers: identifiers$2.compareIdentifiers,
  53784. rcompareIdentifiers: identifiers$2.rcompareIdentifiers,
  53785. parse: parse_1$2,
  53786. valid: valid_1$1,
  53787. clean: clean_1$1,
  53788. inc: inc_1$1,
  53789. diff: diff_1$1,
  53790. major: major_1$1,
  53791. minor: minor_1$1,
  53792. patch: patch_1$1,
  53793. prerelease: prerelease_1$1,
  53794. compare: compare_1$2,
  53795. rcompare: rcompare_1$1,
  53796. compareLoose: compareLoose_1$1,
  53797. compareBuild: compareBuild_1$1,
  53798. sort: sort_1$1,
  53799. rsort: rsort_1$1,
  53800. gt: gt_1$2,
  53801. lt: lt_1$2,
  53802. eq: eq_1$2,
  53803. neq: neq_1$2,
  53804. gte: gte_1$2,
  53805. lte: lte_1$2,
  53806. cmp: cmp_1$2,
  53807. coerce: coerce_1$2,
  53808. Comparator: comparator$1,
  53809. Range: range$1,
  53810. satisfies: satisfies_1$1,
  53811. toComparators: toComparators_1$1,
  53812. maxSatisfying: maxSatisfying_1$1,
  53813. minSatisfying: minSatisfying_1$1,
  53814. minVersion: minVersion_1$1,
  53815. validRange: valid$2,
  53816. outside: outside_1$1,
  53817. gtr: gtr_1$1,
  53818. ltr: ltr_1$1,
  53819. intersects: intersects_1$1,
  53820. simplifyRange: simplify$1,
  53821. subset: subset_1$1
  53822. });
  53823. var semver$8 = createCommonjsModule(function (module, exports) {
  53824. exports = module.exports = SemVer;
  53825. var debug;
  53826. if (typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG)) {
  53827. debug = function debug() {
  53828. var args = Array.prototype.slice.call(arguments, 0);
  53829. args.unshift('SEMVER');
  53830. console.log.apply(console, args);
  53831. };
  53832. } else {
  53833. debug = function debug() {};
  53834. }
  53835. exports.SEMVER_SPEC_VERSION = '2.0.0';
  53836. var MAX_LENGTH = 256;
  53837. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  53838. var MAX_SAFE_COMPONENT_LENGTH = 16;
  53839. var re = exports.re = [];
  53840. var src = exports.src = [];
  53841. var t = exports.tokens = {};
  53842. var R = 0;
  53843. function tok(n) {
  53844. t[n] = R++;
  53845. }
  53846. tok('NUMERICIDENTIFIER');
  53847. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  53848. tok('NUMERICIDENTIFIERLOOSE');
  53849. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  53850. tok('NONNUMERICIDENTIFIER');
  53851. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  53852. tok('MAINVERSION');
  53853. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  53854. tok('MAINVERSIONLOOSE');
  53855. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  53856. tok('PRERELEASEIDENTIFIER');
  53857. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  53858. tok('PRERELEASEIDENTIFIERLOOSE');
  53859. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  53860. tok('PRERELEASE');
  53861. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  53862. tok('PRERELEASELOOSE');
  53863. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  53864. tok('BUILDIDENTIFIER');
  53865. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  53866. tok('BUILD');
  53867. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  53868. tok('FULL');
  53869. tok('FULLPLAIN');
  53870. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  53871. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  53872. tok('LOOSEPLAIN');
  53873. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  53874. tok('LOOSE');
  53875. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  53876. tok('GTLT');
  53877. src[t.GTLT] = '((?:<|>)?=?)';
  53878. tok('XRANGEIDENTIFIERLOOSE');
  53879. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  53880. tok('XRANGEIDENTIFIER');
  53881. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  53882. tok('XRANGEPLAIN');
  53883. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  53884. tok('XRANGEPLAINLOOSE');
  53885. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  53886. tok('XRANGE');
  53887. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  53888. tok('XRANGELOOSE');
  53889. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  53890. tok('COERCE');
  53891. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  53892. tok('COERCERTL');
  53893. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  53894. tok('LONETILDE');
  53895. src[t.LONETILDE] = '(?:~>?)';
  53896. tok('TILDETRIM');
  53897. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  53898. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  53899. var tildeTrimReplace = '$1~';
  53900. tok('TILDE');
  53901. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  53902. tok('TILDELOOSE');
  53903. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  53904. tok('LONECARET');
  53905. src[t.LONECARET] = '(?:\\^)';
  53906. tok('CARETTRIM');
  53907. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  53908. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  53909. var caretTrimReplace = '$1^';
  53910. tok('CARET');
  53911. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  53912. tok('CARETLOOSE');
  53913. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  53914. tok('COMPARATORLOOSE');
  53915. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  53916. tok('COMPARATOR');
  53917. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  53918. tok('COMPARATORTRIM');
  53919. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  53920. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  53921. var comparatorTrimReplace = '$1$2$3';
  53922. tok('HYPHENRANGE');
  53923. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  53924. tok('HYPHENRANGELOOSE');
  53925. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  53926. tok('STAR');
  53927. src[t.STAR] = '(<|>)?=?\\s*\\*';
  53928. for (var i = 0; i < R; i++) {
  53929. debug(i, src[i]);
  53930. if (!re[i]) {
  53931. re[i] = new RegExp(src[i]);
  53932. }
  53933. }
  53934. exports.parse = parse;
  53935. function parse(version, options) {
  53936. if (!options || typeof options !== 'object') {
  53937. options = {
  53938. loose: !!options,
  53939. includePrerelease: false
  53940. };
  53941. }
  53942. if (version instanceof SemVer) {
  53943. return version;
  53944. }
  53945. if (typeof version !== 'string') {
  53946. return null;
  53947. }
  53948. if (version.length > MAX_LENGTH) {
  53949. return null;
  53950. }
  53951. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  53952. if (!r.test(version)) {
  53953. return null;
  53954. }
  53955. try {
  53956. return new SemVer(version, options);
  53957. } catch (er) {
  53958. return null;
  53959. }
  53960. }
  53961. exports.valid = valid;
  53962. function valid(version, options) {
  53963. var v = parse(version, options);
  53964. return v ? v.version : null;
  53965. }
  53966. exports.clean = clean;
  53967. function clean(version, options) {
  53968. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  53969. return s ? s.version : null;
  53970. }
  53971. exports.SemVer = SemVer;
  53972. function SemVer(version, options) {
  53973. if (!options || typeof options !== 'object') {
  53974. options = {
  53975. loose: !!options,
  53976. includePrerelease: false
  53977. };
  53978. }
  53979. if (version instanceof SemVer) {
  53980. if (version.loose === options.loose) {
  53981. return version;
  53982. } else {
  53983. version = version.version;
  53984. }
  53985. } else if (typeof version !== 'string') {
  53986. throw new TypeError('Invalid Version: ' + version);
  53987. }
  53988. if (version.length > MAX_LENGTH) {
  53989. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  53990. }
  53991. if (!(this instanceof SemVer)) {
  53992. return new SemVer(version, options);
  53993. }
  53994. debug('SemVer', version, options);
  53995. this.options = options;
  53996. this.loose = !!options.loose;
  53997. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  53998. if (!m) {
  53999. throw new TypeError('Invalid Version: ' + version);
  54000. }
  54001. this.raw = version;
  54002. this.major = +m[1];
  54003. this.minor = +m[2];
  54004. this.patch = +m[3];
  54005. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  54006. throw new TypeError('Invalid major version');
  54007. }
  54008. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  54009. throw new TypeError('Invalid minor version');
  54010. }
  54011. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  54012. throw new TypeError('Invalid patch version');
  54013. }
  54014. if (!m[4]) {
  54015. this.prerelease = [];
  54016. } else {
  54017. this.prerelease = m[4].split('.').map(function (id) {
  54018. if (/^[0-9]+$/.test(id)) {
  54019. var num = +id;
  54020. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  54021. return num;
  54022. }
  54023. }
  54024. return id;
  54025. });
  54026. }
  54027. this.build = m[5] ? m[5].split('.') : [];
  54028. this.format();
  54029. }
  54030. SemVer.prototype.format = function () {
  54031. this.version = this.major + '.' + this.minor + '.' + this.patch;
  54032. if (this.prerelease.length) {
  54033. this.version += '-' + this.prerelease.join('.');
  54034. }
  54035. return this.version;
  54036. };
  54037. SemVer.prototype.toString = function () {
  54038. return this.version;
  54039. };
  54040. SemVer.prototype.compare = function (other) {
  54041. debug('SemVer.compare', this.version, this.options, other);
  54042. if (!(other instanceof SemVer)) {
  54043. other = new SemVer(other, this.options);
  54044. }
  54045. return this.compareMain(other) || this.comparePre(other);
  54046. };
  54047. SemVer.prototype.compareMain = function (other) {
  54048. if (!(other instanceof SemVer)) {
  54049. other = new SemVer(other, this.options);
  54050. }
  54051. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  54052. };
  54053. SemVer.prototype.comparePre = function (other) {
  54054. if (!(other instanceof SemVer)) {
  54055. other = new SemVer(other, this.options);
  54056. }
  54057. if (this.prerelease.length && !other.prerelease.length) {
  54058. return -1;
  54059. } else if (!this.prerelease.length && other.prerelease.length) {
  54060. return 1;
  54061. } else if (!this.prerelease.length && !other.prerelease.length) {
  54062. return 0;
  54063. }
  54064. var i = 0;
  54065. do {
  54066. var a = this.prerelease[i];
  54067. var b = other.prerelease[i];
  54068. debug('prerelease compare', i, a, b);
  54069. if (a === undefined && b === undefined) {
  54070. return 0;
  54071. } else if (b === undefined) {
  54072. return 1;
  54073. } else if (a === undefined) {
  54074. return -1;
  54075. } else if (a === b) {
  54076. continue;
  54077. } else {
  54078. return compareIdentifiers(a, b);
  54079. }
  54080. } while (++i);
  54081. };
  54082. SemVer.prototype.compareBuild = function (other) {
  54083. if (!(other instanceof SemVer)) {
  54084. other = new SemVer(other, this.options);
  54085. }
  54086. var i = 0;
  54087. do {
  54088. var a = this.build[i];
  54089. var b = other.build[i];
  54090. debug('prerelease compare', i, a, b);
  54091. if (a === undefined && b === undefined) {
  54092. return 0;
  54093. } else if (b === undefined) {
  54094. return 1;
  54095. } else if (a === undefined) {
  54096. return -1;
  54097. } else if (a === b) {
  54098. continue;
  54099. } else {
  54100. return compareIdentifiers(a, b);
  54101. }
  54102. } while (++i);
  54103. };
  54104. SemVer.prototype.inc = function (release, identifier) {
  54105. switch (release) {
  54106. case 'premajor':
  54107. this.prerelease.length = 0;
  54108. this.patch = 0;
  54109. this.minor = 0;
  54110. this.major++;
  54111. this.inc('pre', identifier);
  54112. break;
  54113. case 'preminor':
  54114. this.prerelease.length = 0;
  54115. this.patch = 0;
  54116. this.minor++;
  54117. this.inc('pre', identifier);
  54118. break;
  54119. case 'prepatch':
  54120. this.prerelease.length = 0;
  54121. this.inc('patch', identifier);
  54122. this.inc('pre', identifier);
  54123. break;
  54124. case 'prerelease':
  54125. if (this.prerelease.length === 0) {
  54126. this.inc('patch', identifier);
  54127. }
  54128. this.inc('pre', identifier);
  54129. break;
  54130. case 'major':
  54131. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  54132. this.major++;
  54133. }
  54134. this.minor = 0;
  54135. this.patch = 0;
  54136. this.prerelease = [];
  54137. break;
  54138. case 'minor':
  54139. if (this.patch !== 0 || this.prerelease.length === 0) {
  54140. this.minor++;
  54141. }
  54142. this.patch = 0;
  54143. this.prerelease = [];
  54144. break;
  54145. case 'patch':
  54146. if (this.prerelease.length === 0) {
  54147. this.patch++;
  54148. }
  54149. this.prerelease = [];
  54150. break;
  54151. case 'pre':
  54152. if (this.prerelease.length === 0) {
  54153. this.prerelease = [0];
  54154. } else {
  54155. var i = this.prerelease.length;
  54156. while (--i >= 0) {
  54157. if (typeof this.prerelease[i] === 'number') {
  54158. this.prerelease[i]++;
  54159. i = -2;
  54160. }
  54161. }
  54162. if (i === -1) {
  54163. this.prerelease.push(0);
  54164. }
  54165. }
  54166. if (identifier) {
  54167. if (this.prerelease[0] === identifier) {
  54168. if (isNaN(this.prerelease[1])) {
  54169. this.prerelease = [identifier, 0];
  54170. }
  54171. } else {
  54172. this.prerelease = [identifier, 0];
  54173. }
  54174. }
  54175. break;
  54176. default:
  54177. throw new Error('invalid increment argument: ' + release);
  54178. }
  54179. this.format();
  54180. this.raw = this.version;
  54181. return this;
  54182. };
  54183. exports.inc = inc;
  54184. function inc(version, release, loose, identifier) {
  54185. if (typeof loose === 'string') {
  54186. identifier = loose;
  54187. loose = undefined;
  54188. }
  54189. try {
  54190. return new SemVer(version, loose).inc(release, identifier).version;
  54191. } catch (er) {
  54192. return null;
  54193. }
  54194. }
  54195. exports.diff = diff;
  54196. function diff(version1, version2) {
  54197. if (eq(version1, version2)) {
  54198. return null;
  54199. } else {
  54200. var v1 = parse(version1);
  54201. var v2 = parse(version2);
  54202. var prefix = '';
  54203. if (v1.prerelease.length || v2.prerelease.length) {
  54204. prefix = 'pre';
  54205. var defaultResult = 'prerelease';
  54206. }
  54207. for (var key in v1) {
  54208. if (key === 'major' || key === 'minor' || key === 'patch') {
  54209. if (v1[key] !== v2[key]) {
  54210. return prefix + key;
  54211. }
  54212. }
  54213. }
  54214. return defaultResult;
  54215. }
  54216. }
  54217. exports.compareIdentifiers = compareIdentifiers;
  54218. var numeric = /^[0-9]+$/;
  54219. function compareIdentifiers(a, b) {
  54220. var anum = numeric.test(a);
  54221. var bnum = numeric.test(b);
  54222. if (anum && bnum) {
  54223. a = +a;
  54224. b = +b;
  54225. }
  54226. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  54227. }
  54228. exports.rcompareIdentifiers = rcompareIdentifiers;
  54229. function rcompareIdentifiers(a, b) {
  54230. return compareIdentifiers(b, a);
  54231. }
  54232. exports.major = major;
  54233. function major(a, loose) {
  54234. return new SemVer(a, loose).major;
  54235. }
  54236. exports.minor = minor;
  54237. function minor(a, loose) {
  54238. return new SemVer(a, loose).minor;
  54239. }
  54240. exports.patch = patch;
  54241. function patch(a, loose) {
  54242. return new SemVer(a, loose).patch;
  54243. }
  54244. exports.compare = compare;
  54245. function compare(a, b, loose) {
  54246. return new SemVer(a, loose).compare(new SemVer(b, loose));
  54247. }
  54248. exports.compareLoose = compareLoose;
  54249. function compareLoose(a, b) {
  54250. return compare(a, b, true);
  54251. }
  54252. exports.compareBuild = compareBuild;
  54253. function compareBuild(a, b, loose) {
  54254. var versionA = new SemVer(a, loose);
  54255. var versionB = new SemVer(b, loose);
  54256. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  54257. }
  54258. exports.rcompare = rcompare;
  54259. function rcompare(a, b, loose) {
  54260. return compare(b, a, loose);
  54261. }
  54262. exports.sort = sort;
  54263. function sort(list, loose) {
  54264. return list.sort(function (a, b) {
  54265. return exports.compareBuild(a, b, loose);
  54266. });
  54267. }
  54268. exports.rsort = rsort;
  54269. function rsort(list, loose) {
  54270. return list.sort(function (a, b) {
  54271. return exports.compareBuild(b, a, loose);
  54272. });
  54273. }
  54274. exports.gt = gt;
  54275. function gt(a, b, loose) {
  54276. return compare(a, b, loose) > 0;
  54277. }
  54278. exports.lt = lt;
  54279. function lt(a, b, loose) {
  54280. return compare(a, b, loose) < 0;
  54281. }
  54282. exports.eq = eq;
  54283. function eq(a, b, loose) {
  54284. return compare(a, b, loose) === 0;
  54285. }
  54286. exports.neq = neq;
  54287. function neq(a, b, loose) {
  54288. return compare(a, b, loose) !== 0;
  54289. }
  54290. exports.gte = gte;
  54291. function gte(a, b, loose) {
  54292. return compare(a, b, loose) >= 0;
  54293. }
  54294. exports.lte = lte;
  54295. function lte(a, b, loose) {
  54296. return compare(a, b, loose) <= 0;
  54297. }
  54298. exports.cmp = cmp;
  54299. function cmp(a, op, b, loose) {
  54300. switch (op) {
  54301. case '===':
  54302. if (typeof a === 'object') a = a.version;
  54303. if (typeof b === 'object') b = b.version;
  54304. return a === b;
  54305. case '!==':
  54306. if (typeof a === 'object') a = a.version;
  54307. if (typeof b === 'object') b = b.version;
  54308. return a !== b;
  54309. case '':
  54310. case '=':
  54311. case '==':
  54312. return eq(a, b, loose);
  54313. case '!=':
  54314. return neq(a, b, loose);
  54315. case '>':
  54316. return gt(a, b, loose);
  54317. case '>=':
  54318. return gte(a, b, loose);
  54319. case '<':
  54320. return lt(a, b, loose);
  54321. case '<=':
  54322. return lte(a, b, loose);
  54323. default:
  54324. throw new TypeError('Invalid operator: ' + op);
  54325. }
  54326. }
  54327. exports.Comparator = Comparator;
  54328. function Comparator(comp, options) {
  54329. if (!options || typeof options !== 'object') {
  54330. options = {
  54331. loose: !!options,
  54332. includePrerelease: false
  54333. };
  54334. }
  54335. if (comp instanceof Comparator) {
  54336. if (comp.loose === !!options.loose) {
  54337. return comp;
  54338. } else {
  54339. comp = comp.value;
  54340. }
  54341. }
  54342. if (!(this instanceof Comparator)) {
  54343. return new Comparator(comp, options);
  54344. }
  54345. debug('comparator', comp, options);
  54346. this.options = options;
  54347. this.loose = !!options.loose;
  54348. this.parse(comp);
  54349. if (this.semver === ANY) {
  54350. this.value = '';
  54351. } else {
  54352. this.value = this.operator + this.semver.version;
  54353. }
  54354. debug('comp', this);
  54355. }
  54356. var ANY = {};
  54357. Comparator.prototype.parse = function (comp) {
  54358. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  54359. var m = comp.match(r);
  54360. if (!m) {
  54361. throw new TypeError('Invalid comparator: ' + comp);
  54362. }
  54363. this.operator = m[1] !== undefined ? m[1] : '';
  54364. if (this.operator === '=') {
  54365. this.operator = '';
  54366. }
  54367. if (!m[2]) {
  54368. this.semver = ANY;
  54369. } else {
  54370. this.semver = new SemVer(m[2], this.options.loose);
  54371. }
  54372. };
  54373. Comparator.prototype.toString = function () {
  54374. return this.value;
  54375. };
  54376. Comparator.prototype.test = function (version) {
  54377. debug('Comparator.test', version, this.options.loose);
  54378. if (this.semver === ANY || version === ANY) {
  54379. return true;
  54380. }
  54381. if (typeof version === 'string') {
  54382. try {
  54383. version = new SemVer(version, this.options);
  54384. } catch (er) {
  54385. return false;
  54386. }
  54387. }
  54388. return cmp(version, this.operator, this.semver, this.options);
  54389. };
  54390. Comparator.prototype.intersects = function (comp, options) {
  54391. if (!(comp instanceof Comparator)) {
  54392. throw new TypeError('a Comparator is required');
  54393. }
  54394. if (!options || typeof options !== 'object') {
  54395. options = {
  54396. loose: !!options,
  54397. includePrerelease: false
  54398. };
  54399. }
  54400. var rangeTmp;
  54401. if (this.operator === '') {
  54402. if (this.value === '') {
  54403. return true;
  54404. }
  54405. rangeTmp = new Range(comp.value, options);
  54406. return satisfies(this.value, rangeTmp, options);
  54407. } else if (comp.operator === '') {
  54408. if (comp.value === '') {
  54409. return true;
  54410. }
  54411. rangeTmp = new Range(this.value, options);
  54412. return satisfies(comp.semver, rangeTmp, options);
  54413. }
  54414. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  54415. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  54416. var sameSemVer = this.semver.version === comp.semver.version;
  54417. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  54418. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  54419. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  54420. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  54421. };
  54422. exports.Range = Range;
  54423. function Range(range, options) {
  54424. if (!options || typeof options !== 'object') {
  54425. options = {
  54426. loose: !!options,
  54427. includePrerelease: false
  54428. };
  54429. }
  54430. if (range instanceof Range) {
  54431. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  54432. return range;
  54433. } else {
  54434. return new Range(range.raw, options);
  54435. }
  54436. }
  54437. if (range instanceof Comparator) {
  54438. return new Range(range.value, options);
  54439. }
  54440. if (!(this instanceof Range)) {
  54441. return new Range(range, options);
  54442. }
  54443. this.options = options;
  54444. this.loose = !!options.loose;
  54445. this.includePrerelease = !!options.includePrerelease;
  54446. this.raw = range;
  54447. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  54448. return this.parseRange(range.trim());
  54449. }, this).filter(function (c) {
  54450. return c.length;
  54451. });
  54452. if (!this.set.length) {
  54453. throw new TypeError('Invalid SemVer Range: ' + range);
  54454. }
  54455. this.format();
  54456. }
  54457. Range.prototype.format = function () {
  54458. this.range = this.set.map(function (comps) {
  54459. return comps.join(' ').trim();
  54460. }).join('||').trim();
  54461. return this.range;
  54462. };
  54463. Range.prototype.toString = function () {
  54464. return this.range;
  54465. };
  54466. Range.prototype.parseRange = function (range) {
  54467. var loose = this.options.loose;
  54468. range = range.trim();
  54469. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  54470. range = range.replace(hr, hyphenReplace);
  54471. debug('hyphen replace', range);
  54472. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  54473. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  54474. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  54475. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  54476. range = range.split(/\s+/).join(' ');
  54477. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  54478. var set = range.split(' ').map(function (comp) {
  54479. return parseComparator(comp, this.options);
  54480. }, this).join(' ').split(/\s+/);
  54481. if (this.options.loose) {
  54482. set = set.filter(function (comp) {
  54483. return !!comp.match(compRe);
  54484. });
  54485. }
  54486. set = set.map(function (comp) {
  54487. return new Comparator(comp, this.options);
  54488. }, this);
  54489. return set;
  54490. };
  54491. Range.prototype.intersects = function (range, options) {
  54492. if (!(range instanceof Range)) {
  54493. throw new TypeError('a Range is required');
  54494. }
  54495. return this.set.some(function (thisComparators) {
  54496. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  54497. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  54498. return rangeComparators.every(function (rangeComparator) {
  54499. return thisComparator.intersects(rangeComparator, options);
  54500. });
  54501. });
  54502. });
  54503. });
  54504. };
  54505. function isSatisfiable(comparators, options) {
  54506. var result = true;
  54507. var remainingComparators = comparators.slice();
  54508. var testComparator = remainingComparators.pop();
  54509. while (result && remainingComparators.length) {
  54510. result = remainingComparators.every(function (otherComparator) {
  54511. return testComparator.intersects(otherComparator, options);
  54512. });
  54513. testComparator = remainingComparators.pop();
  54514. }
  54515. return result;
  54516. }
  54517. exports.toComparators = toComparators;
  54518. function toComparators(range, options) {
  54519. return new Range(range, options).set.map(function (comp) {
  54520. return comp.map(function (c) {
  54521. return c.value;
  54522. }).join(' ').trim().split(' ');
  54523. });
  54524. }
  54525. function parseComparator(comp, options) {
  54526. debug('comp', comp, options);
  54527. comp = replaceCarets(comp, options);
  54528. debug('caret', comp);
  54529. comp = replaceTildes(comp, options);
  54530. debug('tildes', comp);
  54531. comp = replaceXRanges(comp, options);
  54532. debug('xrange', comp);
  54533. comp = replaceStars(comp, options);
  54534. debug('stars', comp);
  54535. return comp;
  54536. }
  54537. function isX(id) {
  54538. return !id || id.toLowerCase() === 'x' || id === '*';
  54539. }
  54540. function replaceTildes(comp, options) {
  54541. return comp.trim().split(/\s+/).map(function (comp) {
  54542. return replaceTilde(comp, options);
  54543. }).join(' ');
  54544. }
  54545. function replaceTilde(comp, options) {
  54546. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  54547. return comp.replace(r, function (_, M, m, p, pr) {
  54548. debug('tilde', comp, _, M, m, p, pr);
  54549. var ret;
  54550. if (isX(M)) {
  54551. ret = '';
  54552. } else if (isX(m)) {
  54553. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  54554. } else if (isX(p)) {
  54555. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  54556. } else if (pr) {
  54557. debug('replaceTilde pr', pr);
  54558. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  54559. } else {
  54560. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  54561. }
  54562. debug('tilde return', ret);
  54563. return ret;
  54564. });
  54565. }
  54566. function replaceCarets(comp, options) {
  54567. return comp.trim().split(/\s+/).map(function (comp) {
  54568. return replaceCaret(comp, options);
  54569. }).join(' ');
  54570. }
  54571. function replaceCaret(comp, options) {
  54572. debug('caret', comp, options);
  54573. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  54574. return comp.replace(r, function (_, M, m, p, pr) {
  54575. debug('caret', comp, _, M, m, p, pr);
  54576. var ret;
  54577. if (isX(M)) {
  54578. ret = '';
  54579. } else if (isX(m)) {
  54580. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  54581. } else if (isX(p)) {
  54582. if (M === '0') {
  54583. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  54584. } else {
  54585. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  54586. }
  54587. } else if (pr) {
  54588. debug('replaceCaret pr', pr);
  54589. if (M === '0') {
  54590. if (m === '0') {
  54591. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  54592. } else {
  54593. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  54594. }
  54595. } else {
  54596. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  54597. }
  54598. } else {
  54599. debug('no pr');
  54600. if (M === '0') {
  54601. if (m === '0') {
  54602. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  54603. } else {
  54604. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  54605. }
  54606. } else {
  54607. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  54608. }
  54609. }
  54610. debug('caret return', ret);
  54611. return ret;
  54612. });
  54613. }
  54614. function replaceXRanges(comp, options) {
  54615. debug('replaceXRanges', comp, options);
  54616. return comp.split(/\s+/).map(function (comp) {
  54617. return replaceXRange(comp, options);
  54618. }).join(' ');
  54619. }
  54620. function replaceXRange(comp, options) {
  54621. comp = comp.trim();
  54622. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  54623. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  54624. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  54625. var xM = isX(M);
  54626. var xm = xM || isX(m);
  54627. var xp = xm || isX(p);
  54628. var anyX = xp;
  54629. if (gtlt === '=' && anyX) {
  54630. gtlt = '';
  54631. }
  54632. pr = options.includePrerelease ? '-0' : '';
  54633. if (xM) {
  54634. if (gtlt === '>' || gtlt === '<') {
  54635. ret = '<0.0.0-0';
  54636. } else {
  54637. ret = '*';
  54638. }
  54639. } else if (gtlt && anyX) {
  54640. if (xm) {
  54641. m = 0;
  54642. }
  54643. p = 0;
  54644. if (gtlt === '>') {
  54645. gtlt = '>=';
  54646. if (xm) {
  54647. M = +M + 1;
  54648. m = 0;
  54649. p = 0;
  54650. } else {
  54651. m = +m + 1;
  54652. p = 0;
  54653. }
  54654. } else if (gtlt === '<=') {
  54655. gtlt = '<';
  54656. if (xm) {
  54657. M = +M + 1;
  54658. } else {
  54659. m = +m + 1;
  54660. }
  54661. }
  54662. ret = gtlt + M + '.' + m + '.' + p + pr;
  54663. } else if (xm) {
  54664. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  54665. } else if (xp) {
  54666. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  54667. }
  54668. debug('xRange return', ret);
  54669. return ret;
  54670. });
  54671. }
  54672. function replaceStars(comp, options) {
  54673. debug('replaceStars', comp, options);
  54674. return comp.trim().replace(re[t.STAR], '');
  54675. }
  54676. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  54677. if (isX(fM)) {
  54678. from = '';
  54679. } else if (isX(fm)) {
  54680. from = '>=' + fM + '.0.0';
  54681. } else if (isX(fp)) {
  54682. from = '>=' + fM + '.' + fm + '.0';
  54683. } else {
  54684. from = '>=' + from;
  54685. }
  54686. if (isX(tM)) {
  54687. to = '';
  54688. } else if (isX(tm)) {
  54689. to = '<' + (+tM + 1) + '.0.0';
  54690. } else if (isX(tp)) {
  54691. to = '<' + tM + '.' + (+tm + 1) + '.0';
  54692. } else if (tpr) {
  54693. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  54694. } else {
  54695. to = '<=' + to;
  54696. }
  54697. return (from + ' ' + to).trim();
  54698. }
  54699. Range.prototype.test = function (version) {
  54700. if (!version) {
  54701. return false;
  54702. }
  54703. if (typeof version === 'string') {
  54704. try {
  54705. version = new SemVer(version, this.options);
  54706. } catch (er) {
  54707. return false;
  54708. }
  54709. }
  54710. for (var i = 0; i < this.set.length; i++) {
  54711. if (testSet(this.set[i], version, this.options)) {
  54712. return true;
  54713. }
  54714. }
  54715. return false;
  54716. };
  54717. function testSet(set, version, options) {
  54718. for (var i = 0; i < set.length; i++) {
  54719. if (!set[i].test(version)) {
  54720. return false;
  54721. }
  54722. }
  54723. if (version.prerelease.length && !options.includePrerelease) {
  54724. for (i = 0; i < set.length; i++) {
  54725. debug(set[i].semver);
  54726. if (set[i].semver === ANY) {
  54727. continue;
  54728. }
  54729. if (set[i].semver.prerelease.length > 0) {
  54730. var allowed = set[i].semver;
  54731. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  54732. return true;
  54733. }
  54734. }
  54735. }
  54736. return false;
  54737. }
  54738. return true;
  54739. }
  54740. exports.satisfies = satisfies;
  54741. function satisfies(version, range, options) {
  54742. try {
  54743. range = new Range(range, options);
  54744. } catch (er) {
  54745. return false;
  54746. }
  54747. return range.test(version);
  54748. }
  54749. exports.maxSatisfying = maxSatisfying;
  54750. function maxSatisfying(versions, range, options) {
  54751. var max = null;
  54752. var maxSV = null;
  54753. try {
  54754. var rangeObj = new Range(range, options);
  54755. } catch (er) {
  54756. return null;
  54757. }
  54758. versions.forEach(function (v) {
  54759. if (rangeObj.test(v)) {
  54760. if (!max || maxSV.compare(v) === -1) {
  54761. max = v;
  54762. maxSV = new SemVer(max, options);
  54763. }
  54764. }
  54765. });
  54766. return max;
  54767. }
  54768. exports.minSatisfying = minSatisfying;
  54769. function minSatisfying(versions, range, options) {
  54770. var min = null;
  54771. var minSV = null;
  54772. try {
  54773. var rangeObj = new Range(range, options);
  54774. } catch (er) {
  54775. return null;
  54776. }
  54777. versions.forEach(function (v) {
  54778. if (rangeObj.test(v)) {
  54779. if (!min || minSV.compare(v) === 1) {
  54780. min = v;
  54781. minSV = new SemVer(min, options);
  54782. }
  54783. }
  54784. });
  54785. return min;
  54786. }
  54787. exports.minVersion = minVersion;
  54788. function minVersion(range, loose) {
  54789. range = new Range(range, loose);
  54790. var minver = new SemVer('0.0.0');
  54791. if (range.test(minver)) {
  54792. return minver;
  54793. }
  54794. minver = new SemVer('0.0.0-0');
  54795. if (range.test(minver)) {
  54796. return minver;
  54797. }
  54798. minver = null;
  54799. for (var i = 0; i < range.set.length; ++i) {
  54800. var comparators = range.set[i];
  54801. comparators.forEach(function (comparator) {
  54802. var compver = new SemVer(comparator.semver.version);
  54803. switch (comparator.operator) {
  54804. case '>':
  54805. if (compver.prerelease.length === 0) {
  54806. compver.patch++;
  54807. } else {
  54808. compver.prerelease.push(0);
  54809. }
  54810. compver.raw = compver.format();
  54811. case '':
  54812. case '>=':
  54813. if (!minver || gt(minver, compver)) {
  54814. minver = compver;
  54815. }
  54816. break;
  54817. case '<':
  54818. case '<=':
  54819. break;
  54820. default:
  54821. throw new Error('Unexpected operation: ' + comparator.operator);
  54822. }
  54823. });
  54824. }
  54825. if (minver && range.test(minver)) {
  54826. return minver;
  54827. }
  54828. return null;
  54829. }
  54830. exports.validRange = validRange;
  54831. function validRange(range, options) {
  54832. try {
  54833. return new Range(range, options).range || '*';
  54834. } catch (er) {
  54835. return null;
  54836. }
  54837. }
  54838. exports.ltr = ltr;
  54839. function ltr(version, range, options) {
  54840. return outside(version, range, '<', options);
  54841. }
  54842. exports.gtr = gtr;
  54843. function gtr(version, range, options) {
  54844. return outside(version, range, '>', options);
  54845. }
  54846. exports.outside = outside;
  54847. function outside(version, range, hilo, options) {
  54848. version = new SemVer(version, options);
  54849. range = new Range(range, options);
  54850. var gtfn, ltefn, ltfn, comp, ecomp;
  54851. switch (hilo) {
  54852. case '>':
  54853. gtfn = gt;
  54854. ltefn = lte;
  54855. ltfn = lt;
  54856. comp = '>';
  54857. ecomp = '>=';
  54858. break;
  54859. case '<':
  54860. gtfn = lt;
  54861. ltefn = gte;
  54862. ltfn = gt;
  54863. comp = '<';
  54864. ecomp = '<=';
  54865. break;
  54866. default:
  54867. throw new TypeError('Must provide a hilo val of "<" or ">"');
  54868. }
  54869. if (satisfies(version, range, options)) {
  54870. return false;
  54871. }
  54872. for (var i = 0; i < range.set.length; ++i) {
  54873. var comparators = range.set[i];
  54874. var high = null;
  54875. var low = null;
  54876. comparators.forEach(function (comparator) {
  54877. if (comparator.semver === ANY) {
  54878. comparator = new Comparator('>=0.0.0');
  54879. }
  54880. high = high || comparator;
  54881. low = low || comparator;
  54882. if (gtfn(comparator.semver, high.semver, options)) {
  54883. high = comparator;
  54884. } else if (ltfn(comparator.semver, low.semver, options)) {
  54885. low = comparator;
  54886. }
  54887. });
  54888. if (high.operator === comp || high.operator === ecomp) {
  54889. return false;
  54890. }
  54891. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  54892. return false;
  54893. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  54894. return false;
  54895. }
  54896. }
  54897. return true;
  54898. }
  54899. exports.prerelease = prerelease;
  54900. function prerelease(version, options) {
  54901. var parsed = parse(version, options);
  54902. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  54903. }
  54904. exports.intersects = intersects;
  54905. function intersects(r1, r2, options) {
  54906. r1 = new Range(r1, options);
  54907. r2 = new Range(r2, options);
  54908. return r1.intersects(r2);
  54909. }
  54910. exports.coerce = coerce;
  54911. function coerce(version, options) {
  54912. if (version instanceof SemVer) {
  54913. return version;
  54914. }
  54915. if (typeof version === 'number') {
  54916. version = String(version);
  54917. }
  54918. if (typeof version !== 'string') {
  54919. return null;
  54920. }
  54921. options = options || {};
  54922. var match = null;
  54923. if (!options.rtl) {
  54924. match = version.match(re[t.COERCE]);
  54925. } else {
  54926. var next;
  54927. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  54928. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  54929. match = next;
  54930. }
  54931. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  54932. }
  54933. re[t.COERCERTL].lastIndex = -1;
  54934. }
  54935. if (match === null) {
  54936. return null;
  54937. }
  54938. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  54939. }
  54940. }, "/$$rollup_base$$/packages/babel-helper-compilation-targets/node_modules/semver/node_modules/semver-BABEL_8_BREAKING-false");
  54941. var semver$7 = semver$8;
  54942. var unreleasedLabels = {
  54943. safari: "tp"
  54944. };
  54945. var browserNameMap = {
  54946. and_chr: "chrome",
  54947. and_ff: "firefox",
  54948. android: "android",
  54949. chrome: "chrome",
  54950. edge: "edge",
  54951. firefox: "firefox",
  54952. ie: "ie",
  54953. ie_mob: "ie",
  54954. ios_saf: "ios",
  54955. node: "node",
  54956. op_mob: "opera",
  54957. opera: "opera",
  54958. safari: "safari",
  54959. samsung: "samsung"
  54960. };
  54961. var versionRegExp = /^(\d+|\d+.\d+)$/;
  54962. var v$3 = new OptionValidator("@babel/helper-compilation-targets");
  54963. function semverMin(first, second) {
  54964. return first && semver$7.lt(first, second) ? first : second;
  54965. }
  54966. function semverify(version) {
  54967. if (typeof version === "string" && semver$7.valid(version)) {
  54968. return version;
  54969. }
  54970. v$3.invariant(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), "'" + version + "' is not a valid version");
  54971. var split = version.toString().split(".");
  54972. while (split.length < 3) {
  54973. split.push("0");
  54974. }
  54975. return split.join(".");
  54976. }
  54977. function isUnreleasedVersion(version, env) {
  54978. var unreleasedLabel = unreleasedLabels[env];
  54979. return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase();
  54980. }
  54981. function getLowestUnreleased(a, b, env) {
  54982. var unreleasedLabel = unreleasedLabels[env];
  54983. var hasUnreleased = [a, b].some(function (item) {
  54984. return item === unreleasedLabel;
  54985. });
  54986. if (hasUnreleased) {
  54987. return a === hasUnreleased ? b : a || b;
  54988. }
  54989. return semverMin(a, b);
  54990. }
  54991. function getHighestUnreleased(a, b, env) {
  54992. return getLowestUnreleased(a, b, env) === a ? b : a;
  54993. }
  54994. function getLowestImplementedVersion(plugin, environment) {
  54995. var result = plugin[environment];
  54996. if (!result && environment === "android") {
  54997. return plugin.chrome;
  54998. }
  54999. return result;
  55000. }
  55001. var TargetNames = {
  55002. node: "node",
  55003. chrome: "chrome",
  55004. opera: "opera",
  55005. edge: "edge",
  55006. firefox: "firefox",
  55007. safari: "safari",
  55008. ie: "ie",
  55009. ios: "ios",
  55010. android: "android",
  55011. electron: "electron",
  55012. samsung: "samsung"
  55013. };
  55014. function prettifyVersion(version) {
  55015. if (typeof version !== "string") {
  55016. return version;
  55017. }
  55018. var parts = [semver$7.major(version)];
  55019. var minor = semver$7.minor(version);
  55020. var patch = semver$7.patch(version);
  55021. if (minor || patch) {
  55022. parts.push(minor);
  55023. }
  55024. if (patch) {
  55025. parts.push(patch);
  55026. }
  55027. return parts.join(".");
  55028. }
  55029. function prettifyTargets(targets) {
  55030. return Object.keys(targets).reduce(function (results, target) {
  55031. var value = targets[target];
  55032. var unreleasedLabel = unreleasedLabels[target];
  55033. if (typeof value === "string" && unreleasedLabel !== value) {
  55034. value = prettifyVersion(value);
  55035. }
  55036. results[target] = value;
  55037. return results;
  55038. }, {});
  55039. }
  55040. function getInclusionReasons(item, targetVersions, list) {
  55041. var minVersions = list[item] || {};
  55042. return Object.keys(targetVersions).reduce(function (result, env) {
  55043. var minVersion = getLowestImplementedVersion(minVersions, env);
  55044. var targetVersion = targetVersions[env];
  55045. if (!minVersion) {
  55046. result[env] = prettifyVersion(targetVersion);
  55047. } else {
  55048. var minIsUnreleased = isUnreleasedVersion(minVersion, env);
  55049. var targetIsUnreleased = isUnreleasedVersion(targetVersion, env);
  55050. if (!targetIsUnreleased && (minIsUnreleased || semver$7.lt(targetVersion.toString(), semverify(minVersion)))) {
  55051. result[env] = prettifyVersion(targetVersion);
  55052. }
  55053. }
  55054. return result;
  55055. }, {});
  55056. }
  55057. var require$$0$6 = {
  55058. "proposal-class-static-block": {
  55059. chrome: "91",
  55060. electron: "13.0"
  55061. },
  55062. "proposal-private-property-in-object": {
  55063. chrome: "91",
  55064. firefox: "90",
  55065. electron: "13.0"
  55066. },
  55067. "proposal-class-properties": {
  55068. chrome: "74",
  55069. opera: "62",
  55070. edge: "79",
  55071. firefox: "90",
  55072. safari: "14.1",
  55073. node: "12",
  55074. samsung: "11",
  55075. electron: "6.0"
  55076. },
  55077. "proposal-private-methods": {
  55078. chrome: "84",
  55079. opera: "70",
  55080. edge: "84",
  55081. firefox: "90",
  55082. safari: "15",
  55083. node: "14.6",
  55084. electron: "10.0"
  55085. },
  55086. "proposal-numeric-separator": {
  55087. chrome: "75",
  55088. opera: "62",
  55089. edge: "79",
  55090. firefox: "70",
  55091. safari: "13",
  55092. node: "12.5",
  55093. ios: "13",
  55094. samsung: "11",
  55095. electron: "6.0"
  55096. },
  55097. "proposal-logical-assignment-operators": {
  55098. chrome: "85",
  55099. opera: "71",
  55100. edge: "85",
  55101. firefox: "79",
  55102. safari: "14",
  55103. node: "15",
  55104. ios: "14",
  55105. electron: "10.0"
  55106. },
  55107. "proposal-nullish-coalescing-operator": {
  55108. chrome: "80",
  55109. opera: "67",
  55110. edge: "80",
  55111. firefox: "72",
  55112. safari: "13.1",
  55113. node: "14",
  55114. ios: "13.4",
  55115. samsung: "13",
  55116. electron: "8.0"
  55117. },
  55118. "proposal-optional-chaining": {
  55119. firefox: "74",
  55120. safari: "13.1",
  55121. ios: "13.4"
  55122. },
  55123. "proposal-json-strings": {
  55124. chrome: "66",
  55125. opera: "53",
  55126. edge: "79",
  55127. firefox: "62",
  55128. safari: "12",
  55129. node: "10",
  55130. ios: "12",
  55131. samsung: "9",
  55132. electron: "3.0"
  55133. },
  55134. "proposal-optional-catch-binding": {
  55135. chrome: "66",
  55136. opera: "53",
  55137. edge: "79",
  55138. firefox: "58",
  55139. safari: "11.1",
  55140. node: "10",
  55141. ios: "11.3",
  55142. samsung: "9",
  55143. electron: "3.0"
  55144. },
  55145. "transform-parameters": {
  55146. chrome: "49",
  55147. opera: "36",
  55148. edge: "18",
  55149. firefox: "53",
  55150. safari: "10",
  55151. node: "6",
  55152. ios: "10",
  55153. samsung: "5",
  55154. electron: "0.37"
  55155. },
  55156. "proposal-async-generator-functions": {
  55157. chrome: "63",
  55158. opera: "50",
  55159. edge: "79",
  55160. firefox: "57",
  55161. safari: "12",
  55162. node: "10",
  55163. ios: "12",
  55164. samsung: "8",
  55165. electron: "3.0"
  55166. },
  55167. "proposal-object-rest-spread": {
  55168. chrome: "60",
  55169. opera: "47",
  55170. edge: "79",
  55171. firefox: "55",
  55172. safari: "11.1",
  55173. node: "8.3",
  55174. ios: "11.3",
  55175. samsung: "8",
  55176. electron: "2.0"
  55177. },
  55178. "transform-dotall-regex": {
  55179. chrome: "62",
  55180. opera: "49",
  55181. edge: "79",
  55182. firefox: "78",
  55183. safari: "11.1",
  55184. node: "8.10",
  55185. ios: "11.3",
  55186. samsung: "8",
  55187. electron: "3.0"
  55188. },
  55189. "proposal-unicode-property-regex": {
  55190. chrome: "64",
  55191. opera: "51",
  55192. edge: "79",
  55193. firefox: "78",
  55194. safari: "11.1",
  55195. node: "10",
  55196. ios: "11.3",
  55197. samsung: "9",
  55198. electron: "3.0"
  55199. },
  55200. "transform-named-capturing-groups-regex": {
  55201. chrome: "64",
  55202. opera: "51",
  55203. edge: "79",
  55204. firefox: "78",
  55205. safari: "11.1",
  55206. node: "10",
  55207. ios: "11.3",
  55208. samsung: "9",
  55209. electron: "3.0"
  55210. },
  55211. "transform-async-to-generator": {
  55212. chrome: "55",
  55213. opera: "42",
  55214. edge: "15",
  55215. firefox: "52",
  55216. safari: "11",
  55217. node: "7.6",
  55218. ios: "11",
  55219. samsung: "6",
  55220. electron: "1.6"
  55221. },
  55222. "transform-exponentiation-operator": {
  55223. chrome: "52",
  55224. opera: "39",
  55225. edge: "14",
  55226. firefox: "52",
  55227. safari: "10.1",
  55228. node: "7",
  55229. ios: "10.3",
  55230. samsung: "6",
  55231. electron: "1.3"
  55232. },
  55233. "transform-template-literals": {
  55234. chrome: "41",
  55235. opera: "28",
  55236. edge: "13",
  55237. firefox: "34",
  55238. safari: "13",
  55239. node: "4",
  55240. ios: "13",
  55241. samsung: "3.4",
  55242. electron: "0.21"
  55243. },
  55244. "transform-literals": {
  55245. chrome: "44",
  55246. opera: "31",
  55247. edge: "12",
  55248. firefox: "53",
  55249. safari: "9",
  55250. node: "4",
  55251. ios: "9",
  55252. samsung: "4",
  55253. electron: "0.30"
  55254. },
  55255. "transform-function-name": {
  55256. chrome: "51",
  55257. opera: "38",
  55258. edge: "79",
  55259. firefox: "53",
  55260. safari: "10",
  55261. node: "6.5",
  55262. ios: "10",
  55263. samsung: "5",
  55264. electron: "1.2"
  55265. },
  55266. "transform-arrow-functions": {
  55267. chrome: "47",
  55268. opera: "34",
  55269. edge: "13",
  55270. firefox: "45",
  55271. safari: "10",
  55272. node: "6",
  55273. ios: "10",
  55274. samsung: "5",
  55275. electron: "0.36"
  55276. },
  55277. "transform-block-scoped-functions": {
  55278. chrome: "41",
  55279. opera: "28",
  55280. edge: "12",
  55281. firefox: "46",
  55282. safari: "10",
  55283. node: "4",
  55284. ie: "11",
  55285. ios: "10",
  55286. samsung: "3.4",
  55287. electron: "0.21"
  55288. },
  55289. "transform-classes": {
  55290. chrome: "46",
  55291. opera: "33",
  55292. edge: "13",
  55293. firefox: "45",
  55294. safari: "10",
  55295. node: "5",
  55296. ios: "10",
  55297. samsung: "5",
  55298. electron: "0.36"
  55299. },
  55300. "transform-object-super": {
  55301. chrome: "46",
  55302. opera: "33",
  55303. edge: "13",
  55304. firefox: "45",
  55305. safari: "10",
  55306. node: "5",
  55307. ios: "10",
  55308. samsung: "5",
  55309. electron: "0.36"
  55310. },
  55311. "transform-shorthand-properties": {
  55312. chrome: "43",
  55313. opera: "30",
  55314. edge: "12",
  55315. firefox: "33",
  55316. safari: "9",
  55317. node: "4",
  55318. ios: "9",
  55319. samsung: "4",
  55320. electron: "0.27"
  55321. },
  55322. "transform-duplicate-keys": {
  55323. chrome: "42",
  55324. opera: "29",
  55325. edge: "12",
  55326. firefox: "34",
  55327. safari: "9",
  55328. node: "4",
  55329. ios: "9",
  55330. samsung: "3.4",
  55331. electron: "0.25"
  55332. },
  55333. "transform-computed-properties": {
  55334. chrome: "44",
  55335. opera: "31",
  55336. edge: "12",
  55337. firefox: "34",
  55338. safari: "7.1",
  55339. node: "4",
  55340. ios: "8",
  55341. samsung: "4",
  55342. electron: "0.30"
  55343. },
  55344. "transform-for-of": {
  55345. chrome: "51",
  55346. opera: "38",
  55347. edge: "15",
  55348. firefox: "53",
  55349. safari: "10",
  55350. node: "6.5",
  55351. ios: "10",
  55352. samsung: "5",
  55353. electron: "1.2"
  55354. },
  55355. "transform-sticky-regex": {
  55356. chrome: "49",
  55357. opera: "36",
  55358. edge: "13",
  55359. firefox: "3",
  55360. safari: "10",
  55361. node: "6",
  55362. ios: "10",
  55363. samsung: "5",
  55364. electron: "0.37"
  55365. },
  55366. "transform-unicode-escapes": {
  55367. chrome: "44",
  55368. opera: "31",
  55369. edge: "12",
  55370. firefox: "53",
  55371. safari: "9",
  55372. node: "4",
  55373. ios: "9",
  55374. samsung: "4",
  55375. electron: "0.30"
  55376. },
  55377. "transform-unicode-regex": {
  55378. chrome: "50",
  55379. opera: "37",
  55380. edge: "13",
  55381. firefox: "46",
  55382. safari: "12",
  55383. node: "6",
  55384. ios: "12",
  55385. samsung: "5",
  55386. electron: "1.1"
  55387. },
  55388. "transform-spread": {
  55389. chrome: "46",
  55390. opera: "33",
  55391. edge: "13",
  55392. firefox: "45",
  55393. safari: "10",
  55394. node: "5",
  55395. ios: "10",
  55396. samsung: "5",
  55397. electron: "0.36"
  55398. },
  55399. "transform-destructuring": {
  55400. chrome: "51",
  55401. opera: "38",
  55402. edge: "15",
  55403. firefox: "53",
  55404. safari: "10",
  55405. node: "6.5",
  55406. ios: "10",
  55407. samsung: "5",
  55408. electron: "1.2"
  55409. },
  55410. "transform-block-scoping": {
  55411. chrome: "49",
  55412. opera: "36",
  55413. edge: "14",
  55414. firefox: "51",
  55415. safari: "11",
  55416. node: "6",
  55417. ios: "11",
  55418. samsung: "5",
  55419. electron: "0.37"
  55420. },
  55421. "transform-typeof-symbol": {
  55422. chrome: "38",
  55423. opera: "25",
  55424. edge: "12",
  55425. firefox: "36",
  55426. safari: "9",
  55427. node: "0.12",
  55428. ios: "9",
  55429. samsung: "3",
  55430. electron: "0.20"
  55431. },
  55432. "transform-new-target": {
  55433. chrome: "46",
  55434. opera: "33",
  55435. edge: "14",
  55436. firefox: "41",
  55437. safari: "10",
  55438. node: "5",
  55439. ios: "10",
  55440. samsung: "5",
  55441. electron: "0.36"
  55442. },
  55443. "transform-regenerator": {
  55444. chrome: "50",
  55445. opera: "37",
  55446. edge: "13",
  55447. firefox: "53",
  55448. safari: "10",
  55449. node: "6",
  55450. ios: "10",
  55451. samsung: "5",
  55452. electron: "1.1"
  55453. },
  55454. "transform-member-expression-literals": {
  55455. chrome: "7",
  55456. opera: "12",
  55457. edge: "12",
  55458. firefox: "2",
  55459. safari: "5.1",
  55460. node: "0.10",
  55461. ie: "9",
  55462. android: "4",
  55463. ios: "6",
  55464. phantom: "2",
  55465. samsung: "1",
  55466. electron: "0.20"
  55467. },
  55468. "transform-property-literals": {
  55469. chrome: "7",
  55470. opera: "12",
  55471. edge: "12",
  55472. firefox: "2",
  55473. safari: "5.1",
  55474. node: "0.10",
  55475. ie: "9",
  55476. android: "4",
  55477. ios: "6",
  55478. phantom: "2",
  55479. samsung: "1",
  55480. electron: "0.20"
  55481. },
  55482. "transform-reserved-words": {
  55483. chrome: "13",
  55484. opera: "10.50",
  55485. edge: "12",
  55486. firefox: "2",
  55487. safari: "3.1",
  55488. node: "0.10",
  55489. ie: "9",
  55490. android: "4.4",
  55491. ios: "6",
  55492. phantom: "2",
  55493. samsung: "1",
  55494. electron: "0.20"
  55495. },
  55496. "proposal-export-namespace-from": {
  55497. chrome: "72",
  55498. and_chr: "72",
  55499. edge: "79",
  55500. firefox: "80",
  55501. and_ff: "80",
  55502. node: "13.2",
  55503. opera: "60",
  55504. op_mob: "51",
  55505. samsung: "11.0",
  55506. android: "72",
  55507. electron: "5.0"
  55508. }
  55509. };
  55510. var plugins = require$$0$6;
  55511. function targetsSupported(target, support) {
  55512. var targetEnvironments = Object.keys(target);
  55513. if (targetEnvironments.length === 0) {
  55514. return false;
  55515. }
  55516. var unsupportedEnvironments = targetEnvironments.filter(function (environment) {
  55517. var lowestImplementedVersion = getLowestImplementedVersion(support, environment);
  55518. if (!lowestImplementedVersion) {
  55519. return true;
  55520. }
  55521. var lowestTargetedVersion = target[environment];
  55522. if (isUnreleasedVersion(lowestTargetedVersion, environment)) {
  55523. return false;
  55524. }
  55525. if (isUnreleasedVersion(lowestImplementedVersion, environment)) {
  55526. return true;
  55527. }
  55528. if (!semver$7.valid(lowestTargetedVersion.toString())) {
  55529. throw new Error("Invalid version passed for target \"" + environment + "\": \"" + lowestTargetedVersion + "\". " + "Versions must be in semver format (major.minor.patch)");
  55530. }
  55531. return semver$7.gt(semverify(lowestImplementedVersion), lowestTargetedVersion.toString());
  55532. });
  55533. return unsupportedEnvironments.length === 0;
  55534. }
  55535. function isRequired(name, targets, _temp) {
  55536. var _ref = _temp === void 0 ? {} : _temp,
  55537. _ref$compatData = _ref.compatData,
  55538. compatData = _ref$compatData === void 0 ? plugins : _ref$compatData,
  55539. includes = _ref.includes,
  55540. excludes = _ref.excludes;
  55541. if (excludes != null && excludes.has(name)) return false;
  55542. if (includes != null && includes.has(name)) return true;
  55543. return !targetsSupported(targets, compatData[name]);
  55544. }
  55545. function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
  55546. var result = new Set();
  55547. var options = {
  55548. compatData: list,
  55549. includes: includes,
  55550. excludes: excludes
  55551. };
  55552. for (var item in list) {
  55553. if (isRequired(item, targets, options)) {
  55554. result.add(item);
  55555. } else if (pluginSyntaxMap) {
  55556. var shippedProposalsSyntax = pluginSyntaxMap.get(item);
  55557. if (shippedProposalsSyntax) {
  55558. result.add(shippedProposalsSyntax);
  55559. }
  55560. }
  55561. }
  55562. if (defaultIncludes) {
  55563. defaultIncludes.forEach(function (item) {
  55564. return !excludes.has(item) && result.add(item);
  55565. });
  55566. }
  55567. if (defaultExcludes) {
  55568. defaultExcludes.forEach(function (item) {
  55569. return !includes.has(item) && result["delete"](item);
  55570. });
  55571. }
  55572. return result;
  55573. }
  55574. var ESM_SUPPORT = nativeModules["es6.module"];
  55575. var v$2 = new OptionValidator("@babel/helper-compilation-targets");
  55576. function validateTargetNames(targets) {
  55577. var validTargets = Object.keys(TargetNames);
  55578. for (var _i = 0, _Object$keys = Object.keys(targets); _i < _Object$keys.length; _i++) {
  55579. var target = _Object$keys[_i];
  55580. if (!(target in TargetNames)) {
  55581. throw new Error(v$2.formatMessage("'" + target + "' is not a valid target\n- Did you mean '" + findSuggestion(target, validTargets) + "'?"));
  55582. }
  55583. }
  55584. return targets;
  55585. }
  55586. function isBrowsersQueryValid(browsers) {
  55587. return typeof browsers === "string" || Array.isArray(browsers) && browsers.every(function (b) {
  55588. return typeof b === "string";
  55589. });
  55590. }
  55591. function validateBrowsers(browsers) {
  55592. v$2.invariant(browsers === undefined || isBrowsersQueryValid(browsers), "'" + String(browsers) + "' is not a valid browserslist query");
  55593. return browsers;
  55594. }
  55595. function getLowestVersions(browsers) {
  55596. return browsers.reduce(function (all, browser) {
  55597. var _browser$split = browser.split(" "),
  55598. _browser$split2 = _slicedToArray$2(_browser$split, 2),
  55599. browserName = _browser$split2[0],
  55600. browserVersion = _browser$split2[1];
  55601. var normalizedBrowserName = browserNameMap[browserName];
  55602. if (!normalizedBrowserName) {
  55603. return all;
  55604. }
  55605. try {
  55606. var splitVersion = browserVersion.split("-")[0].toLowerCase();
  55607. var isSplitUnreleased = isUnreleasedVersion(splitVersion, browserName);
  55608. if (!all[normalizedBrowserName]) {
  55609. all[normalizedBrowserName] = isSplitUnreleased ? splitVersion : semverify(splitVersion);
  55610. return all;
  55611. }
  55612. var version = all[normalizedBrowserName];
  55613. var isUnreleased = isUnreleasedVersion(version, browserName);
  55614. if (isUnreleased && isSplitUnreleased) {
  55615. all[normalizedBrowserName] = getLowestUnreleased(version, splitVersion, browserName);
  55616. } else if (isUnreleased) {
  55617. all[normalizedBrowserName] = semverify(splitVersion);
  55618. } else if (!isUnreleased && !isSplitUnreleased) {
  55619. var parsedBrowserVersion = semverify(splitVersion);
  55620. all[normalizedBrowserName] = semverMin(version, parsedBrowserVersion);
  55621. }
  55622. } catch (e) {}
  55623. return all;
  55624. }, {});
  55625. }
  55626. function outputDecimalWarning(decimalTargets) {
  55627. if (!decimalTargets.length) {
  55628. return;
  55629. }
  55630. console.warn("Warning, the following targets are using a decimal version:\n");
  55631. decimalTargets.forEach(function (_ref) {
  55632. var target = _ref.target,
  55633. value = _ref.value;
  55634. return console.warn(" " + target + ": " + value);
  55635. });
  55636. console.warn("\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n");
  55637. }
  55638. function semverifyTarget(target, value) {
  55639. try {
  55640. return semverify(value);
  55641. } catch (error) {
  55642. throw new Error(v$2.formatMessage("'" + value + "' is not a valid value for 'targets." + target + "'."));
  55643. }
  55644. }
  55645. var targetParserMap = {
  55646. __default: function __default(target, value) {
  55647. var version = isUnreleasedVersion(value, target) ? value.toLowerCase() : semverifyTarget(target, value);
  55648. return [target, version];
  55649. },
  55650. node: function node(target, value) {
  55651. var parsed = value === true || value === "current" ? browser$6.versions.node : semverifyTarget(target, value);
  55652. return [target, parsed];
  55653. }
  55654. };
  55655. function generateTargets(inputTargets) {
  55656. var input = Object.assign({}, inputTargets);
  55657. delete input.esmodules;
  55658. delete input.browsers;
  55659. return input;
  55660. }
  55661. function resolveTargets$1(queries) {
  55662. var resolved = browserslist_1(queries, {
  55663. mobileToDesktop: true
  55664. });
  55665. return getLowestVersions(resolved);
  55666. }
  55667. function getTargets$2(inputTargets, options) {
  55668. var _browsers;
  55669. if (inputTargets === void 0) {
  55670. inputTargets = {};
  55671. }
  55672. if (options === void 0) {
  55673. options = {};
  55674. }
  55675. var _inputTargets = inputTargets,
  55676. browsers = _inputTargets.browsers,
  55677. esmodules = _inputTargets.esmodules;
  55678. var _options = options,
  55679. _options$configPath = _options.configPath,
  55680. configPath = _options$configPath === void 0 ? "." : _options$configPath;
  55681. validateBrowsers(browsers);
  55682. var input = generateTargets(inputTargets);
  55683. var targets = validateTargetNames(input);
  55684. var shouldParseBrowsers = !!browsers;
  55685. var hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
  55686. var shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
  55687. if (!browsers && shouldSearchForConfig) {
  55688. browsers = browserslist_1.loadConfig({
  55689. config: options.configFile,
  55690. path: configPath,
  55691. env: options.browserslistEnv
  55692. });
  55693. if (browsers == null) {
  55694. {
  55695. browsers = [];
  55696. }
  55697. }
  55698. }
  55699. if (esmodules && (esmodules !== "intersect" || !((_browsers = browsers) != null && _browsers.length))) {
  55700. browsers = Object.keys(ESM_SUPPORT).map(function (browser) {
  55701. return browser + " >= " + ESM_SUPPORT[browser];
  55702. }).join(", ");
  55703. esmodules = false;
  55704. }
  55705. if (browsers) {
  55706. var queryBrowsers = resolveTargets$1(browsers);
  55707. if (esmodules === "intersect") {
  55708. for (var _i2 = 0, _Object$keys2 = Object.keys(queryBrowsers); _i2 < _Object$keys2.length; _i2++) {
  55709. var browser = _Object$keys2[_i2];
  55710. var version = queryBrowsers[browser];
  55711. if (ESM_SUPPORT[browser]) {
  55712. queryBrowsers[browser] = getHighestUnreleased(version, semverify(ESM_SUPPORT[browser]), browser);
  55713. } else {
  55714. delete queryBrowsers[browser];
  55715. }
  55716. }
  55717. }
  55718. targets = Object.assign(queryBrowsers, targets);
  55719. }
  55720. var result = {};
  55721. var decimalWarnings = [];
  55722. for (var _iterator = _createForOfIteratorHelperLoose(Object.keys(targets).sort()), _step; !(_step = _iterator()).done;) {
  55723. var _targetParserMap$targ;
  55724. var target = _step.value;
  55725. var value = targets[target];
  55726. if (typeof value === "number" && value % 1 !== 0) {
  55727. decimalWarnings.push({
  55728. target: target,
  55729. value: value
  55730. });
  55731. }
  55732. var parser = (_targetParserMap$targ = targetParserMap[target]) != null ? _targetParserMap$targ : targetParserMap.__default;
  55733. var _parser = parser(target, value),
  55734. _parser2 = _slicedToArray$2(_parser, 2),
  55735. parsedTarget = _parser2[0],
  55736. parsedValue = _parser2[1];
  55737. if (parsedValue) {
  55738. result[parsedTarget] = parsedValue;
  55739. }
  55740. }
  55741. outputDecimalWarning(decimalWarnings);
  55742. return result;
  55743. }
  55744. function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) {
  55745. return undefined;
  55746. }
  55747. function resolveTargets(options, root) {
  55748. var targets = options.targets;
  55749. if (typeof targets === "string" || Array.isArray(targets)) {
  55750. targets = {
  55751. browsers: targets
  55752. };
  55753. }
  55754. if (targets && targets.esmodules) {
  55755. targets = Object.assign({}, targets, {
  55756. esmodules: "intersect"
  55757. });
  55758. }
  55759. return getTargets$2(targets, {
  55760. ignoreBrowserslistConfig: true,
  55761. browserslistEnv: options.browserslistEnv
  55762. });
  55763. }
  55764. var _marked$7 = regenerator.mark(handlerOf),
  55765. _marked2$3 = regenerator.mark(createPresetDescriptors),
  55766. _marked3$1 = regenerator.mark(createPluginDescriptors),
  55767. _marked4$1 = regenerator.mark(createDescriptors),
  55768. _marked5$1 = regenerator.mark(createDescriptor);
  55769. function isEqualDescriptor(a, b) {
  55770. return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved);
  55771. }
  55772. function handlerOf(value) {
  55773. return regenerator.wrap(function handlerOf$(_context) {
  55774. while (1) {
  55775. switch (_context.prev = _context.next) {
  55776. case 0:
  55777. return _context.abrupt("return", value);
  55778. case 1:
  55779. case "end":
  55780. return _context.stop();
  55781. }
  55782. }
  55783. }, _marked$7);
  55784. }
  55785. function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
  55786. if (typeof options.browserslistConfigFile === "string") {
  55787. options.browserslistConfigFile = resolveBrowserslistConfigFile(options.browserslistConfigFile);
  55788. }
  55789. return options;
  55790. }
  55791. function createCachedDescriptors(dirname, options, alias) {
  55792. var plugins = options.plugins,
  55793. presets = options.presets,
  55794. passPerPreset = options.passPerPreset;
  55795. return {
  55796. options: optionsWithResolvedBrowserslistConfigFile(options),
  55797. plugins: plugins ? function () {
  55798. return createCachedPluginDescriptors(plugins, dirname)(alias);
  55799. } : function () {
  55800. return handlerOf([]);
  55801. },
  55802. presets: presets ? function () {
  55803. return createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset);
  55804. } : function () {
  55805. return handlerOf([]);
  55806. }
  55807. };
  55808. }
  55809. function createUncachedDescriptors(dirname, options, alias) {
  55810. var _plugins;
  55811. var _presets;
  55812. return {
  55813. options: optionsWithResolvedBrowserslistConfigFile(options),
  55814. plugins: regenerator.mark(function plugins() {
  55815. return regenerator.wrap(function plugins$(_context2) {
  55816. while (1) {
  55817. switch (_context2.prev = _context2.next) {
  55818. case 0:
  55819. if (_plugins) {
  55820. _context2.next = 3;
  55821. break;
  55822. }
  55823. return _context2.delegateYield(createPluginDescriptors(options.plugins || [], dirname, alias), "t0", 2);
  55824. case 2:
  55825. _plugins = _context2.t0;
  55826. case 3:
  55827. return _context2.abrupt("return", _plugins);
  55828. case 4:
  55829. case "end":
  55830. return _context2.stop();
  55831. }
  55832. }
  55833. }, plugins);
  55834. }),
  55835. presets: regenerator.mark(function presets() {
  55836. return regenerator.wrap(function presets$(_context3) {
  55837. while (1) {
  55838. switch (_context3.prev = _context3.next) {
  55839. case 0:
  55840. if (_presets) {
  55841. _context3.next = 3;
  55842. break;
  55843. }
  55844. return _context3.delegateYield(createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset), "t0", 2);
  55845. case 2:
  55846. _presets = _context3.t0;
  55847. case 3:
  55848. return _context3.abrupt("return", _presets);
  55849. case 4:
  55850. case "end":
  55851. return _context3.stop();
  55852. }
  55853. }
  55854. }, presets);
  55855. })
  55856. };
  55857. }
  55858. var PRESET_DESCRIPTOR_CACHE = new WeakMap();
  55859. var createCachedPresetDescriptors = makeWeakCacheSync(function (items, cache) {
  55860. var dirname = cache.using(function (dir) {
  55861. return dir;
  55862. });
  55863. return makeStrongCacheSync(function (alias) {
  55864. return makeStrongCache(regenerator.mark(function _callee(passPerPreset) {
  55865. var descriptors;
  55866. return regenerator.wrap(function _callee$(_context4) {
  55867. while (1) {
  55868. switch (_context4.prev = _context4.next) {
  55869. case 0:
  55870. return _context4.delegateYield(createPresetDescriptors(items, dirname, alias, passPerPreset), "t0", 1);
  55871. case 1:
  55872. descriptors = _context4.t0;
  55873. return _context4.abrupt("return", descriptors.map(function (desc) {
  55874. return loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc);
  55875. }));
  55876. case 3:
  55877. case "end":
  55878. return _context4.stop();
  55879. }
  55880. }
  55881. }, _callee);
  55882. }));
  55883. });
  55884. });
  55885. var PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
  55886. var createCachedPluginDescriptors = makeWeakCacheSync(function (items, cache) {
  55887. var dirname = cache.using(function (dir) {
  55888. return dir;
  55889. });
  55890. return makeStrongCache(regenerator.mark(function _callee2(alias) {
  55891. var descriptors;
  55892. return regenerator.wrap(function _callee2$(_context5) {
  55893. while (1) {
  55894. switch (_context5.prev = _context5.next) {
  55895. case 0:
  55896. return _context5.delegateYield(createPluginDescriptors(items, dirname, alias), "t0", 1);
  55897. case 1:
  55898. descriptors = _context5.t0;
  55899. return _context5.abrupt("return", descriptors.map(function (desc) {
  55900. return loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc);
  55901. }));
  55902. case 3:
  55903. case "end":
  55904. return _context5.stop();
  55905. }
  55906. }
  55907. }, _callee2);
  55908. }));
  55909. });
  55910. var DEFAULT_OPTIONS = {};
  55911. function loadCachedDescriptor(cache, desc) {
  55912. var value = desc.value,
  55913. _desc$options = desc.options,
  55914. options = _desc$options === void 0 ? DEFAULT_OPTIONS : _desc$options;
  55915. if (options === false) return desc;
  55916. var cacheByOptions = cache.get(value);
  55917. if (!cacheByOptions) {
  55918. cacheByOptions = new WeakMap();
  55919. cache.set(value, cacheByOptions);
  55920. }
  55921. var possibilities = cacheByOptions.get(options);
  55922. if (!possibilities) {
  55923. possibilities = [];
  55924. cacheByOptions.set(options, possibilities);
  55925. }
  55926. if (possibilities.indexOf(desc) === -1) {
  55927. var matches = possibilities.filter(function (possibility) {
  55928. return isEqualDescriptor(possibility, desc);
  55929. });
  55930. if (matches.length > 0) {
  55931. return matches[0];
  55932. }
  55933. possibilities.push(desc);
  55934. }
  55935. return desc;
  55936. }
  55937. function createPresetDescriptors(items, dirname, alias, passPerPreset) {
  55938. return regenerator.wrap(function createPresetDescriptors$(_context6) {
  55939. while (1) {
  55940. switch (_context6.prev = _context6.next) {
  55941. case 0:
  55942. return _context6.delegateYield(createDescriptors("preset", items, dirname, alias, passPerPreset), "t0", 1);
  55943. case 1:
  55944. return _context6.abrupt("return", _context6.t0);
  55945. case 2:
  55946. case "end":
  55947. return _context6.stop();
  55948. }
  55949. }
  55950. }, _marked2$3);
  55951. }
  55952. function createPluginDescriptors(items, dirname, alias) {
  55953. return regenerator.wrap(function createPluginDescriptors$(_context7) {
  55954. while (1) {
  55955. switch (_context7.prev = _context7.next) {
  55956. case 0:
  55957. return _context7.delegateYield(createDescriptors("plugin", items, dirname, alias), "t0", 1);
  55958. case 1:
  55959. return _context7.abrupt("return", _context7.t0);
  55960. case 2:
  55961. case "end":
  55962. return _context7.stop();
  55963. }
  55964. }
  55965. }, _marked3$1);
  55966. }
  55967. function createDescriptors(type, items, dirname, alias, ownPass) {
  55968. var descriptors;
  55969. return regenerator.wrap(function createDescriptors$(_context8) {
  55970. while (1) {
  55971. switch (_context8.prev = _context8.next) {
  55972. case 0:
  55973. return _context8.delegateYield(gensync.all(items.map(function (item, index) {
  55974. return createDescriptor(item, dirname, {
  55975. type: type,
  55976. alias: alias + "$" + index,
  55977. ownPass: !!ownPass
  55978. });
  55979. })), "t0", 1);
  55980. case 1:
  55981. descriptors = _context8.t0;
  55982. assertNoDuplicates(descriptors);
  55983. return _context8.abrupt("return", descriptors);
  55984. case 4:
  55985. case "end":
  55986. return _context8.stop();
  55987. }
  55988. }
  55989. }, _marked4$1);
  55990. }
  55991. function createDescriptor(pair, dirname, _ref) {
  55992. var type, alias, ownPass, desc, name, options, value, _value, _value2, _value3, _value4, file, filepath, resolver, request, _yield$resolver;
  55993. return regenerator.wrap(function createDescriptor$(_context9) {
  55994. while (1) {
  55995. switch (_context9.prev = _context9.next) {
  55996. case 0:
  55997. type = _ref.type, alias = _ref.alias, ownPass = _ref.ownPass;
  55998. desc = getItemDescriptor(pair);
  55999. if (!desc) {
  56000. _context9.next = 4;
  56001. break;
  56002. }
  56003. return _context9.abrupt("return", desc);
  56004. case 4:
  56005. value = pair;
  56006. if (Array.isArray(value)) {
  56007. if (value.length === 3) {
  56008. _value = value;
  56009. _value2 = _slicedToArray$2(_value, 3);
  56010. value = _value2[0];
  56011. options = _value2[1];
  56012. name = _value2[2];
  56013. } else {
  56014. _value3 = value;
  56015. _value4 = _slicedToArray$2(_value3, 2);
  56016. value = _value4[0];
  56017. options = _value4[1];
  56018. }
  56019. }
  56020. file = undefined;
  56021. filepath = null;
  56022. if (!(typeof value === "string")) {
  56023. _context9.next = 18;
  56024. break;
  56025. }
  56026. if (!(typeof type !== "string")) {
  56027. _context9.next = 11;
  56028. break;
  56029. }
  56030. throw new Error("To resolve a string-based item, the type of item must be given");
  56031. case 11:
  56032. resolver = type === "plugin" ? loadPlugin : loadPreset;
  56033. request = value;
  56034. return _context9.delegateYield(resolver(value, dirname), "t0", 14);
  56035. case 14:
  56036. _yield$resolver = _context9.t0;
  56037. filepath = _yield$resolver.filepath;
  56038. value = _yield$resolver.value;
  56039. file = {
  56040. request: request,
  56041. resolved: filepath
  56042. };
  56043. case 18:
  56044. if (value) {
  56045. _context9.next = 20;
  56046. break;
  56047. }
  56048. throw new Error("Unexpected falsy value: " + String(value));
  56049. case 20:
  56050. if (!(typeof value === "object" && value.__esModule)) {
  56051. _context9.next = 26;
  56052. break;
  56053. }
  56054. if (!value["default"]) {
  56055. _context9.next = 25;
  56056. break;
  56057. }
  56058. value = value["default"];
  56059. _context9.next = 26;
  56060. break;
  56061. case 25:
  56062. throw new Error("Must export a default export when using ES6 modules.");
  56063. case 26:
  56064. if (!(typeof value !== "object" && typeof value !== "function")) {
  56065. _context9.next = 28;
  56066. break;
  56067. }
  56068. throw new Error("Unsupported format: " + typeof value + ". Expected an object or a function.");
  56069. case 28:
  56070. if (!(filepath !== null && typeof value === "object" && value)) {
  56071. _context9.next = 30;
  56072. break;
  56073. }
  56074. throw new Error("Plugin/Preset files are not allowed to export objects, only functions. In " + filepath);
  56075. case 30:
  56076. return _context9.abrupt("return", {
  56077. name: name,
  56078. alias: filepath || alias,
  56079. value: value,
  56080. options: options,
  56081. dirname: dirname,
  56082. ownPass: ownPass,
  56083. file: file
  56084. });
  56085. case 31:
  56086. case "end":
  56087. return _context9.stop();
  56088. }
  56089. }
  56090. }, _marked5$1);
  56091. }
  56092. function assertNoDuplicates(items) {
  56093. var map = new Map();
  56094. var _loop = function _loop() {
  56095. var item = _step.value;
  56096. if (typeof item.value !== "function") return "continue";
  56097. var nameMap = map.get(item.value);
  56098. if (!nameMap) {
  56099. nameMap = new Set();
  56100. map.set(item.value, nameMap);
  56101. }
  56102. if (nameMap.has(item.name)) {
  56103. var conflicts = items.filter(function (i) {
  56104. return i.value === item.value;
  56105. });
  56106. throw new Error(["Duplicate plugin/preset detected.", "If you'd like to use two separate instances of a plugin,", "they need separate names, e.g.", "", " plugins: [", " ['some-plugin', {}],", " ['some-plugin', {}, 'some unique name'],", " ]", "", "Duplicates detected are:", "" + JSON.stringify(conflicts, null, 2)].join("\n"));
  56107. }
  56108. nameMap.add(item.name);
  56109. };
  56110. for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) {
  56111. var _ret = _loop();
  56112. if (_ret === "continue") continue;
  56113. }
  56114. }
  56115. var _marked$6 = regenerator.mark(createConfigItem$1);
  56116. function createItemFromDescriptor(desc) {
  56117. return new ConfigItem(desc);
  56118. }
  56119. function createConfigItem$1(value, _temp) {
  56120. var _ref, _ref$dirname, dirname, type, descriptor;
  56121. return regenerator.wrap(function createConfigItem$(_context) {
  56122. while (1) {
  56123. switch (_context.prev = _context.next) {
  56124. case 0:
  56125. _ref = _temp === void 0 ? {} : _temp, _ref$dirname = _ref.dirname, dirname = _ref$dirname === void 0 ? "." : _ref$dirname, type = _ref.type;
  56126. return _context.delegateYield(createDescriptor(value, path$1.resolve(dirname), {
  56127. type: type,
  56128. alias: "programmatic item"
  56129. }), "t0", 2);
  56130. case 2:
  56131. descriptor = _context.t0;
  56132. return _context.abrupt("return", createItemFromDescriptor(descriptor));
  56133. case 4:
  56134. case "end":
  56135. return _context.stop();
  56136. }
  56137. }
  56138. }, _marked$6);
  56139. }
  56140. function getItemDescriptor(item) {
  56141. if (item != null && item[CONFIG_ITEM_BRAND]) {
  56142. return item._descriptor;
  56143. }
  56144. return undefined;
  56145. }
  56146. var CONFIG_ITEM_BRAND = Symbol["for"]("@babel/core@7 - ConfigItem");
  56147. var ConfigItem = function ConfigItem(descriptor) {
  56148. this._descriptor = void 0;
  56149. this[CONFIG_ITEM_BRAND] = true;
  56150. this.value = void 0;
  56151. this.options = void 0;
  56152. this.dirname = void 0;
  56153. this.name = void 0;
  56154. this.file = void 0;
  56155. this._descriptor = descriptor;
  56156. Object.defineProperty(this, "_descriptor", {
  56157. enumerable: false
  56158. });
  56159. Object.defineProperty(this, CONFIG_ITEM_BRAND, {
  56160. enumerable: false
  56161. });
  56162. this.value = this._descriptor.value;
  56163. this.options = this._descriptor.options;
  56164. this.dirname = this._descriptor.dirname;
  56165. this.name = this._descriptor.name;
  56166. this.file = this._descriptor.file ? {
  56167. request: this._descriptor.file.request,
  56168. resolved: this._descriptor.file.resolved
  56169. } : undefined;
  56170. Object.freeze(this);
  56171. };
  56172. Object.freeze(ConfigItem.prototype);
  56173. var s = 1000;
  56174. var m$1 = s * 60;
  56175. var h = m$1 * 60;
  56176. var d = h * 24;
  56177. var w = d * 7;
  56178. var y = d * 365.25;
  56179. var ms = function ms(val, options) {
  56180. options = options || {};
  56181. var type = typeof val;
  56182. if (type === 'string' && val.length > 0) {
  56183. return parse$4(val);
  56184. } else if (type === 'number' && isFinite(val)) {
  56185. return options["long"] ? fmtLong(val) : fmtShort(val);
  56186. }
  56187. throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
  56188. };
  56189. function parse$4(str) {
  56190. str = String(str);
  56191. if (str.length > 100) {
  56192. return;
  56193. }
  56194. var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
  56195. if (!match) {
  56196. return;
  56197. }
  56198. var n = parseFloat(match[1]);
  56199. var type = (match[2] || 'ms').toLowerCase();
  56200. switch (type) {
  56201. case 'years':
  56202. case 'year':
  56203. case 'yrs':
  56204. case 'yr':
  56205. case 'y':
  56206. return n * y;
  56207. case 'weeks':
  56208. case 'week':
  56209. case 'w':
  56210. return n * w;
  56211. case 'days':
  56212. case 'day':
  56213. case 'd':
  56214. return n * d;
  56215. case 'hours':
  56216. case 'hour':
  56217. case 'hrs':
  56218. case 'hr':
  56219. case 'h':
  56220. return n * h;
  56221. case 'minutes':
  56222. case 'minute':
  56223. case 'mins':
  56224. case 'min':
  56225. case 'm':
  56226. return n * m$1;
  56227. case 'seconds':
  56228. case 'second':
  56229. case 'secs':
  56230. case 'sec':
  56231. case 's':
  56232. return n * s;
  56233. case 'milliseconds':
  56234. case 'millisecond':
  56235. case 'msecs':
  56236. case 'msec':
  56237. case 'ms':
  56238. return n;
  56239. default:
  56240. return undefined;
  56241. }
  56242. }
  56243. function fmtShort(ms) {
  56244. var msAbs = Math.abs(ms);
  56245. if (msAbs >= d) {
  56246. return Math.round(ms / d) + 'd';
  56247. }
  56248. if (msAbs >= h) {
  56249. return Math.round(ms / h) + 'h';
  56250. }
  56251. if (msAbs >= m$1) {
  56252. return Math.round(ms / m$1) + 'm';
  56253. }
  56254. if (msAbs >= s) {
  56255. return Math.round(ms / s) + 's';
  56256. }
  56257. return ms + 'ms';
  56258. }
  56259. function fmtLong(ms) {
  56260. var msAbs = Math.abs(ms);
  56261. if (msAbs >= d) {
  56262. return plural(ms, msAbs, d, 'day');
  56263. }
  56264. if (msAbs >= h) {
  56265. return plural(ms, msAbs, h, 'hour');
  56266. }
  56267. if (msAbs >= m$1) {
  56268. return plural(ms, msAbs, m$1, 'minute');
  56269. }
  56270. if (msAbs >= s) {
  56271. return plural(ms, msAbs, s, 'second');
  56272. }
  56273. return ms + ' ms';
  56274. }
  56275. function plural(ms, msAbs, n, name) {
  56276. var isPlural = msAbs >= n * 1.5;
  56277. return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
  56278. }
  56279. function setup(env) {
  56280. createDebug.debug = createDebug;
  56281. createDebug["default"] = createDebug;
  56282. createDebug.coerce = coerce;
  56283. createDebug.disable = disable;
  56284. createDebug.enable = enable;
  56285. createDebug.enabled = enabled;
  56286. createDebug.humanize = ms;
  56287. createDebug.destroy = destroy;
  56288. Object.keys(env).forEach(function (key) {
  56289. createDebug[key] = env[key];
  56290. });
  56291. createDebug.names = [];
  56292. createDebug.skips = [];
  56293. createDebug.formatters = {};
  56294. function selectColor(namespace) {
  56295. var hash = 0;
  56296. for (var i = 0; i < namespace.length; i++) {
  56297. hash = (hash << 5) - hash + namespace.charCodeAt(i);
  56298. hash |= 0;
  56299. }
  56300. return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
  56301. }
  56302. createDebug.selectColor = selectColor;
  56303. function createDebug(namespace) {
  56304. var prevTime;
  56305. var enableOverride = null;
  56306. var namespacesCache;
  56307. var enabledCache;
  56308. function debug() {
  56309. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  56310. args[_key] = arguments[_key];
  56311. }
  56312. if (!debug.enabled) {
  56313. return;
  56314. }
  56315. var self = debug;
  56316. var curr = Number(new Date());
  56317. var ms = curr - (prevTime || curr);
  56318. self.diff = ms;
  56319. self.prev = prevTime;
  56320. self.curr = curr;
  56321. prevTime = curr;
  56322. args[0] = createDebug.coerce(args[0]);
  56323. if (typeof args[0] !== 'string') {
  56324. args.unshift('%O');
  56325. }
  56326. var index = 0;
  56327. args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
  56328. if (match === '%%') {
  56329. return '%';
  56330. }
  56331. index++;
  56332. var formatter = createDebug.formatters[format];
  56333. if (typeof formatter === 'function') {
  56334. var val = args[index];
  56335. match = formatter.call(self, val);
  56336. args.splice(index, 1);
  56337. index--;
  56338. }
  56339. return match;
  56340. });
  56341. createDebug.formatArgs.call(self, args);
  56342. var logFn = self.log || createDebug.log;
  56343. logFn.apply(self, args);
  56344. }
  56345. debug.namespace = namespace;
  56346. debug.useColors = createDebug.useColors();
  56347. debug.color = createDebug.selectColor(namespace);
  56348. debug.extend = extend;
  56349. debug.destroy = createDebug.destroy;
  56350. Object.defineProperty(debug, 'enabled', {
  56351. enumerable: true,
  56352. configurable: false,
  56353. get: function get() {
  56354. if (enableOverride !== null) {
  56355. return enableOverride;
  56356. }
  56357. if (namespacesCache !== createDebug.namespaces) {
  56358. namespacesCache = createDebug.namespaces;
  56359. enabledCache = createDebug.enabled(namespace);
  56360. }
  56361. return enabledCache;
  56362. },
  56363. set: function set(v) {
  56364. enableOverride = v;
  56365. }
  56366. });
  56367. if (typeof createDebug.init === 'function') {
  56368. createDebug.init(debug);
  56369. }
  56370. return debug;
  56371. }
  56372. function extend(namespace, delimiter) {
  56373. var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
  56374. newDebug.log = this.log;
  56375. return newDebug;
  56376. }
  56377. function enable(namespaces) {
  56378. createDebug.save(namespaces);
  56379. createDebug.namespaces = namespaces;
  56380. createDebug.names = [];
  56381. createDebug.skips = [];
  56382. var i;
  56383. var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
  56384. var len = split.length;
  56385. for (i = 0; i < len; i++) {
  56386. if (!split[i]) {
  56387. continue;
  56388. }
  56389. namespaces = split[i].replace(/\*/g, '.*?');
  56390. if (namespaces[0] === '-') {
  56391. createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
  56392. } else {
  56393. createDebug.names.push(new RegExp('^' + namespaces + '$'));
  56394. }
  56395. }
  56396. }
  56397. function disable() {
  56398. var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {
  56399. return '-' + namespace;
  56400. }))).join(',');
  56401. createDebug.enable('');
  56402. return namespaces;
  56403. }
  56404. function enabled(name) {
  56405. if (name[name.length - 1] === '*') {
  56406. return true;
  56407. }
  56408. var i;
  56409. var len;
  56410. for (i = 0, len = createDebug.skips.length; i < len; i++) {
  56411. if (createDebug.skips[i].test(name)) {
  56412. return false;
  56413. }
  56414. }
  56415. for (i = 0, len = createDebug.names.length; i < len; i++) {
  56416. if (createDebug.names[i].test(name)) {
  56417. return true;
  56418. }
  56419. }
  56420. return false;
  56421. }
  56422. function toNamespace(regexp) {
  56423. return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
  56424. }
  56425. function coerce(val) {
  56426. if (val instanceof Error) {
  56427. return val.stack || val.message;
  56428. }
  56429. return val;
  56430. }
  56431. function destroy() {
  56432. console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
  56433. }
  56434. createDebug.enable(createDebug.load());
  56435. return createDebug;
  56436. }
  56437. var common = setup;
  56438. var browser$1 = createCommonjsModule(function (module, exports) {
  56439. exports.formatArgs = formatArgs;
  56440. exports.save = save;
  56441. exports.load = load;
  56442. exports.useColors = useColors;
  56443. exports.storage = localstorage();
  56444. exports.destroy = function () {
  56445. var warned = false;
  56446. return function () {
  56447. if (!warned) {
  56448. warned = true;
  56449. console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
  56450. }
  56451. };
  56452. }();
  56453. exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
  56454. function useColors() {
  56455. if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
  56456. return true;
  56457. }
  56458. if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
  56459. return false;
  56460. }
  56461. return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
  56462. }
  56463. function formatArgs(args) {
  56464. args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
  56465. if (!this.useColors) {
  56466. return;
  56467. }
  56468. var c = 'color: ' + this.color;
  56469. args.splice(1, 0, c, 'color: inherit');
  56470. var index = 0;
  56471. var lastC = 0;
  56472. args[0].replace(/%[a-zA-Z%]/g, function (match) {
  56473. if (match === '%%') {
  56474. return;
  56475. }
  56476. index++;
  56477. if (match === '%c') {
  56478. lastC = index;
  56479. }
  56480. });
  56481. args.splice(lastC, 0, c);
  56482. }
  56483. exports.log = console.debug || console.log || function () {};
  56484. function save(namespaces) {
  56485. try {
  56486. if (namespaces) {
  56487. exports.storage.setItem('debug', namespaces);
  56488. } else {
  56489. exports.storage.removeItem('debug');
  56490. }
  56491. } catch (error) {}
  56492. }
  56493. function load() {
  56494. var r;
  56495. try {
  56496. r = exports.storage.getItem('debug');
  56497. } catch (error) {}
  56498. if (!r && typeof browser$6 !== 'undefined' && 'env' in browser$6) {
  56499. r = browser$6.env.DEBUG;
  56500. }
  56501. return r;
  56502. }
  56503. function localstorage() {
  56504. try {
  56505. return localStorage;
  56506. } catch (error) {}
  56507. }
  56508. module.exports = common(exports);
  56509. var formatters = module.exports.formatters;
  56510. formatters.j = function (v) {
  56511. try {
  56512. return JSON.stringify(v);
  56513. } catch (error) {
  56514. return '[UnexpectedJSONParseError]: ' + error.message;
  56515. }
  56516. };
  56517. }, "/$$rollup_base$$/packages/babel-core/node_modules/debug/src");
  56518. var removed = {
  56519. auxiliaryComment: {
  56520. message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"
  56521. },
  56522. blacklist: {
  56523. message: "Put the specific transforms you want in the `plugins` option"
  56524. },
  56525. breakConfig: {
  56526. message: "This is not a necessary option in Babel 6"
  56527. },
  56528. experimental: {
  56529. message: "Put the specific transforms you want in the `plugins` option"
  56530. },
  56531. externalHelpers: {
  56532. message: "Use the `external-helpers` plugin instead. " + "Check out http://babeljs.io/docs/plugins/external-helpers/"
  56533. },
  56534. extra: {
  56535. message: ""
  56536. },
  56537. jsxPragma: {
  56538. message: "use the `pragma` option in the `react-jsx` plugin. " + "Check out http://babeljs.io/docs/plugins/transform-react-jsx/"
  56539. },
  56540. loose: {
  56541. message: "Specify the `loose` option for the relevant plugin you are using " + "or use a preset that sets the option."
  56542. },
  56543. metadataUsedHelpers: {
  56544. message: "Not required anymore as this is enabled by default"
  56545. },
  56546. modules: {
  56547. message: "Use the corresponding module transform plugin in the `plugins` option. " + "Check out http://babeljs.io/docs/plugins/#modules"
  56548. },
  56549. nonStandard: {
  56550. message: "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. " + "Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"
  56551. },
  56552. optional: {
  56553. message: "Put the specific transforms you want in the `plugins` option"
  56554. },
  56555. sourceMapName: {
  56556. message: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves."
  56557. },
  56558. stage: {
  56559. message: "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"
  56560. },
  56561. whitelist: {
  56562. message: "Put the specific transforms you want in the `plugins` option"
  56563. },
  56564. resolveModuleSource: {
  56565. version: 6,
  56566. message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
  56567. },
  56568. metadata: {
  56569. version: 6,
  56570. message: "Generated plugin metadata is always included in the output result"
  56571. },
  56572. sourceMapTarget: {
  56573. version: 6,
  56574. message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves."
  56575. }
  56576. };
  56577. function msg(loc) {
  56578. switch (loc.type) {
  56579. case "root":
  56580. return "";
  56581. case "env":
  56582. return msg(loc.parent) + ".env[\"" + loc.name + "\"]";
  56583. case "overrides":
  56584. return msg(loc.parent) + ".overrides[" + loc.index + "]";
  56585. case "option":
  56586. return msg(loc.parent) + "." + loc.name;
  56587. case "access":
  56588. return msg(loc.parent) + "[" + JSON.stringify(loc.name) + "]";
  56589. default:
  56590. throw new Error("Assertion failure: Unknown type " + loc.type);
  56591. }
  56592. }
  56593. function access(loc, name) {
  56594. return {
  56595. type: "access",
  56596. name: name,
  56597. parent: loc
  56598. };
  56599. }
  56600. function assertRootMode(loc, value) {
  56601. if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
  56602. throw new Error(msg(loc) + " must be a \"root\", \"upward\", \"upward-optional\" or undefined");
  56603. }
  56604. return value;
  56605. }
  56606. function assertSourceMaps(loc, value) {
  56607. if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
  56608. throw new Error(msg(loc) + " must be a boolean, \"inline\", \"both\", or undefined");
  56609. }
  56610. return value;
  56611. }
  56612. function assertCompact(loc, value) {
  56613. if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
  56614. throw new Error(msg(loc) + " must be a boolean, \"auto\", or undefined");
  56615. }
  56616. return value;
  56617. }
  56618. function assertSourceType(loc, value) {
  56619. if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") {
  56620. throw new Error(msg(loc) + " must be \"module\", \"script\", \"unambiguous\", or undefined");
  56621. }
  56622. return value;
  56623. }
  56624. function assertCallerMetadata(loc, value) {
  56625. var obj = assertObject(loc, value);
  56626. if (obj) {
  56627. if (typeof obj.name !== "string") {
  56628. throw new Error(msg(loc) + " set but does not contain \"name\" property string");
  56629. }
  56630. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  56631. var prop = _Object$keys[_i];
  56632. var propLoc = access(loc, prop);
  56633. var _value = obj[prop];
  56634. if (_value != null && typeof _value !== "boolean" && typeof _value !== "string" && typeof _value !== "number") {
  56635. throw new Error(msg(propLoc) + " must be null, undefined, a boolean, a string, or a number.");
  56636. }
  56637. }
  56638. }
  56639. return value;
  56640. }
  56641. function assertInputSourceMap(loc, value) {
  56642. if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
  56643. throw new Error(msg(loc) + " must be a boolean, object, or undefined");
  56644. }
  56645. return value;
  56646. }
  56647. function assertString(loc, value) {
  56648. if (value !== undefined && typeof value !== "string") {
  56649. throw new Error(msg(loc) + " must be a string, or undefined");
  56650. }
  56651. return value;
  56652. }
  56653. function assertFunction(loc, value) {
  56654. if (value !== undefined && typeof value !== "function") {
  56655. throw new Error(msg(loc) + " must be a function, or undefined");
  56656. }
  56657. return value;
  56658. }
  56659. function assertBoolean(loc, value) {
  56660. if (value !== undefined && typeof value !== "boolean") {
  56661. throw new Error(msg(loc) + " must be a boolean, or undefined");
  56662. }
  56663. return value;
  56664. }
  56665. function assertObject(loc, value) {
  56666. if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
  56667. throw new Error(msg(loc) + " must be an object, or undefined");
  56668. }
  56669. return value;
  56670. }
  56671. function assertArray(loc, value) {
  56672. if (value != null && !Array.isArray(value)) {
  56673. throw new Error(msg(loc) + " must be an array, or undefined");
  56674. }
  56675. return value;
  56676. }
  56677. function assertIgnoreList(loc, value) {
  56678. var arr = assertArray(loc, value);
  56679. if (arr) {
  56680. arr.forEach(function (item, i) {
  56681. return assertIgnoreItem(access(loc, i), item);
  56682. });
  56683. }
  56684. return arr;
  56685. }
  56686. function assertIgnoreItem(loc, value) {
  56687. if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
  56688. throw new Error(msg(loc) + " must be an array of string/Function/RegExp values, or undefined");
  56689. }
  56690. return value;
  56691. }
  56692. function assertConfigApplicableTest(loc, value) {
  56693. if (value === undefined) return value;
  56694. if (Array.isArray(value)) {
  56695. value.forEach(function (item, i) {
  56696. if (!checkValidTest(item)) {
  56697. throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp.");
  56698. }
  56699. });
  56700. } else if (!checkValidTest(value)) {
  56701. throw new Error(msg(loc) + " must be a string/Function/RegExp, or an array of those");
  56702. }
  56703. return value;
  56704. }
  56705. function checkValidTest(value) {
  56706. return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
  56707. }
  56708. function assertConfigFileSearch(loc, value) {
  56709. if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
  56710. throw new Error(msg(loc) + " must be a undefined, a boolean, a string, " + ("got " + JSON.stringify(value)));
  56711. }
  56712. return value;
  56713. }
  56714. function assertBabelrcSearch(loc, value) {
  56715. if (value === undefined || typeof value === "boolean") return value;
  56716. if (Array.isArray(value)) {
  56717. value.forEach(function (item, i) {
  56718. if (!checkValidTest(item)) {
  56719. throw new Error(msg(access(loc, i)) + " must be a string/Function/RegExp.");
  56720. }
  56721. });
  56722. } else if (!checkValidTest(value)) {
  56723. throw new Error(msg(loc) + " must be a undefined, a boolean, a string/Function/RegExp " + ("or an array of those, got " + JSON.stringify(value)));
  56724. }
  56725. return value;
  56726. }
  56727. function assertPluginList(loc, value) {
  56728. var arr = assertArray(loc, value);
  56729. if (arr) {
  56730. arr.forEach(function (item, i) {
  56731. return assertPluginItem(access(loc, i), item);
  56732. });
  56733. }
  56734. return arr;
  56735. }
  56736. function assertPluginItem(loc, value) {
  56737. if (Array.isArray(value)) {
  56738. if (value.length === 0) {
  56739. throw new Error(msg(loc) + " must include an object");
  56740. }
  56741. if (value.length > 3) {
  56742. throw new Error(msg(loc) + " may only be a two-tuple or three-tuple");
  56743. }
  56744. assertPluginTarget(access(loc, 0), value[0]);
  56745. if (value.length > 1) {
  56746. var opts = value[1];
  56747. if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
  56748. throw new Error(msg(access(loc, 1)) + " must be an object, false, or undefined");
  56749. }
  56750. }
  56751. if (value.length === 3) {
  56752. var _name = value[2];
  56753. if (_name !== undefined && typeof _name !== "string") {
  56754. throw new Error(msg(access(loc, 2)) + " must be a string, or undefined");
  56755. }
  56756. }
  56757. } else {
  56758. assertPluginTarget(loc, value);
  56759. }
  56760. return value;
  56761. }
  56762. function assertPluginTarget(loc, value) {
  56763. if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
  56764. throw new Error(msg(loc) + " must be a string, object, function");
  56765. }
  56766. return value;
  56767. }
  56768. function assertTargets(loc, value) {
  56769. if (isBrowsersQueryValid(value)) return value;
  56770. if (typeof value !== "object" || !value || Array.isArray(value)) {
  56771. throw new Error(msg(loc) + " must be a string, an array of strings or an object");
  56772. }
  56773. var browsersLoc = access(loc, "browsers");
  56774. var esmodulesLoc = access(loc, "esmodules");
  56775. assertBrowsersList(browsersLoc, value.browsers);
  56776. assertBoolean(esmodulesLoc, value.esmodules);
  56777. for (var _i2 = 0, _Object$keys2 = Object.keys(value); _i2 < _Object$keys2.length; _i2++) {
  56778. var _key = _Object$keys2[_i2];
  56779. var val = value[_key];
  56780. var subLoc = access(loc, _key);
  56781. if (_key === "esmodules") assertBoolean(subLoc, val);else if (_key === "browsers") assertBrowsersList(subLoc, val);else if (!Object.hasOwnProperty.call(TargetNames, _key)) {
  56782. var validTargets = Object.keys(TargetNames).join(", ");
  56783. throw new Error(msg(subLoc) + " is not a valid target. Supported targets are " + validTargets);
  56784. } else assertBrowserVersion(subLoc, val);
  56785. }
  56786. return value;
  56787. }
  56788. function assertBrowsersList(loc, value) {
  56789. if (value !== undefined && !isBrowsersQueryValid(value)) {
  56790. throw new Error(msg(loc) + " must be undefined, a string or an array of strings");
  56791. }
  56792. }
  56793. function assertBrowserVersion(loc, value) {
  56794. if (typeof value === "number" && Math.round(value) === value) return;
  56795. if (typeof value === "string") return;
  56796. throw new Error(msg(loc) + " must be a string or an integer number");
  56797. }
  56798. function assertAssumptions(loc, value) {
  56799. if (value === undefined) return;
  56800. if (typeof value !== "object" || value === null) {
  56801. throw new Error(msg(loc) + " must be an object or undefined.");
  56802. }
  56803. var root = loc;
  56804. do {
  56805. root = root.parent;
  56806. } while (root.type !== "root");
  56807. var inPreset = root.source === "preset";
  56808. for (var _i3 = 0, _Object$keys3 = Object.keys(value); _i3 < _Object$keys3.length; _i3++) {
  56809. var _name2 = _Object$keys3[_i3];
  56810. var subLoc = access(loc, _name2);
  56811. if (!assumptionsNames.has(_name2)) {
  56812. throw new Error(msg(subLoc) + " is not a supported assumption.");
  56813. }
  56814. if (typeof value[_name2] !== "boolean") {
  56815. throw new Error(msg(subLoc) + " must be a boolean.");
  56816. }
  56817. if (inPreset && value[_name2] === false) {
  56818. throw new Error(msg(subLoc) + " cannot be set to 'false' inside presets.");
  56819. }
  56820. }
  56821. return value;
  56822. }
  56823. var ROOT_VALIDATORS = {
  56824. cwd: assertString,
  56825. root: assertString,
  56826. rootMode: assertRootMode,
  56827. configFile: assertConfigFileSearch,
  56828. caller: assertCallerMetadata,
  56829. filename: assertString,
  56830. filenameRelative: assertString,
  56831. code: assertBoolean,
  56832. ast: assertBoolean,
  56833. cloneInputAst: assertBoolean,
  56834. envName: assertString
  56835. };
  56836. var BABELRC_VALIDATORS = {
  56837. babelrc: assertBoolean,
  56838. babelrcRoots: assertBabelrcSearch
  56839. };
  56840. var NONPRESET_VALIDATORS = {
  56841. "extends": assertString,
  56842. ignore: assertIgnoreList,
  56843. only: assertIgnoreList,
  56844. targets: assertTargets,
  56845. browserslistConfigFile: assertConfigFileSearch,
  56846. browserslistEnv: assertString
  56847. };
  56848. var COMMON_VALIDATORS = {
  56849. inputSourceMap: assertInputSourceMap,
  56850. presets: assertPluginList,
  56851. plugins: assertPluginList,
  56852. passPerPreset: assertBoolean,
  56853. assumptions: assertAssumptions,
  56854. env: assertEnvSet,
  56855. overrides: assertOverridesList,
  56856. test: assertConfigApplicableTest,
  56857. include: assertConfigApplicableTest,
  56858. exclude: assertConfigApplicableTest,
  56859. retainLines: assertBoolean,
  56860. comments: assertBoolean,
  56861. shouldPrintComment: assertFunction,
  56862. compact: assertCompact,
  56863. minified: assertBoolean,
  56864. auxiliaryCommentBefore: assertString,
  56865. auxiliaryCommentAfter: assertString,
  56866. sourceType: assertSourceType,
  56867. wrapPluginVisitorMethod: assertFunction,
  56868. highlightCode: assertBoolean,
  56869. sourceMaps: assertSourceMaps,
  56870. sourceMap: assertSourceMaps,
  56871. sourceFileName: assertString,
  56872. sourceRoot: assertString,
  56873. parserOpts: assertObject,
  56874. generatorOpts: assertObject
  56875. };
  56876. {
  56877. Object.assign(COMMON_VALIDATORS, {
  56878. getModuleId: assertFunction,
  56879. moduleRoot: assertString,
  56880. moduleIds: assertBoolean,
  56881. moduleId: assertString
  56882. });
  56883. }
  56884. var assumptionsNames = new Set(["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]);
  56885. function getSource(loc) {
  56886. return loc.type === "root" ? loc.source : getSource(loc.parent);
  56887. }
  56888. function validate(type, opts) {
  56889. return validateNested({
  56890. type: "root",
  56891. source: type
  56892. }, opts);
  56893. }
  56894. function validateNested(loc, opts) {
  56895. var type = getSource(loc);
  56896. assertNoDuplicateSourcemap(opts);
  56897. Object.keys(opts).forEach(function (key) {
  56898. var optLoc = {
  56899. type: "option",
  56900. name: key,
  56901. parent: loc
  56902. };
  56903. if (type === "preset" && NONPRESET_VALIDATORS[key]) {
  56904. throw new Error(msg(optLoc) + " is not allowed in preset options");
  56905. }
  56906. if (type !== "arguments" && ROOT_VALIDATORS[key]) {
  56907. throw new Error(msg(optLoc) + " is only allowed in root programmatic options");
  56908. }
  56909. if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) {
  56910. if (type === "babelrcfile" || type === "extendsfile") {
  56911. throw new Error(msg(optLoc) + " is not allowed in .babelrc or \"extends\"ed files, only in root programmatic options, " + "or babel.config.js/config file options");
  56912. }
  56913. throw new Error(msg(optLoc) + " is only allowed in root programmatic options, or babel.config.js/config file options");
  56914. }
  56915. var validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;
  56916. validator(optLoc, opts[key]);
  56917. });
  56918. return opts;
  56919. }
  56920. function throwUnknownError(loc) {
  56921. var key = loc.name;
  56922. if (removed[key]) {
  56923. var _removed$key = removed[key],
  56924. message = _removed$key.message,
  56925. _removed$key$version = _removed$key.version,
  56926. version = _removed$key$version === void 0 ? 5 : _removed$key$version;
  56927. throw new Error("Using removed Babel " + version + " option: " + msg(loc) + " - " + message);
  56928. } else {
  56929. var unknownOptErr = new Error("Unknown option: " + msg(loc) + ". Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.");
  56930. unknownOptErr.code = "BABEL_UNKNOWN_OPTION";
  56931. throw unknownOptErr;
  56932. }
  56933. }
  56934. function has$a(obj, key) {
  56935. return Object.prototype.hasOwnProperty.call(obj, key);
  56936. }
  56937. function assertNoDuplicateSourcemap(opts) {
  56938. if (has$a(opts, "sourceMap") && has$a(opts, "sourceMaps")) {
  56939. throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
  56940. }
  56941. }
  56942. function assertEnvSet(loc, value) {
  56943. if (loc.parent.type === "env") {
  56944. throw new Error(msg(loc) + " is not allowed inside of another .env block");
  56945. }
  56946. var parent = loc.parent;
  56947. var obj = assertObject(loc, value);
  56948. if (obj) {
  56949. for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
  56950. var envName = _Object$keys[_i];
  56951. var env = assertObject(access(loc, envName), obj[envName]);
  56952. if (!env) continue;
  56953. var envLoc = {
  56954. type: "env",
  56955. name: envName,
  56956. parent: parent
  56957. };
  56958. validateNested(envLoc, env);
  56959. }
  56960. }
  56961. return obj;
  56962. }
  56963. function assertOverridesList(loc, value) {
  56964. if (loc.parent.type === "env") {
  56965. throw new Error(msg(loc) + " is not allowed inside an .env block");
  56966. }
  56967. if (loc.parent.type === "overrides") {
  56968. throw new Error(msg(loc) + " is not allowed inside an .overrides block");
  56969. }
  56970. var parent = loc.parent;
  56971. var arr = assertArray(loc, value);
  56972. if (arr) {
  56973. for (var _iterator = _createForOfIteratorHelperLoose(arr.entries()), _step; !(_step = _iterator()).done;) {
  56974. var _step$value = _slicedToArray$2(_step.value, 2),
  56975. index = _step$value[0],
  56976. item = _step$value[1];
  56977. var objLoc = access(loc, index);
  56978. var env = assertObject(objLoc, item);
  56979. if (!env) throw new Error(msg(objLoc) + " must be an object");
  56980. var overridesLoc = {
  56981. type: "overrides",
  56982. index: index,
  56983. parent: parent
  56984. };
  56985. validateNested(overridesLoc, env);
  56986. }
  56987. }
  56988. return arr;
  56989. }
  56990. function checkNoUnwrappedItemOptionPairs(items, index, type, e) {
  56991. if (index === 0) return;
  56992. var lastItem = items[index - 1];
  56993. var thisItem = items[index];
  56994. if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") {
  56995. e.message += "\n- Maybe you meant to use\n" + ("\"" + type + "\": [\n [\"" + lastItem.file.request + "\", " + JSON.stringify(thisItem.value, undefined, 2) + "]\n]\n") + ("To be a valid " + type + ", its name and options should be wrapped in a pair of brackets");
  56996. }
  56997. }
  56998. var sep = "\\" + path$1.sep;
  56999. var endSep = "(?:" + sep + "|$)";
  57000. var substitution = "[^" + sep + "]+";
  57001. var starPat = "(?:" + substitution + sep + ")";
  57002. var starPatLast = "(?:" + substitution + endSep + ")";
  57003. var starStarPat = starPat + "*?";
  57004. var starStarPatLast = starPat + "*?" + starPatLast + "?";
  57005. function escapeRegExp(string) {
  57006. return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
  57007. }
  57008. function pathToPattern(pattern, dirname) {
  57009. var parts = path$1.resolve(dirname, pattern).split(path$1.sep);
  57010. return new RegExp(["^"].concat(_toConsumableArray(parts.map(function (part, i) {
  57011. var last = i === parts.length - 1;
  57012. if (part === "**") return last ? starStarPatLast : starStarPat;
  57013. if (part === "*") return last ? starPatLast : starPat;
  57014. if (part.indexOf("*.") === 0) {
  57015. return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep);
  57016. }
  57017. return escapeRegExp(part) + (last ? endSep : sep);
  57018. }))).join(""));
  57019. }
  57020. var ChainFormatter = {
  57021. Programmatic: 0,
  57022. Config: 1
  57023. };
  57024. var Formatter = {
  57025. title: function title(type, callerName, filepath) {
  57026. var title = "";
  57027. if (type === ChainFormatter.Programmatic) {
  57028. title = "programmatic options";
  57029. if (callerName) {
  57030. title += " from " + callerName;
  57031. }
  57032. } else {
  57033. title = "config " + filepath;
  57034. }
  57035. return title;
  57036. },
  57037. loc: function loc(index, envName) {
  57038. var loc = "";
  57039. if (index != null) {
  57040. loc += ".overrides[" + index + "]";
  57041. }
  57042. if (envName != null) {
  57043. loc += ".env[\"" + envName + "\"]";
  57044. }
  57045. return loc;
  57046. },
  57047. optionsAndDescriptors: regenerator.mark(function optionsAndDescriptors(opt) {
  57048. var content, pluginDescriptors, presetDescriptors;
  57049. return regenerator.wrap(function optionsAndDescriptors$(_context) {
  57050. while (1) {
  57051. switch (_context.prev = _context.next) {
  57052. case 0:
  57053. content = Object.assign({}, opt.options);
  57054. delete content.overrides;
  57055. delete content.env;
  57056. _context.t0 = _toConsumableArray;
  57057. return _context.delegateYield(opt.plugins(), "t1", 5);
  57058. case 5:
  57059. _context.t2 = _context.t1;
  57060. pluginDescriptors = (0, _context.t0)(_context.t2);
  57061. if (pluginDescriptors.length) {
  57062. content.plugins = pluginDescriptors.map(function (d) {
  57063. return descriptorToConfig(d);
  57064. });
  57065. }
  57066. _context.t3 = _toConsumableArray;
  57067. return _context.delegateYield(opt.presets(), "t4", 10);
  57068. case 10:
  57069. _context.t5 = _context.t4;
  57070. presetDescriptors = (0, _context.t3)(_context.t5);
  57071. if (presetDescriptors.length) {
  57072. content.presets = _toConsumableArray(presetDescriptors).map(function (d) {
  57073. return descriptorToConfig(d);
  57074. });
  57075. }
  57076. return _context.abrupt("return", JSON.stringify(content, undefined, 2));
  57077. case 14:
  57078. case "end":
  57079. return _context.stop();
  57080. }
  57081. }
  57082. }, optionsAndDescriptors);
  57083. })
  57084. };
  57085. function descriptorToConfig(d) {
  57086. var _d$file;
  57087. var name = (_d$file = d.file) == null ? void 0 : _d$file.request;
  57088. if (name == null) {
  57089. if (typeof d.value === "object") {
  57090. name = d.value;
  57091. } else if (typeof d.value === "function") {
  57092. name = "[Function: " + d.value.toString().substr(0, 50) + " ... ]";
  57093. }
  57094. }
  57095. if (name == null) {
  57096. name = "[Unknown]";
  57097. }
  57098. if (d.options === undefined) {
  57099. return name;
  57100. } else if (d.name == null) {
  57101. return [name, d.options];
  57102. } else {
  57103. return [name, d.options, d.name];
  57104. }
  57105. }
  57106. var ConfigPrinter = function () {
  57107. function ConfigPrinter() {
  57108. this._stack = [];
  57109. }
  57110. var _proto = ConfigPrinter.prototype;
  57111. _proto.configure = function configure(enabled, type, _ref) {
  57112. var _this = this;
  57113. var callerName = _ref.callerName,
  57114. filepath = _ref.filepath;
  57115. if (!enabled) return function () {};
  57116. return function (content, index, envName) {
  57117. _this._stack.push({
  57118. type: type,
  57119. callerName: callerName,
  57120. filepath: filepath,
  57121. content: content,
  57122. index: index,
  57123. envName: envName
  57124. });
  57125. };
  57126. };
  57127. ConfigPrinter.format = regenerator.mark(function format(config) {
  57128. var title, loc, content;
  57129. return regenerator.wrap(function format$(_context2) {
  57130. while (1) {
  57131. switch (_context2.prev = _context2.next) {
  57132. case 0:
  57133. title = Formatter.title(config.type, config.callerName, config.filepath);
  57134. loc = Formatter.loc(config.index, config.envName);
  57135. if (loc) title += " " + loc;
  57136. return _context2.delegateYield(Formatter.optionsAndDescriptors(config.content), "t0", 4);
  57137. case 4:
  57138. content = _context2.t0;
  57139. return _context2.abrupt("return", title + "\n" + content);
  57140. case 6:
  57141. case "end":
  57142. return _context2.stop();
  57143. }
  57144. }
  57145. }, format);
  57146. });
  57147. _proto.output = regenerator.mark(function output() {
  57148. var configs;
  57149. return regenerator.wrap(function output$(_context3) {
  57150. while (1) {
  57151. switch (_context3.prev = _context3.next) {
  57152. case 0:
  57153. if (!(this._stack.length === 0)) {
  57154. _context3.next = 2;
  57155. break;
  57156. }
  57157. return _context3.abrupt("return", "");
  57158. case 2:
  57159. return _context3.delegateYield(gensync.all(this._stack.map(function (s) {
  57160. return ConfigPrinter.format(s);
  57161. })), "t0", 3);
  57162. case 3:
  57163. configs = _context3.t0;
  57164. return _context3.abrupt("return", configs.join("\n\n"));
  57165. case 5:
  57166. case "end":
  57167. return _context3.stop();
  57168. }
  57169. }
  57170. }, output, this);
  57171. });
  57172. return ConfigPrinter;
  57173. }();
  57174. var _marked$5 = regenerator.mark(buildPresetChain),
  57175. _marked2$2 = regenerator.mark(buildRootChain),
  57176. _marked3 = regenerator.mark(loadFileChain),
  57177. _marked4 = regenerator.mark(mergeExtendsChain),
  57178. _marked5 = regenerator.mark(mergeChainOpts);
  57179. var debug$3 = browser$1("babel:config:config-chain");
  57180. function buildPresetChain(arg, context) {
  57181. var chain;
  57182. return regenerator.wrap(function buildPresetChain$(_context) {
  57183. while (1) {
  57184. switch (_context.prev = _context.next) {
  57185. case 0:
  57186. return _context.delegateYield(buildPresetChainWalker(arg, context), "t0", 1);
  57187. case 1:
  57188. chain = _context.t0;
  57189. if (chain) {
  57190. _context.next = 4;
  57191. break;
  57192. }
  57193. return _context.abrupt("return", null);
  57194. case 4:
  57195. return _context.abrupt("return", {
  57196. plugins: dedupDescriptors(chain.plugins),
  57197. presets: dedupDescriptors(chain.presets),
  57198. options: chain.options.map(function (o) {
  57199. return normalizeOptions$5(o);
  57200. }),
  57201. files: new Set()
  57202. });
  57203. case 5:
  57204. case "end":
  57205. return _context.stop();
  57206. }
  57207. }
  57208. }, _marked$5);
  57209. }
  57210. var buildPresetChainWalker = makeChainWalker({
  57211. root: function root(preset) {
  57212. return loadPresetDescriptors(preset);
  57213. },
  57214. env: function env(preset, envName) {
  57215. return loadPresetEnvDescriptors(preset)(envName);
  57216. },
  57217. overrides: function overrides(preset, index) {
  57218. return loadPresetOverridesDescriptors(preset)(index);
  57219. },
  57220. overridesEnv: function overridesEnv(preset, index, envName) {
  57221. return loadPresetOverridesEnvDescriptors(preset)(index)(envName);
  57222. },
  57223. createLogger: function createLogger() {
  57224. return function () {};
  57225. }
  57226. });
  57227. var loadPresetDescriptors = makeWeakCacheSync(function (preset) {
  57228. return buildRootDescriptors(preset, preset.alias, createUncachedDescriptors);
  57229. });
  57230. var loadPresetEnvDescriptors = makeWeakCacheSync(function (preset) {
  57231. return makeStrongCacheSync(function (envName) {
  57232. return buildEnvDescriptors(preset, preset.alias, createUncachedDescriptors, envName);
  57233. });
  57234. });
  57235. var loadPresetOverridesDescriptors = makeWeakCacheSync(function (preset) {
  57236. return makeStrongCacheSync(function (index) {
  57237. return buildOverrideDescriptors(preset, preset.alias, createUncachedDescriptors, index);
  57238. });
  57239. });
  57240. var loadPresetOverridesEnvDescriptors = makeWeakCacheSync(function (preset) {
  57241. return makeStrongCacheSync(function (index) {
  57242. return makeStrongCacheSync(function (envName) {
  57243. return buildOverrideEnvDescriptors(preset, preset.alias, createUncachedDescriptors, index, envName);
  57244. });
  57245. });
  57246. });
  57247. function buildRootChain(opts, context) {
  57248. var configReport, babelRcReport, programmaticLogger, programmaticChain, programmaticReport, configFile, babelrc, babelrcRoots, babelrcRootsDirectory, configFileChain, configFileLogger, validatedFile, result, ignoreFile, babelrcFile, isIgnored, fileChain, pkgData, _yield$findRelativeCo, _validatedFile, babelrcLogger, _result, chain;
  57249. return regenerator.wrap(function buildRootChain$(_context2) {
  57250. while (1) {
  57251. switch (_context2.prev = _context2.next) {
  57252. case 0:
  57253. programmaticLogger = new ConfigPrinter();
  57254. return _context2.delegateYield(loadProgrammaticChain({
  57255. options: opts,
  57256. dirname: context.cwd
  57257. }, context, undefined, programmaticLogger), "t0", 2);
  57258. case 2:
  57259. programmaticChain = _context2.t0;
  57260. if (programmaticChain) {
  57261. _context2.next = 5;
  57262. break;
  57263. }
  57264. return _context2.abrupt("return", null);
  57265. case 5:
  57266. return _context2.delegateYield(programmaticLogger.output(), "t1", 6);
  57267. case 6:
  57268. programmaticReport = _context2.t1;
  57269. if (!(typeof opts.configFile === "string")) {
  57270. _context2.next = 12;
  57271. break;
  57272. }
  57273. return _context2.delegateYield(loadConfig$1(opts.configFile, context.cwd, context.envName, context.caller), "t2", 9);
  57274. case 9:
  57275. configFile = _context2.t2;
  57276. _context2.next = 15;
  57277. break;
  57278. case 12:
  57279. if (!(opts.configFile !== false)) {
  57280. _context2.next = 15;
  57281. break;
  57282. }
  57283. return _context2.delegateYield(findRootConfig(context.root, context.envName, context.caller), "t3", 14);
  57284. case 14:
  57285. configFile = _context2.t3;
  57286. case 15:
  57287. babelrc = opts.babelrc, babelrcRoots = opts.babelrcRoots;
  57288. babelrcRootsDirectory = context.cwd;
  57289. configFileChain = emptyChain();
  57290. configFileLogger = new ConfigPrinter();
  57291. if (!configFile) {
  57292. _context2.next = 30;
  57293. break;
  57294. }
  57295. validatedFile = validateConfigFile(configFile);
  57296. return _context2.delegateYield(loadFileChain(validatedFile, context, undefined, configFileLogger), "t4", 22);
  57297. case 22:
  57298. result = _context2.t4;
  57299. if (result) {
  57300. _context2.next = 25;
  57301. break;
  57302. }
  57303. return _context2.abrupt("return", null);
  57304. case 25:
  57305. return _context2.delegateYield(configFileLogger.output(), "t5", 26);
  57306. case 26:
  57307. configReport = _context2.t5;
  57308. if (babelrc === undefined) {
  57309. babelrc = validatedFile.options.babelrc;
  57310. }
  57311. if (babelrcRoots === undefined) {
  57312. babelrcRootsDirectory = validatedFile.dirname;
  57313. babelrcRoots = validatedFile.options.babelrcRoots;
  57314. }
  57315. mergeChain(configFileChain, result);
  57316. case 30:
  57317. isIgnored = false;
  57318. fileChain = emptyChain();
  57319. if (!((babelrc === true || babelrc === undefined) && typeof context.filename === "string")) {
  57320. _context2.next = 55;
  57321. break;
  57322. }
  57323. return _context2.delegateYield(findPackageData(context.filename), "t6", 34);
  57324. case 34:
  57325. pkgData = _context2.t6;
  57326. if (!(pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory))) {
  57327. _context2.next = 55;
  57328. break;
  57329. }
  57330. return _context2.delegateYield(findRelativeConfig(pkgData, context.envName, context.caller), "t7", 37);
  57331. case 37:
  57332. _yield$findRelativeCo = _context2.t7;
  57333. ignoreFile = _yield$findRelativeCo.ignore;
  57334. babelrcFile = _yield$findRelativeCo.config;
  57335. if (ignoreFile) {
  57336. fileChain.files.add(ignoreFile.filepath);
  57337. }
  57338. if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) {
  57339. isIgnored = true;
  57340. }
  57341. if (!(babelrcFile && !isIgnored)) {
  57342. _context2.next = 54;
  57343. break;
  57344. }
  57345. _validatedFile = validateBabelrcFile(babelrcFile);
  57346. babelrcLogger = new ConfigPrinter();
  57347. return _context2.delegateYield(loadFileChain(_validatedFile, context, undefined, babelrcLogger), "t8", 46);
  57348. case 46:
  57349. _result = _context2.t8;
  57350. if (_result) {
  57351. _context2.next = 51;
  57352. break;
  57353. }
  57354. isIgnored = true;
  57355. _context2.next = 54;
  57356. break;
  57357. case 51:
  57358. return _context2.delegateYield(babelrcLogger.output(), "t9", 52);
  57359. case 52:
  57360. babelRcReport = _context2.t9;
  57361. mergeChain(fileChain, _result);
  57362. case 54:
  57363. if (babelrcFile && isIgnored) {
  57364. fileChain.files.add(babelrcFile.filepath);
  57365. }
  57366. case 55:
  57367. if (context.showConfig) {
  57368. console.log("Babel configs on \"" + context.filename + "\" (ascending priority):\n" + [configReport, babelRcReport, programmaticReport].filter(function (x) {
  57369. return !!x;
  57370. }).join("\n\n") + "\n-----End Babel configs-----");
  57371. }
  57372. chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
  57373. return _context2.abrupt("return", {
  57374. plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),
  57375. presets: isIgnored ? [] : dedupDescriptors(chain.presets),
  57376. options: isIgnored ? [] : chain.options.map(function (o) {
  57377. return normalizeOptions$5(o);
  57378. }),
  57379. fileHandling: isIgnored ? "ignored" : "transpile",
  57380. ignore: ignoreFile || undefined,
  57381. babelrc: babelrcFile || undefined,
  57382. config: configFile || undefined,
  57383. files: chain.files
  57384. });
  57385. case 58:
  57386. case "end":
  57387. return _context2.stop();
  57388. }
  57389. }
  57390. }, _marked2$2);
  57391. }
  57392. function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
  57393. if (typeof babelrcRoots === "boolean") return babelrcRoots;
  57394. var absoluteRoot = context.root;
  57395. if (babelrcRoots === undefined) {
  57396. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  57397. }
  57398. var babelrcPatterns = babelrcRoots;
  57399. if (!Array.isArray(babelrcPatterns)) {
  57400. babelrcPatterns = [babelrcPatterns];
  57401. }
  57402. babelrcPatterns = babelrcPatterns.map(function (pat) {
  57403. return typeof pat === "string" ? path$1.resolve(babelrcRootsDirectory, pat) : pat;
  57404. });
  57405. if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
  57406. return pkgData.directories.indexOf(absoluteRoot) !== -1;
  57407. }
  57408. return babelrcPatterns.some(function (pat) {
  57409. if (typeof pat === "string") {
  57410. pat = pathToPattern(pat, babelrcRootsDirectory);
  57411. }
  57412. return pkgData.directories.some(function (directory) {
  57413. return matchPattern(pat, babelrcRootsDirectory, directory, context);
  57414. });
  57415. });
  57416. }
  57417. var validateConfigFile = makeWeakCacheSync(function (file) {
  57418. return {
  57419. filepath: file.filepath,
  57420. dirname: file.dirname,
  57421. options: validate("configfile", file.options)
  57422. };
  57423. });
  57424. var validateBabelrcFile = makeWeakCacheSync(function (file) {
  57425. return {
  57426. filepath: file.filepath,
  57427. dirname: file.dirname,
  57428. options: validate("babelrcfile", file.options)
  57429. };
  57430. });
  57431. var validateExtendFile = makeWeakCacheSync(function (file) {
  57432. return {
  57433. filepath: file.filepath,
  57434. dirname: file.dirname,
  57435. options: validate("extendsfile", file.options)
  57436. };
  57437. });
  57438. var loadProgrammaticChain = makeChainWalker({
  57439. root: function root(input) {
  57440. return buildRootDescriptors(input, "base", createCachedDescriptors);
  57441. },
  57442. env: function env(input, envName) {
  57443. return buildEnvDescriptors(input, "base", createCachedDescriptors, envName);
  57444. },
  57445. overrides: function overrides(input, index) {
  57446. return buildOverrideDescriptors(input, "base", createCachedDescriptors, index);
  57447. },
  57448. overridesEnv: function overridesEnv(input, index, envName) {
  57449. return buildOverrideEnvDescriptors(input, "base", createCachedDescriptors, index, envName);
  57450. },
  57451. createLogger: function createLogger(input, context, baseLogger) {
  57452. return buildProgrammaticLogger(input, context, baseLogger);
  57453. }
  57454. });
  57455. var loadFileChainWalker = makeChainWalker({
  57456. root: function root(file) {
  57457. return loadFileDescriptors(file);
  57458. },
  57459. env: function env(file, envName) {
  57460. return loadFileEnvDescriptors(file)(envName);
  57461. },
  57462. overrides: function overrides(file, index) {
  57463. return loadFileOverridesDescriptors(file)(index);
  57464. },
  57465. overridesEnv: function overridesEnv(file, index, envName) {
  57466. return loadFileOverridesEnvDescriptors(file)(index)(envName);
  57467. },
  57468. createLogger: function createLogger(file, context, baseLogger) {
  57469. return buildFileLogger(file.filepath, context, baseLogger);
  57470. }
  57471. });
  57472. function loadFileChain(input, context, files, baseLogger) {
  57473. var chain;
  57474. return regenerator.wrap(function loadFileChain$(_context3) {
  57475. while (1) {
  57476. switch (_context3.prev = _context3.next) {
  57477. case 0:
  57478. return _context3.delegateYield(loadFileChainWalker(input, context, files, baseLogger), "t0", 1);
  57479. case 1:
  57480. chain = _context3.t0;
  57481. if (chain) {
  57482. chain.files.add(input.filepath);
  57483. }
  57484. return _context3.abrupt("return", chain);
  57485. case 4:
  57486. case "end":
  57487. return _context3.stop();
  57488. }
  57489. }
  57490. }, _marked3);
  57491. }
  57492. var loadFileDescriptors = makeWeakCacheSync(function (file) {
  57493. return buildRootDescriptors(file, file.filepath, createUncachedDescriptors);
  57494. });
  57495. var loadFileEnvDescriptors = makeWeakCacheSync(function (file) {
  57496. return makeStrongCacheSync(function (envName) {
  57497. return buildEnvDescriptors(file, file.filepath, createUncachedDescriptors, envName);
  57498. });
  57499. });
  57500. var loadFileOverridesDescriptors = makeWeakCacheSync(function (file) {
  57501. return makeStrongCacheSync(function (index) {
  57502. return buildOverrideDescriptors(file, file.filepath, createUncachedDescriptors, index);
  57503. });
  57504. });
  57505. var loadFileOverridesEnvDescriptors = makeWeakCacheSync(function (file) {
  57506. return makeStrongCacheSync(function (index) {
  57507. return makeStrongCacheSync(function (envName) {
  57508. return buildOverrideEnvDescriptors(file, file.filepath, createUncachedDescriptors, index, envName);
  57509. });
  57510. });
  57511. });
  57512. function buildFileLogger(filepath, context, baseLogger) {
  57513. if (!baseLogger) {
  57514. return function () {};
  57515. }
  57516. return baseLogger.configure(context.showConfig, ChainFormatter.Config, {
  57517. filepath: filepath
  57518. });
  57519. }
  57520. function buildRootDescriptors(_ref, alias, descriptors) {
  57521. var dirname = _ref.dirname,
  57522. options = _ref.options;
  57523. return descriptors(dirname, options, alias);
  57524. }
  57525. function buildProgrammaticLogger(_, context, baseLogger) {
  57526. var _context$caller;
  57527. if (!baseLogger) {
  57528. return function () {};
  57529. }
  57530. return baseLogger.configure(context.showConfig, ChainFormatter.Programmatic, {
  57531. callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name
  57532. });
  57533. }
  57534. function buildEnvDescriptors(_ref2, alias, descriptors, envName) {
  57535. var dirname = _ref2.dirname,
  57536. options = _ref2.options;
  57537. var opts = options.env && options.env[envName];
  57538. return opts ? descriptors(dirname, opts, alias + ".env[\"" + envName + "\"]") : null;
  57539. }
  57540. function buildOverrideDescriptors(_ref3, alias, descriptors, index) {
  57541. var dirname = _ref3.dirname,
  57542. options = _ref3.options;
  57543. var opts = options.overrides && options.overrides[index];
  57544. if (!opts) throw new Error("Assertion failure - missing override");
  57545. return descriptors(dirname, opts, alias + ".overrides[" + index + "]");
  57546. }
  57547. function buildOverrideEnvDescriptors(_ref4, alias, descriptors, index, envName) {
  57548. var dirname = _ref4.dirname,
  57549. options = _ref4.options;
  57550. var override = options.overrides && options.overrides[index];
  57551. if (!override) throw new Error("Assertion failure - missing override");
  57552. var opts = override.env && override.env[envName];
  57553. return opts ? descriptors(dirname, opts, alias + ".overrides[" + index + "].env[\"" + envName + "\"]") : null;
  57554. }
  57555. function makeChainWalker(_ref5) {
  57556. var root = _ref5.root,
  57557. env = _ref5.env,
  57558. overrides = _ref5.overrides,
  57559. overridesEnv = _ref5.overridesEnv,
  57560. createLogger = _ref5.createLogger;
  57561. return regenerator.mark(function _callee(input, context, files, baseLogger) {
  57562. var dirname, flattenedConfigs, rootOpts, envOpts, chain, logger, _i, _flattenedConfigs, _flattenedConfigs$_i, config, _index, envName;
  57563. return regenerator.wrap(function _callee$(_context4) {
  57564. while (1) {
  57565. switch (_context4.prev = _context4.next) {
  57566. case 0:
  57567. if (files === void 0) {
  57568. files = new Set();
  57569. }
  57570. dirname = input.dirname;
  57571. flattenedConfigs = [];
  57572. rootOpts = root(input);
  57573. if (configIsApplicable(rootOpts, dirname, context)) {
  57574. flattenedConfigs.push({
  57575. config: rootOpts,
  57576. envName: undefined,
  57577. index: undefined
  57578. });
  57579. envOpts = env(input, context.envName);
  57580. if (envOpts && configIsApplicable(envOpts, dirname, context)) {
  57581. flattenedConfigs.push({
  57582. config: envOpts,
  57583. envName: context.envName,
  57584. index: undefined
  57585. });
  57586. }
  57587. (rootOpts.options.overrides || []).forEach(function (_, index) {
  57588. var overrideOps = overrides(input, index);
  57589. if (configIsApplicable(overrideOps, dirname, context)) {
  57590. flattenedConfigs.push({
  57591. config: overrideOps,
  57592. index: index,
  57593. envName: undefined
  57594. });
  57595. var overrideEnvOpts = overridesEnv(input, index, context.envName);
  57596. if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) {
  57597. flattenedConfigs.push({
  57598. config: overrideEnvOpts,
  57599. index: index,
  57600. envName: context.envName
  57601. });
  57602. }
  57603. }
  57604. });
  57605. }
  57606. if (!flattenedConfigs.some(function (_ref6) {
  57607. var _ref6$config$options = _ref6.config.options,
  57608. ignore = _ref6$config$options.ignore,
  57609. only = _ref6$config$options.only;
  57610. return shouldIgnore(context, ignore, only, dirname);
  57611. })) {
  57612. _context4.next = 7;
  57613. break;
  57614. }
  57615. return _context4.abrupt("return", null);
  57616. case 7:
  57617. chain = emptyChain();
  57618. logger = createLogger(input, context, baseLogger);
  57619. _i = 0, _flattenedConfigs = flattenedConfigs;
  57620. case 10:
  57621. if (!(_i < _flattenedConfigs.length)) {
  57622. _context4.next = 20;
  57623. break;
  57624. }
  57625. _flattenedConfigs$_i = _flattenedConfigs[_i], config = _flattenedConfigs$_i.config, _index = _flattenedConfigs$_i.index, envName = _flattenedConfigs$_i.envName;
  57626. return _context4.delegateYield(mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger), "t0", 13);
  57627. case 13:
  57628. if (_context4.t0) {
  57629. _context4.next = 15;
  57630. break;
  57631. }
  57632. return _context4.abrupt("return", null);
  57633. case 15:
  57634. logger(config, _index, envName);
  57635. return _context4.delegateYield(mergeChainOpts(chain, config), "t1", 17);
  57636. case 17:
  57637. _i++;
  57638. _context4.next = 10;
  57639. break;
  57640. case 20:
  57641. return _context4.abrupt("return", chain);
  57642. case 21:
  57643. case "end":
  57644. return _context4.stop();
  57645. }
  57646. }
  57647. }, _callee);
  57648. });
  57649. }
  57650. function mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
  57651. var file, fileChain;
  57652. return regenerator.wrap(function mergeExtendsChain$(_context5) {
  57653. while (1) {
  57654. switch (_context5.prev = _context5.next) {
  57655. case 0:
  57656. if (!(opts["extends"] === undefined)) {
  57657. _context5.next = 2;
  57658. break;
  57659. }
  57660. return _context5.abrupt("return", true);
  57661. case 2:
  57662. return _context5.delegateYield(loadConfig$1(opts["extends"], dirname, context.envName, context.caller), "t0", 3);
  57663. case 3:
  57664. file = _context5.t0;
  57665. if (!files.has(file)) {
  57666. _context5.next = 6;
  57667. break;
  57668. }
  57669. throw new Error("Configuration cycle detected loading " + file.filepath + ".\n" + "File already loaded following the config chain:\n" + Array.from(files, function (file) {
  57670. return " - " + file.filepath;
  57671. }).join("\n"));
  57672. case 6:
  57673. files.add(file);
  57674. return _context5.delegateYield(loadFileChain(validateExtendFile(file), context, files, baseLogger), "t1", 8);
  57675. case 8:
  57676. fileChain = _context5.t1;
  57677. files["delete"](file);
  57678. if (fileChain) {
  57679. _context5.next = 12;
  57680. break;
  57681. }
  57682. return _context5.abrupt("return", false);
  57683. case 12:
  57684. mergeChain(chain, fileChain);
  57685. return _context5.abrupt("return", true);
  57686. case 14:
  57687. case "end":
  57688. return _context5.stop();
  57689. }
  57690. }
  57691. }, _marked4);
  57692. }
  57693. function mergeChain(target, source) {
  57694. var _target$options, _target$plugins, _target$presets;
  57695. (_target$options = target.options).push.apply(_target$options, _toConsumableArray(source.options));
  57696. (_target$plugins = target.plugins).push.apply(_target$plugins, _toConsumableArray(source.plugins));
  57697. (_target$presets = target.presets).push.apply(_target$presets, _toConsumableArray(source.presets));
  57698. for (var _iterator = _createForOfIteratorHelperLoose(source.files), _step; !(_step = _iterator()).done;) {
  57699. var file = _step.value;
  57700. target.files.add(file);
  57701. }
  57702. return target;
  57703. }
  57704. function mergeChainOpts(target, _ref7) {
  57705. var _target$plugins2, _target$presets2;
  57706. var options, plugins, presets;
  57707. return regenerator.wrap(function mergeChainOpts$(_context6) {
  57708. while (1) {
  57709. switch (_context6.prev = _context6.next) {
  57710. case 0:
  57711. options = _ref7.options, plugins = _ref7.plugins, presets = _ref7.presets;
  57712. target.options.push(options);
  57713. _context6.t0 = (_target$plugins2 = target.plugins).push;
  57714. _context6.t1 = _target$plugins2;
  57715. _context6.t2 = _toConsumableArray;
  57716. return _context6.delegateYield(plugins(), "t3", 6);
  57717. case 6:
  57718. _context6.t4 = _context6.t3;
  57719. _context6.t5 = (0, _context6.t2)(_context6.t4);
  57720. _context6.t0.apply.call(_context6.t0, _context6.t1, _context6.t5);
  57721. _context6.t6 = (_target$presets2 = target.presets).push;
  57722. _context6.t7 = _target$presets2;
  57723. _context6.t8 = _toConsumableArray;
  57724. return _context6.delegateYield(presets(), "t9", 13);
  57725. case 13:
  57726. _context6.t10 = _context6.t9;
  57727. _context6.t11 = (0, _context6.t8)(_context6.t10);
  57728. _context6.t6.apply.call(_context6.t6, _context6.t7, _context6.t11);
  57729. return _context6.abrupt("return", target);
  57730. case 17:
  57731. case "end":
  57732. return _context6.stop();
  57733. }
  57734. }
  57735. }, _marked5);
  57736. }
  57737. function emptyChain() {
  57738. return {
  57739. options: [],
  57740. presets: [],
  57741. plugins: [],
  57742. files: new Set()
  57743. };
  57744. }
  57745. function normalizeOptions$5(opts) {
  57746. var options = Object.assign({}, opts);
  57747. delete options["extends"];
  57748. delete options.env;
  57749. delete options.overrides;
  57750. delete options.plugins;
  57751. delete options.presets;
  57752. delete options.passPerPreset;
  57753. delete options.ignore;
  57754. delete options.only;
  57755. delete options.test;
  57756. delete options.include;
  57757. delete options.exclude;
  57758. if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
  57759. options.sourceMaps = options.sourceMap;
  57760. delete options.sourceMap;
  57761. }
  57762. return options;
  57763. }
  57764. function dedupDescriptors(items) {
  57765. var map = new Map();
  57766. var descriptors = [];
  57767. for (var _iterator2 = _createForOfIteratorHelperLoose(items), _step2; !(_step2 = _iterator2()).done;) {
  57768. var item = _step2.value;
  57769. if (typeof item.value === "function") {
  57770. var fnKey = item.value;
  57771. var nameMap = map.get(fnKey);
  57772. if (!nameMap) {
  57773. nameMap = new Map();
  57774. map.set(fnKey, nameMap);
  57775. }
  57776. var desc = nameMap.get(item.name);
  57777. if (!desc) {
  57778. desc = {
  57779. value: item
  57780. };
  57781. descriptors.push(desc);
  57782. if (!item.ownPass) nameMap.set(item.name, desc);
  57783. } else {
  57784. desc.value = item;
  57785. }
  57786. } else {
  57787. descriptors.push({
  57788. value: item
  57789. });
  57790. }
  57791. }
  57792. return descriptors.reduce(function (acc, desc) {
  57793. acc.push(desc.value);
  57794. return acc;
  57795. }, []);
  57796. }
  57797. function configIsApplicable(_ref8, dirname, context) {
  57798. var options = _ref8.options;
  57799. return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname));
  57800. }
  57801. function configFieldIsApplicable(context, test, dirname) {
  57802. var patterns = Array.isArray(test) ? test : [test];
  57803. return matchesPatterns(context, patterns, dirname);
  57804. }
  57805. function shouldIgnore(context, ignore, only, dirname) {
  57806. if (ignore && matchesPatterns(context, ignore, dirname)) {
  57807. var _context$filename;
  57808. var message = "No config is applied to \"" + ((_context$filename = context.filename) != null ? _context$filename : "(unknown)") + "\" because it matches one of `ignore: " + JSON.stringify(ignore) + "` from \"" + dirname + "\"";
  57809. debug$3(message);
  57810. if (context.showConfig) {
  57811. console.log(message);
  57812. }
  57813. return true;
  57814. }
  57815. if (only && !matchesPatterns(context, only, dirname)) {
  57816. var _context$filename2;
  57817. var _message = "No config is applied to \"" + ((_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)") + "\" because it fails to match one of `only: " + JSON.stringify(only) + "` from \"" + dirname + "\"";
  57818. debug$3(_message);
  57819. if (context.showConfig) {
  57820. console.log(_message);
  57821. }
  57822. return true;
  57823. }
  57824. return false;
  57825. }
  57826. function matchesPatterns(context, patterns, dirname) {
  57827. return patterns.some(function (pattern) {
  57828. return matchPattern(pattern, dirname, context.filename, context);
  57829. });
  57830. }
  57831. function matchPattern(pattern, dirname, pathToTest, context) {
  57832. if (typeof pattern === "function") {
  57833. return !!pattern(pathToTest, {
  57834. dirname: dirname,
  57835. envName: context.envName,
  57836. caller: context.caller
  57837. });
  57838. }
  57839. if (typeof pathToTest !== "string") {
  57840. throw new Error("Configuration contains string/RegExp pattern, but no filename was passed to Babel");
  57841. }
  57842. if (typeof pattern === "string") {
  57843. pattern = pathToPattern(pattern, dirname);
  57844. }
  57845. return pattern.test(pathToTest);
  57846. }
  57847. var VALIDATORS = {
  57848. name: assertString,
  57849. manipulateOptions: assertFunction,
  57850. pre: assertFunction,
  57851. post: assertFunction,
  57852. inherits: assertFunction,
  57853. visitor: assertVisitorMap,
  57854. parserOverride: assertFunction,
  57855. generatorOverride: assertFunction
  57856. };
  57857. function assertVisitorMap(loc, value) {
  57858. var obj = assertObject(loc, value);
  57859. if (obj) {
  57860. Object.keys(obj).forEach(function (prop) {
  57861. return assertVisitorHandler(prop, obj[prop]);
  57862. });
  57863. if (obj.enter || obj.exit) {
  57864. throw new Error(msg(loc) + " cannot contain catch-all \"enter\" or \"exit\" handlers. Please target individual nodes.");
  57865. }
  57866. }
  57867. return obj;
  57868. }
  57869. function assertVisitorHandler(key, value) {
  57870. if (value && typeof value === "object") {
  57871. Object.keys(value).forEach(function (handler) {
  57872. if (handler !== "enter" && handler !== "exit") {
  57873. throw new Error(".visitor[\"" + key + "\"] may only have .enter and/or .exit handlers.");
  57874. }
  57875. });
  57876. } else if (typeof value !== "function") {
  57877. throw new Error(".visitor[\"" + key + "\"] must be a function");
  57878. }
  57879. return value;
  57880. }
  57881. function validatePluginObject(obj) {
  57882. var rootPath = {
  57883. type: "root",
  57884. source: "plugin"
  57885. };
  57886. Object.keys(obj).forEach(function (key) {
  57887. var validator = VALIDATORS[key];
  57888. if (validator) {
  57889. var optLoc = {
  57890. type: "option",
  57891. name: key,
  57892. parent: rootPath
  57893. };
  57894. validator(optLoc, obj[key]);
  57895. } else {
  57896. var invalidPluginPropertyError = new Error("." + key + " is not a valid Plugin property");
  57897. invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
  57898. throw invalidPluginPropertyError;
  57899. }
  57900. });
  57901. return obj;
  57902. }
  57903. function makeConfigAPI(cache) {
  57904. var env = function env(value) {
  57905. return cache.using(function (data) {
  57906. if (typeof value === "undefined") return data.envName;
  57907. if (typeof value === "function") {
  57908. return assertSimpleType(value(data.envName));
  57909. }
  57910. if (!Array.isArray(value)) value = [value];
  57911. return value.some(function (entry) {
  57912. if (typeof entry !== "string") {
  57913. throw new Error("Unexpected non-string value");
  57914. }
  57915. return entry === data.envName;
  57916. });
  57917. });
  57918. };
  57919. var caller = function caller(cb) {
  57920. return cache.using(function (data) {
  57921. return assertSimpleType(cb(data.caller));
  57922. });
  57923. };
  57924. return {
  57925. version: version$3,
  57926. cache: cache.simple(),
  57927. env: env,
  57928. async: function async() {
  57929. return false;
  57930. },
  57931. caller: caller,
  57932. assertVersion: assertVersion
  57933. };
  57934. }
  57935. function makePresetAPI(cache) {
  57936. var targets = function targets() {
  57937. return JSON.parse(cache.using(function (data) {
  57938. return JSON.stringify(data.targets);
  57939. }));
  57940. };
  57941. return Object.assign({}, makeConfigAPI(cache), {
  57942. targets: targets
  57943. });
  57944. }
  57945. function makePluginAPI(cache) {
  57946. var assumption = function assumption(name) {
  57947. return cache.using(function (data) {
  57948. return data.assumptions[name];
  57949. });
  57950. };
  57951. return Object.assign({}, makePresetAPI(cache), {
  57952. assumption: assumption
  57953. });
  57954. }
  57955. function assertVersion(range) {
  57956. if (typeof range === "number") {
  57957. if (!Number.isInteger(range)) {
  57958. throw new Error("Expected string or integer value.");
  57959. }
  57960. range = "^" + range + ".0.0-0";
  57961. }
  57962. if (typeof range !== "string") {
  57963. throw new Error("Expected string or integer value.");
  57964. }
  57965. if (semver$a.satisfies(version$3, range)) return;
  57966. var limit = Error.stackTraceLimit;
  57967. if (typeof limit === "number" && limit < 25) {
  57968. Error.stackTraceLimit = 25;
  57969. }
  57970. var err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + version$3 + "\". " + "If you are sure you have a compatible version of @babel/core, " + "it is likely that something in your build process is loading the " + "wrong version. Inspect the stack trace of this error to look for " + "the first entry that doesn't mention \"@babel/core\" or \"babel-core\" " + "to see what is calling Babel.");
  57971. if (typeof limit === "number") {
  57972. Error.stackTraceLimit = limit;
  57973. }
  57974. throw Object.assign(err, {
  57975. code: "BABEL_VERSION_UNSUPPORTED",
  57976. version: version$3,
  57977. range: range
  57978. });
  57979. }
  57980. var _excluded$2 = ["showIgnoredFiles"];
  57981. var _marked$4 = regenerator.mark(loadPrivatePartialConfig);
  57982. function resolveRootMode(rootDir, rootMode) {
  57983. switch (rootMode) {
  57984. case "root":
  57985. return rootDir;
  57986. case "upward-optional":
  57987. {
  57988. var upwardRootDir = findConfigUpwards();
  57989. return upwardRootDir === null ? rootDir : upwardRootDir;
  57990. }
  57991. case "upward":
  57992. {
  57993. var _upwardRootDir = findConfigUpwards();
  57994. if (_upwardRootDir !== null) return _upwardRootDir;
  57995. throw Object.assign(new Error("Babel was run with rootMode:\"upward\" but a root could not " + ("be found when searching upward from \"" + rootDir + "\".\n") + "One of the following config files must be in the directory tree: " + ("\"" + ROOT_CONFIG_FILENAMES.join(", ") + "\".")), {
  57996. code: "BABEL_ROOT_NOT_FOUND",
  57997. dirname: rootDir
  57998. });
  57999. }
  58000. default:
  58001. throw new Error("Assertion failure - unknown rootMode value.");
  58002. }
  58003. }
  58004. function loadPrivatePartialConfig(inputOpts) {
  58005. var args, _args$envName, envName, _args$cwd, cwd, _args$root, rootDir, _args$rootMode, rootMode, caller, _args$cloneInputAst, cloneInputAst, absoluteCwd, absoluteRootDir, filename, showConfigPath, context, configChain, merged, options;
  58006. return regenerator.wrap(function loadPrivatePartialConfig$(_context) {
  58007. while (1) {
  58008. switch (_context.prev = _context.next) {
  58009. case 0:
  58010. if (!(inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts)))) {
  58011. _context.next = 2;
  58012. break;
  58013. }
  58014. throw new Error("Babel options must be an object, null, or undefined");
  58015. case 2:
  58016. args = inputOpts ? validate("arguments", inputOpts) : {};
  58017. _args$envName = args.envName, envName = _args$envName === void 0 ? getEnv() : _args$envName, _args$cwd = args.cwd, cwd = _args$cwd === void 0 ? "." : _args$cwd, _args$root = args.root, rootDir = _args$root === void 0 ? "." : _args$root, _args$rootMode = args.rootMode, rootMode = _args$rootMode === void 0 ? "root" : _args$rootMode, caller = args.caller, _args$cloneInputAst = args.cloneInputAst, cloneInputAst = _args$cloneInputAst === void 0 ? true : _args$cloneInputAst;
  58018. absoluteCwd = path$1.resolve(cwd);
  58019. absoluteRootDir = resolveRootMode(path$1.resolve(absoluteCwd, rootDir), rootMode);
  58020. filename = typeof args.filename === "string" ? path$1.resolve(cwd, args.filename) : undefined;
  58021. return _context.delegateYield(resolveShowConfigPath(), "t0", 8);
  58022. case 8:
  58023. showConfigPath = _context.t0;
  58024. context = {
  58025. filename: filename,
  58026. cwd: absoluteCwd,
  58027. root: absoluteRootDir,
  58028. envName: envName,
  58029. caller: caller,
  58030. showConfig: showConfigPath === filename
  58031. };
  58032. return _context.delegateYield(buildRootChain(args, context), "t1", 11);
  58033. case 11:
  58034. configChain = _context.t1;
  58035. if (configChain) {
  58036. _context.next = 14;
  58037. break;
  58038. }
  58039. return _context.abrupt("return", null);
  58040. case 14:
  58041. merged = {
  58042. assumptions: {}
  58043. };
  58044. configChain.options.forEach(function (opts) {
  58045. mergeOptions(merged, opts);
  58046. });
  58047. options = Object.assign({}, merged, {
  58048. targets: resolveTargets(merged),
  58049. cloneInputAst: cloneInputAst,
  58050. babelrc: false,
  58051. configFile: false,
  58052. browserslistConfigFile: false,
  58053. passPerPreset: false,
  58054. envName: context.envName,
  58055. cwd: context.cwd,
  58056. root: context.root,
  58057. rootMode: "root",
  58058. filename: typeof context.filename === "string" ? context.filename : undefined,
  58059. plugins: configChain.plugins.map(function (descriptor) {
  58060. return createItemFromDescriptor(descriptor);
  58061. }),
  58062. presets: configChain.presets.map(function (descriptor) {
  58063. return createItemFromDescriptor(descriptor);
  58064. })
  58065. });
  58066. return _context.abrupt("return", {
  58067. options: options,
  58068. context: context,
  58069. fileHandling: configChain.fileHandling,
  58070. ignore: configChain.ignore,
  58071. babelrc: configChain.babelrc,
  58072. config: configChain.config,
  58073. files: configChain.files
  58074. });
  58075. case 18:
  58076. case "end":
  58077. return _context.stop();
  58078. }
  58079. }
  58080. }, _marked$4);
  58081. }
  58082. var loadPartialConfig$1 = gensync(regenerator.mark(function _callee(opts) {
  58083. var showIgnoredFiles, _opts, result, options, babelrc, ignore, config, fileHandling, files;
  58084. return regenerator.wrap(function _callee$(_context2) {
  58085. while (1) {
  58086. switch (_context2.prev = _context2.next) {
  58087. case 0:
  58088. showIgnoredFiles = false;
  58089. if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
  58090. _opts = opts;
  58091. showIgnoredFiles = _opts.showIgnoredFiles;
  58092. opts = _objectWithoutPropertiesLoose(_opts, _excluded$2);
  58093. }
  58094. return _context2.delegateYield(loadPrivatePartialConfig(opts), "t0", 3);
  58095. case 3:
  58096. result = _context2.t0;
  58097. if (result) {
  58098. _context2.next = 6;
  58099. break;
  58100. }
  58101. return _context2.abrupt("return", null);
  58102. case 6:
  58103. options = result.options, babelrc = result.babelrc, ignore = result.ignore, config = result.config, fileHandling = result.fileHandling, files = result.files;
  58104. if (!(fileHandling === "ignored" && !showIgnoredFiles)) {
  58105. _context2.next = 9;
  58106. break;
  58107. }
  58108. return _context2.abrupt("return", null);
  58109. case 9:
  58110. (options.plugins || []).forEach(function (item) {
  58111. if (item.value instanceof Plugin$1) {
  58112. throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()");
  58113. }
  58114. });
  58115. return _context2.abrupt("return", new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files));
  58116. case 11:
  58117. case "end":
  58118. return _context2.stop();
  58119. }
  58120. }
  58121. }, _callee);
  58122. }));
  58123. var PartialConfig = function () {
  58124. function PartialConfig(options, babelrc, ignore, config, fileHandling, files) {
  58125. this.options = void 0;
  58126. this.babelrc = void 0;
  58127. this.babelignore = void 0;
  58128. this.config = void 0;
  58129. this.fileHandling = void 0;
  58130. this.files = void 0;
  58131. this.options = options;
  58132. this.babelignore = ignore;
  58133. this.babelrc = babelrc;
  58134. this.config = config;
  58135. this.fileHandling = fileHandling;
  58136. this.files = files;
  58137. Object.freeze(this);
  58138. }
  58139. var _proto = PartialConfig.prototype;
  58140. _proto.hasFilesystemConfig = function hasFilesystemConfig() {
  58141. return this.babelrc !== undefined || this.config !== undefined;
  58142. };
  58143. return PartialConfig;
  58144. }();
  58145. Object.freeze(PartialConfig.prototype);
  58146. var _marked$3 = regenerator.mark(loadPluginDescriptor),
  58147. _marked2$1 = regenerator.mark(loadPresetDescriptor);
  58148. var loadConfig = gensync(regenerator.mark(function loadFullConfig(inputOpts) {
  58149. var _opts$assumptions;
  58150. var result, options, context, fileHandling, optionDefaults, plugins, presets, presetContext, toDescriptor, presetsDescriptors, initialPluginsDescriptors, pluginDescriptorsByPass, passes, ignored, opts, pluginContext;
  58151. return regenerator.wrap(function loadFullConfig$(_context3) {
  58152. while (1) {
  58153. switch (_context3.prev = _context3.next) {
  58154. case 0:
  58155. return _context3.delegateYield(loadPrivatePartialConfig(inputOpts), "t0", 1);
  58156. case 1:
  58157. result = _context3.t0;
  58158. if (result) {
  58159. _context3.next = 4;
  58160. break;
  58161. }
  58162. return _context3.abrupt("return", null);
  58163. case 4:
  58164. options = result.options, context = result.context, fileHandling = result.fileHandling;
  58165. if (!(fileHandling === "ignored")) {
  58166. _context3.next = 7;
  58167. break;
  58168. }
  58169. return _context3.abrupt("return", null);
  58170. case 7:
  58171. optionDefaults = {};
  58172. plugins = options.plugins, presets = options.presets;
  58173. if (!(!plugins || !presets)) {
  58174. _context3.next = 11;
  58175. break;
  58176. }
  58177. throw new Error("Assertion failure - plugins and presets exist");
  58178. case 11:
  58179. presetContext = Object.assign({}, context, {
  58180. targets: options.targets
  58181. });
  58182. toDescriptor = function toDescriptor(item) {
  58183. var desc = getItemDescriptor(item);
  58184. if (!desc) {
  58185. throw new Error("Assertion failure - must be config item");
  58186. }
  58187. return desc;
  58188. };
  58189. presetsDescriptors = presets.map(toDescriptor);
  58190. initialPluginsDescriptors = plugins.map(toDescriptor);
  58191. pluginDescriptorsByPass = [[]];
  58192. passes = [];
  58193. return _context3.delegateYield(enhanceError(context, regenerator.mark(function recursePresetDescriptors(rawPresets, pluginDescriptorsPass) {
  58194. var presets, i, descriptor, _iterator, _step, _step$value, preset, pass, _ignored;
  58195. return regenerator.wrap(function recursePresetDescriptors$(_context) {
  58196. while (1) {
  58197. switch (_context.prev = _context.next) {
  58198. case 0:
  58199. presets = [];
  58200. i = 0;
  58201. case 2:
  58202. if (!(i < rawPresets.length)) {
  58203. _context.next = 30;
  58204. break;
  58205. }
  58206. descriptor = rawPresets[i];
  58207. if (!(descriptor.options !== false)) {
  58208. _context.next = 27;
  58209. break;
  58210. }
  58211. _context.prev = 5;
  58212. if (!descriptor.ownPass) {
  58213. _context.next = 15;
  58214. break;
  58215. }
  58216. _context.t0 = presets;
  58217. return _context.delegateYield(loadPresetDescriptor(descriptor, presetContext), "t1", 9);
  58218. case 9:
  58219. _context.t2 = _context.t1;
  58220. _context.t3 = [];
  58221. _context.t4 = {
  58222. preset: _context.t2,
  58223. pass: _context.t3
  58224. };
  58225. _context.t0.push.call(_context.t0, _context.t4);
  58226. _context.next = 21;
  58227. break;
  58228. case 15:
  58229. _context.t5 = presets;
  58230. return _context.delegateYield(loadPresetDescriptor(descriptor, presetContext), "t6", 17);
  58231. case 17:
  58232. _context.t7 = _context.t6;
  58233. _context.t8 = pluginDescriptorsPass;
  58234. _context.t9 = {
  58235. preset: _context.t7,
  58236. pass: _context.t8
  58237. };
  58238. _context.t5.unshift.call(_context.t5, _context.t9);
  58239. case 21:
  58240. _context.next = 27;
  58241. break;
  58242. case 23:
  58243. _context.prev = 23;
  58244. _context.t10 = _context["catch"](5);
  58245. if (_context.t10.code === "BABEL_UNKNOWN_OPTION") {
  58246. checkNoUnwrappedItemOptionPairs(rawPresets, i, "preset", _context.t10);
  58247. }
  58248. throw _context.t10;
  58249. case 27:
  58250. i++;
  58251. _context.next = 2;
  58252. break;
  58253. case 30:
  58254. if (!(presets.length > 0)) {
  58255. _context.next = 45;
  58256. break;
  58257. }
  58258. pluginDescriptorsByPass.splice.apply(pluginDescriptorsByPass, [1, 0].concat(_toConsumableArray(presets.map(function (o) {
  58259. return o.pass;
  58260. }).filter(function (p) {
  58261. return p !== pluginDescriptorsPass;
  58262. }))));
  58263. _iterator = _createForOfIteratorHelperLoose(presets);
  58264. case 33:
  58265. if ((_step = _iterator()).done) {
  58266. _context.next = 45;
  58267. break;
  58268. }
  58269. _step$value = _step.value, preset = _step$value.preset, pass = _step$value.pass;
  58270. if (preset) {
  58271. _context.next = 37;
  58272. break;
  58273. }
  58274. return _context.abrupt("return", true);
  58275. case 37:
  58276. pass.push.apply(pass, _toConsumableArray(preset.plugins));
  58277. return _context.delegateYield(recursePresetDescriptors(preset.presets, pass), "t11", 39);
  58278. case 39:
  58279. _ignored = _context.t11;
  58280. if (!_ignored) {
  58281. _context.next = 42;
  58282. break;
  58283. }
  58284. return _context.abrupt("return", true);
  58285. case 42:
  58286. preset.options.forEach(function (opts) {
  58287. mergeOptions(optionDefaults, opts);
  58288. });
  58289. case 43:
  58290. _context.next = 33;
  58291. break;
  58292. case 45:
  58293. case "end":
  58294. return _context.stop();
  58295. }
  58296. }
  58297. }, recursePresetDescriptors, null, [[5, 23]]);
  58298. }))(presetsDescriptors, pluginDescriptorsByPass[0]), "t1", 18);
  58299. case 18:
  58300. ignored = _context3.t1;
  58301. if (!ignored) {
  58302. _context3.next = 21;
  58303. break;
  58304. }
  58305. return _context3.abrupt("return", null);
  58306. case 21:
  58307. opts = optionDefaults;
  58308. mergeOptions(opts, options);
  58309. pluginContext = Object.assign({}, presetContext, {
  58310. assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {}
  58311. });
  58312. return _context3.delegateYield(enhanceError(context, regenerator.mark(function loadPluginDescriptors() {
  58313. var _pluginDescriptorsByP;
  58314. var _iterator2, _step2, descs, pass, i, descriptor;
  58315. return regenerator.wrap(function loadPluginDescriptors$(_context2) {
  58316. while (1) {
  58317. switch (_context2.prev = _context2.next) {
  58318. case 0:
  58319. (_pluginDescriptorsByP = pluginDescriptorsByPass[0]).unshift.apply(_pluginDescriptorsByP, _toConsumableArray(initialPluginsDescriptors));
  58320. _iterator2 = _createForOfIteratorHelperLoose(pluginDescriptorsByPass);
  58321. case 2:
  58322. if ((_step2 = _iterator2()).done) {
  58323. _context2.next = 26;
  58324. break;
  58325. }
  58326. descs = _step2.value;
  58327. pass = [];
  58328. passes.push(pass);
  58329. i = 0;
  58330. case 7:
  58331. if (!(i < descs.length)) {
  58332. _context2.next = 24;
  58333. break;
  58334. }
  58335. descriptor = descs[i];
  58336. if (!(descriptor.options !== false)) {
  58337. _context2.next = 21;
  58338. break;
  58339. }
  58340. _context2.prev = 10;
  58341. _context2.t0 = pass;
  58342. return _context2.delegateYield(loadPluginDescriptor(descriptor, pluginContext), "t1", 13);
  58343. case 13:
  58344. _context2.t2 = _context2.t1;
  58345. _context2.t0.push.call(_context2.t0, _context2.t2);
  58346. _context2.next = 21;
  58347. break;
  58348. case 17:
  58349. _context2.prev = 17;
  58350. _context2.t3 = _context2["catch"](10);
  58351. if (_context2.t3.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") {
  58352. checkNoUnwrappedItemOptionPairs(descs, i, "plugin", _context2.t3);
  58353. }
  58354. throw _context2.t3;
  58355. case 21:
  58356. i++;
  58357. _context2.next = 7;
  58358. break;
  58359. case 24:
  58360. _context2.next = 2;
  58361. break;
  58362. case 26:
  58363. case "end":
  58364. return _context2.stop();
  58365. }
  58366. }
  58367. }, loadPluginDescriptors, null, [[10, 17]]);
  58368. }))(), "t2", 25);
  58369. case 25:
  58370. opts.plugins = passes[0];
  58371. opts.presets = passes.slice(1).filter(function (plugins) {
  58372. return plugins.length > 0;
  58373. }).map(function (plugins) {
  58374. return {
  58375. plugins: plugins
  58376. };
  58377. });
  58378. opts.passPerPreset = opts.presets.length > 0;
  58379. return _context3.abrupt("return", {
  58380. options: opts,
  58381. passes: passes
  58382. });
  58383. case 29:
  58384. case "end":
  58385. return _context3.stop();
  58386. }
  58387. }
  58388. }, loadFullConfig);
  58389. }));
  58390. function enhanceError(context, fn) {
  58391. return regenerator.mark(function _callee(arg1, arg2) {
  58392. return regenerator.wrap(function _callee$(_context4) {
  58393. while (1) {
  58394. switch (_context4.prev = _context4.next) {
  58395. case 0:
  58396. _context4.prev = 0;
  58397. return _context4.delegateYield(fn(arg1, arg2), "t0", 2);
  58398. case 2:
  58399. return _context4.abrupt("return", _context4.t0);
  58400. case 5:
  58401. _context4.prev = 5;
  58402. _context4.t1 = _context4["catch"](0);
  58403. if (!/^\[BABEL\]/.test(_context4.t1.message)) {
  58404. _context4.t1.message = "[BABEL] " + (context.filename || "unknown") + ": " + _context4.t1.message;
  58405. }
  58406. throw _context4.t1;
  58407. case 9:
  58408. case "end":
  58409. return _context4.stop();
  58410. }
  58411. }
  58412. }, _callee, null, [[0, 5]]);
  58413. });
  58414. }
  58415. var makeDescriptorLoader = function makeDescriptorLoader(apiFactory) {
  58416. return makeWeakCache(regenerator.mark(function _callee2(_ref, cache) {
  58417. var value, options, dirname, alias, item, factory, api;
  58418. return regenerator.wrap(function _callee2$(_context5) {
  58419. while (1) {
  58420. switch (_context5.prev = _context5.next) {
  58421. case 0:
  58422. value = _ref.value, options = _ref.options, dirname = _ref.dirname, alias = _ref.alias;
  58423. if (!(options === false)) {
  58424. _context5.next = 3;
  58425. break;
  58426. }
  58427. throw new Error("Assertion failure");
  58428. case 3:
  58429. options = options || {};
  58430. item = value;
  58431. if (!(typeof value === "function")) {
  58432. _context5.next = 17;
  58433. break;
  58434. }
  58435. factory = maybeAsync(value, "You appear to be using an async plugin/preset, but Babel has been called synchronously");
  58436. api = Object.assign({}, babel, apiFactory(cache));
  58437. _context5.prev = 8;
  58438. return _context5.delegateYield(factory(api, options, dirname), "t0", 10);
  58439. case 10:
  58440. item = _context5.t0;
  58441. _context5.next = 17;
  58442. break;
  58443. case 13:
  58444. _context5.prev = 13;
  58445. _context5.t1 = _context5["catch"](8);
  58446. if (alias) {
  58447. _context5.t1.message += " (While processing: " + JSON.stringify(alias) + ")";
  58448. }
  58449. throw _context5.t1;
  58450. case 17:
  58451. if (!(!item || typeof item !== "object")) {
  58452. _context5.next = 19;
  58453. break;
  58454. }
  58455. throw new Error("Plugin/Preset did not return an object.");
  58456. case 19:
  58457. if (!isThenable$1(item)) {
  58458. _context5.next = 22;
  58459. break;
  58460. }
  58461. return _context5.delegateYield([], "t2", 21);
  58462. case 21:
  58463. throw new Error("You appear to be using a promise as a plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, " + "you may need to upgrade your @babel/core version. " + "As an alternative, you can prefix the promise with \"await\". " + ("(While processing: " + JSON.stringify(alias) + ")"));
  58464. case 22:
  58465. return _context5.abrupt("return", {
  58466. value: item,
  58467. options: options,
  58468. dirname: dirname,
  58469. alias: alias
  58470. });
  58471. case 23:
  58472. case "end":
  58473. return _context5.stop();
  58474. }
  58475. }
  58476. }, _callee2, null, [[8, 13]]);
  58477. }));
  58478. };
  58479. var pluginDescriptorLoader = makeDescriptorLoader(makePluginAPI);
  58480. var presetDescriptorLoader = makeDescriptorLoader(makePresetAPI);
  58481. function loadPluginDescriptor(descriptor, context) {
  58482. return regenerator.wrap(function loadPluginDescriptor$(_context6) {
  58483. while (1) {
  58484. switch (_context6.prev = _context6.next) {
  58485. case 0:
  58486. if (!(descriptor.value instanceof Plugin$1)) {
  58487. _context6.next = 4;
  58488. break;
  58489. }
  58490. if (!descriptor.options) {
  58491. _context6.next = 3;
  58492. break;
  58493. }
  58494. throw new Error("Passed options to an existing Plugin instance will not work.");
  58495. case 3:
  58496. return _context6.abrupt("return", descriptor.value);
  58497. case 4:
  58498. _context6.t0 = instantiatePlugin;
  58499. return _context6.delegateYield(pluginDescriptorLoader(descriptor, context), "t1", 6);
  58500. case 6:
  58501. _context6.t2 = _context6.t1;
  58502. _context6.t3 = context;
  58503. return _context6.delegateYield((0, _context6.t0)(_context6.t2, _context6.t3), "t4", 9);
  58504. case 9:
  58505. return _context6.abrupt("return", _context6.t4);
  58506. case 10:
  58507. case "end":
  58508. return _context6.stop();
  58509. }
  58510. }
  58511. }, _marked$3);
  58512. }
  58513. var instantiatePlugin = makeWeakCache(regenerator.mark(function _callee3(_ref2, cache) {
  58514. var value, options, dirname, alias, pluginObj, plugin, inheritsDescriptor, inherits;
  58515. return regenerator.wrap(function _callee3$(_context7) {
  58516. while (1) {
  58517. switch (_context7.prev = _context7.next) {
  58518. case 0:
  58519. value = _ref2.value, options = _ref2.options, dirname = _ref2.dirname, alias = _ref2.alias;
  58520. pluginObj = validatePluginObject(value);
  58521. plugin = Object.assign({}, pluginObj);
  58522. if (plugin.visitor) {
  58523. plugin.visitor = traverse.explode(Object.assign({}, plugin.visitor));
  58524. }
  58525. if (!plugin.inherits) {
  58526. _context7.next = 12;
  58527. break;
  58528. }
  58529. inheritsDescriptor = {
  58530. name: undefined,
  58531. alias: alias + "$inherits",
  58532. value: plugin.inherits,
  58533. options: options,
  58534. dirname: dirname
  58535. };
  58536. return _context7.delegateYield(forwardAsync(loadPluginDescriptor, function (run) {
  58537. return cache.invalidate(function (data) {
  58538. return run(inheritsDescriptor, data);
  58539. });
  58540. }), "t0", 7);
  58541. case 7:
  58542. inherits = _context7.t0;
  58543. plugin.pre = chain(inherits.pre, plugin.pre);
  58544. plugin.post = chain(inherits.post, plugin.post);
  58545. plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions);
  58546. plugin.visitor = traverse.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
  58547. case 12:
  58548. return _context7.abrupt("return", new Plugin$1(plugin, options, alias));
  58549. case 13:
  58550. case "end":
  58551. return _context7.stop();
  58552. }
  58553. }
  58554. }, _callee3);
  58555. }));
  58556. var validateIfOptionNeedsFilename = function validateIfOptionNeedsFilename(options, descriptor) {
  58557. if (options.test || options.include || options.exclude) {
  58558. var formattedPresetName = descriptor.name ? "\"" + descriptor.name + "\"" : "/* your preset */";
  58559. throw new Error(["Preset " + formattedPresetName + " requires a filename to be set when babel is called directly,", "```", "babel.transform(code, { filename: 'file.ts', presets: [" + formattedPresetName + "] });", "```", "See https://babeljs.io/docs/en/options#filename for more information."].join("\n"));
  58560. }
  58561. };
  58562. var validatePreset = function validatePreset(preset, context, descriptor) {
  58563. if (!context.filename) {
  58564. var options = preset.options;
  58565. validateIfOptionNeedsFilename(options, descriptor);
  58566. if (options.overrides) {
  58567. options.overrides.forEach(function (overrideOptions) {
  58568. return validateIfOptionNeedsFilename(overrideOptions, descriptor);
  58569. });
  58570. }
  58571. }
  58572. };
  58573. function loadPresetDescriptor(descriptor, context) {
  58574. var preset;
  58575. return regenerator.wrap(function loadPresetDescriptor$(_context8) {
  58576. while (1) {
  58577. switch (_context8.prev = _context8.next) {
  58578. case 0:
  58579. _context8.t0 = instantiatePreset;
  58580. return _context8.delegateYield(presetDescriptorLoader(descriptor, context), "t1", 2);
  58581. case 2:
  58582. _context8.t2 = _context8.t1;
  58583. preset = (0, _context8.t0)(_context8.t2);
  58584. validatePreset(preset, context, descriptor);
  58585. return _context8.delegateYield(buildPresetChain(preset, context), "t3", 6);
  58586. case 6:
  58587. return _context8.abrupt("return", _context8.t3);
  58588. case 7:
  58589. case "end":
  58590. return _context8.stop();
  58591. }
  58592. }
  58593. }, _marked2$1);
  58594. }
  58595. var instantiatePreset = makeWeakCacheSync(function (_ref3) {
  58596. var value = _ref3.value,
  58597. dirname = _ref3.dirname,
  58598. alias = _ref3.alias;
  58599. return {
  58600. options: validate("preset", value),
  58601. alias: alias,
  58602. dirname: dirname
  58603. };
  58604. });
  58605. function chain(a, b) {
  58606. var fns = [a, b].filter(Boolean);
  58607. if (fns.length <= 1) return fns[0];
  58608. return function () {
  58609. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  58610. args[_key] = arguments[_key];
  58611. }
  58612. for (var _iterator3 = _createForOfIteratorHelperLoose(fns), _step3; !(_step3 = _iterator3()).done;) {
  58613. var fn = _step3.value;
  58614. fn.apply(this, args);
  58615. }
  58616. };
  58617. }
  58618. var loadOptionsRunner = gensync(regenerator.mark(function _callee(opts) {
  58619. var _config$options;
  58620. var config;
  58621. return regenerator.wrap(function _callee$(_context) {
  58622. while (1) {
  58623. switch (_context.prev = _context.next) {
  58624. case 0:
  58625. return _context.delegateYield(loadConfig(opts), "t0", 1);
  58626. case 1:
  58627. config = _context.t0;
  58628. return _context.abrupt("return", (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null);
  58629. case 3:
  58630. case "end":
  58631. return _context.stop();
  58632. }
  58633. }
  58634. }, _callee);
  58635. }));
  58636. var createConfigItemRunner = gensync(createConfigItem$1);
  58637. var maybeErrback = function maybeErrback(runner) {
  58638. return function (opts, callback) {
  58639. if (callback === undefined && typeof opts === "function") {
  58640. callback = opts;
  58641. opts = undefined;
  58642. }
  58643. return callback ? runner.errback(opts, callback) : runner.sync(opts);
  58644. };
  58645. };
  58646. var loadPartialConfig = maybeErrback(loadPartialConfig$1);
  58647. var loadPartialConfigSync = loadPartialConfig$1.sync;
  58648. var loadPartialConfigAsync = loadPartialConfig$1.async;
  58649. var loadOptions = maybeErrback(loadOptionsRunner);
  58650. var loadOptionsSync = loadOptionsRunner.sync;
  58651. var loadOptionsAsync = loadOptionsRunner.async;
  58652. var createConfigItemSync = createConfigItemRunner.sync;
  58653. var createConfigItemAsync = createConfigItemRunner.async;
  58654. function createConfigItem(target, options, callback) {
  58655. if (callback !== undefined) {
  58656. return createConfigItemRunner.errback(target, options, callback);
  58657. } else if (typeof options === "function") {
  58658. return createConfigItemRunner.errback(target, undefined, callback);
  58659. } else {
  58660. return createConfigItemRunner.sync(target, options);
  58661. }
  58662. }
  58663. var PluginPass = function () {
  58664. function PluginPass(file, key, options) {
  58665. this._map = new Map();
  58666. this.key = void 0;
  58667. this.file = void 0;
  58668. this.opts = void 0;
  58669. this.cwd = void 0;
  58670. this.filename = void 0;
  58671. this.key = key;
  58672. this.file = file;
  58673. this.opts = options || {};
  58674. this.cwd = file.opts.cwd;
  58675. this.filename = file.opts.filename;
  58676. }
  58677. var _proto = PluginPass.prototype;
  58678. _proto.set = function set(key, val) {
  58679. this._map.set(key, val);
  58680. };
  58681. _proto.get = function get(key) {
  58682. return this._map.get(key);
  58683. };
  58684. _proto.availableHelper = function availableHelper(name, versionRange) {
  58685. return this.file.availableHelper(name, versionRange);
  58686. };
  58687. _proto.addHelper = function addHelper(name) {
  58688. return this.file.addHelper(name);
  58689. };
  58690. _proto.addImport = function addImport() {
  58691. return this.file.addImport();
  58692. };
  58693. _proto.buildCodeFrameError = function buildCodeFrameError(node, msg, _Error) {
  58694. return this.file.buildCodeFrameError(node, msg, _Error);
  58695. };
  58696. return PluginPass;
  58697. }();
  58698. {
  58699. PluginPass.prototype.getModuleName = function getModuleName() {
  58700. return this.file.getModuleName();
  58701. };
  58702. }
  58703. var LOADED_PLUGIN;
  58704. function loadBlockHoistPlugin() {
  58705. if (!LOADED_PLUGIN) {
  58706. LOADED_PLUGIN = new Plugin$1(Object.assign({}, blockHoistPlugin, {
  58707. visitor: traverse.explode(blockHoistPlugin.visitor)
  58708. }), {});
  58709. }
  58710. return LOADED_PLUGIN;
  58711. }
  58712. function priority(bodyNode) {
  58713. var priority = bodyNode == null ? void 0 : bodyNode._blockHoist;
  58714. if (priority == null) return 1;
  58715. if (priority === true) return 2;
  58716. return priority;
  58717. }
  58718. function stableSort(body) {
  58719. var buckets = Object.create(null);
  58720. for (var i = 0; i < body.length; i++) {
  58721. var n = body[i];
  58722. var p = priority(n);
  58723. var bucket = buckets[p] || (buckets[p] = []);
  58724. bucket.push(n);
  58725. }
  58726. var keys = Object.keys(buckets).map(function (k) {
  58727. return +k;
  58728. }).sort(function (a, b) {
  58729. return b - a;
  58730. });
  58731. var index = 0;
  58732. for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {
  58733. var key = _step.value;
  58734. var _bucket = buckets[key];
  58735. for (var _iterator2 = _createForOfIteratorHelperLoose(_bucket), _step2; !(_step2 = _iterator2()).done;) {
  58736. var _n = _step2.value;
  58737. body[index++] = _n;
  58738. }
  58739. }
  58740. return body;
  58741. }
  58742. var blockHoistPlugin = {
  58743. name: "internal.blockHoist",
  58744. visitor: {
  58745. Block: {
  58746. exit: function exit(_ref) {
  58747. var node = _ref.node;
  58748. var body = node.body;
  58749. var max = Math.pow(2, 30) - 1;
  58750. var hasChange = false;
  58751. for (var i = 0; i < body.length; i++) {
  58752. var n = body[i];
  58753. var p = priority(n);
  58754. if (p > max) {
  58755. hasChange = true;
  58756. break;
  58757. }
  58758. max = p;
  58759. }
  58760. if (!hasChange) return;
  58761. node.body = stableSort(body.slice());
  58762. }
  58763. }
  58764. }
  58765. };
  58766. function normalizeOptions$4(config) {
  58767. var _config$options = config.options,
  58768. filename = _config$options.filename,
  58769. cwd = _config$options.cwd,
  58770. _config$options$filen = _config$options.filenameRelative,
  58771. filenameRelative = _config$options$filen === void 0 ? typeof filename === "string" ? path$1.relative(cwd, filename) : "unknown" : _config$options$filen,
  58772. _config$options$sourc = _config$options.sourceType,
  58773. sourceType = _config$options$sourc === void 0 ? "module" : _config$options$sourc,
  58774. inputSourceMap = _config$options.inputSourceMap,
  58775. _config$options$sourc2 = _config$options.sourceMaps,
  58776. sourceMaps = _config$options$sourc2 === void 0 ? !!inputSourceMap : _config$options$sourc2,
  58777. _config$options$sourc3 = _config$options.sourceRoot,
  58778. sourceRoot = _config$options$sourc3 === void 0 ? config.options.moduleRoot : _config$options$sourc3,
  58779. _config$options$sourc4 = _config$options.sourceFileName,
  58780. sourceFileName = _config$options$sourc4 === void 0 ? path$1.basename(filenameRelative) : _config$options$sourc4,
  58781. _config$options$comme = _config$options.comments,
  58782. comments = _config$options$comme === void 0 ? true : _config$options$comme,
  58783. _config$options$compa = _config$options.compact,
  58784. compact = _config$options$compa === void 0 ? "auto" : _config$options$compa;
  58785. var opts = config.options;
  58786. var options = Object.assign({}, opts, {
  58787. parserOpts: Object.assign({
  58788. sourceType: path$1.extname(filenameRelative) === ".mjs" ? "module" : sourceType,
  58789. sourceFileName: filename,
  58790. plugins: []
  58791. }, opts.parserOpts),
  58792. generatorOpts: Object.assign({
  58793. filename: filename,
  58794. auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
  58795. auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
  58796. retainLines: opts.retainLines,
  58797. comments: comments,
  58798. shouldPrintComment: opts.shouldPrintComment,
  58799. compact: compact,
  58800. minified: opts.minified,
  58801. sourceMaps: sourceMaps,
  58802. sourceRoot: sourceRoot,
  58803. sourceFileName: sourceFileName
  58804. }, opts.generatorOpts)
  58805. });
  58806. for (var _iterator = _createForOfIteratorHelperLoose(config.passes), _step; !(_step = _iterator()).done;) {
  58807. var plugins = _step.value;
  58808. for (var _iterator2 = _createForOfIteratorHelperLoose(plugins), _step2; !(_step2 = _iterator2()).done;) {
  58809. var plugin = _step2.value;
  58810. if (plugin.manipulateOptions) {
  58811. plugin.manipulateOptions(options, options.parserOpts);
  58812. }
  58813. }
  58814. }
  58815. return options;
  58816. }
  58817. var fs = {};
  58818. var safeBuffer = createCommonjsModule(function (module, exports) {
  58819. var Buffer = buffer.Buffer;
  58820. function copyProps(src, dst) {
  58821. for (var key in src) {
  58822. dst[key] = src[key];
  58823. }
  58824. }
  58825. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  58826. module.exports = buffer;
  58827. } else {
  58828. copyProps(buffer, exports);
  58829. exports.Buffer = SafeBuffer;
  58830. }
  58831. function SafeBuffer(arg, encodingOrOffset, length) {
  58832. return Buffer(arg, encodingOrOffset, length);
  58833. }
  58834. copyProps(Buffer, SafeBuffer);
  58835. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  58836. if (typeof arg === 'number') {
  58837. throw new TypeError('Argument must not be a number');
  58838. }
  58839. return Buffer(arg, encodingOrOffset, length);
  58840. };
  58841. SafeBuffer.alloc = function (size, fill, encoding) {
  58842. if (typeof size !== 'number') {
  58843. throw new TypeError('Argument must be a number');
  58844. }
  58845. var buf = Buffer(size);
  58846. if (fill !== undefined) {
  58847. if (typeof encoding === 'string') {
  58848. buf.fill(fill, encoding);
  58849. } else {
  58850. buf.fill(fill);
  58851. }
  58852. } else {
  58853. buf.fill(0);
  58854. }
  58855. return buf;
  58856. };
  58857. SafeBuffer.allocUnsafe = function (size) {
  58858. if (typeof size !== 'number') {
  58859. throw new TypeError('Argument must be a number');
  58860. }
  58861. return Buffer(size);
  58862. };
  58863. SafeBuffer.allocUnsafeSlow = function (size) {
  58864. if (typeof size !== 'number') {
  58865. throw new TypeError('Argument must be a number');
  58866. }
  58867. return buffer.SlowBuffer(size);
  58868. };
  58869. }, "/$$rollup_base$$/packages/babel-core/node_modules/convert-source-map/node_modules/safe-buffer");
  58870. var path = /*@__PURE__*/getAugmentedNamespace(path$2);
  58871. var convertSourceMap = createCommonjsModule(function (module, exports) {
  58872. Object.defineProperty(exports, 'commentRegex', {
  58873. get: function getCommentRegex() {
  58874. return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg;
  58875. }
  58876. });
  58877. Object.defineProperty(exports, 'mapFileCommentRegex', {
  58878. get: function getMapFileCommentRegex() {
  58879. return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg;
  58880. }
  58881. });
  58882. function decodeBase64(base64) {
  58883. return safeBuffer.Buffer.from(base64, 'base64').toString();
  58884. }
  58885. function stripComment(sm) {
  58886. return sm.split(',').pop();
  58887. }
  58888. function readFromFileMap(sm, dir) {
  58889. var r = exports.mapFileCommentRegex.exec(sm);
  58890. var filename = r[1] || r[2];
  58891. var filepath = path.resolve(dir, filename);
  58892. try {
  58893. return fs$1.readFileSync(filepath, 'utf8');
  58894. } catch (e) {
  58895. throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e);
  58896. }
  58897. }
  58898. function Converter(sm, opts) {
  58899. opts = opts || {};
  58900. if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir);
  58901. if (opts.hasComment) sm = stripComment(sm);
  58902. if (opts.isEncoded) sm = decodeBase64(sm);
  58903. if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm);
  58904. this.sourcemap = sm;
  58905. }
  58906. Converter.prototype.toJSON = function (space) {
  58907. return JSON.stringify(this.sourcemap, null, space);
  58908. };
  58909. Converter.prototype.toBase64 = function () {
  58910. var json = this.toJSON();
  58911. return safeBuffer.Buffer.from(json, 'utf8').toString('base64');
  58912. };
  58913. Converter.prototype.toComment = function (options) {
  58914. var base64 = this.toBase64();
  58915. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  58916. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  58917. };
  58918. Converter.prototype.toObject = function () {
  58919. return JSON.parse(this.toJSON());
  58920. };
  58921. Converter.prototype.addProperty = function (key, value) {
  58922. if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead');
  58923. return this.setProperty(key, value);
  58924. };
  58925. Converter.prototype.setProperty = function (key, value) {
  58926. this.sourcemap[key] = value;
  58927. return this;
  58928. };
  58929. Converter.prototype.getProperty = function (key) {
  58930. return this.sourcemap[key];
  58931. };
  58932. exports.fromObject = function (obj) {
  58933. return new Converter(obj);
  58934. };
  58935. exports.fromJSON = function (json) {
  58936. return new Converter(json, {
  58937. isJSON: true
  58938. });
  58939. };
  58940. exports.fromBase64 = function (base64) {
  58941. return new Converter(base64, {
  58942. isEncoded: true
  58943. });
  58944. };
  58945. exports.fromComment = function (comment) {
  58946. comment = comment.replace(/^\/\*/g, '//').replace(/\*\/$/g, '');
  58947. return new Converter(comment, {
  58948. isEncoded: true,
  58949. hasComment: true
  58950. });
  58951. };
  58952. exports.fromMapFileComment = function (comment, dir) {
  58953. return new Converter(comment, {
  58954. commentFileDir: dir,
  58955. isFileComment: true,
  58956. isJSON: true
  58957. });
  58958. };
  58959. exports.fromSource = function (content) {
  58960. var m = content.match(exports.commentRegex);
  58961. return m ? exports.fromComment(m.pop()) : null;
  58962. };
  58963. exports.fromMapFileSource = function (content, dir) {
  58964. var m = content.match(exports.mapFileCommentRegex);
  58965. return m ? exports.fromMapFileComment(m.pop(), dir) : null;
  58966. };
  58967. exports.removeComments = function (src) {
  58968. return src.replace(exports.commentRegex, '');
  58969. };
  58970. exports.removeMapFileComments = function (src) {
  58971. return src.replace(exports.mapFileCommentRegex, '');
  58972. };
  58973. exports.generateMapFileComment = function (file, options) {
  58974. var data = 'sourceMappingURL=' + file;
  58975. return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data;
  58976. };
  58977. }, "/$$rollup_base$$/packages/babel-core/node_modules/convert-source-map");
  58978. var pluginNameMap = {
  58979. asyncDoExpressions: {
  58980. syntax: {
  58981. name: "@babel/plugin-syntax-async-do-expressions",
  58982. url: "https://git.io/JYer8"
  58983. }
  58984. },
  58985. classProperties: {
  58986. syntax: {
  58987. name: "@babel/plugin-syntax-class-properties",
  58988. url: "https://git.io/vb4yQ"
  58989. },
  58990. transform: {
  58991. name: "@babel/plugin-proposal-class-properties",
  58992. url: "https://git.io/vb4SL"
  58993. }
  58994. },
  58995. classPrivateProperties: {
  58996. syntax: {
  58997. name: "@babel/plugin-syntax-class-properties",
  58998. url: "https://git.io/vb4yQ"
  58999. },
  59000. transform: {
  59001. name: "@babel/plugin-proposal-class-properties",
  59002. url: "https://git.io/vb4SL"
  59003. }
  59004. },
  59005. classPrivateMethods: {
  59006. syntax: {
  59007. name: "@babel/plugin-syntax-class-properties",
  59008. url: "https://git.io/vb4yQ"
  59009. },
  59010. transform: {
  59011. name: "@babel/plugin-proposal-private-methods",
  59012. url: "https://git.io/JvpRG"
  59013. }
  59014. },
  59015. classStaticBlock: {
  59016. syntax: {
  59017. name: "@babel/plugin-syntax-class-static-block",
  59018. url: "https://git.io/JTLB6"
  59019. },
  59020. transform: {
  59021. name: "@babel/plugin-proposal-class-static-block",
  59022. url: "https://git.io/JTLBP"
  59023. }
  59024. },
  59025. decimal: {
  59026. syntax: {
  59027. name: "@babel/plugin-syntax-decimal",
  59028. url: "https://git.io/JfKOH"
  59029. }
  59030. },
  59031. decorators: {
  59032. syntax: {
  59033. name: "@babel/plugin-syntax-decorators",
  59034. url: "https://git.io/vb4y9"
  59035. },
  59036. transform: {
  59037. name: "@babel/plugin-proposal-decorators",
  59038. url: "https://git.io/vb4ST"
  59039. }
  59040. },
  59041. doExpressions: {
  59042. syntax: {
  59043. name: "@babel/plugin-syntax-do-expressions",
  59044. url: "https://git.io/vb4yh"
  59045. },
  59046. transform: {
  59047. name: "@babel/plugin-proposal-do-expressions",
  59048. url: "https://git.io/vb4S3"
  59049. }
  59050. },
  59051. dynamicImport: {
  59052. syntax: {
  59053. name: "@babel/plugin-syntax-dynamic-import",
  59054. url: "https://git.io/vb4Sv"
  59055. }
  59056. },
  59057. exportDefaultFrom: {
  59058. syntax: {
  59059. name: "@babel/plugin-syntax-export-default-from",
  59060. url: "https://git.io/vb4SO"
  59061. },
  59062. transform: {
  59063. name: "@babel/plugin-proposal-export-default-from",
  59064. url: "https://git.io/vb4yH"
  59065. }
  59066. },
  59067. exportNamespaceFrom: {
  59068. syntax: {
  59069. name: "@babel/plugin-syntax-export-namespace-from",
  59070. url: "https://git.io/vb4Sf"
  59071. },
  59072. transform: {
  59073. name: "@babel/plugin-proposal-export-namespace-from",
  59074. url: "https://git.io/vb4SG"
  59075. }
  59076. },
  59077. flow: {
  59078. syntax: {
  59079. name: "@babel/plugin-syntax-flow",
  59080. url: "https://git.io/vb4yb"
  59081. },
  59082. transform: {
  59083. name: "@babel/preset-flow",
  59084. url: "https://git.io/JfeDn"
  59085. }
  59086. },
  59087. functionBind: {
  59088. syntax: {
  59089. name: "@babel/plugin-syntax-function-bind",
  59090. url: "https://git.io/vb4y7"
  59091. },
  59092. transform: {
  59093. name: "@babel/plugin-proposal-function-bind",
  59094. url: "https://git.io/vb4St"
  59095. }
  59096. },
  59097. functionSent: {
  59098. syntax: {
  59099. name: "@babel/plugin-syntax-function-sent",
  59100. url: "https://git.io/vb4yN"
  59101. },
  59102. transform: {
  59103. name: "@babel/plugin-proposal-function-sent",
  59104. url: "https://git.io/vb4SZ"
  59105. }
  59106. },
  59107. importMeta: {
  59108. syntax: {
  59109. name: "@babel/plugin-syntax-import-meta",
  59110. url: "https://git.io/vbKK6"
  59111. }
  59112. },
  59113. jsx: {
  59114. syntax: {
  59115. name: "@babel/plugin-syntax-jsx",
  59116. url: "https://git.io/vb4yA"
  59117. },
  59118. transform: {
  59119. name: "@babel/preset-react",
  59120. url: "https://git.io/JfeDR"
  59121. }
  59122. },
  59123. importAssertions: {
  59124. syntax: {
  59125. name: "@babel/plugin-syntax-import-assertions",
  59126. url: "https://git.io/JUbkv"
  59127. }
  59128. },
  59129. moduleStringNames: {
  59130. syntax: {
  59131. name: "@babel/plugin-syntax-module-string-names",
  59132. url: "https://git.io/JTL8G"
  59133. }
  59134. },
  59135. numericSeparator: {
  59136. syntax: {
  59137. name: "@babel/plugin-syntax-numeric-separator",
  59138. url: "https://git.io/vb4Sq"
  59139. },
  59140. transform: {
  59141. name: "@babel/plugin-proposal-numeric-separator",
  59142. url: "https://git.io/vb4yS"
  59143. }
  59144. },
  59145. optionalChaining: {
  59146. syntax: {
  59147. name: "@babel/plugin-syntax-optional-chaining",
  59148. url: "https://git.io/vb4Sc"
  59149. },
  59150. transform: {
  59151. name: "@babel/plugin-proposal-optional-chaining",
  59152. url: "https://git.io/vb4Sk"
  59153. }
  59154. },
  59155. pipelineOperator: {
  59156. syntax: {
  59157. name: "@babel/plugin-syntax-pipeline-operator",
  59158. url: "https://git.io/vb4yj"
  59159. },
  59160. transform: {
  59161. name: "@babel/plugin-proposal-pipeline-operator",
  59162. url: "https://git.io/vb4SU"
  59163. }
  59164. },
  59165. privateIn: {
  59166. syntax: {
  59167. name: "@babel/plugin-syntax-private-property-in-object",
  59168. url: "https://git.io/JfK3q"
  59169. },
  59170. transform: {
  59171. name: "@babel/plugin-proposal-private-property-in-object",
  59172. url: "https://git.io/JfK3O"
  59173. }
  59174. },
  59175. recordAndTuple: {
  59176. syntax: {
  59177. name: "@babel/plugin-syntax-record-and-tuple",
  59178. url: "https://git.io/JvKp3"
  59179. }
  59180. },
  59181. throwExpressions: {
  59182. syntax: {
  59183. name: "@babel/plugin-syntax-throw-expressions",
  59184. url: "https://git.io/vb4SJ"
  59185. },
  59186. transform: {
  59187. name: "@babel/plugin-proposal-throw-expressions",
  59188. url: "https://git.io/vb4yF"
  59189. }
  59190. },
  59191. typescript: {
  59192. syntax: {
  59193. name: "@babel/plugin-syntax-typescript",
  59194. url: "https://git.io/vb4SC"
  59195. },
  59196. transform: {
  59197. name: "@babel/preset-typescript",
  59198. url: "https://git.io/JfeDz"
  59199. }
  59200. },
  59201. asyncGenerators: {
  59202. syntax: {
  59203. name: "@babel/plugin-syntax-async-generators",
  59204. url: "https://git.io/vb4SY"
  59205. },
  59206. transform: {
  59207. name: "@babel/plugin-proposal-async-generator-functions",
  59208. url: "https://git.io/vb4yp"
  59209. }
  59210. },
  59211. logicalAssignment: {
  59212. syntax: {
  59213. name: "@babel/plugin-syntax-logical-assignment-operators",
  59214. url: "https://git.io/vAlBp"
  59215. },
  59216. transform: {
  59217. name: "@babel/plugin-proposal-logical-assignment-operators",
  59218. url: "https://git.io/vAlRe"
  59219. }
  59220. },
  59221. nullishCoalescingOperator: {
  59222. syntax: {
  59223. name: "@babel/plugin-syntax-nullish-coalescing-operator",
  59224. url: "https://git.io/vb4yx"
  59225. },
  59226. transform: {
  59227. name: "@babel/plugin-proposal-nullish-coalescing-operator",
  59228. url: "https://git.io/vb4Se"
  59229. }
  59230. },
  59231. objectRestSpread: {
  59232. syntax: {
  59233. name: "@babel/plugin-syntax-object-rest-spread",
  59234. url: "https://git.io/vb4y5"
  59235. },
  59236. transform: {
  59237. name: "@babel/plugin-proposal-object-rest-spread",
  59238. url: "https://git.io/vb4Ss"
  59239. }
  59240. },
  59241. optionalCatchBinding: {
  59242. syntax: {
  59243. name: "@babel/plugin-syntax-optional-catch-binding",
  59244. url: "https://git.io/vb4Sn"
  59245. },
  59246. transform: {
  59247. name: "@babel/plugin-proposal-optional-catch-binding",
  59248. url: "https://git.io/vb4SI"
  59249. }
  59250. }
  59251. };
  59252. pluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform;
  59253. var getNameURLCombination = function getNameURLCombination(_ref) {
  59254. var name = _ref.name,
  59255. url = _ref.url;
  59256. return name + " (" + url + ")";
  59257. };
  59258. function generateMissingPluginMessage(missingPluginName, loc, codeFrame) {
  59259. var helpMessage = "Support for the experimental syntax '" + missingPluginName + "' isn't currently enabled " + ("(" + loc.line + ":" + (loc.column + 1) + "):\n\n") + codeFrame;
  59260. var pluginInfo = pluginNameMap[missingPluginName];
  59261. if (pluginInfo) {
  59262. var syntaxPlugin = pluginInfo.syntax,
  59263. transformPlugin = pluginInfo.transform;
  59264. if (syntaxPlugin) {
  59265. var syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
  59266. if (transformPlugin) {
  59267. var transformPluginInfo = getNameURLCombination(transformPlugin);
  59268. var sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets";
  59269. helpMessage += "\n\nAdd " + transformPluginInfo + " to the '" + sectionType + "' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add " + syntaxPluginInfo + " to the 'plugins' section to enable parsing.";
  59270. } else {
  59271. helpMessage += "\n\nAdd " + syntaxPluginInfo + " to the 'plugins' section of your Babel config " + "to enable parsing.";
  59272. }
  59273. }
  59274. }
  59275. return helpMessage;
  59276. }
  59277. var _marked$2 = regenerator.mark(parser$1);
  59278. function parser$1(pluginPasses, _ref, code) {
  59279. var parserOpts, _ref$highlightCode, highlightCode, _ref$filename, filename, results, _iterator, _step, plugins, _iterator2, _step2, plugin, parserOverride, ast, loc, missingPlugin, codeFrame;
  59280. return regenerator.wrap(function parser$(_context) {
  59281. while (1) {
  59282. switch (_context.prev = _context.next) {
  59283. case 0:
  59284. parserOpts = _ref.parserOpts, _ref$highlightCode = _ref.highlightCode, highlightCode = _ref$highlightCode === void 0 ? true : _ref$highlightCode, _ref$filename = _ref.filename, filename = _ref$filename === void 0 ? "unknown" : _ref$filename;
  59285. _context.prev = 1;
  59286. results = [];
  59287. for (_iterator = _createForOfIteratorHelperLoose(pluginPasses); !(_step = _iterator()).done;) {
  59288. plugins = _step.value;
  59289. for (_iterator2 = _createForOfIteratorHelperLoose(plugins); !(_step2 = _iterator2()).done;) {
  59290. plugin = _step2.value;
  59291. parserOverride = plugin.parserOverride;
  59292. if (parserOverride) {
  59293. ast = parserOverride(code, parserOpts, parse$8);
  59294. if (ast !== undefined) results.push(ast);
  59295. }
  59296. }
  59297. }
  59298. if (!(results.length === 0)) {
  59299. _context.next = 8;
  59300. break;
  59301. }
  59302. return _context.abrupt("return", parse$8(code, parserOpts));
  59303. case 8:
  59304. if (!(results.length === 1)) {
  59305. _context.next = 13;
  59306. break;
  59307. }
  59308. return _context.delegateYield([], "t0", 10);
  59309. case 10:
  59310. if (!(typeof results[0].then === "function")) {
  59311. _context.next = 12;
  59312. break;
  59313. }
  59314. throw new Error("You appear to be using an async parser plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
  59315. case 12:
  59316. return _context.abrupt("return", results[0]);
  59317. case 13:
  59318. throw new Error("More than one plugin attempted to override parsing.");
  59319. case 16:
  59320. _context.prev = 16;
  59321. _context.t1 = _context["catch"](1);
  59322. if (_context.t1.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
  59323. _context.t1.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file.";
  59324. }
  59325. loc = _context.t1.loc, missingPlugin = _context.t1.missingPlugin;
  59326. if (loc) {
  59327. codeFrame = codeFrameColumns(code, {
  59328. start: {
  59329. line: loc.line,
  59330. column: loc.column + 1
  59331. }
  59332. }, {
  59333. highlightCode: highlightCode
  59334. });
  59335. if (missingPlugin) {
  59336. _context.t1.message = filename + ": " + generateMissingPluginMessage(missingPlugin[0], loc, codeFrame);
  59337. } else {
  59338. _context.t1.message = filename + ": " + _context.t1.message + "\n\n" + codeFrame;
  59339. }
  59340. _context.t1.code = "BABEL_PARSE_ERROR";
  59341. }
  59342. throw _context.t1;
  59343. case 22:
  59344. case "end":
  59345. return _context.stop();
  59346. }
  59347. }
  59348. }, _marked$2, null, [[1, 16]]);
  59349. }
  59350. var serialized = "$$ babel internal serialized type" + Math.random();
  59351. function serialize(key, value) {
  59352. var _ref;
  59353. if (typeof value !== "bigint") return value;
  59354. return _ref = {}, _ref[serialized] = "BigInt", _ref.value = value.toString(), _ref;
  59355. }
  59356. function revive(key, value) {
  59357. if (!value || typeof value !== "object") return value;
  59358. if (value[serialized] !== "BigInt") return value;
  59359. return BigInt(value.value);
  59360. }
  59361. function cloneDeep (value) {
  59362. return JSON.parse(JSON.stringify(value, serialize), revive);
  59363. }
  59364. var _marked$1 = regenerator.mark(normalizeFile);
  59365. var debug$2 = browser$1("babel:transform:file");
  59366. var LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000;
  59367. function normalizeFile(pluginPasses, options, code, ast) {
  59368. var inputMap, lastComment, _lastComment, match, inputMapContent;
  59369. return regenerator.wrap(function normalizeFile$(_context) {
  59370. while (1) {
  59371. switch (_context.prev = _context.next) {
  59372. case 0:
  59373. code = "" + (code || "");
  59374. if (!ast) {
  59375. _context.next = 11;
  59376. break;
  59377. }
  59378. if (!(ast.type === "Program")) {
  59379. _context.next = 6;
  59380. break;
  59381. }
  59382. ast = file(ast, [], []);
  59383. _context.next = 8;
  59384. break;
  59385. case 6:
  59386. if (!(ast.type !== "File")) {
  59387. _context.next = 8;
  59388. break;
  59389. }
  59390. throw new Error("AST root must be a Program or File node");
  59391. case 8:
  59392. if (options.cloneInputAst) {
  59393. ast = cloneDeep(ast);
  59394. }
  59395. _context.next = 13;
  59396. break;
  59397. case 11:
  59398. return _context.delegateYield(parser$1(pluginPasses, options, code), "t0", 12);
  59399. case 12:
  59400. ast = _context.t0;
  59401. case 13:
  59402. inputMap = null;
  59403. if (options.inputSourceMap !== false) {
  59404. if (typeof options.inputSourceMap === "object") {
  59405. inputMap = convertSourceMap.fromObject(options.inputSourceMap);
  59406. }
  59407. if (!inputMap) {
  59408. lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
  59409. if (lastComment) {
  59410. try {
  59411. inputMap = convertSourceMap.fromComment(lastComment);
  59412. } catch (err) {
  59413. debug$2("discarding unknown inline input sourcemap", err);
  59414. }
  59415. }
  59416. }
  59417. if (!inputMap) {
  59418. _lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
  59419. if (typeof options.filename === "string" && _lastComment) {
  59420. try {
  59421. match = EXTERNAL_SOURCEMAP_REGEX.exec(_lastComment);
  59422. inputMapContent = fs.readFileSync(path$1.resolve(path$1.dirname(options.filename), match[1]));
  59423. if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {
  59424. debug$2("skip merging input map > 1 MB");
  59425. } else {
  59426. inputMap = convertSourceMap.fromJSON(inputMapContent);
  59427. }
  59428. } catch (err) {
  59429. debug$2("discarding unknown file input sourcemap", err);
  59430. }
  59431. } else if (_lastComment) {
  59432. debug$2("discarding un-loadable file input sourcemap");
  59433. }
  59434. }
  59435. }
  59436. return _context.abrupt("return", new File(options, {
  59437. code: code,
  59438. ast: ast,
  59439. inputMap: inputMap
  59440. }));
  59441. case 16:
  59442. case "end":
  59443. return _context.stop();
  59444. }
  59445. }
  59446. }, _marked$1);
  59447. }
  59448. var INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/;
  59449. var EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
  59450. function extractCommentsFromList(regex, comments, lastComment) {
  59451. if (comments) {
  59452. comments = comments.filter(function (_ref) {
  59453. var value = _ref.value;
  59454. if (regex.test(value)) {
  59455. lastComment = value;
  59456. return false;
  59457. }
  59458. return true;
  59459. });
  59460. }
  59461. return [comments, lastComment];
  59462. }
  59463. function extractComments(regex, ast) {
  59464. var lastComment = null;
  59465. traverseFast(ast, function (node) {
  59466. var _extractCommentsFromL = extractCommentsFromList(regex, node.leadingComments, lastComment);
  59467. var _extractCommentsFromL2 = _slicedToArray$2(_extractCommentsFromL, 2);
  59468. node.leadingComments = _extractCommentsFromL2[0];
  59469. lastComment = _extractCommentsFromL2[1];
  59470. var _extractCommentsFromL3 = extractCommentsFromList(regex, node.innerComments, lastComment);
  59471. var _extractCommentsFromL4 = _slicedToArray$2(_extractCommentsFromL3, 2);
  59472. node.innerComments = _extractCommentsFromL4[0];
  59473. lastComment = _extractCommentsFromL4[1];
  59474. var _extractCommentsFromL5 = extractCommentsFromList(regex, node.trailingComments, lastComment);
  59475. var _extractCommentsFromL6 = _slicedToArray$2(_extractCommentsFromL5, 2);
  59476. node.trailingComments = _extractCommentsFromL6[0];
  59477. lastComment = _extractCommentsFromL6[1];
  59478. });
  59479. return lastComment;
  59480. }
  59481. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  59482. var encode$1 = function encode(number) {
  59483. if (0 <= number && number < intToCharMap.length) {
  59484. return intToCharMap[number];
  59485. }
  59486. throw new TypeError("Must be between 0 and 63: " + number);
  59487. };
  59488. var decode$1 = function decode(charCode) {
  59489. var bigA = 65;
  59490. var bigZ = 90;
  59491. var littleA = 97;
  59492. var littleZ = 122;
  59493. var zero = 48;
  59494. var nine = 57;
  59495. var plus = 43;
  59496. var slash = 47;
  59497. var littleOffset = 26;
  59498. var numberOffset = 52;
  59499. if (bigA <= charCode && charCode <= bigZ) {
  59500. return charCode - bigA;
  59501. }
  59502. if (littleA <= charCode && charCode <= littleZ) {
  59503. return charCode - littleA + littleOffset;
  59504. }
  59505. if (zero <= charCode && charCode <= nine) {
  59506. return charCode - zero + numberOffset;
  59507. }
  59508. if (charCode == plus) {
  59509. return 62;
  59510. }
  59511. if (charCode == slash) {
  59512. return 63;
  59513. }
  59514. return -1;
  59515. };
  59516. var base64 = {
  59517. encode: encode$1,
  59518. decode: decode$1
  59519. };
  59520. var VLQ_BASE_SHIFT = 5;
  59521. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  59522. var VLQ_BASE_MASK = VLQ_BASE - 1;
  59523. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  59524. function toVLQSigned(aValue) {
  59525. return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;
  59526. }
  59527. function fromVLQSigned(aValue) {
  59528. var isNegative = (aValue & 1) === 1;
  59529. var shifted = aValue >> 1;
  59530. return isNegative ? -shifted : shifted;
  59531. }
  59532. var encode = function base64VLQ_encode(aValue) {
  59533. var encoded = "";
  59534. var digit;
  59535. var vlq = toVLQSigned(aValue);
  59536. do {
  59537. digit = vlq & VLQ_BASE_MASK;
  59538. vlq >>>= VLQ_BASE_SHIFT;
  59539. if (vlq > 0) {
  59540. digit |= VLQ_CONTINUATION_BIT;
  59541. }
  59542. encoded += base64.encode(digit);
  59543. } while (vlq > 0);
  59544. return encoded;
  59545. };
  59546. var decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  59547. var strLen = aStr.length;
  59548. var result = 0;
  59549. var shift = 0;
  59550. var continuation, digit;
  59551. do {
  59552. if (aIndex >= strLen) {
  59553. throw new Error("Expected more digits in base 64 VLQ value.");
  59554. }
  59555. digit = base64.decode(aStr.charCodeAt(aIndex++));
  59556. if (digit === -1) {
  59557. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  59558. }
  59559. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  59560. digit &= VLQ_BASE_MASK;
  59561. result = result + (digit << shift);
  59562. shift += VLQ_BASE_SHIFT;
  59563. } while (continuation);
  59564. aOutParam.value = fromVLQSigned(result);
  59565. aOutParam.rest = aIndex;
  59566. };
  59567. var base64Vlq = {
  59568. encode: encode,
  59569. decode: decode
  59570. };
  59571. var util$4 = createCommonjsModule(function (module, exports) {
  59572. function getArg(aArgs, aName, aDefaultValue) {
  59573. if (aName in aArgs) {
  59574. return aArgs[aName];
  59575. } else if (arguments.length === 3) {
  59576. return aDefaultValue;
  59577. } else {
  59578. throw new Error('"' + aName + '" is a required argument.');
  59579. }
  59580. }
  59581. exports.getArg = getArg;
  59582. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
  59583. var dataUrlRegexp = /^data:.+\,.+$/;
  59584. function urlParse(aUrl) {
  59585. var match = aUrl.match(urlRegexp);
  59586. if (!match) {
  59587. return null;
  59588. }
  59589. return {
  59590. scheme: match[1],
  59591. auth: match[2],
  59592. host: match[3],
  59593. port: match[4],
  59594. path: match[5]
  59595. };
  59596. }
  59597. exports.urlParse = urlParse;
  59598. function urlGenerate(aParsedUrl) {
  59599. var url = '';
  59600. if (aParsedUrl.scheme) {
  59601. url += aParsedUrl.scheme + ':';
  59602. }
  59603. url += '//';
  59604. if (aParsedUrl.auth) {
  59605. url += aParsedUrl.auth + '@';
  59606. }
  59607. if (aParsedUrl.host) {
  59608. url += aParsedUrl.host;
  59609. }
  59610. if (aParsedUrl.port) {
  59611. url += ":" + aParsedUrl.port;
  59612. }
  59613. if (aParsedUrl.path) {
  59614. url += aParsedUrl.path;
  59615. }
  59616. return url;
  59617. }
  59618. exports.urlGenerate = urlGenerate;
  59619. function normalize(aPath) {
  59620. var path = aPath;
  59621. var url = urlParse(aPath);
  59622. if (url) {
  59623. if (!url.path) {
  59624. return aPath;
  59625. }
  59626. path = url.path;
  59627. }
  59628. var isAbsolute = exports.isAbsolute(path);
  59629. var parts = path.split(/\/+/);
  59630. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  59631. part = parts[i];
  59632. if (part === '.') {
  59633. parts.splice(i, 1);
  59634. } else if (part === '..') {
  59635. up++;
  59636. } else if (up > 0) {
  59637. if (part === '') {
  59638. parts.splice(i + 1, up);
  59639. up = 0;
  59640. } else {
  59641. parts.splice(i, 2);
  59642. up--;
  59643. }
  59644. }
  59645. }
  59646. path = parts.join('/');
  59647. if (path === '') {
  59648. path = isAbsolute ? '/' : '.';
  59649. }
  59650. if (url) {
  59651. url.path = path;
  59652. return urlGenerate(url);
  59653. }
  59654. return path;
  59655. }
  59656. exports.normalize = normalize;
  59657. function join(aRoot, aPath) {
  59658. if (aRoot === "") {
  59659. aRoot = ".";
  59660. }
  59661. if (aPath === "") {
  59662. aPath = ".";
  59663. }
  59664. var aPathUrl = urlParse(aPath);
  59665. var aRootUrl = urlParse(aRoot);
  59666. if (aRootUrl) {
  59667. aRoot = aRootUrl.path || '/';
  59668. }
  59669. if (aPathUrl && !aPathUrl.scheme) {
  59670. if (aRootUrl) {
  59671. aPathUrl.scheme = aRootUrl.scheme;
  59672. }
  59673. return urlGenerate(aPathUrl);
  59674. }
  59675. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  59676. return aPath;
  59677. }
  59678. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  59679. aRootUrl.host = aPath;
  59680. return urlGenerate(aRootUrl);
  59681. }
  59682. var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  59683. if (aRootUrl) {
  59684. aRootUrl.path = joined;
  59685. return urlGenerate(aRootUrl);
  59686. }
  59687. return joined;
  59688. }
  59689. exports.join = join;
  59690. exports.isAbsolute = function (aPath) {
  59691. return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
  59692. };
  59693. function relative(aRoot, aPath) {
  59694. if (aRoot === "") {
  59695. aRoot = ".";
  59696. }
  59697. aRoot = aRoot.replace(/\/$/, '');
  59698. var level = 0;
  59699. while (aPath.indexOf(aRoot + '/') !== 0) {
  59700. var index = aRoot.lastIndexOf("/");
  59701. if (index < 0) {
  59702. return aPath;
  59703. }
  59704. aRoot = aRoot.slice(0, index);
  59705. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  59706. return aPath;
  59707. }
  59708. ++level;
  59709. }
  59710. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  59711. }
  59712. exports.relative = relative;
  59713. var supportsNullProto = function () {
  59714. var obj = Object.create(null);
  59715. return !('__proto__' in obj);
  59716. }();
  59717. function identity(s) {
  59718. return s;
  59719. }
  59720. function toSetString(aStr) {
  59721. if (isProtoString(aStr)) {
  59722. return '$' + aStr;
  59723. }
  59724. return aStr;
  59725. }
  59726. exports.toSetString = supportsNullProto ? identity : toSetString;
  59727. function fromSetString(aStr) {
  59728. if (isProtoString(aStr)) {
  59729. return aStr.slice(1);
  59730. }
  59731. return aStr;
  59732. }
  59733. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  59734. function isProtoString(s) {
  59735. if (!s) {
  59736. return false;
  59737. }
  59738. var length = s.length;
  59739. if (length < 9) {
  59740. return false;
  59741. }
  59742. if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {
  59743. return false;
  59744. }
  59745. for (var i = length - 10; i >= 0; i--) {
  59746. if (s.charCodeAt(i) !== 36) {
  59747. return false;
  59748. }
  59749. }
  59750. return true;
  59751. }
  59752. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  59753. var cmp = mappingA.source - mappingB.source;
  59754. if (cmp !== 0) {
  59755. return cmp;
  59756. }
  59757. cmp = mappingA.originalLine - mappingB.originalLine;
  59758. if (cmp !== 0) {
  59759. return cmp;
  59760. }
  59761. cmp = mappingA.originalColumn - mappingB.originalColumn;
  59762. if (cmp !== 0 || onlyCompareOriginal) {
  59763. return cmp;
  59764. }
  59765. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  59766. if (cmp !== 0) {
  59767. return cmp;
  59768. }
  59769. cmp = mappingA.generatedLine - mappingB.generatedLine;
  59770. if (cmp !== 0) {
  59771. return cmp;
  59772. }
  59773. return mappingA.name - mappingB.name;
  59774. }
  59775. exports.compareByOriginalPositions = compareByOriginalPositions;
  59776. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  59777. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  59778. if (cmp !== 0) {
  59779. return cmp;
  59780. }
  59781. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  59782. if (cmp !== 0 || onlyCompareGenerated) {
  59783. return cmp;
  59784. }
  59785. cmp = mappingA.source - mappingB.source;
  59786. if (cmp !== 0) {
  59787. return cmp;
  59788. }
  59789. cmp = mappingA.originalLine - mappingB.originalLine;
  59790. if (cmp !== 0) {
  59791. return cmp;
  59792. }
  59793. cmp = mappingA.originalColumn - mappingB.originalColumn;
  59794. if (cmp !== 0) {
  59795. return cmp;
  59796. }
  59797. return mappingA.name - mappingB.name;
  59798. }
  59799. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  59800. function strcmp(aStr1, aStr2) {
  59801. if (aStr1 === aStr2) {
  59802. return 0;
  59803. }
  59804. if (aStr1 > aStr2) {
  59805. return 1;
  59806. }
  59807. return -1;
  59808. }
  59809. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  59810. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  59811. if (cmp !== 0) {
  59812. return cmp;
  59813. }
  59814. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  59815. if (cmp !== 0) {
  59816. return cmp;
  59817. }
  59818. cmp = strcmp(mappingA.source, mappingB.source);
  59819. if (cmp !== 0) {
  59820. return cmp;
  59821. }
  59822. cmp = mappingA.originalLine - mappingB.originalLine;
  59823. if (cmp !== 0) {
  59824. return cmp;
  59825. }
  59826. cmp = mappingA.originalColumn - mappingB.originalColumn;
  59827. if (cmp !== 0) {
  59828. return cmp;
  59829. }
  59830. return strcmp(mappingA.name, mappingB.name);
  59831. }
  59832. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  59833. }, "/$$rollup_base$$/packages/babel-core/node_modules/source-map/lib");
  59834. var has$9 = Object.prototype.hasOwnProperty;
  59835. var hasNativeMap = typeof Map !== "undefined";
  59836. function ArraySet$2() {
  59837. this._array = [];
  59838. this._set = hasNativeMap ? new Map() : Object.create(null);
  59839. }
  59840. ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  59841. var set = new ArraySet$2();
  59842. for (var i = 0, len = aArray.length; i < len; i++) {
  59843. set.add(aArray[i], aAllowDuplicates);
  59844. }
  59845. return set;
  59846. };
  59847. ArraySet$2.prototype.size = function ArraySet_size() {
  59848. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  59849. };
  59850. ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  59851. var sStr = hasNativeMap ? aStr : util$4.toSetString(aStr);
  59852. var isDuplicate = hasNativeMap ? this.has(aStr) : has$9.call(this._set, sStr);
  59853. var idx = this._array.length;
  59854. if (!isDuplicate || aAllowDuplicates) {
  59855. this._array.push(aStr);
  59856. }
  59857. if (!isDuplicate) {
  59858. if (hasNativeMap) {
  59859. this._set.set(aStr, idx);
  59860. } else {
  59861. this._set[sStr] = idx;
  59862. }
  59863. }
  59864. };
  59865. ArraySet$2.prototype.has = function ArraySet_has(aStr) {
  59866. if (hasNativeMap) {
  59867. return this._set.has(aStr);
  59868. } else {
  59869. var sStr = util$4.toSetString(aStr);
  59870. return has$9.call(this._set, sStr);
  59871. }
  59872. };
  59873. ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {
  59874. if (hasNativeMap) {
  59875. var idx = this._set.get(aStr);
  59876. if (idx >= 0) {
  59877. return idx;
  59878. }
  59879. } else {
  59880. var sStr = util$4.toSetString(aStr);
  59881. if (has$9.call(this._set, sStr)) {
  59882. return this._set[sStr];
  59883. }
  59884. }
  59885. throw new Error('"' + aStr + '" is not in the set.');
  59886. };
  59887. ArraySet$2.prototype.at = function ArraySet_at(aIdx) {
  59888. if (aIdx >= 0 && aIdx < this._array.length) {
  59889. return this._array[aIdx];
  59890. }
  59891. throw new Error('No element indexed by ' + aIdx);
  59892. };
  59893. ArraySet$2.prototype.toArray = function ArraySet_toArray() {
  59894. return this._array.slice();
  59895. };
  59896. var ArraySet_1 = ArraySet$2;
  59897. var arraySet = {
  59898. ArraySet: ArraySet_1
  59899. };
  59900. function generatedPositionAfter(mappingA, mappingB) {
  59901. var lineA = mappingA.generatedLine;
  59902. var lineB = mappingB.generatedLine;
  59903. var columnA = mappingA.generatedColumn;
  59904. var columnB = mappingB.generatedColumn;
  59905. return lineB > lineA || lineB == lineA && columnB >= columnA || util$4.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  59906. }
  59907. function MappingList$1() {
  59908. this._array = [];
  59909. this._sorted = true;
  59910. this._last = {
  59911. generatedLine: -1,
  59912. generatedColumn: 0
  59913. };
  59914. }
  59915. MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {
  59916. this._array.forEach(aCallback, aThisArg);
  59917. };
  59918. MappingList$1.prototype.add = function MappingList_add(aMapping) {
  59919. if (generatedPositionAfter(this._last, aMapping)) {
  59920. this._last = aMapping;
  59921. this._array.push(aMapping);
  59922. } else {
  59923. this._sorted = false;
  59924. this._array.push(aMapping);
  59925. }
  59926. };
  59927. MappingList$1.prototype.toArray = function MappingList_toArray() {
  59928. if (!this._sorted) {
  59929. this._array.sort(util$4.compareByGeneratedPositionsInflated);
  59930. this._sorted = true;
  59931. }
  59932. return this._array;
  59933. };
  59934. var MappingList_1 = MappingList$1;
  59935. var mappingList = {
  59936. MappingList: MappingList_1
  59937. };
  59938. var ArraySet$1 = arraySet.ArraySet;
  59939. var MappingList = mappingList.MappingList;
  59940. function SourceMapGenerator$2(aArgs) {
  59941. if (!aArgs) {
  59942. aArgs = {};
  59943. }
  59944. this._file = util$4.getArg(aArgs, 'file', null);
  59945. this._sourceRoot = util$4.getArg(aArgs, 'sourceRoot', null);
  59946. this._skipValidation = util$4.getArg(aArgs, 'skipValidation', false);
  59947. this._sources = new ArraySet$1();
  59948. this._names = new ArraySet$1();
  59949. this._mappings = new MappingList();
  59950. this._sourcesContents = null;
  59951. }
  59952. SourceMapGenerator$2.prototype._version = 3;
  59953. SourceMapGenerator$2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  59954. var sourceRoot = aSourceMapConsumer.sourceRoot;
  59955. var generator = new SourceMapGenerator$2({
  59956. file: aSourceMapConsumer.file,
  59957. sourceRoot: sourceRoot
  59958. });
  59959. aSourceMapConsumer.eachMapping(function (mapping) {
  59960. var newMapping = {
  59961. generated: {
  59962. line: mapping.generatedLine,
  59963. column: mapping.generatedColumn
  59964. }
  59965. };
  59966. if (mapping.source != null) {
  59967. newMapping.source = mapping.source;
  59968. if (sourceRoot != null) {
  59969. newMapping.source = util$4.relative(sourceRoot, newMapping.source);
  59970. }
  59971. newMapping.original = {
  59972. line: mapping.originalLine,
  59973. column: mapping.originalColumn
  59974. };
  59975. if (mapping.name != null) {
  59976. newMapping.name = mapping.name;
  59977. }
  59978. }
  59979. generator.addMapping(newMapping);
  59980. });
  59981. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  59982. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  59983. if (content != null) {
  59984. generator.setSourceContent(sourceFile, content);
  59985. }
  59986. });
  59987. return generator;
  59988. };
  59989. SourceMapGenerator$2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {
  59990. var generated = util$4.getArg(aArgs, 'generated');
  59991. var original = util$4.getArg(aArgs, 'original', null);
  59992. var source = util$4.getArg(aArgs, 'source', null);
  59993. var name = util$4.getArg(aArgs, 'name', null);
  59994. if (!this._skipValidation) {
  59995. this._validateMapping(generated, original, source, name);
  59996. }
  59997. if (source != null) {
  59998. source = String(source);
  59999. if (!this._sources.has(source)) {
  60000. this._sources.add(source);
  60001. }
  60002. }
  60003. if (name != null) {
  60004. name = String(name);
  60005. if (!this._names.has(name)) {
  60006. this._names.add(name);
  60007. }
  60008. }
  60009. this._mappings.add({
  60010. generatedLine: generated.line,
  60011. generatedColumn: generated.column,
  60012. originalLine: original != null && original.line,
  60013. originalColumn: original != null && original.column,
  60014. source: source,
  60015. name: name
  60016. });
  60017. };
  60018. SourceMapGenerator$2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  60019. var source = aSourceFile;
  60020. if (this._sourceRoot != null) {
  60021. source = util$4.relative(this._sourceRoot, source);
  60022. }
  60023. if (aSourceContent != null) {
  60024. if (!this._sourcesContents) {
  60025. this._sourcesContents = Object.create(null);
  60026. }
  60027. this._sourcesContents[util$4.toSetString(source)] = aSourceContent;
  60028. } else if (this._sourcesContents) {
  60029. delete this._sourcesContents[util$4.toSetString(source)];
  60030. if (Object.keys(this._sourcesContents).length === 0) {
  60031. this._sourcesContents = null;
  60032. }
  60033. }
  60034. };
  60035. SourceMapGenerator$2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  60036. var sourceFile = aSourceFile;
  60037. if (aSourceFile == null) {
  60038. if (aSourceMapConsumer.file == null) {
  60039. throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\'s "file" property. Both were omitted.');
  60040. }
  60041. sourceFile = aSourceMapConsumer.file;
  60042. }
  60043. var sourceRoot = this._sourceRoot;
  60044. if (sourceRoot != null) {
  60045. sourceFile = util$4.relative(sourceRoot, sourceFile);
  60046. }
  60047. var newSources = new ArraySet$1();
  60048. var newNames = new ArraySet$1();
  60049. this._mappings.unsortedForEach(function (mapping) {
  60050. if (mapping.source === sourceFile && mapping.originalLine != null) {
  60051. var original = aSourceMapConsumer.originalPositionFor({
  60052. line: mapping.originalLine,
  60053. column: mapping.originalColumn
  60054. });
  60055. if (original.source != null) {
  60056. mapping.source = original.source;
  60057. if (aSourceMapPath != null) {
  60058. mapping.source = util$4.join(aSourceMapPath, mapping.source);
  60059. }
  60060. if (sourceRoot != null) {
  60061. mapping.source = util$4.relative(sourceRoot, mapping.source);
  60062. }
  60063. mapping.originalLine = original.line;
  60064. mapping.originalColumn = original.column;
  60065. if (original.name != null) {
  60066. mapping.name = original.name;
  60067. }
  60068. }
  60069. }
  60070. var source = mapping.source;
  60071. if (source != null && !newSources.has(source)) {
  60072. newSources.add(source);
  60073. }
  60074. var name = mapping.name;
  60075. if (name != null && !newNames.has(name)) {
  60076. newNames.add(name);
  60077. }
  60078. }, this);
  60079. this._sources = newSources;
  60080. this._names = newNames;
  60081. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  60082. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  60083. if (content != null) {
  60084. if (aSourceMapPath != null) {
  60085. sourceFile = util$4.join(aSourceMapPath, sourceFile);
  60086. }
  60087. if (sourceRoot != null) {
  60088. sourceFile = util$4.relative(sourceRoot, sourceFile);
  60089. }
  60090. this.setSourceContent(sourceFile, content);
  60091. }
  60092. }, this);
  60093. };
  60094. SourceMapGenerator$2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {
  60095. if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
  60096. throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.');
  60097. }
  60098. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {
  60099. return;
  60100. } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {
  60101. return;
  60102. } else {
  60103. throw new Error('Invalid mapping: ' + JSON.stringify({
  60104. generated: aGenerated,
  60105. source: aSource,
  60106. original: aOriginal,
  60107. name: aName
  60108. }));
  60109. }
  60110. };
  60111. SourceMapGenerator$2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
  60112. var previousGeneratedColumn = 0;
  60113. var previousGeneratedLine = 1;
  60114. var previousOriginalColumn = 0;
  60115. var previousOriginalLine = 0;
  60116. var previousName = 0;
  60117. var previousSource = 0;
  60118. var result = '';
  60119. var next;
  60120. var mapping;
  60121. var nameIdx;
  60122. var sourceIdx;
  60123. var mappings = this._mappings.toArray();
  60124. for (var i = 0, len = mappings.length; i < len; i++) {
  60125. mapping = mappings[i];
  60126. next = '';
  60127. if (mapping.generatedLine !== previousGeneratedLine) {
  60128. previousGeneratedColumn = 0;
  60129. while (mapping.generatedLine !== previousGeneratedLine) {
  60130. next += ';';
  60131. previousGeneratedLine++;
  60132. }
  60133. } else {
  60134. if (i > 0) {
  60135. if (!util$4.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  60136. continue;
  60137. }
  60138. next += ',';
  60139. }
  60140. }
  60141. next += base64Vlq.encode(mapping.generatedColumn - previousGeneratedColumn);
  60142. previousGeneratedColumn = mapping.generatedColumn;
  60143. if (mapping.source != null) {
  60144. sourceIdx = this._sources.indexOf(mapping.source);
  60145. next += base64Vlq.encode(sourceIdx - previousSource);
  60146. previousSource = sourceIdx;
  60147. next += base64Vlq.encode(mapping.originalLine - 1 - previousOriginalLine);
  60148. previousOriginalLine = mapping.originalLine - 1;
  60149. next += base64Vlq.encode(mapping.originalColumn - previousOriginalColumn);
  60150. previousOriginalColumn = mapping.originalColumn;
  60151. if (mapping.name != null) {
  60152. nameIdx = this._names.indexOf(mapping.name);
  60153. next += base64Vlq.encode(nameIdx - previousName);
  60154. previousName = nameIdx;
  60155. }
  60156. }
  60157. result += next;
  60158. }
  60159. return result;
  60160. };
  60161. SourceMapGenerator$2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  60162. return aSources.map(function (source) {
  60163. if (!this._sourcesContents) {
  60164. return null;
  60165. }
  60166. if (aSourceRoot != null) {
  60167. source = util$4.relative(aSourceRoot, source);
  60168. }
  60169. var key = util$4.toSetString(source);
  60170. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;
  60171. }, this);
  60172. };
  60173. SourceMapGenerator$2.prototype.toJSON = function SourceMapGenerator_toJSON() {
  60174. var map = {
  60175. version: this._version,
  60176. sources: this._sources.toArray(),
  60177. names: this._names.toArray(),
  60178. mappings: this._serializeMappings()
  60179. };
  60180. if (this._file != null) {
  60181. map.file = this._file;
  60182. }
  60183. if (this._sourceRoot != null) {
  60184. map.sourceRoot = this._sourceRoot;
  60185. }
  60186. if (this._sourcesContents) {
  60187. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  60188. }
  60189. return map;
  60190. };
  60191. SourceMapGenerator$2.prototype.toString = function SourceMapGenerator_toString() {
  60192. return JSON.stringify(this.toJSON());
  60193. };
  60194. var SourceMapGenerator_1 = SourceMapGenerator$2;
  60195. var sourceMapGenerator = {
  60196. SourceMapGenerator: SourceMapGenerator_1
  60197. };
  60198. var binarySearch = createCommonjsModule(function (module, exports) {
  60199. exports.GREATEST_LOWER_BOUND = 1;
  60200. exports.LEAST_UPPER_BOUND = 2;
  60201. function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
  60202. var mid = Math.floor((aHigh - aLow) / 2) + aLow;
  60203. var cmp = aCompare(aNeedle, aHaystack[mid], true);
  60204. if (cmp === 0) {
  60205. return mid;
  60206. } else if (cmp > 0) {
  60207. if (aHigh - mid > 1) {
  60208. return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
  60209. }
  60210. if (aBias == exports.LEAST_UPPER_BOUND) {
  60211. return aHigh < aHaystack.length ? aHigh : -1;
  60212. } else {
  60213. return mid;
  60214. }
  60215. } else {
  60216. if (mid - aLow > 1) {
  60217. return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
  60218. }
  60219. if (aBias == exports.LEAST_UPPER_BOUND) {
  60220. return mid;
  60221. } else {
  60222. return aLow < 0 ? -1 : aLow;
  60223. }
  60224. }
  60225. }
  60226. exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
  60227. if (aHaystack.length === 0) {
  60228. return -1;
  60229. }
  60230. var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);
  60231. if (index < 0) {
  60232. return -1;
  60233. }
  60234. while (index - 1 >= 0) {
  60235. if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
  60236. break;
  60237. }
  60238. --index;
  60239. }
  60240. return index;
  60241. };
  60242. }, "/$$rollup_base$$/packages/babel-core/node_modules/source-map/lib");
  60243. function swap(ary, x, y) {
  60244. var temp = ary[x];
  60245. ary[x] = ary[y];
  60246. ary[y] = temp;
  60247. }
  60248. function randomIntInRange(low, high) {
  60249. return Math.round(low + Math.random() * (high - low));
  60250. }
  60251. function doQuickSort(ary, comparator, p, r) {
  60252. if (p < r) {
  60253. var pivotIndex = randomIntInRange(p, r);
  60254. var i = p - 1;
  60255. swap(ary, pivotIndex, r);
  60256. var pivot = ary[r];
  60257. for (var j = p; j < r; j++) {
  60258. if (comparator(ary[j], pivot) <= 0) {
  60259. i += 1;
  60260. swap(ary, i, j);
  60261. }
  60262. }
  60263. swap(ary, i + 1, j);
  60264. var q = i + 1;
  60265. doQuickSort(ary, comparator, p, q - 1);
  60266. doQuickSort(ary, comparator, q + 1, r);
  60267. }
  60268. }
  60269. var quickSort_1 = function quickSort_1(ary, comparator) {
  60270. doQuickSort(ary, comparator, 0, ary.length - 1);
  60271. };
  60272. var quickSort$1 = {
  60273. quickSort: quickSort_1
  60274. };
  60275. var ArraySet = arraySet.ArraySet;
  60276. var quickSort = quickSort$1.quickSort;
  60277. function SourceMapConsumer$1(aSourceMap) {
  60278. var sourceMap = aSourceMap;
  60279. if (typeof aSourceMap === 'string') {
  60280. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  60281. }
  60282. return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);
  60283. }
  60284. SourceMapConsumer$1.fromSourceMap = function (aSourceMap) {
  60285. return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
  60286. };
  60287. SourceMapConsumer$1.prototype._version = 3;
  60288. SourceMapConsumer$1.prototype.__generatedMappings = null;
  60289. Object.defineProperty(SourceMapConsumer$1.prototype, '_generatedMappings', {
  60290. get: function get() {
  60291. if (!this.__generatedMappings) {
  60292. this._parseMappings(this._mappings, this.sourceRoot);
  60293. }
  60294. return this.__generatedMappings;
  60295. }
  60296. });
  60297. SourceMapConsumer$1.prototype.__originalMappings = null;
  60298. Object.defineProperty(SourceMapConsumer$1.prototype, '_originalMappings', {
  60299. get: function get() {
  60300. if (!this.__originalMappings) {
  60301. this._parseMappings(this._mappings, this.sourceRoot);
  60302. }
  60303. return this.__originalMappings;
  60304. }
  60305. });
  60306. SourceMapConsumer$1.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
  60307. var c = aStr.charAt(index);
  60308. return c === ";" || c === ",";
  60309. };
  60310. SourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  60311. throw new Error("Subclasses must implement _parseMappings");
  60312. };
  60313. SourceMapConsumer$1.GENERATED_ORDER = 1;
  60314. SourceMapConsumer$1.ORIGINAL_ORDER = 2;
  60315. SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;
  60316. SourceMapConsumer$1.LEAST_UPPER_BOUND = 2;
  60317. SourceMapConsumer$1.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
  60318. var context = aContext || null;
  60319. var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;
  60320. var mappings;
  60321. switch (order) {
  60322. case SourceMapConsumer$1.GENERATED_ORDER:
  60323. mappings = this._generatedMappings;
  60324. break;
  60325. case SourceMapConsumer$1.ORIGINAL_ORDER:
  60326. mappings = this._originalMappings;
  60327. break;
  60328. default:
  60329. throw new Error("Unknown order of iteration.");
  60330. }
  60331. var sourceRoot = this.sourceRoot;
  60332. mappings.map(function (mapping) {
  60333. var source = mapping.source === null ? null : this._sources.at(mapping.source);
  60334. if (source != null && sourceRoot != null) {
  60335. source = util$4.join(sourceRoot, source);
  60336. }
  60337. return {
  60338. source: source,
  60339. generatedLine: mapping.generatedLine,
  60340. generatedColumn: mapping.generatedColumn,
  60341. originalLine: mapping.originalLine,
  60342. originalColumn: mapping.originalColumn,
  60343. name: mapping.name === null ? null : this._names.at(mapping.name)
  60344. };
  60345. }, this).forEach(aCallback, context);
  60346. };
  60347. SourceMapConsumer$1.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
  60348. var line = util$4.getArg(aArgs, 'line');
  60349. var needle = {
  60350. source: util$4.getArg(aArgs, 'source'),
  60351. originalLine: line,
  60352. originalColumn: util$4.getArg(aArgs, 'column', 0)
  60353. };
  60354. if (this.sourceRoot != null) {
  60355. needle.source = util$4.relative(this.sourceRoot, needle.source);
  60356. }
  60357. if (!this._sources.has(needle.source)) {
  60358. return [];
  60359. }
  60360. needle.source = this._sources.indexOf(needle.source);
  60361. var mappings = [];
  60362. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$4.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);
  60363. if (index >= 0) {
  60364. var mapping = this._originalMappings[index];
  60365. if (aArgs.column === undefined) {
  60366. var originalLine = mapping.originalLine;
  60367. while (mapping && mapping.originalLine === originalLine) {
  60368. mappings.push({
  60369. line: util$4.getArg(mapping, 'generatedLine', null),
  60370. column: util$4.getArg(mapping, 'generatedColumn', null),
  60371. lastColumn: util$4.getArg(mapping, 'lastGeneratedColumn', null)
  60372. });
  60373. mapping = this._originalMappings[++index];
  60374. }
  60375. } else {
  60376. var originalColumn = mapping.originalColumn;
  60377. while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {
  60378. mappings.push({
  60379. line: util$4.getArg(mapping, 'generatedLine', null),
  60380. column: util$4.getArg(mapping, 'generatedColumn', null),
  60381. lastColumn: util$4.getArg(mapping, 'lastGeneratedColumn', null)
  60382. });
  60383. mapping = this._originalMappings[++index];
  60384. }
  60385. }
  60386. }
  60387. return mappings;
  60388. };
  60389. var SourceMapConsumer_1 = SourceMapConsumer$1;
  60390. function BasicSourceMapConsumer(aSourceMap) {
  60391. var sourceMap = aSourceMap;
  60392. if (typeof aSourceMap === 'string') {
  60393. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  60394. }
  60395. var version = util$4.getArg(sourceMap, 'version');
  60396. var sources = util$4.getArg(sourceMap, 'sources');
  60397. var names = util$4.getArg(sourceMap, 'names', []);
  60398. var sourceRoot = util$4.getArg(sourceMap, 'sourceRoot', null);
  60399. var sourcesContent = util$4.getArg(sourceMap, 'sourcesContent', null);
  60400. var mappings = util$4.getArg(sourceMap, 'mappings');
  60401. var file = util$4.getArg(sourceMap, 'file', null);
  60402. if (version != this._version) {
  60403. throw new Error('Unsupported version: ' + version);
  60404. }
  60405. sources = sources.map(String).map(util$4.normalize).map(function (source) {
  60406. return sourceRoot && util$4.isAbsolute(sourceRoot) && util$4.isAbsolute(source) ? util$4.relative(sourceRoot, source) : source;
  60407. });
  60408. this._names = ArraySet.fromArray(names.map(String), true);
  60409. this._sources = ArraySet.fromArray(sources, true);
  60410. this.sourceRoot = sourceRoot;
  60411. this.sourcesContent = sourcesContent;
  60412. this._mappings = mappings;
  60413. this.file = file;
  60414. }
  60415. BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);
  60416. BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;
  60417. BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {
  60418. var smc = Object.create(BasicSourceMapConsumer.prototype);
  60419. var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
  60420. var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
  60421. smc.sourceRoot = aSourceMap._sourceRoot;
  60422. smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);
  60423. smc.file = aSourceMap._file;
  60424. var generatedMappings = aSourceMap._mappings.toArray().slice();
  60425. var destGeneratedMappings = smc.__generatedMappings = [];
  60426. var destOriginalMappings = smc.__originalMappings = [];
  60427. for (var i = 0, length = generatedMappings.length; i < length; i++) {
  60428. var srcMapping = generatedMappings[i];
  60429. var destMapping = new Mapping();
  60430. destMapping.generatedLine = srcMapping.generatedLine;
  60431. destMapping.generatedColumn = srcMapping.generatedColumn;
  60432. if (srcMapping.source) {
  60433. destMapping.source = sources.indexOf(srcMapping.source);
  60434. destMapping.originalLine = srcMapping.originalLine;
  60435. destMapping.originalColumn = srcMapping.originalColumn;
  60436. if (srcMapping.name) {
  60437. destMapping.name = names.indexOf(srcMapping.name);
  60438. }
  60439. destOriginalMappings.push(destMapping);
  60440. }
  60441. destGeneratedMappings.push(destMapping);
  60442. }
  60443. quickSort(smc.__originalMappings, util$4.compareByOriginalPositions);
  60444. return smc;
  60445. };
  60446. BasicSourceMapConsumer.prototype._version = 3;
  60447. Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
  60448. get: function get() {
  60449. return this._sources.toArray().map(function (s) {
  60450. return this.sourceRoot != null ? util$4.join(this.sourceRoot, s) : s;
  60451. }, this);
  60452. }
  60453. });
  60454. function Mapping() {
  60455. this.generatedLine = 0;
  60456. this.generatedColumn = 0;
  60457. this.source = null;
  60458. this.originalLine = null;
  60459. this.originalColumn = null;
  60460. this.name = null;
  60461. }
  60462. BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  60463. var generatedLine = 1;
  60464. var previousGeneratedColumn = 0;
  60465. var previousOriginalLine = 0;
  60466. var previousOriginalColumn = 0;
  60467. var previousSource = 0;
  60468. var previousName = 0;
  60469. var length = aStr.length;
  60470. var index = 0;
  60471. var cachedSegments = {};
  60472. var temp = {};
  60473. var originalMappings = [];
  60474. var generatedMappings = [];
  60475. var mapping, str, segment, end, value;
  60476. while (index < length) {
  60477. if (aStr.charAt(index) === ';') {
  60478. generatedLine++;
  60479. index++;
  60480. previousGeneratedColumn = 0;
  60481. } else if (aStr.charAt(index) === ',') {
  60482. index++;
  60483. } else {
  60484. mapping = new Mapping();
  60485. mapping.generatedLine = generatedLine;
  60486. for (end = index; end < length; end++) {
  60487. if (this._charIsMappingSeparator(aStr, end)) {
  60488. break;
  60489. }
  60490. }
  60491. str = aStr.slice(index, end);
  60492. segment = cachedSegments[str];
  60493. if (segment) {
  60494. index += str.length;
  60495. } else {
  60496. segment = [];
  60497. while (index < end) {
  60498. base64Vlq.decode(aStr, index, temp);
  60499. value = temp.value;
  60500. index = temp.rest;
  60501. segment.push(value);
  60502. }
  60503. if (segment.length === 2) {
  60504. throw new Error('Found a source, but no line and column');
  60505. }
  60506. if (segment.length === 3) {
  60507. throw new Error('Found a source and line, but no column');
  60508. }
  60509. cachedSegments[str] = segment;
  60510. }
  60511. mapping.generatedColumn = previousGeneratedColumn + segment[0];
  60512. previousGeneratedColumn = mapping.generatedColumn;
  60513. if (segment.length > 1) {
  60514. mapping.source = previousSource + segment[1];
  60515. previousSource += segment[1];
  60516. mapping.originalLine = previousOriginalLine + segment[2];
  60517. previousOriginalLine = mapping.originalLine;
  60518. mapping.originalLine += 1;
  60519. mapping.originalColumn = previousOriginalColumn + segment[3];
  60520. previousOriginalColumn = mapping.originalColumn;
  60521. if (segment.length > 4) {
  60522. mapping.name = previousName + segment[4];
  60523. previousName += segment[4];
  60524. }
  60525. }
  60526. generatedMappings.push(mapping);
  60527. if (typeof mapping.originalLine === 'number') {
  60528. originalMappings.push(mapping);
  60529. }
  60530. }
  60531. }
  60532. quickSort(generatedMappings, util$4.compareByGeneratedPositionsDeflated);
  60533. this.__generatedMappings = generatedMappings;
  60534. quickSort(originalMappings, util$4.compareByOriginalPositions);
  60535. this.__originalMappings = originalMappings;
  60536. };
  60537. BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {
  60538. if (aNeedle[aLineName] <= 0) {
  60539. throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);
  60540. }
  60541. if (aNeedle[aColumnName] < 0) {
  60542. throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);
  60543. }
  60544. return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
  60545. };
  60546. BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {
  60547. for (var index = 0; index < this._generatedMappings.length; ++index) {
  60548. var mapping = this._generatedMappings[index];
  60549. if (index + 1 < this._generatedMappings.length) {
  60550. var nextMapping = this._generatedMappings[index + 1];
  60551. if (mapping.generatedLine === nextMapping.generatedLine) {
  60552. mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
  60553. continue;
  60554. }
  60555. }
  60556. mapping.lastGeneratedColumn = Infinity;
  60557. }
  60558. };
  60559. BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {
  60560. var needle = {
  60561. generatedLine: util$4.getArg(aArgs, 'line'),
  60562. generatedColumn: util$4.getArg(aArgs, 'column')
  60563. };
  60564. var index = this._findMapping(needle, this._generatedMappings, "generatedLine", "generatedColumn", util$4.compareByGeneratedPositionsDeflated, util$4.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));
  60565. if (index >= 0) {
  60566. var mapping = this._generatedMappings[index];
  60567. if (mapping.generatedLine === needle.generatedLine) {
  60568. var source = util$4.getArg(mapping, 'source', null);
  60569. if (source !== null) {
  60570. source = this._sources.at(source);
  60571. if (this.sourceRoot != null) {
  60572. source = util$4.join(this.sourceRoot, source);
  60573. }
  60574. }
  60575. var name = util$4.getArg(mapping, 'name', null);
  60576. if (name !== null) {
  60577. name = this._names.at(name);
  60578. }
  60579. return {
  60580. source: source,
  60581. line: util$4.getArg(mapping, 'originalLine', null),
  60582. column: util$4.getArg(mapping, 'originalColumn', null),
  60583. name: name
  60584. };
  60585. }
  60586. }
  60587. return {
  60588. source: null,
  60589. line: null,
  60590. column: null,
  60591. name: null
  60592. };
  60593. };
  60594. BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {
  60595. if (!this.sourcesContent) {
  60596. return false;
  60597. }
  60598. return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {
  60599. return sc == null;
  60600. });
  60601. };
  60602. BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  60603. if (!this.sourcesContent) {
  60604. return null;
  60605. }
  60606. if (this.sourceRoot != null) {
  60607. aSource = util$4.relative(this.sourceRoot, aSource);
  60608. }
  60609. if (this._sources.has(aSource)) {
  60610. return this.sourcesContent[this._sources.indexOf(aSource)];
  60611. }
  60612. var url;
  60613. if (this.sourceRoot != null && (url = util$4.urlParse(this.sourceRoot))) {
  60614. var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
  60615. if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) {
  60616. return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];
  60617. }
  60618. if ((!url.path || url.path == "/") && this._sources.has("/" + aSource)) {
  60619. return this.sourcesContent[this._sources.indexOf("/" + aSource)];
  60620. }
  60621. }
  60622. if (nullOnMissing) {
  60623. return null;
  60624. } else {
  60625. throw new Error('"' + aSource + '" is not in the SourceMap.');
  60626. }
  60627. };
  60628. BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {
  60629. var source = util$4.getArg(aArgs, 'source');
  60630. if (this.sourceRoot != null) {
  60631. source = util$4.relative(this.sourceRoot, source);
  60632. }
  60633. if (!this._sources.has(source)) {
  60634. return {
  60635. line: null,
  60636. column: null,
  60637. lastColumn: null
  60638. };
  60639. }
  60640. source = this._sources.indexOf(source);
  60641. var needle = {
  60642. source: source,
  60643. originalLine: util$4.getArg(aArgs, 'line'),
  60644. originalColumn: util$4.getArg(aArgs, 'column')
  60645. };
  60646. var index = this._findMapping(needle, this._originalMappings, "originalLine", "originalColumn", util$4.compareByOriginalPositions, util$4.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));
  60647. if (index >= 0) {
  60648. var mapping = this._originalMappings[index];
  60649. if (mapping.source === needle.source) {
  60650. return {
  60651. line: util$4.getArg(mapping, 'generatedLine', null),
  60652. column: util$4.getArg(mapping, 'generatedColumn', null),
  60653. lastColumn: util$4.getArg(mapping, 'lastGeneratedColumn', null)
  60654. };
  60655. }
  60656. }
  60657. return {
  60658. line: null,
  60659. column: null,
  60660. lastColumn: null
  60661. };
  60662. };
  60663. var BasicSourceMapConsumer_1 = BasicSourceMapConsumer;
  60664. function IndexedSourceMapConsumer(aSourceMap) {
  60665. var sourceMap = aSourceMap;
  60666. if (typeof aSourceMap === 'string') {
  60667. sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
  60668. }
  60669. var version = util$4.getArg(sourceMap, 'version');
  60670. var sections = util$4.getArg(sourceMap, 'sections');
  60671. if (version != this._version) {
  60672. throw new Error('Unsupported version: ' + version);
  60673. }
  60674. this._sources = new ArraySet();
  60675. this._names = new ArraySet();
  60676. var lastOffset = {
  60677. line: -1,
  60678. column: 0
  60679. };
  60680. this._sections = sections.map(function (s) {
  60681. if (s.url) {
  60682. throw new Error('Support for url field in sections not implemented.');
  60683. }
  60684. var offset = util$4.getArg(s, 'offset');
  60685. var offsetLine = util$4.getArg(offset, 'line');
  60686. var offsetColumn = util$4.getArg(offset, 'column');
  60687. if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {
  60688. throw new Error('Section offsets must be ordered and non-overlapping.');
  60689. }
  60690. lastOffset = offset;
  60691. return {
  60692. generatedOffset: {
  60693. generatedLine: offsetLine + 1,
  60694. generatedColumn: offsetColumn + 1
  60695. },
  60696. consumer: new SourceMapConsumer$1(util$4.getArg(s, 'map'))
  60697. };
  60698. });
  60699. }
  60700. IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);
  60701. IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1;
  60702. IndexedSourceMapConsumer.prototype._version = 3;
  60703. Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
  60704. get: function get() {
  60705. var sources = [];
  60706. for (var i = 0; i < this._sections.length; i++) {
  60707. for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
  60708. sources.push(this._sections[i].consumer.sources[j]);
  60709. }
  60710. }
  60711. return sources;
  60712. }
  60713. });
  60714. IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
  60715. var needle = {
  60716. generatedLine: util$4.getArg(aArgs, 'line'),
  60717. generatedColumn: util$4.getArg(aArgs, 'column')
  60718. };
  60719. var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {
  60720. var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
  60721. if (cmp) {
  60722. return cmp;
  60723. }
  60724. return needle.generatedColumn - section.generatedOffset.generatedColumn;
  60725. });
  60726. var section = this._sections[sectionIndex];
  60727. if (!section) {
  60728. return {
  60729. source: null,
  60730. line: null,
  60731. column: null,
  60732. name: null
  60733. };
  60734. }
  60735. return section.consumer.originalPositionFor({
  60736. line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),
  60737. column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  60738. bias: aArgs.bias
  60739. });
  60740. };
  60741. IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {
  60742. return this._sections.every(function (s) {
  60743. return s.consumer.hasContentsOfAllSources();
  60744. });
  60745. };
  60746. IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
  60747. for (var i = 0; i < this._sections.length; i++) {
  60748. var section = this._sections[i];
  60749. var content = section.consumer.sourceContentFor(aSource, true);
  60750. if (content) {
  60751. return content;
  60752. }
  60753. }
  60754. if (nullOnMissing) {
  60755. return null;
  60756. } else {
  60757. throw new Error('"' + aSource + '" is not in the SourceMap.');
  60758. }
  60759. };
  60760. IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
  60761. for (var i = 0; i < this._sections.length; i++) {
  60762. var section = this._sections[i];
  60763. if (section.consumer.sources.indexOf(util$4.getArg(aArgs, 'source')) === -1) {
  60764. continue;
  60765. }
  60766. var generatedPosition = section.consumer.generatedPositionFor(aArgs);
  60767. if (generatedPosition) {
  60768. var ret = {
  60769. line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),
  60770. column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)
  60771. };
  60772. return ret;
  60773. }
  60774. }
  60775. return {
  60776. line: null,
  60777. column: null
  60778. };
  60779. };
  60780. IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
  60781. this.__generatedMappings = [];
  60782. this.__originalMappings = [];
  60783. for (var i = 0; i < this._sections.length; i++) {
  60784. var section = this._sections[i];
  60785. var sectionMappings = section.consumer._generatedMappings;
  60786. for (var j = 0; j < sectionMappings.length; j++) {
  60787. var mapping = sectionMappings[j];
  60788. var source = section.consumer._sources.at(mapping.source);
  60789. if (section.consumer.sourceRoot !== null) {
  60790. source = util$4.join(section.consumer.sourceRoot, source);
  60791. }
  60792. this._sources.add(source);
  60793. source = this._sources.indexOf(source);
  60794. var name = section.consumer._names.at(mapping.name);
  60795. this._names.add(name);
  60796. name = this._names.indexOf(name);
  60797. var adjustedMapping = {
  60798. source: source,
  60799. generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),
  60800. generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),
  60801. originalLine: mapping.originalLine,
  60802. originalColumn: mapping.originalColumn,
  60803. name: name
  60804. };
  60805. this.__generatedMappings.push(adjustedMapping);
  60806. if (typeof adjustedMapping.originalLine === 'number') {
  60807. this.__originalMappings.push(adjustedMapping);
  60808. }
  60809. }
  60810. }
  60811. quickSort(this.__generatedMappings, util$4.compareByGeneratedPositionsDeflated);
  60812. quickSort(this.__originalMappings, util$4.compareByOriginalPositions);
  60813. };
  60814. var IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;
  60815. var sourceMapConsumer = {
  60816. SourceMapConsumer: SourceMapConsumer_1,
  60817. BasicSourceMapConsumer: BasicSourceMapConsumer_1,
  60818. IndexedSourceMapConsumer: IndexedSourceMapConsumer_1
  60819. };
  60820. var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;
  60821. var REGEX_NEWLINE = /(\r?\n)/;
  60822. var NEWLINE_CODE = 10;
  60823. var isSourceNode = "$$$isSourceNode$$$";
  60824. function SourceNode$1(aLine, aColumn, aSource, aChunks, aName) {
  60825. this.children = [];
  60826. this.sourceContents = {};
  60827. this.line = aLine == null ? null : aLine;
  60828. this.column = aColumn == null ? null : aColumn;
  60829. this.source = aSource == null ? null : aSource;
  60830. this.name = aName == null ? null : aName;
  60831. this[isSourceNode] = true;
  60832. if (aChunks != null) this.add(aChunks);
  60833. }
  60834. SourceNode$1.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
  60835. var node = new SourceNode$1();
  60836. var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
  60837. var remainingLinesIndex = 0;
  60838. var shiftNextLine = function shiftNextLine() {
  60839. var lineContents = getNextLine();
  60840. var newLine = getNextLine() || "";
  60841. return lineContents + newLine;
  60842. function getNextLine() {
  60843. return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;
  60844. }
  60845. };
  60846. var lastGeneratedLine = 1,
  60847. lastGeneratedColumn = 0;
  60848. var lastMapping = null;
  60849. aSourceMapConsumer.eachMapping(function (mapping) {
  60850. if (lastMapping !== null) {
  60851. if (lastGeneratedLine < mapping.generatedLine) {
  60852. addMappingWithCode(lastMapping, shiftNextLine());
  60853. lastGeneratedLine++;
  60854. lastGeneratedColumn = 0;
  60855. } else {
  60856. var nextLine = remainingLines[remainingLinesIndex];
  60857. var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);
  60858. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);
  60859. lastGeneratedColumn = mapping.generatedColumn;
  60860. addMappingWithCode(lastMapping, code);
  60861. lastMapping = mapping;
  60862. return;
  60863. }
  60864. }
  60865. while (lastGeneratedLine < mapping.generatedLine) {
  60866. node.add(shiftNextLine());
  60867. lastGeneratedLine++;
  60868. }
  60869. if (lastGeneratedColumn < mapping.generatedColumn) {
  60870. var nextLine = remainingLines[remainingLinesIndex];
  60871. node.add(nextLine.substr(0, mapping.generatedColumn));
  60872. remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
  60873. lastGeneratedColumn = mapping.generatedColumn;
  60874. }
  60875. lastMapping = mapping;
  60876. }, this);
  60877. if (remainingLinesIndex < remainingLines.length) {
  60878. if (lastMapping) {
  60879. addMappingWithCode(lastMapping, shiftNextLine());
  60880. }
  60881. node.add(remainingLines.splice(remainingLinesIndex).join(""));
  60882. }
  60883. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  60884. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  60885. if (content != null) {
  60886. if (aRelativePath != null) {
  60887. sourceFile = util$4.join(aRelativePath, sourceFile);
  60888. }
  60889. node.setSourceContent(sourceFile, content);
  60890. }
  60891. });
  60892. return node;
  60893. function addMappingWithCode(mapping, code) {
  60894. if (mapping === null || mapping.source === undefined) {
  60895. node.add(code);
  60896. } else {
  60897. var source = aRelativePath ? util$4.join(aRelativePath, mapping.source) : mapping.source;
  60898. node.add(new SourceNode$1(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));
  60899. }
  60900. }
  60901. };
  60902. SourceNode$1.prototype.add = function SourceNode_add(aChunk) {
  60903. if (Array.isArray(aChunk)) {
  60904. aChunk.forEach(function (chunk) {
  60905. this.add(chunk);
  60906. }, this);
  60907. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  60908. if (aChunk) {
  60909. this.children.push(aChunk);
  60910. }
  60911. } else {
  60912. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  60913. }
  60914. return this;
  60915. };
  60916. SourceNode$1.prototype.prepend = function SourceNode_prepend(aChunk) {
  60917. if (Array.isArray(aChunk)) {
  60918. for (var i = aChunk.length - 1; i >= 0; i--) {
  60919. this.prepend(aChunk[i]);
  60920. }
  60921. } else if (aChunk[isSourceNode] || typeof aChunk === "string") {
  60922. this.children.unshift(aChunk);
  60923. } else {
  60924. throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk);
  60925. }
  60926. return this;
  60927. };
  60928. SourceNode$1.prototype.walk = function SourceNode_walk(aFn) {
  60929. var chunk;
  60930. for (var i = 0, len = this.children.length; i < len; i++) {
  60931. chunk = this.children[i];
  60932. if (chunk[isSourceNode]) {
  60933. chunk.walk(aFn);
  60934. } else {
  60935. if (chunk !== '') {
  60936. aFn(chunk, {
  60937. source: this.source,
  60938. line: this.line,
  60939. column: this.column,
  60940. name: this.name
  60941. });
  60942. }
  60943. }
  60944. }
  60945. };
  60946. SourceNode$1.prototype.join = function SourceNode_join(aSep) {
  60947. var newChildren;
  60948. var i;
  60949. var len = this.children.length;
  60950. if (len > 0) {
  60951. newChildren = [];
  60952. for (i = 0; i < len - 1; i++) {
  60953. newChildren.push(this.children[i]);
  60954. newChildren.push(aSep);
  60955. }
  60956. newChildren.push(this.children[i]);
  60957. this.children = newChildren;
  60958. }
  60959. return this;
  60960. };
  60961. SourceNode$1.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
  60962. var lastChild = this.children[this.children.length - 1];
  60963. if (lastChild[isSourceNode]) {
  60964. lastChild.replaceRight(aPattern, aReplacement);
  60965. } else if (typeof lastChild === 'string') {
  60966. this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
  60967. } else {
  60968. this.children.push(''.replace(aPattern, aReplacement));
  60969. }
  60970. return this;
  60971. };
  60972. SourceNode$1.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
  60973. this.sourceContents[util$4.toSetString(aSourceFile)] = aSourceContent;
  60974. };
  60975. SourceNode$1.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {
  60976. for (var i = 0, len = this.children.length; i < len; i++) {
  60977. if (this.children[i][isSourceNode]) {
  60978. this.children[i].walkSourceContents(aFn);
  60979. }
  60980. }
  60981. var sources = Object.keys(this.sourceContents);
  60982. for (var i = 0, len = sources.length; i < len; i++) {
  60983. aFn(util$4.fromSetString(sources[i]), this.sourceContents[sources[i]]);
  60984. }
  60985. };
  60986. SourceNode$1.prototype.toString = function SourceNode_toString() {
  60987. var str = "";
  60988. this.walk(function (chunk) {
  60989. str += chunk;
  60990. });
  60991. return str;
  60992. };
  60993. SourceNode$1.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
  60994. var generated = {
  60995. code: "",
  60996. line: 1,
  60997. column: 0
  60998. };
  60999. var map = new SourceMapGenerator$1(aArgs);
  61000. var sourceMappingActive = false;
  61001. var lastOriginalSource = null;
  61002. var lastOriginalLine = null;
  61003. var lastOriginalColumn = null;
  61004. var lastOriginalName = null;
  61005. this.walk(function (chunk, original) {
  61006. generated.code += chunk;
  61007. if (original.source !== null && original.line !== null && original.column !== null) {
  61008. if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {
  61009. map.addMapping({
  61010. source: original.source,
  61011. original: {
  61012. line: original.line,
  61013. column: original.column
  61014. },
  61015. generated: {
  61016. line: generated.line,
  61017. column: generated.column
  61018. },
  61019. name: original.name
  61020. });
  61021. }
  61022. lastOriginalSource = original.source;
  61023. lastOriginalLine = original.line;
  61024. lastOriginalColumn = original.column;
  61025. lastOriginalName = original.name;
  61026. sourceMappingActive = true;
  61027. } else if (sourceMappingActive) {
  61028. map.addMapping({
  61029. generated: {
  61030. line: generated.line,
  61031. column: generated.column
  61032. }
  61033. });
  61034. lastOriginalSource = null;
  61035. sourceMappingActive = false;
  61036. }
  61037. for (var idx = 0, length = chunk.length; idx < length; idx++) {
  61038. if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
  61039. generated.line++;
  61040. generated.column = 0;
  61041. if (idx + 1 === length) {
  61042. lastOriginalSource = null;
  61043. sourceMappingActive = false;
  61044. } else if (sourceMappingActive) {
  61045. map.addMapping({
  61046. source: original.source,
  61047. original: {
  61048. line: original.line,
  61049. column: original.column
  61050. },
  61051. generated: {
  61052. line: generated.line,
  61053. column: generated.column
  61054. },
  61055. name: original.name
  61056. });
  61057. }
  61058. } else {
  61059. generated.column++;
  61060. }
  61061. }
  61062. });
  61063. this.walkSourceContents(function (sourceFile, sourceContent) {
  61064. map.setSourceContent(sourceFile, sourceContent);
  61065. });
  61066. return {
  61067. code: generated.code,
  61068. map: map
  61069. };
  61070. };
  61071. var SourceNode_1 = SourceNode$1;
  61072. var sourceNode = {
  61073. SourceNode: SourceNode_1
  61074. };
  61075. var SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;
  61076. var SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;
  61077. var SourceNode = sourceNode.SourceNode;
  61078. var sourceMap = {
  61079. SourceMapGenerator: SourceMapGenerator,
  61080. SourceMapConsumer: SourceMapConsumer,
  61081. SourceNode: SourceNode
  61082. };
  61083. function mergeSourceMap(inputMap, map) {
  61084. var input = buildMappingData(inputMap);
  61085. var output = buildMappingData(map);
  61086. var mergedGenerator = new sourceMap.SourceMapGenerator();
  61087. for (var _iterator = _createForOfIteratorHelperLoose(input.sources), _step; !(_step = _iterator()).done;) {
  61088. var source = _step.value.source;
  61089. if (typeof source.content === "string") {
  61090. mergedGenerator.setSourceContent(source.path, source.content);
  61091. }
  61092. }
  61093. if (output.sources.length === 1) {
  61094. var defaultSource = output.sources[0];
  61095. var insertedMappings = new Map();
  61096. eachInputGeneratedRange(input, function (generated, original, source) {
  61097. eachOverlappingGeneratedOutputRange(defaultSource, generated, function (item) {
  61098. var key = makeMappingKey(item);
  61099. if (insertedMappings.has(key)) return;
  61100. insertedMappings.set(key, item);
  61101. mergedGenerator.addMapping({
  61102. source: source.path,
  61103. original: {
  61104. line: original.line,
  61105. column: original.columnStart
  61106. },
  61107. generated: {
  61108. line: item.line,
  61109. column: item.columnStart
  61110. },
  61111. name: original.name
  61112. });
  61113. });
  61114. });
  61115. for (var _iterator2 = _createForOfIteratorHelperLoose(insertedMappings.values()), _step2; !(_step2 = _iterator2()).done;) {
  61116. var _item = _step2.value;
  61117. if (_item.columnEnd === Infinity) {
  61118. continue;
  61119. }
  61120. var clearItem = {
  61121. line: _item.line,
  61122. columnStart: _item.columnEnd
  61123. };
  61124. var key = makeMappingKey(clearItem);
  61125. if (insertedMappings.has(key)) {
  61126. continue;
  61127. }
  61128. mergedGenerator.addMapping({
  61129. generated: {
  61130. line: clearItem.line,
  61131. column: clearItem.columnStart
  61132. }
  61133. });
  61134. }
  61135. }
  61136. var result = mergedGenerator.toJSON();
  61137. if (typeof input.sourceRoot === "string") {
  61138. result.sourceRoot = input.sourceRoot;
  61139. }
  61140. return result;
  61141. }
  61142. function makeMappingKey(item) {
  61143. return item.line + "/" + item.columnStart;
  61144. }
  61145. function eachOverlappingGeneratedOutputRange(outputFile, inputGeneratedRange, callback) {
  61146. var overlappingOriginal = filterApplicableOriginalRanges(outputFile, inputGeneratedRange);
  61147. for (var _iterator3 = _createForOfIteratorHelperLoose(overlappingOriginal), _step3; !(_step3 = _iterator3()).done;) {
  61148. var generated = _step3.value.generated;
  61149. for (var _iterator4 = _createForOfIteratorHelperLoose(generated), _step4; !(_step4 = _iterator4()).done;) {
  61150. var _item2 = _step4.value;
  61151. callback(_item2);
  61152. }
  61153. }
  61154. }
  61155. function filterApplicableOriginalRanges(_ref, _ref2) {
  61156. var mappings = _ref.mappings;
  61157. var line = _ref2.line,
  61158. columnStart = _ref2.columnStart,
  61159. columnEnd = _ref2.columnEnd;
  61160. return filterSortedArray(mappings, function (_ref3) {
  61161. var outOriginal = _ref3.original;
  61162. if (line > outOriginal.line) return -1;
  61163. if (line < outOriginal.line) return 1;
  61164. if (columnStart >= outOriginal.columnEnd) return -1;
  61165. if (columnEnd <= outOriginal.columnStart) return 1;
  61166. return 0;
  61167. });
  61168. }
  61169. function eachInputGeneratedRange(map, callback) {
  61170. for (var _iterator5 = _createForOfIteratorHelperLoose(map.sources), _step5; !(_step5 = _iterator5()).done;) {
  61171. var _step5$value = _step5.value,
  61172. source = _step5$value.source,
  61173. mappings = _step5$value.mappings;
  61174. for (var _iterator6 = _createForOfIteratorHelperLoose(mappings), _step6; !(_step6 = _iterator6()).done;) {
  61175. var _step6$value = _step6.value,
  61176. original = _step6$value.original,
  61177. generated = _step6$value.generated;
  61178. for (var _iterator7 = _createForOfIteratorHelperLoose(generated), _step7; !(_step7 = _iterator7()).done;) {
  61179. var _item3 = _step7.value;
  61180. callback(_item3, original, source);
  61181. }
  61182. }
  61183. }
  61184. }
  61185. function buildMappingData(map) {
  61186. var consumer = new sourceMap.SourceMapConsumer(Object.assign({}, map, {
  61187. sourceRoot: null
  61188. }));
  61189. var sources = new Map();
  61190. var mappings = new Map();
  61191. var last = null;
  61192. consumer.computeColumnSpans();
  61193. consumer.eachMapping(function (m) {
  61194. if (m.originalLine === null) return;
  61195. var source = sources.get(m.source);
  61196. if (!source) {
  61197. source = {
  61198. path: m.source,
  61199. content: consumer.sourceContentFor(m.source, true)
  61200. };
  61201. sources.set(m.source, source);
  61202. }
  61203. var sourceData = mappings.get(source);
  61204. if (!sourceData) {
  61205. sourceData = {
  61206. source: source,
  61207. mappings: []
  61208. };
  61209. mappings.set(source, sourceData);
  61210. }
  61211. var obj = {
  61212. line: m.originalLine,
  61213. columnStart: m.originalColumn,
  61214. columnEnd: Infinity,
  61215. name: m.name
  61216. };
  61217. if (last && last.source === source && last.mapping.line === m.originalLine) {
  61218. last.mapping.columnEnd = m.originalColumn;
  61219. }
  61220. last = {
  61221. source: source,
  61222. mapping: obj
  61223. };
  61224. sourceData.mappings.push({
  61225. original: obj,
  61226. generated: consumer.allGeneratedPositionsFor({
  61227. source: m.source,
  61228. line: m.originalLine,
  61229. column: m.originalColumn
  61230. }).map(function (item) {
  61231. return {
  61232. line: item.line,
  61233. columnStart: item.column,
  61234. columnEnd: item.lastColumn + 1
  61235. };
  61236. })
  61237. });
  61238. }, null, sourceMap.SourceMapConsumer.ORIGINAL_ORDER);
  61239. return {
  61240. file: map.file,
  61241. sourceRoot: map.sourceRoot,
  61242. sources: Array.from(mappings.values())
  61243. };
  61244. }
  61245. function findInsertionLocation(array, callback) {
  61246. var left = 0;
  61247. var right = array.length;
  61248. while (left < right) {
  61249. var mid = Math.floor((left + right) / 2);
  61250. var _item4 = array[mid];
  61251. var result = callback(_item4);
  61252. if (result === 0) {
  61253. left = mid;
  61254. break;
  61255. }
  61256. if (result >= 0) {
  61257. right = mid;
  61258. } else {
  61259. left = mid + 1;
  61260. }
  61261. }
  61262. var i = left;
  61263. if (i < array.length) {
  61264. while (i >= 0 && callback(array[i]) >= 0) {
  61265. i--;
  61266. }
  61267. return i + 1;
  61268. }
  61269. return i;
  61270. }
  61271. function filterSortedArray(array, callback) {
  61272. var start = findInsertionLocation(array, callback);
  61273. var results = [];
  61274. for (var i = start; i < array.length && callback(array[i]) === 0; i++) {
  61275. results.push(array[i]);
  61276. }
  61277. return results;
  61278. }
  61279. function generateCode(pluginPasses, file) {
  61280. var opts = file.opts,
  61281. ast = file.ast,
  61282. code = file.code,
  61283. inputMap = file.inputMap;
  61284. var results = [];
  61285. for (var _iterator = _createForOfIteratorHelperLoose(pluginPasses), _step; !(_step = _iterator()).done;) {
  61286. var plugins = _step.value;
  61287. for (var _iterator2 = _createForOfIteratorHelperLoose(plugins), _step2; !(_step2 = _iterator2()).done;) {
  61288. var plugin = _step2.value;
  61289. var generatorOverride = plugin.generatorOverride;
  61290. if (generatorOverride) {
  61291. var _result2 = generatorOverride(ast, opts.generatorOpts, code, generate$1);
  61292. if (_result2 !== undefined) results.push(_result2);
  61293. }
  61294. }
  61295. }
  61296. var result;
  61297. if (results.length === 0) {
  61298. result = generate$1(ast, opts.generatorOpts, code);
  61299. } else if (results.length === 1) {
  61300. result = results[0];
  61301. if (typeof result.then === "function") {
  61302. throw new Error("You appear to be using an async codegen plugin, " + "which your current version of Babel does not support. " + "If you're using a published plugin, " + "you may need to upgrade your @babel/core version.");
  61303. }
  61304. } else {
  61305. throw new Error("More than one plugin attempted to override codegen.");
  61306. }
  61307. var _result = result,
  61308. outputCode = _result.code,
  61309. outputMap = _result.map;
  61310. if (outputMap && inputMap) {
  61311. outputMap = mergeSourceMap(inputMap.toObject(), outputMap);
  61312. }
  61313. if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
  61314. outputCode += "\n" + convertSourceMap.fromObject(outputMap).toComment();
  61315. }
  61316. if (opts.sourceMaps === "inline") {
  61317. outputMap = null;
  61318. }
  61319. return {
  61320. outputCode: outputCode,
  61321. outputMap: outputMap
  61322. };
  61323. }
  61324. var _marked = regenerator.mark(run$1),
  61325. _marked2 = regenerator.mark(transformFile$1);
  61326. function run$1(config, code, ast) {
  61327. var file, opts, _opts$filename, outputCode, outputMap, _generateCode, _opts$filename2;
  61328. return regenerator.wrap(function run$(_context) {
  61329. while (1) {
  61330. switch (_context.prev = _context.next) {
  61331. case 0:
  61332. return _context.delegateYield(normalizeFile(config.passes, normalizeOptions$4(config), code, ast), "t0", 1);
  61333. case 1:
  61334. file = _context.t0;
  61335. opts = file.opts;
  61336. _context.prev = 3;
  61337. return _context.delegateYield(transformFile$1(file, config.passes), "t1", 5);
  61338. case 5:
  61339. _context.next = 12;
  61340. break;
  61341. case 7:
  61342. _context.prev = 7;
  61343. _context.t2 = _context["catch"](3);
  61344. _context.t2.message = ((_opts$filename = opts.filename) != null ? _opts$filename : "unknown") + ": " + _context.t2.message;
  61345. if (!_context.t2.code) {
  61346. _context.t2.code = "BABEL_TRANSFORM_ERROR";
  61347. }
  61348. throw _context.t2;
  61349. case 12:
  61350. _context.prev = 12;
  61351. if (opts.code !== false) {
  61352. _generateCode = generateCode(config.passes, file);
  61353. outputCode = _generateCode.outputCode;
  61354. outputMap = _generateCode.outputMap;
  61355. }
  61356. _context.next = 21;
  61357. break;
  61358. case 16:
  61359. _context.prev = 16;
  61360. _context.t3 = _context["catch"](12);
  61361. _context.t3.message = ((_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown") + ": " + _context.t3.message;
  61362. if (!_context.t3.code) {
  61363. _context.t3.code = "BABEL_GENERATE_ERROR";
  61364. }
  61365. throw _context.t3;
  61366. case 21:
  61367. return _context.abrupt("return", {
  61368. metadata: file.metadata,
  61369. options: opts,
  61370. ast: opts.ast === true ? file.ast : null,
  61371. code: outputCode === undefined ? null : outputCode,
  61372. map: outputMap === undefined ? null : outputMap,
  61373. sourceType: file.ast.program.sourceType
  61374. });
  61375. case 22:
  61376. case "end":
  61377. return _context.stop();
  61378. }
  61379. }
  61380. }, _marked, null, [[3, 7], [12, 16]]);
  61381. }
  61382. function transformFile$1(file, pluginPasses) {
  61383. var _iterator, _step, pluginPairs, passPairs, passes, visitors, _iterator2, _step2, _plugin2, _pass2, _i, _passPairs, _passPairs$_i, plugin, pass, fn, result, visitor, _i2, _passPairs2, _passPairs2$_i, _plugin, _pass, _fn, _result;
  61384. return regenerator.wrap(function transformFile$(_context2) {
  61385. while (1) {
  61386. switch (_context2.prev = _context2.next) {
  61387. case 0:
  61388. _iterator = _createForOfIteratorHelperLoose(pluginPasses);
  61389. case 1:
  61390. if ((_step = _iterator()).done) {
  61391. _context2.next = 35;
  61392. break;
  61393. }
  61394. pluginPairs = _step.value;
  61395. passPairs = [];
  61396. passes = [];
  61397. visitors = [];
  61398. for (_iterator2 = _createForOfIteratorHelperLoose(pluginPairs.concat([loadBlockHoistPlugin()])); !(_step2 = _iterator2()).done;) {
  61399. _plugin2 = _step2.value;
  61400. _pass2 = new PluginPass(file, _plugin2.key, _plugin2.options);
  61401. passPairs.push([_plugin2, _pass2]);
  61402. passes.push(_pass2);
  61403. visitors.push(_plugin2.visitor);
  61404. }
  61405. _i = 0, _passPairs = passPairs;
  61406. case 8:
  61407. if (!(_i < _passPairs.length)) {
  61408. _context2.next = 19;
  61409. break;
  61410. }
  61411. _passPairs$_i = _slicedToArray$2(_passPairs[_i], 2), plugin = _passPairs$_i[0], pass = _passPairs$_i[1];
  61412. fn = plugin.pre;
  61413. if (!fn) {
  61414. _context2.next = 16;
  61415. break;
  61416. }
  61417. result = fn.call(pass, file);
  61418. return _context2.delegateYield([], "t0", 14);
  61419. case 14:
  61420. if (!isThenable(result)) {
  61421. _context2.next = 16;
  61422. break;
  61423. }
  61424. throw new Error("You appear to be using an plugin with an async .pre, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
  61425. case 16:
  61426. _i++;
  61427. _context2.next = 8;
  61428. break;
  61429. case 19:
  61430. visitor = traverse.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
  61431. traverse(file.ast, visitor, file.scope);
  61432. _i2 = 0, _passPairs2 = passPairs;
  61433. case 22:
  61434. if (!(_i2 < _passPairs2.length)) {
  61435. _context2.next = 33;
  61436. break;
  61437. }
  61438. _passPairs2$_i = _slicedToArray$2(_passPairs2[_i2], 2), _plugin = _passPairs2$_i[0], _pass = _passPairs2$_i[1];
  61439. _fn = _plugin.post;
  61440. if (!_fn) {
  61441. _context2.next = 30;
  61442. break;
  61443. }
  61444. _result = _fn.call(_pass, file);
  61445. return _context2.delegateYield([], "t1", 28);
  61446. case 28:
  61447. if (!isThenable(_result)) {
  61448. _context2.next = 30;
  61449. break;
  61450. }
  61451. throw new Error("You appear to be using an plugin with an async .post, " + "which your current version of Babel does not support. " + "If you're using a published plugin, you may need to upgrade " + "your @babel/core version.");
  61452. case 30:
  61453. _i2++;
  61454. _context2.next = 22;
  61455. break;
  61456. case 33:
  61457. _context2.next = 1;
  61458. break;
  61459. case 35:
  61460. case "end":
  61461. return _context2.stop();
  61462. }
  61463. }
  61464. }, _marked2);
  61465. }
  61466. function isThenable(val) {
  61467. return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
  61468. }
  61469. var transformRunner = gensync(regenerator.mark(function transform(code, opts) {
  61470. var config;
  61471. return regenerator.wrap(function transform$(_context) {
  61472. while (1) {
  61473. switch (_context.prev = _context.next) {
  61474. case 0:
  61475. return _context.delegateYield(loadConfig(opts), "t0", 1);
  61476. case 1:
  61477. config = _context.t0;
  61478. if (!(config === null)) {
  61479. _context.next = 4;
  61480. break;
  61481. }
  61482. return _context.abrupt("return", null);
  61483. case 4:
  61484. return _context.delegateYield(run$1(config, code), "t1", 5);
  61485. case 5:
  61486. return _context.abrupt("return", _context.t1);
  61487. case 6:
  61488. case "end":
  61489. return _context.stop();
  61490. }
  61491. }
  61492. }, transform);
  61493. }));
  61494. var transform$2 = function transform(code, opts, callback) {
  61495. if (typeof opts === "function") {
  61496. callback = opts;
  61497. opts = undefined;
  61498. }
  61499. if (callback === undefined) return transformRunner.sync(code, opts);
  61500. transformRunner.errback(code, opts, callback);
  61501. };
  61502. var transformSync = transformRunner.sync;
  61503. var transformAsync = transformRunner.async;
  61504. var transformFile = function transformFile(filename, opts, callback) {
  61505. if (typeof opts === "function") {
  61506. callback = opts;
  61507. }
  61508. callback(new Error("Transforming files is not supported in browsers"), null);
  61509. };
  61510. function transformFileSync() {
  61511. throw new Error("Transforming files is not supported in browsers");
  61512. }
  61513. function transformFileAsync() {
  61514. return Promise.reject(new Error("Transforming files is not supported in browsers"));
  61515. }
  61516. var transformFromAstRunner = gensync(regenerator.mark(function _callee(ast, code, opts) {
  61517. var config;
  61518. return regenerator.wrap(function _callee$(_context) {
  61519. while (1) {
  61520. switch (_context.prev = _context.next) {
  61521. case 0:
  61522. return _context.delegateYield(loadConfig(opts), "t0", 1);
  61523. case 1:
  61524. config = _context.t0;
  61525. if (!(config === null)) {
  61526. _context.next = 4;
  61527. break;
  61528. }
  61529. return _context.abrupt("return", null);
  61530. case 4:
  61531. if (ast) {
  61532. _context.next = 6;
  61533. break;
  61534. }
  61535. throw new Error("No AST given");
  61536. case 6:
  61537. return _context.delegateYield(run$1(config, code, ast), "t1", 7);
  61538. case 7:
  61539. return _context.abrupt("return", _context.t1);
  61540. case 8:
  61541. case "end":
  61542. return _context.stop();
  61543. }
  61544. }
  61545. }, _callee);
  61546. }));
  61547. var transformFromAst$1 = function transformFromAst(ast, code, opts, callback) {
  61548. if (typeof opts === "function") {
  61549. callback = opts;
  61550. opts = undefined;
  61551. }
  61552. if (callback === undefined) {
  61553. return transformFromAstRunner.sync(ast, code, opts);
  61554. }
  61555. transformFromAstRunner.errback(ast, code, opts, callback);
  61556. };
  61557. var transformFromAstSync = transformFromAstRunner.sync;
  61558. var transformFromAstAsync = transformFromAstRunner.async;
  61559. var parseRunner = gensync(regenerator.mark(function parse(code, opts) {
  61560. var config;
  61561. return regenerator.wrap(function parse$(_context) {
  61562. while (1) {
  61563. switch (_context.prev = _context.next) {
  61564. case 0:
  61565. return _context.delegateYield(loadConfig(opts), "t0", 1);
  61566. case 1:
  61567. config = _context.t0;
  61568. if (!(config === null)) {
  61569. _context.next = 4;
  61570. break;
  61571. }
  61572. return _context.abrupt("return", null);
  61573. case 4:
  61574. return _context.delegateYield(parser$1(config.passes, normalizeOptions$4(config), code), "t1", 5);
  61575. case 5:
  61576. return _context.abrupt("return", _context.t1);
  61577. case 6:
  61578. case "end":
  61579. return _context.stop();
  61580. }
  61581. }
  61582. }, parse);
  61583. }));
  61584. var parse$3 = function parse(code, opts, callback) {
  61585. if (typeof opts === "function") {
  61586. callback = opts;
  61587. opts = undefined;
  61588. }
  61589. if (callback === undefined) return parseRunner.sync(code, opts);
  61590. parseRunner.errback(code, opts, callback);
  61591. };
  61592. var parseSync = parseRunner.sync;
  61593. var parseAsync = parseRunner.async;
  61594. var version$3 = "7.14.6";
  61595. var DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
  61596. var OptionManager = function () {
  61597. function OptionManager() {}
  61598. var _proto = OptionManager.prototype;
  61599. _proto.init = function init(opts) {
  61600. return loadOptions(opts);
  61601. };
  61602. return OptionManager;
  61603. }();
  61604. function Plugin(alias) {
  61605. throw new Error("The (" + alias + ") Babel 5 plugin is being run with an unsupported Babel version.");
  61606. }
  61607. function declare(builder) {
  61608. return function (api, options, dirname) {
  61609. var _clonedApi2;
  61610. var clonedApi;
  61611. for (var _i = 0, _Object$keys = Object.keys(apiPolyfills); _i < _Object$keys.length; _i++) {
  61612. var _clonedApi;
  61613. var name = _Object$keys[_i];
  61614. if (api[name]) continue;
  61615. clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api);
  61616. clonedApi[name] = apiPolyfills[name](clonedApi);
  61617. }
  61618. return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
  61619. };
  61620. }
  61621. var apiPolyfills = {
  61622. assertVersion: function assertVersion(api) {
  61623. return function (range) {
  61624. throwVersionError(range, api.version);
  61625. };
  61626. },
  61627. targets: function targets() {
  61628. return function () {
  61629. return {};
  61630. };
  61631. },
  61632. assumption: function assumption() {
  61633. return function () {};
  61634. }
  61635. };
  61636. function copyApiObject(api) {
  61637. var proto = null;
  61638. if (typeof api.version === "string" && /^7\./.test(api.version)) {
  61639. proto = Object.getPrototypeOf(api);
  61640. if (proto && (!has$8(proto, "version") || !has$8(proto, "transform") || !has$8(proto, "template") || !has$8(proto, "types"))) {
  61641. proto = null;
  61642. }
  61643. }
  61644. return Object.assign({}, proto, api);
  61645. }
  61646. function has$8(obj, key) {
  61647. return Object.prototype.hasOwnProperty.call(obj, key);
  61648. }
  61649. function throwVersionError(range, version) {
  61650. if (typeof range === "number") {
  61651. if (!Number.isInteger(range)) {
  61652. throw new Error("Expected string or integer value.");
  61653. }
  61654. range = "^" + range + ".0.0-0";
  61655. }
  61656. if (typeof range !== "string") {
  61657. throw new Error("Expected string or integer value.");
  61658. }
  61659. var limit = Error.stackTraceLimit;
  61660. if (typeof limit === "number" && limit < 25) {
  61661. Error.stackTraceLimit = 25;
  61662. }
  61663. var err;
  61664. if (version.slice(0, 2) === "7.") {
  61665. err = new Error("Requires Babel \"^7.0.0-beta.41\", but was loaded with \"" + version + "\". " + "You'll need to update your @babel/core version.");
  61666. } else {
  61667. err = new Error("Requires Babel \"" + range + "\", but was loaded with \"" + version + "\". " + "If you are sure you have a compatible version of @babel/core, " + "it is likely that something in your build process is loading the " + "wrong version. Inspect the stack trace of this error to look for " + "the first entry that doesn't mention \"@babel/core\" or \"babel-core\" " + "to see what is calling Babel.");
  61668. }
  61669. if (typeof limit === "number") {
  61670. Error.stackTraceLimit = limit;
  61671. }
  61672. throw Object.assign(err, {
  61673. code: "BABEL_VERSION_UNSUPPORTED",
  61674. version: version,
  61675. range: range
  61676. });
  61677. }
  61678. var src = /*#__PURE__*/Object.freeze({
  61679. __proto__: null,
  61680. declare: declare
  61681. });
  61682. var externalHelpers = declare(function (api, options) {
  61683. api.assertVersion(7);
  61684. var _options$helperVersio = options.helperVersion,
  61685. helperVersion = _options$helperVersio === void 0 ? "7.0.0-beta.0" : _options$helperVersio,
  61686. _options$whitelist = options.whitelist,
  61687. whitelist = _options$whitelist === void 0 ? false : _options$whitelist;
  61688. if (whitelist !== false && (!Array.isArray(whitelist) || whitelist.some(function (w) {
  61689. return typeof w !== "string";
  61690. }))) {
  61691. throw new Error(".whitelist must be undefined, false, or an array of strings");
  61692. }
  61693. var helperWhitelist = whitelist ? new Set(whitelist) : null;
  61694. return {
  61695. name: "external-helpers",
  61696. pre: function pre(file) {
  61697. file.set("helperGenerator", function (name) {
  61698. if (file.availableHelper && !file.availableHelper(name, helperVersion)) {
  61699. return;
  61700. }
  61701. if (helperWhitelist && !helperWhitelist.has(name)) return;
  61702. return memberExpression(identifier("babelHelpers"), identifier(name));
  61703. });
  61704. }
  61705. };
  61706. });
  61707. var _helperPluginUtils = /*@__PURE__*/getAugmentedNamespace(src);
  61708. var lib$q = createCommonjsModule(function (module, exports) {
  61709. Object.defineProperty(exports, "__esModule", {
  61710. value: true
  61711. });
  61712. exports["default"] = void 0;
  61713. var _default = (0, _helperPluginUtils.declare)(function (api) {
  61714. api.assertVersion(7);
  61715. return {
  61716. name: "syntax-async-generators",
  61717. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61718. parserOpts.plugins.push("asyncGenerators");
  61719. }
  61720. };
  61721. });
  61722. exports["default"] = _default;
  61723. }, "/$$rollup_base$$/packages/babel-standalone/node_modules/@babel/plugin-syntax-async-generators/lib");
  61724. var lib$p = createCommonjsModule(function (module, exports) {
  61725. Object.defineProperty(exports, "__esModule", {
  61726. value: true
  61727. });
  61728. exports["default"] = void 0;
  61729. var _default = (0, _helperPluginUtils.declare)(function (api) {
  61730. api.assertVersion(7);
  61731. return {
  61732. name: "syntax-class-properties",
  61733. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61734. parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods");
  61735. }
  61736. };
  61737. });
  61738. exports["default"] = _default;
  61739. }, "/$$rollup_base$$/packages/babel-standalone/node_modules/@babel/plugin-syntax-class-properties/lib");
  61740. var _syntaxClassStaticBlock = declare(function (api) {
  61741. api.assertVersion(7);
  61742. return {
  61743. name: "syntax-class-static-block",
  61744. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61745. parserOpts.plugins.push("classStaticBlock");
  61746. }
  61747. };
  61748. });
  61749. var syntaxDecimal = declare(function (api) {
  61750. api.assertVersion(7);
  61751. return {
  61752. name: "syntax-decimal",
  61753. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61754. parserOpts.plugins.push("decimal");
  61755. }
  61756. };
  61757. });
  61758. var syntaxDecorators = declare(function (api, options) {
  61759. api.assertVersion(7);
  61760. var _options$legacy = options.legacy,
  61761. legacy = _options$legacy === void 0 ? false : _options$legacy;
  61762. if (typeof legacy !== "boolean") {
  61763. throw new Error("'legacy' must be a boolean.");
  61764. }
  61765. var decoratorsBeforeExport = options.decoratorsBeforeExport;
  61766. if (decoratorsBeforeExport === undefined) {
  61767. if (!legacy) {
  61768. throw new Error("The '@babel/plugin-syntax-decorators' plugin requires a" + " 'decoratorsBeforeExport' option, whose value must be a boolean." + " If you want to use the legacy decorators semantics, you can set" + " the 'legacy: true' option.");
  61769. }
  61770. } else {
  61771. if (legacy) {
  61772. throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators.");
  61773. }
  61774. if (typeof decoratorsBeforeExport !== "boolean") {
  61775. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  61776. }
  61777. }
  61778. return {
  61779. name: "syntax-decorators",
  61780. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61781. parserOpts.plugins.push(legacy ? "decorators-legacy" : ["decorators", {
  61782. decoratorsBeforeExport: decoratorsBeforeExport
  61783. }]);
  61784. }
  61785. };
  61786. });
  61787. var syntaxDoExpressions = declare(function (api) {
  61788. api.assertVersion(7);
  61789. return {
  61790. name: "syntax-do-expressions",
  61791. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61792. parserOpts.plugins.push("doExpressions");
  61793. }
  61794. };
  61795. });
  61796. var syntaxExportDefaultFrom = declare(function (api) {
  61797. api.assertVersion(7);
  61798. return {
  61799. name: "syntax-export-default-from",
  61800. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61801. parserOpts.plugins.push("exportDefaultFrom");
  61802. }
  61803. };
  61804. });
  61805. var syntaxFlow = declare(function (api, options) {
  61806. api.assertVersion(7);
  61807. var all = options.all,
  61808. enums = options.enums;
  61809. if (typeof all !== "boolean" && typeof all !== "undefined") {
  61810. throw new Error(".all must be a boolean, or undefined");
  61811. }
  61812. if (typeof enums !== "boolean" && typeof enums !== "undefined") {
  61813. throw new Error(".enums must be a boolean, or undefined");
  61814. }
  61815. return {
  61816. name: "syntax-flow",
  61817. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61818. if (parserOpts.plugins.some(function (p) {
  61819. return (Array.isArray(p) ? p[0] : p) === "typescript";
  61820. })) {
  61821. return;
  61822. }
  61823. parserOpts.plugins.push(["flow", {
  61824. all: all,
  61825. enums: enums
  61826. }]);
  61827. }
  61828. };
  61829. });
  61830. var syntaxFunctionBind = declare(function (api) {
  61831. api.assertVersion(7);
  61832. return {
  61833. name: "syntax-function-bind",
  61834. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61835. parserOpts.plugins.push("functionBind");
  61836. }
  61837. };
  61838. });
  61839. var syntaxFunctionSent = declare(function (api) {
  61840. api.assertVersion(7);
  61841. return {
  61842. name: "syntax-function-sent",
  61843. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61844. parserOpts.plugins.push("functionSent");
  61845. }
  61846. };
  61847. });
  61848. var syntaxModuleBlocks = declare(function (api) {
  61849. api.assertVersion(7);
  61850. return {
  61851. name: "syntax-module-blocks",
  61852. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61853. parserOpts.plugins.push("moduleBlocks");
  61854. }
  61855. };
  61856. });
  61857. var lib$o = createCommonjsModule(function (module, exports) {
  61858. Object.defineProperty(exports, "__esModule", {
  61859. value: true
  61860. });
  61861. exports["default"] = void 0;
  61862. var _default = (0, _helperPluginUtils.declare)(function (api) {
  61863. api.assertVersion(7);
  61864. return {
  61865. name: "syntax-import-meta",
  61866. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61867. parserOpts.plugins.push("importMeta");
  61868. }
  61869. };
  61870. });
  61871. exports["default"] = _default;
  61872. }, "/$$rollup_base$$/packages/babel-standalone/node_modules/@babel/plugin-syntax-import-meta/lib");
  61873. var syntaxJsx = declare(function (api) {
  61874. api.assertVersion(7);
  61875. return {
  61876. name: "syntax-jsx",
  61877. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61878. if (parserOpts.plugins.some(function (p) {
  61879. return (Array.isArray(p) ? p[0] : p) === "typescript";
  61880. })) {
  61881. return;
  61882. }
  61883. parserOpts.plugins.push("jsx");
  61884. }
  61885. };
  61886. });
  61887. var syntaxImportAssertions = declare(function (api) {
  61888. api.assertVersion(7);
  61889. return {
  61890. name: "syntax-import-assertions",
  61891. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61892. parserOpts.plugins.push(["importAssertions"]);
  61893. }
  61894. };
  61895. });
  61896. var lib$n = createCommonjsModule(function (module, exports) {
  61897. Object.defineProperty(exports, "__esModule", {
  61898. value: true
  61899. });
  61900. exports["default"] = void 0;
  61901. var _default = (0, _helperPluginUtils.declare)(function (api) {
  61902. api.assertVersion(7);
  61903. return {
  61904. name: "syntax-object-rest-spread",
  61905. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61906. parserOpts.plugins.push("objectRestSpread");
  61907. }
  61908. };
  61909. });
  61910. exports["default"] = _default;
  61911. }, "/$$rollup_base$$/packages/babel-standalone/node_modules/@babel/plugin-syntax-object-rest-spread/lib");
  61912. var lib$m = createCommonjsModule(function (module, exports) {
  61913. Object.defineProperty(exports, "__esModule", {
  61914. value: true
  61915. });
  61916. exports["default"] = void 0;
  61917. var _default = (0, _helperPluginUtils.declare)(function (api) {
  61918. api.assertVersion(7);
  61919. return {
  61920. name: "syntax-optional-catch-binding",
  61921. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61922. parserOpts.plugins.push("optionalCatchBinding");
  61923. }
  61924. };
  61925. });
  61926. exports["default"] = _default;
  61927. }, "/$$rollup_base$$/packages/babel-standalone/node_modules/@babel/plugin-syntax-optional-catch-binding/lib");
  61928. var proposals = ["minimal", "smart", "fsharp"];
  61929. var syntaxPipelineOperator = declare(function (api, _ref) {
  61930. var proposal = _ref.proposal;
  61931. api.assertVersion(7);
  61932. if (typeof proposal !== "string" || !proposals.includes(proposal)) {
  61933. throw new Error("The pipeline operator plugin requires a 'proposal' option." + "'proposal' must be one of: " + proposals.join(", ") + ". More details: https://babeljs.io/docs/en/next/babel-plugin-proposal-pipeline-operator");
  61934. }
  61935. return {
  61936. name: "syntax-pipeline-operator",
  61937. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61938. parserOpts.plugins.push(["pipelineOperator", {
  61939. proposal: proposal
  61940. }]);
  61941. }
  61942. };
  61943. });
  61944. var syntaxRecordAndTuple = declare(function (api, options) {
  61945. api.assertVersion(7);
  61946. return {
  61947. name: "syntax-record-and-tuple",
  61948. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61949. opts.generatorOpts.recordAndTupleSyntaxType = options.syntaxType;
  61950. parserOpts.plugins.push(["recordAndTuple", {
  61951. syntaxType: options.syntaxType
  61952. }]);
  61953. }
  61954. };
  61955. });
  61956. var _syntaxTopLevelAwait = declare(function (api) {
  61957. api.assertVersion(7);
  61958. return {
  61959. name: "syntax-top-level-await",
  61960. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61961. parserOpts.plugins.push("topLevelAwait");
  61962. }
  61963. };
  61964. });
  61965. function removePlugin(plugins, name) {
  61966. var indices = [];
  61967. plugins.forEach(function (plugin, i) {
  61968. var n = Array.isArray(plugin) ? plugin[0] : plugin;
  61969. if (n === name) {
  61970. indices.unshift(i);
  61971. }
  61972. });
  61973. for (var _i = 0, _indices = indices; _i < _indices.length; _i++) {
  61974. var i = _indices[_i];
  61975. plugins.splice(i, 1);
  61976. }
  61977. }
  61978. var syntaxTypescript = declare(function (api, _ref) {
  61979. var isTSX = _ref.isTSX;
  61980. api.assertVersion(7);
  61981. return {
  61982. name: "syntax-typescript",
  61983. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  61984. var plugins = parserOpts.plugins;
  61985. removePlugin(plugins, "flow");
  61986. removePlugin(plugins, "jsx");
  61987. parserOpts.plugins.push("typescript", "classProperties");
  61988. {
  61989. parserOpts.plugins.push("objectRestSpread");
  61990. }
  61991. if (isTSX) {
  61992. parserOpts.plugins.push("jsx");
  61993. }
  61994. }
  61995. };
  61996. });
  61997. var buildAnonymousExpressionWrapper = template$2.expression("\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n");
  61998. var buildNamedExpressionWrapper = template$2.expression("\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n");
  61999. var buildDeclarationWrapper = template$2("\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n");
  62000. function classOrObjectMethod(path, callId) {
  62001. var node = path.node;
  62002. var body = node.body;
  62003. var container = functionExpression(null, [], blockStatement(body.body), true);
  62004. body.body = [returnStatement(callExpression(callExpression(callId, [container]), []))];
  62005. node.async = false;
  62006. node.generator = false;
  62007. path.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment();
  62008. }
  62009. function plainFunction(path, callId, noNewArrows) {
  62010. var node = path.node;
  62011. var isDeclaration = path.isFunctionDeclaration();
  62012. var functionId = node.id;
  62013. var wrapper = isDeclaration ? buildDeclarationWrapper : functionId ? buildNamedExpressionWrapper : buildAnonymousExpressionWrapper;
  62014. if (path.isArrowFunctionExpression()) {
  62015. path.arrowFunctionToExpression({
  62016. noNewArrows: noNewArrows
  62017. });
  62018. }
  62019. node.id = null;
  62020. if (isDeclaration) {
  62021. node.type = "FunctionExpression";
  62022. }
  62023. var built = callExpression(callId, [node]);
  62024. var container = wrapper({
  62025. NAME: functionId || null,
  62026. REF: path.scope.generateUidIdentifier(functionId ? functionId.name : "ref"),
  62027. FUNCTION: built,
  62028. PARAMS: node.params.reduce(function (acc, param) {
  62029. acc.done = acc.done || isAssignmentPattern(param) || isRestElement(param);
  62030. if (!acc.done) {
  62031. acc.params.push(path.scope.generateUidIdentifier("x"));
  62032. }
  62033. return acc;
  62034. }, {
  62035. params: [],
  62036. done: false
  62037. }).params
  62038. });
  62039. if (isDeclaration) {
  62040. path.replaceWith(container[0]);
  62041. path.insertAfter(container[1]);
  62042. } else {
  62043. var retFunction = container.callee.body.body[1].argument;
  62044. if (!functionId) {
  62045. nameFunction({
  62046. node: retFunction,
  62047. parent: path.parent,
  62048. scope: path.scope
  62049. });
  62050. }
  62051. if (!retFunction || retFunction.id || node.params.length) {
  62052. path.replaceWith(container);
  62053. } else {
  62054. path.replaceWith(built);
  62055. }
  62056. }
  62057. }
  62058. function wrapFunction(path, callId, noNewArrows) {
  62059. if (noNewArrows === void 0) {
  62060. noNewArrows = true;
  62061. }
  62062. if (path.isMethod()) {
  62063. classOrObjectMethod(path, callId);
  62064. } else {
  62065. plainFunction(path, callId, noNewArrows);
  62066. }
  62067. }
  62068. var PURE_ANNOTATION = "#__PURE__";
  62069. var isPureAnnotated = function isPureAnnotated(_ref) {
  62070. var leadingComments = _ref.leadingComments;
  62071. return !!leadingComments && leadingComments.some(function (comment) {
  62072. return /[@#]__PURE__/.test(comment.value);
  62073. });
  62074. };
  62075. function annotateAsPure(pathOrNode) {
  62076. var node = pathOrNode["node"] || pathOrNode;
  62077. if (isPureAnnotated(node)) {
  62078. return;
  62079. }
  62080. addComment$1(node, "leading", PURE_ANNOTATION);
  62081. }
  62082. var awaitVisitor$1 = {
  62083. Function: function Function(path) {
  62084. path.skip();
  62085. },
  62086. AwaitExpression: function AwaitExpression(path, _ref) {
  62087. var wrapAwait = _ref.wrapAwait;
  62088. var argument = path.get("argument");
  62089. if (path.parentPath.isYieldExpression()) {
  62090. path.replaceWith(argument.node);
  62091. return;
  62092. }
  62093. path.replaceWith(yieldExpression(wrapAwait ? callExpression(cloneNode(wrapAwait), [argument.node]) : argument.node));
  62094. }
  62095. };
  62096. function remapAsyncToGenerator (path, helpers, noNewArrows) {
  62097. path.traverse(awaitVisitor$1, {
  62098. wrapAwait: helpers.wrapAwait
  62099. });
  62100. var isIIFE = checkIsIIFE(path);
  62101. path.node.async = false;
  62102. path.node.generator = true;
  62103. wrapFunction(path, cloneNode(helpers.wrapAsync), noNewArrows);
  62104. var isProperty = path.isObjectMethod() || path.isClassMethod() || path.parentPath.isObjectProperty() || path.parentPath.isClassProperty();
  62105. if (!isProperty && !isIIFE && path.isExpression()) {
  62106. annotateAsPure(path);
  62107. }
  62108. function checkIsIIFE(path) {
  62109. if (path.parentPath.isCallExpression({
  62110. callee: path.node
  62111. })) {
  62112. return true;
  62113. }
  62114. var parentPath = path.parentPath;
  62115. if (parentPath.isMemberExpression() && isIdentifier(parentPath.node.property, {
  62116. name: "bind"
  62117. })) {
  62118. var bindCall = parentPath.parentPath;
  62119. return bindCall.isCallExpression() && bindCall.node.arguments.length === 1 && isThisExpression(bindCall.node.arguments[0]) && bindCall.parentPath.isCallExpression({
  62120. callee: bindCall.node
  62121. });
  62122. }
  62123. return false;
  62124. }
  62125. }
  62126. var lib$l = createCommonjsModule(function (module, exports) {
  62127. Object.defineProperty(exports, "__esModule", {
  62128. value: true
  62129. });
  62130. exports["default"] = void 0;
  62131. var _default = (0, _helperPluginUtils.declare)(function (api) {
  62132. api.assertVersion(7);
  62133. return {
  62134. name: "syntax-async-generators",
  62135. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  62136. parserOpts.plugins.push("asyncGenerators");
  62137. }
  62138. };
  62139. });
  62140. exports["default"] = _default;
  62141. }, "/$$rollup_base$$/packages/babel-plugin-proposal-async-generator-functions/node_modules/@babel/plugin-syntax-async-generators/lib");
  62142. var buildForAwait = template$2("\n async function wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = await ITERATOR_KEY.next(),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = await STEP_KEY.value,\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n");
  62143. function rewriteForAwait (path, _ref) {
  62144. var getAsyncIterator = _ref.getAsyncIterator;
  62145. var node = path.node,
  62146. scope = path.scope,
  62147. parent = path.parent;
  62148. var stepKey = scope.generateUidIdentifier("step");
  62149. var stepValue = scope.generateUidIdentifier("value");
  62150. var left = node.left;
  62151. var declar;
  62152. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  62153. declar = expressionStatement(assignmentExpression("=", left, stepValue));
  62154. } else if (isVariableDeclaration(left)) {
  62155. declar = variableDeclaration(left.kind, [variableDeclarator(left.declarations[0].id, stepValue)]);
  62156. }
  62157. var template = buildForAwait({
  62158. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  62159. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  62160. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  62161. ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
  62162. GET_ITERATOR: getAsyncIterator,
  62163. OBJECT: node.right,
  62164. STEP_VALUE: cloneNode(stepValue),
  62165. STEP_KEY: stepKey
  62166. });
  62167. template = template.body.body;
  62168. var isLabeledParent = isLabeledStatement(parent);
  62169. var tryBody = template[3].block.body;
  62170. var loop = tryBody[0];
  62171. if (isLabeledParent) {
  62172. tryBody[0] = labeledStatement(parent.label, loop);
  62173. }
  62174. return {
  62175. replaceParent: isLabeledParent,
  62176. node: template,
  62177. declar: declar,
  62178. loop: loop
  62179. };
  62180. }
  62181. var _proposalAsyncGeneratorFunctions = declare(function (api) {
  62182. api.assertVersion(7);
  62183. var yieldStarVisitor = {
  62184. Function: function Function(path) {
  62185. path.skip();
  62186. },
  62187. YieldExpression: function YieldExpression(_ref, state) {
  62188. var node = _ref.node;
  62189. if (!node.delegate) return;
  62190. var callee = state.addHelper("asyncGeneratorDelegate");
  62191. node.argument = callExpression(callee, [callExpression(state.addHelper("asyncIterator"), [node.argument]), state.addHelper("awaitAsyncGenerator")]);
  62192. }
  62193. };
  62194. var forAwaitVisitor = {
  62195. Function: function Function(path) {
  62196. path.skip();
  62197. },
  62198. ForOfStatement: function ForOfStatement(path, _ref2) {
  62199. var file = _ref2.file;
  62200. var node = path.node;
  62201. if (!node["await"]) return;
  62202. var build = rewriteForAwait(path, {
  62203. getAsyncIterator: file.addHelper("asyncIterator")
  62204. });
  62205. var declar = build.declar,
  62206. loop = build.loop;
  62207. var block = loop.body;
  62208. path.ensureBlock();
  62209. if (declar) {
  62210. block.body.push(declar);
  62211. }
  62212. block.body = block.body.concat(node.body.body);
  62213. inherits(loop, node);
  62214. inherits(loop.body, node.body);
  62215. if (build.replaceParent) {
  62216. path.parentPath.replaceWithMultiple(build.node);
  62217. } else {
  62218. path.replaceWithMultiple(build.node);
  62219. }
  62220. }
  62221. };
  62222. var visitor = {
  62223. Function: function Function(path, state) {
  62224. if (!path.node.async) return;
  62225. path.traverse(forAwaitVisitor, state);
  62226. if (!path.node.generator) return;
  62227. path.traverse(yieldStarVisitor, state);
  62228. remapAsyncToGenerator(path, {
  62229. wrapAsync: state.addHelper("wrapAsyncGenerator"),
  62230. wrapAwait: state.addHelper("awaitAsyncGenerator")
  62231. });
  62232. }
  62233. };
  62234. return {
  62235. name: "proposal-async-generator-functions",
  62236. inherits: lib$l["default"],
  62237. visitor: {
  62238. Program: function Program(path, state) {
  62239. path.traverse(visitor, state);
  62240. }
  62241. }
  62242. };
  62243. });
  62244. function assertFieldTransformed(path) {
  62245. if (path.node.declare) {
  62246. throw path.buildCodeFrameError("TypeScript 'declare' fields must first be transformed by " + "@babel/plugin-transform-typescript.\n" + "If you have already enabled that plugin (or '@babel/preset-typescript'), make sure " + "that it runs before any plugin related to additional class features:\n" + " - @babel/plugin-proposal-class-properties\n" + " - @babel/plugin-proposal-private-methods\n" + " - @babel/plugin-proposal-decorators");
  62247. }
  62248. }
  62249. var _templateObject$j, _templateObject2$9, _templateObject3$8, _templateObject4$4, _templateObject5$2, _templateObject6$2, _templateObject7$1, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
  62250. function buildPrivateNamesMap(props) {
  62251. var privateNamesMap = new Map();
  62252. for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done;) {
  62253. var prop = _step.value;
  62254. var isPrivate = prop.isPrivate();
  62255. var isMethod = !prop.isProperty();
  62256. var isInstance = !prop.node["static"];
  62257. if (isPrivate) {
  62258. var name = prop.node.key.id.name;
  62259. var update = privateNamesMap.has(name) ? privateNamesMap.get(name) : {
  62260. id: prop.scope.generateUidIdentifier(name),
  62261. "static": !isInstance,
  62262. method: isMethod
  62263. };
  62264. if (prop.node.kind === "get") {
  62265. update.getId = prop.scope.generateUidIdentifier("get_" + name);
  62266. } else if (prop.node.kind === "set") {
  62267. update.setId = prop.scope.generateUidIdentifier("set_" + name);
  62268. } else if (prop.node.kind === "method") {
  62269. update.methodId = prop.scope.generateUidIdentifier(name);
  62270. }
  62271. privateNamesMap.set(name, update);
  62272. }
  62273. }
  62274. return privateNamesMap;
  62275. }
  62276. function buildPrivateNamesNodes(privateNamesMap, privateFieldsAsProperties, state) {
  62277. var initNodes = [];
  62278. for (var _iterator2 = _createForOfIteratorHelperLoose(privateNamesMap), _step2; !(_step2 = _iterator2()).done;) {
  62279. var _step2$value = _slicedToArray$2(_step2.value, 2),
  62280. name = _step2$value[0],
  62281. value = _step2$value[1];
  62282. var isStatic = value["static"],
  62283. isMethod = value.method,
  62284. getId = value.getId,
  62285. setId = value.setId;
  62286. var isAccessor = getId || setId;
  62287. var id = cloneNode(value.id);
  62288. var init = void 0;
  62289. if (privateFieldsAsProperties) {
  62290. init = callExpression(state.addHelper("classPrivateFieldLooseKey"), [stringLiteral(name)]);
  62291. } else if (!isStatic) {
  62292. init = newExpression(identifier(!isMethod || isAccessor ? "WeakMap" : "WeakSet"), []);
  62293. }
  62294. if (init) {
  62295. annotateAsPure(init);
  62296. initNodes.push(template$2.statement.ast(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["var ", " = ", ""])), id, init));
  62297. }
  62298. }
  62299. return initNodes;
  62300. }
  62301. function privateNameVisitorFactory(visitor) {
  62302. var privateNameVisitor = Object.assign({}, visitor, {
  62303. Class: function Class(path) {
  62304. var privateNamesMap = this.privateNamesMap;
  62305. var body = path.get("body.body");
  62306. var visiblePrivateNames = new Map(privateNamesMap);
  62307. var redeclared = [];
  62308. for (var _iterator3 = _createForOfIteratorHelperLoose(body), _step3; !(_step3 = _iterator3()).done;) {
  62309. var prop = _step3.value;
  62310. if (!prop.isPrivate()) continue;
  62311. var name = prop.node.key.id.name;
  62312. visiblePrivateNames["delete"](name);
  62313. redeclared.push(name);
  62314. }
  62315. if (!redeclared.length) {
  62316. return;
  62317. }
  62318. path.get("body").traverse(nestedVisitor, Object.assign({}, this, {
  62319. redeclared: redeclared
  62320. }));
  62321. path.traverse(privateNameVisitor, Object.assign({}, this, {
  62322. privateNamesMap: visiblePrivateNames
  62323. }));
  62324. path.skipKey("body");
  62325. }
  62326. });
  62327. var nestedVisitor = traverse.visitors.merge([Object.assign({}, visitor), environmentVisitor]);
  62328. return privateNameVisitor;
  62329. }
  62330. var privateNameVisitor = privateNameVisitorFactory({
  62331. PrivateName: function PrivateName(path, _ref) {
  62332. var noDocumentAll = _ref.noDocumentAll;
  62333. var privateNamesMap = this.privateNamesMap,
  62334. redeclared = this.redeclared;
  62335. var node = path.node,
  62336. parentPath = path.parentPath;
  62337. if (!parentPath.isMemberExpression({
  62338. property: node
  62339. }) && !parentPath.isOptionalMemberExpression({
  62340. property: node
  62341. })) {
  62342. return;
  62343. }
  62344. var name = node.id.name;
  62345. if (!privateNamesMap.has(name)) return;
  62346. if (redeclared && redeclared.includes(name)) return;
  62347. this.handle(parentPath, noDocumentAll);
  62348. }
  62349. });
  62350. var privateInVisitor = privateNameVisitorFactory({
  62351. BinaryExpression: function BinaryExpression(path) {
  62352. var _path$node = path.node,
  62353. operator = _path$node.operator,
  62354. left = _path$node.left,
  62355. right = _path$node.right;
  62356. if (operator !== "in") return;
  62357. if (!path.get("left").isPrivateName()) return;
  62358. var privateFieldsAsProperties = this.privateFieldsAsProperties,
  62359. privateNamesMap = this.privateNamesMap,
  62360. redeclared = this.redeclared;
  62361. var name = left.id.name;
  62362. if (!privateNamesMap.has(name)) return;
  62363. if (redeclared && redeclared.includes(name)) return;
  62364. if (privateFieldsAsProperties) {
  62365. var _privateNamesMap$get = privateNamesMap.get(name),
  62366. _id = _privateNamesMap$get.id;
  62367. path.replaceWith(template$2.expression.ast(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n Object.prototype.hasOwnProperty.call(", ", ", ")\n "])), right, cloneNode(_id)));
  62368. return;
  62369. }
  62370. var _privateNamesMap$get2 = privateNamesMap.get(name),
  62371. id = _privateNamesMap$get2.id,
  62372. isStatic = _privateNamesMap$get2["static"];
  62373. if (isStatic) {
  62374. path.replaceWith(template$2.expression.ast(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["", " === ", ""])), right, this.classRef));
  62375. return;
  62376. }
  62377. path.replaceWith(template$2.expression.ast(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["", ".has(", ")"])), cloneNode(id), right));
  62378. }
  62379. });
  62380. var privateNameHandlerSpec = {
  62381. memoise: function memoise(member, count) {
  62382. var scope = member.scope;
  62383. var object = member.node.object;
  62384. var memo = scope.maybeGenerateMemoised(object);
  62385. if (!memo) {
  62386. return;
  62387. }
  62388. this.memoiser.set(object, memo, count);
  62389. },
  62390. receiver: function receiver(member) {
  62391. var object = member.node.object;
  62392. if (this.memoiser.has(object)) {
  62393. return cloneNode(this.memoiser.get(object));
  62394. }
  62395. return cloneNode(object);
  62396. },
  62397. get: function get(member) {
  62398. var classRef = this.classRef,
  62399. privateNamesMap = this.privateNamesMap,
  62400. file = this.file;
  62401. var name = member.node.property.id.name;
  62402. var _privateNamesMap$get3 = privateNamesMap.get(name),
  62403. id = _privateNamesMap$get3.id,
  62404. isStatic = _privateNamesMap$get3["static"],
  62405. isMethod = _privateNamesMap$get3.method,
  62406. methodId = _privateNamesMap$get3.methodId,
  62407. getId = _privateNamesMap$get3.getId,
  62408. setId = _privateNamesMap$get3.setId;
  62409. var isAccessor = getId || setId;
  62410. if (isStatic) {
  62411. var helperName = isMethod && !isAccessor ? "classStaticPrivateMethodGet" : "classStaticPrivateFieldSpecGet";
  62412. return callExpression(file.addHelper(helperName), [this.receiver(member), cloneNode(classRef), cloneNode(id)]);
  62413. }
  62414. if (isMethod) {
  62415. if (isAccessor) {
  62416. if (!getId && setId) {
  62417. if (file.availableHelper("writeOnlyError")) {
  62418. return sequenceExpression([this.receiver(member), callExpression(file.addHelper("writeOnlyError"), [stringLiteral("#" + name)])]);
  62419. }
  62420. console.warn("@babel/helpers is outdated, update it to silence this warning.");
  62421. }
  62422. return callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), cloneNode(id)]);
  62423. }
  62424. return callExpression(file.addHelper("classPrivateMethodGet"), [this.receiver(member), cloneNode(id), cloneNode(methodId)]);
  62425. }
  62426. return callExpression(file.addHelper("classPrivateFieldGet"), [this.receiver(member), cloneNode(id)]);
  62427. },
  62428. boundGet: function boundGet(member) {
  62429. this.memoise(member, 1);
  62430. return callExpression(memberExpression(this.get(member), identifier("bind")), [this.receiver(member)]);
  62431. },
  62432. set: function set(member, value) {
  62433. var classRef = this.classRef,
  62434. privateNamesMap = this.privateNamesMap,
  62435. file = this.file;
  62436. var name = member.node.property.id.name;
  62437. var _privateNamesMap$get4 = privateNamesMap.get(name),
  62438. id = _privateNamesMap$get4.id,
  62439. isStatic = _privateNamesMap$get4["static"],
  62440. isMethod = _privateNamesMap$get4.method,
  62441. setId = _privateNamesMap$get4.setId,
  62442. getId = _privateNamesMap$get4.getId;
  62443. var isAccessor = getId || setId;
  62444. if (isStatic) {
  62445. var helperName = isMethod && !isAccessor ? "classStaticPrivateMethodSet" : "classStaticPrivateFieldSpecSet";
  62446. return callExpression(file.addHelper(helperName), [this.receiver(member), cloneNode(classRef), cloneNode(id), value]);
  62447. }
  62448. if (isMethod) {
  62449. if (setId) {
  62450. return callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), cloneNode(id), value]);
  62451. }
  62452. return sequenceExpression([this.receiver(member), value, callExpression(file.addHelper("readOnlyError"), [stringLiteral("#" + name)])]);
  62453. }
  62454. return callExpression(file.addHelper("classPrivateFieldSet"), [this.receiver(member), cloneNode(id), value]);
  62455. },
  62456. destructureSet: function destructureSet(member) {
  62457. var classRef = this.classRef,
  62458. privateNamesMap = this.privateNamesMap,
  62459. file = this.file;
  62460. var name = member.node.property.id.name;
  62461. var _privateNamesMap$get5 = privateNamesMap.get(name),
  62462. id = _privateNamesMap$get5.id,
  62463. isStatic = _privateNamesMap$get5["static"];
  62464. if (isStatic) {
  62465. try {
  62466. var helper = file.addHelper("classStaticPrivateFieldDestructureSet");
  62467. } catch (_unused) {
  62468. throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \n" + "please update @babel/helpers to the latest version.");
  62469. }
  62470. return memberExpression(callExpression(helper, [this.receiver(member), cloneNode(classRef), cloneNode(id)]), identifier("value"));
  62471. }
  62472. return memberExpression(callExpression(file.addHelper("classPrivateFieldDestructureSet"), [this.receiver(member), cloneNode(id)]), identifier("value"));
  62473. },
  62474. call: function call(member, args) {
  62475. this.memoise(member, 1);
  62476. return optimiseCallExpression(this.get(member), this.receiver(member), args, false);
  62477. },
  62478. optionalCall: function optionalCall(member, args) {
  62479. this.memoise(member, 1);
  62480. return optimiseCallExpression(this.get(member), this.receiver(member), args, true);
  62481. }
  62482. };
  62483. var privateNameHandlerLoose = {
  62484. get: function get(member) {
  62485. var privateNamesMap = this.privateNamesMap,
  62486. file = this.file;
  62487. var object = member.node.object;
  62488. var name = member.node.property.id.name;
  62489. return template$2.expression(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["BASE(REF, PROP)[PROP]"])))({
  62490. BASE: file.addHelper("classPrivateFieldLooseBase"),
  62491. REF: cloneNode(object),
  62492. PROP: cloneNode(privateNamesMap.get(name).id)
  62493. });
  62494. },
  62495. boundGet: function boundGet(member) {
  62496. return callExpression(memberExpression(this.get(member), identifier("bind")), [cloneNode(member.node.object)]);
  62497. },
  62498. simpleSet: function simpleSet(member) {
  62499. return this.get(member);
  62500. },
  62501. destructureSet: function destructureSet(member) {
  62502. return this.get(member);
  62503. },
  62504. call: function call(member, args) {
  62505. return callExpression(this.get(member), args);
  62506. },
  62507. optionalCall: function optionalCall(member, args) {
  62508. return optionalCallExpression(this.get(member), args, true);
  62509. }
  62510. };
  62511. function transformPrivateNamesUsage(ref, path, privateNamesMap, _ref2, state) {
  62512. var privateFieldsAsProperties = _ref2.privateFieldsAsProperties,
  62513. noDocumentAll = _ref2.noDocumentAll;
  62514. if (!privateNamesMap.size) return;
  62515. var body = path.get("body");
  62516. var handler = privateFieldsAsProperties ? privateNameHandlerLoose : privateNameHandlerSpec;
  62517. memberExpressionToFunctions(body, privateNameVisitor, Object.assign({
  62518. privateNamesMap: privateNamesMap,
  62519. classRef: ref,
  62520. file: state
  62521. }, handler, {
  62522. noDocumentAll: noDocumentAll
  62523. }));
  62524. body.traverse(privateInVisitor, {
  62525. privateNamesMap: privateNamesMap,
  62526. classRef: ref,
  62527. file: state,
  62528. privateFieldsAsProperties: privateFieldsAsProperties
  62529. });
  62530. }
  62531. function buildPrivateFieldInitLoose(ref, prop, privateNamesMap) {
  62532. var _privateNamesMap$get6 = privateNamesMap.get(prop.node.key.id.name),
  62533. id = _privateNamesMap$get6.id;
  62534. var value = prop.node.value || prop.scope.buildUndefinedNode();
  62535. return template$2.statement.ast(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ", "\n });\n "])), ref, cloneNode(id), value);
  62536. }
  62537. function buildPrivateInstanceFieldInitSpec(ref, prop, privateNamesMap) {
  62538. var _privateNamesMap$get7 = privateNamesMap.get(prop.node.key.id.name),
  62539. id = _privateNamesMap$get7.id;
  62540. var value = prop.node.value || prop.scope.buildUndefinedNode();
  62541. return template$2.statement.ast(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteralLoose(["", ".set(", ", {\n // configurable is always false for private elements\n // enumerable is always false for private elements\n writable: true,\n value: ", ",\n })"])), cloneNode(id), ref, value);
  62542. }
  62543. function buildPrivateStaticFieldInitSpec(prop, privateNamesMap) {
  62544. var privateName = privateNamesMap.get(prop.node.key.id.name);
  62545. var id = privateName.id,
  62546. getId = privateName.getId,
  62547. setId = privateName.setId,
  62548. initAdded = privateName.initAdded;
  62549. var isAccessor = getId || setId;
  62550. if (!prop.isProperty() && (initAdded || !isAccessor)) return;
  62551. if (isAccessor) {
  62552. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62553. initAdded: true
  62554. }));
  62555. return template$2.statement.ast(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n var ", " = {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ", ",\n set: ", "\n }\n "])), cloneNode(id), getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  62556. }
  62557. var value = prop.node.value || prop.scope.buildUndefinedNode();
  62558. return template$2.statement.ast(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n var ", " = {\n // configurable is false by default\n // enumerable is false by default\n writable: true,\n value: ", "\n };\n "])), cloneNode(id), value);
  62559. }
  62560. function buildPrivateMethodInitLoose(ref, prop, privateNamesMap) {
  62561. var privateName = privateNamesMap.get(prop.node.key.id.name);
  62562. var methodId = privateName.methodId,
  62563. id = privateName.id,
  62564. getId = privateName.getId,
  62565. setId = privateName.setId,
  62566. initAdded = privateName.initAdded;
  62567. if (initAdded) return;
  62568. if (methodId) {
  62569. return template$2.statement.ast(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ", "\n });\n "])), ref, id, methodId.name);
  62570. }
  62571. var isAccessor = getId || setId;
  62572. if (isAccessor) {
  62573. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62574. initAdded: true
  62575. }));
  62576. return template$2.statement.ast(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ", ",\n set: ", "\n });\n "])), ref, id, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  62577. }
  62578. }
  62579. function buildPrivateInstanceMethodInitSpec(ref, prop, privateNamesMap) {
  62580. var privateName = privateNamesMap.get(prop.node.key.id.name);
  62581. var id = privateName.id,
  62582. getId = privateName.getId,
  62583. setId = privateName.setId,
  62584. initAdded = privateName.initAdded;
  62585. if (initAdded) return;
  62586. var isAccessor = getId || setId;
  62587. if (isAccessor) {
  62588. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62589. initAdded: true
  62590. }));
  62591. return template$2.statement.ast(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n ", ".set(", ", {\n get: ", ",\n set: ", "\n });\n "])), id, ref, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  62592. }
  62593. return template$2.statement.ast(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["", ".add(", ")"])), id, ref);
  62594. }
  62595. function buildPublicFieldInitLoose(ref, prop) {
  62596. var _prop$node = prop.node,
  62597. key = _prop$node.key,
  62598. computed = _prop$node.computed;
  62599. var value = prop.node.value || prop.scope.buildUndefinedNode();
  62600. return expressionStatement(assignmentExpression("=", memberExpression(ref, key, computed || isLiteral(key)), value));
  62601. }
  62602. function buildPublicFieldInitSpec(ref, prop, state) {
  62603. var _prop$node2 = prop.node,
  62604. key = _prop$node2.key,
  62605. computed = _prop$node2.computed;
  62606. var value = prop.node.value || prop.scope.buildUndefinedNode();
  62607. return expressionStatement(callExpression(state.addHelper("defineProperty"), [ref, computed || isLiteral(key) ? key : stringLiteral(key.name), value]));
  62608. }
  62609. function buildPrivateStaticMethodInitLoose(ref, prop, state, privateNamesMap) {
  62610. var privateName = privateNamesMap.get(prop.node.key.id.name);
  62611. var id = privateName.id,
  62612. methodId = privateName.methodId,
  62613. getId = privateName.getId,
  62614. setId = privateName.setId,
  62615. initAdded = privateName.initAdded;
  62616. if (initAdded) return;
  62617. var isAccessor = getId || setId;
  62618. if (isAccessor) {
  62619. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62620. initAdded: true
  62621. }));
  62622. return template$2.statement.ast(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n get: ", ",\n set: ", "\n })\n "])), ref, id, getId ? getId.name : prop.scope.buildUndefinedNode(), setId ? setId.name : prop.scope.buildUndefinedNode());
  62623. }
  62624. return template$2.statement.ast(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n Object.defineProperty(", ", ", ", {\n // configurable is false by default\n // enumerable is false by default\n // writable is false by default\n value: ", "\n });\n "])), ref, id, methodId.name);
  62625. }
  62626. function buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties) {
  62627. if (privateFieldsAsProperties === void 0) {
  62628. privateFieldsAsProperties = false;
  62629. }
  62630. var privateName = privateNamesMap.get(prop.node.key.id.name);
  62631. var id = privateName.id,
  62632. methodId = privateName.methodId,
  62633. getId = privateName.getId,
  62634. setId = privateName.setId,
  62635. getterDeclared = privateName.getterDeclared,
  62636. setterDeclared = privateName.setterDeclared,
  62637. isStatic = privateName["static"];
  62638. var _prop$node3 = prop.node,
  62639. params = _prop$node3.params,
  62640. body = _prop$node3.body,
  62641. generator = _prop$node3.generator,
  62642. async = _prop$node3.async;
  62643. var isGetter = getId && !getterDeclared && params.length === 0;
  62644. var isSetter = setId && !setterDeclared && params.length > 0;
  62645. var declId = methodId;
  62646. if (isGetter) {
  62647. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62648. getterDeclared: true
  62649. }));
  62650. declId = getId;
  62651. } else if (isSetter) {
  62652. privateNamesMap.set(prop.node.key.id.name, Object.assign({}, privateName, {
  62653. setterDeclared: true
  62654. }));
  62655. declId = setId;
  62656. } else if (isStatic && !privateFieldsAsProperties) {
  62657. declId = id;
  62658. }
  62659. return functionDeclaration(cloneNode(declId), params, body, generator, async);
  62660. }
  62661. var thisContextVisitor = traverse.visitors.merge([{
  62662. ThisExpression: function ThisExpression(path, state) {
  62663. state.needsClassRef = true;
  62664. path.replaceWith(cloneNode(state.classRef));
  62665. }
  62666. }, environmentVisitor]);
  62667. var innerReferencesVisitor = {
  62668. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  62669. if (path.scope.bindingIdentifierEquals(path.node.name, state.innerBinding)) {
  62670. state.needsClassRef = true;
  62671. path.node.name = state.classRef.name;
  62672. }
  62673. }
  62674. };
  62675. function replaceThisContext(path, ref, getSuperRef, file, isStaticBlock, constantSuper, innerBindingRef) {
  62676. var _state$classRef;
  62677. var state = {
  62678. classRef: ref,
  62679. needsClassRef: false,
  62680. innerBinding: innerBindingRef
  62681. };
  62682. var replacer = new ReplaceSupers({
  62683. methodPath: path,
  62684. constantSuper: constantSuper,
  62685. file: file,
  62686. refToPreserve: ref,
  62687. getSuperRef: getSuperRef,
  62688. getObjectRef: function getObjectRef() {
  62689. state.needsClassRef = true;
  62690. return isStaticBlock || path.node["static"] ? ref : memberExpression(ref, identifier("prototype"));
  62691. }
  62692. });
  62693. replacer.replace();
  62694. if (isStaticBlock || path.isProperty()) {
  62695. path.traverse(thisContextVisitor, state);
  62696. }
  62697. if ((_state$classRef = state.classRef) != null && _state$classRef.name && state.classRef.name !== (innerBindingRef == null ? void 0 : innerBindingRef.name)) {
  62698. path.traverse(innerReferencesVisitor, state);
  62699. }
  62700. return state.needsClassRef;
  62701. }
  62702. function buildFieldsInitNodes(ref, superRef, props, privateNamesMap, state, setPublicClassFields, privateFieldsAsProperties, constantSuper, innerBindingRef) {
  62703. var needsClassRef = false;
  62704. var injectSuperRef;
  62705. var staticNodes = [];
  62706. var instanceNodes = [];
  62707. var pureStaticNodes = [];
  62708. var getSuperRef = isIdentifier(superRef) ? function () {
  62709. return superRef;
  62710. } : function () {
  62711. var _injectSuperRef;
  62712. (_injectSuperRef = injectSuperRef) != null ? _injectSuperRef : injectSuperRef = props[0].scope.generateUidIdentifierBasedOnNode(superRef);
  62713. return injectSuperRef;
  62714. };
  62715. for (var _iterator4 = _createForOfIteratorHelperLoose(props), _step4; !(_step4 = _iterator4()).done;) {
  62716. var prop = _step4.value;
  62717. assertFieldTransformed(prop);
  62718. var isStatic = prop.node["static"];
  62719. var isInstance = !isStatic;
  62720. var isPrivate = prop.isPrivate();
  62721. var isPublic = !isPrivate;
  62722. var isField = prop.isProperty();
  62723. var isMethod = !isField;
  62724. var isStaticBlock = prop.isStaticBlock == null ? void 0 : prop.isStaticBlock();
  62725. if (isStatic || isMethod && isPrivate || isStaticBlock) {
  62726. var replaced = replaceThisContext(prop, ref, getSuperRef, state, isStaticBlock, constantSuper, innerBindingRef);
  62727. needsClassRef = needsClassRef || replaced;
  62728. }
  62729. switch (true) {
  62730. case isStaticBlock:
  62731. staticNodes.push(template$2.statement.ast(_templateObject16 || (_templateObject16 = _taggedTemplateLiteralLoose(["(() => ", ")()"])), blockStatement(prop.node.body)));
  62732. break;
  62733. case isStatic && isPrivate && isField && privateFieldsAsProperties:
  62734. needsClassRef = true;
  62735. staticNodes.push(buildPrivateFieldInitLoose(cloneNode(ref), prop, privateNamesMap));
  62736. break;
  62737. case isStatic && isPrivate && isField && !privateFieldsAsProperties:
  62738. needsClassRef = true;
  62739. staticNodes.push(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  62740. break;
  62741. case isStatic && isPublic && isField && setPublicClassFields:
  62742. needsClassRef = true;
  62743. staticNodes.push(buildPublicFieldInitLoose(cloneNode(ref), prop));
  62744. break;
  62745. case isStatic && isPublic && isField && !setPublicClassFields:
  62746. needsClassRef = true;
  62747. staticNodes.push(buildPublicFieldInitSpec(cloneNode(ref), prop, state));
  62748. break;
  62749. case isInstance && isPrivate && isField && privateFieldsAsProperties:
  62750. instanceNodes.push(buildPrivateFieldInitLoose(thisExpression(), prop, privateNamesMap));
  62751. break;
  62752. case isInstance && isPrivate && isField && !privateFieldsAsProperties:
  62753. instanceNodes.push(buildPrivateInstanceFieldInitSpec(thisExpression(), prop, privateNamesMap));
  62754. break;
  62755. case isInstance && isPrivate && isMethod && privateFieldsAsProperties:
  62756. instanceNodes.unshift(buildPrivateMethodInitLoose(thisExpression(), prop, privateNamesMap));
  62757. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  62758. break;
  62759. case isInstance && isPrivate && isMethod && !privateFieldsAsProperties:
  62760. instanceNodes.unshift(buildPrivateInstanceMethodInitSpec(thisExpression(), prop, privateNamesMap));
  62761. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  62762. break;
  62763. case isStatic && isPrivate && isMethod && !privateFieldsAsProperties:
  62764. needsClassRef = true;
  62765. staticNodes.unshift(buildPrivateStaticFieldInitSpec(prop, privateNamesMap));
  62766. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  62767. break;
  62768. case isStatic && isPrivate && isMethod && privateFieldsAsProperties:
  62769. needsClassRef = true;
  62770. staticNodes.unshift(buildPrivateStaticMethodInitLoose(cloneNode(ref), prop, state, privateNamesMap));
  62771. pureStaticNodes.push(buildPrivateMethodDeclaration(prop, privateNamesMap, privateFieldsAsProperties));
  62772. break;
  62773. case isInstance && isPublic && isField && setPublicClassFields:
  62774. instanceNodes.push(buildPublicFieldInitLoose(thisExpression(), prop));
  62775. break;
  62776. case isInstance && isPublic && isField && !setPublicClassFields:
  62777. instanceNodes.push(buildPublicFieldInitSpec(thisExpression(), prop, state));
  62778. break;
  62779. default:
  62780. throw new Error("Unreachable.");
  62781. }
  62782. }
  62783. return {
  62784. staticNodes: staticNodes.filter(Boolean),
  62785. instanceNodes: instanceNodes.filter(Boolean),
  62786. pureStaticNodes: pureStaticNodes.filter(Boolean),
  62787. wrapClass: function wrapClass(path) {
  62788. for (var _iterator5 = _createForOfIteratorHelperLoose(props), _step5; !(_step5 = _iterator5()).done;) {
  62789. var prop = _step5.value;
  62790. prop.remove();
  62791. }
  62792. if (injectSuperRef) {
  62793. path.scope.push({
  62794. id: cloneNode(injectSuperRef)
  62795. });
  62796. path.set("superClass", assignmentExpression("=", injectSuperRef, path.node.superClass));
  62797. }
  62798. if (!needsClassRef) return path;
  62799. if (path.isClassExpression()) {
  62800. path.scope.push({
  62801. id: ref
  62802. });
  62803. path.replaceWith(assignmentExpression("=", cloneNode(ref), path.node));
  62804. } else if (!path.node.id) {
  62805. path.node.id = ref;
  62806. }
  62807. return path;
  62808. }
  62809. };
  62810. }
  62811. var _templateObject$i, _templateObject2$8, _templateObject3$7, _templateObject4$3;
  62812. function hasOwnDecorators(node) {
  62813. return !!(node.decorators && node.decorators.length);
  62814. }
  62815. function hasDecorators(node) {
  62816. return hasOwnDecorators(node) || node.body.body.some(hasOwnDecorators);
  62817. }
  62818. function prop(key, value) {
  62819. if (!value) return null;
  62820. return objectProperty(identifier(key), value);
  62821. }
  62822. function method(key, body) {
  62823. return objectMethod("method", identifier(key), [], blockStatement(body));
  62824. }
  62825. function takeDecorators(node) {
  62826. var result;
  62827. if (node.decorators && node.decorators.length > 0) {
  62828. result = arrayExpression(node.decorators.map(function (decorator) {
  62829. return decorator.expression;
  62830. }));
  62831. }
  62832. node.decorators = undefined;
  62833. return result;
  62834. }
  62835. function getKey(node) {
  62836. if (node.computed) {
  62837. return node.key;
  62838. } else if (isIdentifier(node.key)) {
  62839. return stringLiteral(node.key.name);
  62840. } else {
  62841. return stringLiteral(String(node.key.value));
  62842. }
  62843. }
  62844. function extractElementDescriptor(classRef, superRef, path) {
  62845. var node = path.node,
  62846. scope = path.scope;
  62847. var isMethod = path.isClassMethod();
  62848. if (path.isPrivate()) {
  62849. throw path.buildCodeFrameError("Private " + (isMethod ? "methods" : "fields") + " in decorated classes are not supported yet.");
  62850. }
  62851. new ReplaceSupers({
  62852. methodPath: path,
  62853. objectRef: classRef,
  62854. superRef: superRef,
  62855. file: this,
  62856. refToPreserve: classRef
  62857. }).replace();
  62858. var properties = [prop("kind", stringLiteral(isMethod ? node.kind : "field")), prop("decorators", takeDecorators(node)), prop("static", node["static"] && booleanLiteral(true)), prop("key", getKey(node))].filter(Boolean);
  62859. if (isMethod) {
  62860. var id = node.computed ? null : node.key;
  62861. toExpression(node);
  62862. properties.push(prop("value", nameFunction({
  62863. node: node,
  62864. id: id,
  62865. scope: scope
  62866. }) || node));
  62867. } else if (node.value) {
  62868. properties.push(method("value", template$2.statements.ast(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["return ", ""])), node.value)));
  62869. } else {
  62870. properties.push(prop("value", scope.buildUndefinedNode()));
  62871. }
  62872. path.remove();
  62873. return objectExpression(properties);
  62874. }
  62875. function addDecorateHelper(file) {
  62876. try {
  62877. return file.addHelper("decorate");
  62878. } catch (err) {
  62879. if (err.code === "BABEL_HELPER_UNKNOWN") {
  62880. err.message += "\n '@babel/plugin-transform-decorators' in non-legacy mode" + " requires '@babel/core' version ^7.0.2 and you appear to be using" + " an older version.";
  62881. }
  62882. throw err;
  62883. }
  62884. }
  62885. function buildDecoratedClass(ref, path, elements, file) {
  62886. var node = path.node,
  62887. scope = path.scope;
  62888. var initializeId = scope.generateUidIdentifier("initialize");
  62889. var isDeclaration = node.id && path.isDeclaration();
  62890. var isStrict = path.isInStrictMode();
  62891. var superClass = node.superClass;
  62892. node.type = "ClassDeclaration";
  62893. if (!node.id) node.id = cloneNode(ref);
  62894. var superId;
  62895. if (superClass) {
  62896. superId = scope.generateUidIdentifierBasedOnNode(node.superClass, "super");
  62897. node.superClass = superId;
  62898. }
  62899. var classDecorators = takeDecorators(node);
  62900. var definitions = arrayExpression(elements.filter(function (element) {
  62901. return !element.node["abstract"];
  62902. }).map(extractElementDescriptor.bind(file, node.id, superId)));
  62903. var wrapperCall = template$2.expression.ast(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n ", "(\n ", ",\n function (", ", ", ") {\n ", "\n return { F: ", ", d: ", " };\n },\n ", "\n )\n "])), addDecorateHelper(file), classDecorators || nullLiteral(), initializeId, superClass ? cloneNode(superId) : null, node, cloneNode(node.id), definitions, superClass);
  62904. if (!isStrict) {
  62905. wrapperCall.arguments[1].body.directives.push(directive(directiveLiteral("use strict")));
  62906. }
  62907. var replacement = wrapperCall;
  62908. var classPathDesc = "arguments.1.body.body.0";
  62909. if (isDeclaration) {
  62910. replacement = template$2.statement.ast(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["let ", " = ", ""])), ref, wrapperCall);
  62911. classPathDesc = "declarations.0.init." + classPathDesc;
  62912. }
  62913. return {
  62914. instanceNodes: [template$2.statement.ast(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["", "(this)"])), cloneNode(initializeId))],
  62915. wrapClass: function wrapClass(path) {
  62916. path.replaceWith(replacement);
  62917. return path.get(classPathDesc);
  62918. }
  62919. };
  62920. }
  62921. var _templateObject$h;
  62922. var findBareSupers = traverse.visitors.merge([{
  62923. Super: function Super(path) {
  62924. var node = path.node,
  62925. parentPath = path.parentPath;
  62926. if (parentPath.isCallExpression({
  62927. callee: node
  62928. })) {
  62929. this.push(parentPath);
  62930. }
  62931. }
  62932. }, environmentVisitor]);
  62933. var referenceVisitor = {
  62934. "TSTypeAnnotation|TypeAnnotation": function TSTypeAnnotationTypeAnnotation(path) {
  62935. path.skip();
  62936. },
  62937. ReferencedIdentifier: function ReferencedIdentifier(path) {
  62938. if (this.scope.hasOwnBinding(path.node.name)) {
  62939. this.scope.rename(path.node.name);
  62940. path.skip();
  62941. }
  62942. }
  62943. };
  62944. function handleClassTDZ(path, state) {
  62945. if (state.classBinding && state.classBinding === path.scope.getBinding(path.node.name)) {
  62946. var classNameTDZError = state.file.addHelper("classNameTDZError");
  62947. var throwNode = callExpression(classNameTDZError, [stringLiteral(path.node.name)]);
  62948. path.replaceWith(sequenceExpression([throwNode, path.node]));
  62949. path.skip();
  62950. }
  62951. }
  62952. var classFieldDefinitionEvaluationTDZVisitor = {
  62953. ReferencedIdentifier: handleClassTDZ
  62954. };
  62955. function injectInitialization(path, constructor, nodes, renamer) {
  62956. if (!nodes.length) return;
  62957. var isDerived = !!path.node.superClass;
  62958. if (!constructor) {
  62959. var newConstructor = classMethod("constructor", identifier("constructor"), [], blockStatement([]));
  62960. if (isDerived) {
  62961. newConstructor.params = [restElement(identifier("args"))];
  62962. newConstructor.body.body.push(template$2.statement.ast(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["super(...args)"]))));
  62963. }
  62964. var _path$get$unshiftCont = path.get("body").unshiftContainer("body", newConstructor);
  62965. var _path$get$unshiftCont2 = _slicedToArray$2(_path$get$unshiftCont, 1);
  62966. constructor = _path$get$unshiftCont2[0];
  62967. }
  62968. if (renamer) {
  62969. renamer(referenceVisitor, {
  62970. scope: constructor.scope
  62971. });
  62972. }
  62973. if (isDerived) {
  62974. var bareSupers = [];
  62975. constructor.traverse(findBareSupers, bareSupers);
  62976. var isFirst = true;
  62977. for (var _i = 0, _bareSupers = bareSupers; _i < _bareSupers.length; _i++) {
  62978. var bareSuper = _bareSupers[_i];
  62979. if (isFirst) {
  62980. bareSuper.insertAfter(nodes);
  62981. isFirst = false;
  62982. } else {
  62983. bareSuper.insertAfter(nodes.map(function (n) {
  62984. return cloneNode(n);
  62985. }));
  62986. }
  62987. }
  62988. } else {
  62989. constructor.get("body").unshiftContainer("body", nodes);
  62990. }
  62991. }
  62992. function extractComputedKeys(ref, path, computedPaths, file) {
  62993. var declarations = [];
  62994. var state = {
  62995. classBinding: path.node.id && path.scope.getBinding(path.node.id.name),
  62996. file: file
  62997. };
  62998. for (var _iterator = _createForOfIteratorHelperLoose(computedPaths), _step; !(_step = _iterator()).done;) {
  62999. var computedPath = _step.value;
  63000. var computedKey = computedPath.get("key");
  63001. if (computedKey.isReferencedIdentifier()) {
  63002. handleClassTDZ(computedKey, state);
  63003. } else {
  63004. computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor, state);
  63005. }
  63006. var computedNode = computedPath.node;
  63007. if (!computedKey.isConstantExpression()) {
  63008. var ident = path.scope.generateUidIdentifierBasedOnNode(computedNode.key);
  63009. path.scope.push({
  63010. id: ident,
  63011. kind: "let"
  63012. });
  63013. declarations.push(expressionStatement(assignmentExpression("=", cloneNode(ident), computedNode.key)));
  63014. computedNode.key = cloneNode(ident);
  63015. }
  63016. }
  63017. return declarations;
  63018. }
  63019. var FEATURES$1 = Object.freeze({
  63020. fields: 1 << 1,
  63021. privateMethods: 1 << 2,
  63022. decorators: 1 << 3,
  63023. privateIn: 1 << 4,
  63024. staticBlocks: 1 << 5
  63025. });
  63026. var featuresSameLoose = new Map([[FEATURES$1.fields, "@babel/plugin-proposal-class-properties"], [FEATURES$1.privateMethods, "@babel/plugin-proposal-private-methods"], [FEATURES$1.privateIn, "@babel/plugin-proposal-private-property-in-object"]]);
  63027. var featuresKey$1 = "@babel/plugin-class-features/featuresKey";
  63028. var looseKey = "@babel/plugin-class-features/looseKey";
  63029. var looseLowPriorityKey = "@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing";
  63030. function enableFeature$1(file, feature, loose) {
  63031. if (!hasFeature$1(file, feature) || canIgnoreLoose(file, feature)) {
  63032. file.set(featuresKey$1, file.get(featuresKey$1) | feature);
  63033. if (loose === "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error") {
  63034. setLoose(file, feature, true);
  63035. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);
  63036. } else if (loose === "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error") {
  63037. setLoose(file, feature, false);
  63038. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) | feature);
  63039. } else {
  63040. setLoose(file, feature, loose);
  63041. }
  63042. }
  63043. var resolvedLoose;
  63044. var higherPriorityPluginName;
  63045. for (var _iterator = _createForOfIteratorHelperLoose(featuresSameLoose), _step; !(_step = _iterator()).done;) {
  63046. var _step$value = _slicedToArray$2(_step.value, 2),
  63047. _mask = _step$value[0],
  63048. _name = _step$value[1];
  63049. if (!hasFeature$1(file, _mask)) continue;
  63050. var _loose = isLoose(file, _mask);
  63051. if (canIgnoreLoose(file, _mask)) {
  63052. continue;
  63053. } else if (resolvedLoose === !_loose) {
  63054. throw new Error("'loose' mode configuration must be the same for @babel/plugin-proposal-class-properties, " + "@babel/plugin-proposal-private-methods and " + "@babel/plugin-proposal-private-property-in-object (when they are enabled).");
  63055. } else {
  63056. resolvedLoose = _loose;
  63057. higherPriorityPluginName = _name;
  63058. }
  63059. }
  63060. if (resolvedLoose !== undefined) {
  63061. for (var _iterator2 = _createForOfIteratorHelperLoose(featuresSameLoose), _step2; !(_step2 = _iterator2()).done;) {
  63062. var _step2$value = _slicedToArray$2(_step2.value, 2),
  63063. mask = _step2$value[0],
  63064. name = _step2$value[1];
  63065. if (hasFeature$1(file, mask) && isLoose(file, mask) !== resolvedLoose) {
  63066. setLoose(file, mask, resolvedLoose);
  63067. console.warn("Though the \"loose\" option was set to \"" + !resolvedLoose + "\" in your @babel/preset-env " + ("config, it will not be used for " + name + " since the \"loose\" mode option was set to ") + ("\"" + resolvedLoose + "\" for " + higherPriorityPluginName + ".\nThe \"loose\" option must be the ") + "same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods " + "and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can " + "silence this warning by explicitly adding\n" + ("\t[\"" + name + "\", { \"loose\": " + resolvedLoose + " }]\n") + "to the \"plugins\" section of your Babel config.");
  63068. }
  63069. }
  63070. }
  63071. }
  63072. function hasFeature$1(file, feature) {
  63073. return !!(file.get(featuresKey$1) & feature);
  63074. }
  63075. function isLoose(file, feature) {
  63076. return !!(file.get(looseKey) & feature);
  63077. }
  63078. function setLoose(file, feature, loose) {
  63079. if (loose) file.set(looseKey, file.get(looseKey) | feature);else file.set(looseKey, file.get(looseKey) & ~feature);
  63080. file.set(looseLowPriorityKey, file.get(looseLowPriorityKey) & ~feature);
  63081. }
  63082. function canIgnoreLoose(file, feature) {
  63083. return !!(file.get(looseLowPriorityKey) & feature);
  63084. }
  63085. function verifyUsedFeatures(path, file) {
  63086. if (hasOwnDecorators(path.node)) {
  63087. if (!hasFeature$1(file, FEATURES$1.decorators)) {
  63088. throw path.buildCodeFrameError("Decorators are not enabled." + "\nIf you are using " + '["@babel/plugin-proposal-decorators", { "legacy": true }], ' + 'make sure it comes *before* "@babel/plugin-proposal-class-properties" ' + "and enable loose mode, like so:\n" + '\t["@babel/plugin-proposal-decorators", { "legacy": true }]\n' + '\t["@babel/plugin-proposal-class-properties", { "loose": true }]');
  63089. }
  63090. if (path.isPrivate()) {
  63091. throw path.buildCodeFrameError("Private " + (path.isClassMethod() ? "methods" : "fields") + " in decorated classes are not supported yet.");
  63092. }
  63093. }
  63094. if (path.isPrivateMethod != null && path.isPrivateMethod()) {
  63095. if (!hasFeature$1(file, FEATURES$1.privateMethods)) {
  63096. throw path.buildCodeFrameError("Class private methods are not enabled.");
  63097. }
  63098. }
  63099. if (path.isPrivateName() && path.parentPath.isBinaryExpression({
  63100. operator: "in",
  63101. left: path.node
  63102. })) {
  63103. if (!hasFeature$1(file, FEATURES$1.privateIn)) {
  63104. throw path.buildCodeFrameError("Private property in checks are not enabled.");
  63105. }
  63106. }
  63107. if (path.isProperty()) {
  63108. if (!hasFeature$1(file, FEATURES$1.fields)) {
  63109. throw path.buildCodeFrameError("Class fields are not enabled.");
  63110. }
  63111. }
  63112. if (path.isStaticBlock != null && path.isStaticBlock()) {
  63113. if (!hasFeature$1(file, FEATURES$1.staticBlocks)) {
  63114. throw path.buildCodeFrameError("Static class blocks are not enabled. " + "Please add `@babel/plugin-proposal-class-static-block` to your configuration.");
  63115. }
  63116. }
  63117. }
  63118. var version$2 = "7.14.6".split(".").reduce(function (v, x) {
  63119. return v * 1e5 + +x;
  63120. }, 0);
  63121. var versionKey$1 = "@babel/plugin-class-features/version";
  63122. function createClassFeaturePlugin(_ref) {
  63123. var name = _ref.name,
  63124. feature = _ref.feature,
  63125. loose = _ref.loose,
  63126. manipulateOptions = _ref.manipulateOptions,
  63127. _ref$api = _ref.api,
  63128. api = _ref$api === void 0 ? {
  63129. assumption: function assumption() {}
  63130. } : _ref$api;
  63131. var setPublicClassFields = api.assumption("setPublicClassFields");
  63132. var privateFieldsAsProperties = api.assumption("privateFieldsAsProperties");
  63133. var constantSuper = api.assumption("constantSuper");
  63134. var noDocumentAll = api.assumption("noDocumentAll");
  63135. if (loose === true) {
  63136. var explicit = [];
  63137. if (setPublicClassFields !== undefined) {
  63138. explicit.push("\"setPublicClassFields\"");
  63139. }
  63140. if (privateFieldsAsProperties !== undefined) {
  63141. explicit.push("\"privateFieldsAsProperties\"");
  63142. }
  63143. if (explicit.length !== 0) {
  63144. console.warn("[" + name + "]: You are using the \"loose: true\" option and you are" + (" explicitly setting a value for the " + explicit.join(" and ")) + (" assumption" + (explicit.length > 1 ? "s" : "") + ". The \"loose\" option") + " can cause incompatibilities with the other class features" + " plugins, so it's recommended that you replace it with the" + " following top-level option:\n" + "\t\"assumptions\": {\n" + "\t\t\"setPublicClassFields\": true,\n" + "\t\t\"privateFieldsAsProperties\": true\n" + "\t}");
  63145. }
  63146. }
  63147. return {
  63148. name: name,
  63149. manipulateOptions: manipulateOptions,
  63150. pre: function pre() {
  63151. enableFeature$1(this.file, feature, loose);
  63152. if (!this.file.get(versionKey$1) || this.file.get(versionKey$1) < version$2) {
  63153. this.file.set(versionKey$1, version$2);
  63154. }
  63155. },
  63156. visitor: {
  63157. Class: function Class(path, state) {
  63158. if (this.file.get(versionKey$1) !== version$2) return;
  63159. verifyUsedFeatures(path, this.file);
  63160. var loose = isLoose(this.file, feature);
  63161. var constructor;
  63162. var isDecorated = hasOwnDecorators(path.node);
  63163. var props = [];
  63164. var elements = [];
  63165. var computedPaths = [];
  63166. var privateNames = new Set();
  63167. var body = path.get("body");
  63168. for (var _iterator = _createForOfIteratorHelperLoose(body.get("body")), _step; !(_step = _iterator()).done;) {
  63169. var _path = _step.value;
  63170. verifyUsedFeatures(_path, this.file);
  63171. if (_path.node.computed) {
  63172. computedPaths.push(_path);
  63173. }
  63174. if (_path.isPrivate()) {
  63175. var _name = _path.node.key.id.name;
  63176. var getName = "get " + _name;
  63177. var setName = "set " + _name;
  63178. if (_path.node.kind === "get") {
  63179. if (privateNames.has(getName) || privateNames.has(_name) && !privateNames.has(setName)) {
  63180. throw _path.buildCodeFrameError("Duplicate private field");
  63181. }
  63182. privateNames.add(getName).add(_name);
  63183. } else if (_path.node.kind === "set") {
  63184. if (privateNames.has(setName) || privateNames.has(_name) && !privateNames.has(getName)) {
  63185. throw _path.buildCodeFrameError("Duplicate private field");
  63186. }
  63187. privateNames.add(setName).add(_name);
  63188. } else {
  63189. if (privateNames.has(_name) && !privateNames.has(getName) && !privateNames.has(setName) || privateNames.has(_name) && (privateNames.has(getName) || privateNames.has(setName))) {
  63190. throw _path.buildCodeFrameError("Duplicate private field");
  63191. }
  63192. privateNames.add(_name);
  63193. }
  63194. }
  63195. if (_path.isClassMethod({
  63196. kind: "constructor"
  63197. })) {
  63198. constructor = _path;
  63199. } else {
  63200. elements.push(_path);
  63201. if (_path.isProperty() || _path.isPrivate() || _path.isStaticBlock != null && _path.isStaticBlock()) {
  63202. props.push(_path);
  63203. }
  63204. }
  63205. if (!isDecorated) isDecorated = hasOwnDecorators(_path.node);
  63206. }
  63207. if (!props.length && !isDecorated) return;
  63208. var innerBinding = path.node.id;
  63209. var ref;
  63210. if (!innerBinding || path.isClassExpression()) {
  63211. nameFunction(path);
  63212. ref = path.scope.generateUidIdentifier("class");
  63213. } else {
  63214. ref = cloneNode(path.node.id);
  63215. }
  63216. var privateNamesMap = buildPrivateNamesMap(props);
  63217. var privateNamesNodes = buildPrivateNamesNodes(privateNamesMap, privateFieldsAsProperties != null ? privateFieldsAsProperties : loose, state);
  63218. transformPrivateNamesUsage(ref, path, privateNamesMap, {
  63219. privateFieldsAsProperties: privateFieldsAsProperties != null ? privateFieldsAsProperties : loose,
  63220. noDocumentAll: noDocumentAll
  63221. }, state);
  63222. var keysNodes, staticNodes, pureStaticNodes, instanceNodes, wrapClass;
  63223. if (isDecorated) {
  63224. staticNodes = pureStaticNodes = keysNodes = [];
  63225. var _buildDecoratedClass = buildDecoratedClass(ref, path, elements, this.file);
  63226. instanceNodes = _buildDecoratedClass.instanceNodes;
  63227. wrapClass = _buildDecoratedClass.wrapClass;
  63228. } else {
  63229. keysNodes = extractComputedKeys(ref, path, computedPaths, this.file);
  63230. var _buildFieldsInitNodes = buildFieldsInitNodes(ref, path.node.superClass, props, privateNamesMap, state, setPublicClassFields != null ? setPublicClassFields : loose, privateFieldsAsProperties != null ? privateFieldsAsProperties : loose, constantSuper != null ? constantSuper : loose, innerBinding);
  63231. staticNodes = _buildFieldsInitNodes.staticNodes;
  63232. pureStaticNodes = _buildFieldsInitNodes.pureStaticNodes;
  63233. instanceNodes = _buildFieldsInitNodes.instanceNodes;
  63234. wrapClass = _buildFieldsInitNodes.wrapClass;
  63235. }
  63236. if (instanceNodes.length > 0) {
  63237. injectInitialization(path, constructor, instanceNodes, function (referenceVisitor, state) {
  63238. if (isDecorated) return;
  63239. for (var _iterator2 = _createForOfIteratorHelperLoose(props), _step2; !(_step2 = _iterator2()).done;) {
  63240. var prop = _step2.value;
  63241. if (prop.node["static"]) continue;
  63242. prop.traverse(referenceVisitor, state);
  63243. }
  63244. });
  63245. }
  63246. path = wrapClass(path);
  63247. path.insertBefore([].concat(_toConsumableArray(privateNamesNodes), _toConsumableArray(keysNodes)));
  63248. if (staticNodes.length > 0) {
  63249. path.insertAfter(staticNodes);
  63250. }
  63251. if (pureStaticNodes.length > 0) {
  63252. path.find(function (parent) {
  63253. return parent.isStatement() || parent.isDeclaration();
  63254. }).insertAfter(pureStaticNodes);
  63255. }
  63256. },
  63257. PrivateName: function PrivateName(path) {
  63258. if (this.file.get(versionKey$1) !== version$2 || path.parentPath.isPrivate({
  63259. key: path.node
  63260. })) {
  63261. return;
  63262. }
  63263. throw path.buildCodeFrameError("Unknown PrivateName \"" + path + "\"");
  63264. },
  63265. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  63266. if (this.file.get(versionKey$1) !== version$2) return;
  63267. var decl = path.get("declaration");
  63268. if (decl.isClassDeclaration() && hasDecorators(decl.node)) {
  63269. if (decl.node.id) {
  63270. splitExportDeclaration(path);
  63271. } else {
  63272. decl.node.type = "ClassExpression";
  63273. }
  63274. }
  63275. }
  63276. }
  63277. };
  63278. }
  63279. var _proposalClassProperties = declare(function (api, options) {
  63280. api.assertVersion(7);
  63281. return createClassFeaturePlugin({
  63282. name: "proposal-class-properties",
  63283. api: api,
  63284. feature: FEATURES$1.fields,
  63285. loose: options.loose,
  63286. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63287. parserOpts.plugins.push("classProperties", "classPrivateProperties");
  63288. }
  63289. });
  63290. });
  63291. var _templateObject$g;
  63292. function generateUid(scope, denyList) {
  63293. var name = "";
  63294. var uid;
  63295. var i = 1;
  63296. do {
  63297. uid = scope._generateUid(name, i);
  63298. i++;
  63299. } while (denyList.has(uid));
  63300. return uid;
  63301. }
  63302. var _proposalClassStaticBlock = declare(function (_ref) {
  63303. var t = _ref.types,
  63304. template = _ref.template,
  63305. assertVersion = _ref.assertVersion;
  63306. assertVersion("^7.12.0");
  63307. return {
  63308. name: "proposal-class-static-block",
  63309. inherits: _syntaxClassStaticBlock,
  63310. pre: function pre() {
  63311. enableFeature$1(this.file, FEATURES$1.staticBlocks, false);
  63312. },
  63313. visitor: {
  63314. ClassBody: function ClassBody(classBody) {
  63315. var scope = classBody.scope;
  63316. var privateNames = new Set();
  63317. var body = classBody.get("body");
  63318. for (var _iterator = _createForOfIteratorHelperLoose(body), _step; !(_step = _iterator()).done;) {
  63319. var path = _step.value;
  63320. if (path.isPrivate()) {
  63321. privateNames.add(path.get("key.id").node.name);
  63322. }
  63323. }
  63324. for (var _iterator2 = _createForOfIteratorHelperLoose(body), _step2; !(_step2 = _iterator2()).done;) {
  63325. var _path = _step2.value;
  63326. if (!_path.isStaticBlock()) continue;
  63327. var staticBlockPrivateId = generateUid(scope, privateNames);
  63328. privateNames.add(staticBlockPrivateId);
  63329. var staticBlockRef = t.privateName(t.identifier(staticBlockPrivateId));
  63330. _path.replaceWith(t.classPrivateProperty(staticBlockRef, template.expression.ast(_templateObject$g || (_templateObject$g = _taggedTemplateLiteralLoose(["(() => { ", " })()"])), _path.node.body), [], true));
  63331. }
  63332. }
  63333. }
  63334. };
  63335. });
  63336. var buildClassDecorator = template$2("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n");
  63337. var buildClassPrototype = template$2("\n CLASS_REF.prototype;\n");
  63338. var buildGetDescriptor = template$2("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n");
  63339. var buildGetObjectInitializer = template$2("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n");
  63340. var WARNING_CALLS = new WeakSet();
  63341. function applyEnsureOrdering(path) {
  63342. var decorators = (path.isClass() ? [path].concat(path.get("body.body")) : path.get("properties")).reduce(function (acc, prop) {
  63343. return acc.concat(prop.node.decorators || []);
  63344. }, []);
  63345. var identDecorators = decorators.filter(function (decorator) {
  63346. return !isIdentifier(decorator.expression);
  63347. });
  63348. if (identDecorators.length === 0) return;
  63349. return sequenceExpression(identDecorators.map(function (decorator) {
  63350. var expression = decorator.expression;
  63351. var id = decorator.expression = path.scope.generateDeclaredUidIdentifier("dec");
  63352. return assignmentExpression("=", id, expression);
  63353. }).concat([path.node]));
  63354. }
  63355. function applyClassDecorators(classPath) {
  63356. if (!hasClassDecorators(classPath.node)) return;
  63357. var decorators = classPath.node.decorators || [];
  63358. classPath.node.decorators = null;
  63359. var name = classPath.scope.generateDeclaredUidIdentifier("class");
  63360. return decorators.map(function (dec) {
  63361. return dec.expression;
  63362. }).reverse().reduce(function (acc, decorator) {
  63363. return buildClassDecorator({
  63364. CLASS_REF: cloneNode(name),
  63365. DECORATOR: cloneNode(decorator),
  63366. INNER: acc
  63367. }).expression;
  63368. }, classPath.node);
  63369. }
  63370. function hasClassDecorators(classNode) {
  63371. return !!(classNode.decorators && classNode.decorators.length);
  63372. }
  63373. function applyMethodDecorators(path, state) {
  63374. if (!hasMethodDecorators(path.node.body.body)) return;
  63375. return applyTargetDecorators(path, state, path.node.body.body);
  63376. }
  63377. function hasMethodDecorators(body) {
  63378. return body.some(function (node) {
  63379. var _node$decorators;
  63380. return (_node$decorators = node.decorators) == null ? void 0 : _node$decorators.length;
  63381. });
  63382. }
  63383. function applyObjectDecorators(path, state) {
  63384. if (!hasMethodDecorators(path.node.properties)) return;
  63385. return applyTargetDecorators(path, state, path.node.properties);
  63386. }
  63387. function applyTargetDecorators(path, state, decoratedProps) {
  63388. var name = path.scope.generateDeclaredUidIdentifier(path.isClass() ? "class" : "obj");
  63389. var exprs = decoratedProps.reduce(function (acc, node) {
  63390. var decorators = node.decorators || [];
  63391. node.decorators = null;
  63392. if (decorators.length === 0) return acc;
  63393. if (node.computed) {
  63394. throw path.buildCodeFrameError("Computed method/property decorators are not yet supported.");
  63395. }
  63396. var property = isLiteral(node.key) ? node.key : stringLiteral(node.key.name);
  63397. var target = path.isClass() && !node["static"] ? buildClassPrototype({
  63398. CLASS_REF: name
  63399. }).expression : name;
  63400. if (isClassProperty(node, {
  63401. "static": false
  63402. })) {
  63403. var descriptor = path.scope.generateDeclaredUidIdentifier("descriptor");
  63404. var initializer = node.value ? functionExpression(null, [], blockStatement([returnStatement(node.value)])) : nullLiteral();
  63405. node.value = callExpression(state.addHelper("initializerWarningHelper"), [descriptor, thisExpression()]);
  63406. WARNING_CALLS.add(node.value);
  63407. acc = acc.concat([assignmentExpression("=", cloneNode(descriptor), callExpression(state.addHelper("applyDecoratedDescriptor"), [cloneNode(target), cloneNode(property), arrayExpression(decorators.map(function (dec) {
  63408. return cloneNode(dec.expression);
  63409. })), objectExpression([objectProperty(identifier("configurable"), booleanLiteral(true)), objectProperty(identifier("enumerable"), booleanLiteral(true)), objectProperty(identifier("writable"), booleanLiteral(true)), objectProperty(identifier("initializer"), initializer)])]))]);
  63410. } else {
  63411. acc = acc.concat(callExpression(state.addHelper("applyDecoratedDescriptor"), [cloneNode(target), cloneNode(property), arrayExpression(decorators.map(function (dec) {
  63412. return cloneNode(dec.expression);
  63413. })), isObjectProperty(node) || isClassProperty(node, {
  63414. "static": true
  63415. }) ? buildGetObjectInitializer({
  63416. TEMP: path.scope.generateDeclaredUidIdentifier("init"),
  63417. TARGET: cloneNode(target),
  63418. PROPERTY: cloneNode(property)
  63419. }).expression : buildGetDescriptor({
  63420. TARGET: cloneNode(target),
  63421. PROPERTY: cloneNode(property)
  63422. }).expression, cloneNode(target)]));
  63423. }
  63424. return acc;
  63425. }, []);
  63426. return sequenceExpression([assignmentExpression("=", cloneNode(name), path.node), sequenceExpression(exprs), cloneNode(name)]);
  63427. }
  63428. function decoratedClassToExpression(_ref) {
  63429. var node = _ref.node,
  63430. scope = _ref.scope;
  63431. if (!hasClassDecorators(node) && !hasMethodDecorators(node.body.body)) {
  63432. return;
  63433. }
  63434. var ref = node.id ? cloneNode(node.id) : scope.generateUidIdentifier("class");
  63435. return variableDeclaration("let", [variableDeclarator(ref, toExpression(node))]);
  63436. }
  63437. var legacyVisitor = {
  63438. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  63439. var decl = path.get("declaration");
  63440. if (!decl.isClassDeclaration()) return;
  63441. var replacement = decoratedClassToExpression(decl);
  63442. if (replacement) {
  63443. var _path$replaceWithMult = path.replaceWithMultiple([replacement, exportNamedDeclaration(null, [exportSpecifier(cloneNode(replacement.declarations[0].id), identifier("default"))])]),
  63444. _path$replaceWithMult2 = _slicedToArray$2(_path$replaceWithMult, 1),
  63445. varDeclPath = _path$replaceWithMult2[0];
  63446. if (!decl.node.id) {
  63447. path.scope.registerDeclaration(varDeclPath);
  63448. }
  63449. }
  63450. },
  63451. ClassDeclaration: function ClassDeclaration(path) {
  63452. var replacement = decoratedClassToExpression(path);
  63453. if (replacement) {
  63454. path.replaceWith(replacement);
  63455. }
  63456. },
  63457. ClassExpression: function ClassExpression(path, state) {
  63458. var decoratedClass = applyEnsureOrdering(path) || applyClassDecorators(path) || applyMethodDecorators(path, state);
  63459. if (decoratedClass) path.replaceWith(decoratedClass);
  63460. },
  63461. ObjectExpression: function ObjectExpression(path, state) {
  63462. var decoratedObject = applyEnsureOrdering(path) || applyObjectDecorators(path, state);
  63463. if (decoratedObject) path.replaceWith(decoratedObject);
  63464. },
  63465. AssignmentExpression: function AssignmentExpression(path, state) {
  63466. if (!WARNING_CALLS.has(path.node.right)) return;
  63467. path.replaceWith(callExpression(state.addHelper("initializerDefineProperty"), [cloneNode(path.get("left.object").node), stringLiteral(path.get("left.property").node.name || path.get("left.property").node.value), cloneNode(path.get("right.arguments")[0].node), cloneNode(path.get("right.arguments")[1].node)]));
  63468. },
  63469. CallExpression: function CallExpression(path, state) {
  63470. if (path.node.arguments.length !== 3) return;
  63471. if (!WARNING_CALLS.has(path.node.arguments[2])) return;
  63472. if (path.node.callee.name !== state.addHelper("defineProperty").name) {
  63473. return;
  63474. }
  63475. path.replaceWith(callExpression(state.addHelper("initializerDefineProperty"), [cloneNode(path.get("arguments")[0].node), cloneNode(path.get("arguments")[1].node), cloneNode(path.get("arguments.2.arguments")[0].node), cloneNode(path.get("arguments.2.arguments")[1].node)]));
  63476. }
  63477. };
  63478. var proposalDecorators = declare(function (api, options) {
  63479. api.assertVersion(7);
  63480. var _options$legacy = options.legacy,
  63481. legacy = _options$legacy === void 0 ? false : _options$legacy;
  63482. if (typeof legacy !== "boolean") {
  63483. throw new Error("'legacy' must be a boolean.");
  63484. }
  63485. var decoratorsBeforeExport = options.decoratorsBeforeExport;
  63486. if (decoratorsBeforeExport === undefined) {
  63487. if (!legacy) {
  63488. throw new Error("The decorators plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you want to use the legacy" + " decorators semantics, you can set the 'legacy: true' option.");
  63489. }
  63490. } else {
  63491. if (legacy) {
  63492. throw new Error("'decoratorsBeforeExport' can't be used with legacy decorators.");
  63493. }
  63494. if (typeof decoratorsBeforeExport !== "boolean") {
  63495. throw new Error("'decoratorsBeforeExport' must be a boolean.");
  63496. }
  63497. }
  63498. if (legacy) {
  63499. return {
  63500. name: "proposal-decorators",
  63501. inherits: syntaxDecorators,
  63502. manipulateOptions: function manipulateOptions(_ref) {
  63503. var generatorOpts = _ref.generatorOpts;
  63504. generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
  63505. },
  63506. visitor: legacyVisitor
  63507. };
  63508. }
  63509. return createClassFeaturePlugin({
  63510. name: "proposal-decorators",
  63511. api: api,
  63512. feature: FEATURES$1.decorators,
  63513. manipulateOptions: function manipulateOptions(_ref2) {
  63514. var generatorOpts = _ref2.generatorOpts,
  63515. parserOpts = _ref2.parserOpts;
  63516. parserOpts.plugins.push(["decorators", {
  63517. decoratorsBeforeExport: decoratorsBeforeExport
  63518. }]);
  63519. generatorOpts.decoratorsBeforeExport = decoratorsBeforeExport;
  63520. }
  63521. });
  63522. });
  63523. var proposalDoExpressions = declare(function (api) {
  63524. api.assertVersion(7);
  63525. return {
  63526. name: "proposal-do-expressions",
  63527. inherits: syntaxDoExpressions,
  63528. visitor: {
  63529. DoExpression: {
  63530. exit: function exit(path) {
  63531. var node = path.node;
  63532. if (node.async) {
  63533. return;
  63534. }
  63535. var body = node.body.body;
  63536. if (body.length) {
  63537. path.replaceExpressionWithStatements(body);
  63538. } else {
  63539. path.replaceWith(path.scope.buildUndefinedNode());
  63540. }
  63541. }
  63542. }
  63543. }
  63544. };
  63545. });
  63546. var lib$k = createCommonjsModule(function (module, exports) {
  63547. Object.defineProperty(exports, "__esModule", {
  63548. value: true
  63549. });
  63550. exports["default"] = void 0;
  63551. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63552. api.assertVersion(7);
  63553. return {
  63554. name: "syntax-dynamic-import",
  63555. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63556. parserOpts.plugins.push("dynamicImport");
  63557. }
  63558. };
  63559. });
  63560. exports["default"] = _default;
  63561. }, "/$$rollup_base$$/packages/babel-plugin-proposal-dynamic-import/node_modules/@babel/plugin-syntax-dynamic-import/lib");
  63562. var SUPPORTED_MODULES = ["commonjs", "amd", "systemjs"];
  63563. var MODULES_NOT_FOUND = "@babel/plugin-proposal-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n";
  63564. var _proposalDynamicImport = declare(function (api) {
  63565. api.assertVersion(7);
  63566. return {
  63567. name: "proposal-dynamic-import",
  63568. inherits: lib$k["default"],
  63569. pre: function pre() {
  63570. this.file.set("@babel/plugin-proposal-dynamic-import", "7.14.5");
  63571. },
  63572. visitor: {
  63573. Program: function Program() {
  63574. var modules = this.file.get("@babel/plugin-transform-modules-*");
  63575. if (!SUPPORTED_MODULES.includes(modules)) {
  63576. throw new Error(MODULES_NOT_FOUND);
  63577. }
  63578. }
  63579. }
  63580. };
  63581. });
  63582. var proposalExportDefaultFrom = declare(function (api) {
  63583. api.assertVersion(7);
  63584. return {
  63585. name: "proposal-export-default-from",
  63586. inherits: syntaxExportDefaultFrom,
  63587. visitor: {
  63588. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  63589. var node = path.node,
  63590. scope = path.scope;
  63591. var specifiers = node.specifiers;
  63592. if (!isExportDefaultSpecifier(specifiers[0])) return;
  63593. var specifier = specifiers.shift();
  63594. var exported = specifier.exported;
  63595. var uid = scope.generateUidIdentifier(exported.name);
  63596. var nodes = [importDeclaration([importDefaultSpecifier(uid)], cloneNode(node.source)), exportNamedDeclaration(null, [exportSpecifier(cloneNode(uid), exported)])];
  63597. if (specifiers.length >= 1) {
  63598. nodes.push(node);
  63599. }
  63600. var _path$replaceWithMult = path.replaceWithMultiple(nodes),
  63601. _path$replaceWithMult2 = _slicedToArray$2(_path$replaceWithMult, 1),
  63602. importDeclaration$1 = _path$replaceWithMult2[0];
  63603. path.scope.registerDeclaration(importDeclaration$1);
  63604. }
  63605. }
  63606. };
  63607. });
  63608. var lib$j = createCommonjsModule(function (module, exports) {
  63609. Object.defineProperty(exports, "__esModule", {
  63610. value: true
  63611. });
  63612. exports["default"] = void 0;
  63613. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63614. api.assertVersion(7);
  63615. return {
  63616. name: "syntax-export-namespace-from",
  63617. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63618. parserOpts.plugins.push("exportNamespaceFrom");
  63619. }
  63620. };
  63621. });
  63622. exports["default"] = _default;
  63623. }, "/$$rollup_base$$/packages/babel-plugin-proposal-export-namespace-from/node_modules/@babel/plugin-syntax-export-namespace-from/lib");
  63624. var _proposalExportNamespaceFrom = declare(function (api) {
  63625. api.assertVersion(7);
  63626. return {
  63627. name: "proposal-export-namespace-from",
  63628. inherits: lib$j["default"],
  63629. visitor: {
  63630. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  63631. var _exported$name;
  63632. var node = path.node,
  63633. scope = path.scope;
  63634. var specifiers = node.specifiers;
  63635. var index = isExportDefaultSpecifier(specifiers[0]) ? 1 : 0;
  63636. if (!isExportNamespaceSpecifier(specifiers[index])) return;
  63637. var nodes = [];
  63638. if (index === 1) {
  63639. nodes.push(exportNamedDeclaration(null, [specifiers.shift()], node.source));
  63640. }
  63641. var specifier = specifiers.shift();
  63642. var exported = specifier.exported;
  63643. var uid = scope.generateUidIdentifier((_exported$name = exported.name) != null ? _exported$name : exported.value);
  63644. nodes.push(importDeclaration([importNamespaceSpecifier(uid)], cloneNode(node.source)), exportNamedDeclaration(null, [exportSpecifier(cloneNode(uid), exported)]));
  63645. if (node.specifiers.length >= 1) {
  63646. nodes.push(node);
  63647. }
  63648. var _path$replaceWithMult = path.replaceWithMultiple(nodes),
  63649. _path$replaceWithMult2 = _slicedToArray$2(_path$replaceWithMult, 1),
  63650. importDeclaration$1 = _path$replaceWithMult2[0];
  63651. path.scope.registerDeclaration(importDeclaration$1);
  63652. }
  63653. }
  63654. };
  63655. });
  63656. var proposalFunctionBind = declare(function (api) {
  63657. api.assertVersion(7);
  63658. function getTempId(scope) {
  63659. var id = scope.path.getData("functionBind");
  63660. if (id) return cloneNode(id);
  63661. id = scope.generateDeclaredUidIdentifier("context");
  63662. return scope.path.setData("functionBind", id);
  63663. }
  63664. function getStaticContext(bind, scope) {
  63665. var object = bind.object || bind.callee.object;
  63666. return scope.isStatic(object) && (isSuper(object) ? thisExpression() : object);
  63667. }
  63668. function inferBindContext(bind, scope) {
  63669. var staticContext = getStaticContext(bind, scope);
  63670. if (staticContext) return cloneNode(staticContext);
  63671. var tempId = getTempId(scope);
  63672. if (bind.object) {
  63673. bind.callee = sequenceExpression([assignmentExpression("=", tempId, bind.object), bind.callee]);
  63674. } else {
  63675. bind.callee.object = assignmentExpression("=", tempId, bind.callee.object);
  63676. }
  63677. return cloneNode(tempId);
  63678. }
  63679. return {
  63680. name: "proposal-function-bind",
  63681. inherits: syntaxFunctionBind,
  63682. visitor: {
  63683. CallExpression: function CallExpression(_ref) {
  63684. var node = _ref.node,
  63685. scope = _ref.scope;
  63686. var bind = node.callee;
  63687. if (!isBindExpression(bind)) return;
  63688. var context = inferBindContext(bind, scope);
  63689. node.callee = memberExpression(bind.callee, identifier("call"));
  63690. node.arguments.unshift(context);
  63691. },
  63692. BindExpression: function BindExpression(path) {
  63693. var node = path.node,
  63694. scope = path.scope;
  63695. var context = inferBindContext(node, scope);
  63696. path.replaceWith(callExpression(memberExpression(node.callee, identifier("bind")), [context]));
  63697. }
  63698. }
  63699. };
  63700. });
  63701. var proposalFunctionSent = declare(function (api) {
  63702. api.assertVersion(7);
  63703. var isFunctionSent = function isFunctionSent(node) {
  63704. return isIdentifier(node.meta, {
  63705. name: "function"
  63706. }) && isIdentifier(node.property, {
  63707. name: "sent"
  63708. });
  63709. };
  63710. var hasBeenReplaced = function hasBeenReplaced(node, sentId) {
  63711. return isAssignmentExpression(node) && isIdentifier(node.left, {
  63712. name: sentId
  63713. });
  63714. };
  63715. var yieldVisitor = {
  63716. Function: function Function(path) {
  63717. path.skip();
  63718. },
  63719. YieldExpression: function YieldExpression(path) {
  63720. if (!hasBeenReplaced(path.parent, this.sentId)) {
  63721. path.replaceWith(assignmentExpression("=", identifier(this.sentId), path.node));
  63722. }
  63723. },
  63724. MetaProperty: function MetaProperty(path) {
  63725. if (isFunctionSent(path.node)) {
  63726. path.replaceWith(identifier(this.sentId));
  63727. }
  63728. }
  63729. };
  63730. return {
  63731. name: "proposal-function-sent",
  63732. inherits: syntaxFunctionSent,
  63733. visitor: {
  63734. MetaProperty: function MetaProperty(path, state) {
  63735. if (!isFunctionSent(path.node)) return;
  63736. var fnPath = path.getFunctionParent();
  63737. if (!fnPath.node.generator) {
  63738. throw new Error("Parent generator function not found");
  63739. }
  63740. var sentId = path.scope.generateUid("function.sent");
  63741. fnPath.traverse(yieldVisitor, {
  63742. sentId: sentId
  63743. });
  63744. fnPath.node.body.body.unshift(variableDeclaration("let", [variableDeclarator(identifier(sentId), yieldExpression())]));
  63745. wrapFunction(fnPath, state.addHelper("skipFirstGeneratorNext"));
  63746. }
  63747. }
  63748. };
  63749. });
  63750. var lib$i = createCommonjsModule(function (module, exports) {
  63751. Object.defineProperty(exports, "__esModule", {
  63752. value: true
  63753. });
  63754. exports["default"] = void 0;
  63755. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63756. api.assertVersion(7);
  63757. return {
  63758. name: "syntax-json-strings",
  63759. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63760. parserOpts.plugins.push("jsonStrings");
  63761. }
  63762. };
  63763. });
  63764. exports["default"] = _default;
  63765. }, "/$$rollup_base$$/packages/babel-plugin-proposal-json-strings/node_modules/@babel/plugin-syntax-json-strings/lib");
  63766. var _proposalJsonStrings = declare(function (api) {
  63767. api.assertVersion(7);
  63768. var regex = /(\\*)([\u2028\u2029])/g;
  63769. function replace(match, escapes, separator) {
  63770. var isEscaped = escapes.length % 2 === 1;
  63771. if (isEscaped) return match;
  63772. return escapes + "\\u" + separator.charCodeAt(0).toString(16);
  63773. }
  63774. return {
  63775. name: "proposal-json-strings",
  63776. inherits: lib$i["default"],
  63777. visitor: {
  63778. "DirectiveLiteral|StringLiteral": function DirectiveLiteralStringLiteral(_ref) {
  63779. var node = _ref.node;
  63780. var extra = node.extra;
  63781. if (!(extra != null && extra.raw)) return;
  63782. extra.raw = extra.raw.replace(regex, replace);
  63783. }
  63784. }
  63785. };
  63786. });
  63787. var lib$h = createCommonjsModule(function (module, exports) {
  63788. Object.defineProperty(exports, "__esModule", {
  63789. value: true
  63790. });
  63791. exports["default"] = void 0;
  63792. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63793. api.assertVersion(7);
  63794. return {
  63795. name: "syntax-logical-assignment-operators",
  63796. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63797. parserOpts.plugins.push("logicalAssignment");
  63798. }
  63799. };
  63800. });
  63801. exports["default"] = _default;
  63802. }, "/$$rollup_base$$/packages/babel-plugin-proposal-logical-assignment-operators/node_modules/@babel/plugin-syntax-logical-assignment-operators/lib");
  63803. var _proposalLogicalAssignmentOperators = declare(function (api) {
  63804. api.assertVersion(7);
  63805. return {
  63806. name: "proposal-logical-assignment-operators",
  63807. inherits: lib$h["default"],
  63808. visitor: {
  63809. AssignmentExpression: function AssignmentExpression(path) {
  63810. var node = path.node,
  63811. scope = path.scope;
  63812. var operator = node.operator,
  63813. left = node.left,
  63814. right = node.right;
  63815. var operatorTrunc = operator.slice(0, -1);
  63816. if (!LOGICAL_OPERATORS.includes(operatorTrunc)) {
  63817. return;
  63818. }
  63819. var lhs = cloneNode(left);
  63820. if (isMemberExpression(left)) {
  63821. var object = left.object,
  63822. property = left.property,
  63823. computed = left.computed;
  63824. var memo = scope.maybeGenerateMemoised(object);
  63825. if (memo) {
  63826. left.object = memo;
  63827. lhs.object = assignmentExpression("=", cloneNode(memo), object);
  63828. }
  63829. if (computed) {
  63830. var _memo = scope.maybeGenerateMemoised(property);
  63831. if (_memo) {
  63832. left.property = _memo;
  63833. lhs.property = assignmentExpression("=", cloneNode(_memo), property);
  63834. }
  63835. }
  63836. }
  63837. path.replaceWith(logicalExpression(operatorTrunc, lhs, assignmentExpression("=", left, right)));
  63838. }
  63839. }
  63840. };
  63841. });
  63842. var lib$g = createCommonjsModule(function (module, exports) {
  63843. Object.defineProperty(exports, "__esModule", {
  63844. value: true
  63845. });
  63846. exports["default"] = void 0;
  63847. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63848. api.assertVersion(7);
  63849. return {
  63850. name: "syntax-nullish-coalescing-operator",
  63851. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63852. parserOpts.plugins.push("nullishCoalescingOperator");
  63853. }
  63854. };
  63855. });
  63856. exports["default"] = _default;
  63857. }, "/$$rollup_base$$/packages/babel-plugin-proposal-nullish-coalescing-operator/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib");
  63858. var _templateObject$f;
  63859. var _proposalNullishCoalescingOperator = declare(function (api, _ref) {
  63860. var _api$assumption;
  63861. var _ref$loose = _ref.loose,
  63862. loose = _ref$loose === void 0 ? false : _ref$loose;
  63863. api.assertVersion(7);
  63864. var noDocumentAll = (_api$assumption = api.assumption("noDocumentAll")) != null ? _api$assumption : loose;
  63865. return {
  63866. name: "proposal-nullish-coalescing-operator",
  63867. inherits: lib$g["default"],
  63868. visitor: {
  63869. LogicalExpression: function LogicalExpression(path) {
  63870. var node = path.node,
  63871. scope = path.scope;
  63872. if (node.operator !== "??") {
  63873. return;
  63874. }
  63875. var ref;
  63876. var assignment;
  63877. if (scope.isStatic(node.left)) {
  63878. ref = node.left;
  63879. assignment = cloneNode(node.left);
  63880. } else if (scope.path.isPattern()) {
  63881. path.replaceWith(template$2.ast(_templateObject$f || (_templateObject$f = _taggedTemplateLiteralLoose(["(() => ", ")()"])), path.node));
  63882. return;
  63883. } else {
  63884. ref = scope.generateUidIdentifierBasedOnNode(node.left);
  63885. scope.push({
  63886. id: cloneNode(ref)
  63887. });
  63888. assignment = assignmentExpression("=", ref, node.left);
  63889. }
  63890. path.replaceWith(conditionalExpression(noDocumentAll ? binaryExpression("!=", assignment, nullLiteral()) : logicalExpression("&&", binaryExpression("!==", assignment, nullLiteral()), binaryExpression("!==", cloneNode(ref), scope.buildUndefinedNode())), cloneNode(ref), node.right));
  63891. }
  63892. }
  63893. };
  63894. });
  63895. var lib$f = createCommonjsModule(function (module, exports) {
  63896. Object.defineProperty(exports, "__esModule", {
  63897. value: true
  63898. });
  63899. exports["default"] = void 0;
  63900. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63901. api.assertVersion(7);
  63902. return {
  63903. name: "syntax-numeric-separator",
  63904. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63905. parserOpts.plugins.push("numericSeparator");
  63906. }
  63907. };
  63908. });
  63909. exports["default"] = _default;
  63910. }, "/$$rollup_base$$/packages/babel-plugin-proposal-numeric-separator/node_modules/@babel/plugin-syntax-numeric-separator/lib");
  63911. function remover(_ref) {
  63912. var _extra$raw;
  63913. var node = _ref.node;
  63914. var extra = node.extra;
  63915. if (extra != null && (_extra$raw = extra.raw) != null && _extra$raw.includes("_")) {
  63916. extra.raw = extra.raw.replace(/_/g, "");
  63917. }
  63918. }
  63919. var _proposalNumericSeparator = declare(function (api) {
  63920. api.assertVersion(7);
  63921. return {
  63922. name: "proposal-numeric-separator",
  63923. inherits: lib$f["default"],
  63924. visitor: {
  63925. NumericLiteral: remover,
  63926. BigIntLiteral: remover
  63927. }
  63928. };
  63929. });
  63930. var lib$e = createCommonjsModule(function (module, exports) {
  63931. Object.defineProperty(exports, "__esModule", {
  63932. value: true
  63933. });
  63934. exports["default"] = void 0;
  63935. var _default = (0, _helperPluginUtils.declare)(function (api) {
  63936. api.assertVersion(7);
  63937. return {
  63938. name: "syntax-object-rest-spread",
  63939. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  63940. parserOpts.plugins.push("objectRestSpread");
  63941. }
  63942. };
  63943. });
  63944. exports["default"] = _default;
  63945. }, "/$$rollup_base$$/packages/babel-plugin-proposal-object-rest-spread/node_modules/@babel/plugin-syntax-object-rest-spread/lib");
  63946. var buildDefaultParam = template$2("\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n");
  63947. var buildLooseDefaultParam = template$2("\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n");
  63948. var buildLooseDestructuredDefaultParam = template$2("\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n");
  63949. var buildSafeArgumentsAccess = template$2("\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n");
  63950. var iifeVisitor = {
  63951. "ReferencedIdentifier|BindingIdentifier": function ReferencedIdentifierBindingIdentifier(path, state) {
  63952. var scope = path.scope,
  63953. node = path.node;
  63954. var name = node.name;
  63955. if (name === "eval" || scope.getBinding(name) === state.scope.parent.getBinding(name) && state.scope.hasOwnBinding(name)) {
  63956. state.needsOuterBinding = true;
  63957. path.stop();
  63958. }
  63959. },
  63960. "TypeAnnotation|TSTypeAnnotation|TypeParameterDeclaration|TSTypeParameterDeclaration": function TypeAnnotationTSTypeAnnotationTypeParameterDeclarationTSTypeParameterDeclaration(path) {
  63961. return path.skip();
  63962. }
  63963. };
  63964. function convertFunctionParams(path, ignoreFunctionLength, shouldTransformParam, replaceRestElement) {
  63965. var params = path.get("params");
  63966. var isSimpleParameterList = params.every(function (param) {
  63967. return param.isIdentifier();
  63968. });
  63969. if (isSimpleParameterList) return false;
  63970. var node = path.node,
  63971. scope = path.scope;
  63972. var state = {
  63973. stop: false,
  63974. needsOuterBinding: false,
  63975. scope: scope
  63976. };
  63977. var body = [];
  63978. var shadowedParams = new Set();
  63979. for (var _iterator = _createForOfIteratorHelperLoose(params), _step; !(_step = _iterator()).done;) {
  63980. var _param2 = _step.value;
  63981. for (var _i = 0, _Object$keys = Object.keys(_param2.getBindingIdentifiers()); _i < _Object$keys.length; _i++) {
  63982. var _scope$bindings$name;
  63983. var name = _Object$keys[_i];
  63984. var constantViolations = (_scope$bindings$name = scope.bindings[name]) == null ? void 0 : _scope$bindings$name.constantViolations;
  63985. if (constantViolations) {
  63986. for (var _iterator4 = _createForOfIteratorHelperLoose(constantViolations), _step4; !(_step4 = _iterator4()).done;) {
  63987. var redeclarator = _step4.value;
  63988. var _node = redeclarator.node;
  63989. switch (_node.type) {
  63990. case "VariableDeclarator":
  63991. {
  63992. if (_node.init === null) {
  63993. var declaration = redeclarator.parentPath;
  63994. if (!declaration.parentPath.isFor() || declaration.parentPath.get("body") === declaration) {
  63995. redeclarator.remove();
  63996. break;
  63997. }
  63998. }
  63999. shadowedParams.add(name);
  64000. break;
  64001. }
  64002. case "FunctionDeclaration":
  64003. shadowedParams.add(name);
  64004. break;
  64005. }
  64006. }
  64007. }
  64008. }
  64009. }
  64010. if (shadowedParams.size === 0) {
  64011. for (var _iterator2 = _createForOfIteratorHelperLoose(params), _step2; !(_step2 = _iterator2()).done;) {
  64012. var param = _step2.value;
  64013. if (!param.isIdentifier()) param.traverse(iifeVisitor, state);
  64014. if (state.needsOuterBinding) break;
  64015. }
  64016. }
  64017. var firstOptionalIndex = null;
  64018. for (var i = 0; i < params.length; i++) {
  64019. var _param = params[i];
  64020. if (shouldTransformParam && !shouldTransformParam(i)) {
  64021. continue;
  64022. }
  64023. var transformedRestNodes = [];
  64024. if (replaceRestElement) {
  64025. replaceRestElement(_param.parentPath, _param, transformedRestNodes);
  64026. }
  64027. var paramIsAssignmentPattern = _param.isAssignmentPattern();
  64028. if (paramIsAssignmentPattern && (ignoreFunctionLength || node.kind === "set")) {
  64029. var left = _param.get("left");
  64030. var right = _param.get("right");
  64031. var undefinedNode = scope.buildUndefinedNode();
  64032. if (left.isIdentifier()) {
  64033. body.push(buildLooseDefaultParam({
  64034. ASSIGNMENT_IDENTIFIER: cloneNode(left.node),
  64035. DEFAULT_VALUE: right.node,
  64036. UNDEFINED: undefinedNode
  64037. }));
  64038. _param.replaceWith(left.node);
  64039. } else if (left.isObjectPattern() || left.isArrayPattern()) {
  64040. var paramName = scope.generateUidIdentifier();
  64041. body.push(buildLooseDestructuredDefaultParam({
  64042. ASSIGNMENT_IDENTIFIER: left.node,
  64043. DEFAULT_VALUE: right.node,
  64044. PARAMETER_NAME: cloneNode(paramName),
  64045. UNDEFINED: undefinedNode
  64046. }));
  64047. _param.replaceWith(paramName);
  64048. }
  64049. } else if (paramIsAssignmentPattern) {
  64050. if (firstOptionalIndex === null) firstOptionalIndex = i;
  64051. var _left = _param.get("left");
  64052. var _right = _param.get("right");
  64053. var defNode = buildDefaultParam({
  64054. VARIABLE_NAME: _left.node,
  64055. DEFAULT_VALUE: _right.node,
  64056. ARGUMENT_KEY: numericLiteral(i)
  64057. });
  64058. body.push(defNode);
  64059. } else if (firstOptionalIndex !== null) {
  64060. var _defNode = buildSafeArgumentsAccess([_param.node, numericLiteral(i)]);
  64061. body.push(_defNode);
  64062. } else if (_param.isObjectPattern() || _param.isArrayPattern()) {
  64063. var uid = path.scope.generateUidIdentifier("ref");
  64064. var _defNode2 = variableDeclaration("let", [variableDeclarator(_param.node, uid)]);
  64065. body.push(_defNode2);
  64066. _param.replaceWith(cloneNode(uid));
  64067. }
  64068. if (transformedRestNodes) {
  64069. for (var _iterator3 = _createForOfIteratorHelperLoose(transformedRestNodes), _step3; !(_step3 = _iterator3()).done;) {
  64070. var transformedNode = _step3.value;
  64071. body.push(transformedNode);
  64072. }
  64073. }
  64074. }
  64075. if (firstOptionalIndex !== null) {
  64076. node.params = node.params.slice(0, firstOptionalIndex);
  64077. }
  64078. path.ensureBlock();
  64079. if (state.needsOuterBinding || shadowedParams.size > 0) {
  64080. body.push(buildScopeIIFE(shadowedParams, path.get("body").node));
  64081. path.set("body", blockStatement(body));
  64082. var bodyPath = path.get("body.body");
  64083. var arrowPath = bodyPath[bodyPath.length - 1].get("argument.callee");
  64084. arrowPath.arrowFunctionToExpression();
  64085. arrowPath.node.generator = path.node.generator;
  64086. arrowPath.node.async = path.node.async;
  64087. path.node.generator = false;
  64088. } else {
  64089. path.get("body").unshiftContainer("body", body);
  64090. }
  64091. return true;
  64092. }
  64093. function buildScopeIIFE(shadowedParams, body) {
  64094. var args = [];
  64095. var params = [];
  64096. for (var _iterator5 = _createForOfIteratorHelperLoose(shadowedParams), _step5; !(_step5 = _iterator5()).done;) {
  64097. var name = _step5.value;
  64098. args.push(identifier(name));
  64099. params.push(identifier(name));
  64100. }
  64101. return returnStatement(callExpression(arrowFunctionExpression(params, body), args));
  64102. }
  64103. var buildRest = template$2("\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n");
  64104. var restIndex = template$2("\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n");
  64105. var restIndexImpure = template$2("\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n");
  64106. var restLength = template$2("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");
  64107. function referencesRest(path, state) {
  64108. if (path.node.name === state.name) {
  64109. return path.scope.bindingIdentifierEquals(state.name, state.outerBinding);
  64110. }
  64111. return false;
  64112. }
  64113. var memberExpressionOptimisationVisitor = {
  64114. Scope: function Scope(path, state) {
  64115. if (!path.scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
  64116. path.skip();
  64117. }
  64118. },
  64119. Flow: function Flow(path) {
  64120. if (path.isTypeCastExpression()) return;
  64121. path.skip();
  64122. },
  64123. Function: function Function(path, state) {
  64124. var oldNoOptimise = state.noOptimise;
  64125. state.noOptimise = true;
  64126. path.traverse(memberExpressionOptimisationVisitor, state);
  64127. state.noOptimise = oldNoOptimise;
  64128. path.skip();
  64129. },
  64130. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  64131. var node = path.node;
  64132. if (node.name === "arguments") {
  64133. state.deopted = true;
  64134. }
  64135. if (!referencesRest(path, state)) return;
  64136. if (state.noOptimise) {
  64137. state.deopted = true;
  64138. } else {
  64139. var parentPath = path.parentPath;
  64140. if (parentPath.listKey === "params" && parentPath.key < state.offset) {
  64141. return;
  64142. }
  64143. if (parentPath.isMemberExpression({
  64144. object: node
  64145. })) {
  64146. var grandparentPath = parentPath.parentPath;
  64147. var argsOptEligible = !state.deopted && !(grandparentPath.isAssignmentExpression() && parentPath.node === grandparentPath.node.left || grandparentPath.isLVal() || grandparentPath.isForXStatement() || grandparentPath.isUpdateExpression() || grandparentPath.isUnaryExpression({
  64148. operator: "delete"
  64149. }) || (grandparentPath.isCallExpression() || grandparentPath.isNewExpression()) && parentPath.node === grandparentPath.node.callee);
  64150. if (argsOptEligible) {
  64151. if (parentPath.node.computed) {
  64152. if (parentPath.get("property").isBaseType("number")) {
  64153. state.candidates.push({
  64154. cause: "indexGetter",
  64155. path: path
  64156. });
  64157. return;
  64158. }
  64159. } else if (parentPath.node.property.name === "length") {
  64160. state.candidates.push({
  64161. cause: "lengthGetter",
  64162. path: path
  64163. });
  64164. return;
  64165. }
  64166. }
  64167. }
  64168. if (state.offset === 0 && parentPath.isSpreadElement()) {
  64169. var call = parentPath.parentPath;
  64170. if (call.isCallExpression() && call.node.arguments.length === 1) {
  64171. state.candidates.push({
  64172. cause: "argSpread",
  64173. path: path
  64174. });
  64175. return;
  64176. }
  64177. }
  64178. state.references.push(path);
  64179. }
  64180. },
  64181. BindingIdentifier: function BindingIdentifier(path, state) {
  64182. if (referencesRest(path, state)) {
  64183. state.deopted = true;
  64184. }
  64185. }
  64186. };
  64187. function getParamsCount(node) {
  64188. var count = node.params.length;
  64189. if (count > 0 && isIdentifier(node.params[0], {
  64190. name: "this"
  64191. })) {
  64192. count -= 1;
  64193. }
  64194. return count;
  64195. }
  64196. function hasRest(node) {
  64197. var length = node.params.length;
  64198. return length > 0 && isRestElement(node.params[length - 1]);
  64199. }
  64200. function optimiseIndexGetter(path, argsId, offset) {
  64201. var offsetLiteral = numericLiteral(offset);
  64202. var index;
  64203. if (isNumericLiteral(path.parent.property)) {
  64204. index = numericLiteral(path.parent.property.value + offset);
  64205. } else if (offset === 0) {
  64206. index = path.parent.property;
  64207. } else {
  64208. index = binaryExpression("+", path.parent.property, cloneNode(offsetLiteral));
  64209. }
  64210. var scope = path.scope;
  64211. if (!scope.isPure(index)) {
  64212. var temp = scope.generateUidIdentifierBasedOnNode(index);
  64213. scope.push({
  64214. id: temp,
  64215. kind: "var"
  64216. });
  64217. path.parentPath.replaceWith(restIndexImpure({
  64218. ARGUMENTS: argsId,
  64219. OFFSET: offsetLiteral,
  64220. INDEX: index,
  64221. REF: cloneNode(temp)
  64222. }));
  64223. } else {
  64224. var parentPath = path.parentPath;
  64225. parentPath.replaceWith(restIndex({
  64226. ARGUMENTS: argsId,
  64227. OFFSET: offsetLiteral,
  64228. INDEX: index
  64229. }));
  64230. var offsetTestPath = parentPath.get("test").get("left");
  64231. var valRes = offsetTestPath.evaluate();
  64232. if (valRes.confident) {
  64233. if (valRes.value === true) {
  64234. parentPath.replaceWith(parentPath.scope.buildUndefinedNode());
  64235. } else {
  64236. parentPath.get("test").replaceWith(parentPath.get("test").get("right"));
  64237. }
  64238. }
  64239. }
  64240. }
  64241. function optimiseLengthGetter(path, argsId, offset) {
  64242. if (offset) {
  64243. path.parentPath.replaceWith(restLength({
  64244. ARGUMENTS: argsId,
  64245. OFFSET: numericLiteral(offset)
  64246. }));
  64247. } else {
  64248. path.replaceWith(argsId);
  64249. }
  64250. }
  64251. function convertFunctionRest(path) {
  64252. var node = path.node,
  64253. scope = path.scope;
  64254. if (!hasRest(node)) return false;
  64255. var rest = node.params.pop().argument;
  64256. var argsId = identifier("arguments");
  64257. if (isPattern(rest)) {
  64258. var pattern = rest;
  64259. rest = scope.generateUidIdentifier("ref");
  64260. var declar = variableDeclaration("let", [variableDeclarator(pattern, rest)]);
  64261. node.body.body.unshift(declar);
  64262. }
  64263. var paramsCount = getParamsCount(node);
  64264. var state = {
  64265. references: [],
  64266. offset: paramsCount,
  64267. argumentsNode: argsId,
  64268. outerBinding: scope.getBindingIdentifier(rest.name),
  64269. candidates: [],
  64270. name: rest.name,
  64271. deopted: false
  64272. };
  64273. path.traverse(memberExpressionOptimisationVisitor, state);
  64274. if (!state.deopted && !state.references.length) {
  64275. for (var _i = 0, _arr = state.candidates; _i < _arr.length; _i++) {
  64276. var _arr$_i = _arr[_i],
  64277. _path = _arr$_i.path,
  64278. cause = _arr$_i.cause;
  64279. var clonedArgsId = cloneNode(argsId);
  64280. switch (cause) {
  64281. case "indexGetter":
  64282. optimiseIndexGetter(_path, clonedArgsId, state.offset);
  64283. break;
  64284. case "lengthGetter":
  64285. optimiseLengthGetter(_path, clonedArgsId, state.offset);
  64286. break;
  64287. default:
  64288. _path.replaceWith(clonedArgsId);
  64289. }
  64290. }
  64291. return true;
  64292. }
  64293. state.references = state.references.concat(state.candidates.map(function (_ref) {
  64294. var path = _ref.path;
  64295. return path;
  64296. }));
  64297. var start = numericLiteral(paramsCount);
  64298. var key = scope.generateUidIdentifier("key");
  64299. var len = scope.generateUidIdentifier("len");
  64300. var arrKey, arrLen;
  64301. if (paramsCount) {
  64302. arrKey = binaryExpression("-", cloneNode(key), cloneNode(start));
  64303. arrLen = conditionalExpression(binaryExpression(">", cloneNode(len), cloneNode(start)), binaryExpression("-", cloneNode(len), cloneNode(start)), numericLiteral(0));
  64304. } else {
  64305. arrKey = identifier(key.name);
  64306. arrLen = identifier(len.name);
  64307. }
  64308. var loop = buildRest({
  64309. ARGUMENTS: argsId,
  64310. ARRAY_KEY: arrKey,
  64311. ARRAY_LEN: arrLen,
  64312. START: start,
  64313. ARRAY: rest,
  64314. KEY: key,
  64315. LEN: len
  64316. });
  64317. if (state.deopted) {
  64318. node.body.body.unshift(loop);
  64319. } else {
  64320. var target = path.getEarliestCommonAncestorFrom(state.references).getStatementParent();
  64321. target.findParent(function (path) {
  64322. if (path.isLoop()) {
  64323. target = path;
  64324. } else {
  64325. return path.isFunction();
  64326. }
  64327. });
  64328. target.insertBefore(loop);
  64329. }
  64330. return true;
  64331. }
  64332. var _transformParameters = declare(function (api, options) {
  64333. var _api$assumption;
  64334. api.assertVersion(7);
  64335. var ignoreFunctionLength = (_api$assumption = api.assumption("ignoreFunctionLength")) != null ? _api$assumption : options.loose;
  64336. var noNewArrows = api.assumption("noNewArrows");
  64337. return {
  64338. name: "transform-parameters",
  64339. visitor: {
  64340. Function: function Function(path) {
  64341. if (path.isArrowFunctionExpression() && path.get("params").some(function (param) {
  64342. return param.isRestElement() || param.isAssignmentPattern();
  64343. })) {
  64344. path.arrowFunctionToExpression({
  64345. noNewArrows: noNewArrows
  64346. });
  64347. }
  64348. var convertedRest = convertFunctionRest(path);
  64349. var convertedParams = convertFunctionParams(path, ignoreFunctionLength);
  64350. if (convertedRest || convertedParams) {
  64351. path.scope.crawl();
  64352. }
  64353. }
  64354. }
  64355. };
  64356. });
  64357. var require$$0$5 = {
  64358. "es6.array.copy-within": {
  64359. chrome: "45",
  64360. opera: "32",
  64361. edge: "12",
  64362. firefox: "32",
  64363. safari: "9",
  64364. node: "4",
  64365. ios: "9",
  64366. samsung: "5",
  64367. electron: "0.31"
  64368. },
  64369. "es6.array.every": {
  64370. chrome: "5",
  64371. opera: "10.10",
  64372. edge: "12",
  64373. firefox: "2",
  64374. safari: "3.1",
  64375. node: "0.10",
  64376. ie: "9",
  64377. android: "4",
  64378. ios: "6",
  64379. phantom: "2",
  64380. samsung: "1",
  64381. electron: "0.20"
  64382. },
  64383. "es6.array.fill": {
  64384. chrome: "45",
  64385. opera: "32",
  64386. edge: "12",
  64387. firefox: "31",
  64388. safari: "7.1",
  64389. node: "4",
  64390. ios: "8",
  64391. samsung: "5",
  64392. electron: "0.31"
  64393. },
  64394. "es6.array.filter": {
  64395. chrome: "51",
  64396. opera: "38",
  64397. edge: "13",
  64398. firefox: "48",
  64399. safari: "10",
  64400. node: "6.5",
  64401. ios: "10",
  64402. samsung: "5",
  64403. electron: "1.2"
  64404. },
  64405. "es6.array.find": {
  64406. chrome: "45",
  64407. opera: "32",
  64408. edge: "12",
  64409. firefox: "25",
  64410. safari: "7.1",
  64411. node: "4",
  64412. ios: "8",
  64413. samsung: "5",
  64414. electron: "0.31"
  64415. },
  64416. "es6.array.find-index": {
  64417. chrome: "45",
  64418. opera: "32",
  64419. edge: "12",
  64420. firefox: "25",
  64421. safari: "7.1",
  64422. node: "4",
  64423. ios: "8",
  64424. samsung: "5",
  64425. electron: "0.31"
  64426. },
  64427. "es7.array.flat-map": {
  64428. chrome: "69",
  64429. opera: "56",
  64430. edge: "79",
  64431. firefox: "62",
  64432. safari: "12",
  64433. node: "11",
  64434. ios: "12",
  64435. samsung: "10",
  64436. electron: "4.0"
  64437. },
  64438. "es6.array.for-each": {
  64439. chrome: "5",
  64440. opera: "10.10",
  64441. edge: "12",
  64442. firefox: "2",
  64443. safari: "3.1",
  64444. node: "0.10",
  64445. ie: "9",
  64446. android: "4",
  64447. ios: "6",
  64448. phantom: "2",
  64449. samsung: "1",
  64450. electron: "0.20"
  64451. },
  64452. "es6.array.from": {
  64453. chrome: "51",
  64454. opera: "38",
  64455. edge: "15",
  64456. firefox: "36",
  64457. safari: "10",
  64458. node: "6.5",
  64459. ios: "10",
  64460. samsung: "5",
  64461. electron: "1.2"
  64462. },
  64463. "es7.array.includes": {
  64464. chrome: "47",
  64465. opera: "34",
  64466. edge: "14",
  64467. firefox: "43",
  64468. safari: "10",
  64469. node: "6",
  64470. ios: "10",
  64471. samsung: "5",
  64472. electron: "0.36"
  64473. },
  64474. "es6.array.index-of": {
  64475. chrome: "5",
  64476. opera: "10.10",
  64477. edge: "12",
  64478. firefox: "2",
  64479. safari: "3.1",
  64480. node: "0.10",
  64481. ie: "9",
  64482. android: "4",
  64483. ios: "6",
  64484. phantom: "2",
  64485. samsung: "1",
  64486. electron: "0.20"
  64487. },
  64488. "es6.array.is-array": {
  64489. chrome: "5",
  64490. opera: "10.50",
  64491. edge: "12",
  64492. firefox: "4",
  64493. safari: "4",
  64494. node: "0.10",
  64495. ie: "9",
  64496. android: "4",
  64497. ios: "6",
  64498. phantom: "2",
  64499. samsung: "1",
  64500. electron: "0.20"
  64501. },
  64502. "es6.array.iterator": {
  64503. chrome: "66",
  64504. opera: "53",
  64505. edge: "12",
  64506. firefox: "60",
  64507. safari: "9",
  64508. node: "10",
  64509. ios: "9",
  64510. samsung: "9",
  64511. electron: "3.0"
  64512. },
  64513. "es6.array.last-index-of": {
  64514. chrome: "5",
  64515. opera: "10.10",
  64516. edge: "12",
  64517. firefox: "2",
  64518. safari: "3.1",
  64519. node: "0.10",
  64520. ie: "9",
  64521. android: "4",
  64522. ios: "6",
  64523. phantom: "2",
  64524. samsung: "1",
  64525. electron: "0.20"
  64526. },
  64527. "es6.array.map": {
  64528. chrome: "51",
  64529. opera: "38",
  64530. edge: "13",
  64531. firefox: "48",
  64532. safari: "10",
  64533. node: "6.5",
  64534. ios: "10",
  64535. samsung: "5",
  64536. electron: "1.2"
  64537. },
  64538. "es6.array.of": {
  64539. chrome: "45",
  64540. opera: "32",
  64541. edge: "12",
  64542. firefox: "25",
  64543. safari: "9",
  64544. node: "4",
  64545. ios: "9",
  64546. samsung: "5",
  64547. electron: "0.31"
  64548. },
  64549. "es6.array.reduce": {
  64550. chrome: "5",
  64551. opera: "10.50",
  64552. edge: "12",
  64553. firefox: "3",
  64554. safari: "4",
  64555. node: "0.10",
  64556. ie: "9",
  64557. android: "4",
  64558. ios: "6",
  64559. phantom: "2",
  64560. samsung: "1",
  64561. electron: "0.20"
  64562. },
  64563. "es6.array.reduce-right": {
  64564. chrome: "5",
  64565. opera: "10.50",
  64566. edge: "12",
  64567. firefox: "3",
  64568. safari: "4",
  64569. node: "0.10",
  64570. ie: "9",
  64571. android: "4",
  64572. ios: "6",
  64573. phantom: "2",
  64574. samsung: "1",
  64575. electron: "0.20"
  64576. },
  64577. "es6.array.slice": {
  64578. chrome: "51",
  64579. opera: "38",
  64580. edge: "13",
  64581. firefox: "48",
  64582. safari: "10",
  64583. node: "6.5",
  64584. ios: "10",
  64585. samsung: "5",
  64586. electron: "1.2"
  64587. },
  64588. "es6.array.some": {
  64589. chrome: "5",
  64590. opera: "10.10",
  64591. edge: "12",
  64592. firefox: "2",
  64593. safari: "3.1",
  64594. node: "0.10",
  64595. ie: "9",
  64596. android: "4",
  64597. ios: "6",
  64598. phantom: "2",
  64599. samsung: "1",
  64600. electron: "0.20"
  64601. },
  64602. "es6.array.sort": {
  64603. chrome: "63",
  64604. opera: "50",
  64605. edge: "12",
  64606. firefox: "5",
  64607. safari: "12",
  64608. node: "10",
  64609. ie: "9",
  64610. ios: "12",
  64611. samsung: "8",
  64612. electron: "3.0"
  64613. },
  64614. "es6.array.species": {
  64615. chrome: "51",
  64616. opera: "38",
  64617. edge: "13",
  64618. firefox: "48",
  64619. safari: "10",
  64620. node: "6.5",
  64621. ios: "10",
  64622. samsung: "5",
  64623. electron: "1.2"
  64624. },
  64625. "es6.date.now": {
  64626. chrome: "5",
  64627. opera: "10.50",
  64628. edge: "12",
  64629. firefox: "2",
  64630. safari: "4",
  64631. node: "0.10",
  64632. ie: "9",
  64633. android: "4",
  64634. ios: "6",
  64635. phantom: "2",
  64636. samsung: "1",
  64637. electron: "0.20"
  64638. },
  64639. "es6.date.to-iso-string": {
  64640. chrome: "5",
  64641. opera: "10.50",
  64642. edge: "12",
  64643. firefox: "3.5",
  64644. safari: "4",
  64645. node: "0.10",
  64646. ie: "9",
  64647. android: "4",
  64648. ios: "6",
  64649. phantom: "2",
  64650. samsung: "1",
  64651. electron: "0.20"
  64652. },
  64653. "es6.date.to-json": {
  64654. chrome: "5",
  64655. opera: "12.10",
  64656. edge: "12",
  64657. firefox: "4",
  64658. safari: "10",
  64659. node: "0.10",
  64660. ie: "9",
  64661. android: "4",
  64662. ios: "10",
  64663. samsung: "1",
  64664. electron: "0.20"
  64665. },
  64666. "es6.date.to-primitive": {
  64667. chrome: "47",
  64668. opera: "34",
  64669. edge: "15",
  64670. firefox: "44",
  64671. safari: "10",
  64672. node: "6",
  64673. ios: "10",
  64674. samsung: "5",
  64675. electron: "0.36"
  64676. },
  64677. "es6.date.to-string": {
  64678. chrome: "5",
  64679. opera: "10.50",
  64680. edge: "12",
  64681. firefox: "2",
  64682. safari: "3.1",
  64683. node: "0.10",
  64684. ie: "10",
  64685. android: "4",
  64686. ios: "6",
  64687. phantom: "2",
  64688. samsung: "1",
  64689. electron: "0.20"
  64690. },
  64691. "es6.function.bind": {
  64692. chrome: "7",
  64693. opera: "12",
  64694. edge: "12",
  64695. firefox: "4",
  64696. safari: "5.1",
  64697. node: "0.10",
  64698. ie: "9",
  64699. android: "4",
  64700. ios: "6",
  64701. phantom: "2",
  64702. samsung: "1",
  64703. electron: "0.20"
  64704. },
  64705. "es6.function.has-instance": {
  64706. chrome: "51",
  64707. opera: "38",
  64708. edge: "15",
  64709. firefox: "50",
  64710. safari: "10",
  64711. node: "6.5",
  64712. ios: "10",
  64713. samsung: "5",
  64714. electron: "1.2"
  64715. },
  64716. "es6.function.name": {
  64717. chrome: "5",
  64718. opera: "10.50",
  64719. edge: "14",
  64720. firefox: "2",
  64721. safari: "4",
  64722. node: "0.10",
  64723. android: "4",
  64724. ios: "6",
  64725. phantom: "2",
  64726. samsung: "1",
  64727. electron: "0.20"
  64728. },
  64729. "es6.map": {
  64730. chrome: "51",
  64731. opera: "38",
  64732. edge: "15",
  64733. firefox: "53",
  64734. safari: "10",
  64735. node: "6.5",
  64736. ios: "10",
  64737. samsung: "5",
  64738. electron: "1.2"
  64739. },
  64740. "es6.math.acosh": {
  64741. chrome: "38",
  64742. opera: "25",
  64743. edge: "12",
  64744. firefox: "25",
  64745. safari: "7.1",
  64746. node: "0.12",
  64747. ios: "8",
  64748. samsung: "3",
  64749. electron: "0.20"
  64750. },
  64751. "es6.math.asinh": {
  64752. chrome: "38",
  64753. opera: "25",
  64754. edge: "12",
  64755. firefox: "25",
  64756. safari: "7.1",
  64757. node: "0.12",
  64758. ios: "8",
  64759. samsung: "3",
  64760. electron: "0.20"
  64761. },
  64762. "es6.math.atanh": {
  64763. chrome: "38",
  64764. opera: "25",
  64765. edge: "12",
  64766. firefox: "25",
  64767. safari: "7.1",
  64768. node: "0.12",
  64769. ios: "8",
  64770. samsung: "3",
  64771. electron: "0.20"
  64772. },
  64773. "es6.math.cbrt": {
  64774. chrome: "38",
  64775. opera: "25",
  64776. edge: "12",
  64777. firefox: "25",
  64778. safari: "7.1",
  64779. node: "0.12",
  64780. ios: "8",
  64781. samsung: "3",
  64782. electron: "0.20"
  64783. },
  64784. "es6.math.clz32": {
  64785. chrome: "38",
  64786. opera: "25",
  64787. edge: "12",
  64788. firefox: "31",
  64789. safari: "9",
  64790. node: "0.12",
  64791. ios: "9",
  64792. samsung: "3",
  64793. electron: "0.20"
  64794. },
  64795. "es6.math.cosh": {
  64796. chrome: "38",
  64797. opera: "25",
  64798. edge: "12",
  64799. firefox: "25",
  64800. safari: "7.1",
  64801. node: "0.12",
  64802. ios: "8",
  64803. samsung: "3",
  64804. electron: "0.20"
  64805. },
  64806. "es6.math.expm1": {
  64807. chrome: "38",
  64808. opera: "25",
  64809. edge: "12",
  64810. firefox: "25",
  64811. safari: "7.1",
  64812. node: "0.12",
  64813. ios: "8",
  64814. samsung: "3",
  64815. electron: "0.20"
  64816. },
  64817. "es6.math.fround": {
  64818. chrome: "38",
  64819. opera: "25",
  64820. edge: "12",
  64821. firefox: "26",
  64822. safari: "7.1",
  64823. node: "0.12",
  64824. ios: "8",
  64825. samsung: "3",
  64826. electron: "0.20"
  64827. },
  64828. "es6.math.hypot": {
  64829. chrome: "38",
  64830. opera: "25",
  64831. edge: "12",
  64832. firefox: "27",
  64833. safari: "7.1",
  64834. node: "0.12",
  64835. ios: "8",
  64836. samsung: "3",
  64837. electron: "0.20"
  64838. },
  64839. "es6.math.imul": {
  64840. chrome: "30",
  64841. opera: "17",
  64842. edge: "12",
  64843. firefox: "23",
  64844. safari: "7",
  64845. node: "0.12",
  64846. android: "4.4",
  64847. ios: "7",
  64848. samsung: "2",
  64849. electron: "0.20"
  64850. },
  64851. "es6.math.log1p": {
  64852. chrome: "38",
  64853. opera: "25",
  64854. edge: "12",
  64855. firefox: "25",
  64856. safari: "7.1",
  64857. node: "0.12",
  64858. ios: "8",
  64859. samsung: "3",
  64860. electron: "0.20"
  64861. },
  64862. "es6.math.log10": {
  64863. chrome: "38",
  64864. opera: "25",
  64865. edge: "12",
  64866. firefox: "25",
  64867. safari: "7.1",
  64868. node: "0.12",
  64869. ios: "8",
  64870. samsung: "3",
  64871. electron: "0.20"
  64872. },
  64873. "es6.math.log2": {
  64874. chrome: "38",
  64875. opera: "25",
  64876. edge: "12",
  64877. firefox: "25",
  64878. safari: "7.1",
  64879. node: "0.12",
  64880. ios: "8",
  64881. samsung: "3",
  64882. electron: "0.20"
  64883. },
  64884. "es6.math.sign": {
  64885. chrome: "38",
  64886. opera: "25",
  64887. edge: "12",
  64888. firefox: "25",
  64889. safari: "9",
  64890. node: "0.12",
  64891. ios: "9",
  64892. samsung: "3",
  64893. electron: "0.20"
  64894. },
  64895. "es6.math.sinh": {
  64896. chrome: "38",
  64897. opera: "25",
  64898. edge: "12",
  64899. firefox: "25",
  64900. safari: "7.1",
  64901. node: "0.12",
  64902. ios: "8",
  64903. samsung: "3",
  64904. electron: "0.20"
  64905. },
  64906. "es6.math.tanh": {
  64907. chrome: "38",
  64908. opera: "25",
  64909. edge: "12",
  64910. firefox: "25",
  64911. safari: "7.1",
  64912. node: "0.12",
  64913. ios: "8",
  64914. samsung: "3",
  64915. electron: "0.20"
  64916. },
  64917. "es6.math.trunc": {
  64918. chrome: "38",
  64919. opera: "25",
  64920. edge: "12",
  64921. firefox: "25",
  64922. safari: "7.1",
  64923. node: "0.12",
  64924. ios: "8",
  64925. samsung: "3",
  64926. electron: "0.20"
  64927. },
  64928. "es6.number.constructor": {
  64929. chrome: "41",
  64930. opera: "28",
  64931. edge: "12",
  64932. firefox: "36",
  64933. safari: "9",
  64934. node: "4",
  64935. ios: "9",
  64936. samsung: "3.4",
  64937. electron: "0.21"
  64938. },
  64939. "es6.number.epsilon": {
  64940. chrome: "34",
  64941. opera: "21",
  64942. edge: "12",
  64943. firefox: "25",
  64944. safari: "9",
  64945. node: "0.12",
  64946. ios: "9",
  64947. samsung: "2",
  64948. electron: "0.20"
  64949. },
  64950. "es6.number.is-finite": {
  64951. chrome: "19",
  64952. opera: "15",
  64953. edge: "12",
  64954. firefox: "16",
  64955. safari: "9",
  64956. node: "0.12",
  64957. android: "4.1",
  64958. ios: "9",
  64959. samsung: "1.5",
  64960. electron: "0.20"
  64961. },
  64962. "es6.number.is-integer": {
  64963. chrome: "34",
  64964. opera: "21",
  64965. edge: "12",
  64966. firefox: "16",
  64967. safari: "9",
  64968. node: "0.12",
  64969. ios: "9",
  64970. samsung: "2",
  64971. electron: "0.20"
  64972. },
  64973. "es6.number.is-nan": {
  64974. chrome: "19",
  64975. opera: "15",
  64976. edge: "12",
  64977. firefox: "15",
  64978. safari: "9",
  64979. node: "0.12",
  64980. android: "4.1",
  64981. ios: "9",
  64982. samsung: "1.5",
  64983. electron: "0.20"
  64984. },
  64985. "es6.number.is-safe-integer": {
  64986. chrome: "34",
  64987. opera: "21",
  64988. edge: "12",
  64989. firefox: "32",
  64990. safari: "9",
  64991. node: "0.12",
  64992. ios: "9",
  64993. samsung: "2",
  64994. electron: "0.20"
  64995. },
  64996. "es6.number.max-safe-integer": {
  64997. chrome: "34",
  64998. opera: "21",
  64999. edge: "12",
  65000. firefox: "31",
  65001. safari: "9",
  65002. node: "0.12",
  65003. ios: "9",
  65004. samsung: "2",
  65005. electron: "0.20"
  65006. },
  65007. "es6.number.min-safe-integer": {
  65008. chrome: "34",
  65009. opera: "21",
  65010. edge: "12",
  65011. firefox: "31",
  65012. safari: "9",
  65013. node: "0.12",
  65014. ios: "9",
  65015. samsung: "2",
  65016. electron: "0.20"
  65017. },
  65018. "es6.number.parse-float": {
  65019. chrome: "34",
  65020. opera: "21",
  65021. edge: "12",
  65022. firefox: "25",
  65023. safari: "9",
  65024. node: "0.12",
  65025. ios: "9",
  65026. samsung: "2",
  65027. electron: "0.20"
  65028. },
  65029. "es6.number.parse-int": {
  65030. chrome: "34",
  65031. opera: "21",
  65032. edge: "12",
  65033. firefox: "25",
  65034. safari: "9",
  65035. node: "0.12",
  65036. ios: "9",
  65037. samsung: "2",
  65038. electron: "0.20"
  65039. },
  65040. "es6.object.assign": {
  65041. chrome: "49",
  65042. opera: "36",
  65043. edge: "13",
  65044. firefox: "36",
  65045. safari: "10",
  65046. node: "6",
  65047. ios: "10",
  65048. samsung: "5",
  65049. electron: "0.37"
  65050. },
  65051. "es6.object.create": {
  65052. chrome: "5",
  65053. opera: "12",
  65054. edge: "12",
  65055. firefox: "4",
  65056. safari: "4",
  65057. node: "0.10",
  65058. ie: "9",
  65059. android: "4",
  65060. ios: "6",
  65061. phantom: "2",
  65062. samsung: "1",
  65063. electron: "0.20"
  65064. },
  65065. "es7.object.define-getter": {
  65066. chrome: "62",
  65067. opera: "49",
  65068. edge: "16",
  65069. firefox: "48",
  65070. safari: "9",
  65071. node: "8.10",
  65072. ios: "9",
  65073. samsung: "8",
  65074. electron: "3.0"
  65075. },
  65076. "es7.object.define-setter": {
  65077. chrome: "62",
  65078. opera: "49",
  65079. edge: "16",
  65080. firefox: "48",
  65081. safari: "9",
  65082. node: "8.10",
  65083. ios: "9",
  65084. samsung: "8",
  65085. electron: "3.0"
  65086. },
  65087. "es6.object.define-property": {
  65088. chrome: "5",
  65089. opera: "12",
  65090. edge: "12",
  65091. firefox: "4",
  65092. safari: "5.1",
  65093. node: "0.10",
  65094. ie: "9",
  65095. android: "4",
  65096. ios: "6",
  65097. phantom: "2",
  65098. samsung: "1",
  65099. electron: "0.20"
  65100. },
  65101. "es6.object.define-properties": {
  65102. chrome: "5",
  65103. opera: "12",
  65104. edge: "12",
  65105. firefox: "4",
  65106. safari: "4",
  65107. node: "0.10",
  65108. ie: "9",
  65109. android: "4",
  65110. ios: "6",
  65111. phantom: "2",
  65112. samsung: "1",
  65113. electron: "0.20"
  65114. },
  65115. "es7.object.entries": {
  65116. chrome: "54",
  65117. opera: "41",
  65118. edge: "14",
  65119. firefox: "47",
  65120. safari: "10.1",
  65121. node: "7",
  65122. ios: "10.3",
  65123. samsung: "6",
  65124. electron: "1.4"
  65125. },
  65126. "es6.object.freeze": {
  65127. chrome: "44",
  65128. opera: "31",
  65129. edge: "12",
  65130. firefox: "35",
  65131. safari: "9",
  65132. node: "4",
  65133. ios: "9",
  65134. samsung: "4",
  65135. electron: "0.30"
  65136. },
  65137. "es6.object.get-own-property-descriptor": {
  65138. chrome: "44",
  65139. opera: "31",
  65140. edge: "12",
  65141. firefox: "35",
  65142. safari: "9",
  65143. node: "4",
  65144. ios: "9",
  65145. samsung: "4",
  65146. electron: "0.30"
  65147. },
  65148. "es7.object.get-own-property-descriptors": {
  65149. chrome: "54",
  65150. opera: "41",
  65151. edge: "15",
  65152. firefox: "50",
  65153. safari: "10.1",
  65154. node: "7",
  65155. ios: "10.3",
  65156. samsung: "6",
  65157. electron: "1.4"
  65158. },
  65159. "es6.object.get-own-property-names": {
  65160. chrome: "40",
  65161. opera: "27",
  65162. edge: "12",
  65163. firefox: "33",
  65164. safari: "9",
  65165. node: "4",
  65166. ios: "9",
  65167. samsung: "3.4",
  65168. electron: "0.21"
  65169. },
  65170. "es6.object.get-prototype-of": {
  65171. chrome: "44",
  65172. opera: "31",
  65173. edge: "12",
  65174. firefox: "35",
  65175. safari: "9",
  65176. node: "4",
  65177. ios: "9",
  65178. samsung: "4",
  65179. electron: "0.30"
  65180. },
  65181. "es7.object.lookup-getter": {
  65182. chrome: "62",
  65183. opera: "49",
  65184. edge: "79",
  65185. firefox: "36",
  65186. safari: "9",
  65187. node: "8.10",
  65188. ios: "9",
  65189. samsung: "8",
  65190. electron: "3.0"
  65191. },
  65192. "es7.object.lookup-setter": {
  65193. chrome: "62",
  65194. opera: "49",
  65195. edge: "79",
  65196. firefox: "36",
  65197. safari: "9",
  65198. node: "8.10",
  65199. ios: "9",
  65200. samsung: "8",
  65201. electron: "3.0"
  65202. },
  65203. "es6.object.prevent-extensions": {
  65204. chrome: "44",
  65205. opera: "31",
  65206. edge: "12",
  65207. firefox: "35",
  65208. safari: "9",
  65209. node: "4",
  65210. ios: "9",
  65211. samsung: "4",
  65212. electron: "0.30"
  65213. },
  65214. "es6.object.to-string": {
  65215. chrome: "57",
  65216. opera: "44",
  65217. edge: "15",
  65218. firefox: "51",
  65219. safari: "10",
  65220. node: "8",
  65221. ios: "10",
  65222. samsung: "7",
  65223. electron: "1.7"
  65224. },
  65225. "es6.object.is": {
  65226. chrome: "19",
  65227. opera: "15",
  65228. edge: "12",
  65229. firefox: "22",
  65230. safari: "9",
  65231. node: "0.12",
  65232. android: "4.1",
  65233. ios: "9",
  65234. samsung: "1.5",
  65235. electron: "0.20"
  65236. },
  65237. "es6.object.is-frozen": {
  65238. chrome: "44",
  65239. opera: "31",
  65240. edge: "12",
  65241. firefox: "35",
  65242. safari: "9",
  65243. node: "4",
  65244. ios: "9",
  65245. samsung: "4",
  65246. electron: "0.30"
  65247. },
  65248. "es6.object.is-sealed": {
  65249. chrome: "44",
  65250. opera: "31",
  65251. edge: "12",
  65252. firefox: "35",
  65253. safari: "9",
  65254. node: "4",
  65255. ios: "9",
  65256. samsung: "4",
  65257. electron: "0.30"
  65258. },
  65259. "es6.object.is-extensible": {
  65260. chrome: "44",
  65261. opera: "31",
  65262. edge: "12",
  65263. firefox: "35",
  65264. safari: "9",
  65265. node: "4",
  65266. ios: "9",
  65267. samsung: "4",
  65268. electron: "0.30"
  65269. },
  65270. "es6.object.keys": {
  65271. chrome: "40",
  65272. opera: "27",
  65273. edge: "12",
  65274. firefox: "35",
  65275. safari: "9",
  65276. node: "4",
  65277. ios: "9",
  65278. samsung: "3.4",
  65279. electron: "0.21"
  65280. },
  65281. "es6.object.seal": {
  65282. chrome: "44",
  65283. opera: "31",
  65284. edge: "12",
  65285. firefox: "35",
  65286. safari: "9",
  65287. node: "4",
  65288. ios: "9",
  65289. samsung: "4",
  65290. electron: "0.30"
  65291. },
  65292. "es6.object.set-prototype-of": {
  65293. chrome: "34",
  65294. opera: "21",
  65295. edge: "12",
  65296. firefox: "31",
  65297. safari: "9",
  65298. node: "0.12",
  65299. ie: "11",
  65300. ios: "9",
  65301. samsung: "2",
  65302. electron: "0.20"
  65303. },
  65304. "es7.object.values": {
  65305. chrome: "54",
  65306. opera: "41",
  65307. edge: "14",
  65308. firefox: "47",
  65309. safari: "10.1",
  65310. node: "7",
  65311. ios: "10.3",
  65312. samsung: "6",
  65313. electron: "1.4"
  65314. },
  65315. "es6.promise": {
  65316. chrome: "51",
  65317. opera: "38",
  65318. edge: "14",
  65319. firefox: "45",
  65320. safari: "10",
  65321. node: "6.5",
  65322. ios: "10",
  65323. samsung: "5",
  65324. electron: "1.2"
  65325. },
  65326. "es7.promise.finally": {
  65327. chrome: "63",
  65328. opera: "50",
  65329. edge: "18",
  65330. firefox: "58",
  65331. safari: "11.1",
  65332. node: "10",
  65333. ios: "11.3",
  65334. samsung: "8",
  65335. electron: "3.0"
  65336. },
  65337. "es6.reflect.apply": {
  65338. chrome: "49",
  65339. opera: "36",
  65340. edge: "12",
  65341. firefox: "42",
  65342. safari: "10",
  65343. node: "6",
  65344. ios: "10",
  65345. samsung: "5",
  65346. electron: "0.37"
  65347. },
  65348. "es6.reflect.construct": {
  65349. chrome: "49",
  65350. opera: "36",
  65351. edge: "13",
  65352. firefox: "49",
  65353. safari: "10",
  65354. node: "6",
  65355. ios: "10",
  65356. samsung: "5",
  65357. electron: "0.37"
  65358. },
  65359. "es6.reflect.define-property": {
  65360. chrome: "49",
  65361. opera: "36",
  65362. edge: "13",
  65363. firefox: "42",
  65364. safari: "10",
  65365. node: "6",
  65366. ios: "10",
  65367. samsung: "5",
  65368. electron: "0.37"
  65369. },
  65370. "es6.reflect.delete-property": {
  65371. chrome: "49",
  65372. opera: "36",
  65373. edge: "12",
  65374. firefox: "42",
  65375. safari: "10",
  65376. node: "6",
  65377. ios: "10",
  65378. samsung: "5",
  65379. electron: "0.37"
  65380. },
  65381. "es6.reflect.get": {
  65382. chrome: "49",
  65383. opera: "36",
  65384. edge: "12",
  65385. firefox: "42",
  65386. safari: "10",
  65387. node: "6",
  65388. ios: "10",
  65389. samsung: "5",
  65390. electron: "0.37"
  65391. },
  65392. "es6.reflect.get-own-property-descriptor": {
  65393. chrome: "49",
  65394. opera: "36",
  65395. edge: "12",
  65396. firefox: "42",
  65397. safari: "10",
  65398. node: "6",
  65399. ios: "10",
  65400. samsung: "5",
  65401. electron: "0.37"
  65402. },
  65403. "es6.reflect.get-prototype-of": {
  65404. chrome: "49",
  65405. opera: "36",
  65406. edge: "12",
  65407. firefox: "42",
  65408. safari: "10",
  65409. node: "6",
  65410. ios: "10",
  65411. samsung: "5",
  65412. electron: "0.37"
  65413. },
  65414. "es6.reflect.has": {
  65415. chrome: "49",
  65416. opera: "36",
  65417. edge: "12",
  65418. firefox: "42",
  65419. safari: "10",
  65420. node: "6",
  65421. ios: "10",
  65422. samsung: "5",
  65423. electron: "0.37"
  65424. },
  65425. "es6.reflect.is-extensible": {
  65426. chrome: "49",
  65427. opera: "36",
  65428. edge: "12",
  65429. firefox: "42",
  65430. safari: "10",
  65431. node: "6",
  65432. ios: "10",
  65433. samsung: "5",
  65434. electron: "0.37"
  65435. },
  65436. "es6.reflect.own-keys": {
  65437. chrome: "49",
  65438. opera: "36",
  65439. edge: "12",
  65440. firefox: "42",
  65441. safari: "10",
  65442. node: "6",
  65443. ios: "10",
  65444. samsung: "5",
  65445. electron: "0.37"
  65446. },
  65447. "es6.reflect.prevent-extensions": {
  65448. chrome: "49",
  65449. opera: "36",
  65450. edge: "12",
  65451. firefox: "42",
  65452. safari: "10",
  65453. node: "6",
  65454. ios: "10",
  65455. samsung: "5",
  65456. electron: "0.37"
  65457. },
  65458. "es6.reflect.set": {
  65459. chrome: "49",
  65460. opera: "36",
  65461. edge: "12",
  65462. firefox: "42",
  65463. safari: "10",
  65464. node: "6",
  65465. ios: "10",
  65466. samsung: "5",
  65467. electron: "0.37"
  65468. },
  65469. "es6.reflect.set-prototype-of": {
  65470. chrome: "49",
  65471. opera: "36",
  65472. edge: "12",
  65473. firefox: "42",
  65474. safari: "10",
  65475. node: "6",
  65476. ios: "10",
  65477. samsung: "5",
  65478. electron: "0.37"
  65479. },
  65480. "es6.regexp.constructor": {
  65481. chrome: "50",
  65482. opera: "37",
  65483. edge: "79",
  65484. firefox: "40",
  65485. safari: "10",
  65486. node: "6",
  65487. ios: "10",
  65488. samsung: "5",
  65489. electron: "1.1"
  65490. },
  65491. "es6.regexp.flags": {
  65492. chrome: "49",
  65493. opera: "36",
  65494. edge: "79",
  65495. firefox: "37",
  65496. safari: "9",
  65497. node: "6",
  65498. ios: "9",
  65499. samsung: "5",
  65500. electron: "0.37"
  65501. },
  65502. "es6.regexp.match": {
  65503. chrome: "50",
  65504. opera: "37",
  65505. edge: "79",
  65506. firefox: "49",
  65507. safari: "10",
  65508. node: "6",
  65509. ios: "10",
  65510. samsung: "5",
  65511. electron: "1.1"
  65512. },
  65513. "es6.regexp.replace": {
  65514. chrome: "50",
  65515. opera: "37",
  65516. edge: "79",
  65517. firefox: "49",
  65518. safari: "10",
  65519. node: "6",
  65520. ios: "10",
  65521. samsung: "5",
  65522. electron: "1.1"
  65523. },
  65524. "es6.regexp.split": {
  65525. chrome: "50",
  65526. opera: "37",
  65527. edge: "79",
  65528. firefox: "49",
  65529. safari: "10",
  65530. node: "6",
  65531. ios: "10",
  65532. samsung: "5",
  65533. electron: "1.1"
  65534. },
  65535. "es6.regexp.search": {
  65536. chrome: "50",
  65537. opera: "37",
  65538. edge: "79",
  65539. firefox: "49",
  65540. safari: "10",
  65541. node: "6",
  65542. ios: "10",
  65543. samsung: "5",
  65544. electron: "1.1"
  65545. },
  65546. "es6.regexp.to-string": {
  65547. chrome: "50",
  65548. opera: "37",
  65549. edge: "79",
  65550. firefox: "39",
  65551. safari: "10",
  65552. node: "6",
  65553. ios: "10",
  65554. samsung: "5",
  65555. electron: "1.1"
  65556. },
  65557. "es6.set": {
  65558. chrome: "51",
  65559. opera: "38",
  65560. edge: "15",
  65561. firefox: "53",
  65562. safari: "10",
  65563. node: "6.5",
  65564. ios: "10",
  65565. samsung: "5",
  65566. electron: "1.2"
  65567. },
  65568. "es6.symbol": {
  65569. chrome: "51",
  65570. opera: "38",
  65571. edge: "79",
  65572. firefox: "51",
  65573. safari: "10",
  65574. node: "6.5",
  65575. ios: "10",
  65576. samsung: "5",
  65577. electron: "1.2"
  65578. },
  65579. "es7.symbol.async-iterator": {
  65580. chrome: "63",
  65581. opera: "50",
  65582. edge: "79",
  65583. firefox: "57",
  65584. safari: "12",
  65585. node: "10",
  65586. ios: "12",
  65587. samsung: "8",
  65588. electron: "3.0"
  65589. },
  65590. "es6.string.anchor": {
  65591. chrome: "5",
  65592. opera: "15",
  65593. edge: "12",
  65594. firefox: "17",
  65595. safari: "6",
  65596. node: "0.10",
  65597. android: "4",
  65598. ios: "7",
  65599. phantom: "2",
  65600. samsung: "1",
  65601. electron: "0.20"
  65602. },
  65603. "es6.string.big": {
  65604. chrome: "5",
  65605. opera: "15",
  65606. edge: "12",
  65607. firefox: "17",
  65608. safari: "6",
  65609. node: "0.10",
  65610. android: "4",
  65611. ios: "7",
  65612. phantom: "2",
  65613. samsung: "1",
  65614. electron: "0.20"
  65615. },
  65616. "es6.string.blink": {
  65617. chrome: "5",
  65618. opera: "15",
  65619. edge: "12",
  65620. firefox: "17",
  65621. safari: "6",
  65622. node: "0.10",
  65623. android: "4",
  65624. ios: "7",
  65625. phantom: "2",
  65626. samsung: "1",
  65627. electron: "0.20"
  65628. },
  65629. "es6.string.bold": {
  65630. chrome: "5",
  65631. opera: "15",
  65632. edge: "12",
  65633. firefox: "17",
  65634. safari: "6",
  65635. node: "0.10",
  65636. android: "4",
  65637. ios: "7",
  65638. phantom: "2",
  65639. samsung: "1",
  65640. electron: "0.20"
  65641. },
  65642. "es6.string.code-point-at": {
  65643. chrome: "41",
  65644. opera: "28",
  65645. edge: "12",
  65646. firefox: "29",
  65647. safari: "9",
  65648. node: "4",
  65649. ios: "9",
  65650. samsung: "3.4",
  65651. electron: "0.21"
  65652. },
  65653. "es6.string.ends-with": {
  65654. chrome: "41",
  65655. opera: "28",
  65656. edge: "12",
  65657. firefox: "29",
  65658. safari: "9",
  65659. node: "4",
  65660. ios: "9",
  65661. samsung: "3.4",
  65662. electron: "0.21"
  65663. },
  65664. "es6.string.fixed": {
  65665. chrome: "5",
  65666. opera: "15",
  65667. edge: "12",
  65668. firefox: "17",
  65669. safari: "6",
  65670. node: "0.10",
  65671. android: "4",
  65672. ios: "7",
  65673. phantom: "2",
  65674. samsung: "1",
  65675. electron: "0.20"
  65676. },
  65677. "es6.string.fontcolor": {
  65678. chrome: "5",
  65679. opera: "15",
  65680. edge: "12",
  65681. firefox: "17",
  65682. safari: "6",
  65683. node: "0.10",
  65684. android: "4",
  65685. ios: "7",
  65686. phantom: "2",
  65687. samsung: "1",
  65688. electron: "0.20"
  65689. },
  65690. "es6.string.fontsize": {
  65691. chrome: "5",
  65692. opera: "15",
  65693. edge: "12",
  65694. firefox: "17",
  65695. safari: "6",
  65696. node: "0.10",
  65697. android: "4",
  65698. ios: "7",
  65699. phantom: "2",
  65700. samsung: "1",
  65701. electron: "0.20"
  65702. },
  65703. "es6.string.from-code-point": {
  65704. chrome: "41",
  65705. opera: "28",
  65706. edge: "12",
  65707. firefox: "29",
  65708. safari: "9",
  65709. node: "4",
  65710. ios: "9",
  65711. samsung: "3.4",
  65712. electron: "0.21"
  65713. },
  65714. "es6.string.includes": {
  65715. chrome: "41",
  65716. opera: "28",
  65717. edge: "12",
  65718. firefox: "40",
  65719. safari: "9",
  65720. node: "4",
  65721. ios: "9",
  65722. samsung: "3.4",
  65723. electron: "0.21"
  65724. },
  65725. "es6.string.italics": {
  65726. chrome: "5",
  65727. opera: "15",
  65728. edge: "12",
  65729. firefox: "17",
  65730. safari: "6",
  65731. node: "0.10",
  65732. android: "4",
  65733. ios: "7",
  65734. phantom: "2",
  65735. samsung: "1",
  65736. electron: "0.20"
  65737. },
  65738. "es6.string.iterator": {
  65739. chrome: "38",
  65740. opera: "25",
  65741. edge: "12",
  65742. firefox: "36",
  65743. safari: "9",
  65744. node: "0.12",
  65745. ios: "9",
  65746. samsung: "3",
  65747. electron: "0.20"
  65748. },
  65749. "es6.string.link": {
  65750. chrome: "5",
  65751. opera: "15",
  65752. edge: "12",
  65753. firefox: "17",
  65754. safari: "6",
  65755. node: "0.10",
  65756. android: "4",
  65757. ios: "7",
  65758. phantom: "2",
  65759. samsung: "1",
  65760. electron: "0.20"
  65761. },
  65762. "es7.string.pad-start": {
  65763. chrome: "57",
  65764. opera: "44",
  65765. edge: "15",
  65766. firefox: "48",
  65767. safari: "10",
  65768. node: "8",
  65769. ios: "10",
  65770. samsung: "7",
  65771. electron: "1.7"
  65772. },
  65773. "es7.string.pad-end": {
  65774. chrome: "57",
  65775. opera: "44",
  65776. edge: "15",
  65777. firefox: "48",
  65778. safari: "10",
  65779. node: "8",
  65780. ios: "10",
  65781. samsung: "7",
  65782. electron: "1.7"
  65783. },
  65784. "es6.string.raw": {
  65785. chrome: "41",
  65786. opera: "28",
  65787. edge: "12",
  65788. firefox: "34",
  65789. safari: "9",
  65790. node: "4",
  65791. ios: "9",
  65792. samsung: "3.4",
  65793. electron: "0.21"
  65794. },
  65795. "es6.string.repeat": {
  65796. chrome: "41",
  65797. opera: "28",
  65798. edge: "12",
  65799. firefox: "24",
  65800. safari: "9",
  65801. node: "4",
  65802. ios: "9",
  65803. samsung: "3.4",
  65804. electron: "0.21"
  65805. },
  65806. "es6.string.small": {
  65807. chrome: "5",
  65808. opera: "15",
  65809. edge: "12",
  65810. firefox: "17",
  65811. safari: "6",
  65812. node: "0.10",
  65813. android: "4",
  65814. ios: "7",
  65815. phantom: "2",
  65816. samsung: "1",
  65817. electron: "0.20"
  65818. },
  65819. "es6.string.starts-with": {
  65820. chrome: "41",
  65821. opera: "28",
  65822. edge: "12",
  65823. firefox: "29",
  65824. safari: "9",
  65825. node: "4",
  65826. ios: "9",
  65827. samsung: "3.4",
  65828. electron: "0.21"
  65829. },
  65830. "es6.string.strike": {
  65831. chrome: "5",
  65832. opera: "15",
  65833. edge: "12",
  65834. firefox: "17",
  65835. safari: "6",
  65836. node: "0.10",
  65837. android: "4",
  65838. ios: "7",
  65839. phantom: "2",
  65840. samsung: "1",
  65841. electron: "0.20"
  65842. },
  65843. "es6.string.sub": {
  65844. chrome: "5",
  65845. opera: "15",
  65846. edge: "12",
  65847. firefox: "17",
  65848. safari: "6",
  65849. node: "0.10",
  65850. android: "4",
  65851. ios: "7",
  65852. phantom: "2",
  65853. samsung: "1",
  65854. electron: "0.20"
  65855. },
  65856. "es6.string.sup": {
  65857. chrome: "5",
  65858. opera: "15",
  65859. edge: "12",
  65860. firefox: "17",
  65861. safari: "6",
  65862. node: "0.10",
  65863. android: "4",
  65864. ios: "7",
  65865. phantom: "2",
  65866. samsung: "1",
  65867. electron: "0.20"
  65868. },
  65869. "es6.string.trim": {
  65870. chrome: "5",
  65871. opera: "10.50",
  65872. edge: "12",
  65873. firefox: "3.5",
  65874. safari: "4",
  65875. node: "0.10",
  65876. ie: "9",
  65877. android: "4",
  65878. ios: "6",
  65879. phantom: "2",
  65880. samsung: "1",
  65881. electron: "0.20"
  65882. },
  65883. "es7.string.trim-left": {
  65884. chrome: "66",
  65885. opera: "53",
  65886. edge: "79",
  65887. firefox: "61",
  65888. safari: "12",
  65889. node: "10",
  65890. ios: "12",
  65891. samsung: "9",
  65892. electron: "3.0"
  65893. },
  65894. "es7.string.trim-right": {
  65895. chrome: "66",
  65896. opera: "53",
  65897. edge: "79",
  65898. firefox: "61",
  65899. safari: "12",
  65900. node: "10",
  65901. ios: "12",
  65902. samsung: "9",
  65903. electron: "3.0"
  65904. },
  65905. "es6.typed.array-buffer": {
  65906. chrome: "51",
  65907. opera: "38",
  65908. edge: "13",
  65909. firefox: "48",
  65910. safari: "10",
  65911. node: "6.5",
  65912. ios: "10",
  65913. samsung: "5",
  65914. electron: "1.2"
  65915. },
  65916. "es6.typed.data-view": {
  65917. chrome: "5",
  65918. opera: "12",
  65919. edge: "12",
  65920. firefox: "15",
  65921. safari: "5.1",
  65922. node: "0.10",
  65923. ie: "10",
  65924. android: "4",
  65925. ios: "6",
  65926. phantom: "2",
  65927. samsung: "1",
  65928. electron: "0.20"
  65929. },
  65930. "es6.typed.int8-array": {
  65931. chrome: "51",
  65932. opera: "38",
  65933. edge: "13",
  65934. firefox: "48",
  65935. safari: "10",
  65936. node: "6.5",
  65937. ios: "10",
  65938. samsung: "5",
  65939. electron: "1.2"
  65940. },
  65941. "es6.typed.uint8-array": {
  65942. chrome: "51",
  65943. opera: "38",
  65944. edge: "13",
  65945. firefox: "48",
  65946. safari: "10",
  65947. node: "6.5",
  65948. ios: "10",
  65949. samsung: "5",
  65950. electron: "1.2"
  65951. },
  65952. "es6.typed.uint8-clamped-array": {
  65953. chrome: "51",
  65954. opera: "38",
  65955. edge: "13",
  65956. firefox: "48",
  65957. safari: "10",
  65958. node: "6.5",
  65959. ios: "10",
  65960. samsung: "5",
  65961. electron: "1.2"
  65962. },
  65963. "es6.typed.int16-array": {
  65964. chrome: "51",
  65965. opera: "38",
  65966. edge: "13",
  65967. firefox: "48",
  65968. safari: "10",
  65969. node: "6.5",
  65970. ios: "10",
  65971. samsung: "5",
  65972. electron: "1.2"
  65973. },
  65974. "es6.typed.uint16-array": {
  65975. chrome: "51",
  65976. opera: "38",
  65977. edge: "13",
  65978. firefox: "48",
  65979. safari: "10",
  65980. node: "6.5",
  65981. ios: "10",
  65982. samsung: "5",
  65983. electron: "1.2"
  65984. },
  65985. "es6.typed.int32-array": {
  65986. chrome: "51",
  65987. opera: "38",
  65988. edge: "13",
  65989. firefox: "48",
  65990. safari: "10",
  65991. node: "6.5",
  65992. ios: "10",
  65993. samsung: "5",
  65994. electron: "1.2"
  65995. },
  65996. "es6.typed.uint32-array": {
  65997. chrome: "51",
  65998. opera: "38",
  65999. edge: "13",
  66000. firefox: "48",
  66001. safari: "10",
  66002. node: "6.5",
  66003. ios: "10",
  66004. samsung: "5",
  66005. electron: "1.2"
  66006. },
  66007. "es6.typed.float32-array": {
  66008. chrome: "51",
  66009. opera: "38",
  66010. edge: "13",
  66011. firefox: "48",
  66012. safari: "10",
  66013. node: "6.5",
  66014. ios: "10",
  66015. samsung: "5",
  66016. electron: "1.2"
  66017. },
  66018. "es6.typed.float64-array": {
  66019. chrome: "51",
  66020. opera: "38",
  66021. edge: "13",
  66022. firefox: "48",
  66023. safari: "10",
  66024. node: "6.5",
  66025. ios: "10",
  66026. samsung: "5",
  66027. electron: "1.2"
  66028. },
  66029. "es6.weak-map": {
  66030. chrome: "51",
  66031. opera: "38",
  66032. edge: "15",
  66033. firefox: "53",
  66034. safari: "9",
  66035. node: "6.5",
  66036. ios: "9",
  66037. samsung: "5",
  66038. electron: "1.2"
  66039. },
  66040. "es6.weak-set": {
  66041. chrome: "51",
  66042. opera: "38",
  66043. edge: "15",
  66044. firefox: "53",
  66045. safari: "9",
  66046. node: "6.5",
  66047. ios: "9",
  66048. samsung: "5",
  66049. electron: "1.2"
  66050. }
  66051. };
  66052. var corejs2BuiltIns = require$$0$5;
  66053. var ZERO_REFS = function () {
  66054. var node = identifier("a");
  66055. var property = objectProperty(identifier("key"), node);
  66056. var pattern = objectPattern([property]);
  66057. return isReferenced(node, property, pattern) ? 1 : 0;
  66058. }();
  66059. var _proposalObjectRestSpread = declare(function (api, opts) {
  66060. var _api$assumption, _api$assumption2, _api$assumption3, _api$assumption4;
  66061. api.assertVersion(7);
  66062. var targets = api.targets();
  66063. var supportsObjectAssign = !isRequired("es6.object.assign", targets, {
  66064. compatData: corejs2BuiltIns
  66065. });
  66066. var _opts$useBuiltIns = opts.useBuiltIns,
  66067. useBuiltIns = _opts$useBuiltIns === void 0 ? supportsObjectAssign : _opts$useBuiltIns,
  66068. _opts$loose = opts.loose,
  66069. loose = _opts$loose === void 0 ? false : _opts$loose;
  66070. if (typeof loose !== "boolean") {
  66071. throw new Error(".loose must be a boolean, or undefined");
  66072. }
  66073. var ignoreFunctionLength = (_api$assumption = api.assumption("ignoreFunctionLength")) != null ? _api$assumption : loose;
  66074. var objectRestNoSymbols = (_api$assumption2 = api.assumption("objectRestNoSymbols")) != null ? _api$assumption2 : loose;
  66075. var pureGetters = (_api$assumption3 = api.assumption("pureGetters")) != null ? _api$assumption3 : loose;
  66076. var setSpreadProperties = (_api$assumption4 = api.assumption("setSpreadProperties")) != null ? _api$assumption4 : loose;
  66077. function getExtendsHelper(file) {
  66078. return useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : file.addHelper("extends");
  66079. }
  66080. function hasRestElement(path) {
  66081. var foundRestElement = false;
  66082. visitRestElements(path, function (restElement) {
  66083. foundRestElement = true;
  66084. restElement.stop();
  66085. });
  66086. return foundRestElement;
  66087. }
  66088. function hasObjectPatternRestElement(path) {
  66089. var foundRestElement = false;
  66090. visitRestElements(path, function (restElement) {
  66091. if (restElement.parentPath.isObjectPattern()) {
  66092. foundRestElement = true;
  66093. restElement.stop();
  66094. }
  66095. });
  66096. return foundRestElement;
  66097. }
  66098. function visitRestElements(path, visitor) {
  66099. path.traverse({
  66100. Expression: function Expression(path) {
  66101. var parentType = path.parent.type;
  66102. if (parentType === "AssignmentPattern" && path.key === "right" || parentType === "ObjectProperty" && path.parent.computed && path.key === "key") {
  66103. path.skip();
  66104. }
  66105. },
  66106. RestElement: visitor
  66107. });
  66108. }
  66109. function hasSpread(node) {
  66110. for (var _iterator = _createForOfIteratorHelperLoose(node.properties), _step; !(_step = _iterator()).done;) {
  66111. var prop = _step.value;
  66112. if (isSpreadElement(prop)) {
  66113. return true;
  66114. }
  66115. }
  66116. return false;
  66117. }
  66118. function extractNormalizedKeys(path) {
  66119. var props = path.node.properties;
  66120. var keys = [];
  66121. var allLiteral = true;
  66122. var hasTemplateLiteral = false;
  66123. for (var _iterator2 = _createForOfIteratorHelperLoose(props), _step2; !(_step2 = _iterator2()).done;) {
  66124. var prop = _step2.value;
  66125. if (isIdentifier(prop.key) && !prop.computed) {
  66126. keys.push(stringLiteral(prop.key.name));
  66127. } else if (isTemplateLiteral(prop.key)) {
  66128. keys.push(cloneNode(prop.key));
  66129. hasTemplateLiteral = true;
  66130. } else if (isLiteral(prop.key)) {
  66131. keys.push(stringLiteral(String(prop.key.value)));
  66132. } else {
  66133. keys.push(cloneNode(prop.key));
  66134. allLiteral = false;
  66135. }
  66136. }
  66137. return {
  66138. keys: keys,
  66139. allLiteral: allLiteral,
  66140. hasTemplateLiteral: hasTemplateLiteral
  66141. };
  66142. }
  66143. function replaceImpureComputedKeys(properties, scope) {
  66144. var impureComputedPropertyDeclarators = [];
  66145. for (var _iterator3 = _createForOfIteratorHelperLoose(properties), _step3; !(_step3 = _iterator3()).done;) {
  66146. var propPath = _step3.value;
  66147. var key = propPath.get("key");
  66148. if (propPath.node.computed && !key.isPure()) {
  66149. var name = scope.generateUidBasedOnNode(key.node);
  66150. var declarator = variableDeclarator(identifier(name), key.node);
  66151. impureComputedPropertyDeclarators.push(declarator);
  66152. key.replaceWith(identifier(name));
  66153. }
  66154. }
  66155. return impureComputedPropertyDeclarators;
  66156. }
  66157. function removeUnusedExcludedKeys(path) {
  66158. var bindings = path.getOuterBindingIdentifierPaths();
  66159. Object.keys(bindings).forEach(function (bindingName) {
  66160. var bindingParentPath = bindings[bindingName].parentPath;
  66161. if (path.scope.getBinding(bindingName).references > ZERO_REFS || !bindingParentPath.isObjectProperty()) {
  66162. return;
  66163. }
  66164. bindingParentPath.remove();
  66165. });
  66166. }
  66167. function createObjectRest(path, file, objRef) {
  66168. var props = path.get("properties");
  66169. var last = props[props.length - 1];
  66170. assertRestElement(last.node);
  66171. var restElement = cloneNode(last.node);
  66172. last.remove();
  66173. var impureComputedPropertyDeclarators = replaceImpureComputedKeys(path.get("properties"), path.scope);
  66174. var _extractNormalizedKey = extractNormalizedKeys(path),
  66175. keys = _extractNormalizedKey.keys,
  66176. allLiteral = _extractNormalizedKey.allLiteral,
  66177. hasTemplateLiteral = _extractNormalizedKey.hasTemplateLiteral;
  66178. if (keys.length === 0) {
  66179. return [impureComputedPropertyDeclarators, restElement.argument, callExpression(getExtendsHelper(file), [objectExpression([]), cloneNode(objRef)])];
  66180. }
  66181. var keyExpression;
  66182. if (!allLiteral) {
  66183. keyExpression = callExpression(memberExpression(arrayExpression(keys), identifier("map")), [file.addHelper("toPropertyKey")]);
  66184. } else {
  66185. keyExpression = arrayExpression(keys);
  66186. if (!hasTemplateLiteral && !isProgram(path.scope.block)) {
  66187. var program = path.findParent(function (path) {
  66188. return path.isProgram();
  66189. });
  66190. var id = path.scope.generateUidIdentifier("excluded");
  66191. program.scope.push({
  66192. id: id,
  66193. init: keyExpression,
  66194. kind: "const"
  66195. });
  66196. keyExpression = cloneNode(id);
  66197. }
  66198. }
  66199. return [impureComputedPropertyDeclarators, restElement.argument, callExpression(file.addHelper("objectWithoutProperties" + (objectRestNoSymbols ? "Loose" : "")), [cloneNode(objRef), keyExpression])];
  66200. }
  66201. function replaceRestElement(parentPath, paramPath, container) {
  66202. if (paramPath.isAssignmentPattern()) {
  66203. replaceRestElement(parentPath, paramPath.get("left"), container);
  66204. return;
  66205. }
  66206. if (paramPath.isArrayPattern() && hasRestElement(paramPath)) {
  66207. var elements = paramPath.get("elements");
  66208. for (var i = 0; i < elements.length; i++) {
  66209. replaceRestElement(parentPath, elements[i], container);
  66210. }
  66211. }
  66212. if (paramPath.isObjectPattern() && hasRestElement(paramPath)) {
  66213. var uid = parentPath.scope.generateUidIdentifier("ref");
  66214. var declar = variableDeclaration("let", [variableDeclarator(paramPath.node, uid)]);
  66215. if (container) {
  66216. container.push(declar);
  66217. } else {
  66218. parentPath.ensureBlock();
  66219. parentPath.get("body").unshiftContainer("body", declar);
  66220. }
  66221. paramPath.replaceWith(cloneNode(uid));
  66222. }
  66223. }
  66224. return {
  66225. name: "proposal-object-rest-spread",
  66226. inherits: lib$e["default"],
  66227. visitor: {
  66228. Function: function Function(path) {
  66229. var params = path.get("params");
  66230. var paramsWithRestElement = new Set();
  66231. var idsInRestParams = new Set();
  66232. for (var _i = 0; _i < params.length; ++_i) {
  66233. var param = params[_i];
  66234. if (hasRestElement(param)) {
  66235. paramsWithRestElement.add(_i);
  66236. for (var _i2 = 0, _Object$keys = Object.keys(param.getBindingIdentifiers()); _i2 < _Object$keys.length; _i2++) {
  66237. var name = _Object$keys[_i2];
  66238. idsInRestParams.add(name);
  66239. }
  66240. }
  66241. }
  66242. var idInRest = false;
  66243. var IdentifierHandler = function IdentifierHandler(path, functionScope) {
  66244. var name = path.node.name;
  66245. if (path.scope.getBinding(name) === functionScope.getBinding(name) && idsInRestParams.has(name)) {
  66246. idInRest = true;
  66247. path.stop();
  66248. }
  66249. };
  66250. var i;
  66251. for (i = 0; i < params.length && !idInRest; ++i) {
  66252. var _param = params[i];
  66253. if (!paramsWithRestElement.has(i)) {
  66254. if (_param.isReferencedIdentifier() || _param.isBindingIdentifier()) {
  66255. IdentifierHandler(path, path.scope);
  66256. } else {
  66257. _param.traverse({
  66258. "Scope|TypeAnnotation|TSTypeAnnotation": function ScopeTypeAnnotationTSTypeAnnotation(path) {
  66259. return path.skip();
  66260. },
  66261. "ReferencedIdentifier|BindingIdentifier": IdentifierHandler
  66262. }, path.scope);
  66263. }
  66264. }
  66265. }
  66266. if (!idInRest) {
  66267. for (var _i3 = 0; _i3 < params.length; ++_i3) {
  66268. var _param2 = params[_i3];
  66269. if (paramsWithRestElement.has(_i3)) {
  66270. replaceRestElement(_param2.parentPath, _param2);
  66271. }
  66272. }
  66273. } else {
  66274. var shouldTransformParam = function shouldTransformParam(idx) {
  66275. return idx >= i - 1 || paramsWithRestElement.has(idx);
  66276. };
  66277. convertFunctionParams(path, ignoreFunctionLength, shouldTransformParam, replaceRestElement);
  66278. }
  66279. },
  66280. VariableDeclarator: function VariableDeclarator(path, file) {
  66281. if (!path.get("id").isObjectPattern()) {
  66282. return;
  66283. }
  66284. var insertionPath = path;
  66285. var originalPath = path;
  66286. visitRestElements(path.get("id"), function (path) {
  66287. if (!path.parentPath.isObjectPattern()) {
  66288. return;
  66289. }
  66290. if (originalPath.node.id.properties.length > 1 && !isIdentifier(originalPath.node.init)) {
  66291. var initRef = path.scope.generateUidIdentifierBasedOnNode(originalPath.node.init, "ref");
  66292. originalPath.insertBefore(variableDeclarator(initRef, originalPath.node.init));
  66293. originalPath.replaceWith(variableDeclarator(originalPath.node.id, cloneNode(initRef)));
  66294. return;
  66295. }
  66296. var ref = originalPath.node.init;
  66297. var refPropertyPath = [];
  66298. var kind;
  66299. path.findParent(function (path) {
  66300. if (path.isObjectProperty()) {
  66301. refPropertyPath.unshift(path);
  66302. } else if (path.isVariableDeclarator()) {
  66303. kind = path.parentPath.node.kind;
  66304. return true;
  66305. }
  66306. });
  66307. var impureObjRefComputedDeclarators = replaceImpureComputedKeys(refPropertyPath, path.scope);
  66308. refPropertyPath.forEach(function (prop) {
  66309. var node = prop.node;
  66310. ref = memberExpression(ref, cloneNode(node.key), node.computed || isLiteral(node.key));
  66311. });
  66312. var objectPatternPath = path.findParent(function (path) {
  66313. return path.isObjectPattern();
  66314. });
  66315. var _createObjectRest = createObjectRest(objectPatternPath, file, ref),
  66316. _createObjectRest2 = _slicedToArray$2(_createObjectRest, 3),
  66317. impureComputedPropertyDeclarators = _createObjectRest2[0],
  66318. argument = _createObjectRest2[1],
  66319. callExpression = _createObjectRest2[2];
  66320. if (pureGetters) {
  66321. removeUnusedExcludedKeys(objectPatternPath);
  66322. }
  66323. assertIdentifier(argument);
  66324. insertionPath.insertBefore(impureComputedPropertyDeclarators);
  66325. insertionPath.insertBefore(impureObjRefComputedDeclarators);
  66326. insertionPath.insertAfter(variableDeclarator(argument, callExpression));
  66327. insertionPath = insertionPath.getSibling(insertionPath.key + 1);
  66328. path.scope.registerBinding(kind, insertionPath);
  66329. if (objectPatternPath.node.properties.length === 0) {
  66330. objectPatternPath.findParent(function (path) {
  66331. return path.isObjectProperty() || path.isVariableDeclarator();
  66332. }).remove();
  66333. }
  66334. });
  66335. },
  66336. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  66337. var declaration = path.get("declaration");
  66338. if (!declaration.isVariableDeclaration()) return;
  66339. var hasRest = declaration.get("declarations").some(function (path) {
  66340. return hasObjectPatternRestElement(path.get("id"));
  66341. });
  66342. if (!hasRest) return;
  66343. var specifiers = [];
  66344. for (var _i4 = 0, _Object$keys2 = Object.keys(path.getOuterBindingIdentifiers(path)); _i4 < _Object$keys2.length; _i4++) {
  66345. var name = _Object$keys2[_i4];
  66346. specifiers.push(exportSpecifier(identifier(name), identifier(name)));
  66347. }
  66348. path.replaceWith(declaration.node);
  66349. path.insertAfter(exportNamedDeclaration(null, specifiers));
  66350. },
  66351. CatchClause: function CatchClause(path) {
  66352. var paramPath = path.get("param");
  66353. replaceRestElement(paramPath.parentPath, paramPath);
  66354. },
  66355. AssignmentExpression: function AssignmentExpression(path, file) {
  66356. var leftPath = path.get("left");
  66357. if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {
  66358. var nodes = [];
  66359. var refName = path.scope.generateUidBasedOnNode(path.node.right, "ref");
  66360. nodes.push(variableDeclaration("var", [variableDeclarator(identifier(refName), path.node.right)]));
  66361. var _createObjectRest3 = createObjectRest(leftPath, file, identifier(refName)),
  66362. _createObjectRest4 = _slicedToArray$2(_createObjectRest3, 3),
  66363. impureComputedPropertyDeclarators = _createObjectRest4[0],
  66364. argument = _createObjectRest4[1],
  66365. callExpression = _createObjectRest4[2];
  66366. if (impureComputedPropertyDeclarators.length > 0) {
  66367. nodes.push(variableDeclaration("var", impureComputedPropertyDeclarators));
  66368. }
  66369. var nodeWithoutSpread = cloneNode(path.node);
  66370. nodeWithoutSpread.right = identifier(refName);
  66371. nodes.push(expressionStatement(nodeWithoutSpread));
  66372. nodes.push(toStatement(assignmentExpression("=", argument, callExpression)));
  66373. nodes.push(expressionStatement(identifier(refName)));
  66374. path.replaceWithMultiple(nodes);
  66375. }
  66376. },
  66377. ForXStatement: function ForXStatement(path) {
  66378. var node = path.node,
  66379. scope = path.scope;
  66380. var leftPath = path.get("left");
  66381. var left = node.left;
  66382. if (!hasObjectPatternRestElement(leftPath)) {
  66383. return;
  66384. }
  66385. if (!isVariableDeclaration(left)) {
  66386. var temp = scope.generateUidIdentifier("ref");
  66387. node.left = variableDeclaration("var", [variableDeclarator(temp)]);
  66388. path.ensureBlock();
  66389. if (node.body.body.length === 0 && path.isCompletionRecord()) {
  66390. node.body.body.unshift(expressionStatement(scope.buildUndefinedNode()));
  66391. }
  66392. node.body.body.unshift(expressionStatement(assignmentExpression("=", left, cloneNode(temp))));
  66393. } else {
  66394. var pattern = left.declarations[0].id;
  66395. var key = scope.generateUidIdentifier("ref");
  66396. node.left = variableDeclaration(left.kind, [variableDeclarator(key, null)]);
  66397. path.ensureBlock();
  66398. node.body.body.unshift(variableDeclaration(node.left.kind, [variableDeclarator(pattern, cloneNode(key))]));
  66399. }
  66400. },
  66401. ArrayPattern: function ArrayPattern(path) {
  66402. var objectPatterns = [];
  66403. visitRestElements(path, function (path) {
  66404. if (!path.parentPath.isObjectPattern()) {
  66405. return;
  66406. }
  66407. var objectPattern = path.parentPath;
  66408. var uid = path.scope.generateUidIdentifier("ref");
  66409. objectPatterns.push(variableDeclarator(objectPattern.node, uid));
  66410. objectPattern.replaceWith(cloneNode(uid));
  66411. path.skip();
  66412. });
  66413. if (objectPatterns.length > 0) {
  66414. var statementPath = path.getStatementParent();
  66415. statementPath.insertAfter(variableDeclaration(statementPath.node.kind || "var", objectPatterns));
  66416. }
  66417. },
  66418. ObjectExpression: function ObjectExpression(path, file) {
  66419. if (!hasSpread(path.node)) return;
  66420. var helper;
  66421. if (setSpreadProperties) {
  66422. helper = getExtendsHelper(file);
  66423. } else {
  66424. try {
  66425. helper = file.addHelper("objectSpread2");
  66426. } catch (_unused) {
  66427. this.file.declarations["objectSpread2"] = null;
  66428. helper = file.addHelper("objectSpread");
  66429. }
  66430. }
  66431. var exp = null;
  66432. var props = [];
  66433. function make() {
  66434. var hadProps = props.length > 0;
  66435. var obj = objectExpression(props);
  66436. props = [];
  66437. if (!exp) {
  66438. exp = callExpression(helper, [obj]);
  66439. return;
  66440. }
  66441. if (pureGetters) {
  66442. if (hadProps) {
  66443. exp.arguments.push(obj);
  66444. }
  66445. return;
  66446. }
  66447. exp = callExpression(cloneNode(helper), [exp].concat(_toConsumableArray(hadProps ? [objectExpression([]), obj] : [])));
  66448. }
  66449. for (var _i5 = 0, _arr = path.node.properties; _i5 < _arr.length; _i5++) {
  66450. var prop = _arr[_i5];
  66451. if (isSpreadElement(prop)) {
  66452. make();
  66453. exp.arguments.push(prop.argument);
  66454. } else {
  66455. props.push(prop);
  66456. }
  66457. }
  66458. if (props.length) make();
  66459. path.replaceWith(exp);
  66460. }
  66461. }
  66462. };
  66463. });
  66464. var lib$d = createCommonjsModule(function (module, exports) {
  66465. Object.defineProperty(exports, "__esModule", {
  66466. value: true
  66467. });
  66468. exports["default"] = void 0;
  66469. var _default = (0, _helperPluginUtils.declare)(function (api) {
  66470. api.assertVersion(7);
  66471. return {
  66472. name: "syntax-optional-catch-binding",
  66473. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  66474. parserOpts.plugins.push("optionalCatchBinding");
  66475. }
  66476. };
  66477. });
  66478. exports["default"] = _default;
  66479. }, "/$$rollup_base$$/packages/babel-plugin-proposal-optional-catch-binding/node_modules/@babel/plugin-syntax-optional-catch-binding/lib");
  66480. var _proposalOptionalCatchBinding = declare(function (api) {
  66481. api.assertVersion(7);
  66482. return {
  66483. name: "proposal-optional-catch-binding",
  66484. inherits: lib$d["default"],
  66485. visitor: {
  66486. CatchClause: function CatchClause(path) {
  66487. if (!path.node.param) {
  66488. var uid = path.scope.generateUidIdentifier("unused");
  66489. var paramPath = path.get("param");
  66490. paramPath.replaceWith(uid);
  66491. }
  66492. }
  66493. }
  66494. };
  66495. });
  66496. var lib$c = createCommonjsModule(function (module, exports) {
  66497. Object.defineProperty(exports, "__esModule", {
  66498. value: true
  66499. });
  66500. exports["default"] = void 0;
  66501. var _default = (0, _helperPluginUtils.declare)(function (api) {
  66502. api.assertVersion(7);
  66503. return {
  66504. name: "syntax-optional-chaining",
  66505. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  66506. parserOpts.plugins.push("optionalChaining");
  66507. }
  66508. };
  66509. });
  66510. exports["default"] = _default;
  66511. }, "/$$rollup_base$$/packages/babel-plugin-proposal-optional-chaining/node_modules/@babel/plugin-syntax-optional-chaining/lib");
  66512. function isTransparentExprWrapper(node) {
  66513. return isTSAsExpression(node) || isTSTypeAssertion(node) || isTSNonNullExpression(node) || isTypeCastExpression(node) || isParenthesizedExpression(node);
  66514. }
  66515. function skipTransparentExprWrappers(path) {
  66516. while (isTransparentExprWrapper(path.node)) {
  66517. path = path.get("expression");
  66518. }
  66519. return path;
  66520. }
  66521. function willPathCastToBoolean(path) {
  66522. var maybeWrapped = findOutermostTransparentParent(path);
  66523. var node = maybeWrapped.node,
  66524. parentPath = maybeWrapped.parentPath;
  66525. if (parentPath.isLogicalExpression()) {
  66526. var _parentPath$node = parentPath.node,
  66527. operator = _parentPath$node.operator,
  66528. right = _parentPath$node.right;
  66529. if (operator === "&&" || operator === "||" || operator === "??" && node === right) {
  66530. return willPathCastToBoolean(parentPath);
  66531. }
  66532. }
  66533. if (parentPath.isSequenceExpression()) {
  66534. var expressions = parentPath.node.expressions;
  66535. if (expressions[expressions.length - 1] === node) {
  66536. return willPathCastToBoolean(parentPath);
  66537. } else {
  66538. return true;
  66539. }
  66540. }
  66541. return parentPath.isConditional({
  66542. test: node
  66543. }) || parentPath.isUnaryExpression({
  66544. operator: "!"
  66545. }) || parentPath.isLoop({
  66546. test: node
  66547. });
  66548. }
  66549. function findOutermostTransparentParent(path) {
  66550. var maybeWrapped = path;
  66551. path.findParent(function (p) {
  66552. if (!isTransparentExprWrapper(p)) return true;
  66553. maybeWrapped = p;
  66554. });
  66555. return maybeWrapped;
  66556. }
  66557. var _templateObject$e, _templateObject2$7, _templateObject3$6, _templateObject4$2, _templateObject5$1, _templateObject6$1, _templateObject7;
  66558. var ast = template$2.expression.ast;
  66559. function isSimpleMemberExpression(expression) {
  66560. expression = skipTransparentExprWrappers(expression);
  66561. return isIdentifier(expression) || isSuper(expression) || isMemberExpression(expression) && !expression.computed && isSimpleMemberExpression(expression.object);
  66562. }
  66563. function needsMemoize(path) {
  66564. var optionalPath = path;
  66565. var scope = path.scope;
  66566. while (optionalPath.isOptionalMemberExpression() || optionalPath.isOptionalCallExpression()) {
  66567. var _optionalPath = optionalPath,
  66568. node = _optionalPath.node;
  66569. var childKey = optionalPath.isOptionalMemberExpression() ? "object" : "callee";
  66570. var childPath = skipTransparentExprWrappers(optionalPath.get(childKey));
  66571. if (node.optional) {
  66572. return !scope.isStatic(childPath.node);
  66573. }
  66574. optionalPath = childPath;
  66575. }
  66576. }
  66577. function transform$1(path, _ref) {
  66578. var pureGetters = _ref.pureGetters,
  66579. noDocumentAll = _ref.noDocumentAll;
  66580. var scope = path.scope;
  66581. var maybeWrapped = findOutermostTransparentParent(path);
  66582. var parentPath = maybeWrapped.parentPath;
  66583. var willReplacementCastToBoolean = willPathCastToBoolean(maybeWrapped);
  66584. var isDeleteOperation = false;
  66585. var parentIsCall = parentPath.isCallExpression({
  66586. callee: maybeWrapped.node
  66587. }) && path.isOptionalMemberExpression();
  66588. var optionals = [];
  66589. var optionalPath = path;
  66590. if (scope.path.isPattern() && needsMemoize(optionalPath)) {
  66591. path.replaceWith(template$2.ast(_templateObject$e || (_templateObject$e = _taggedTemplateLiteralLoose(["(() => ", ")()"])), path.node));
  66592. return;
  66593. }
  66594. while (optionalPath.isOptionalMemberExpression() || optionalPath.isOptionalCallExpression()) {
  66595. var _optionalPath2 = optionalPath,
  66596. node = _optionalPath2.node;
  66597. if (node.optional) {
  66598. optionals.push(node);
  66599. }
  66600. if (optionalPath.isOptionalMemberExpression()) {
  66601. optionalPath.node.type = "MemberExpression";
  66602. optionalPath = skipTransparentExprWrappers(optionalPath.get("object"));
  66603. } else if (optionalPath.isOptionalCallExpression()) {
  66604. optionalPath.node.type = "CallExpression";
  66605. optionalPath = skipTransparentExprWrappers(optionalPath.get("callee"));
  66606. }
  66607. }
  66608. var replacementPath = path;
  66609. if (parentPath.isUnaryExpression({
  66610. operator: "delete"
  66611. })) {
  66612. replacementPath = parentPath;
  66613. isDeleteOperation = true;
  66614. }
  66615. for (var i = optionals.length - 1; i >= 0; i--) {
  66616. var _node = optionals[i];
  66617. var isCall = isCallExpression(_node);
  66618. var replaceKey = isCall ? "callee" : "object";
  66619. var chainWithTypes = _node[replaceKey];
  66620. var chain = chainWithTypes;
  66621. while (isTransparentExprWrapper(chain)) {
  66622. chain = chain.expression;
  66623. }
  66624. var ref = void 0;
  66625. var check = void 0;
  66626. if (isCall && isIdentifier(chain, {
  66627. name: "eval"
  66628. })) {
  66629. check = ref = chain;
  66630. _node[replaceKey] = sequenceExpression([numericLiteral(0), ref]);
  66631. } else if (pureGetters && isCall && isSimpleMemberExpression(chain)) {
  66632. check = ref = chainWithTypes;
  66633. } else {
  66634. ref = scope.maybeGenerateMemoised(chain);
  66635. if (ref) {
  66636. check = assignmentExpression("=", cloneNode(ref), chainWithTypes);
  66637. _node[replaceKey] = ref;
  66638. } else {
  66639. check = ref = chainWithTypes;
  66640. }
  66641. }
  66642. if (isCall && isMemberExpression(chain)) {
  66643. if (pureGetters && isSimpleMemberExpression(chain)) {
  66644. _node.callee = chainWithTypes;
  66645. } else {
  66646. var _chain = chain,
  66647. object = _chain.object;
  66648. var context = scope.maybeGenerateMemoised(object);
  66649. if (context) {
  66650. chain.object = assignmentExpression("=", context, object);
  66651. } else if (isSuper(object)) {
  66652. context = thisExpression();
  66653. } else {
  66654. context = object;
  66655. }
  66656. _node.arguments.unshift(cloneNode(context));
  66657. _node.callee = memberExpression(_node.callee, identifier("call"));
  66658. }
  66659. }
  66660. var replacement = replacementPath.node;
  66661. if (i === 0 && parentIsCall) {
  66662. var _baseRef;
  66663. var _object = skipTransparentExprWrappers(replacementPath.get("object")).node;
  66664. var baseRef = void 0;
  66665. if (!pureGetters || !isSimpleMemberExpression(_object)) {
  66666. baseRef = scope.maybeGenerateMemoised(_object);
  66667. if (baseRef) {
  66668. replacement.object = assignmentExpression("=", baseRef, _object);
  66669. }
  66670. }
  66671. replacement = callExpression(memberExpression(replacement, identifier("bind")), [cloneNode((_baseRef = baseRef) != null ? _baseRef : _object)]);
  66672. }
  66673. if (willReplacementCastToBoolean) {
  66674. var nonNullishCheck = noDocumentAll ? ast(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["", " != null"])), cloneNode(check)) : ast(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n ", " !== null && ", " !== void 0"])), cloneNode(check), cloneNode(ref));
  66675. replacementPath.replaceWith(logicalExpression("&&", nonNullishCheck, replacement));
  66676. replacementPath = skipTransparentExprWrappers(replacementPath.get("right"));
  66677. } else {
  66678. var nullishCheck = noDocumentAll ? ast(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["", " == null"])), cloneNode(check)) : ast(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n ", " === null || ", " === void 0"])), cloneNode(check), cloneNode(ref));
  66679. var returnValue = isDeleteOperation ? ast(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["true"]))) : ast(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["void 0"])));
  66680. replacementPath.replaceWith(conditionalExpression(nullishCheck, returnValue, replacement));
  66681. replacementPath = skipTransparentExprWrappers(replacementPath.get("alternate"));
  66682. }
  66683. }
  66684. }
  66685. var _proposalOptionalChaining = declare(function (api, options) {
  66686. var _api$assumption, _api$assumption2;
  66687. api.assertVersion(7);
  66688. var _options$loose = options.loose,
  66689. loose = _options$loose === void 0 ? false : _options$loose;
  66690. var noDocumentAll = (_api$assumption = api.assumption("noDocumentAll")) != null ? _api$assumption : loose;
  66691. var pureGetters = (_api$assumption2 = api.assumption("pureGetters")) != null ? _api$assumption2 : loose;
  66692. return {
  66693. name: "proposal-optional-chaining",
  66694. inherits: lib$c["default"],
  66695. visitor: {
  66696. "OptionalCallExpression|OptionalMemberExpression": function OptionalCallExpressionOptionalMemberExpression(path) {
  66697. transform$1(path, {
  66698. noDocumentAll: noDocumentAll,
  66699. pureGetters: pureGetters
  66700. });
  66701. }
  66702. }
  66703. };
  66704. });
  66705. var buildOptimizedSequenceExpression = function buildOptimizedSequenceExpression(_ref) {
  66706. var assign = _ref.assign,
  66707. call = _ref.call,
  66708. path = _ref.path;
  66709. var placeholderNode = assign.left,
  66710. pipelineLeft = assign.right;
  66711. var calledExpression = call.callee;
  66712. var optimizeArrow = isArrowFunctionExpression(calledExpression) && isExpression(calledExpression.body) && !calledExpression.async && !calledExpression.generator;
  66713. var param;
  66714. if (optimizeArrow) {
  66715. var params = calledExpression.params;
  66716. if (params.length === 1 && isIdentifier(params[0])) {
  66717. param = params[0];
  66718. } else if (params.length > 0) {
  66719. optimizeArrow = false;
  66720. }
  66721. } else if (isIdentifier(calledExpression, {
  66722. name: "eval"
  66723. })) {
  66724. var evalSequence = sequenceExpression([numericLiteral(0), calledExpression]);
  66725. call.callee = evalSequence;
  66726. path.scope.push({
  66727. id: cloneNode(placeholderNode)
  66728. });
  66729. return sequenceExpression([assign, call]);
  66730. }
  66731. if (optimizeArrow && !param) {
  66732. return sequenceExpression([pipelineLeft, calledExpression.body]);
  66733. }
  66734. path.scope.push({
  66735. id: cloneNode(placeholderNode)
  66736. });
  66737. if (param) {
  66738. path.get("right").scope.rename(param.name, placeholderNode.name);
  66739. return sequenceExpression([assign, calledExpression.body]);
  66740. }
  66741. return sequenceExpression([assign, call]);
  66742. };
  66743. var minimalVisitor = {
  66744. BinaryExpression: function BinaryExpression(path) {
  66745. var scope = path.scope,
  66746. node = path.node;
  66747. var operator = node.operator,
  66748. left = node.left,
  66749. right = node.right;
  66750. if (operator !== "|>") return;
  66751. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  66752. var call = callExpression(right, [cloneNode(placeholder)]);
  66753. path.replaceWith(buildOptimizedSequenceExpression({
  66754. assign: assignmentExpression("=", cloneNode(placeholder), left),
  66755. call: call,
  66756. path: path
  66757. }));
  66758. }
  66759. };
  66760. var updateTopicReferenceVisitor = {
  66761. PipelinePrimaryTopicReference: function PipelinePrimaryTopicReference(path) {
  66762. path.replaceWith(cloneNode(this.topicId));
  66763. },
  66764. PipelineTopicExpression: function PipelineTopicExpression(path) {
  66765. path.skip();
  66766. }
  66767. };
  66768. var smartVisitor = {
  66769. BinaryExpression: function BinaryExpression(path) {
  66770. var scope = path.scope;
  66771. var node = path.node;
  66772. var operator = node.operator,
  66773. left = node.left,
  66774. right = node.right;
  66775. if (operator !== "|>") return;
  66776. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  66777. scope.push({
  66778. id: placeholder
  66779. });
  66780. var call;
  66781. if (isPipelineTopicExpression(right)) {
  66782. path.get("right").traverse(updateTopicReferenceVisitor, {
  66783. topicId: placeholder
  66784. });
  66785. call = right.expression;
  66786. } else {
  66787. var callee = right.callee;
  66788. if (isIdentifier(callee, {
  66789. name: "eval"
  66790. })) {
  66791. callee = sequenceExpression([numericLiteral(0), callee]);
  66792. }
  66793. call = callExpression(callee, [cloneNode(placeholder)]);
  66794. }
  66795. path.replaceWith(sequenceExpression([assignmentExpression("=", cloneNode(placeholder), left), call]));
  66796. }
  66797. };
  66798. var fsharpVisitor = {
  66799. BinaryExpression: function BinaryExpression(path) {
  66800. var scope = path.scope,
  66801. node = path.node;
  66802. var operator = node.operator,
  66803. left = node.left,
  66804. right = node.right;
  66805. if (operator !== "|>") return;
  66806. var placeholder = scope.generateUidIdentifierBasedOnNode(left);
  66807. var call = right.type === "AwaitExpression" ? awaitExpression(cloneNode(placeholder)) : callExpression(right, [cloneNode(placeholder)]);
  66808. var sequence = buildOptimizedSequenceExpression({
  66809. assign: assignmentExpression("=", cloneNode(placeholder), left),
  66810. call: call,
  66811. path: path
  66812. });
  66813. path.replaceWith(sequence);
  66814. }
  66815. };
  66816. var visitorsPerProposal = {
  66817. minimal: minimalVisitor,
  66818. smart: smartVisitor,
  66819. fsharp: fsharpVisitor
  66820. };
  66821. var proposalPipelineOperator = declare(function (api, options) {
  66822. api.assertVersion(7);
  66823. return {
  66824. name: "proposal-pipeline-operator",
  66825. inherits: syntaxPipelineOperator,
  66826. visitor: visitorsPerProposal[options.proposal]
  66827. };
  66828. });
  66829. var _proposalPrivateMethods = declare(function (api, options) {
  66830. api.assertVersion(7);
  66831. return createClassFeaturePlugin({
  66832. name: "proposal-private-methods",
  66833. api: api,
  66834. feature: FEATURES$1.privateMethods,
  66835. loose: options.loose,
  66836. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  66837. parserOpts.plugins.push("classPrivateMethods");
  66838. }
  66839. });
  66840. });
  66841. var _syntaxPrivatePropertyInObject = declare(function (api) {
  66842. api.assertVersion(7);
  66843. return {
  66844. name: "syntax-private-property-in-object",
  66845. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  66846. parserOpts.plugins.push("privateIn");
  66847. }
  66848. };
  66849. });
  66850. var _templateObject$d, _templateObject2$6, _templateObject3$5, _templateObject4$1, _templateObject5, _templateObject6;
  66851. var _proposalPrivatePropertyInObject = declare(function (_ref, _ref2) {
  66852. var assertVersion = _ref.assertVersion,
  66853. t = _ref.types,
  66854. template = _ref.template;
  66855. var loose = _ref2.loose;
  66856. assertVersion(7);
  66857. var classWeakSets = new WeakMap();
  66858. var fieldsWeakSets = new WeakMap();
  66859. function unshadow(name, targetScope, scope) {
  66860. while (scope !== targetScope) {
  66861. if (scope.hasOwnBinding(name)) scope.rename(name);
  66862. scope = scope.parent;
  66863. }
  66864. }
  66865. function injectToFieldInit(fieldPath, expr, before) {
  66866. if (before === void 0) {
  66867. before = false;
  66868. }
  66869. if (fieldPath.node.value) {
  66870. if (before) {
  66871. fieldPath.get("value").insertBefore(expr);
  66872. } else {
  66873. fieldPath.get("value").insertAfter(expr);
  66874. }
  66875. } else {
  66876. fieldPath.set("value", t.unaryExpression("void", expr));
  66877. }
  66878. }
  66879. function injectInitialization$1(classPath, init) {
  66880. var firstFieldPath;
  66881. var consturctorPath;
  66882. for (var _iterator = _createForOfIteratorHelperLoose(classPath.get("body.body")), _step; !(_step = _iterator()).done;) {
  66883. var el = _step.value;
  66884. if ((el.isClassProperty() || el.isClassPrivateProperty()) && !el.node["static"]) {
  66885. firstFieldPath = el;
  66886. break;
  66887. }
  66888. if (!consturctorPath && el.isClassMethod({
  66889. kind: "constructor"
  66890. })) {
  66891. consturctorPath = el;
  66892. }
  66893. }
  66894. if (firstFieldPath) {
  66895. injectToFieldInit(firstFieldPath, init, true);
  66896. } else {
  66897. injectInitialization(classPath, consturctorPath, [t.expressionStatement(init)]);
  66898. }
  66899. }
  66900. function getWeakSetId(weakSets, outerClass, reference, name, inject) {
  66901. if (name === void 0) {
  66902. name = "";
  66903. }
  66904. var id = classWeakSets.get(reference.node);
  66905. if (!id) {
  66906. id = outerClass.scope.generateUidIdentifier((name || "") + " brandCheck");
  66907. classWeakSets.set(reference.node, id);
  66908. inject(reference, template.expression.ast(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["", ".add(this)"])), t.cloneNode(id)));
  66909. var newExpr = t.newExpression(t.identifier("WeakSet"), []);
  66910. annotateAsPure(newExpr);
  66911. outerClass.insertBefore(template.ast(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteralLoose(["var ", " = ", ""])), id, newExpr));
  66912. }
  66913. return t.cloneNode(id);
  66914. }
  66915. return {
  66916. name: "proposal-private-property-in-object",
  66917. inherits: _syntaxPrivatePropertyInObject,
  66918. pre: function pre() {
  66919. enableFeature$1(this.file, FEATURES$1.privateIn, loose);
  66920. },
  66921. visitor: {
  66922. BinaryExpression: function BinaryExpression(path) {
  66923. var node = path.node;
  66924. if (node.operator !== "in") return;
  66925. if (!t.isPrivateName(node.left)) return;
  66926. var name = node.left.id.name;
  66927. var privateElement;
  66928. var outerClass = path.findParent(function (path) {
  66929. if (!path.isClass()) return false;
  66930. privateElement = path.get("body.body").find(function (_ref3) {
  66931. var node = _ref3.node;
  66932. return t.isPrivate(node) && node.key.id.name === name;
  66933. });
  66934. return !!privateElement;
  66935. });
  66936. if (outerClass.parentPath.scope.path.isPattern()) {
  66937. outerClass.replaceWith(template.ast(_templateObject3$5 || (_templateObject3$5 = _taggedTemplateLiteralLoose(["(() => ", ")()"])), outerClass.node));
  66938. return;
  66939. }
  66940. if (privateElement.isMethod()) {
  66941. if (privateElement.node["static"]) {
  66942. if (outerClass.node.id) {
  66943. unshadow(outerClass.node.id.name, outerClass.scope, path.scope);
  66944. } else {
  66945. outerClass.set("id", path.scope.generateUidIdentifier("class"));
  66946. }
  66947. path.replaceWith(template.expression.ast(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n ", " === ", "\n "])), t.cloneNode(outerClass.node.id), path.node.right));
  66948. } else {
  66949. var _outerClass$node$id;
  66950. var id = getWeakSetId(classWeakSets, outerClass, outerClass, (_outerClass$node$id = outerClass.node.id) == null ? void 0 : _outerClass$node$id.name, injectInitialization$1);
  66951. path.replaceWith(template.expression.ast(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["", ".has(", ")"])), id, path.node.right));
  66952. }
  66953. } else {
  66954. var _id = getWeakSetId(fieldsWeakSets, outerClass, privateElement, privateElement.node.key.id.name, injectToFieldInit);
  66955. path.replaceWith(template.expression.ast(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["", ".has(", ")"])), _id, path.node.right));
  66956. }
  66957. }
  66958. }
  66959. };
  66960. });
  66961. var syntaxThrowExpressions = declare(function (api) {
  66962. api.assertVersion(7);
  66963. return {
  66964. name: "syntax-throw-expressions",
  66965. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  66966. parserOpts.plugins.push("throwExpressions");
  66967. }
  66968. };
  66969. });
  66970. var proposalThrowExpressions = declare(function (api) {
  66971. api.assertVersion(7);
  66972. return {
  66973. name: "proposal-throw-expressions",
  66974. inherits: syntaxThrowExpressions,
  66975. visitor: {
  66976. UnaryExpression: function UnaryExpression(path) {
  66977. var _path$node = path.node,
  66978. operator = _path$node.operator,
  66979. argument = _path$node.argument;
  66980. if (operator !== "throw") return;
  66981. var arrow = functionExpression(null, [identifier("e")], blockStatement([throwStatement(identifier("e"))]));
  66982. path.replaceWith(callExpression(arrow, [argument]));
  66983. }
  66984. }
  66985. };
  66986. });
  66987. var regjsgen = createCommonjsModule(function (module, exports) {
  66988. (function () {
  66989. var objectTypes = {
  66990. 'function': true,
  66991. 'object': true
  66992. };
  66993. var root = objectTypes[typeof window] && window || this;
  66994. var freeExports = exports && !exports.nodeType && exports;
  66995. var hasFreeModule = module && !module.nodeType;
  66996. var freeGlobal = freeExports && hasFreeModule && typeof commonjsGlobal == 'object' && commonjsGlobal;
  66997. if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
  66998. root = freeGlobal;
  66999. }
  67000. var hasOwnProperty = Object.prototype.hasOwnProperty;
  67001. function fromCodePoint() {
  67002. var codePoint = Number(arguments[0]);
  67003. if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || Math.floor(codePoint) != codePoint) {
  67004. throw RangeError('Invalid code point: ' + codePoint);
  67005. }
  67006. if (codePoint <= 0xFFFF) {
  67007. return String.fromCharCode(codePoint);
  67008. } else {
  67009. codePoint -= 0x10000;
  67010. var highSurrogate = (codePoint >> 10) + 0xD800;
  67011. var lowSurrogate = codePoint % 0x400 + 0xDC00;
  67012. return String.fromCharCode(highSurrogate, lowSurrogate);
  67013. }
  67014. }
  67015. var assertTypeRegexMap = {};
  67016. function assertType(type, expected) {
  67017. if (expected.indexOf('|') == -1) {
  67018. if (type == expected) {
  67019. return;
  67020. }
  67021. throw Error('Invalid node type: ' + type + '; expected type: ' + expected);
  67022. }
  67023. expected = hasOwnProperty.call(assertTypeRegexMap, expected) ? assertTypeRegexMap[expected] : assertTypeRegexMap[expected] = RegExp('^(?:' + expected + ')$');
  67024. if (expected.test(type)) {
  67025. return;
  67026. }
  67027. throw Error('Invalid node type: ' + type + '; expected types: ' + expected);
  67028. }
  67029. function generate(node) {
  67030. var type = node.type;
  67031. if (hasOwnProperty.call(generators, type)) {
  67032. return generators[type](node);
  67033. }
  67034. throw Error('Invalid node type: ' + type);
  67035. }
  67036. function generateAlternative(node) {
  67037. assertType(node.type, 'alternative');
  67038. var terms = node.body,
  67039. i = -1,
  67040. length = terms.length,
  67041. result = '';
  67042. while (++i < length) {
  67043. result += generateTerm(terms[i]);
  67044. }
  67045. return result;
  67046. }
  67047. function generateAnchor(node) {
  67048. assertType(node.type, 'anchor');
  67049. switch (node.kind) {
  67050. case 'start':
  67051. return '^';
  67052. case 'end':
  67053. return '$';
  67054. case 'boundary':
  67055. return '\\b';
  67056. case 'not-boundary':
  67057. return '\\B';
  67058. default:
  67059. throw Error('Invalid assertion');
  67060. }
  67061. }
  67062. function generateAtom(node) {
  67063. assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
  67064. return generate(node);
  67065. }
  67066. function generateCharacterClass(node) {
  67067. assertType(node.type, 'characterClass');
  67068. var classRanges = node.body,
  67069. i = -1,
  67070. length = classRanges.length,
  67071. result = '';
  67072. if (node.negative) {
  67073. result += '^';
  67074. }
  67075. while (++i < length) {
  67076. result += generateClassAtom(classRanges[i]);
  67077. }
  67078. return '[' + result + ']';
  67079. }
  67080. function generateCharacterClassEscape(node) {
  67081. assertType(node.type, 'characterClassEscape');
  67082. return '\\' + node.value;
  67083. }
  67084. function generateUnicodePropertyEscape(node) {
  67085. assertType(node.type, 'unicodePropertyEscape');
  67086. return '\\' + (node.negative ? 'P' : 'p') + '{' + node.value + '}';
  67087. }
  67088. function generateCharacterClassRange(node) {
  67089. assertType(node.type, 'characterClassRange');
  67090. var min = node.min,
  67091. max = node.max;
  67092. if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
  67093. throw Error('Invalid character class range');
  67094. }
  67095. return generateClassAtom(min) + '-' + generateClassAtom(max);
  67096. }
  67097. function generateClassAtom(node) {
  67098. assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
  67099. return generate(node);
  67100. }
  67101. function generateDisjunction(node) {
  67102. assertType(node.type, 'disjunction');
  67103. var body = node.body,
  67104. i = -1,
  67105. length = body.length,
  67106. result = '';
  67107. while (++i < length) {
  67108. if (i != 0) {
  67109. result += '|';
  67110. }
  67111. result += generate(body[i]);
  67112. }
  67113. return result;
  67114. }
  67115. function generateDot(node) {
  67116. assertType(node.type, 'dot');
  67117. return '.';
  67118. }
  67119. function generateGroup(node) {
  67120. assertType(node.type, 'group');
  67121. var result = '';
  67122. switch (node.behavior) {
  67123. case 'normal':
  67124. if (node.name) {
  67125. result += '?<' + generateIdentifier(node.name) + '>';
  67126. }
  67127. break;
  67128. case 'ignore':
  67129. result += '?:';
  67130. break;
  67131. case 'lookahead':
  67132. result += '?=';
  67133. break;
  67134. case 'negativeLookahead':
  67135. result += '?!';
  67136. break;
  67137. case 'lookbehind':
  67138. result += '?<=';
  67139. break;
  67140. case 'negativeLookbehind':
  67141. result += '?<!';
  67142. break;
  67143. default:
  67144. throw Error('Invalid behaviour: ' + node.behaviour);
  67145. }
  67146. var body = node.body,
  67147. i = -1,
  67148. length = body.length;
  67149. while (++i < length) {
  67150. result += generate(body[i]);
  67151. }
  67152. return '(' + result + ')';
  67153. }
  67154. function generateIdentifier(node) {
  67155. assertType(node.type, 'identifier');
  67156. return node.value;
  67157. }
  67158. function generateQuantifier(node) {
  67159. assertType(node.type, 'quantifier');
  67160. var quantifier = '',
  67161. min = node.min,
  67162. max = node.max;
  67163. if (max == null) {
  67164. if (min == 0) {
  67165. quantifier = '*';
  67166. } else if (min == 1) {
  67167. quantifier = '+';
  67168. } else {
  67169. quantifier = '{' + min + ',}';
  67170. }
  67171. } else if (min == max) {
  67172. quantifier = '{' + min + '}';
  67173. } else if (min == 0 && max == 1) {
  67174. quantifier = '?';
  67175. } else {
  67176. quantifier = '{' + min + ',' + max + '}';
  67177. }
  67178. if (!node.greedy) {
  67179. quantifier += '?';
  67180. }
  67181. return generateAtom(node.body[0]) + quantifier;
  67182. }
  67183. function generateReference(node) {
  67184. assertType(node.type, 'reference');
  67185. if (node.matchIndex) {
  67186. return '\\' + node.matchIndex;
  67187. }
  67188. if (node.name) {
  67189. return '\\k<' + generateIdentifier(node.name) + '>';
  67190. }
  67191. throw new Error('Unknown reference type');
  67192. }
  67193. function generateTerm(node) {
  67194. assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|unicodePropertyEscape|value|dot');
  67195. return generate(node);
  67196. }
  67197. function generateValue(node) {
  67198. assertType(node.type, 'value');
  67199. var kind = node.kind,
  67200. codePoint = node.codePoint;
  67201. if (typeof codePoint != 'number') {
  67202. throw new Error('Invalid code point: ' + codePoint);
  67203. }
  67204. switch (kind) {
  67205. case 'controlLetter':
  67206. return '\\c' + fromCodePoint(codePoint + 64);
  67207. case 'hexadecimalEscape':
  67208. return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);
  67209. case 'identifier':
  67210. return '\\' + fromCodePoint(codePoint);
  67211. case 'null':
  67212. return '\\' + codePoint;
  67213. case 'octal':
  67214. return '\\' + codePoint.toString(8);
  67215. case 'singleEscape':
  67216. switch (codePoint) {
  67217. case 0x0008:
  67218. return '\\b';
  67219. case 0x0009:
  67220. return '\\t';
  67221. case 0x000A:
  67222. return '\\n';
  67223. case 0x000B:
  67224. return '\\v';
  67225. case 0x000C:
  67226. return '\\f';
  67227. case 0x000D:
  67228. return '\\r';
  67229. default:
  67230. throw Error('Invalid code point: ' + codePoint);
  67231. }
  67232. case 'symbol':
  67233. return fromCodePoint(codePoint);
  67234. case 'unicodeEscape':
  67235. return "\\u" + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);
  67236. case 'unicodeCodePointEscape':
  67237. return "\\u{" + codePoint.toString(16).toUpperCase() + '}';
  67238. default:
  67239. throw Error('Unsupported node kind: ' + kind);
  67240. }
  67241. }
  67242. var generators = {
  67243. 'alternative': generateAlternative,
  67244. 'anchor': generateAnchor,
  67245. 'characterClass': generateCharacterClass,
  67246. 'characterClassEscape': generateCharacterClassEscape,
  67247. 'characterClassRange': generateCharacterClassRange,
  67248. 'unicodePropertyEscape': generateUnicodePropertyEscape,
  67249. 'disjunction': generateDisjunction,
  67250. 'dot': generateDot,
  67251. 'group': generateGroup,
  67252. 'quantifier': generateQuantifier,
  67253. 'reference': generateReference,
  67254. 'value': generateValue
  67255. };
  67256. var regjsgen = {
  67257. 'generate': generate
  67258. };
  67259. if (freeExports && hasFreeModule) {
  67260. freeExports.generate = generate;
  67261. } else {
  67262. root.regjsgen = regjsgen;
  67263. }
  67264. }).call(commonjsGlobal);
  67265. }, "/$$rollup_base$$/node_modules/regjsgen");
  67266. var parser = createCommonjsModule(function (module) {
  67267. (function () {
  67268. var fromCodePoint = String.fromCodePoint || function () {
  67269. var stringFromCharCode = String.fromCharCode;
  67270. var floor = Math.floor;
  67271. return function fromCodePoint() {
  67272. var MAX_SIZE = 0x4000;
  67273. var codeUnits = [];
  67274. var highSurrogate;
  67275. var lowSurrogate;
  67276. var index = -1;
  67277. var length = arguments.length;
  67278. if (!length) {
  67279. return '';
  67280. }
  67281. var result = '';
  67282. while (++index < length) {
  67283. var codePoint = Number(arguments[index]);
  67284. if (!isFinite(codePoint) || codePoint < 0 || codePoint > 0x10FFFF || floor(codePoint) != codePoint) {
  67285. throw RangeError('Invalid code point: ' + codePoint);
  67286. }
  67287. if (codePoint <= 0xFFFF) {
  67288. codeUnits.push(codePoint);
  67289. } else {
  67290. codePoint -= 0x10000;
  67291. highSurrogate = (codePoint >> 10) + 0xD800;
  67292. lowSurrogate = codePoint % 0x400 + 0xDC00;
  67293. codeUnits.push(highSurrogate, lowSurrogate);
  67294. }
  67295. if (index + 1 == length || codeUnits.length > MAX_SIZE) {
  67296. result += stringFromCharCode.apply(null, codeUnits);
  67297. codeUnits.length = 0;
  67298. }
  67299. }
  67300. return result;
  67301. };
  67302. }();
  67303. function parse(str, flags, features) {
  67304. if (!features) {
  67305. features = {};
  67306. }
  67307. function addRaw(node) {
  67308. node.raw = str.substring(node.range[0], node.range[1]);
  67309. return node;
  67310. }
  67311. function updateRawStart(node, start) {
  67312. node.range[0] = start;
  67313. return addRaw(node);
  67314. }
  67315. function createAnchor(kind, rawLength) {
  67316. return addRaw({
  67317. type: 'anchor',
  67318. kind: kind,
  67319. range: [pos - rawLength, pos]
  67320. });
  67321. }
  67322. function createValue(kind, codePoint, from, to) {
  67323. return addRaw({
  67324. type: 'value',
  67325. kind: kind,
  67326. codePoint: codePoint,
  67327. range: [from, to]
  67328. });
  67329. }
  67330. function createEscaped(kind, codePoint, value, fromOffset) {
  67331. fromOffset = fromOffset || 0;
  67332. return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
  67333. }
  67334. function createCharacter(matches) {
  67335. var _char = matches[0];
  67336. var first = _char.charCodeAt(0);
  67337. if (hasUnicodeFlag) {
  67338. var second;
  67339. if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {
  67340. second = lookahead().charCodeAt(0);
  67341. if (second >= 0xDC00 && second <= 0xDFFF) {
  67342. pos++;
  67343. return createValue('symbol', (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000, pos - 2, pos);
  67344. }
  67345. }
  67346. }
  67347. return createValue('symbol', first, pos - 1, pos);
  67348. }
  67349. function createDisjunction(alternatives, from, to) {
  67350. return addRaw({
  67351. type: 'disjunction',
  67352. body: alternatives,
  67353. range: [from, to]
  67354. });
  67355. }
  67356. function createDot() {
  67357. return addRaw({
  67358. type: 'dot',
  67359. range: [pos - 1, pos]
  67360. });
  67361. }
  67362. function createCharacterClassEscape(value) {
  67363. return addRaw({
  67364. type: 'characterClassEscape',
  67365. value: value,
  67366. range: [pos - 2, pos]
  67367. });
  67368. }
  67369. function createReference(matchIndex) {
  67370. return addRaw({
  67371. type: 'reference',
  67372. matchIndex: parseInt(matchIndex, 10),
  67373. range: [pos - 1 - matchIndex.length, pos]
  67374. });
  67375. }
  67376. function createNamedReference(name) {
  67377. return addRaw({
  67378. type: 'reference',
  67379. name: name,
  67380. range: [name.range[0] - 3, pos]
  67381. });
  67382. }
  67383. function createGroup(behavior, disjunction, from, to) {
  67384. return addRaw({
  67385. type: 'group',
  67386. behavior: behavior,
  67387. body: disjunction,
  67388. range: [from, to]
  67389. });
  67390. }
  67391. function createQuantifier(min, max, from, to) {
  67392. if (to == null) {
  67393. from = pos - 1;
  67394. to = pos;
  67395. }
  67396. return addRaw({
  67397. type: 'quantifier',
  67398. min: min,
  67399. max: max,
  67400. greedy: true,
  67401. body: null,
  67402. range: [from, to]
  67403. });
  67404. }
  67405. function createAlternative(terms, from, to) {
  67406. return addRaw({
  67407. type: 'alternative',
  67408. body: terms,
  67409. range: [from, to]
  67410. });
  67411. }
  67412. function createCharacterClass(classRanges, negative, from, to) {
  67413. return addRaw({
  67414. type: 'characterClass',
  67415. body: classRanges,
  67416. negative: negative,
  67417. range: [from, to]
  67418. });
  67419. }
  67420. function createClassRange(min, max, from, to) {
  67421. if (min.codePoint > max.codePoint) {
  67422. bail('invalid range in character class', min.raw + '-' + max.raw, from, to);
  67423. }
  67424. return addRaw({
  67425. type: 'characterClassRange',
  67426. min: min,
  67427. max: max,
  67428. range: [from, to]
  67429. });
  67430. }
  67431. function flattenBody(body) {
  67432. if (body.type === 'alternative') {
  67433. return body.body;
  67434. } else {
  67435. return [body];
  67436. }
  67437. }
  67438. function incr(amount) {
  67439. amount = amount || 1;
  67440. var res = str.substring(pos, pos + amount);
  67441. pos += amount || 1;
  67442. return res;
  67443. }
  67444. function skip(value) {
  67445. if (!match(value)) {
  67446. bail('character', value);
  67447. }
  67448. }
  67449. function match(value) {
  67450. if (str.indexOf(value, pos) === pos) {
  67451. return incr(value.length);
  67452. }
  67453. }
  67454. function lookahead() {
  67455. return str[pos];
  67456. }
  67457. function current(value) {
  67458. return str.indexOf(value, pos) === pos;
  67459. }
  67460. function next(value) {
  67461. return str[pos + 1] === value;
  67462. }
  67463. function matchReg(regExp) {
  67464. var subStr = str.substring(pos);
  67465. var res = subStr.match(regExp);
  67466. if (res) {
  67467. res.range = [];
  67468. res.range[0] = pos;
  67469. incr(res[0].length);
  67470. res.range[1] = pos;
  67471. }
  67472. return res;
  67473. }
  67474. function parseDisjunction() {
  67475. var res = [],
  67476. from = pos;
  67477. res.push(parseAlternative());
  67478. while (match('|')) {
  67479. res.push(parseAlternative());
  67480. }
  67481. if (res.length === 1) {
  67482. return res[0];
  67483. }
  67484. return createDisjunction(res, from, pos);
  67485. }
  67486. function parseAlternative() {
  67487. var res = [],
  67488. from = pos;
  67489. var term;
  67490. while (term = parseTerm()) {
  67491. res.push(term);
  67492. }
  67493. if (res.length === 1) {
  67494. return res[0];
  67495. }
  67496. return createAlternative(res, from, pos);
  67497. }
  67498. function parseTerm() {
  67499. if (pos >= str.length || current('|') || current(')')) {
  67500. return null;
  67501. }
  67502. var anchor = parseAnchor();
  67503. if (anchor) {
  67504. return anchor;
  67505. }
  67506. var atom = parseAtomAndExtendedAtom();
  67507. if (!atom) {
  67508. bail('Expected atom');
  67509. }
  67510. var quantifier = parseQuantifier() || false;
  67511. if (quantifier) {
  67512. quantifier.body = flattenBody(atom);
  67513. updateRawStart(quantifier, atom.range[0]);
  67514. return quantifier;
  67515. }
  67516. return atom;
  67517. }
  67518. function parseGroup(matchA, typeA, matchB, typeB) {
  67519. var type = null,
  67520. from = pos;
  67521. if (match(matchA)) {
  67522. type = typeA;
  67523. } else if (match(matchB)) {
  67524. type = typeB;
  67525. } else {
  67526. return false;
  67527. }
  67528. return finishGroup(type, from);
  67529. }
  67530. function finishGroup(type, from) {
  67531. var body = parseDisjunction();
  67532. if (!body) {
  67533. bail('Expected disjunction');
  67534. }
  67535. skip(')');
  67536. var group = createGroup(type, flattenBody(body), from, pos);
  67537. if (type == 'normal') {
  67538. if (firstIteration) {
  67539. closedCaptureCounter++;
  67540. }
  67541. }
  67542. return group;
  67543. }
  67544. function parseAnchor() {
  67545. if (match('^')) {
  67546. return createAnchor('start', 1);
  67547. } else if (match('$')) {
  67548. return createAnchor('end', 1);
  67549. } else if (match('\\b')) {
  67550. return createAnchor('boundary', 2);
  67551. } else if (match('\\B')) {
  67552. return createAnchor('not-boundary', 2);
  67553. } else {
  67554. return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');
  67555. }
  67556. }
  67557. function parseQuantifier() {
  67558. var res,
  67559. from = pos;
  67560. var quantifier;
  67561. var min, max;
  67562. if (match('*')) {
  67563. quantifier = createQuantifier(0);
  67564. } else if (match('+')) {
  67565. quantifier = createQuantifier(1);
  67566. } else if (match('?')) {
  67567. quantifier = createQuantifier(0, 1);
  67568. } else if (res = matchReg(/^\{([0-9]+)\}/)) {
  67569. min = parseInt(res[1], 10);
  67570. quantifier = createQuantifier(min, min, res.range[0], res.range[1]);
  67571. } else if (res = matchReg(/^\{([0-9]+),\}/)) {
  67572. min = parseInt(res[1], 10);
  67573. quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);
  67574. } else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) {
  67575. min = parseInt(res[1], 10);
  67576. max = parseInt(res[2], 10);
  67577. if (min > max) {
  67578. bail('numbers out of order in {} quantifier', '', from, pos);
  67579. }
  67580. quantifier = createQuantifier(min, max, res.range[0], res.range[1]);
  67581. }
  67582. if (quantifier) {
  67583. if (match('?')) {
  67584. quantifier.greedy = false;
  67585. quantifier.range[1] += 1;
  67586. }
  67587. }
  67588. return quantifier;
  67589. }
  67590. function parseAtomAndExtendedAtom() {
  67591. var res;
  67592. if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
  67593. return createCharacter(res);
  67594. } else if (!hasUnicodeFlag && (res = matchReg(/^(?:]|})/))) {
  67595. return createCharacter(res);
  67596. } else if (match('.')) {
  67597. return createDot();
  67598. } else if (match('\\')) {
  67599. res = parseAtomEscape();
  67600. if (!res) {
  67601. if (!hasUnicodeFlag && lookahead() == 'c') {
  67602. return createValue('symbol', 92, pos - 1, pos);
  67603. }
  67604. bail('atomEscape');
  67605. }
  67606. return res;
  67607. } else if (res = parseCharacterClass()) {
  67608. return res;
  67609. } else if (features.lookbehind && (res = parseGroup('(?<=', 'lookbehind', '(?<!', 'negativeLookbehind'))) {
  67610. return res;
  67611. } else if (features.namedGroups && match("(?<")) {
  67612. var name = parseIdentifier();
  67613. skip(">");
  67614. var group = finishGroup("normal", name.range[0] - 3);
  67615. group.name = name;
  67616. return group;
  67617. } else {
  67618. return parseGroup('(?:', 'ignore', '(', 'normal');
  67619. }
  67620. }
  67621. function parseUnicodeSurrogatePairEscape(firstEscape) {
  67622. if (hasUnicodeFlag) {
  67623. var first, second;
  67624. if (firstEscape.kind == 'unicodeEscape' && (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF && current('\\') && next('u')) {
  67625. var prevPos = pos;
  67626. pos++;
  67627. var secondEscape = parseClassEscape();
  67628. if (secondEscape.kind == 'unicodeEscape' && (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {
  67629. firstEscape.range[1] = secondEscape.range[1];
  67630. firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  67631. firstEscape.type = 'value';
  67632. firstEscape.kind = 'unicodeCodePointEscape';
  67633. addRaw(firstEscape);
  67634. } else {
  67635. pos = prevPos;
  67636. }
  67637. }
  67638. }
  67639. return firstEscape;
  67640. }
  67641. function parseClassEscape() {
  67642. return parseAtomEscape(true);
  67643. }
  67644. function parseAtomEscape(insideCharacterClass) {
  67645. var res,
  67646. from = pos;
  67647. res = parseDecimalEscape() || parseNamedReference();
  67648. if (res) {
  67649. return res;
  67650. }
  67651. if (insideCharacterClass) {
  67652. if (match('b')) {
  67653. return createEscaped('singleEscape', 0x0008, '\\b');
  67654. } else if (match('B')) {
  67655. bail('\\B not possible inside of CharacterClass', '', from);
  67656. } else if (!hasUnicodeFlag && (res = matchReg(/^c([0-9])/))) {
  67657. return createEscaped('controlLetter', res[1] + 16, res[1], 2);
  67658. }
  67659. if (match('-') && hasUnicodeFlag) {
  67660. return createEscaped('singleEscape', 0x002d, '\\-');
  67661. }
  67662. }
  67663. res = parseCharacterEscape();
  67664. return res;
  67665. }
  67666. function parseDecimalEscape() {
  67667. var res, match;
  67668. if (res = matchReg(/^(?!0)\d+/)) {
  67669. match = res[0];
  67670. var refIdx = parseInt(res[0], 10);
  67671. if (refIdx <= closedCaptureCounter) {
  67672. return createReference(res[0]);
  67673. } else {
  67674. backrefDenied.push(refIdx);
  67675. incr(-res[0].length);
  67676. if (res = matchReg(/^[0-7]{1,3}/)) {
  67677. return createEscaped('octal', parseInt(res[0], 8), res[0], 1);
  67678. } else {
  67679. res = createCharacter(matchReg(/^[89]/));
  67680. return updateRawStart(res, res.range[0] - 1);
  67681. }
  67682. }
  67683. } else if (res = matchReg(/^[0-7]{1,3}/)) {
  67684. match = res[0];
  67685. if (/^0{1,3}$/.test(match)) {
  67686. return createEscaped('null', 0x0000, '0', match.length + 1);
  67687. } else {
  67688. return createEscaped('octal', parseInt(match, 8), match, 1);
  67689. }
  67690. } else if (res = matchReg(/^[dDsSwW]/)) {
  67691. return createCharacterClassEscape(res[0]);
  67692. }
  67693. return false;
  67694. }
  67695. function parseNamedReference() {
  67696. if (features.namedGroups && matchReg(/^k<(?=.*?>)/)) {
  67697. var name = parseIdentifier();
  67698. skip('>');
  67699. return createNamedReference(name);
  67700. }
  67701. }
  67702. function parseRegExpUnicodeEscapeSequence() {
  67703. var res;
  67704. if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {
  67705. return parseUnicodeSurrogatePairEscape(createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2));
  67706. } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) {
  67707. return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);
  67708. }
  67709. }
  67710. function parseCharacterEscape() {
  67711. var res;
  67712. var from = pos;
  67713. if (res = matchReg(/^[fnrtv]/)) {
  67714. var codePoint = 0;
  67715. switch (res[0]) {
  67716. case 't':
  67717. codePoint = 0x009;
  67718. break;
  67719. case 'n':
  67720. codePoint = 0x00A;
  67721. break;
  67722. case 'v':
  67723. codePoint = 0x00B;
  67724. break;
  67725. case 'f':
  67726. codePoint = 0x00C;
  67727. break;
  67728. case 'r':
  67729. codePoint = 0x00D;
  67730. break;
  67731. }
  67732. return createEscaped('singleEscape', codePoint, '\\' + res[0]);
  67733. } else if (res = matchReg(/^c([a-zA-Z])/)) {
  67734. return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);
  67735. } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {
  67736. return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);
  67737. } else if (res = parseRegExpUnicodeEscapeSequence()) {
  67738. if (!res || res.codePoint > 0x10FFFF) {
  67739. bail('Invalid escape sequence', null, from, pos);
  67740. }
  67741. return res;
  67742. } else if (features.unicodePropertyEscape && hasUnicodeFlag && (res = matchReg(/^([pP])\{([^\}]+)\}/))) {
  67743. return addRaw({
  67744. type: 'unicodePropertyEscape',
  67745. negative: res[1] === 'P',
  67746. value: res[2],
  67747. range: [res.range[0] - 1, res.range[1]],
  67748. raw: res[0]
  67749. });
  67750. } else {
  67751. return parseIdentityEscape();
  67752. }
  67753. }
  67754. function parseIdentifierAtom(check) {
  67755. var ch = lookahead();
  67756. var from = pos;
  67757. if (ch === '\\') {
  67758. incr();
  67759. var esc = parseRegExpUnicodeEscapeSequence();
  67760. if (!esc || !check(esc.codePoint)) {
  67761. bail('Invalid escape sequence', null, from, pos);
  67762. }
  67763. return fromCodePoint(esc.codePoint);
  67764. }
  67765. var code = ch.charCodeAt(0);
  67766. if (code >= 0xD800 && code <= 0xDBFF) {
  67767. ch += str[pos + 1];
  67768. var second = ch.charCodeAt(1);
  67769. if (second >= 0xDC00 && second <= 0xDFFF) {
  67770. code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  67771. }
  67772. }
  67773. if (!check(code)) return;
  67774. incr();
  67775. if (code > 0xFFFF) incr();
  67776. return ch;
  67777. }
  67778. function parseIdentifier() {
  67779. var start = pos;
  67780. var res = parseIdentifierAtom(isIdentifierStart);
  67781. if (!res) {
  67782. bail('Invalid identifier');
  67783. }
  67784. var ch;
  67785. while (ch = parseIdentifierAtom(isIdentifierPart)) {
  67786. res += ch;
  67787. }
  67788. return addRaw({
  67789. type: 'identifier',
  67790. value: res,
  67791. range: [start, pos]
  67792. });
  67793. }
  67794. function isIdentifierStart(ch) {
  67795. var NonAsciiIdentifierStart = /[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;
  67796. return ch === 36 || ch === 95 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 0x80 && NonAsciiIdentifierStart.test(fromCodePoint(ch));
  67797. }
  67798. function isIdentifierPart(ch) {
  67799. var NonAsciiIdentifierPartOnly = /[0-9_\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD30-\uDD39\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC66-\uDC6F\uDC7F-\uDC82\uDCB0-\uDCBA\uDCF0-\uDCF9\uDD00-\uDD02\uDD27-\uDD34\uDD36-\uDD3F\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDD0-\uDDD9\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC50-\uDC59\uDC5E\uDCB0-\uDCC3\uDCD0-\uDCD9\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDE50-\uDE59\uDEAB-\uDEB7\uDEC0-\uDEC9\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC2C-\uDC3A\uDCE0-\uDCE9\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC50-\uDC59\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD50-\uDD59\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDDA0-\uDDA9\uDEF3-\uDEF6]|\uD81A[\uDE60-\uDE69\uDEF0-\uDEF4\uDF30-\uDF36\uDF50-\uDF59]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A\uDD50-\uDD59]|\uDB40[\uDD00-\uDDEF]/;
  67800. return isIdentifierStart(ch) || ch >= 48 && ch <= 57 || ch >= 0x80 && NonAsciiIdentifierPartOnly.test(fromCodePoint(ch));
  67801. }
  67802. function parseIdentityEscape() {
  67803. var tmp;
  67804. var l = lookahead();
  67805. if (hasUnicodeFlag && /[\^\$\.\*\+\?\(\)\\\[\]\{\}\|\/]/.test(l) || !hasUnicodeFlag && l !== "c") {
  67806. if (l === "k" && features.lookbehind) {
  67807. return null;
  67808. }
  67809. tmp = incr();
  67810. return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
  67811. }
  67812. return null;
  67813. }
  67814. function parseCharacterClass() {
  67815. var res,
  67816. from = pos;
  67817. if (res = matchReg(/^\[\^/)) {
  67818. res = parseClassRanges();
  67819. skip(']');
  67820. return createCharacterClass(res, true, from, pos);
  67821. } else if (match('[')) {
  67822. res = parseClassRanges();
  67823. skip(']');
  67824. return createCharacterClass(res, false, from, pos);
  67825. }
  67826. return null;
  67827. }
  67828. function parseClassRanges() {
  67829. var res;
  67830. if (current(']')) {
  67831. return [];
  67832. } else {
  67833. res = parseNonemptyClassRanges();
  67834. if (!res) {
  67835. bail('nonEmptyClassRanges');
  67836. }
  67837. return res;
  67838. }
  67839. }
  67840. function parseHelperClassRanges(atom) {
  67841. var from, to, res;
  67842. if (current('-') && !next(']')) {
  67843. skip('-');
  67844. res = parseClassAtom();
  67845. if (!res) {
  67846. bail('classAtom');
  67847. }
  67848. to = pos;
  67849. var classRanges = parseClassRanges();
  67850. if (!classRanges) {
  67851. bail('classRanges');
  67852. }
  67853. from = atom.range[0];
  67854. if (classRanges.type === 'empty') {
  67855. return [createClassRange(atom, res, from, to)];
  67856. }
  67857. return [createClassRange(atom, res, from, to)].concat(classRanges);
  67858. }
  67859. res = parseNonemptyClassRangesNoDash();
  67860. if (!res) {
  67861. bail('nonEmptyClassRangesNoDash');
  67862. }
  67863. return [atom].concat(res);
  67864. }
  67865. function parseNonemptyClassRanges() {
  67866. var atom = parseClassAtom();
  67867. if (!atom) {
  67868. bail('classAtom');
  67869. }
  67870. if (current(']')) {
  67871. return [atom];
  67872. }
  67873. return parseHelperClassRanges(atom);
  67874. }
  67875. function parseNonemptyClassRangesNoDash() {
  67876. var res = parseClassAtom();
  67877. if (!res) {
  67878. bail('classAtom');
  67879. }
  67880. if (current(']')) {
  67881. return res;
  67882. }
  67883. return parseHelperClassRanges(res);
  67884. }
  67885. function parseClassAtom() {
  67886. if (match('-')) {
  67887. return createCharacter('-');
  67888. } else {
  67889. return parseClassAtomNoDash();
  67890. }
  67891. }
  67892. function parseClassAtomNoDash() {
  67893. var res;
  67894. if (res = matchReg(/^[^\\\]-]/)) {
  67895. return createCharacter(res[0]);
  67896. } else if (match('\\')) {
  67897. res = parseClassEscape();
  67898. if (!res) {
  67899. bail('classEscape');
  67900. }
  67901. return parseUnicodeSurrogatePairEscape(res);
  67902. }
  67903. }
  67904. function bail(message, details, from, to) {
  67905. from = from == null ? pos : from;
  67906. to = to == null ? from : to;
  67907. var contextStart = Math.max(0, from - 10);
  67908. var contextEnd = Math.min(to + 10, str.length);
  67909. var context = ' ' + str.substring(contextStart, contextEnd);
  67910. var pointer = ' ' + new Array(from - contextStart + 1).join(' ') + '^';
  67911. throw SyntaxError(message + ' at position ' + from + (details ? ': ' + details : '') + '\n' + context + '\n' + pointer);
  67912. }
  67913. var backrefDenied = [];
  67914. var closedCaptureCounter = 0;
  67915. var firstIteration = true;
  67916. var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
  67917. var pos = 0;
  67918. str = String(str);
  67919. if (str === '') {
  67920. str = '(?:)';
  67921. }
  67922. var result = parseDisjunction();
  67923. if (result.range[1] !== str.length) {
  67924. bail('Could not parse entire input - got stuck', '', result.range[1]);
  67925. }
  67926. for (var i = 0; i < backrefDenied.length; i++) {
  67927. if (backrefDenied[i] <= closedCaptureCounter) {
  67928. pos = 0;
  67929. firstIteration = false;
  67930. return parseDisjunction();
  67931. }
  67932. }
  67933. return result;
  67934. }
  67935. var regjsparser = {
  67936. parse: parse
  67937. };
  67938. if (module.exports) {
  67939. module.exports = regjsparser;
  67940. } else {
  67941. window.regjsparser = regjsparser;
  67942. }
  67943. })();
  67944. }, "/$$rollup_base$$/node_modules/regjsparser");
  67945. var regenerate = createCommonjsModule(function (module, exports) {
  67946. (function (root) {
  67947. var freeExports = exports;
  67948. var freeModule = module && module.exports == freeExports && module;
  67949. var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;
  67950. if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
  67951. root = freeGlobal;
  67952. }
  67953. var ERRORS = {
  67954. 'rangeOrder': "A range\u2019s `stop` value must be greater than or equal " + 'to the `start` value.',
  67955. 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'
  67956. };
  67957. var HIGH_SURROGATE_MIN = 0xD800;
  67958. var HIGH_SURROGATE_MAX = 0xDBFF;
  67959. var LOW_SURROGATE_MIN = 0xDC00;
  67960. var LOW_SURROGATE_MAX = 0xDFFF;
  67961. var regexNull = /\\x00([^0123456789]|$)/g;
  67962. var object = {};
  67963. var hasOwnProperty = object.hasOwnProperty;
  67964. var extend = function extend(destination, source) {
  67965. var key;
  67966. for (key in source) {
  67967. if (hasOwnProperty.call(source, key)) {
  67968. destination[key] = source[key];
  67969. }
  67970. }
  67971. return destination;
  67972. };
  67973. var forEach = function forEach(array, callback) {
  67974. var index = -1;
  67975. var length = array.length;
  67976. while (++index < length) {
  67977. callback(array[index], index);
  67978. }
  67979. };
  67980. var toString = object.toString;
  67981. var isArray = function isArray(value) {
  67982. return toString.call(value) == '[object Array]';
  67983. };
  67984. var isNumber = function isNumber(value) {
  67985. return typeof value == 'number' || toString.call(value) == '[object Number]';
  67986. };
  67987. var zeroes = '0000';
  67988. var pad = function pad(number, totalCharacters) {
  67989. var string = String(number);
  67990. return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;
  67991. };
  67992. var hex = function hex(number) {
  67993. return Number(number).toString(16).toUpperCase();
  67994. };
  67995. var slice = [].slice;
  67996. var dataFromCodePoints = function dataFromCodePoints(codePoints) {
  67997. var index = -1;
  67998. var length = codePoints.length;
  67999. var max = length - 1;
  68000. var result = [];
  68001. var isStart = true;
  68002. var tmp;
  68003. var previous = 0;
  68004. while (++index < length) {
  68005. tmp = codePoints[index];
  68006. if (isStart) {
  68007. result.push(tmp);
  68008. previous = tmp;
  68009. isStart = false;
  68010. } else {
  68011. if (tmp == previous + 1) {
  68012. if (index != max) {
  68013. previous = tmp;
  68014. continue;
  68015. } else {
  68016. isStart = true;
  68017. result.push(tmp + 1);
  68018. }
  68019. } else {
  68020. result.push(previous + 1, tmp);
  68021. previous = tmp;
  68022. }
  68023. }
  68024. }
  68025. if (!isStart) {
  68026. result.push(tmp + 1);
  68027. }
  68028. return result;
  68029. };
  68030. var dataRemove = function dataRemove(data, codePoint) {
  68031. var index = 0;
  68032. var start;
  68033. var end;
  68034. var length = data.length;
  68035. while (index < length) {
  68036. start = data[index];
  68037. end = data[index + 1];
  68038. if (codePoint >= start && codePoint < end) {
  68039. if (codePoint == start) {
  68040. if (end == start + 1) {
  68041. data.splice(index, 2);
  68042. return data;
  68043. } else {
  68044. data[index] = codePoint + 1;
  68045. return data;
  68046. }
  68047. } else if (codePoint == end - 1) {
  68048. data[index + 1] = codePoint;
  68049. return data;
  68050. } else {
  68051. data.splice(index, 2, start, codePoint, codePoint + 1, end);
  68052. return data;
  68053. }
  68054. }
  68055. index += 2;
  68056. }
  68057. return data;
  68058. };
  68059. var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) {
  68060. if (rangeEnd < rangeStart) {
  68061. throw Error(ERRORS.rangeOrder);
  68062. }
  68063. var index = 0;
  68064. var start;
  68065. var end;
  68066. while (index < data.length) {
  68067. start = data[index];
  68068. end = data[index + 1] - 1;
  68069. if (start > rangeEnd) {
  68070. return data;
  68071. }
  68072. if (rangeStart <= start && rangeEnd >= end) {
  68073. data.splice(index, 2);
  68074. continue;
  68075. }
  68076. if (rangeStart >= start && rangeEnd < end) {
  68077. if (rangeStart == start) {
  68078. data[index] = rangeEnd + 1;
  68079. data[index + 1] = end + 1;
  68080. return data;
  68081. }
  68082. data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);
  68083. return data;
  68084. }
  68085. if (rangeStart >= start && rangeStart <= end) {
  68086. data[index + 1] = rangeStart;
  68087. } else if (rangeEnd >= start && rangeEnd <= end) {
  68088. data[index] = rangeEnd + 1;
  68089. return data;
  68090. }
  68091. index += 2;
  68092. }
  68093. return data;
  68094. };
  68095. var dataAdd = function dataAdd(data, codePoint) {
  68096. var index = 0;
  68097. var start;
  68098. var end;
  68099. var lastIndex = null;
  68100. var length = data.length;
  68101. if (codePoint < 0x0 || codePoint > 0x10FFFF) {
  68102. throw RangeError(ERRORS.codePointRange);
  68103. }
  68104. while (index < length) {
  68105. start = data[index];
  68106. end = data[index + 1];
  68107. if (codePoint >= start && codePoint < end) {
  68108. return data;
  68109. }
  68110. if (codePoint == start - 1) {
  68111. data[index] = codePoint;
  68112. return data;
  68113. }
  68114. if (start > codePoint) {
  68115. data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);
  68116. return data;
  68117. }
  68118. if (codePoint == end) {
  68119. if (codePoint + 1 == data[index + 2]) {
  68120. data.splice(index, 4, start, data[index + 3]);
  68121. return data;
  68122. }
  68123. data[index + 1] = codePoint + 1;
  68124. return data;
  68125. }
  68126. lastIndex = index;
  68127. index += 2;
  68128. }
  68129. data.push(codePoint, codePoint + 1);
  68130. return data;
  68131. };
  68132. var dataAddData = function dataAddData(dataA, dataB) {
  68133. var index = 0;
  68134. var start;
  68135. var end;
  68136. var data = dataA.slice();
  68137. var length = dataB.length;
  68138. while (index < length) {
  68139. start = dataB[index];
  68140. end = dataB[index + 1] - 1;
  68141. if (start == end) {
  68142. data = dataAdd(data, start);
  68143. } else {
  68144. data = dataAddRange(data, start, end);
  68145. }
  68146. index += 2;
  68147. }
  68148. return data;
  68149. };
  68150. var dataRemoveData = function dataRemoveData(dataA, dataB) {
  68151. var index = 0;
  68152. var start;
  68153. var end;
  68154. var data = dataA.slice();
  68155. var length = dataB.length;
  68156. while (index < length) {
  68157. start = dataB[index];
  68158. end = dataB[index + 1] - 1;
  68159. if (start == end) {
  68160. data = dataRemove(data, start);
  68161. } else {
  68162. data = dataRemoveRange(data, start, end);
  68163. }
  68164. index += 2;
  68165. }
  68166. return data;
  68167. };
  68168. var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) {
  68169. if (rangeEnd < rangeStart) {
  68170. throw Error(ERRORS.rangeOrder);
  68171. }
  68172. if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {
  68173. throw RangeError(ERRORS.codePointRange);
  68174. }
  68175. var index = 0;
  68176. var start;
  68177. var end;
  68178. var added = false;
  68179. var length = data.length;
  68180. while (index < length) {
  68181. start = data[index];
  68182. end = data[index + 1];
  68183. if (added) {
  68184. if (start == rangeEnd + 1) {
  68185. data.splice(index - 1, 2);
  68186. return data;
  68187. }
  68188. if (start > rangeEnd) {
  68189. return data;
  68190. }
  68191. if (start >= rangeStart && start <= rangeEnd) {
  68192. if (end > rangeStart && end - 1 <= rangeEnd) {
  68193. data.splice(index, 2);
  68194. index -= 2;
  68195. } else {
  68196. data.splice(index - 1, 2);
  68197. index -= 2;
  68198. }
  68199. }
  68200. } else if (start == rangeEnd + 1 || start == rangeEnd) {
  68201. data[index] = rangeStart;
  68202. return data;
  68203. } else if (start > rangeEnd) {
  68204. data.splice(index, 0, rangeStart, rangeEnd + 1);
  68205. return data;
  68206. } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {
  68207. return data;
  68208. } else if (rangeStart >= start && rangeStart < end || end == rangeStart) {
  68209. data[index + 1] = rangeEnd + 1;
  68210. added = true;
  68211. } else if (rangeStart <= start && rangeEnd + 1 >= end) {
  68212. data[index] = rangeStart;
  68213. data[index + 1] = rangeEnd + 1;
  68214. added = true;
  68215. }
  68216. index += 2;
  68217. }
  68218. if (!added) {
  68219. data.push(rangeStart, rangeEnd + 1);
  68220. }
  68221. return data;
  68222. };
  68223. var dataContains = function dataContains(data, codePoint) {
  68224. var index = 0;
  68225. var length = data.length;
  68226. var start = data[index];
  68227. var end = data[length - 1];
  68228. if (length >= 2) {
  68229. if (codePoint < start || codePoint > end) {
  68230. return false;
  68231. }
  68232. }
  68233. while (index < length) {
  68234. start = data[index];
  68235. end = data[index + 1];
  68236. if (codePoint >= start && codePoint < end) {
  68237. return true;
  68238. }
  68239. index += 2;
  68240. }
  68241. return false;
  68242. };
  68243. var dataIntersection = function dataIntersection(data, codePoints) {
  68244. var index = 0;
  68245. var length = codePoints.length;
  68246. var codePoint;
  68247. var result = [];
  68248. while (index < length) {
  68249. codePoint = codePoints[index];
  68250. if (dataContains(data, codePoint)) {
  68251. result.push(codePoint);
  68252. }
  68253. ++index;
  68254. }
  68255. return dataFromCodePoints(result);
  68256. };
  68257. var dataIsEmpty = function dataIsEmpty(data) {
  68258. return !data.length;
  68259. };
  68260. var dataIsSingleton = function dataIsSingleton(data) {
  68261. return data.length == 2 && data[0] + 1 == data[1];
  68262. };
  68263. var dataToArray = function dataToArray(data) {
  68264. var index = 0;
  68265. var start;
  68266. var end;
  68267. var result = [];
  68268. var length = data.length;
  68269. while (index < length) {
  68270. start = data[index];
  68271. end = data[index + 1];
  68272. while (start < end) {
  68273. result.push(start);
  68274. ++start;
  68275. }
  68276. index += 2;
  68277. }
  68278. return result;
  68279. };
  68280. var floor = Math.floor;
  68281. var highSurrogate = function highSurrogate(codePoint) {
  68282. return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);
  68283. };
  68284. var lowSurrogate = function lowSurrogate(codePoint) {
  68285. return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);
  68286. };
  68287. var stringFromCharCode = String.fromCharCode;
  68288. var codePointToString = function codePointToString(codePoint) {
  68289. var string;
  68290. if (codePoint == 0x09) {
  68291. string = '\\t';
  68292. } else if (codePoint == 0x0A) {
  68293. string = '\\n';
  68294. } else if (codePoint == 0x0C) {
  68295. string = '\\f';
  68296. } else if (codePoint == 0x0D) {
  68297. string = '\\r';
  68298. } else if (codePoint == 0x2D) {
  68299. string = '\\x2D';
  68300. } else if (codePoint == 0x5C) {
  68301. string = '\\\\';
  68302. } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2E || codePoint == 0x2F || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {
  68303. string = '\\' + stringFromCharCode(codePoint);
  68304. } else if (codePoint >= 0x20 && codePoint <= 0x7E) {
  68305. string = stringFromCharCode(codePoint);
  68306. } else if (codePoint <= 0xFF) {
  68307. string = '\\x' + pad(hex(codePoint), 2);
  68308. } else {
  68309. string = "\\u" + pad(hex(codePoint), 4);
  68310. }
  68311. return string;
  68312. };
  68313. var codePointToStringUnicode = function codePointToStringUnicode(codePoint) {
  68314. if (codePoint <= 0xFFFF) {
  68315. return codePointToString(codePoint);
  68316. }
  68317. return "\\u{" + codePoint.toString(16).toUpperCase() + '}';
  68318. };
  68319. var symbolToCodePoint = function symbolToCodePoint(symbol) {
  68320. var length = symbol.length;
  68321. var first = symbol.charCodeAt(0);
  68322. var second;
  68323. if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1) {
  68324. second = symbol.charCodeAt(1);
  68325. return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;
  68326. }
  68327. return first;
  68328. };
  68329. var createBMPCharacterClasses = function createBMPCharacterClasses(data) {
  68330. var result = '';
  68331. var index = 0;
  68332. var start;
  68333. var end;
  68334. var length = data.length;
  68335. if (dataIsSingleton(data)) {
  68336. return codePointToString(data[0]);
  68337. }
  68338. while (index < length) {
  68339. start = data[index];
  68340. end = data[index + 1] - 1;
  68341. if (start == end) {
  68342. result += codePointToString(start);
  68343. } else if (start + 1 == end) {
  68344. result += codePointToString(start) + codePointToString(end);
  68345. } else {
  68346. result += codePointToString(start) + '-' + codePointToString(end);
  68347. }
  68348. index += 2;
  68349. }
  68350. return '[' + result + ']';
  68351. };
  68352. var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) {
  68353. var result = '';
  68354. var index = 0;
  68355. var start;
  68356. var end;
  68357. var length = data.length;
  68358. if (dataIsSingleton(data)) {
  68359. return codePointToStringUnicode(data[0]);
  68360. }
  68361. while (index < length) {
  68362. start = data[index];
  68363. end = data[index + 1] - 1;
  68364. if (start == end) {
  68365. result += codePointToStringUnicode(start);
  68366. } else if (start + 1 == end) {
  68367. result += codePointToStringUnicode(start) + codePointToStringUnicode(end);
  68368. } else {
  68369. result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);
  68370. }
  68371. index += 2;
  68372. }
  68373. return '[' + result + ']';
  68374. };
  68375. var splitAtBMP = function splitAtBMP(data) {
  68376. var loneHighSurrogates = [];
  68377. var loneLowSurrogates = [];
  68378. var bmp = [];
  68379. var astral = [];
  68380. var index = 0;
  68381. var start;
  68382. var end;
  68383. var length = data.length;
  68384. while (index < length) {
  68385. start = data[index];
  68386. end = data[index + 1] - 1;
  68387. if (start < HIGH_SURROGATE_MIN) {
  68388. if (end < HIGH_SURROGATE_MIN) {
  68389. bmp.push(start, end + 1);
  68390. }
  68391. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  68392. bmp.push(start, HIGH_SURROGATE_MIN);
  68393. loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);
  68394. }
  68395. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  68396. bmp.push(start, HIGH_SURROGATE_MIN);
  68397. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  68398. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  68399. }
  68400. if (end > LOW_SURROGATE_MAX) {
  68401. bmp.push(start, HIGH_SURROGATE_MIN);
  68402. loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
  68403. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  68404. if (end <= 0xFFFF) {
  68405. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  68406. } else {
  68407. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  68408. astral.push(0xFFFF + 1, end + 1);
  68409. }
  68410. }
  68411. } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {
  68412. if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
  68413. loneHighSurrogates.push(start, end + 1);
  68414. }
  68415. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  68416. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  68417. loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
  68418. }
  68419. if (end > LOW_SURROGATE_MAX) {
  68420. loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
  68421. loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
  68422. if (end <= 0xFFFF) {
  68423. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  68424. } else {
  68425. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  68426. astral.push(0xFFFF + 1, end + 1);
  68427. }
  68428. }
  68429. } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {
  68430. if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
  68431. loneLowSurrogates.push(start, end + 1);
  68432. }
  68433. if (end > LOW_SURROGATE_MAX) {
  68434. loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);
  68435. if (end <= 0xFFFF) {
  68436. bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
  68437. } else {
  68438. bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
  68439. astral.push(0xFFFF + 1, end + 1);
  68440. }
  68441. }
  68442. } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {
  68443. if (end <= 0xFFFF) {
  68444. bmp.push(start, end + 1);
  68445. } else {
  68446. bmp.push(start, 0xFFFF + 1);
  68447. astral.push(0xFFFF + 1, end + 1);
  68448. }
  68449. } else {
  68450. astral.push(start, end + 1);
  68451. }
  68452. index += 2;
  68453. }
  68454. return {
  68455. 'loneHighSurrogates': loneHighSurrogates,
  68456. 'loneLowSurrogates': loneLowSurrogates,
  68457. 'bmp': bmp,
  68458. 'astral': astral
  68459. };
  68460. };
  68461. var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) {
  68462. var result = [];
  68463. var tmpLow = [];
  68464. var addLow = false;
  68465. var mapping;
  68466. var nextMapping;
  68467. var highSurrogates;
  68468. var lowSurrogates;
  68469. var nextHighSurrogates;
  68470. var nextLowSurrogates;
  68471. var index = -1;
  68472. var length = surrogateMappings.length;
  68473. while (++index < length) {
  68474. mapping = surrogateMappings[index];
  68475. nextMapping = surrogateMappings[index + 1];
  68476. if (!nextMapping) {
  68477. result.push(mapping);
  68478. continue;
  68479. }
  68480. highSurrogates = mapping[0];
  68481. lowSurrogates = mapping[1];
  68482. nextHighSurrogates = nextMapping[0];
  68483. nextLowSurrogates = nextMapping[1];
  68484. tmpLow = lowSurrogates;
  68485. while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {
  68486. if (dataIsSingleton(nextLowSurrogates)) {
  68487. tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);
  68488. } else {
  68489. tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);
  68490. }
  68491. ++index;
  68492. mapping = surrogateMappings[index];
  68493. highSurrogates = mapping[0];
  68494. lowSurrogates = mapping[1];
  68495. nextMapping = surrogateMappings[index + 1];
  68496. nextHighSurrogates = nextMapping && nextMapping[0];
  68497. nextLowSurrogates = nextMapping && nextMapping[1];
  68498. addLow = true;
  68499. }
  68500. result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);
  68501. addLow = false;
  68502. }
  68503. return optimizeByLowSurrogates(result);
  68504. };
  68505. var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) {
  68506. if (surrogateMappings.length == 1) {
  68507. return surrogateMappings;
  68508. }
  68509. var index = -1;
  68510. var innerIndex = -1;
  68511. while (++index < surrogateMappings.length) {
  68512. var mapping = surrogateMappings[index];
  68513. var lowSurrogates = mapping[1];
  68514. var lowSurrogateStart = lowSurrogates[0];
  68515. var lowSurrogateEnd = lowSurrogates[1];
  68516. innerIndex = index;
  68517. while (++innerIndex < surrogateMappings.length) {
  68518. var otherMapping = surrogateMappings[innerIndex];
  68519. var otherLowSurrogates = otherMapping[1];
  68520. var otherLowSurrogateStart = otherLowSurrogates[0];
  68521. var otherLowSurrogateEnd = otherLowSurrogates[1];
  68522. if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd && otherLowSurrogates.length === 2) {
  68523. if (dataIsSingleton(otherMapping[0])) {
  68524. mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);
  68525. } else {
  68526. mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);
  68527. }
  68528. surrogateMappings.splice(innerIndex, 1);
  68529. --innerIndex;
  68530. }
  68531. }
  68532. }
  68533. return surrogateMappings;
  68534. };
  68535. var surrogateSet = function surrogateSet(data) {
  68536. if (!data.length) {
  68537. return [];
  68538. }
  68539. var index = 0;
  68540. var start;
  68541. var end;
  68542. var startHigh;
  68543. var startLow;
  68544. var endHigh;
  68545. var endLow;
  68546. var surrogateMappings = [];
  68547. var length = data.length;
  68548. while (index < length) {
  68549. start = data[index];
  68550. end = data[index + 1] - 1;
  68551. startHigh = highSurrogate(start);
  68552. startLow = lowSurrogate(start);
  68553. endHigh = highSurrogate(end);
  68554. endLow = lowSurrogate(end);
  68555. var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;
  68556. var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;
  68557. var complete = false;
  68558. if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {
  68559. surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);
  68560. complete = true;
  68561. } else {
  68562. surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);
  68563. }
  68564. if (!complete && startHigh + 1 < endHigh) {
  68565. if (endsWithHighestLowSurrogate) {
  68566. surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  68567. complete = true;
  68568. } else {
  68569. surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);
  68570. }
  68571. }
  68572. if (!complete) {
  68573. surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);
  68574. }
  68575. index += 2;
  68576. }
  68577. return optimizeSurrogateMappings(surrogateMappings);
  68578. };
  68579. var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) {
  68580. var result = [];
  68581. forEach(surrogateMappings, function (surrogateMapping) {
  68582. var highSurrogates = surrogateMapping[0];
  68583. var lowSurrogates = surrogateMapping[1];
  68584. result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));
  68585. });
  68586. return result.join('|');
  68587. };
  68588. var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) {
  68589. if (hasUnicodeFlag) {
  68590. return createUnicodeCharacterClasses(data);
  68591. }
  68592. var result = [];
  68593. var parts = splitAtBMP(data);
  68594. var loneHighSurrogates = parts.loneHighSurrogates;
  68595. var loneLowSurrogates = parts.loneLowSurrogates;
  68596. var bmp = parts.bmp;
  68597. var astral = parts.astral;
  68598. var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
  68599. var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
  68600. var surrogateMappings = surrogateSet(astral);
  68601. if (bmpOnly) {
  68602. bmp = dataAddData(bmp, loneHighSurrogates);
  68603. hasLoneHighSurrogates = false;
  68604. bmp = dataAddData(bmp, loneLowSurrogates);
  68605. hasLoneLowSurrogates = false;
  68606. }
  68607. if (!dataIsEmpty(bmp)) {
  68608. result.push(createBMPCharacterClasses(bmp));
  68609. }
  68610. if (surrogateMappings.length) {
  68611. result.push(createSurrogateCharacterClasses(surrogateMappings));
  68612. }
  68613. if (hasLoneHighSurrogates) {
  68614. result.push(createBMPCharacterClasses(loneHighSurrogates) + "(?![\\uDC00-\\uDFFF])");
  68615. }
  68616. if (hasLoneLowSurrogates) {
  68617. result.push("(?:[^\\uD800-\\uDBFF]|^)" + createBMPCharacterClasses(loneLowSurrogates));
  68618. }
  68619. return result.join('|');
  68620. };
  68621. var regenerate = function regenerate(value) {
  68622. if (arguments.length > 1) {
  68623. value = slice.call(arguments);
  68624. }
  68625. if (this instanceof regenerate) {
  68626. this.data = [];
  68627. return value ? this.add(value) : this;
  68628. }
  68629. return new regenerate().add(value);
  68630. };
  68631. regenerate.version = '1.4.2';
  68632. var proto = regenerate.prototype;
  68633. extend(proto, {
  68634. 'add': function add(value) {
  68635. var $this = this;
  68636. if (value == null) {
  68637. return $this;
  68638. }
  68639. if (value instanceof regenerate) {
  68640. $this.data = dataAddData($this.data, value.data);
  68641. return $this;
  68642. }
  68643. if (arguments.length > 1) {
  68644. value = slice.call(arguments);
  68645. }
  68646. if (isArray(value)) {
  68647. forEach(value, function (item) {
  68648. $this.add(item);
  68649. });
  68650. return $this;
  68651. }
  68652. $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  68653. return $this;
  68654. },
  68655. 'remove': function remove(value) {
  68656. var $this = this;
  68657. if (value == null) {
  68658. return $this;
  68659. }
  68660. if (value instanceof regenerate) {
  68661. $this.data = dataRemoveData($this.data, value.data);
  68662. return $this;
  68663. }
  68664. if (arguments.length > 1) {
  68665. value = slice.call(arguments);
  68666. }
  68667. if (isArray(value)) {
  68668. forEach(value, function (item) {
  68669. $this.remove(item);
  68670. });
  68671. return $this;
  68672. }
  68673. $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));
  68674. return $this;
  68675. },
  68676. 'addRange': function addRange(start, end) {
  68677. var $this = this;
  68678. $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));
  68679. return $this;
  68680. },
  68681. 'removeRange': function removeRange(start, end) {
  68682. var $this = this;
  68683. var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);
  68684. var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);
  68685. $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);
  68686. return $this;
  68687. },
  68688. 'intersection': function intersection(argument) {
  68689. var $this = this;
  68690. var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;
  68691. $this.data = dataIntersection($this.data, array);
  68692. return $this;
  68693. },
  68694. 'contains': function contains(codePoint) {
  68695. return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));
  68696. },
  68697. 'clone': function clone() {
  68698. var set = new regenerate();
  68699. set.data = this.data.slice(0);
  68700. return set;
  68701. },
  68702. 'toString': function toString(options) {
  68703. var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);
  68704. if (!result) {
  68705. return '[]';
  68706. }
  68707. return result.replace(regexNull, '\\0$1');
  68708. },
  68709. 'toRegExp': function toRegExp(flags) {
  68710. var pattern = this.toString(flags && flags.indexOf('u') != -1 ? {
  68711. 'hasUnicodeFlag': true
  68712. } : null);
  68713. return RegExp(pattern, flags || '');
  68714. },
  68715. 'valueOf': function valueOf() {
  68716. return dataToArray(this.data);
  68717. }
  68718. });
  68719. proto.toArray = proto.valueOf;
  68720. if (freeExports && !freeExports.nodeType) {
  68721. if (freeModule) {
  68722. freeModule.exports = regenerate;
  68723. } else {
  68724. freeExports.regenerate = regenerate;
  68725. }
  68726. } else {
  68727. root.regenerate = regenerate;
  68728. }
  68729. })(commonjsGlobal);
  68730. }, "/$$rollup_base$$/node_modules/regenerate");
  68731. var unicodeCanonicalPropertyNamesEcmascript = new Set(['General_Category', 'Script', 'Script_Extensions', 'Alphabetic', 'Any', 'ASCII', 'ASCII_Hex_Digit', 'Assigned', 'Bidi_Control', 'Bidi_Mirrored', 'Case_Ignorable', 'Cased', 'Changes_When_Casefolded', 'Changes_When_Casemapped', 'Changes_When_Lowercased', 'Changes_When_NFKC_Casefolded', 'Changes_When_Titlecased', 'Changes_When_Uppercased', 'Dash', 'Default_Ignorable_Code_Point', 'Deprecated', 'Diacritic', 'Emoji', 'Emoji_Component', 'Emoji_Modifier', 'Emoji_Modifier_Base', 'Emoji_Presentation', 'Extended_Pictographic', 'Extender', 'Grapheme_Base', 'Grapheme_Extend', 'Hex_Digit', 'ID_Continue', 'ID_Start', 'Ideographic', 'IDS_Binary_Operator', 'IDS_Trinary_Operator', 'Join_Control', 'Logical_Order_Exception', 'Lowercase', 'Math', 'Noncharacter_Code_Point', 'Pattern_Syntax', 'Pattern_White_Space', 'Quotation_Mark', 'Radical', 'Regional_Indicator', 'Sentence_Terminal', 'Soft_Dotted', 'Terminal_Punctuation', 'Unified_Ideograph', 'Uppercase', 'Variation_Selector', 'White_Space', 'XID_Continue', 'XID_Start']);
  68732. var unicodePropertyAliasesEcmascript = new Map([['scx', 'Script_Extensions'], ['sc', 'Script'], ['gc', 'General_Category'], ['AHex', 'ASCII_Hex_Digit'], ['Alpha', 'Alphabetic'], ['Bidi_C', 'Bidi_Control'], ['Bidi_M', 'Bidi_Mirrored'], ['Cased', 'Cased'], ['CI', 'Case_Ignorable'], ['CWCF', 'Changes_When_Casefolded'], ['CWCM', 'Changes_When_Casemapped'], ['CWKCF', 'Changes_When_NFKC_Casefolded'], ['CWL', 'Changes_When_Lowercased'], ['CWT', 'Changes_When_Titlecased'], ['CWU', 'Changes_When_Uppercased'], ['Dash', 'Dash'], ['Dep', 'Deprecated'], ['DI', 'Default_Ignorable_Code_Point'], ['Dia', 'Diacritic'], ['Ext', 'Extender'], ['Gr_Base', 'Grapheme_Base'], ['Gr_Ext', 'Grapheme_Extend'], ['Hex', 'Hex_Digit'], ['IDC', 'ID_Continue'], ['Ideo', 'Ideographic'], ['IDS', 'ID_Start'], ['IDSB', 'IDS_Binary_Operator'], ['IDST', 'IDS_Trinary_Operator'], ['Join_C', 'Join_Control'], ['LOE', 'Logical_Order_Exception'], ['Lower', 'Lowercase'], ['Math', 'Math'], ['NChar', 'Noncharacter_Code_Point'], ['Pat_Syn', 'Pattern_Syntax'], ['Pat_WS', 'Pattern_White_Space'], ['QMark', 'Quotation_Mark'], ['Radical', 'Radical'], ['RI', 'Regional_Indicator'], ['SD', 'Soft_Dotted'], ['STerm', 'Sentence_Terminal'], ['Term', 'Terminal_Punctuation'], ['UIdeo', 'Unified_Ideograph'], ['Upper', 'Uppercase'], ['VS', 'Variation_Selector'], ['WSpace', 'White_Space'], ['space', 'White_Space'], ['XIDC', 'XID_Continue'], ['XIDS', 'XID_Start']]);
  68733. var matchProperty = function matchProperty(property) {
  68734. if (unicodeCanonicalPropertyNamesEcmascript.has(property)) {
  68735. return property;
  68736. }
  68737. if (unicodePropertyAliasesEcmascript.has(property)) {
  68738. return unicodePropertyAliasesEcmascript.get(property);
  68739. }
  68740. throw new Error("Unknown property: " + property);
  68741. };
  68742. var unicodeMatchPropertyEcmascript = matchProperty;
  68743. var mappings = new Map([['General_Category', new Map([['C', 'Other'], ['Cc', 'Control'], ['cntrl', 'Control'], ['Cf', 'Format'], ['Cn', 'Unassigned'], ['Co', 'Private_Use'], ['Cs', 'Surrogate'], ['L', 'Letter'], ['LC', 'Cased_Letter'], ['Ll', 'Lowercase_Letter'], ['Lm', 'Modifier_Letter'], ['Lo', 'Other_Letter'], ['Lt', 'Titlecase_Letter'], ['Lu', 'Uppercase_Letter'], ['M', 'Mark'], ['Combining_Mark', 'Mark'], ['Mc', 'Spacing_Mark'], ['Me', 'Enclosing_Mark'], ['Mn', 'Nonspacing_Mark'], ['N', 'Number'], ['Nd', 'Decimal_Number'], ['digit', 'Decimal_Number'], ['Nl', 'Letter_Number'], ['No', 'Other_Number'], ['P', 'Punctuation'], ['punct', 'Punctuation'], ['Pc', 'Connector_Punctuation'], ['Pd', 'Dash_Punctuation'], ['Pe', 'Close_Punctuation'], ['Pf', 'Final_Punctuation'], ['Pi', 'Initial_Punctuation'], ['Po', 'Other_Punctuation'], ['Ps', 'Open_Punctuation'], ['S', 'Symbol'], ['Sc', 'Currency_Symbol'], ['Sk', 'Modifier_Symbol'], ['Sm', 'Math_Symbol'], ['So', 'Other_Symbol'], ['Z', 'Separator'], ['Zl', 'Line_Separator'], ['Zp', 'Paragraph_Separator'], ['Zs', 'Space_Separator'], ['Other', 'Other'], ['Control', 'Control'], ['Format', 'Format'], ['Unassigned', 'Unassigned'], ['Private_Use', 'Private_Use'], ['Surrogate', 'Surrogate'], ['Letter', 'Letter'], ['Cased_Letter', 'Cased_Letter'], ['Lowercase_Letter', 'Lowercase_Letter'], ['Modifier_Letter', 'Modifier_Letter'], ['Other_Letter', 'Other_Letter'], ['Titlecase_Letter', 'Titlecase_Letter'], ['Uppercase_Letter', 'Uppercase_Letter'], ['Mark', 'Mark'], ['Spacing_Mark', 'Spacing_Mark'], ['Enclosing_Mark', 'Enclosing_Mark'], ['Nonspacing_Mark', 'Nonspacing_Mark'], ['Number', 'Number'], ['Decimal_Number', 'Decimal_Number'], ['Letter_Number', 'Letter_Number'], ['Other_Number', 'Other_Number'], ['Punctuation', 'Punctuation'], ['Connector_Punctuation', 'Connector_Punctuation'], ['Dash_Punctuation', 'Dash_Punctuation'], ['Close_Punctuation', 'Close_Punctuation'], ['Final_Punctuation', 'Final_Punctuation'], ['Initial_Punctuation', 'Initial_Punctuation'], ['Other_Punctuation', 'Other_Punctuation'], ['Open_Punctuation', 'Open_Punctuation'], ['Symbol', 'Symbol'], ['Currency_Symbol', 'Currency_Symbol'], ['Modifier_Symbol', 'Modifier_Symbol'], ['Math_Symbol', 'Math_Symbol'], ['Other_Symbol', 'Other_Symbol'], ['Separator', 'Separator'], ['Line_Separator', 'Line_Separator'], ['Paragraph_Separator', 'Paragraph_Separator'], ['Space_Separator', 'Space_Separator']])], ['Script', new Map([['Adlm', 'Adlam'], ['Aghb', 'Caucasian_Albanian'], ['Ahom', 'Ahom'], ['Arab', 'Arabic'], ['Armi', 'Imperial_Aramaic'], ['Armn', 'Armenian'], ['Avst', 'Avestan'], ['Bali', 'Balinese'], ['Bamu', 'Bamum'], ['Bass', 'Bassa_Vah'], ['Batk', 'Batak'], ['Beng', 'Bengali'], ['Bhks', 'Bhaiksuki'], ['Bopo', 'Bopomofo'], ['Brah', 'Brahmi'], ['Brai', 'Braille'], ['Bugi', 'Buginese'], ['Buhd', 'Buhid'], ['Cakm', 'Chakma'], ['Cans', 'Canadian_Aboriginal'], ['Cari', 'Carian'], ['Cham', 'Cham'], ['Cher', 'Cherokee'], ['Chrs', 'Chorasmian'], ['Copt', 'Coptic'], ['Qaac', 'Coptic'], ['Cprt', 'Cypriot'], ['Cyrl', 'Cyrillic'], ['Deva', 'Devanagari'], ['Diak', 'Dives_Akuru'], ['Dogr', 'Dogra'], ['Dsrt', 'Deseret'], ['Dupl', 'Duployan'], ['Egyp', 'Egyptian_Hieroglyphs'], ['Elba', 'Elbasan'], ['Elym', 'Elymaic'], ['Ethi', 'Ethiopic'], ['Geor', 'Georgian'], ['Glag', 'Glagolitic'], ['Gong', 'Gunjala_Gondi'], ['Gonm', 'Masaram_Gondi'], ['Goth', 'Gothic'], ['Gran', 'Grantha'], ['Grek', 'Greek'], ['Gujr', 'Gujarati'], ['Guru', 'Gurmukhi'], ['Hang', 'Hangul'], ['Hani', 'Han'], ['Hano', 'Hanunoo'], ['Hatr', 'Hatran'], ['Hebr', 'Hebrew'], ['Hira', 'Hiragana'], ['Hluw', 'Anatolian_Hieroglyphs'], ['Hmng', 'Pahawh_Hmong'], ['Hmnp', 'Nyiakeng_Puachue_Hmong'], ['Hrkt', 'Katakana_Or_Hiragana'], ['Hung', 'Old_Hungarian'], ['Ital', 'Old_Italic'], ['Java', 'Javanese'], ['Kali', 'Kayah_Li'], ['Kana', 'Katakana'], ['Khar', 'Kharoshthi'], ['Khmr', 'Khmer'], ['Khoj', 'Khojki'], ['Kits', 'Khitan_Small_Script'], ['Knda', 'Kannada'], ['Kthi', 'Kaithi'], ['Lana', 'Tai_Tham'], ['Laoo', 'Lao'], ['Latn', 'Latin'], ['Lepc', 'Lepcha'], ['Limb', 'Limbu'], ['Lina', 'Linear_A'], ['Linb', 'Linear_B'], ['Lisu', 'Lisu'], ['Lyci', 'Lycian'], ['Lydi', 'Lydian'], ['Mahj', 'Mahajani'], ['Maka', 'Makasar'], ['Mand', 'Mandaic'], ['Mani', 'Manichaean'], ['Marc', 'Marchen'], ['Medf', 'Medefaidrin'], ['Mend', 'Mende_Kikakui'], ['Merc', 'Meroitic_Cursive'], ['Mero', 'Meroitic_Hieroglyphs'], ['Mlym', 'Malayalam'], ['Modi', 'Modi'], ['Mong', 'Mongolian'], ['Mroo', 'Mro'], ['Mtei', 'Meetei_Mayek'], ['Mult', 'Multani'], ['Mymr', 'Myanmar'], ['Nand', 'Nandinagari'], ['Narb', 'Old_North_Arabian'], ['Nbat', 'Nabataean'], ['Newa', 'Newa'], ['Nkoo', 'Nko'], ['Nshu', 'Nushu'], ['Ogam', 'Ogham'], ['Olck', 'Ol_Chiki'], ['Orkh', 'Old_Turkic'], ['Orya', 'Oriya'], ['Osge', 'Osage'], ['Osma', 'Osmanya'], ['Palm', 'Palmyrene'], ['Pauc', 'Pau_Cin_Hau'], ['Perm', 'Old_Permic'], ['Phag', 'Phags_Pa'], ['Phli', 'Inscriptional_Pahlavi'], ['Phlp', 'Psalter_Pahlavi'], ['Phnx', 'Phoenician'], ['Plrd', 'Miao'], ['Prti', 'Inscriptional_Parthian'], ['Rjng', 'Rejang'], ['Rohg', 'Hanifi_Rohingya'], ['Runr', 'Runic'], ['Samr', 'Samaritan'], ['Sarb', 'Old_South_Arabian'], ['Saur', 'Saurashtra'], ['Sgnw', 'SignWriting'], ['Shaw', 'Shavian'], ['Shrd', 'Sharada'], ['Sidd', 'Siddham'], ['Sind', 'Khudawadi'], ['Sinh', 'Sinhala'], ['Sogd', 'Sogdian'], ['Sogo', 'Old_Sogdian'], ['Sora', 'Sora_Sompeng'], ['Soyo', 'Soyombo'], ['Sund', 'Sundanese'], ['Sylo', 'Syloti_Nagri'], ['Syrc', 'Syriac'], ['Tagb', 'Tagbanwa'], ['Takr', 'Takri'], ['Tale', 'Tai_Le'], ['Talu', 'New_Tai_Lue'], ['Taml', 'Tamil'], ['Tang', 'Tangut'], ['Tavt', 'Tai_Viet'], ['Telu', 'Telugu'], ['Tfng', 'Tifinagh'], ['Tglg', 'Tagalog'], ['Thaa', 'Thaana'], ['Thai', 'Thai'], ['Tibt', 'Tibetan'], ['Tirh', 'Tirhuta'], ['Ugar', 'Ugaritic'], ['Vaii', 'Vai'], ['Wara', 'Warang_Citi'], ['Wcho', 'Wancho'], ['Xpeo', 'Old_Persian'], ['Xsux', 'Cuneiform'], ['Yezi', 'Yezidi'], ['Yiii', 'Yi'], ['Zanb', 'Zanabazar_Square'], ['Zinh', 'Inherited'], ['Qaai', 'Inherited'], ['Zyyy', 'Common'], ['Zzzz', 'Unknown'], ['Adlam', 'Adlam'], ['Caucasian_Albanian', 'Caucasian_Albanian'], ['Arabic', 'Arabic'], ['Imperial_Aramaic', 'Imperial_Aramaic'], ['Armenian', 'Armenian'], ['Avestan', 'Avestan'], ['Balinese', 'Balinese'], ['Bamum', 'Bamum'], ['Bassa_Vah', 'Bassa_Vah'], ['Batak', 'Batak'], ['Bengali', 'Bengali'], ['Bhaiksuki', 'Bhaiksuki'], ['Bopomofo', 'Bopomofo'], ['Brahmi', 'Brahmi'], ['Braille', 'Braille'], ['Buginese', 'Buginese'], ['Buhid', 'Buhid'], ['Chakma', 'Chakma'], ['Canadian_Aboriginal', 'Canadian_Aboriginal'], ['Carian', 'Carian'], ['Cherokee', 'Cherokee'], ['Chorasmian', 'Chorasmian'], ['Coptic', 'Coptic'], ['Cypriot', 'Cypriot'], ['Cyrillic', 'Cyrillic'], ['Devanagari', 'Devanagari'], ['Dives_Akuru', 'Dives_Akuru'], ['Dogra', 'Dogra'], ['Deseret', 'Deseret'], ['Duployan', 'Duployan'], ['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'], ['Elbasan', 'Elbasan'], ['Elymaic', 'Elymaic'], ['Ethiopic', 'Ethiopic'], ['Georgian', 'Georgian'], ['Glagolitic', 'Glagolitic'], ['Gunjala_Gondi', 'Gunjala_Gondi'], ['Masaram_Gondi', 'Masaram_Gondi'], ['Gothic', 'Gothic'], ['Grantha', 'Grantha'], ['Greek', 'Greek'], ['Gujarati', 'Gujarati'], ['Gurmukhi', 'Gurmukhi'], ['Hangul', 'Hangul'], ['Han', 'Han'], ['Hanunoo', 'Hanunoo'], ['Hatran', 'Hatran'], ['Hebrew', 'Hebrew'], ['Hiragana', 'Hiragana'], ['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'], ['Pahawh_Hmong', 'Pahawh_Hmong'], ['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'], ['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'], ['Old_Hungarian', 'Old_Hungarian'], ['Old_Italic', 'Old_Italic'], ['Javanese', 'Javanese'], ['Kayah_Li', 'Kayah_Li'], ['Katakana', 'Katakana'], ['Kharoshthi', 'Kharoshthi'], ['Khmer', 'Khmer'], ['Khojki', 'Khojki'], ['Khitan_Small_Script', 'Khitan_Small_Script'], ['Kannada', 'Kannada'], ['Kaithi', 'Kaithi'], ['Tai_Tham', 'Tai_Tham'], ['Lao', 'Lao'], ['Latin', 'Latin'], ['Lepcha', 'Lepcha'], ['Limbu', 'Limbu'], ['Linear_A', 'Linear_A'], ['Linear_B', 'Linear_B'], ['Lycian', 'Lycian'], ['Lydian', 'Lydian'], ['Mahajani', 'Mahajani'], ['Makasar', 'Makasar'], ['Mandaic', 'Mandaic'], ['Manichaean', 'Manichaean'], ['Marchen', 'Marchen'], ['Medefaidrin', 'Medefaidrin'], ['Mende_Kikakui', 'Mende_Kikakui'], ['Meroitic_Cursive', 'Meroitic_Cursive'], ['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'], ['Malayalam', 'Malayalam'], ['Mongolian', 'Mongolian'], ['Mro', 'Mro'], ['Meetei_Mayek', 'Meetei_Mayek'], ['Multani', 'Multani'], ['Myanmar', 'Myanmar'], ['Nandinagari', 'Nandinagari'], ['Old_North_Arabian', 'Old_North_Arabian'], ['Nabataean', 'Nabataean'], ['Nko', 'Nko'], ['Nushu', 'Nushu'], ['Ogham', 'Ogham'], ['Ol_Chiki', 'Ol_Chiki'], ['Old_Turkic', 'Old_Turkic'], ['Oriya', 'Oriya'], ['Osage', 'Osage'], ['Osmanya', 'Osmanya'], ['Palmyrene', 'Palmyrene'], ['Pau_Cin_Hau', 'Pau_Cin_Hau'], ['Old_Permic', 'Old_Permic'], ['Phags_Pa', 'Phags_Pa'], ['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'], ['Psalter_Pahlavi', 'Psalter_Pahlavi'], ['Phoenician', 'Phoenician'], ['Miao', 'Miao'], ['Inscriptional_Parthian', 'Inscriptional_Parthian'], ['Rejang', 'Rejang'], ['Hanifi_Rohingya', 'Hanifi_Rohingya'], ['Runic', 'Runic'], ['Samaritan', 'Samaritan'], ['Old_South_Arabian', 'Old_South_Arabian'], ['Saurashtra', 'Saurashtra'], ['SignWriting', 'SignWriting'], ['Shavian', 'Shavian'], ['Sharada', 'Sharada'], ['Siddham', 'Siddham'], ['Khudawadi', 'Khudawadi'], ['Sinhala', 'Sinhala'], ['Sogdian', 'Sogdian'], ['Old_Sogdian', 'Old_Sogdian'], ['Sora_Sompeng', 'Sora_Sompeng'], ['Soyombo', 'Soyombo'], ['Sundanese', 'Sundanese'], ['Syloti_Nagri', 'Syloti_Nagri'], ['Syriac', 'Syriac'], ['Tagbanwa', 'Tagbanwa'], ['Takri', 'Takri'], ['Tai_Le', 'Tai_Le'], ['New_Tai_Lue', 'New_Tai_Lue'], ['Tamil', 'Tamil'], ['Tangut', 'Tangut'], ['Tai_Viet', 'Tai_Viet'], ['Telugu', 'Telugu'], ['Tifinagh', 'Tifinagh'], ['Tagalog', 'Tagalog'], ['Thaana', 'Thaana'], ['Tibetan', 'Tibetan'], ['Tirhuta', 'Tirhuta'], ['Ugaritic', 'Ugaritic'], ['Vai', 'Vai'], ['Warang_Citi', 'Warang_Citi'], ['Wancho', 'Wancho'], ['Old_Persian', 'Old_Persian'], ['Cuneiform', 'Cuneiform'], ['Yezidi', 'Yezidi'], ['Yi', 'Yi'], ['Zanabazar_Square', 'Zanabazar_Square'], ['Inherited', 'Inherited'], ['Common', 'Common'], ['Unknown', 'Unknown']])], ['Script_Extensions', new Map([['Adlm', 'Adlam'], ['Aghb', 'Caucasian_Albanian'], ['Ahom', 'Ahom'], ['Arab', 'Arabic'], ['Armi', 'Imperial_Aramaic'], ['Armn', 'Armenian'], ['Avst', 'Avestan'], ['Bali', 'Balinese'], ['Bamu', 'Bamum'], ['Bass', 'Bassa_Vah'], ['Batk', 'Batak'], ['Beng', 'Bengali'], ['Bhks', 'Bhaiksuki'], ['Bopo', 'Bopomofo'], ['Brah', 'Brahmi'], ['Brai', 'Braille'], ['Bugi', 'Buginese'], ['Buhd', 'Buhid'], ['Cakm', 'Chakma'], ['Cans', 'Canadian_Aboriginal'], ['Cari', 'Carian'], ['Cham', 'Cham'], ['Cher', 'Cherokee'], ['Chrs', 'Chorasmian'], ['Copt', 'Coptic'], ['Qaac', 'Coptic'], ['Cprt', 'Cypriot'], ['Cyrl', 'Cyrillic'], ['Deva', 'Devanagari'], ['Diak', 'Dives_Akuru'], ['Dogr', 'Dogra'], ['Dsrt', 'Deseret'], ['Dupl', 'Duployan'], ['Egyp', 'Egyptian_Hieroglyphs'], ['Elba', 'Elbasan'], ['Elym', 'Elymaic'], ['Ethi', 'Ethiopic'], ['Geor', 'Georgian'], ['Glag', 'Glagolitic'], ['Gong', 'Gunjala_Gondi'], ['Gonm', 'Masaram_Gondi'], ['Goth', 'Gothic'], ['Gran', 'Grantha'], ['Grek', 'Greek'], ['Gujr', 'Gujarati'], ['Guru', 'Gurmukhi'], ['Hang', 'Hangul'], ['Hani', 'Han'], ['Hano', 'Hanunoo'], ['Hatr', 'Hatran'], ['Hebr', 'Hebrew'], ['Hira', 'Hiragana'], ['Hluw', 'Anatolian_Hieroglyphs'], ['Hmng', 'Pahawh_Hmong'], ['Hmnp', 'Nyiakeng_Puachue_Hmong'], ['Hrkt', 'Katakana_Or_Hiragana'], ['Hung', 'Old_Hungarian'], ['Ital', 'Old_Italic'], ['Java', 'Javanese'], ['Kali', 'Kayah_Li'], ['Kana', 'Katakana'], ['Khar', 'Kharoshthi'], ['Khmr', 'Khmer'], ['Khoj', 'Khojki'], ['Kits', 'Khitan_Small_Script'], ['Knda', 'Kannada'], ['Kthi', 'Kaithi'], ['Lana', 'Tai_Tham'], ['Laoo', 'Lao'], ['Latn', 'Latin'], ['Lepc', 'Lepcha'], ['Limb', 'Limbu'], ['Lina', 'Linear_A'], ['Linb', 'Linear_B'], ['Lisu', 'Lisu'], ['Lyci', 'Lycian'], ['Lydi', 'Lydian'], ['Mahj', 'Mahajani'], ['Maka', 'Makasar'], ['Mand', 'Mandaic'], ['Mani', 'Manichaean'], ['Marc', 'Marchen'], ['Medf', 'Medefaidrin'], ['Mend', 'Mende_Kikakui'], ['Merc', 'Meroitic_Cursive'], ['Mero', 'Meroitic_Hieroglyphs'], ['Mlym', 'Malayalam'], ['Modi', 'Modi'], ['Mong', 'Mongolian'], ['Mroo', 'Mro'], ['Mtei', 'Meetei_Mayek'], ['Mult', 'Multani'], ['Mymr', 'Myanmar'], ['Nand', 'Nandinagari'], ['Narb', 'Old_North_Arabian'], ['Nbat', 'Nabataean'], ['Newa', 'Newa'], ['Nkoo', 'Nko'], ['Nshu', 'Nushu'], ['Ogam', 'Ogham'], ['Olck', 'Ol_Chiki'], ['Orkh', 'Old_Turkic'], ['Orya', 'Oriya'], ['Osge', 'Osage'], ['Osma', 'Osmanya'], ['Palm', 'Palmyrene'], ['Pauc', 'Pau_Cin_Hau'], ['Perm', 'Old_Permic'], ['Phag', 'Phags_Pa'], ['Phli', 'Inscriptional_Pahlavi'], ['Phlp', 'Psalter_Pahlavi'], ['Phnx', 'Phoenician'], ['Plrd', 'Miao'], ['Prti', 'Inscriptional_Parthian'], ['Rjng', 'Rejang'], ['Rohg', 'Hanifi_Rohingya'], ['Runr', 'Runic'], ['Samr', 'Samaritan'], ['Sarb', 'Old_South_Arabian'], ['Saur', 'Saurashtra'], ['Sgnw', 'SignWriting'], ['Shaw', 'Shavian'], ['Shrd', 'Sharada'], ['Sidd', 'Siddham'], ['Sind', 'Khudawadi'], ['Sinh', 'Sinhala'], ['Sogd', 'Sogdian'], ['Sogo', 'Old_Sogdian'], ['Sora', 'Sora_Sompeng'], ['Soyo', 'Soyombo'], ['Sund', 'Sundanese'], ['Sylo', 'Syloti_Nagri'], ['Syrc', 'Syriac'], ['Tagb', 'Tagbanwa'], ['Takr', 'Takri'], ['Tale', 'Tai_Le'], ['Talu', 'New_Tai_Lue'], ['Taml', 'Tamil'], ['Tang', 'Tangut'], ['Tavt', 'Tai_Viet'], ['Telu', 'Telugu'], ['Tfng', 'Tifinagh'], ['Tglg', 'Tagalog'], ['Thaa', 'Thaana'], ['Thai', 'Thai'], ['Tibt', 'Tibetan'], ['Tirh', 'Tirhuta'], ['Ugar', 'Ugaritic'], ['Vaii', 'Vai'], ['Wara', 'Warang_Citi'], ['Wcho', 'Wancho'], ['Xpeo', 'Old_Persian'], ['Xsux', 'Cuneiform'], ['Yezi', 'Yezidi'], ['Yiii', 'Yi'], ['Zanb', 'Zanabazar_Square'], ['Zinh', 'Inherited'], ['Qaai', 'Inherited'], ['Zyyy', 'Common'], ['Zzzz', 'Unknown'], ['Adlam', 'Adlam'], ['Caucasian_Albanian', 'Caucasian_Albanian'], ['Arabic', 'Arabic'], ['Imperial_Aramaic', 'Imperial_Aramaic'], ['Armenian', 'Armenian'], ['Avestan', 'Avestan'], ['Balinese', 'Balinese'], ['Bamum', 'Bamum'], ['Bassa_Vah', 'Bassa_Vah'], ['Batak', 'Batak'], ['Bengali', 'Bengali'], ['Bhaiksuki', 'Bhaiksuki'], ['Bopomofo', 'Bopomofo'], ['Brahmi', 'Brahmi'], ['Braille', 'Braille'], ['Buginese', 'Buginese'], ['Buhid', 'Buhid'], ['Chakma', 'Chakma'], ['Canadian_Aboriginal', 'Canadian_Aboriginal'], ['Carian', 'Carian'], ['Cherokee', 'Cherokee'], ['Chorasmian', 'Chorasmian'], ['Coptic', 'Coptic'], ['Cypriot', 'Cypriot'], ['Cyrillic', 'Cyrillic'], ['Devanagari', 'Devanagari'], ['Dives_Akuru', 'Dives_Akuru'], ['Dogra', 'Dogra'], ['Deseret', 'Deseret'], ['Duployan', 'Duployan'], ['Egyptian_Hieroglyphs', 'Egyptian_Hieroglyphs'], ['Elbasan', 'Elbasan'], ['Elymaic', 'Elymaic'], ['Ethiopic', 'Ethiopic'], ['Georgian', 'Georgian'], ['Glagolitic', 'Glagolitic'], ['Gunjala_Gondi', 'Gunjala_Gondi'], ['Masaram_Gondi', 'Masaram_Gondi'], ['Gothic', 'Gothic'], ['Grantha', 'Grantha'], ['Greek', 'Greek'], ['Gujarati', 'Gujarati'], ['Gurmukhi', 'Gurmukhi'], ['Hangul', 'Hangul'], ['Han', 'Han'], ['Hanunoo', 'Hanunoo'], ['Hatran', 'Hatran'], ['Hebrew', 'Hebrew'], ['Hiragana', 'Hiragana'], ['Anatolian_Hieroglyphs', 'Anatolian_Hieroglyphs'], ['Pahawh_Hmong', 'Pahawh_Hmong'], ['Nyiakeng_Puachue_Hmong', 'Nyiakeng_Puachue_Hmong'], ['Katakana_Or_Hiragana', 'Katakana_Or_Hiragana'], ['Old_Hungarian', 'Old_Hungarian'], ['Old_Italic', 'Old_Italic'], ['Javanese', 'Javanese'], ['Kayah_Li', 'Kayah_Li'], ['Katakana', 'Katakana'], ['Kharoshthi', 'Kharoshthi'], ['Khmer', 'Khmer'], ['Khojki', 'Khojki'], ['Khitan_Small_Script', 'Khitan_Small_Script'], ['Kannada', 'Kannada'], ['Kaithi', 'Kaithi'], ['Tai_Tham', 'Tai_Tham'], ['Lao', 'Lao'], ['Latin', 'Latin'], ['Lepcha', 'Lepcha'], ['Limbu', 'Limbu'], ['Linear_A', 'Linear_A'], ['Linear_B', 'Linear_B'], ['Lycian', 'Lycian'], ['Lydian', 'Lydian'], ['Mahajani', 'Mahajani'], ['Makasar', 'Makasar'], ['Mandaic', 'Mandaic'], ['Manichaean', 'Manichaean'], ['Marchen', 'Marchen'], ['Medefaidrin', 'Medefaidrin'], ['Mende_Kikakui', 'Mende_Kikakui'], ['Meroitic_Cursive', 'Meroitic_Cursive'], ['Meroitic_Hieroglyphs', 'Meroitic_Hieroglyphs'], ['Malayalam', 'Malayalam'], ['Mongolian', 'Mongolian'], ['Mro', 'Mro'], ['Meetei_Mayek', 'Meetei_Mayek'], ['Multani', 'Multani'], ['Myanmar', 'Myanmar'], ['Nandinagari', 'Nandinagari'], ['Old_North_Arabian', 'Old_North_Arabian'], ['Nabataean', 'Nabataean'], ['Nko', 'Nko'], ['Nushu', 'Nushu'], ['Ogham', 'Ogham'], ['Ol_Chiki', 'Ol_Chiki'], ['Old_Turkic', 'Old_Turkic'], ['Oriya', 'Oriya'], ['Osage', 'Osage'], ['Osmanya', 'Osmanya'], ['Palmyrene', 'Palmyrene'], ['Pau_Cin_Hau', 'Pau_Cin_Hau'], ['Old_Permic', 'Old_Permic'], ['Phags_Pa', 'Phags_Pa'], ['Inscriptional_Pahlavi', 'Inscriptional_Pahlavi'], ['Psalter_Pahlavi', 'Psalter_Pahlavi'], ['Phoenician', 'Phoenician'], ['Miao', 'Miao'], ['Inscriptional_Parthian', 'Inscriptional_Parthian'], ['Rejang', 'Rejang'], ['Hanifi_Rohingya', 'Hanifi_Rohingya'], ['Runic', 'Runic'], ['Samaritan', 'Samaritan'], ['Old_South_Arabian', 'Old_South_Arabian'], ['Saurashtra', 'Saurashtra'], ['SignWriting', 'SignWriting'], ['Shavian', 'Shavian'], ['Sharada', 'Sharada'], ['Siddham', 'Siddham'], ['Khudawadi', 'Khudawadi'], ['Sinhala', 'Sinhala'], ['Sogdian', 'Sogdian'], ['Old_Sogdian', 'Old_Sogdian'], ['Sora_Sompeng', 'Sora_Sompeng'], ['Soyombo', 'Soyombo'], ['Sundanese', 'Sundanese'], ['Syloti_Nagri', 'Syloti_Nagri'], ['Syriac', 'Syriac'], ['Tagbanwa', 'Tagbanwa'], ['Takri', 'Takri'], ['Tai_Le', 'Tai_Le'], ['New_Tai_Lue', 'New_Tai_Lue'], ['Tamil', 'Tamil'], ['Tangut', 'Tangut'], ['Tai_Viet', 'Tai_Viet'], ['Telugu', 'Telugu'], ['Tifinagh', 'Tifinagh'], ['Tagalog', 'Tagalog'], ['Thaana', 'Thaana'], ['Tibetan', 'Tibetan'], ['Tirhuta', 'Tirhuta'], ['Ugaritic', 'Ugaritic'], ['Vai', 'Vai'], ['Warang_Citi', 'Warang_Citi'], ['Wancho', 'Wancho'], ['Old_Persian', 'Old_Persian'], ['Cuneiform', 'Cuneiform'], ['Yezidi', 'Yezidi'], ['Yi', 'Yi'], ['Zanabazar_Square', 'Zanabazar_Square'], ['Inherited', 'Inherited'], ['Common', 'Common'], ['Unknown', 'Unknown']])]]);
  68744. var matchPropertyValue = function matchPropertyValue(property, value) {
  68745. var aliasToValue = mappings.get(property);
  68746. if (!aliasToValue) {
  68747. throw new Error("Unknown property `" + property + "`.");
  68748. }
  68749. var canonicalValue = aliasToValue.get(value);
  68750. if (canonicalValue) {
  68751. return canonicalValue;
  68752. }
  68753. throw new Error("Unknown value `" + value + "` for property `" + property + "`.");
  68754. };
  68755. var unicodeMatchPropertyValueEcmascript = matchPropertyValue;
  68756. var iuMappings = new Map([[0x4B, 0x212A], [0x53, 0x17F], [0x6B, 0x212A], [0x73, 0x17F], [0xB5, 0x39C], [0xC5, 0x212B], [0xDF, 0x1E9E], [0xE5, 0x212B], [0x17F, 0x53], [0x1C4, 0x1C5], [0x1C5, 0x1C4], [0x1C7, 0x1C8], [0x1C8, 0x1C7], [0x1CA, 0x1CB], [0x1CB, 0x1CA], [0x1F1, 0x1F2], [0x1F2, 0x1F1], [0x345, 0x1FBE], [0x392, 0x3D0], [0x395, 0x3F5], [0x398, 0x3F4], [0x399, 0x1FBE], [0x39A, 0x3F0], [0x39C, 0xB5], [0x3A0, 0x3D6], [0x3A1, 0x3F1], [0x3A3, 0x3C2], [0x3A6, 0x3D5], [0x3A9, 0x2126], [0x3B8, 0x3F4], [0x3C2, 0x3A3], [0x3C9, 0x2126], [0x3D0, 0x392], [0x3D1, 0x3F4], [0x3D5, 0x3A6], [0x3D6, 0x3A0], [0x3F0, 0x39A], [0x3F1, 0x3A1], [0x3F4, [0x398, 0x3D1, 0x3B8]], [0x3F5, 0x395], [0x412, 0x1C80], [0x414, 0x1C81], [0x41E, 0x1C82], [0x421, 0x1C83], [0x422, 0x1C85], [0x42A, 0x1C86], [0x462, 0x1C87], [0x1C80, 0x412], [0x1C81, 0x414], [0x1C82, 0x41E], [0x1C83, 0x421], [0x1C84, 0x1C85], [0x1C85, [0x422, 0x1C84]], [0x1C86, 0x42A], [0x1C87, 0x462], [0x1C88, 0xA64A], [0x1E60, 0x1E9B], [0x1E9B, 0x1E60], [0x1E9E, 0xDF], [0x1F80, 0x1F88], [0x1F81, 0x1F89], [0x1F82, 0x1F8A], [0x1F83, 0x1F8B], [0x1F84, 0x1F8C], [0x1F85, 0x1F8D], [0x1F86, 0x1F8E], [0x1F87, 0x1F8F], [0x1F88, 0x1F80], [0x1F89, 0x1F81], [0x1F8A, 0x1F82], [0x1F8B, 0x1F83], [0x1F8C, 0x1F84], [0x1F8D, 0x1F85], [0x1F8E, 0x1F86], [0x1F8F, 0x1F87], [0x1F90, 0x1F98], [0x1F91, 0x1F99], [0x1F92, 0x1F9A], [0x1F93, 0x1F9B], [0x1F94, 0x1F9C], [0x1F95, 0x1F9D], [0x1F96, 0x1F9E], [0x1F97, 0x1F9F], [0x1F98, 0x1F90], [0x1F99, 0x1F91], [0x1F9A, 0x1F92], [0x1F9B, 0x1F93], [0x1F9C, 0x1F94], [0x1F9D, 0x1F95], [0x1F9E, 0x1F96], [0x1F9F, 0x1F97], [0x1FA0, 0x1FA8], [0x1FA1, 0x1FA9], [0x1FA2, 0x1FAA], [0x1FA3, 0x1FAB], [0x1FA4, 0x1FAC], [0x1FA5, 0x1FAD], [0x1FA6, 0x1FAE], [0x1FA7, 0x1FAF], [0x1FA8, 0x1FA0], [0x1FA9, 0x1FA1], [0x1FAA, 0x1FA2], [0x1FAB, 0x1FA3], [0x1FAC, 0x1FA4], [0x1FAD, 0x1FA5], [0x1FAE, 0x1FA6], [0x1FAF, 0x1FA7], [0x1FB3, 0x1FBC], [0x1FBC, 0x1FB3], [0x1FBE, [0x345, 0x399]], [0x1FC3, 0x1FCC], [0x1FCC, 0x1FC3], [0x1FF3, 0x1FFC], [0x1FFC, 0x1FF3], [0x2126, [0x3A9, 0x3C9]], [0x212A, 0x4B], [0x212B, [0xC5, 0xE5]], [0xA64A, 0x1C88], [0x10400, 0x10428], [0x10401, 0x10429], [0x10402, 0x1042A], [0x10403, 0x1042B], [0x10404, 0x1042C], [0x10405, 0x1042D], [0x10406, 0x1042E], [0x10407, 0x1042F], [0x10408, 0x10430], [0x10409, 0x10431], [0x1040A, 0x10432], [0x1040B, 0x10433], [0x1040C, 0x10434], [0x1040D, 0x10435], [0x1040E, 0x10436], [0x1040F, 0x10437], [0x10410, 0x10438], [0x10411, 0x10439], [0x10412, 0x1043A], [0x10413, 0x1043B], [0x10414, 0x1043C], [0x10415, 0x1043D], [0x10416, 0x1043E], [0x10417, 0x1043F], [0x10418, 0x10440], [0x10419, 0x10441], [0x1041A, 0x10442], [0x1041B, 0x10443], [0x1041C, 0x10444], [0x1041D, 0x10445], [0x1041E, 0x10446], [0x1041F, 0x10447], [0x10420, 0x10448], [0x10421, 0x10449], [0x10422, 0x1044A], [0x10423, 0x1044B], [0x10424, 0x1044C], [0x10425, 0x1044D], [0x10426, 0x1044E], [0x10427, 0x1044F], [0x10428, 0x10400], [0x10429, 0x10401], [0x1042A, 0x10402], [0x1042B, 0x10403], [0x1042C, 0x10404], [0x1042D, 0x10405], [0x1042E, 0x10406], [0x1042F, 0x10407], [0x10430, 0x10408], [0x10431, 0x10409], [0x10432, 0x1040A], [0x10433, 0x1040B], [0x10434, 0x1040C], [0x10435, 0x1040D], [0x10436, 0x1040E], [0x10437, 0x1040F], [0x10438, 0x10410], [0x10439, 0x10411], [0x1043A, 0x10412], [0x1043B, 0x10413], [0x1043C, 0x10414], [0x1043D, 0x10415], [0x1043E, 0x10416], [0x1043F, 0x10417], [0x10440, 0x10418], [0x10441, 0x10419], [0x10442, 0x1041A], [0x10443, 0x1041B], [0x10444, 0x1041C], [0x10445, 0x1041D], [0x10446, 0x1041E], [0x10447, 0x1041F], [0x10448, 0x10420], [0x10449, 0x10421], [0x1044A, 0x10422], [0x1044B, 0x10423], [0x1044C, 0x10424], [0x1044D, 0x10425], [0x1044E, 0x10426], [0x1044F, 0x10427], [0x104B0, 0x104D8], [0x104B1, 0x104D9], [0x104B2, 0x104DA], [0x104B3, 0x104DB], [0x104B4, 0x104DC], [0x104B5, 0x104DD], [0x104B6, 0x104DE], [0x104B7, 0x104DF], [0x104B8, 0x104E0], [0x104B9, 0x104E1], [0x104BA, 0x104E2], [0x104BB, 0x104E3], [0x104BC, 0x104E4], [0x104BD, 0x104E5], [0x104BE, 0x104E6], [0x104BF, 0x104E7], [0x104C0, 0x104E8], [0x104C1, 0x104E9], [0x104C2, 0x104EA], [0x104C3, 0x104EB], [0x104C4, 0x104EC], [0x104C5, 0x104ED], [0x104C6, 0x104EE], [0x104C7, 0x104EF], [0x104C8, 0x104F0], [0x104C9, 0x104F1], [0x104CA, 0x104F2], [0x104CB, 0x104F3], [0x104CC, 0x104F4], [0x104CD, 0x104F5], [0x104CE, 0x104F6], [0x104CF, 0x104F7], [0x104D0, 0x104F8], [0x104D1, 0x104F9], [0x104D2, 0x104FA], [0x104D3, 0x104FB], [0x104D8, 0x104B0], [0x104D9, 0x104B1], [0x104DA, 0x104B2], [0x104DB, 0x104B3], [0x104DC, 0x104B4], [0x104DD, 0x104B5], [0x104DE, 0x104B6], [0x104DF, 0x104B7], [0x104E0, 0x104B8], [0x104E1, 0x104B9], [0x104E2, 0x104BA], [0x104E3, 0x104BB], [0x104E4, 0x104BC], [0x104E5, 0x104BD], [0x104E6, 0x104BE], [0x104E7, 0x104BF], [0x104E8, 0x104C0], [0x104E9, 0x104C1], [0x104EA, 0x104C2], [0x104EB, 0x104C3], [0x104EC, 0x104C4], [0x104ED, 0x104C5], [0x104EE, 0x104C6], [0x104EF, 0x104C7], [0x104F0, 0x104C8], [0x104F1, 0x104C9], [0x104F2, 0x104CA], [0x104F3, 0x104CB], [0x104F4, 0x104CC], [0x104F5, 0x104CD], [0x104F6, 0x104CE], [0x104F7, 0x104CF], [0x104F8, 0x104D0], [0x104F9, 0x104D1], [0x104FA, 0x104D2], [0x104FB, 0x104D3], [0x10C80, 0x10CC0], [0x10C81, 0x10CC1], [0x10C82, 0x10CC2], [0x10C83, 0x10CC3], [0x10C84, 0x10CC4], [0x10C85, 0x10CC5], [0x10C86, 0x10CC6], [0x10C87, 0x10CC7], [0x10C88, 0x10CC8], [0x10C89, 0x10CC9], [0x10C8A, 0x10CCA], [0x10C8B, 0x10CCB], [0x10C8C, 0x10CCC], [0x10C8D, 0x10CCD], [0x10C8E, 0x10CCE], [0x10C8F, 0x10CCF], [0x10C90, 0x10CD0], [0x10C91, 0x10CD1], [0x10C92, 0x10CD2], [0x10C93, 0x10CD3], [0x10C94, 0x10CD4], [0x10C95, 0x10CD5], [0x10C96, 0x10CD6], [0x10C97, 0x10CD7], [0x10C98, 0x10CD8], [0x10C99, 0x10CD9], [0x10C9A, 0x10CDA], [0x10C9B, 0x10CDB], [0x10C9C, 0x10CDC], [0x10C9D, 0x10CDD], [0x10C9E, 0x10CDE], [0x10C9F, 0x10CDF], [0x10CA0, 0x10CE0], [0x10CA1, 0x10CE1], [0x10CA2, 0x10CE2], [0x10CA3, 0x10CE3], [0x10CA4, 0x10CE4], [0x10CA5, 0x10CE5], [0x10CA6, 0x10CE6], [0x10CA7, 0x10CE7], [0x10CA8, 0x10CE8], [0x10CA9, 0x10CE9], [0x10CAA, 0x10CEA], [0x10CAB, 0x10CEB], [0x10CAC, 0x10CEC], [0x10CAD, 0x10CED], [0x10CAE, 0x10CEE], [0x10CAF, 0x10CEF], [0x10CB0, 0x10CF0], [0x10CB1, 0x10CF1], [0x10CB2, 0x10CF2], [0x10CC0, 0x10C80], [0x10CC1, 0x10C81], [0x10CC2, 0x10C82], [0x10CC3, 0x10C83], [0x10CC4, 0x10C84], [0x10CC5, 0x10C85], [0x10CC6, 0x10C86], [0x10CC7, 0x10C87], [0x10CC8, 0x10C88], [0x10CC9, 0x10C89], [0x10CCA, 0x10C8A], [0x10CCB, 0x10C8B], [0x10CCC, 0x10C8C], [0x10CCD, 0x10C8D], [0x10CCE, 0x10C8E], [0x10CCF, 0x10C8F], [0x10CD0, 0x10C90], [0x10CD1, 0x10C91], [0x10CD2, 0x10C92], [0x10CD3, 0x10C93], [0x10CD4, 0x10C94], [0x10CD5, 0x10C95], [0x10CD6, 0x10C96], [0x10CD7, 0x10C97], [0x10CD8, 0x10C98], [0x10CD9, 0x10C99], [0x10CDA, 0x10C9A], [0x10CDB, 0x10C9B], [0x10CDC, 0x10C9C], [0x10CDD, 0x10C9D], [0x10CDE, 0x10C9E], [0x10CDF, 0x10C9F], [0x10CE0, 0x10CA0], [0x10CE1, 0x10CA1], [0x10CE2, 0x10CA2], [0x10CE3, 0x10CA3], [0x10CE4, 0x10CA4], [0x10CE5, 0x10CA5], [0x10CE6, 0x10CA6], [0x10CE7, 0x10CA7], [0x10CE8, 0x10CA8], [0x10CE9, 0x10CA9], [0x10CEA, 0x10CAA], [0x10CEB, 0x10CAB], [0x10CEC, 0x10CAC], [0x10CED, 0x10CAD], [0x10CEE, 0x10CAE], [0x10CEF, 0x10CAF], [0x10CF0, 0x10CB0], [0x10CF1, 0x10CB1], [0x10CF2, 0x10CB2], [0x118A0, 0x118C0], [0x118A1, 0x118C1], [0x118A2, 0x118C2], [0x118A3, 0x118C3], [0x118A4, 0x118C4], [0x118A5, 0x118C5], [0x118A6, 0x118C6], [0x118A7, 0x118C7], [0x118A8, 0x118C8], [0x118A9, 0x118C9], [0x118AA, 0x118CA], [0x118AB, 0x118CB], [0x118AC, 0x118CC], [0x118AD, 0x118CD], [0x118AE, 0x118CE], [0x118AF, 0x118CF], [0x118B0, 0x118D0], [0x118B1, 0x118D1], [0x118B2, 0x118D2], [0x118B3, 0x118D3], [0x118B4, 0x118D4], [0x118B5, 0x118D5], [0x118B6, 0x118D6], [0x118B7, 0x118D7], [0x118B8, 0x118D8], [0x118B9, 0x118D9], [0x118BA, 0x118DA], [0x118BB, 0x118DB], [0x118BC, 0x118DC], [0x118BD, 0x118DD], [0x118BE, 0x118DE], [0x118BF, 0x118DF], [0x118C0, 0x118A0], [0x118C1, 0x118A1], [0x118C2, 0x118A2], [0x118C3, 0x118A3], [0x118C4, 0x118A4], [0x118C5, 0x118A5], [0x118C6, 0x118A6], [0x118C7, 0x118A7], [0x118C8, 0x118A8], [0x118C9, 0x118A9], [0x118CA, 0x118AA], [0x118CB, 0x118AB], [0x118CC, 0x118AC], [0x118CD, 0x118AD], [0x118CE, 0x118AE], [0x118CF, 0x118AF], [0x118D0, 0x118B0], [0x118D1, 0x118B1], [0x118D2, 0x118B2], [0x118D3, 0x118B3], [0x118D4, 0x118B4], [0x118D5, 0x118B5], [0x118D6, 0x118B6], [0x118D7, 0x118B7], [0x118D8, 0x118B8], [0x118D9, 0x118B9], [0x118DA, 0x118BA], [0x118DB, 0x118BB], [0x118DC, 0x118BC], [0x118DD, 0x118BD], [0x118DE, 0x118BE], [0x118DF, 0x118BF], [0x16E40, 0x16E60], [0x16E41, 0x16E61], [0x16E42, 0x16E62], [0x16E43, 0x16E63], [0x16E44, 0x16E64], [0x16E45, 0x16E65], [0x16E46, 0x16E66], [0x16E47, 0x16E67], [0x16E48, 0x16E68], [0x16E49, 0x16E69], [0x16E4A, 0x16E6A], [0x16E4B, 0x16E6B], [0x16E4C, 0x16E6C], [0x16E4D, 0x16E6D], [0x16E4E, 0x16E6E], [0x16E4F, 0x16E6F], [0x16E50, 0x16E70], [0x16E51, 0x16E71], [0x16E52, 0x16E72], [0x16E53, 0x16E73], [0x16E54, 0x16E74], [0x16E55, 0x16E75], [0x16E56, 0x16E76], [0x16E57, 0x16E77], [0x16E58, 0x16E78], [0x16E59, 0x16E79], [0x16E5A, 0x16E7A], [0x16E5B, 0x16E7B], [0x16E5C, 0x16E7C], [0x16E5D, 0x16E7D], [0x16E5E, 0x16E7E], [0x16E5F, 0x16E7F], [0x16E60, 0x16E40], [0x16E61, 0x16E41], [0x16E62, 0x16E42], [0x16E63, 0x16E43], [0x16E64, 0x16E44], [0x16E65, 0x16E45], [0x16E66, 0x16E46], [0x16E67, 0x16E47], [0x16E68, 0x16E48], [0x16E69, 0x16E49], [0x16E6A, 0x16E4A], [0x16E6B, 0x16E4B], [0x16E6C, 0x16E4C], [0x16E6D, 0x16E4D], [0x16E6E, 0x16E4E], [0x16E6F, 0x16E4F], [0x16E70, 0x16E50], [0x16E71, 0x16E51], [0x16E72, 0x16E52], [0x16E73, 0x16E53], [0x16E74, 0x16E54], [0x16E75, 0x16E55], [0x16E76, 0x16E56], [0x16E77, 0x16E57], [0x16E78, 0x16E58], [0x16E79, 0x16E59], [0x16E7A, 0x16E5A], [0x16E7B, 0x16E5B], [0x16E7C, 0x16E5C], [0x16E7D, 0x16E5D], [0x16E7E, 0x16E5E], [0x16E7F, 0x16E5F], [0x1E900, 0x1E922], [0x1E901, 0x1E923], [0x1E902, 0x1E924], [0x1E903, 0x1E925], [0x1E904, 0x1E926], [0x1E905, 0x1E927], [0x1E906, 0x1E928], [0x1E907, 0x1E929], [0x1E908, 0x1E92A], [0x1E909, 0x1E92B], [0x1E90A, 0x1E92C], [0x1E90B, 0x1E92D], [0x1E90C, 0x1E92E], [0x1E90D, 0x1E92F], [0x1E90E, 0x1E930], [0x1E90F, 0x1E931], [0x1E910, 0x1E932], [0x1E911, 0x1E933], [0x1E912, 0x1E934], [0x1E913, 0x1E935], [0x1E914, 0x1E936], [0x1E915, 0x1E937], [0x1E916, 0x1E938], [0x1E917, 0x1E939], [0x1E918, 0x1E93A], [0x1E919, 0x1E93B], [0x1E91A, 0x1E93C], [0x1E91B, 0x1E93D], [0x1E91C, 0x1E93E], [0x1E91D, 0x1E93F], [0x1E91E, 0x1E940], [0x1E91F, 0x1E941], [0x1E920, 0x1E942], [0x1E921, 0x1E943], [0x1E922, 0x1E900], [0x1E923, 0x1E901], [0x1E924, 0x1E902], [0x1E925, 0x1E903], [0x1E926, 0x1E904], [0x1E927, 0x1E905], [0x1E928, 0x1E906], [0x1E929, 0x1E907], [0x1E92A, 0x1E908], [0x1E92B, 0x1E909], [0x1E92C, 0x1E90A], [0x1E92D, 0x1E90B], [0x1E92E, 0x1E90C], [0x1E92F, 0x1E90D], [0x1E930, 0x1E90E], [0x1E931, 0x1E90F], [0x1E932, 0x1E910], [0x1E933, 0x1E911], [0x1E934, 0x1E912], [0x1E935, 0x1E913], [0x1E936, 0x1E914], [0x1E937, 0x1E915], [0x1E938, 0x1E916], [0x1E939, 0x1E917], [0x1E93A, 0x1E918], [0x1E93B, 0x1E919], [0x1E93C, 0x1E91A], [0x1E93D, 0x1E91B], [0x1E93E, 0x1E91C], [0x1E93F, 0x1E91D], [0x1E940, 0x1E91E], [0x1E941, 0x1E91F], [0x1E942, 0x1E920], [0x1E943, 0x1E921]]);
  68757. var REGULAR = new Map([['d', regenerate().addRange(0x30, 0x39)], ['D', regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0xFFFF)], ['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029)], ['S', regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0xFFFF)], ['w', regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A)], ['W', regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0xFFFF)]]);
  68758. var UNICODE = new Map([['d', regenerate().addRange(0x30, 0x39)], ['D', regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF)], ['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029)], ['S', regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF)], ['w', regenerate(0x5F).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A)], ['W', regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x10FFFF)]]);
  68759. var UNICODE_IGNORE_CASE = new Map([['d', regenerate().addRange(0x30, 0x39)], ['D', regenerate().addRange(0x0, 0x2F).addRange(0x3A, 0x10FFFF)], ['s', regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000, 0xFEFF).addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029)], ['S', regenerate().addRange(0x0, 0x8).addRange(0xE, 0x1F).addRange(0x21, 0x9F).addRange(0xA1, 0x167F).addRange(0x1681, 0x1FFF).addRange(0x200B, 0x2027).addRange(0x202A, 0x202E).addRange(0x2030, 0x205E).addRange(0x2060, 0x2FFF).addRange(0x3001, 0xFEFE).addRange(0xFF00, 0x10FFFF)], ['w', regenerate(0x5F, 0x17F, 0x212A).addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A)], ['W', regenerate(0x60).addRange(0x0, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x17E).addRange(0x180, 0x2129).addRange(0x212B, 0x10FFFF)]]);
  68760. var characterClassEscapeSets = {
  68761. REGULAR: REGULAR,
  68762. UNICODE: UNICODE,
  68763. UNICODE_IGNORE_CASE: UNICODE_IGNORE_CASE
  68764. };
  68765. var generate = regjsgen.generate;
  68766. var parse$2 = parser.parse;
  68767. var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
  68768. regenerate().addRange(0x0, 0xFFFF);
  68769. var DOT_SET_UNICODE = UNICODE_SET.clone().remove(0x000A, 0x000D, 0x2028, 0x2029);
  68770. var getCharacterClassEscapeSet = function getCharacterClassEscapeSet(character, unicode, ignoreCase) {
  68771. if (unicode) {
  68772. if (ignoreCase) {
  68773. return characterClassEscapeSets.UNICODE_IGNORE_CASE.get(character);
  68774. }
  68775. return characterClassEscapeSets.UNICODE.get(character);
  68776. }
  68777. return characterClassEscapeSets.REGULAR.get(character);
  68778. };
  68779. var getUnicodeDotSet = function getUnicodeDotSet(dotAll) {
  68780. return dotAll ? UNICODE_SET : DOT_SET_UNICODE;
  68781. };
  68782. var getUnicodePropertyValueSet = function getUnicodePropertyValueSet(property, value) {
  68783. var path = value ? property + "/" + value : "Binary_Property/" + property;
  68784. try {
  68785. return commonjsRequire("regenerate-unicode-properties/" + path + ".js", "/$$rollup_base$$/node_modules/regexpu-core");
  68786. } catch (exception) {
  68787. throw new Error("Failed to recognize value `" + value + "` for property " + ("`" + property + "`."));
  68788. }
  68789. };
  68790. var handleLoneUnicodePropertyNameOrValue = function handleLoneUnicodePropertyNameOrValue(value) {
  68791. try {
  68792. var _property = 'General_Category';
  68793. var category = unicodeMatchPropertyValueEcmascript(_property, value);
  68794. return getUnicodePropertyValueSet(_property, category);
  68795. } catch (exception) {}
  68796. var property = unicodeMatchPropertyEcmascript(value);
  68797. return getUnicodePropertyValueSet(property);
  68798. };
  68799. var getUnicodePropertyEscapeSet = function getUnicodePropertyEscapeSet(value, isNegative) {
  68800. var parts = value.split('=');
  68801. var firstPart = parts[0];
  68802. var set;
  68803. if (parts.length == 1) {
  68804. set = handleLoneUnicodePropertyNameOrValue(firstPart);
  68805. } else {
  68806. var property = unicodeMatchPropertyEcmascript(firstPart);
  68807. var _value = unicodeMatchPropertyValueEcmascript(property, parts[1]);
  68808. set = getUnicodePropertyValueSet(property, _value);
  68809. }
  68810. if (isNegative) {
  68811. return UNICODE_SET.clone().remove(set);
  68812. }
  68813. return set.clone();
  68814. };
  68815. regenerate.prototype.iuAddRange = function (min, max) {
  68816. var $this = this;
  68817. do {
  68818. var folded = caseFold(min);
  68819. if (folded) {
  68820. $this.add(folded);
  68821. }
  68822. } while (++min <= max);
  68823. return $this;
  68824. };
  68825. var update = function update(item, pattern) {
  68826. var tree = parse$2(pattern, config.useUnicodeFlag ? 'u' : '');
  68827. switch (tree.type) {
  68828. case 'characterClass':
  68829. case 'group':
  68830. case 'value':
  68831. break;
  68832. default:
  68833. tree = wrap(tree, pattern);
  68834. }
  68835. Object.assign(item, tree);
  68836. };
  68837. var wrap = function wrap(tree, pattern) {
  68838. return {
  68839. 'type': 'group',
  68840. 'behavior': 'ignore',
  68841. 'body': [tree],
  68842. 'raw': "(?:" + pattern + ")"
  68843. };
  68844. };
  68845. var caseFold = function caseFold(codePoint) {
  68846. return iuMappings.get(codePoint) || false;
  68847. };
  68848. var processCharacterClass = function processCharacterClass(characterClassItem, regenerateOptions) {
  68849. var set = regenerate();
  68850. for (var _iterator = _createForOfIteratorHelperLoose(characterClassItem.body), _step; !(_step = _iterator()).done;) {
  68851. var item = _step.value;
  68852. switch (item.type) {
  68853. case 'value':
  68854. set.add(item.codePoint);
  68855. if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) {
  68856. var folded = caseFold(item.codePoint);
  68857. if (folded) {
  68858. set.add(folded);
  68859. }
  68860. }
  68861. break;
  68862. case 'characterClassRange':
  68863. var min = item.min.codePoint;
  68864. var max = item.max.codePoint;
  68865. set.addRange(min, max);
  68866. if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) {
  68867. set.iuAddRange(min, max);
  68868. }
  68869. break;
  68870. case 'characterClassEscape':
  68871. set.add(getCharacterClassEscapeSet(item.value, config.unicode, config.ignoreCase));
  68872. break;
  68873. case 'unicodePropertyEscape':
  68874. set.add(getUnicodePropertyEscapeSet(item.value, item.negative));
  68875. break;
  68876. default:
  68877. throw new Error("Unknown term type: " + item.type);
  68878. }
  68879. }
  68880. if (characterClassItem.negative) {
  68881. update(characterClassItem, "(?!" + set.toString(regenerateOptions) + ")[\\s\\S]");
  68882. } else {
  68883. update(characterClassItem, set.toString(regenerateOptions));
  68884. }
  68885. return characterClassItem;
  68886. };
  68887. var updateNamedReference = function updateNamedReference(item, index) {
  68888. delete item.name;
  68889. item.matchIndex = index;
  68890. };
  68891. var assertNoUnmatchedReferences = function assertNoUnmatchedReferences(groups) {
  68892. var unmatchedReferencesNames = Object.keys(groups.unmatchedReferences);
  68893. if (unmatchedReferencesNames.length > 0) {
  68894. throw new Error("Unknown group names: " + unmatchedReferencesNames);
  68895. }
  68896. };
  68897. var processTerm = function processTerm(item, regenerateOptions, groups) {
  68898. switch (item.type) {
  68899. case 'dot':
  68900. if (config.useDotAllFlag) {
  68901. break;
  68902. } else if (config.unicode) {
  68903. update(item, getUnicodeDotSet(config.dotAll).toString(regenerateOptions));
  68904. } else if (config.dotAll) {
  68905. update(item, '[\\s\\S]');
  68906. }
  68907. break;
  68908. case 'characterClass':
  68909. item = processCharacterClass(item, regenerateOptions);
  68910. break;
  68911. case 'unicodePropertyEscape':
  68912. if (config.unicodePropertyEscape) {
  68913. update(item, getUnicodePropertyEscapeSet(item.value, item.negative).toString(regenerateOptions));
  68914. }
  68915. break;
  68916. case 'characterClassEscape':
  68917. update(item, getCharacterClassEscapeSet(item.value, config.unicode, config.ignoreCase).toString(regenerateOptions));
  68918. break;
  68919. case 'group':
  68920. if (item.behavior == 'normal') {
  68921. groups.lastIndex++;
  68922. }
  68923. if (item.name && config.namedGroup) {
  68924. var name = item.name.value;
  68925. if (groups.names[name]) {
  68926. throw new Error("Multiple groups with the same name (" + name + ") are not allowed.");
  68927. }
  68928. var index = groups.lastIndex;
  68929. delete item.name;
  68930. groups.names[name] = index;
  68931. if (groups.onNamedGroup) {
  68932. groups.onNamedGroup.call(null, name, index);
  68933. }
  68934. if (groups.unmatchedReferences[name]) {
  68935. groups.unmatchedReferences[name].forEach(function (reference) {
  68936. updateNamedReference(reference, index);
  68937. });
  68938. delete groups.unmatchedReferences[name];
  68939. }
  68940. }
  68941. case 'alternative':
  68942. case 'disjunction':
  68943. case 'quantifier':
  68944. item.body = item.body.map(function (term) {
  68945. return processTerm(term, regenerateOptions, groups);
  68946. });
  68947. break;
  68948. case 'value':
  68949. var codePoint = item.codePoint;
  68950. var set = regenerate(codePoint);
  68951. if (config.ignoreCase && config.unicode && !config.useUnicodeFlag) {
  68952. var folded = caseFold(codePoint);
  68953. if (folded) {
  68954. set.add(folded);
  68955. }
  68956. }
  68957. update(item, set.toString(regenerateOptions));
  68958. break;
  68959. case 'reference':
  68960. if (item.name) {
  68961. var _name = item.name.value;
  68962. var _index = groups.names[_name];
  68963. if (_index) {
  68964. updateNamedReference(item, _index);
  68965. break;
  68966. }
  68967. if (!groups.unmatchedReferences[_name]) {
  68968. groups.unmatchedReferences[_name] = [];
  68969. }
  68970. groups.unmatchedReferences[_name].push(item);
  68971. }
  68972. break;
  68973. case 'anchor':
  68974. case 'empty':
  68975. case 'group':
  68976. break;
  68977. default:
  68978. throw new Error("Unknown term type: " + item.type);
  68979. }
  68980. return item;
  68981. };
  68982. var config = {
  68983. 'ignoreCase': false,
  68984. 'unicode': false,
  68985. 'dotAll': false,
  68986. 'useDotAllFlag': false,
  68987. 'useUnicodeFlag': false,
  68988. 'unicodePropertyEscape': false,
  68989. 'namedGroup': false
  68990. };
  68991. var rewritePattern = function rewritePattern(pattern, flags, options) {
  68992. config.unicode = flags && flags.includes('u');
  68993. var regjsparserFeatures = {
  68994. 'unicodePropertyEscape': config.unicode,
  68995. 'namedGroups': true,
  68996. 'lookbehind': options && options.lookbehind
  68997. };
  68998. config.ignoreCase = flags && flags.includes('i');
  68999. var supportDotAllFlag = options && options.dotAllFlag;
  69000. config.dotAll = supportDotAllFlag && flags && flags.includes('s');
  69001. config.namedGroup = options && options.namedGroup;
  69002. config.useDotAllFlag = options && options.useDotAllFlag;
  69003. config.useUnicodeFlag = options && options.useUnicodeFlag;
  69004. config.unicodePropertyEscape = options && options.unicodePropertyEscape;
  69005. if (supportDotAllFlag && config.useDotAllFlag) {
  69006. throw new Error('`useDotAllFlag` and `dotAllFlag` cannot both be true!');
  69007. }
  69008. var regenerateOptions = {
  69009. 'hasUnicodeFlag': config.useUnicodeFlag,
  69010. 'bmpOnly': !config.unicode
  69011. };
  69012. var groups = {
  69013. 'onNamedGroup': options && options.onNamedGroup,
  69014. 'lastIndex': 0,
  69015. 'names': Object.create(null),
  69016. 'unmatchedReferences': Object.create(null)
  69017. };
  69018. var tree = parse$2(pattern, flags, regjsparserFeatures);
  69019. processTerm(tree, regenerateOptions, groups);
  69020. assertNoUnmatchedReferences(groups);
  69021. return generate(tree);
  69022. };
  69023. var rewritePattern_1 = rewritePattern;
  69024. var FEATURES = Object.freeze({
  69025. unicodeFlag: 1 << 0,
  69026. dotAllFlag: 1 << 1,
  69027. unicodePropertyEscape: 1 << 2,
  69028. namedCaptureGroups: 1 << 3
  69029. });
  69030. var featuresKey = "@babel/plugin-regexp-features/featuresKey";
  69031. var runtimeKey = "@babel/plugin-regexp-features/runtimeKey";
  69032. function enableFeature(features, feature) {
  69033. return features | feature;
  69034. }
  69035. function hasFeature(features, feature) {
  69036. return !!(features & feature);
  69037. }
  69038. function generateRegexpuOptions(node, features) {
  69039. var useUnicodeFlag = false,
  69040. dotAllFlag = false,
  69041. unicodePropertyEscape = false,
  69042. namedGroup = false;
  69043. var flags = node.flags,
  69044. pattern = node.pattern;
  69045. var flagsIncludesU = flags.includes("u");
  69046. if (flagsIncludesU) {
  69047. if (!hasFeature(features, FEATURES.unicodeFlag)) {
  69048. useUnicodeFlag = true;
  69049. }
  69050. if (hasFeature(features, FEATURES.unicodePropertyEscape) && /\\[pP]{/.test(pattern)) {
  69051. unicodePropertyEscape = true;
  69052. }
  69053. }
  69054. if (hasFeature(features, FEATURES.dotAllFlag) && flags.indexOf("s") >= 0) {
  69055. dotAllFlag = true;
  69056. }
  69057. if (hasFeature(features, FEATURES.namedCaptureGroups) && /\(\?<(?![=!])/.test(pattern)) {
  69058. namedGroup = true;
  69059. }
  69060. if (!namedGroup && !unicodePropertyEscape && !dotAllFlag && (!flagsIncludesU || useUnicodeFlag)) {
  69061. return null;
  69062. }
  69063. if (flagsIncludesU && flags.indexOf("s") >= 0) {
  69064. dotAllFlag = true;
  69065. }
  69066. return {
  69067. useUnicodeFlag: useUnicodeFlag,
  69068. onNamedGroup: function onNamedGroup() {},
  69069. namedGroup: namedGroup,
  69070. unicodePropertyEscape: unicodePropertyEscape,
  69071. dotAllFlag: dotAllFlag,
  69072. lookbehind: true
  69073. };
  69074. }
  69075. function pullFlag(node, flag) {
  69076. node.flags = node.flags.replace(flag, "");
  69077. }
  69078. var version$1 = "7.14.5".split(".").reduce(function (v, x) {
  69079. return v * 1e5 + +x;
  69080. }, 0);
  69081. var versionKey = "@babel/plugin-regexp-features/version";
  69082. function createRegExpFeaturePlugin(_ref) {
  69083. var name = _ref.name,
  69084. feature = _ref.feature,
  69085. _ref$options = _ref.options,
  69086. options = _ref$options === void 0 ? {} : _ref$options;
  69087. return {
  69088. name: name,
  69089. pre: function pre() {
  69090. var _file$get;
  69091. var file = this.file;
  69092. var features = (_file$get = file.get(featuresKey)) != null ? _file$get : 0;
  69093. var newFeatures = enableFeature(features, FEATURES[feature]);
  69094. var useUnicodeFlag = options.useUnicodeFlag,
  69095. _options$runtime = options.runtime,
  69096. runtime = _options$runtime === void 0 ? true : _options$runtime;
  69097. if (useUnicodeFlag === false) {
  69098. newFeatures = enableFeature(newFeatures, FEATURES.unicodeFlag);
  69099. }
  69100. if (newFeatures !== features) {
  69101. file.set(featuresKey, newFeatures);
  69102. }
  69103. if (!runtime) {
  69104. file.set(runtimeKey, false);
  69105. }
  69106. if (!file.has(versionKey) || file.get(versionKey) < version$1) {
  69107. file.set(versionKey, version$1);
  69108. }
  69109. },
  69110. visitor: {
  69111. RegExpLiteral: function RegExpLiteral(path) {
  69112. var _file$get2;
  69113. var node = path.node;
  69114. var file = this.file;
  69115. var features = file.get(featuresKey);
  69116. var runtime = (_file$get2 = file.get(runtimeKey)) != null ? _file$get2 : true;
  69117. var regexpuOptions = generateRegexpuOptions(node, features);
  69118. if (regexpuOptions === null) {
  69119. return;
  69120. }
  69121. var namedCaptureGroups = {};
  69122. if (regexpuOptions.namedGroup) {
  69123. regexpuOptions.onNamedGroup = function (name, index) {
  69124. namedCaptureGroups[name] = index;
  69125. };
  69126. }
  69127. node.pattern = rewritePattern_1(node.pattern, node.flags, regexpuOptions);
  69128. if (regexpuOptions.namedGroup && Object.keys(namedCaptureGroups).length > 0 && runtime && !isRegExpTest(path)) {
  69129. var call = callExpression(this.addHelper("wrapRegExp"), [node, valueToNode(namedCaptureGroups)]);
  69130. annotateAsPure(call);
  69131. path.replaceWith(call);
  69132. }
  69133. if (hasFeature(features, FEATURES.unicodeFlag)) {
  69134. pullFlag(node, "u");
  69135. }
  69136. if (hasFeature(features, FEATURES.dotAllFlag)) {
  69137. pullFlag(node, "s");
  69138. }
  69139. }
  69140. }
  69141. };
  69142. }
  69143. function isRegExpTest(path) {
  69144. return path.parentPath.isMemberExpression({
  69145. object: path.node,
  69146. computed: false
  69147. }) && path.parentPath.get("property").isIdentifier({
  69148. name: "test"
  69149. });
  69150. }
  69151. var _proposalUnicodePropertyRegex = declare(function (api, options) {
  69152. api.assertVersion(7);
  69153. var _options$useUnicodeFl = options.useUnicodeFlag,
  69154. useUnicodeFlag = _options$useUnicodeFl === void 0 ? true : _options$useUnicodeFl;
  69155. if (typeof useUnicodeFlag !== "boolean") {
  69156. throw new Error(".useUnicodeFlag must be a boolean, or undefined");
  69157. }
  69158. return createRegExpFeaturePlugin({
  69159. name: "proposal-unicode-property-regex",
  69160. feature: "unicodePropertyEscape",
  69161. options: {
  69162. useUnicodeFlag: useUnicodeFlag
  69163. }
  69164. });
  69165. });
  69166. var _transformAsyncToGenerator = declare(function (api, options) {
  69167. api.assertVersion(7);
  69168. var method = options.method,
  69169. module = options.module;
  69170. var noNewArrows = api.assumption("noNewArrows");
  69171. if (method && module) {
  69172. return {
  69173. name: "transform-async-to-generator",
  69174. visitor: {
  69175. Function: function Function(path, state) {
  69176. if (!path.node.async || path.node.generator) return;
  69177. var wrapAsync = state.methodWrapper;
  69178. if (wrapAsync) {
  69179. wrapAsync = cloneNode(wrapAsync);
  69180. } else {
  69181. wrapAsync = state.methodWrapper = addNamed(path, method, module);
  69182. }
  69183. remapAsyncToGenerator(path, {
  69184. wrapAsync: wrapAsync
  69185. }, noNewArrows);
  69186. }
  69187. }
  69188. };
  69189. }
  69190. return {
  69191. name: "transform-async-to-generator",
  69192. visitor: {
  69193. Function: function Function(path, state) {
  69194. if (!path.node.async || path.node.generator) return;
  69195. remapAsyncToGenerator(path, {
  69196. wrapAsync: state.addHelper("asyncToGenerator")
  69197. }, noNewArrows);
  69198. }
  69199. }
  69200. };
  69201. });
  69202. var _transformArrowFunctions = declare(function (api, options) {
  69203. var _api$assumption;
  69204. api.assertVersion(7);
  69205. var noNewArrows = (_api$assumption = api.assumption("noNewArrows")) != null ? _api$assumption : !options.spec;
  69206. return {
  69207. name: "transform-arrow-functions",
  69208. visitor: {
  69209. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  69210. if (!path.isArrowFunctionExpression()) return;
  69211. path.arrowFunctionToExpression({
  69212. allowInsertArrow: false,
  69213. noNewArrows: noNewArrows,
  69214. specCompliant: !noNewArrows
  69215. });
  69216. }
  69217. }
  69218. };
  69219. });
  69220. var _transformBlockScopedFunctions = declare(function (api) {
  69221. api.assertVersion(7);
  69222. function statementList(key, path) {
  69223. var paths = path.get(key);
  69224. for (var _iterator = _createForOfIteratorHelperLoose(paths), _step; !(_step = _iterator()).done;) {
  69225. var _path = _step.value;
  69226. var func = _path.node;
  69227. if (!_path.isFunctionDeclaration()) continue;
  69228. var declar = variableDeclaration("let", [variableDeclarator(func.id, toExpression(func))]);
  69229. declar._blockHoist = 2;
  69230. func.id = null;
  69231. _path.replaceWith(declar);
  69232. }
  69233. }
  69234. return {
  69235. name: "transform-block-scoped-functions",
  69236. visitor: {
  69237. BlockStatement: function BlockStatement(path) {
  69238. var node = path.node,
  69239. parent = path.parent;
  69240. if (isFunction$1(parent, {
  69241. body: node
  69242. }) || isExportDeclaration(parent)) {
  69243. return;
  69244. }
  69245. statementList("body", path);
  69246. },
  69247. SwitchCase: function SwitchCase(path) {
  69248. statementList("consequent", path);
  69249. }
  69250. }
  69251. };
  69252. });
  69253. var _templateObject$c;
  69254. function getTDZStatus(refPath, bindingPath) {
  69255. var executionStatus = bindingPath._guessExecutionStatusRelativeTo(refPath);
  69256. if (executionStatus === "before") {
  69257. return "outside";
  69258. } else if (executionStatus === "after") {
  69259. return "inside";
  69260. } else {
  69261. return "maybe";
  69262. }
  69263. }
  69264. function buildTDZAssert(node, state) {
  69265. return callExpression(state.addHelper("temporalRef"), [node, stringLiteral(node.name)]);
  69266. }
  69267. function isReference$1(node, scope, state) {
  69268. var declared = state.letReferences.get(node.name);
  69269. if (!declared) return false;
  69270. return scope.getBindingIdentifier(node.name) === declared;
  69271. }
  69272. var visitedMaybeTDZNodes = new WeakSet();
  69273. var visitor = {
  69274. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  69275. if (!state.tdzEnabled) return;
  69276. var node = path.node,
  69277. parent = path.parent,
  69278. scope = path.scope;
  69279. if (path.parentPath.isFor({
  69280. left: node
  69281. })) return;
  69282. if (!isReference$1(node, scope, state)) return;
  69283. var bindingPath = scope.getBinding(node.name).path;
  69284. if (bindingPath.isFunctionDeclaration()) return;
  69285. var status = getTDZStatus(path, bindingPath);
  69286. if (status === "outside") return;
  69287. if (status === "maybe") {
  69288. if (visitedMaybeTDZNodes.has(node)) {
  69289. return;
  69290. }
  69291. visitedMaybeTDZNodes.add(node);
  69292. var assert = buildTDZAssert(node, state);
  69293. bindingPath.parent._tdzThis = true;
  69294. if (path.parentPath.isUpdateExpression()) {
  69295. if (parent._ignoreBlockScopingTDZ) return;
  69296. path.parentPath.replaceWith(sequenceExpression([assert, parent]));
  69297. } else {
  69298. path.replaceWith(assert);
  69299. }
  69300. } else if (status === "inside") {
  69301. path.replaceWith(template$2.ast(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["", "(\"", "\")"])), state.addHelper("tdz"), node.name));
  69302. }
  69303. },
  69304. AssignmentExpression: {
  69305. exit: function exit(path, state) {
  69306. if (!state.tdzEnabled) return;
  69307. var node = path.node;
  69308. if (node._ignoreBlockScopingTDZ) return;
  69309. var nodes = [];
  69310. var ids = path.getBindingIdentifiers();
  69311. for (var _i = 0, _Object$keys = Object.keys(ids); _i < _Object$keys.length; _i++) {
  69312. var name = _Object$keys[_i];
  69313. var id = ids[name];
  69314. if (isReference$1(id, path.scope, state)) {
  69315. nodes.push(id);
  69316. }
  69317. }
  69318. if (nodes.length) {
  69319. node._ignoreBlockScopingTDZ = true;
  69320. nodes.push(node);
  69321. path.replaceWithMultiple(nodes.map(function (n) {
  69322. return expressionStatement(n);
  69323. }));
  69324. }
  69325. }
  69326. }
  69327. };
  69328. var DONE = new WeakSet();
  69329. var _transformBlockScoping = declare(function (api, opts) {
  69330. api.assertVersion(7);
  69331. var _opts$throwIfClosureR = opts.throwIfClosureRequired,
  69332. throwIfClosureRequired = _opts$throwIfClosureR === void 0 ? false : _opts$throwIfClosureR,
  69333. _opts$tdz = opts.tdz,
  69334. tdzEnabled = _opts$tdz === void 0 ? false : _opts$tdz;
  69335. if (typeof throwIfClosureRequired !== "boolean") {
  69336. throw new Error(".throwIfClosureRequired must be a boolean, or undefined");
  69337. }
  69338. if (typeof tdzEnabled !== "boolean") {
  69339. throw new Error(".tdz must be a boolean, or undefined");
  69340. }
  69341. return {
  69342. name: "transform-block-scoping",
  69343. visitor: {
  69344. VariableDeclaration: function VariableDeclaration(path) {
  69345. var node = path.node,
  69346. parent = path.parent,
  69347. scope = path.scope;
  69348. if (!isBlockScoped(node)) return;
  69349. convertBlockScopedToVar(path, null, parent, scope, true);
  69350. if (node._tdzThis) {
  69351. var nodes = [node];
  69352. for (var i = 0; i < node.declarations.length; i++) {
  69353. var decl = node.declarations[i];
  69354. var assign = assignmentExpression("=", cloneNode(decl.id), decl.init || scope.buildUndefinedNode());
  69355. assign._ignoreBlockScopingTDZ = true;
  69356. nodes.push(expressionStatement(assign));
  69357. decl.init = this.addHelper("temporalUndefined");
  69358. }
  69359. node._blockHoist = 2;
  69360. if (path.isCompletionRecord()) {
  69361. nodes.push(expressionStatement(scope.buildUndefinedNode()));
  69362. }
  69363. path.replaceWithMultiple(nodes);
  69364. }
  69365. },
  69366. Loop: function Loop(path, state) {
  69367. var parent = path.parent,
  69368. scope = path.scope;
  69369. path.ensureBlock();
  69370. var blockScoping = new BlockScoping(path, path.get("body"), parent, scope, throwIfClosureRequired, tdzEnabled, state);
  69371. var replace = blockScoping.run();
  69372. if (replace) path.replaceWith(replace);
  69373. },
  69374. CatchClause: function CatchClause(path, state) {
  69375. var parent = path.parent,
  69376. scope = path.scope;
  69377. var blockScoping = new BlockScoping(null, path.get("body"), parent, scope, throwIfClosureRequired, tdzEnabled, state);
  69378. blockScoping.run();
  69379. },
  69380. "BlockStatement|SwitchStatement|Program": function BlockStatementSwitchStatementProgram(path, state) {
  69381. if (!ignoreBlock(path)) {
  69382. var blockScoping = new BlockScoping(null, path, path.parent, path.scope, throwIfClosureRequired, tdzEnabled, state);
  69383. blockScoping.run();
  69384. }
  69385. }
  69386. }
  69387. };
  69388. });
  69389. function ignoreBlock(path) {
  69390. return isLoop$1(path.parent) || isCatchClause(path.parent);
  69391. }
  69392. var buildRetCheck = template$2("\n if (typeof RETURN === \"object\") return RETURN.v;\n");
  69393. function isBlockScoped(node) {
  69394. if (!isVariableDeclaration(node)) return false;
  69395. if (node[BLOCK_SCOPED_SYMBOL]) return true;
  69396. if (node.kind !== "let" && node.kind !== "const") return false;
  69397. return true;
  69398. }
  69399. function isInLoop(path) {
  69400. var loopOrFunctionParent = path.find(function (path) {
  69401. return path.isLoop() || path.isFunction();
  69402. });
  69403. return loopOrFunctionParent == null ? void 0 : loopOrFunctionParent.isLoop();
  69404. }
  69405. function convertBlockScopedToVar(path, node, parent, scope, moveBindingsToParent) {
  69406. if (moveBindingsToParent === void 0) {
  69407. moveBindingsToParent = false;
  69408. }
  69409. if (!node) {
  69410. node = path.node;
  69411. }
  69412. if (isInLoop(path) && !isFor(parent)) {
  69413. for (var i = 0; i < node.declarations.length; i++) {
  69414. var declar = node.declarations[i];
  69415. declar.init = declar.init || scope.buildUndefinedNode();
  69416. }
  69417. }
  69418. node[BLOCK_SCOPED_SYMBOL] = true;
  69419. node.kind = "var";
  69420. if (moveBindingsToParent) {
  69421. var parentScope = scope.getFunctionParent() || scope.getProgramParent();
  69422. for (var _i = 0, _Object$keys = Object.keys(path.getBindingIdentifiers()); _i < _Object$keys.length; _i++) {
  69423. var name = _Object$keys[_i];
  69424. var binding = scope.getOwnBinding(name);
  69425. if (binding) binding.kind = "var";
  69426. scope.moveBindingTo(name, parentScope);
  69427. }
  69428. }
  69429. }
  69430. function isVar(node) {
  69431. return isVariableDeclaration(node, {
  69432. kind: "var"
  69433. }) && !isBlockScoped(node);
  69434. }
  69435. var letReferenceBlockVisitor = traverse.visitors.merge([{
  69436. Loop: {
  69437. enter: function enter(path, state) {
  69438. state.loopDepth++;
  69439. },
  69440. exit: function exit(path, state) {
  69441. state.loopDepth--;
  69442. }
  69443. },
  69444. FunctionParent: function FunctionParent(path, state) {
  69445. if (state.loopDepth > 0) {
  69446. path.traverse(letReferenceFunctionVisitor, state);
  69447. } else {
  69448. path.traverse(visitor, state);
  69449. }
  69450. return path.skip();
  69451. }
  69452. }, visitor]);
  69453. var letReferenceFunctionVisitor = traverse.visitors.merge([{
  69454. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  69455. var ref = state.letReferences.get(path.node.name);
  69456. if (!ref) return;
  69457. var localBinding = path.scope.getBindingIdentifier(path.node.name);
  69458. if (localBinding && localBinding !== ref) return;
  69459. state.closurify = true;
  69460. }
  69461. }, visitor]);
  69462. var hoistVarDeclarationsVisitor = {
  69463. enter: function enter(path, self) {
  69464. var node = path.node;
  69465. path.parent;
  69466. if (path.isForStatement()) {
  69467. if (isVar(node.init)) {
  69468. var nodes = self.pushDeclar(node.init);
  69469. if (nodes.length === 1) {
  69470. node.init = nodes[0];
  69471. } else {
  69472. node.init = sequenceExpression(nodes);
  69473. }
  69474. }
  69475. } else if (path.isFor()) {
  69476. if (isVar(node.left)) {
  69477. self.pushDeclar(node.left);
  69478. node.left = node.left.declarations[0].id;
  69479. }
  69480. } else if (isVar(node)) {
  69481. path.replaceWithMultiple(self.pushDeclar(node).map(function (expr) {
  69482. return expressionStatement(expr);
  69483. }));
  69484. } else if (path.isFunction()) {
  69485. return path.skip();
  69486. }
  69487. }
  69488. };
  69489. var loopLabelVisitor = {
  69490. LabeledStatement: function LabeledStatement(_ref, state) {
  69491. var node = _ref.node;
  69492. state.innerLabels.push(node.label.name);
  69493. }
  69494. };
  69495. var continuationVisitor = {
  69496. enter: function enter(path, state) {
  69497. if (path.isAssignmentExpression() || path.isUpdateExpression()) {
  69498. for (var _i2 = 0, _Object$keys2 = Object.keys(path.getBindingIdentifiers()); _i2 < _Object$keys2.length; _i2++) {
  69499. var name = _Object$keys2[_i2];
  69500. if (state.outsideReferences.get(name) !== path.scope.getBindingIdentifier(name)) {
  69501. continue;
  69502. }
  69503. state.reassignments[name] = true;
  69504. }
  69505. } else if (path.isReturnStatement()) {
  69506. state.returnStatements.push(path);
  69507. }
  69508. }
  69509. };
  69510. function loopNodeTo(node) {
  69511. if (isBreakStatement(node)) {
  69512. return "break";
  69513. } else if (isContinueStatement(node)) {
  69514. return "continue";
  69515. }
  69516. }
  69517. var loopVisitor = {
  69518. Loop: function Loop(path, state) {
  69519. var oldIgnoreLabeless = state.ignoreLabeless;
  69520. state.ignoreLabeless = true;
  69521. path.traverse(loopVisitor, state);
  69522. state.ignoreLabeless = oldIgnoreLabeless;
  69523. path.skip();
  69524. },
  69525. Function: function Function(path) {
  69526. path.skip();
  69527. },
  69528. SwitchCase: function SwitchCase(path, state) {
  69529. var oldInSwitchCase = state.inSwitchCase;
  69530. state.inSwitchCase = true;
  69531. path.traverse(loopVisitor, state);
  69532. state.inSwitchCase = oldInSwitchCase;
  69533. path.skip();
  69534. },
  69535. "BreakStatement|ContinueStatement|ReturnStatement": function BreakStatementContinueStatementReturnStatement(path, state) {
  69536. var node = path.node,
  69537. scope = path.scope;
  69538. if (node[this.LOOP_IGNORE]) return;
  69539. var replace;
  69540. var loopText = loopNodeTo(node);
  69541. if (loopText) {
  69542. if (node.label) {
  69543. if (state.innerLabels.indexOf(node.label.name) >= 0) {
  69544. return;
  69545. }
  69546. loopText = loopText + "|" + node.label.name;
  69547. } else {
  69548. if (state.ignoreLabeless) return;
  69549. if (isBreakStatement(node) && state.inSwitchCase) return;
  69550. }
  69551. state.hasBreakContinue = true;
  69552. state.map[loopText] = node;
  69553. replace = stringLiteral(loopText);
  69554. }
  69555. if (path.isReturnStatement()) {
  69556. state.hasReturn = true;
  69557. replace = objectExpression([objectProperty(identifier("v"), node.argument || scope.buildUndefinedNode())]);
  69558. }
  69559. if (replace) {
  69560. replace = returnStatement(replace);
  69561. replace[this.LOOP_IGNORE] = true;
  69562. path.skip();
  69563. path.replaceWith(inherits(replace, node));
  69564. }
  69565. }
  69566. };
  69567. function isStrict(path) {
  69568. return !!path.find(function (_ref2) {
  69569. var node = _ref2.node;
  69570. if (isProgram(node)) {
  69571. if (node.sourceType === "module") return true;
  69572. } else if (!isBlockStatement(node)) return false;
  69573. return node.directives.some(function (directive) {
  69574. return directive.value.value === "use strict";
  69575. });
  69576. });
  69577. }
  69578. var BlockScoping = function () {
  69579. function BlockScoping(loopPath, blockPath, parent, scope, throwIfClosureRequired, tdzEnabled, state) {
  69580. this.parent = parent;
  69581. this.scope = scope;
  69582. this.state = state;
  69583. this.throwIfClosureRequired = throwIfClosureRequired;
  69584. this.tdzEnabled = tdzEnabled;
  69585. this.blockPath = blockPath;
  69586. this.block = blockPath.node;
  69587. this.outsideLetReferences = new Map();
  69588. this.hasLetReferences = false;
  69589. this.letReferences = new Map();
  69590. this.body = [];
  69591. if (loopPath) {
  69592. this.loopParent = loopPath.parent;
  69593. this.loopLabel = isLabeledStatement(this.loopParent) && this.loopParent.label;
  69594. this.loopPath = loopPath;
  69595. this.loop = loopPath.node;
  69596. }
  69597. }
  69598. var _proto = BlockScoping.prototype;
  69599. _proto.run = function run() {
  69600. var block = this.block;
  69601. if (DONE.has(block)) return;
  69602. DONE.add(block);
  69603. var needsClosure = this.getLetReferences();
  69604. this.checkConstants();
  69605. if (isFunction$1(this.parent) || isProgram(this.block)) {
  69606. this.updateScopeInfo();
  69607. return;
  69608. }
  69609. if (!this.hasLetReferences) return;
  69610. if (needsClosure) {
  69611. this.wrapClosure();
  69612. } else {
  69613. this.remap();
  69614. }
  69615. this.updateScopeInfo(needsClosure);
  69616. if (this.loopLabel && !isLabeledStatement(this.loopParent)) {
  69617. return labeledStatement(this.loopLabel, this.loop);
  69618. }
  69619. };
  69620. _proto.checkConstants = function checkConstants() {
  69621. var scope = this.scope;
  69622. var state = this.state;
  69623. for (var _i3 = 0, _Object$keys3 = Object.keys(scope.bindings); _i3 < _Object$keys3.length; _i3++) {
  69624. var name = _Object$keys3[_i3];
  69625. var binding = scope.bindings[name];
  69626. if (binding.kind !== "const") continue;
  69627. for (var _i4 = 0, _arr = binding.constantViolations; _i4 < _arr.length; _i4++) {
  69628. var violation = _arr[_i4];
  69629. var readOnlyError = state.addHelper("readOnlyError");
  69630. var throwNode = callExpression(readOnlyError, [stringLiteral(name)]);
  69631. if (violation.isAssignmentExpression()) {
  69632. var operator = violation.node.operator;
  69633. if (operator === "=") {
  69634. violation.replaceWith(sequenceExpression([violation.get("right").node, throwNode]));
  69635. } else if (["&&=", "||=", "??="].includes(operator)) {
  69636. violation.replaceWith(logicalExpression(operator.slice(0, -1), violation.get("left").node, sequenceExpression([violation.get("right").node, throwNode])));
  69637. } else {
  69638. violation.replaceWith(sequenceExpression([binaryExpression(operator.slice(0, -1), violation.get("left").node, violation.get("right").node), throwNode]));
  69639. }
  69640. } else if (violation.isUpdateExpression()) {
  69641. violation.replaceWith(sequenceExpression([unaryExpression("+", violation.get("argument").node), throwNode]));
  69642. } else if (violation.isForXStatement()) {
  69643. violation.ensureBlock();
  69644. violation.get("left").replaceWith(variableDeclaration("var", [variableDeclarator(violation.scope.generateUidIdentifier(name))]));
  69645. violation.node.body.body.unshift(expressionStatement(throwNode));
  69646. }
  69647. }
  69648. }
  69649. };
  69650. _proto.updateScopeInfo = function updateScopeInfo(wrappedInClosure) {
  69651. var blockScope = this.blockPath.scope;
  69652. var parentScope = blockScope.getFunctionParent() || blockScope.getProgramParent();
  69653. var letRefs = this.letReferences;
  69654. for (var _iterator = _createForOfIteratorHelperLoose(letRefs.keys()), _step; !(_step = _iterator()).done;) {
  69655. var key = _step.value;
  69656. var ref = letRefs.get(key);
  69657. var binding = blockScope.getBinding(ref.name);
  69658. if (!binding) continue;
  69659. if (binding.kind === "let" || binding.kind === "const") {
  69660. binding.kind = "var";
  69661. if (wrappedInClosure) {
  69662. if (blockScope.hasOwnBinding(ref.name)) {
  69663. blockScope.removeBinding(ref.name);
  69664. }
  69665. } else {
  69666. blockScope.moveBindingTo(ref.name, parentScope);
  69667. }
  69668. }
  69669. }
  69670. };
  69671. _proto.remap = function remap() {
  69672. var letRefs = this.letReferences;
  69673. var outsideLetRefs = this.outsideLetReferences;
  69674. var scope = this.scope;
  69675. var blockPathScope = this.blockPath.scope;
  69676. for (var _iterator2 = _createForOfIteratorHelperLoose(letRefs.keys()), _step2; !(_step2 = _iterator2()).done;) {
  69677. var key = _step2.value;
  69678. var ref = letRefs.get(key);
  69679. if (scope.parentHasBinding(key) || scope.hasGlobal(key)) {
  69680. var binding = scope.getOwnBinding(key);
  69681. if (binding) {
  69682. var parentBinding = scope.parent.getOwnBinding(key);
  69683. if (binding.kind === "hoisted" && !binding.path.node.async && !binding.path.node.generator && (!parentBinding || isVar(parentBinding.path.parent)) && !isStrict(binding.path.parentPath)) {
  69684. continue;
  69685. }
  69686. scope.rename(ref.name);
  69687. }
  69688. if (blockPathScope.hasOwnBinding(key)) {
  69689. blockPathScope.rename(ref.name);
  69690. }
  69691. }
  69692. }
  69693. for (var _iterator3 = _createForOfIteratorHelperLoose(outsideLetRefs.keys()), _step3; !(_step3 = _iterator3()).done;) {
  69694. var _key = _step3.value;
  69695. var _ref3 = letRefs.get(_key);
  69696. if (isInLoop(this.blockPath) && blockPathScope.hasOwnBinding(_key)) {
  69697. blockPathScope.rename(_ref3.name);
  69698. }
  69699. }
  69700. };
  69701. _proto.wrapClosure = function wrapClosure() {
  69702. if (this.throwIfClosureRequired) {
  69703. throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure " + "(throwIfClosureRequired).");
  69704. }
  69705. var block = this.block;
  69706. var outsideRefs = this.outsideLetReferences;
  69707. if (this.loop) {
  69708. for (var _i5 = 0, _Array$from = Array.from(outsideRefs.keys()); _i5 < _Array$from.length; _i5++) {
  69709. var name = _Array$from[_i5];
  69710. var id = outsideRefs.get(name);
  69711. if (this.scope.hasGlobal(id.name) || this.scope.parentHasBinding(id.name)) {
  69712. outsideRefs["delete"](id.name);
  69713. this.letReferences["delete"](id.name);
  69714. this.scope.rename(id.name);
  69715. this.letReferences.set(id.name, id);
  69716. outsideRefs.set(id.name, id);
  69717. }
  69718. }
  69719. }
  69720. this.has = this.checkLoop();
  69721. this.hoistVarDeclarations();
  69722. var args = Array.from(outsideRefs.values(), function (node) {
  69723. return cloneNode(node);
  69724. });
  69725. var params = args.map(function (id) {
  69726. return cloneNode(id);
  69727. });
  69728. var isSwitch = this.blockPath.isSwitchStatement();
  69729. var fn = functionExpression(null, params, blockStatement(isSwitch ? [block] : block.body));
  69730. this.addContinuations(fn);
  69731. var call = callExpression(nullLiteral(), args);
  69732. var basePath = ".callee";
  69733. var hasYield = traverse.hasType(fn.body, "YieldExpression", FUNCTION_TYPES);
  69734. if (hasYield) {
  69735. fn.generator = true;
  69736. call = yieldExpression(call, true);
  69737. basePath = ".argument" + basePath;
  69738. }
  69739. var hasAsync = traverse.hasType(fn.body, "AwaitExpression", FUNCTION_TYPES);
  69740. if (hasAsync) {
  69741. fn.async = true;
  69742. call = awaitExpression(call);
  69743. basePath = ".argument" + basePath;
  69744. }
  69745. var placeholderPath;
  69746. var index;
  69747. if (this.has.hasReturn || this.has.hasBreakContinue) {
  69748. var ret = this.scope.generateUid("ret");
  69749. this.body.push(variableDeclaration("var", [variableDeclarator(identifier(ret), call)]));
  69750. placeholderPath = "declarations.0.init" + basePath;
  69751. index = this.body.length - 1;
  69752. this.buildHas(ret);
  69753. } else {
  69754. this.body.push(expressionStatement(call));
  69755. placeholderPath = "expression" + basePath;
  69756. index = this.body.length - 1;
  69757. }
  69758. var callPath;
  69759. if (isSwitch) {
  69760. var _this$blockPath = this.blockPath,
  69761. parentPath = _this$blockPath.parentPath,
  69762. listKey = _this$blockPath.listKey,
  69763. key = _this$blockPath.key;
  69764. this.blockPath.replaceWithMultiple(this.body);
  69765. callPath = parentPath.get(listKey)[key + index];
  69766. } else {
  69767. block.body = this.body;
  69768. callPath = this.blockPath.get("body")[index];
  69769. }
  69770. var placeholder = callPath.get(placeholderPath);
  69771. var fnPath;
  69772. if (this.loop) {
  69773. var loopId = this.scope.generateUid("loop");
  69774. var p = this.loopPath.insertBefore(variableDeclaration("var", [variableDeclarator(identifier(loopId), fn)]));
  69775. placeholder.replaceWith(identifier(loopId));
  69776. fnPath = p[0].get("declarations.0.init");
  69777. } else {
  69778. placeholder.replaceWith(fn);
  69779. fnPath = placeholder;
  69780. }
  69781. fnPath.unwrapFunctionEnvironment();
  69782. };
  69783. _proto.addContinuations = function addContinuations(fn) {
  69784. var _this = this;
  69785. var state = {
  69786. reassignments: {},
  69787. returnStatements: [],
  69788. outsideReferences: this.outsideLetReferences
  69789. };
  69790. this.scope.traverse(fn, continuationVisitor, state);
  69791. var _loop = function _loop(i) {
  69792. var param = fn.params[i];
  69793. if (!state.reassignments[param.name]) return "continue";
  69794. var paramName = param.name;
  69795. var newParamName = _this.scope.generateUid(param.name);
  69796. fn.params[i] = identifier(newParamName);
  69797. _this.scope.rename(paramName, newParamName, fn);
  69798. state.returnStatements.forEach(function (returnStatement) {
  69799. returnStatement.insertBefore(expressionStatement(assignmentExpression("=", identifier(paramName), identifier(newParamName))));
  69800. });
  69801. fn.body.body.push(expressionStatement(assignmentExpression("=", identifier(paramName), identifier(newParamName))));
  69802. };
  69803. for (var i = 0; i < fn.params.length; i++) {
  69804. var _ret = _loop(i);
  69805. if (_ret === "continue") continue;
  69806. }
  69807. };
  69808. _proto.getLetReferences = function getLetReferences() {
  69809. var _this2 = this;
  69810. var block = this.block;
  69811. var declarators = [];
  69812. if (this.loop) {
  69813. var init = this.loop.left || this.loop.init;
  69814. if (isBlockScoped(init)) {
  69815. declarators.push(init);
  69816. var names = getBindingIdentifiers$1(init);
  69817. for (var _i6 = 0, _Object$keys4 = Object.keys(names); _i6 < _Object$keys4.length; _i6++) {
  69818. var name = _Object$keys4[_i6];
  69819. this.outsideLetReferences.set(name, names[name]);
  69820. }
  69821. }
  69822. }
  69823. var addDeclarationsFromChild = function addDeclarationsFromChild(path, node) {
  69824. node = node || path.node;
  69825. if (isClassDeclaration(node) || isFunctionDeclaration(node) || isBlockScoped(node)) {
  69826. if (isBlockScoped(node)) {
  69827. convertBlockScopedToVar(path, node, block, _this2.scope);
  69828. }
  69829. if (node.declarations) {
  69830. for (var i = 0; i < node.declarations.length; i++) {
  69831. declarators.push(node.declarations[i]);
  69832. }
  69833. } else {
  69834. declarators.push(node);
  69835. }
  69836. }
  69837. if (isLabeledStatement(node)) {
  69838. addDeclarationsFromChild(path.get("body"), node.body);
  69839. }
  69840. };
  69841. if (block.body) {
  69842. var declarPaths = this.blockPath.get("body");
  69843. for (var i = 0; i < block.body.length; i++) {
  69844. addDeclarationsFromChild(declarPaths[i]);
  69845. }
  69846. }
  69847. if (block.cases) {
  69848. var _declarPaths = this.blockPath.get("cases");
  69849. for (var _i7 = 0; _i7 < block.cases.length; _i7++) {
  69850. var consequents = block.cases[_i7].consequent;
  69851. for (var j = 0; j < consequents.length; j++) {
  69852. var declar = consequents[j];
  69853. addDeclarationsFromChild(_declarPaths[_i7], declar);
  69854. }
  69855. }
  69856. }
  69857. for (var _i8 = 0; _i8 < declarators.length; _i8++) {
  69858. var _declar = declarators[_i8];
  69859. var keys = getBindingIdentifiers$1(_declar, false, true);
  69860. for (var _i9 = 0, _Object$keys5 = Object.keys(keys); _i9 < _Object$keys5.length; _i9++) {
  69861. var key = _Object$keys5[_i9];
  69862. this.letReferences.set(key, keys[key]);
  69863. }
  69864. this.hasLetReferences = true;
  69865. }
  69866. if (!this.hasLetReferences) return;
  69867. var state = {
  69868. letReferences: this.letReferences,
  69869. closurify: false,
  69870. loopDepth: 0,
  69871. tdzEnabled: this.tdzEnabled,
  69872. addHelper: function addHelper(name) {
  69873. return _this2.state.addHelper(name);
  69874. }
  69875. };
  69876. if (isInLoop(this.blockPath)) {
  69877. state.loopDepth++;
  69878. }
  69879. this.blockPath.traverse(letReferenceBlockVisitor, state);
  69880. return state.closurify;
  69881. };
  69882. _proto.checkLoop = function checkLoop() {
  69883. var state = {
  69884. hasBreakContinue: false,
  69885. ignoreLabeless: false,
  69886. inSwitchCase: false,
  69887. innerLabels: [],
  69888. hasReturn: false,
  69889. isLoop: !!this.loop,
  69890. map: {},
  69891. LOOP_IGNORE: Symbol()
  69892. };
  69893. this.blockPath.traverse(loopLabelVisitor, state);
  69894. this.blockPath.traverse(loopVisitor, state);
  69895. return state;
  69896. };
  69897. _proto.hoistVarDeclarations = function hoistVarDeclarations() {
  69898. this.blockPath.traverse(hoistVarDeclarationsVisitor, this);
  69899. };
  69900. _proto.pushDeclar = function pushDeclar(node) {
  69901. var declars = [];
  69902. var names = getBindingIdentifiers$1(node);
  69903. for (var _i10 = 0, _Object$keys6 = Object.keys(names); _i10 < _Object$keys6.length; _i10++) {
  69904. var name = _Object$keys6[_i10];
  69905. declars.push(variableDeclarator(names[name]));
  69906. }
  69907. this.body.push(variableDeclaration(node.kind, declars));
  69908. var replace = [];
  69909. for (var i = 0; i < node.declarations.length; i++) {
  69910. var declar = node.declarations[i];
  69911. if (!declar.init) continue;
  69912. var expr = assignmentExpression("=", cloneNode(declar.id), cloneNode(declar.init));
  69913. replace.push(inherits(expr, declar));
  69914. }
  69915. return replace;
  69916. };
  69917. _proto.buildHas = function buildHas(ret) {
  69918. var body = this.body;
  69919. var has = this.has;
  69920. if (has.hasBreakContinue) {
  69921. for (var _i11 = 0, _Object$keys7 = Object.keys(has.map); _i11 < _Object$keys7.length; _i11++) {
  69922. var key = _Object$keys7[_i11];
  69923. body.push(ifStatement(binaryExpression("===", identifier(ret), stringLiteral(key)), has.map[key]));
  69924. }
  69925. }
  69926. if (has.hasReturn) {
  69927. body.push(buildRetCheck({
  69928. RETURN: identifier(ret)
  69929. }));
  69930. }
  69931. };
  69932. return BlockScoping;
  69933. }();
  69934. var builtin = {
  69935. "Array": false,
  69936. "ArrayBuffer": false,
  69937. Atomics: false,
  69938. BigInt: false,
  69939. BigInt64Array: false,
  69940. BigUint64Array: false,
  69941. "Boolean": false,
  69942. constructor: false,
  69943. "DataView": false,
  69944. "Date": false,
  69945. "decodeURI": false,
  69946. "decodeURIComponent": false,
  69947. "encodeURI": false,
  69948. "encodeURIComponent": false,
  69949. "Error": false,
  69950. "escape": false,
  69951. "eval": false,
  69952. "EvalError": false,
  69953. "Float32Array": false,
  69954. "Float64Array": false,
  69955. "Function": false,
  69956. globalThis: false,
  69957. hasOwnProperty: false,
  69958. "Infinity": false,
  69959. "Int16Array": false,
  69960. "Int32Array": false,
  69961. "Int8Array": false,
  69962. "isFinite": false,
  69963. "isNaN": false,
  69964. isPrototypeOf: false,
  69965. "JSON": false,
  69966. "Map": false,
  69967. "Math": false,
  69968. "NaN": false,
  69969. "Number": false,
  69970. "Object": false,
  69971. "parseFloat": false,
  69972. "parseInt": false,
  69973. "Promise": false,
  69974. propertyIsEnumerable: false,
  69975. "Proxy": false,
  69976. "RangeError": false,
  69977. "ReferenceError": false,
  69978. "Reflect": false,
  69979. "RegExp": false,
  69980. "Set": false,
  69981. SharedArrayBuffer: false,
  69982. "String": false,
  69983. "Symbol": false,
  69984. "SyntaxError": false,
  69985. toLocaleString: false,
  69986. toString: false,
  69987. "TypeError": false,
  69988. "Uint16Array": false,
  69989. "Uint32Array": false,
  69990. "Uint8Array": false,
  69991. "Uint8ClampedArray": false,
  69992. "undefined": false,
  69993. "unescape": false,
  69994. "URIError": false,
  69995. valueOf: false,
  69996. "WeakMap": false,
  69997. "WeakSet": false
  69998. };
  69999. var es5 = {
  70000. "Array": false,
  70001. "Boolean": false,
  70002. constructor: false,
  70003. "Date": false,
  70004. "decodeURI": false,
  70005. "decodeURIComponent": false,
  70006. "encodeURI": false,
  70007. "encodeURIComponent": false,
  70008. "Error": false,
  70009. "escape": false,
  70010. "eval": false,
  70011. "EvalError": false,
  70012. "Function": false,
  70013. hasOwnProperty: false,
  70014. "Infinity": false,
  70015. "isFinite": false,
  70016. "isNaN": false,
  70017. isPrototypeOf: false,
  70018. "JSON": false,
  70019. "Math": false,
  70020. "NaN": false,
  70021. "Number": false,
  70022. "Object": false,
  70023. "parseFloat": false,
  70024. "parseInt": false,
  70025. propertyIsEnumerable: false,
  70026. "RangeError": false,
  70027. "ReferenceError": false,
  70028. "RegExp": false,
  70029. "String": false,
  70030. "SyntaxError": false,
  70031. toLocaleString: false,
  70032. toString: false,
  70033. "TypeError": false,
  70034. "undefined": false,
  70035. "unescape": false,
  70036. "URIError": false,
  70037. valueOf: false
  70038. };
  70039. var es2015 = {
  70040. "Array": false,
  70041. "ArrayBuffer": false,
  70042. "Boolean": false,
  70043. constructor: false,
  70044. "DataView": false,
  70045. "Date": false,
  70046. "decodeURI": false,
  70047. "decodeURIComponent": false,
  70048. "encodeURI": false,
  70049. "encodeURIComponent": false,
  70050. "Error": false,
  70051. "escape": false,
  70052. "eval": false,
  70053. "EvalError": false,
  70054. "Float32Array": false,
  70055. "Float64Array": false,
  70056. "Function": false,
  70057. hasOwnProperty: false,
  70058. "Infinity": false,
  70059. "Int16Array": false,
  70060. "Int32Array": false,
  70061. "Int8Array": false,
  70062. "isFinite": false,
  70063. "isNaN": false,
  70064. isPrototypeOf: false,
  70065. "JSON": false,
  70066. "Map": false,
  70067. "Math": false,
  70068. "NaN": false,
  70069. "Number": false,
  70070. "Object": false,
  70071. "parseFloat": false,
  70072. "parseInt": false,
  70073. "Promise": false,
  70074. propertyIsEnumerable: false,
  70075. "Proxy": false,
  70076. "RangeError": false,
  70077. "ReferenceError": false,
  70078. "Reflect": false,
  70079. "RegExp": false,
  70080. "Set": false,
  70081. "String": false,
  70082. "Symbol": false,
  70083. "SyntaxError": false,
  70084. toLocaleString: false,
  70085. toString: false,
  70086. "TypeError": false,
  70087. "Uint16Array": false,
  70088. "Uint32Array": false,
  70089. "Uint8Array": false,
  70090. "Uint8ClampedArray": false,
  70091. "undefined": false,
  70092. "unescape": false,
  70093. "URIError": false,
  70094. valueOf: false,
  70095. "WeakMap": false,
  70096. "WeakSet": false
  70097. };
  70098. var es2017 = {
  70099. "Array": false,
  70100. "ArrayBuffer": false,
  70101. Atomics: false,
  70102. "Boolean": false,
  70103. constructor: false,
  70104. "DataView": false,
  70105. "Date": false,
  70106. "decodeURI": false,
  70107. "decodeURIComponent": false,
  70108. "encodeURI": false,
  70109. "encodeURIComponent": false,
  70110. "Error": false,
  70111. "escape": false,
  70112. "eval": false,
  70113. "EvalError": false,
  70114. "Float32Array": false,
  70115. "Float64Array": false,
  70116. "Function": false,
  70117. hasOwnProperty: false,
  70118. "Infinity": false,
  70119. "Int16Array": false,
  70120. "Int32Array": false,
  70121. "Int8Array": false,
  70122. "isFinite": false,
  70123. "isNaN": false,
  70124. isPrototypeOf: false,
  70125. "JSON": false,
  70126. "Map": false,
  70127. "Math": false,
  70128. "NaN": false,
  70129. "Number": false,
  70130. "Object": false,
  70131. "parseFloat": false,
  70132. "parseInt": false,
  70133. "Promise": false,
  70134. propertyIsEnumerable: false,
  70135. "Proxy": false,
  70136. "RangeError": false,
  70137. "ReferenceError": false,
  70138. "Reflect": false,
  70139. "RegExp": false,
  70140. "Set": false,
  70141. SharedArrayBuffer: false,
  70142. "String": false,
  70143. "Symbol": false,
  70144. "SyntaxError": false,
  70145. toLocaleString: false,
  70146. toString: false,
  70147. "TypeError": false,
  70148. "Uint16Array": false,
  70149. "Uint32Array": false,
  70150. "Uint8Array": false,
  70151. "Uint8ClampedArray": false,
  70152. "undefined": false,
  70153. "unescape": false,
  70154. "URIError": false,
  70155. valueOf: false,
  70156. "WeakMap": false,
  70157. "WeakSet": false
  70158. };
  70159. var browser = {
  70160. AbortController: false,
  70161. AbortSignal: false,
  70162. addEventListener: false,
  70163. alert: false,
  70164. AnalyserNode: false,
  70165. Animation: false,
  70166. AnimationEffectReadOnly: false,
  70167. AnimationEffectTiming: false,
  70168. AnimationEffectTimingReadOnly: false,
  70169. AnimationEvent: false,
  70170. AnimationPlaybackEvent: false,
  70171. AnimationTimeline: false,
  70172. applicationCache: false,
  70173. ApplicationCache: false,
  70174. ApplicationCacheErrorEvent: false,
  70175. atob: false,
  70176. Attr: false,
  70177. Audio: false,
  70178. AudioBuffer: false,
  70179. AudioBufferSourceNode: false,
  70180. AudioContext: false,
  70181. AudioDestinationNode: false,
  70182. AudioListener: false,
  70183. AudioNode: false,
  70184. AudioParam: false,
  70185. AudioProcessingEvent: false,
  70186. AudioScheduledSourceNode: false,
  70187. "AudioWorkletGlobalScope ": false,
  70188. AudioWorkletNode: false,
  70189. AudioWorkletProcessor: false,
  70190. BarProp: false,
  70191. BaseAudioContext: false,
  70192. BatteryManager: false,
  70193. BeforeUnloadEvent: false,
  70194. BiquadFilterNode: false,
  70195. Blob: false,
  70196. BlobEvent: false,
  70197. blur: false,
  70198. BroadcastChannel: false,
  70199. btoa: false,
  70200. BudgetService: false,
  70201. ByteLengthQueuingStrategy: false,
  70202. Cache: false,
  70203. caches: false,
  70204. CacheStorage: false,
  70205. cancelAnimationFrame: false,
  70206. cancelIdleCallback: false,
  70207. CanvasCaptureMediaStreamTrack: false,
  70208. CanvasGradient: false,
  70209. CanvasPattern: false,
  70210. CanvasRenderingContext2D: false,
  70211. ChannelMergerNode: false,
  70212. ChannelSplitterNode: false,
  70213. CharacterData: false,
  70214. clearInterval: false,
  70215. clearTimeout: false,
  70216. clientInformation: false,
  70217. ClipboardEvent: false,
  70218. close: false,
  70219. closed: false,
  70220. CloseEvent: false,
  70221. Comment: false,
  70222. CompositionEvent: false,
  70223. confirm: false,
  70224. console: false,
  70225. ConstantSourceNode: false,
  70226. ConvolverNode: false,
  70227. CountQueuingStrategy: false,
  70228. createImageBitmap: false,
  70229. Credential: false,
  70230. CredentialsContainer: false,
  70231. crypto: false,
  70232. Crypto: false,
  70233. CryptoKey: false,
  70234. CSS: false,
  70235. CSSConditionRule: false,
  70236. CSSFontFaceRule: false,
  70237. CSSGroupingRule: false,
  70238. CSSImportRule: false,
  70239. CSSKeyframeRule: false,
  70240. CSSKeyframesRule: false,
  70241. CSSMediaRule: false,
  70242. CSSNamespaceRule: false,
  70243. CSSPageRule: false,
  70244. CSSRule: false,
  70245. CSSRuleList: false,
  70246. CSSStyleDeclaration: false,
  70247. CSSStyleRule: false,
  70248. CSSStyleSheet: false,
  70249. CSSSupportsRule: false,
  70250. CustomElementRegistry: false,
  70251. customElements: false,
  70252. CustomEvent: false,
  70253. DataTransfer: false,
  70254. DataTransferItem: false,
  70255. DataTransferItemList: false,
  70256. defaultstatus: false,
  70257. defaultStatus: false,
  70258. DelayNode: false,
  70259. DeviceMotionEvent: false,
  70260. DeviceOrientationEvent: false,
  70261. devicePixelRatio: false,
  70262. dispatchEvent: false,
  70263. document: false,
  70264. Document: false,
  70265. DocumentFragment: false,
  70266. DocumentType: false,
  70267. DOMError: false,
  70268. DOMException: false,
  70269. DOMImplementation: false,
  70270. DOMMatrix: false,
  70271. DOMMatrixReadOnly: false,
  70272. DOMParser: false,
  70273. DOMPoint: false,
  70274. DOMPointReadOnly: false,
  70275. DOMQuad: false,
  70276. DOMRect: false,
  70277. DOMRectReadOnly: false,
  70278. DOMStringList: false,
  70279. DOMStringMap: false,
  70280. DOMTokenList: false,
  70281. DragEvent: false,
  70282. DynamicsCompressorNode: false,
  70283. Element: false,
  70284. ErrorEvent: false,
  70285. event: false,
  70286. Event: false,
  70287. EventSource: false,
  70288. EventTarget: false,
  70289. external: false,
  70290. fetch: false,
  70291. File: false,
  70292. FileList: false,
  70293. FileReader: false,
  70294. find: false,
  70295. focus: false,
  70296. FocusEvent: false,
  70297. FontFace: false,
  70298. FontFaceSetLoadEvent: false,
  70299. FormData: false,
  70300. frameElement: false,
  70301. frames: false,
  70302. GainNode: false,
  70303. Gamepad: false,
  70304. GamepadButton: false,
  70305. GamepadEvent: false,
  70306. getComputedStyle: false,
  70307. getSelection: false,
  70308. HashChangeEvent: false,
  70309. Headers: false,
  70310. history: false,
  70311. History: false,
  70312. HTMLAllCollection: false,
  70313. HTMLAnchorElement: false,
  70314. HTMLAreaElement: false,
  70315. HTMLAudioElement: false,
  70316. HTMLBaseElement: false,
  70317. HTMLBodyElement: false,
  70318. HTMLBRElement: false,
  70319. HTMLButtonElement: false,
  70320. HTMLCanvasElement: false,
  70321. HTMLCollection: false,
  70322. HTMLContentElement: false,
  70323. HTMLDataElement: false,
  70324. HTMLDataListElement: false,
  70325. HTMLDetailsElement: false,
  70326. HTMLDialogElement: false,
  70327. HTMLDirectoryElement: false,
  70328. HTMLDivElement: false,
  70329. HTMLDListElement: false,
  70330. HTMLDocument: false,
  70331. HTMLElement: false,
  70332. HTMLEmbedElement: false,
  70333. HTMLFieldSetElement: false,
  70334. HTMLFontElement: false,
  70335. HTMLFormControlsCollection: false,
  70336. HTMLFormElement: false,
  70337. HTMLFrameElement: false,
  70338. HTMLFrameSetElement: false,
  70339. HTMLHeadElement: false,
  70340. HTMLHeadingElement: false,
  70341. HTMLHRElement: false,
  70342. HTMLHtmlElement: false,
  70343. HTMLIFrameElement: false,
  70344. HTMLImageElement: false,
  70345. HTMLInputElement: false,
  70346. HTMLLabelElement: false,
  70347. HTMLLegendElement: false,
  70348. HTMLLIElement: false,
  70349. HTMLLinkElement: false,
  70350. HTMLMapElement: false,
  70351. HTMLMarqueeElement: false,
  70352. HTMLMediaElement: false,
  70353. HTMLMenuElement: false,
  70354. HTMLMetaElement: false,
  70355. HTMLMeterElement: false,
  70356. HTMLModElement: false,
  70357. HTMLObjectElement: false,
  70358. HTMLOListElement: false,
  70359. HTMLOptGroupElement: false,
  70360. HTMLOptionElement: false,
  70361. HTMLOptionsCollection: false,
  70362. HTMLOutputElement: false,
  70363. HTMLParagraphElement: false,
  70364. HTMLParamElement: false,
  70365. HTMLPictureElement: false,
  70366. HTMLPreElement: false,
  70367. HTMLProgressElement: false,
  70368. HTMLQuoteElement: false,
  70369. HTMLScriptElement: false,
  70370. HTMLSelectElement: false,
  70371. HTMLShadowElement: false,
  70372. HTMLSlotElement: false,
  70373. HTMLSourceElement: false,
  70374. HTMLSpanElement: false,
  70375. HTMLStyleElement: false,
  70376. HTMLTableCaptionElement: false,
  70377. HTMLTableCellElement: false,
  70378. HTMLTableColElement: false,
  70379. HTMLTableElement: false,
  70380. HTMLTableRowElement: false,
  70381. HTMLTableSectionElement: false,
  70382. HTMLTemplateElement: false,
  70383. HTMLTextAreaElement: false,
  70384. HTMLTimeElement: false,
  70385. HTMLTitleElement: false,
  70386. HTMLTrackElement: false,
  70387. HTMLUListElement: false,
  70388. HTMLUnknownElement: false,
  70389. HTMLVideoElement: false,
  70390. IDBCursor: false,
  70391. IDBCursorWithValue: false,
  70392. IDBDatabase: false,
  70393. IDBFactory: false,
  70394. IDBIndex: false,
  70395. IDBKeyRange: false,
  70396. IDBObjectStore: false,
  70397. IDBOpenDBRequest: false,
  70398. IDBRequest: false,
  70399. IDBTransaction: false,
  70400. IDBVersionChangeEvent: false,
  70401. IdleDeadline: false,
  70402. IIRFilterNode: false,
  70403. Image: false,
  70404. ImageBitmap: false,
  70405. ImageBitmapRenderingContext: false,
  70406. ImageCapture: false,
  70407. ImageData: false,
  70408. indexedDB: false,
  70409. innerHeight: false,
  70410. innerWidth: false,
  70411. InputEvent: false,
  70412. IntersectionObserver: false,
  70413. IntersectionObserverEntry: false,
  70414. "Intl": false,
  70415. isSecureContext: false,
  70416. KeyboardEvent: false,
  70417. KeyframeEffect: false,
  70418. KeyframeEffectReadOnly: false,
  70419. length: false,
  70420. localStorage: false,
  70421. location: true,
  70422. Location: false,
  70423. locationbar: false,
  70424. matchMedia: false,
  70425. MediaDeviceInfo: false,
  70426. MediaDevices: false,
  70427. MediaElementAudioSourceNode: false,
  70428. MediaEncryptedEvent: false,
  70429. MediaError: false,
  70430. MediaKeyMessageEvent: false,
  70431. MediaKeySession: false,
  70432. MediaKeyStatusMap: false,
  70433. MediaKeySystemAccess: false,
  70434. MediaList: false,
  70435. MediaQueryList: false,
  70436. MediaQueryListEvent: false,
  70437. MediaRecorder: false,
  70438. MediaSettingsRange: false,
  70439. MediaSource: false,
  70440. MediaStream: false,
  70441. MediaStreamAudioDestinationNode: false,
  70442. MediaStreamAudioSourceNode: false,
  70443. MediaStreamEvent: false,
  70444. MediaStreamTrack: false,
  70445. MediaStreamTrackEvent: false,
  70446. menubar: false,
  70447. MessageChannel: false,
  70448. MessageEvent: false,
  70449. MessagePort: false,
  70450. MIDIAccess: false,
  70451. MIDIConnectionEvent: false,
  70452. MIDIInput: false,
  70453. MIDIInputMap: false,
  70454. MIDIMessageEvent: false,
  70455. MIDIOutput: false,
  70456. MIDIOutputMap: false,
  70457. MIDIPort: false,
  70458. MimeType: false,
  70459. MimeTypeArray: false,
  70460. MouseEvent: false,
  70461. moveBy: false,
  70462. moveTo: false,
  70463. MutationEvent: false,
  70464. MutationObserver: false,
  70465. MutationRecord: false,
  70466. name: false,
  70467. NamedNodeMap: false,
  70468. NavigationPreloadManager: false,
  70469. navigator: false,
  70470. Navigator: false,
  70471. NetworkInformation: false,
  70472. Node: false,
  70473. NodeFilter: false,
  70474. NodeIterator: false,
  70475. NodeList: false,
  70476. Notification: false,
  70477. OfflineAudioCompletionEvent: false,
  70478. OfflineAudioContext: false,
  70479. offscreenBuffering: false,
  70480. OffscreenCanvas: true,
  70481. onabort: true,
  70482. onafterprint: true,
  70483. onanimationend: true,
  70484. onanimationiteration: true,
  70485. onanimationstart: true,
  70486. onappinstalled: true,
  70487. onauxclick: true,
  70488. onbeforeinstallprompt: true,
  70489. onbeforeprint: true,
  70490. onbeforeunload: true,
  70491. onblur: true,
  70492. oncancel: true,
  70493. oncanplay: true,
  70494. oncanplaythrough: true,
  70495. onchange: true,
  70496. onclick: true,
  70497. onclose: true,
  70498. oncontextmenu: true,
  70499. oncuechange: true,
  70500. ondblclick: true,
  70501. ondevicemotion: true,
  70502. ondeviceorientation: true,
  70503. ondeviceorientationabsolute: true,
  70504. ondrag: true,
  70505. ondragend: true,
  70506. ondragenter: true,
  70507. ondragleave: true,
  70508. ondragover: true,
  70509. ondragstart: true,
  70510. ondrop: true,
  70511. ondurationchange: true,
  70512. onemptied: true,
  70513. onended: true,
  70514. onerror: true,
  70515. onfocus: true,
  70516. ongotpointercapture: true,
  70517. onhashchange: true,
  70518. oninput: true,
  70519. oninvalid: true,
  70520. onkeydown: true,
  70521. onkeypress: true,
  70522. onkeyup: true,
  70523. onlanguagechange: true,
  70524. onload: true,
  70525. onloadeddata: true,
  70526. onloadedmetadata: true,
  70527. onloadstart: true,
  70528. onlostpointercapture: true,
  70529. onmessage: true,
  70530. onmessageerror: true,
  70531. onmousedown: true,
  70532. onmouseenter: true,
  70533. onmouseleave: true,
  70534. onmousemove: true,
  70535. onmouseout: true,
  70536. onmouseover: true,
  70537. onmouseup: true,
  70538. onmousewheel: true,
  70539. onoffline: true,
  70540. ononline: true,
  70541. onpagehide: true,
  70542. onpageshow: true,
  70543. onpause: true,
  70544. onplay: true,
  70545. onplaying: true,
  70546. onpointercancel: true,
  70547. onpointerdown: true,
  70548. onpointerenter: true,
  70549. onpointerleave: true,
  70550. onpointermove: true,
  70551. onpointerout: true,
  70552. onpointerover: true,
  70553. onpointerup: true,
  70554. onpopstate: true,
  70555. onprogress: true,
  70556. onratechange: true,
  70557. onrejectionhandled: true,
  70558. onreset: true,
  70559. onresize: true,
  70560. onscroll: true,
  70561. onsearch: true,
  70562. onseeked: true,
  70563. onseeking: true,
  70564. onselect: true,
  70565. onstalled: true,
  70566. onstorage: true,
  70567. onsubmit: true,
  70568. onsuspend: true,
  70569. ontimeupdate: true,
  70570. ontoggle: true,
  70571. ontransitionend: true,
  70572. onunhandledrejection: true,
  70573. onunload: true,
  70574. onvolumechange: true,
  70575. onwaiting: true,
  70576. onwheel: true,
  70577. open: false,
  70578. openDatabase: false,
  70579. opener: false,
  70580. Option: false,
  70581. origin: false,
  70582. OscillatorNode: false,
  70583. outerHeight: false,
  70584. outerWidth: false,
  70585. PageTransitionEvent: false,
  70586. pageXOffset: false,
  70587. pageYOffset: false,
  70588. PannerNode: false,
  70589. parent: false,
  70590. Path2D: false,
  70591. PaymentAddress: false,
  70592. PaymentRequest: false,
  70593. PaymentRequestUpdateEvent: false,
  70594. PaymentResponse: false,
  70595. performance: false,
  70596. Performance: false,
  70597. PerformanceEntry: false,
  70598. PerformanceLongTaskTiming: false,
  70599. PerformanceMark: false,
  70600. PerformanceMeasure: false,
  70601. PerformanceNavigation: false,
  70602. PerformanceNavigationTiming: false,
  70603. PerformanceObserver: false,
  70604. PerformanceObserverEntryList: false,
  70605. PerformancePaintTiming: false,
  70606. PerformanceResourceTiming: false,
  70607. PerformanceTiming: false,
  70608. PeriodicWave: false,
  70609. Permissions: false,
  70610. PermissionStatus: false,
  70611. personalbar: false,
  70612. PhotoCapabilities: false,
  70613. Plugin: false,
  70614. PluginArray: false,
  70615. PointerEvent: false,
  70616. PopStateEvent: false,
  70617. postMessage: false,
  70618. Presentation: false,
  70619. PresentationAvailability: false,
  70620. PresentationConnection: false,
  70621. PresentationConnectionAvailableEvent: false,
  70622. PresentationConnectionCloseEvent: false,
  70623. PresentationConnectionList: false,
  70624. PresentationReceiver: false,
  70625. PresentationRequest: false,
  70626. print: false,
  70627. ProcessingInstruction: false,
  70628. ProgressEvent: false,
  70629. PromiseRejectionEvent: false,
  70630. prompt: false,
  70631. PushManager: false,
  70632. PushSubscription: false,
  70633. PushSubscriptionOptions: false,
  70634. queueMicrotask: false,
  70635. RadioNodeList: false,
  70636. Range: false,
  70637. ReadableStream: false,
  70638. registerProcessor: false,
  70639. RemotePlayback: false,
  70640. removeEventListener: false,
  70641. Request: false,
  70642. requestAnimationFrame: false,
  70643. requestIdleCallback: false,
  70644. resizeBy: false,
  70645. ResizeObserver: false,
  70646. ResizeObserverEntry: false,
  70647. resizeTo: false,
  70648. Response: false,
  70649. RTCCertificate: false,
  70650. RTCDataChannel: false,
  70651. RTCDataChannelEvent: false,
  70652. RTCDtlsTransport: false,
  70653. RTCIceCandidate: false,
  70654. RTCIceGatherer: false,
  70655. RTCIceTransport: false,
  70656. RTCPeerConnection: false,
  70657. RTCPeerConnectionIceEvent: false,
  70658. RTCRtpContributingSource: false,
  70659. RTCRtpReceiver: false,
  70660. RTCRtpSender: false,
  70661. RTCSctpTransport: false,
  70662. RTCSessionDescription: false,
  70663. RTCStatsReport: false,
  70664. RTCTrackEvent: false,
  70665. screen: false,
  70666. Screen: false,
  70667. screenLeft: false,
  70668. ScreenOrientation: false,
  70669. screenTop: false,
  70670. screenX: false,
  70671. screenY: false,
  70672. ScriptProcessorNode: false,
  70673. scroll: false,
  70674. scrollbars: false,
  70675. scrollBy: false,
  70676. scrollTo: false,
  70677. scrollX: false,
  70678. scrollY: false,
  70679. SecurityPolicyViolationEvent: false,
  70680. Selection: false,
  70681. self: false,
  70682. ServiceWorker: false,
  70683. ServiceWorkerContainer: false,
  70684. ServiceWorkerRegistration: false,
  70685. sessionStorage: false,
  70686. setInterval: false,
  70687. setTimeout: false,
  70688. ShadowRoot: false,
  70689. SharedWorker: false,
  70690. SourceBuffer: false,
  70691. SourceBufferList: false,
  70692. speechSynthesis: false,
  70693. SpeechSynthesisEvent: false,
  70694. SpeechSynthesisUtterance: false,
  70695. StaticRange: false,
  70696. status: false,
  70697. statusbar: false,
  70698. StereoPannerNode: false,
  70699. stop: false,
  70700. Storage: false,
  70701. StorageEvent: false,
  70702. StorageManager: false,
  70703. styleMedia: false,
  70704. StyleSheet: false,
  70705. StyleSheetList: false,
  70706. SubtleCrypto: false,
  70707. SVGAElement: false,
  70708. SVGAngle: false,
  70709. SVGAnimatedAngle: false,
  70710. SVGAnimatedBoolean: false,
  70711. SVGAnimatedEnumeration: false,
  70712. SVGAnimatedInteger: false,
  70713. SVGAnimatedLength: false,
  70714. SVGAnimatedLengthList: false,
  70715. SVGAnimatedNumber: false,
  70716. SVGAnimatedNumberList: false,
  70717. SVGAnimatedPreserveAspectRatio: false,
  70718. SVGAnimatedRect: false,
  70719. SVGAnimatedString: false,
  70720. SVGAnimatedTransformList: false,
  70721. SVGAnimateElement: false,
  70722. SVGAnimateMotionElement: false,
  70723. SVGAnimateTransformElement: false,
  70724. SVGAnimationElement: false,
  70725. SVGCircleElement: false,
  70726. SVGClipPathElement: false,
  70727. SVGComponentTransferFunctionElement: false,
  70728. SVGDefsElement: false,
  70729. SVGDescElement: false,
  70730. SVGDiscardElement: false,
  70731. SVGElement: false,
  70732. SVGEllipseElement: false,
  70733. SVGFEBlendElement: false,
  70734. SVGFEColorMatrixElement: false,
  70735. SVGFEComponentTransferElement: false,
  70736. SVGFECompositeElement: false,
  70737. SVGFEConvolveMatrixElement: false,
  70738. SVGFEDiffuseLightingElement: false,
  70739. SVGFEDisplacementMapElement: false,
  70740. SVGFEDistantLightElement: false,
  70741. SVGFEDropShadowElement: false,
  70742. SVGFEFloodElement: false,
  70743. SVGFEFuncAElement: false,
  70744. SVGFEFuncBElement: false,
  70745. SVGFEFuncGElement: false,
  70746. SVGFEFuncRElement: false,
  70747. SVGFEGaussianBlurElement: false,
  70748. SVGFEImageElement: false,
  70749. SVGFEMergeElement: false,
  70750. SVGFEMergeNodeElement: false,
  70751. SVGFEMorphologyElement: false,
  70752. SVGFEOffsetElement: false,
  70753. SVGFEPointLightElement: false,
  70754. SVGFESpecularLightingElement: false,
  70755. SVGFESpotLightElement: false,
  70756. SVGFETileElement: false,
  70757. SVGFETurbulenceElement: false,
  70758. SVGFilterElement: false,
  70759. SVGForeignObjectElement: false,
  70760. SVGGElement: false,
  70761. SVGGeometryElement: false,
  70762. SVGGradientElement: false,
  70763. SVGGraphicsElement: false,
  70764. SVGImageElement: false,
  70765. SVGLength: false,
  70766. SVGLengthList: false,
  70767. SVGLinearGradientElement: false,
  70768. SVGLineElement: false,
  70769. SVGMarkerElement: false,
  70770. SVGMaskElement: false,
  70771. SVGMatrix: false,
  70772. SVGMetadataElement: false,
  70773. SVGMPathElement: false,
  70774. SVGNumber: false,
  70775. SVGNumberList: false,
  70776. SVGPathElement: false,
  70777. SVGPatternElement: false,
  70778. SVGPoint: false,
  70779. SVGPointList: false,
  70780. SVGPolygonElement: false,
  70781. SVGPolylineElement: false,
  70782. SVGPreserveAspectRatio: false,
  70783. SVGRadialGradientElement: false,
  70784. SVGRect: false,
  70785. SVGRectElement: false,
  70786. SVGScriptElement: false,
  70787. SVGSetElement: false,
  70788. SVGStopElement: false,
  70789. SVGStringList: false,
  70790. SVGStyleElement: false,
  70791. SVGSVGElement: false,
  70792. SVGSwitchElement: false,
  70793. SVGSymbolElement: false,
  70794. SVGTextContentElement: false,
  70795. SVGTextElement: false,
  70796. SVGTextPathElement: false,
  70797. SVGTextPositioningElement: false,
  70798. SVGTitleElement: false,
  70799. SVGTransform: false,
  70800. SVGTransformList: false,
  70801. SVGTSpanElement: false,
  70802. SVGUnitTypes: false,
  70803. SVGUseElement: false,
  70804. SVGViewElement: false,
  70805. TaskAttributionTiming: false,
  70806. Text: false,
  70807. TextDecoder: false,
  70808. TextEncoder: false,
  70809. TextEvent: false,
  70810. TextMetrics: false,
  70811. TextTrack: false,
  70812. TextTrackCue: false,
  70813. TextTrackCueList: false,
  70814. TextTrackList: false,
  70815. TimeRanges: false,
  70816. toolbar: false,
  70817. top: false,
  70818. Touch: false,
  70819. TouchEvent: false,
  70820. TouchList: false,
  70821. TrackEvent: false,
  70822. TransitionEvent: false,
  70823. TreeWalker: false,
  70824. UIEvent: false,
  70825. URL: false,
  70826. URLSearchParams: false,
  70827. ValidityState: false,
  70828. visualViewport: false,
  70829. VisualViewport: false,
  70830. VTTCue: false,
  70831. WaveShaperNode: false,
  70832. WebAssembly: false,
  70833. WebGL2RenderingContext: false,
  70834. WebGLActiveInfo: false,
  70835. WebGLBuffer: false,
  70836. WebGLContextEvent: false,
  70837. WebGLFramebuffer: false,
  70838. WebGLProgram: false,
  70839. WebGLQuery: false,
  70840. WebGLRenderbuffer: false,
  70841. WebGLRenderingContext: false,
  70842. WebGLSampler: false,
  70843. WebGLShader: false,
  70844. WebGLShaderPrecisionFormat: false,
  70845. WebGLSync: false,
  70846. WebGLTexture: false,
  70847. WebGLTransformFeedback: false,
  70848. WebGLUniformLocation: false,
  70849. WebGLVertexArrayObject: false,
  70850. WebSocket: false,
  70851. WheelEvent: false,
  70852. window: false,
  70853. Window: false,
  70854. Worker: false,
  70855. WritableStream: false,
  70856. XMLDocument: false,
  70857. XMLHttpRequest: false,
  70858. XMLHttpRequestEventTarget: false,
  70859. XMLHttpRequestUpload: false,
  70860. XMLSerializer: false,
  70861. XPathEvaluator: false,
  70862. XPathExpression: false,
  70863. XPathResult: false,
  70864. XSLTProcessor: false
  70865. };
  70866. var worker = {
  70867. addEventListener: false,
  70868. applicationCache: false,
  70869. atob: false,
  70870. Blob: false,
  70871. BroadcastChannel: false,
  70872. btoa: false,
  70873. Cache: false,
  70874. caches: false,
  70875. clearInterval: false,
  70876. clearTimeout: false,
  70877. close: true,
  70878. console: false,
  70879. fetch: false,
  70880. FileReaderSync: false,
  70881. FormData: false,
  70882. Headers: false,
  70883. IDBCursor: false,
  70884. IDBCursorWithValue: false,
  70885. IDBDatabase: false,
  70886. IDBFactory: false,
  70887. IDBIndex: false,
  70888. IDBKeyRange: false,
  70889. IDBObjectStore: false,
  70890. IDBOpenDBRequest: false,
  70891. IDBRequest: false,
  70892. IDBTransaction: false,
  70893. IDBVersionChangeEvent: false,
  70894. ImageData: false,
  70895. importScripts: true,
  70896. indexedDB: false,
  70897. location: false,
  70898. MessageChannel: false,
  70899. MessagePort: false,
  70900. name: false,
  70901. navigator: false,
  70902. Notification: false,
  70903. onclose: true,
  70904. onconnect: true,
  70905. onerror: true,
  70906. onlanguagechange: true,
  70907. onmessage: true,
  70908. onoffline: true,
  70909. ononline: true,
  70910. onrejectionhandled: true,
  70911. onunhandledrejection: true,
  70912. performance: false,
  70913. Performance: false,
  70914. PerformanceEntry: false,
  70915. PerformanceMark: false,
  70916. PerformanceMeasure: false,
  70917. PerformanceNavigation: false,
  70918. PerformanceResourceTiming: false,
  70919. PerformanceTiming: false,
  70920. postMessage: true,
  70921. "Promise": false,
  70922. queueMicrotask: false,
  70923. removeEventListener: false,
  70924. Request: false,
  70925. Response: false,
  70926. self: true,
  70927. ServiceWorkerRegistration: false,
  70928. setInterval: false,
  70929. setTimeout: false,
  70930. TextDecoder: false,
  70931. TextEncoder: false,
  70932. URL: false,
  70933. URLSearchParams: false,
  70934. WebSocket: false,
  70935. Worker: false,
  70936. WorkerGlobalScope: false,
  70937. XMLHttpRequest: false
  70938. };
  70939. var node = {
  70940. __dirname: false,
  70941. __filename: false,
  70942. Buffer: false,
  70943. clearImmediate: false,
  70944. clearInterval: false,
  70945. clearTimeout: false,
  70946. console: false,
  70947. exports: true,
  70948. global: false,
  70949. "Intl": false,
  70950. module: false,
  70951. process: false,
  70952. queueMicrotask: false,
  70953. require: false,
  70954. setImmediate: false,
  70955. setInterval: false,
  70956. setTimeout: false,
  70957. TextDecoder: false,
  70958. TextEncoder: false,
  70959. URL: false,
  70960. URLSearchParams: false
  70961. };
  70962. var commonjs = {
  70963. exports: true,
  70964. global: false,
  70965. module: false,
  70966. require: false
  70967. };
  70968. var amd = {
  70969. define: false,
  70970. require: false
  70971. };
  70972. var mocha = {
  70973. after: false,
  70974. afterEach: false,
  70975. before: false,
  70976. beforeEach: false,
  70977. context: false,
  70978. describe: false,
  70979. it: false,
  70980. mocha: false,
  70981. run: false,
  70982. setup: false,
  70983. specify: false,
  70984. suite: false,
  70985. suiteSetup: false,
  70986. suiteTeardown: false,
  70987. teardown: false,
  70988. test: false,
  70989. xcontext: false,
  70990. xdescribe: false,
  70991. xit: false,
  70992. xspecify: false
  70993. };
  70994. var jasmine = {
  70995. afterAll: false,
  70996. afterEach: false,
  70997. beforeAll: false,
  70998. beforeEach: false,
  70999. describe: false,
  71000. expect: false,
  71001. fail: false,
  71002. fdescribe: false,
  71003. fit: false,
  71004. it: false,
  71005. jasmine: false,
  71006. pending: false,
  71007. runs: false,
  71008. spyOn: false,
  71009. spyOnProperty: false,
  71010. waits: false,
  71011. waitsFor: false,
  71012. xdescribe: false,
  71013. xit: false
  71014. };
  71015. var jest = {
  71016. afterAll: false,
  71017. afterEach: false,
  71018. beforeAll: false,
  71019. beforeEach: false,
  71020. describe: false,
  71021. expect: false,
  71022. fdescribe: false,
  71023. fit: false,
  71024. it: false,
  71025. jest: false,
  71026. pit: false,
  71027. require: false,
  71028. test: false,
  71029. xdescribe: false,
  71030. xit: false,
  71031. xtest: false
  71032. };
  71033. var qunit = {
  71034. asyncTest: false,
  71035. deepEqual: false,
  71036. equal: false,
  71037. expect: false,
  71038. module: false,
  71039. notDeepEqual: false,
  71040. notEqual: false,
  71041. notOk: false,
  71042. notPropEqual: false,
  71043. notStrictEqual: false,
  71044. ok: false,
  71045. propEqual: false,
  71046. QUnit: false,
  71047. raises: false,
  71048. start: false,
  71049. stop: false,
  71050. strictEqual: false,
  71051. test: false,
  71052. throws: false
  71053. };
  71054. var phantomjs = {
  71055. console: true,
  71056. exports: true,
  71057. phantom: true,
  71058. require: true,
  71059. WebPage: true
  71060. };
  71061. var couch = {
  71062. emit: false,
  71063. exports: false,
  71064. getRow: false,
  71065. log: false,
  71066. module: false,
  71067. provides: false,
  71068. require: false,
  71069. respond: false,
  71070. send: false,
  71071. start: false,
  71072. sum: false
  71073. };
  71074. var rhino = {
  71075. defineClass: false,
  71076. deserialize: false,
  71077. gc: false,
  71078. help: false,
  71079. importClass: false,
  71080. importPackage: false,
  71081. java: false,
  71082. load: false,
  71083. loadClass: false,
  71084. Packages: false,
  71085. print: false,
  71086. quit: false,
  71087. readFile: false,
  71088. readUrl: false,
  71089. runCommand: false,
  71090. seal: false,
  71091. serialize: false,
  71092. spawn: false,
  71093. sync: false,
  71094. toint32: false,
  71095. version: false
  71096. };
  71097. var nashorn = {
  71098. __DIR__: false,
  71099. __FILE__: false,
  71100. __LINE__: false,
  71101. com: false,
  71102. edu: false,
  71103. exit: false,
  71104. java: false,
  71105. Java: false,
  71106. javafx: false,
  71107. JavaImporter: false,
  71108. javax: false,
  71109. JSAdapter: false,
  71110. load: false,
  71111. loadWithNewGlobal: false,
  71112. org: false,
  71113. Packages: false,
  71114. print: false,
  71115. quit: false
  71116. };
  71117. var wsh = {
  71118. ActiveXObject: true,
  71119. Enumerator: true,
  71120. GetObject: true,
  71121. ScriptEngine: true,
  71122. ScriptEngineBuildVersion: true,
  71123. ScriptEngineMajorVersion: true,
  71124. ScriptEngineMinorVersion: true,
  71125. VBArray: true,
  71126. WScript: true,
  71127. WSH: true,
  71128. XDomainRequest: true
  71129. };
  71130. var jquery = {
  71131. $: false,
  71132. jQuery: false
  71133. };
  71134. var yui = {
  71135. YAHOO: false,
  71136. YAHOO_config: false,
  71137. YUI: false,
  71138. YUI_config: false
  71139. };
  71140. var shelljs = {
  71141. cat: false,
  71142. cd: false,
  71143. chmod: false,
  71144. config: false,
  71145. cp: false,
  71146. dirs: false,
  71147. echo: false,
  71148. env: false,
  71149. error: false,
  71150. exec: false,
  71151. exit: false,
  71152. find: false,
  71153. grep: false,
  71154. ln: false,
  71155. ls: false,
  71156. mkdir: false,
  71157. mv: false,
  71158. popd: false,
  71159. pushd: false,
  71160. pwd: false,
  71161. rm: false,
  71162. sed: false,
  71163. set: false,
  71164. target: false,
  71165. tempdir: false,
  71166. test: false,
  71167. touch: false,
  71168. which: false
  71169. };
  71170. var prototypejs = {
  71171. $: false,
  71172. $$: false,
  71173. $A: false,
  71174. $break: false,
  71175. $continue: false,
  71176. $F: false,
  71177. $H: false,
  71178. $R: false,
  71179. $w: false,
  71180. Abstract: false,
  71181. Ajax: false,
  71182. Autocompleter: false,
  71183. Builder: false,
  71184. Class: false,
  71185. Control: false,
  71186. Draggable: false,
  71187. Draggables: false,
  71188. Droppables: false,
  71189. Effect: false,
  71190. Element: false,
  71191. Enumerable: false,
  71192. Event: false,
  71193. Field: false,
  71194. Form: false,
  71195. Hash: false,
  71196. Insertion: false,
  71197. ObjectRange: false,
  71198. PeriodicalExecuter: false,
  71199. Position: false,
  71200. Prototype: false,
  71201. Scriptaculous: false,
  71202. Selector: false,
  71203. Sortable: false,
  71204. SortableObserver: false,
  71205. Sound: false,
  71206. Template: false,
  71207. Toggle: false,
  71208. Try: false
  71209. };
  71210. var meteor = {
  71211. _: false,
  71212. $: false,
  71213. Accounts: false,
  71214. AccountsClient: false,
  71215. AccountsCommon: false,
  71216. AccountsServer: false,
  71217. App: false,
  71218. Assets: false,
  71219. Blaze: false,
  71220. check: false,
  71221. Cordova: false,
  71222. DDP: false,
  71223. DDPRateLimiter: false,
  71224. DDPServer: false,
  71225. Deps: false,
  71226. EJSON: false,
  71227. Email: false,
  71228. HTTP: false,
  71229. Log: false,
  71230. Match: false,
  71231. Meteor: false,
  71232. Mongo: false,
  71233. MongoInternals: false,
  71234. Npm: false,
  71235. Package: false,
  71236. Plugin: false,
  71237. process: false,
  71238. Random: false,
  71239. ReactiveDict: false,
  71240. ReactiveVar: false,
  71241. Router: false,
  71242. ServiceConfiguration: false,
  71243. Session: false,
  71244. share: false,
  71245. Spacebars: false,
  71246. Template: false,
  71247. Tinytest: false,
  71248. Tracker: false,
  71249. UI: false,
  71250. Utils: false,
  71251. WebApp: false,
  71252. WebAppInternals: false
  71253. };
  71254. var mongo = {
  71255. _isWindows: false,
  71256. _rand: false,
  71257. BulkWriteResult: false,
  71258. cat: false,
  71259. cd: false,
  71260. connect: false,
  71261. db: false,
  71262. getHostName: false,
  71263. getMemInfo: false,
  71264. hostname: false,
  71265. ISODate: false,
  71266. listFiles: false,
  71267. load: false,
  71268. ls: false,
  71269. md5sumFile: false,
  71270. mkdir: false,
  71271. Mongo: false,
  71272. NumberInt: false,
  71273. NumberLong: false,
  71274. ObjectId: false,
  71275. PlanCache: false,
  71276. print: false,
  71277. printjson: false,
  71278. pwd: false,
  71279. quit: false,
  71280. removeFile: false,
  71281. rs: false,
  71282. sh: false,
  71283. UUID: false,
  71284. version: false,
  71285. WriteResult: false
  71286. };
  71287. var applescript = {
  71288. $: false,
  71289. Application: false,
  71290. Automation: false,
  71291. console: false,
  71292. delay: false,
  71293. Library: false,
  71294. ObjC: false,
  71295. ObjectSpecifier: false,
  71296. Path: false,
  71297. Progress: false,
  71298. Ref: false
  71299. };
  71300. var serviceworker = {
  71301. addEventListener: false,
  71302. applicationCache: false,
  71303. atob: false,
  71304. Blob: false,
  71305. BroadcastChannel: false,
  71306. btoa: false,
  71307. Cache: false,
  71308. caches: false,
  71309. CacheStorage: false,
  71310. clearInterval: false,
  71311. clearTimeout: false,
  71312. Client: false,
  71313. clients: false,
  71314. Clients: false,
  71315. close: true,
  71316. console: false,
  71317. ExtendableEvent: false,
  71318. ExtendableMessageEvent: false,
  71319. fetch: false,
  71320. FetchEvent: false,
  71321. FileReaderSync: false,
  71322. FormData: false,
  71323. Headers: false,
  71324. IDBCursor: false,
  71325. IDBCursorWithValue: false,
  71326. IDBDatabase: false,
  71327. IDBFactory: false,
  71328. IDBIndex: false,
  71329. IDBKeyRange: false,
  71330. IDBObjectStore: false,
  71331. IDBOpenDBRequest: false,
  71332. IDBRequest: false,
  71333. IDBTransaction: false,
  71334. IDBVersionChangeEvent: false,
  71335. ImageData: false,
  71336. importScripts: false,
  71337. indexedDB: false,
  71338. location: false,
  71339. MessageChannel: false,
  71340. MessagePort: false,
  71341. name: false,
  71342. navigator: false,
  71343. Notification: false,
  71344. onclose: true,
  71345. onconnect: true,
  71346. onerror: true,
  71347. onfetch: true,
  71348. oninstall: true,
  71349. onlanguagechange: true,
  71350. onmessage: true,
  71351. onmessageerror: true,
  71352. onnotificationclick: true,
  71353. onnotificationclose: true,
  71354. onoffline: true,
  71355. ononline: true,
  71356. onpush: true,
  71357. onpushsubscriptionchange: true,
  71358. onrejectionhandled: true,
  71359. onsync: true,
  71360. onunhandledrejection: true,
  71361. performance: false,
  71362. Performance: false,
  71363. PerformanceEntry: false,
  71364. PerformanceMark: false,
  71365. PerformanceMeasure: false,
  71366. PerformanceNavigation: false,
  71367. PerformanceResourceTiming: false,
  71368. PerformanceTiming: false,
  71369. postMessage: true,
  71370. "Promise": false,
  71371. queueMicrotask: false,
  71372. registration: false,
  71373. removeEventListener: false,
  71374. Request: false,
  71375. Response: false,
  71376. self: false,
  71377. ServiceWorker: false,
  71378. ServiceWorkerContainer: false,
  71379. ServiceWorkerGlobalScope: false,
  71380. ServiceWorkerMessageEvent: false,
  71381. ServiceWorkerRegistration: false,
  71382. setInterval: false,
  71383. setTimeout: false,
  71384. skipWaiting: false,
  71385. TextDecoder: false,
  71386. TextEncoder: false,
  71387. URL: false,
  71388. URLSearchParams: false,
  71389. WebSocket: false,
  71390. WindowClient: false,
  71391. Worker: false,
  71392. WorkerGlobalScope: false,
  71393. XMLHttpRequest: false
  71394. };
  71395. var atomtest = {
  71396. advanceClock: false,
  71397. fakeClearInterval: false,
  71398. fakeClearTimeout: false,
  71399. fakeSetInterval: false,
  71400. fakeSetTimeout: false,
  71401. resetTimeouts: false,
  71402. waitsForPromise: false
  71403. };
  71404. var embertest = {
  71405. andThen: false,
  71406. click: false,
  71407. currentPath: false,
  71408. currentRouteName: false,
  71409. currentURL: false,
  71410. fillIn: false,
  71411. find: false,
  71412. findAll: false,
  71413. findWithAssert: false,
  71414. keyEvent: false,
  71415. pauseTest: false,
  71416. resumeTest: false,
  71417. triggerEvent: false,
  71418. visit: false,
  71419. wait: false
  71420. };
  71421. var protractor = {
  71422. $: false,
  71423. $$: false,
  71424. browser: false,
  71425. by: false,
  71426. By: false,
  71427. DartObject: false,
  71428. element: false,
  71429. protractor: false
  71430. };
  71431. var webextensions = {
  71432. browser: false,
  71433. chrome: false,
  71434. opr: false
  71435. };
  71436. var greasemonkey = {
  71437. cloneInto: false,
  71438. createObjectIn: false,
  71439. exportFunction: false,
  71440. GM: false,
  71441. GM_addStyle: false,
  71442. GM_deleteValue: false,
  71443. GM_getResourceText: false,
  71444. GM_getResourceURL: false,
  71445. GM_getValue: false,
  71446. GM_info: false,
  71447. GM_listValues: false,
  71448. GM_log: false,
  71449. GM_openInTab: false,
  71450. GM_registerMenuCommand: false,
  71451. GM_setClipboard: false,
  71452. GM_setValue: false,
  71453. GM_xmlhttpRequest: false,
  71454. unsafeWindow: false
  71455. };
  71456. var devtools = {
  71457. $: false,
  71458. $_: false,
  71459. $$: false,
  71460. $0: false,
  71461. $1: false,
  71462. $2: false,
  71463. $3: false,
  71464. $4: false,
  71465. $x: false,
  71466. chrome: false,
  71467. clear: false,
  71468. copy: false,
  71469. debug: false,
  71470. dir: false,
  71471. dirxml: false,
  71472. getEventListeners: false,
  71473. inspect: false,
  71474. keys: false,
  71475. monitor: false,
  71476. monitorEvents: false,
  71477. profile: false,
  71478. profileEnd: false,
  71479. queryObjects: false,
  71480. table: false,
  71481. undebug: false,
  71482. unmonitor: false,
  71483. unmonitorEvents: false,
  71484. values: false
  71485. };
  71486. var require$$0$4 = {
  71487. builtin: builtin,
  71488. es5: es5,
  71489. es2015: es2015,
  71490. es2017: es2017,
  71491. browser: browser,
  71492. worker: worker,
  71493. node: node,
  71494. commonjs: commonjs,
  71495. amd: amd,
  71496. mocha: mocha,
  71497. jasmine: jasmine,
  71498. jest: jest,
  71499. qunit: qunit,
  71500. phantomjs: phantomjs,
  71501. couch: couch,
  71502. rhino: rhino,
  71503. nashorn: nashorn,
  71504. wsh: wsh,
  71505. jquery: jquery,
  71506. yui: yui,
  71507. shelljs: shelljs,
  71508. prototypejs: prototypejs,
  71509. meteor: meteor,
  71510. mongo: mongo,
  71511. applescript: applescript,
  71512. serviceworker: serviceworker,
  71513. atomtest: atomtest,
  71514. embertest: embertest,
  71515. protractor: protractor,
  71516. "shared-node-browser": {
  71517. clearInterval: false,
  71518. clearTimeout: false,
  71519. console: false,
  71520. setInterval: false,
  71521. setTimeout: false,
  71522. URL: false,
  71523. URLSearchParams: false
  71524. },
  71525. webextensions: webextensions,
  71526. greasemonkey: greasemonkey,
  71527. devtools: devtools
  71528. };
  71529. var globalsBABEL_8_BREAKINGFalse = require$$0$4;
  71530. var globals = globalsBABEL_8_BREAKINGFalse;
  71531. var _templateObject$b;
  71532. var helperIDs = new WeakMap();
  71533. function addCreateSuperHelper(file) {
  71534. if (helperIDs.has(file)) {
  71535. return (cloneNode || clone)(helperIDs.get(file));
  71536. }
  71537. try {
  71538. return file.addHelper("createSuper");
  71539. } catch (_unused) {}
  71540. var id = file.scope.generateUidIdentifier("createSuper");
  71541. helperIDs.set(file, id);
  71542. var fn = helper$1({
  71543. CREATE_SUPER: id,
  71544. GET_PROTOTYPE_OF: file.addHelper("getPrototypeOf"),
  71545. POSSIBLE_CONSTRUCTOR_RETURN: file.addHelper("possibleConstructorReturn")
  71546. });
  71547. file.path.unshiftContainer("body", [fn]);
  71548. file.scope.registerDeclaration(file.path.get("body.0"));
  71549. return cloneNode(id);
  71550. }
  71551. var helper$1 = template$2.statement(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n function CREATE_SUPER(Derived) {\n function isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n\n // core-js@3\n if (Reflect.construct.sham) return false;\n\n // Proxy can't be polyfilled. Every browser implemented\n // proxies before or at the same time as Reflect.construct,\n // so if they support Proxy they also support Reflect.construct.\n if (typeof Proxy === \"function\") return true;\n\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Date object.\n Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n return function () {\n var Super = GET_PROTOTYPE_OF(Derived), result;\n if (isNativeReflectConstruct()) {\n // NOTE: This doesn't work if this.__proto__.constructor has been modified.\n var NewTarget = GET_PROTOTYPE_OF(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return POSSIBLE_CONSTRUCTOR_RETURN(this, result);\n }\n }\n"])));
  71552. var _templateObject$a;
  71553. function buildConstructor(classRef, constructorBody, node) {
  71554. var func = functionDeclaration(cloneNode(classRef), [], constructorBody);
  71555. inherits(func, node);
  71556. return func;
  71557. }
  71558. function transformClass(path, file, builtinClasses, isLoose, assumptions) {
  71559. var classState = {
  71560. parent: undefined,
  71561. scope: undefined,
  71562. node: undefined,
  71563. path: undefined,
  71564. file: undefined,
  71565. classId: undefined,
  71566. classRef: undefined,
  71567. superFnId: undefined,
  71568. superName: undefined,
  71569. superReturns: [],
  71570. isDerived: false,
  71571. extendsNative: false,
  71572. construct: undefined,
  71573. constructorBody: undefined,
  71574. userConstructor: undefined,
  71575. userConstructorPath: undefined,
  71576. hasConstructor: false,
  71577. staticPropBody: [],
  71578. body: [],
  71579. superThises: [],
  71580. pushedConstructor: false,
  71581. pushedInherits: false,
  71582. protoAlias: null,
  71583. isLoose: false,
  71584. methods: {
  71585. instance: {
  71586. hasComputed: false,
  71587. list: [],
  71588. map: new Map()
  71589. },
  71590. "static": {
  71591. hasComputed: false,
  71592. list: [],
  71593. map: new Map()
  71594. }
  71595. }
  71596. };
  71597. var setState = function setState(newState) {
  71598. Object.assign(classState, newState);
  71599. };
  71600. var findThisesVisitor = traverse.visitors.merge([environmentVisitor, {
  71601. ThisExpression: function ThisExpression(path) {
  71602. classState.superThises.push(path);
  71603. }
  71604. }]);
  71605. function maybeCreateConstructor() {
  71606. var hasConstructor = false;
  71607. var paths = classState.path.get("body.body");
  71608. for (var _iterator = _createForOfIteratorHelperLoose(paths), _step; !(_step = _iterator()).done;) {
  71609. var _path = _step.value;
  71610. hasConstructor = _path.equals("kind", "constructor");
  71611. if (hasConstructor) break;
  71612. }
  71613. if (hasConstructor) return;
  71614. var params, body;
  71615. if (classState.isDerived) {
  71616. var _constructor = template$2.expression.ast(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n (function () {\n super(...arguments);\n })\n "])));
  71617. params = _constructor.params;
  71618. body = _constructor.body;
  71619. } else {
  71620. params = [];
  71621. body = blockStatement([]);
  71622. }
  71623. classState.path.get("body").unshiftContainer("body", classMethod("constructor", identifier("constructor"), params, body));
  71624. }
  71625. function buildBody() {
  71626. maybeCreateConstructor();
  71627. pushBody();
  71628. verifyConstructor();
  71629. if (classState.userConstructor) {
  71630. var constructorBody = classState.constructorBody,
  71631. userConstructor = classState.userConstructor,
  71632. construct = classState.construct;
  71633. constructorBody.body = constructorBody.body.concat(userConstructor.body.body);
  71634. inherits(construct, userConstructor);
  71635. inherits(constructorBody, userConstructor.body);
  71636. }
  71637. pushDescriptors();
  71638. }
  71639. function pushBody() {
  71640. var classBodyPaths = classState.path.get("body.body");
  71641. for (var _iterator2 = _createForOfIteratorHelperLoose(classBodyPaths), _step2; !(_step2 = _iterator2()).done;) {
  71642. var _path2 = _step2.value;
  71643. var node = _path2.node;
  71644. if (_path2.isClassProperty()) {
  71645. throw _path2.buildCodeFrameError("Missing class properties transform.");
  71646. }
  71647. if (node.decorators) {
  71648. throw _path2.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
  71649. }
  71650. if (isClassMethod(node)) {
  71651. (function () {
  71652. var isConstructor = node.kind === "constructor";
  71653. var replaceSupers = new ReplaceSupers({
  71654. methodPath: _path2,
  71655. objectRef: classState.classRef,
  71656. superRef: classState.superName,
  71657. constantSuper: assumptions.constantSuper,
  71658. file: classState.file,
  71659. refToPreserve: classState.classRef
  71660. });
  71661. replaceSupers.replace();
  71662. var superReturns = [];
  71663. _path2.traverse(traverse.visitors.merge([environmentVisitor, {
  71664. ReturnStatement: function ReturnStatement(path) {
  71665. if (!path.getFunctionParent().isArrowFunctionExpression()) {
  71666. superReturns.push(path);
  71667. }
  71668. }
  71669. }]));
  71670. if (isConstructor) {
  71671. pushConstructor(superReturns, node, _path2);
  71672. } else {
  71673. pushMethod(node, _path2);
  71674. }
  71675. })();
  71676. }
  71677. }
  71678. }
  71679. function pushDescriptors() {
  71680. pushInheritsToBody();
  71681. var body = classState.body;
  71682. var props = {
  71683. instance: null,
  71684. "static": null
  71685. };
  71686. for (var _i = 0, _arr = ["static", "instance"]; _i < _arr.length; _i++) {
  71687. var placement = _arr[_i];
  71688. if (classState.methods[placement].list.length) {
  71689. props[placement] = classState.methods[placement].list.map(function (desc) {
  71690. var obj = objectExpression([objectProperty(identifier("key"), desc.key)]);
  71691. for (var _i2 = 0, _arr2 = ["get", "set", "value"]; _i2 < _arr2.length; _i2++) {
  71692. var kind = _arr2[_i2];
  71693. if (desc[kind] != null) {
  71694. obj.properties.push(objectProperty(identifier(kind), desc[kind]));
  71695. }
  71696. }
  71697. return obj;
  71698. });
  71699. }
  71700. }
  71701. if (props.instance || props["static"]) {
  71702. var args = [cloneNode(classState.classRef), props.instance ? arrayExpression(props.instance) : nullLiteral(), props["static"] ? arrayExpression(props["static"]) : nullLiteral()];
  71703. var lastNonNullIndex = 0;
  71704. for (var i = 0; i < args.length; i++) {
  71705. if (!isNullLiteral(args[i])) lastNonNullIndex = i;
  71706. }
  71707. args = args.slice(0, lastNonNullIndex + 1);
  71708. body.push(expressionStatement(callExpression(classState.file.addHelper("createClass"), args)));
  71709. }
  71710. }
  71711. function wrapSuperCall(bareSuper, superRef, thisRef, body) {
  71712. var bareSuperNode = bareSuper.node;
  71713. var call;
  71714. if (assumptions.superIsCallableConstructor) {
  71715. bareSuperNode.arguments.unshift(thisExpression());
  71716. if (bareSuperNode.arguments.length === 2 && isSpreadElement(bareSuperNode.arguments[1]) && isIdentifier(bareSuperNode.arguments[1].argument, {
  71717. name: "arguments"
  71718. })) {
  71719. bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
  71720. bareSuperNode.callee = memberExpression(cloneNode(superRef), identifier("apply"));
  71721. } else {
  71722. bareSuperNode.callee = memberExpression(cloneNode(superRef), identifier("call"));
  71723. }
  71724. call = logicalExpression("||", bareSuperNode, thisExpression());
  71725. } else {
  71726. call = optimiseCallExpression(cloneNode(classState.superFnId), thisExpression(), bareSuperNode.arguments, false);
  71727. }
  71728. if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
  71729. if (classState.superThises.length) {
  71730. call = assignmentExpression("=", thisRef(), call);
  71731. }
  71732. bareSuper.parentPath.replaceWith(returnStatement(call));
  71733. } else {
  71734. bareSuper.replaceWith(assignmentExpression("=", thisRef(), call));
  71735. }
  71736. }
  71737. function verifyConstructor() {
  71738. if (!classState.isDerived) return;
  71739. var path = classState.userConstructorPath;
  71740. var body = path.get("body");
  71741. path.traverse(findThisesVisitor);
  71742. var _thisRef = function thisRef() {
  71743. var ref = path.scope.generateDeclaredUidIdentifier("this");
  71744. _thisRef = function thisRef() {
  71745. return cloneNode(ref);
  71746. };
  71747. return ref;
  71748. };
  71749. for (var _iterator3 = _createForOfIteratorHelperLoose(classState.superThises), _step3; !(_step3 = _iterator3()).done;) {
  71750. var thisPath = _step3.value;
  71751. var node = thisPath.node,
  71752. parentPath = thisPath.parentPath;
  71753. if (parentPath.isMemberExpression({
  71754. object: node
  71755. })) {
  71756. thisPath.replaceWith(_thisRef());
  71757. continue;
  71758. }
  71759. thisPath.replaceWith(callExpression(classState.file.addHelper("assertThisInitialized"), [_thisRef()]));
  71760. }
  71761. var bareSupers = new Set();
  71762. path.traverse(traverse.visitors.merge([environmentVisitor, {
  71763. Super: function Super(path) {
  71764. var node = path.node,
  71765. parentPath = path.parentPath;
  71766. if (parentPath.isCallExpression({
  71767. callee: node
  71768. })) {
  71769. bareSupers.add(parentPath);
  71770. }
  71771. }
  71772. }]));
  71773. var guaranteedSuperBeforeFinish = !!bareSupers.size;
  71774. for (var _iterator4 = _createForOfIteratorHelperLoose(bareSupers), _step4; !(_step4 = _iterator4()).done;) {
  71775. var bareSuper = _step4.value;
  71776. wrapSuperCall(bareSuper, classState.superName, _thisRef, body);
  71777. if (guaranteedSuperBeforeFinish) {
  71778. bareSuper.find(function (parentPath) {
  71779. if (parentPath === path) {
  71780. return true;
  71781. }
  71782. if (parentPath.isLoop() || parentPath.isConditional() || parentPath.isArrowFunctionExpression()) {
  71783. guaranteedSuperBeforeFinish = false;
  71784. return true;
  71785. }
  71786. });
  71787. }
  71788. }
  71789. var wrapReturn;
  71790. if (classState.isLoose) {
  71791. wrapReturn = function wrapReturn(returnArg) {
  71792. var thisExpr = callExpression(classState.file.addHelper("assertThisInitialized"), [_thisRef()]);
  71793. return returnArg ? logicalExpression("||", returnArg, thisExpr) : thisExpr;
  71794. };
  71795. } else {
  71796. wrapReturn = function wrapReturn(returnArg) {
  71797. return callExpression(classState.file.addHelper("possibleConstructorReturn"), [_thisRef()].concat(returnArg || []));
  71798. };
  71799. }
  71800. var bodyPaths = body.get("body");
  71801. if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {
  71802. body.pushContainer("body", returnStatement(guaranteedSuperBeforeFinish ? _thisRef() : wrapReturn()));
  71803. }
  71804. for (var _iterator5 = _createForOfIteratorHelperLoose(classState.superReturns), _step5; !(_step5 = _iterator5()).done;) {
  71805. var returnPath = _step5.value;
  71806. returnPath.get("argument").replaceWith(wrapReturn(returnPath.node.argument));
  71807. }
  71808. }
  71809. function pushMethod(node, path) {
  71810. var scope = path ? path.scope : classState.scope;
  71811. if (node.kind === "method") {
  71812. if (processMethod(node, scope)) return;
  71813. }
  71814. var placement = node["static"] ? "static" : "instance";
  71815. var methods = classState.methods[placement];
  71816. var descKey = node.kind === "method" ? "value" : node.kind;
  71817. var key = isNumericLiteral(node.key) || isBigIntLiteral(node.key) ? stringLiteral(String(node.key.value)) : toComputedKey$1(node);
  71818. var fn = toExpression(node);
  71819. if (isStringLiteral(key)) {
  71820. if (node.kind === "method") {
  71821. fn = nameFunction({
  71822. id: key,
  71823. node: node,
  71824. scope: scope
  71825. });
  71826. }
  71827. } else {
  71828. methods.hasComputed = true;
  71829. }
  71830. var descriptor;
  71831. if (!methods.hasComputed && methods.map.has(key.value)) {
  71832. descriptor = methods.map.get(key.value);
  71833. descriptor[descKey] = fn;
  71834. if (descKey === "value") {
  71835. descriptor.get = null;
  71836. descriptor.set = null;
  71837. } else {
  71838. descriptor.value = null;
  71839. }
  71840. } else {
  71841. var _descriptor;
  71842. descriptor = (_descriptor = {
  71843. key: key
  71844. }, _descriptor[descKey] = fn, _descriptor);
  71845. methods.list.push(descriptor);
  71846. if (!methods.hasComputed) {
  71847. methods.map.set(key.value, descriptor);
  71848. }
  71849. }
  71850. }
  71851. function processMethod(node, scope) {
  71852. if (assumptions.setClassMethods && !node.decorators) {
  71853. var classRef = classState.classRef;
  71854. if (!node["static"]) {
  71855. insertProtoAliasOnce();
  71856. classRef = classState.protoAlias;
  71857. }
  71858. var methodName = memberExpression(cloneNode(classRef), node.key, node.computed || isLiteral(node.key));
  71859. var func = functionExpression(null, node.params, node.body, node.generator, node.async);
  71860. inherits(func, node);
  71861. var key = toComputedKey$1(node, node.key);
  71862. if (isStringLiteral(key)) {
  71863. func = nameFunction({
  71864. node: func,
  71865. id: key,
  71866. scope: scope
  71867. });
  71868. }
  71869. var expr = expressionStatement(assignmentExpression("=", methodName, func));
  71870. inheritsComments(expr, node);
  71871. classState.body.push(expr);
  71872. return true;
  71873. }
  71874. return false;
  71875. }
  71876. function insertProtoAliasOnce() {
  71877. if (classState.protoAlias === null) {
  71878. setState({
  71879. protoAlias: classState.scope.generateUidIdentifier("proto")
  71880. });
  71881. var classProto = memberExpression(classState.classRef, identifier("prototype"));
  71882. var protoDeclaration = variableDeclaration("var", [variableDeclarator(classState.protoAlias, classProto)]);
  71883. classState.body.push(protoDeclaration);
  71884. }
  71885. }
  71886. function pushConstructor(superReturns, method, path) {
  71887. setState({
  71888. userConstructorPath: path,
  71889. userConstructor: method,
  71890. hasConstructor: true,
  71891. superReturns: superReturns
  71892. });
  71893. var construct = classState.construct;
  71894. inheritsComments(construct, method);
  71895. construct.params = method.params;
  71896. inherits(construct.body, method.body);
  71897. construct.body.directives = method.body.directives;
  71898. pushConstructorToBody();
  71899. }
  71900. function pushConstructorToBody() {
  71901. if (classState.pushedConstructor) return;
  71902. classState.pushedConstructor = true;
  71903. if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {
  71904. pushDescriptors();
  71905. }
  71906. classState.body.push(classState.construct);
  71907. pushInheritsToBody();
  71908. }
  71909. function pushInheritsToBody() {
  71910. if (!classState.isDerived || classState.pushedInherits) return;
  71911. var superFnId = path.scope.generateUidIdentifier("super");
  71912. setState({
  71913. pushedInherits: true,
  71914. superFnId: superFnId
  71915. });
  71916. if (!assumptions.superIsCallableConstructor) {
  71917. classState.body.unshift(variableDeclaration("var", [variableDeclarator(superFnId, callExpression(addCreateSuperHelper(classState.file), [cloneNode(classState.classRef)]))]));
  71918. }
  71919. classState.body.unshift(expressionStatement(callExpression(classState.file.addHelper(classState.isLoose ? "inheritsLoose" : "inherits"), [cloneNode(classState.classRef), cloneNode(classState.superName)])));
  71920. }
  71921. function setupClosureParamsArgs() {
  71922. var superName = classState.superName;
  71923. var closureParams = [];
  71924. var closureArgs = [];
  71925. if (classState.isDerived) {
  71926. var arg = cloneNode(superName);
  71927. if (classState.extendsNative) {
  71928. arg = callExpression(classState.file.addHelper("wrapNativeSuper"), [arg]);
  71929. annotateAsPure(arg);
  71930. }
  71931. var param = classState.scope.generateUidIdentifierBasedOnNode(superName);
  71932. closureParams.push(param);
  71933. closureArgs.push(arg);
  71934. setState({
  71935. superName: cloneNode(param)
  71936. });
  71937. }
  71938. return {
  71939. closureParams: closureParams,
  71940. closureArgs: closureArgs
  71941. };
  71942. }
  71943. function classTransformer(path, file, builtinClasses, isLoose) {
  71944. setState({
  71945. parent: path.parent,
  71946. scope: path.scope,
  71947. node: path.node,
  71948. path: path,
  71949. file: file,
  71950. isLoose: isLoose
  71951. });
  71952. setState({
  71953. classId: classState.node.id,
  71954. classRef: classState.node.id ? identifier(classState.node.id.name) : classState.scope.generateUidIdentifier("class"),
  71955. superName: classState.node.superClass,
  71956. isDerived: !!classState.node.superClass,
  71957. constructorBody: blockStatement([])
  71958. });
  71959. setState({
  71960. extendsNative: classState.isDerived && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true)
  71961. });
  71962. var classRef = classState.classRef,
  71963. node = classState.node,
  71964. constructorBody = classState.constructorBody;
  71965. setState({
  71966. construct: buildConstructor(classRef, constructorBody, node)
  71967. });
  71968. var body = classState.body;
  71969. var _setupClosureParamsAr = setupClosureParamsArgs(),
  71970. closureParams = _setupClosureParamsAr.closureParams,
  71971. closureArgs = _setupClosureParamsAr.closureArgs;
  71972. buildBody();
  71973. if (!assumptions.noClassCalls) {
  71974. constructorBody.body.unshift(expressionStatement(callExpression(classState.file.addHelper("classCallCheck"), [thisExpression(), cloneNode(classState.classRef)])));
  71975. }
  71976. body = body.concat(classState.staticPropBody.map(function (fn) {
  71977. return fn(cloneNode(classState.classRef));
  71978. }));
  71979. var isStrict = path.isInStrictMode();
  71980. var constructorOnly = classState.classId && body.length === 1;
  71981. if (constructorOnly && !isStrict) {
  71982. for (var _iterator6 = _createForOfIteratorHelperLoose(classState.construct.params), _step6; !(_step6 = _iterator6()).done;) {
  71983. var param = _step6.value;
  71984. if (!isIdentifier(param)) {
  71985. constructorOnly = false;
  71986. break;
  71987. }
  71988. }
  71989. }
  71990. var directives = constructorOnly ? body[0].body.directives : [];
  71991. if (!isStrict) {
  71992. directives.push(directive(directiveLiteral("use strict")));
  71993. }
  71994. if (constructorOnly) {
  71995. return toExpression(body[0]);
  71996. }
  71997. body.push(returnStatement(cloneNode(classState.classRef)));
  71998. var container = arrowFunctionExpression(closureParams, blockStatement(body, directives));
  71999. return callExpression(container, closureArgs);
  72000. }
  72001. return classTransformer(path, file, builtinClasses, isLoose);
  72002. }
  72003. var getBuiltinClasses = function getBuiltinClasses(category) {
  72004. return Object.keys(globals[category]).filter(function (name) {
  72005. return /^[A-Z]/.test(name);
  72006. });
  72007. };
  72008. var builtinClasses = new Set([].concat(_toConsumableArray(getBuiltinClasses("builtin")), _toConsumableArray(getBuiltinClasses("browser"))));
  72009. var _transformClasses = declare(function (api, options) {
  72010. var _api$assumption, _api$assumption2, _api$assumption3, _api$assumption4;
  72011. api.assertVersion(7);
  72012. var loose = options.loose;
  72013. var setClassMethods = (_api$assumption = api.assumption("setClassMethods")) != null ? _api$assumption : options.loose;
  72014. var constantSuper = (_api$assumption2 = api.assumption("constantSuper")) != null ? _api$assumption2 : options.loose;
  72015. var superIsCallableConstructor = (_api$assumption3 = api.assumption("superIsCallableConstructor")) != null ? _api$assumption3 : options.loose;
  72016. var noClassCalls = (_api$assumption4 = api.assumption("noClassCalls")) != null ? _api$assumption4 : options.loose;
  72017. var VISITED = Symbol();
  72018. return {
  72019. name: "transform-classes",
  72020. visitor: {
  72021. ExportDefaultDeclaration: function ExportDefaultDeclaration(path) {
  72022. if (!path.get("declaration").isClassDeclaration()) return;
  72023. splitExportDeclaration(path);
  72024. },
  72025. ClassDeclaration: function ClassDeclaration(path) {
  72026. var node = path.node;
  72027. var ref = node.id || path.scope.generateUidIdentifier("class");
  72028. path.replaceWith(variableDeclaration("let", [variableDeclarator(ref, toExpression(node))]));
  72029. },
  72030. ClassExpression: function ClassExpression(path, state) {
  72031. var node = path.node;
  72032. if (node[VISITED]) return;
  72033. var inferred = nameFunction(path);
  72034. if (inferred && inferred !== node) {
  72035. path.replaceWith(inferred);
  72036. return;
  72037. }
  72038. node[VISITED] = true;
  72039. path.replaceWith(transformClass(path, state.file, builtinClasses, loose, {
  72040. setClassMethods: setClassMethods,
  72041. constantSuper: constantSuper,
  72042. superIsCallableConstructor: superIsCallableConstructor,
  72043. noClassCalls: noClassCalls
  72044. }));
  72045. if (path.isCallExpression()) {
  72046. annotateAsPure(path);
  72047. var callee = path.get("callee");
  72048. if (callee.isArrowFunctionExpression()) {
  72049. callee.arrowFunctionToExpression();
  72050. }
  72051. }
  72052. }
  72053. }
  72054. };
  72055. });
  72056. var _transformComputedProperties = declare(function (api, options) {
  72057. var _api$assumption;
  72058. api.assertVersion(7);
  72059. var setComputedProperties = (_api$assumption = api.assumption("setComputedProperties")) != null ? _api$assumption : options.loose;
  72060. var pushComputedProps = setComputedProperties ? pushComputedPropsLoose : pushComputedPropsSpec;
  72061. var buildMutatorMapAssign = template$2("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");
  72062. function getValue(prop) {
  72063. if (isObjectProperty(prop)) {
  72064. return prop.value;
  72065. } else if (isObjectMethod(prop)) {
  72066. return functionExpression(null, prop.params, prop.body, prop.generator, prop.async);
  72067. }
  72068. }
  72069. function pushAssign(objId, prop, body) {
  72070. if (prop.kind === "get" && prop.kind === "set") {
  72071. pushMutatorDefine(objId, prop);
  72072. } else {
  72073. body.push(expressionStatement(assignmentExpression("=", memberExpression(cloneNode(objId), prop.key, prop.computed || isLiteral(prop.key)), getValue(prop))));
  72074. }
  72075. }
  72076. function pushMutatorDefine(_ref, prop) {
  72077. var body = _ref.body,
  72078. getMutatorId = _ref.getMutatorId,
  72079. scope = _ref.scope;
  72080. var key = !prop.computed && isIdentifier(prop.key) ? stringLiteral(prop.key.name) : prop.key;
  72081. var maybeMemoise = scope.maybeGenerateMemoised(key);
  72082. if (maybeMemoise) {
  72083. body.push(expressionStatement(assignmentExpression("=", maybeMemoise, key)));
  72084. key = maybeMemoise;
  72085. }
  72086. body.push.apply(body, _toConsumableArray(buildMutatorMapAssign({
  72087. MUTATOR_MAP_REF: getMutatorId(),
  72088. KEY: cloneNode(key),
  72089. VALUE: getValue(prop),
  72090. KIND: identifier(prop.kind)
  72091. })));
  72092. }
  72093. function pushComputedPropsLoose(info) {
  72094. for (var _iterator = _createForOfIteratorHelperLoose(info.computedProps), _step; !(_step = _iterator()).done;) {
  72095. var prop = _step.value;
  72096. if (prop.kind === "get" || prop.kind === "set") {
  72097. pushMutatorDefine(info, prop);
  72098. } else {
  72099. pushAssign(cloneNode(info.objId), prop, info.body);
  72100. }
  72101. }
  72102. }
  72103. function pushComputedPropsSpec(info) {
  72104. var objId = info.objId,
  72105. body = info.body,
  72106. computedProps = info.computedProps,
  72107. state = info.state;
  72108. for (var _iterator2 = _createForOfIteratorHelperLoose(computedProps), _step2; !(_step2 = _iterator2()).done;) {
  72109. var prop = _step2.value;
  72110. var key = toComputedKey$1(prop);
  72111. if (prop.kind === "get" || prop.kind === "set") {
  72112. pushMutatorDefine(info, prop);
  72113. } else {
  72114. if (computedProps.length === 1) {
  72115. return callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]);
  72116. } else {
  72117. body.push(expressionStatement(callExpression(state.addHelper("defineProperty"), [cloneNode(objId), key, getValue(prop)])));
  72118. }
  72119. }
  72120. }
  72121. }
  72122. return {
  72123. name: "transform-computed-properties",
  72124. visitor: {
  72125. ObjectExpression: {
  72126. exit: function exit(path, state) {
  72127. var node = path.node,
  72128. parent = path.parent,
  72129. scope = path.scope;
  72130. var hasComputed = false;
  72131. for (var _i = 0, _arr = node.properties; _i < _arr.length; _i++) {
  72132. var prop = _arr[_i];
  72133. hasComputed = prop.computed === true;
  72134. if (hasComputed) break;
  72135. }
  72136. if (!hasComputed) return;
  72137. var initProps = [];
  72138. var computedProps = [];
  72139. var foundComputed = false;
  72140. for (var _iterator3 = _createForOfIteratorHelperLoose(node.properties), _step3; !(_step3 = _iterator3()).done;) {
  72141. var _prop = _step3.value;
  72142. if (_prop.computed) {
  72143. foundComputed = true;
  72144. }
  72145. if (foundComputed) {
  72146. computedProps.push(_prop);
  72147. } else {
  72148. initProps.push(_prop);
  72149. }
  72150. }
  72151. var objId = scope.generateUidIdentifierBasedOnNode(parent);
  72152. var initPropExpression = objectExpression(initProps);
  72153. var body = [];
  72154. body.push(variableDeclaration("var", [variableDeclarator(objId, initPropExpression)]));
  72155. var mutatorRef;
  72156. var getMutatorId = function getMutatorId() {
  72157. if (!mutatorRef) {
  72158. mutatorRef = scope.generateUidIdentifier("mutatorMap");
  72159. body.push(variableDeclaration("var", [variableDeclarator(mutatorRef, objectExpression([]))]));
  72160. }
  72161. return cloneNode(mutatorRef);
  72162. };
  72163. var single = pushComputedProps({
  72164. scope: scope,
  72165. objId: objId,
  72166. body: body,
  72167. computedProps: computedProps,
  72168. initPropExpression: initPropExpression,
  72169. getMutatorId: getMutatorId,
  72170. state: state
  72171. });
  72172. if (mutatorRef) {
  72173. body.push(expressionStatement(callExpression(state.addHelper("defineEnumerableProperties"), [cloneNode(objId), cloneNode(mutatorRef)])));
  72174. }
  72175. if (single) {
  72176. path.replaceWith(single);
  72177. } else {
  72178. body.push(expressionStatement(cloneNode(objId)));
  72179. path.replaceWithMultiple(body);
  72180. }
  72181. }
  72182. }
  72183. }
  72184. };
  72185. });
  72186. var _transformDestructuring = declare(function (api, options) {
  72187. var _api$assumption, _options$allowArrayLi, _api$assumption2;
  72188. api.assertVersion(7);
  72189. var _options$useBuiltIns = options.useBuiltIns,
  72190. useBuiltIns = _options$useBuiltIns === void 0 ? false : _options$useBuiltIns;
  72191. var iterableIsArray = (_api$assumption = api.assumption("iterableIsArray")) != null ? _api$assumption : options.loose;
  72192. var arrayLikeIsIterable = (_options$allowArrayLi = options.allowArrayLike) != null ? _options$allowArrayLi : api.assumption("arrayLikeIsIterable");
  72193. var objectRestNoSymbols = (_api$assumption2 = api.assumption("objectRestNoSymbols")) != null ? _api$assumption2 : options.loose;
  72194. function getExtendsHelper(file) {
  72195. return useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : file.addHelper("extends");
  72196. }
  72197. function variableDeclarationHasPattern(node) {
  72198. for (var _i = 0, _arr = node.declarations; _i < _arr.length; _i++) {
  72199. var declar = _arr[_i];
  72200. if (isPattern(declar.id)) {
  72201. return true;
  72202. }
  72203. }
  72204. return false;
  72205. }
  72206. function hasRest(pattern) {
  72207. for (var _i2 = 0, _arr2 = pattern.elements; _i2 < _arr2.length; _i2++) {
  72208. var elem = _arr2[_i2];
  72209. if (isRestElement(elem)) {
  72210. return true;
  72211. }
  72212. }
  72213. return false;
  72214. }
  72215. function hasObjectRest(pattern) {
  72216. for (var _i3 = 0, _arr3 = pattern.properties; _i3 < _arr3.length; _i3++) {
  72217. var elem = _arr3[_i3];
  72218. if (isRestElement(elem)) {
  72219. return true;
  72220. }
  72221. }
  72222. return false;
  72223. }
  72224. var STOP_TRAVERSAL = {};
  72225. var arrayUnpackVisitor = function arrayUnpackVisitor(node, ancestors, state) {
  72226. if (!ancestors.length) {
  72227. return;
  72228. }
  72229. if (isIdentifier(node) && isReferenced(node, ancestors[ancestors.length - 1]) && state.bindings[node.name]) {
  72230. state.deopt = true;
  72231. throw STOP_TRAVERSAL;
  72232. }
  72233. };
  72234. var DestructuringTransformer = function () {
  72235. function DestructuringTransformer(opts) {
  72236. this.blockHoist = opts.blockHoist;
  72237. this.operator = opts.operator;
  72238. this.arrays = {};
  72239. this.nodes = opts.nodes || [];
  72240. this.scope = opts.scope;
  72241. this.kind = opts.kind;
  72242. this.iterableIsArray = opts.iterableIsArray;
  72243. this.arrayLikeIsIterable = opts.arrayLikeIsIterable;
  72244. this.addHelper = opts.addHelper;
  72245. }
  72246. var _proto = DestructuringTransformer.prototype;
  72247. _proto.buildVariableAssignment = function buildVariableAssignment(id, init) {
  72248. var op = this.operator;
  72249. if (isMemberExpression(id)) op = "=";
  72250. var node;
  72251. if (op) {
  72252. node = expressionStatement(assignmentExpression(op, id, cloneNode(init) || this.scope.buildUndefinedNode()));
  72253. } else {
  72254. node = variableDeclaration(this.kind, [variableDeclarator(id, cloneNode(init))]);
  72255. }
  72256. node._blockHoist = this.blockHoist;
  72257. return node;
  72258. };
  72259. _proto.buildVariableDeclaration = function buildVariableDeclaration(id, init) {
  72260. var declar = variableDeclaration("var", [variableDeclarator(cloneNode(id), cloneNode(init))]);
  72261. declar._blockHoist = this.blockHoist;
  72262. return declar;
  72263. };
  72264. _proto.push = function push(id, _init) {
  72265. var init = cloneNode(_init);
  72266. if (isObjectPattern(id)) {
  72267. this.pushObjectPattern(id, init);
  72268. } else if (isArrayPattern(id)) {
  72269. this.pushArrayPattern(id, init);
  72270. } else if (isAssignmentPattern(id)) {
  72271. this.pushAssignmentPattern(id, init);
  72272. } else {
  72273. this.nodes.push(this.buildVariableAssignment(id, init));
  72274. }
  72275. };
  72276. _proto.toArray = function toArray(node, count) {
  72277. if (this.iterableIsArray || isIdentifier(node) && this.arrays[node.name]) {
  72278. return node;
  72279. } else {
  72280. return this.scope.toArray(node, count, this.arrayLikeIsIterable);
  72281. }
  72282. };
  72283. _proto.pushAssignmentPattern = function pushAssignmentPattern(_ref, valueRef) {
  72284. var left = _ref.left,
  72285. right = _ref.right;
  72286. var tempId = this.scope.generateUidIdentifierBasedOnNode(valueRef);
  72287. this.nodes.push(this.buildVariableDeclaration(tempId, valueRef));
  72288. var tempConditional = conditionalExpression(binaryExpression("===", cloneNode(tempId), this.scope.buildUndefinedNode()), right, cloneNode(tempId));
  72289. if (isPattern(left)) {
  72290. var patternId;
  72291. var node;
  72292. if (this.kind === "const" || this.kind === "let") {
  72293. patternId = this.scope.generateUidIdentifier(tempId.name);
  72294. node = this.buildVariableDeclaration(patternId, tempConditional);
  72295. } else {
  72296. patternId = tempId;
  72297. node = expressionStatement(assignmentExpression("=", cloneNode(tempId), tempConditional));
  72298. }
  72299. this.nodes.push(node);
  72300. this.push(left, patternId);
  72301. } else {
  72302. this.nodes.push(this.buildVariableAssignment(left, tempConditional));
  72303. }
  72304. };
  72305. _proto.pushObjectRest = function pushObjectRest(pattern, objRef, spreadProp, spreadPropIndex) {
  72306. var keys = [];
  72307. var allLiteral = true;
  72308. var hasTemplateLiteral = false;
  72309. for (var i = 0; i < pattern.properties.length; i++) {
  72310. var prop = pattern.properties[i];
  72311. if (i >= spreadPropIndex) break;
  72312. if (isRestElement(prop)) continue;
  72313. var key = prop.key;
  72314. if (isIdentifier(key) && !prop.computed) {
  72315. keys.push(stringLiteral(key.name));
  72316. } else if (isTemplateLiteral(key)) {
  72317. keys.push(cloneNode(key));
  72318. hasTemplateLiteral = true;
  72319. } else if (isLiteral(key)) {
  72320. keys.push(stringLiteral(String(key.value)));
  72321. } else {
  72322. keys.push(cloneNode(key));
  72323. allLiteral = false;
  72324. }
  72325. }
  72326. var value;
  72327. if (keys.length === 0) {
  72328. value = callExpression(getExtendsHelper(this), [objectExpression([]), cloneNode(objRef)]);
  72329. } else {
  72330. var keyExpression = arrayExpression(keys);
  72331. if (!allLiteral) {
  72332. keyExpression = callExpression(memberExpression(keyExpression, identifier("map")), [this.addHelper("toPropertyKey")]);
  72333. } else if (!hasTemplateLiteral && !isProgram(this.scope.block)) {
  72334. var program = this.scope.path.findParent(function (path) {
  72335. return path.isProgram();
  72336. });
  72337. var id = this.scope.generateUidIdentifier("excluded");
  72338. program.scope.push({
  72339. id: id,
  72340. init: keyExpression,
  72341. kind: "const"
  72342. });
  72343. keyExpression = cloneNode(id);
  72344. }
  72345. value = callExpression(this.addHelper("objectWithoutProperties" + (objectRestNoSymbols ? "Loose" : "")), [cloneNode(objRef), keyExpression]);
  72346. }
  72347. this.nodes.push(this.buildVariableAssignment(spreadProp.argument, value));
  72348. };
  72349. _proto.pushObjectProperty = function pushObjectProperty(prop, propRef) {
  72350. if (isLiteral(prop.key)) prop.computed = true;
  72351. var pattern = prop.value;
  72352. var objRef = memberExpression(cloneNode(propRef), prop.key, prop.computed);
  72353. if (isPattern(pattern)) {
  72354. this.push(pattern, objRef);
  72355. } else {
  72356. this.nodes.push(this.buildVariableAssignment(pattern, objRef));
  72357. }
  72358. };
  72359. _proto.pushObjectPattern = function pushObjectPattern(pattern, objRef) {
  72360. if (!pattern.properties.length) {
  72361. this.nodes.push(expressionStatement(callExpression(this.addHelper("objectDestructuringEmpty"), [objRef])));
  72362. }
  72363. if (pattern.properties.length > 1 && !this.scope.isStatic(objRef)) {
  72364. var temp = this.scope.generateUidIdentifierBasedOnNode(objRef);
  72365. this.nodes.push(this.buildVariableDeclaration(temp, objRef));
  72366. objRef = temp;
  72367. }
  72368. if (hasObjectRest(pattern)) {
  72369. var copiedPattern;
  72370. for (var i = 0; i < pattern.properties.length; i++) {
  72371. var prop = pattern.properties[i];
  72372. if (isRestElement(prop)) {
  72373. break;
  72374. }
  72375. var key = prop.key;
  72376. if (prop.computed && !this.scope.isPure(key)) {
  72377. var name = this.scope.generateUidIdentifierBasedOnNode(key);
  72378. this.nodes.push(this.buildVariableDeclaration(name, key));
  72379. if (!copiedPattern) {
  72380. copiedPattern = pattern = Object.assign({}, pattern, {
  72381. properties: pattern.properties.slice()
  72382. });
  72383. }
  72384. copiedPattern.properties[i] = Object.assign({}, copiedPattern.properties[i], {
  72385. key: name
  72386. });
  72387. }
  72388. }
  72389. }
  72390. for (var _i4 = 0; _i4 < pattern.properties.length; _i4++) {
  72391. var _prop = pattern.properties[_i4];
  72392. if (isRestElement(_prop)) {
  72393. this.pushObjectRest(pattern, objRef, _prop, _i4);
  72394. } else {
  72395. this.pushObjectProperty(_prop, objRef);
  72396. }
  72397. }
  72398. };
  72399. _proto.canUnpackArrayPattern = function canUnpackArrayPattern(pattern, arr) {
  72400. if (!isArrayExpression(arr)) return false;
  72401. if (pattern.elements.length > arr.elements.length) return;
  72402. if (pattern.elements.length < arr.elements.length && !hasRest(pattern)) {
  72403. return false;
  72404. }
  72405. for (var _i5 = 0, _arr4 = pattern.elements; _i5 < _arr4.length; _i5++) {
  72406. var elem = _arr4[_i5];
  72407. if (!elem) return false;
  72408. if (isMemberExpression(elem)) return false;
  72409. }
  72410. for (var _i6 = 0, _arr5 = arr.elements; _i6 < _arr5.length; _i6++) {
  72411. var _elem = _arr5[_i6];
  72412. if (isSpreadElement(_elem)) return false;
  72413. if (isCallExpression(_elem)) return false;
  72414. if (isMemberExpression(_elem)) return false;
  72415. }
  72416. var bindings = getBindingIdentifiers$1(pattern);
  72417. var state = {
  72418. deopt: false,
  72419. bindings: bindings
  72420. };
  72421. try {
  72422. traverse$1(arr, arrayUnpackVisitor, state);
  72423. } catch (e) {
  72424. if (e !== STOP_TRAVERSAL) throw e;
  72425. }
  72426. return !state.deopt;
  72427. };
  72428. _proto.pushUnpackedArrayPattern = function pushUnpackedArrayPattern(pattern, arr) {
  72429. for (var i = 0; i < pattern.elements.length; i++) {
  72430. var elem = pattern.elements[i];
  72431. if (isRestElement(elem)) {
  72432. this.push(elem.argument, arrayExpression(arr.elements.slice(i)));
  72433. } else {
  72434. this.push(elem, arr.elements[i]);
  72435. }
  72436. }
  72437. };
  72438. _proto.pushArrayPattern = function pushArrayPattern(pattern, arrayRef) {
  72439. if (!pattern.elements) return;
  72440. if (this.canUnpackArrayPattern(pattern, arrayRef)) {
  72441. return this.pushUnpackedArrayPattern(pattern, arrayRef);
  72442. }
  72443. var count = !hasRest(pattern) && pattern.elements.length;
  72444. var toArray = this.toArray(arrayRef, count);
  72445. if (isIdentifier(toArray)) {
  72446. arrayRef = toArray;
  72447. } else {
  72448. arrayRef = this.scope.generateUidIdentifierBasedOnNode(arrayRef);
  72449. this.arrays[arrayRef.name] = true;
  72450. this.nodes.push(this.buildVariableDeclaration(arrayRef, toArray));
  72451. }
  72452. for (var i = 0; i < pattern.elements.length; i++) {
  72453. var elem = pattern.elements[i];
  72454. if (!elem) continue;
  72455. var elemRef = void 0;
  72456. if (isRestElement(elem)) {
  72457. elemRef = this.toArray(arrayRef);
  72458. elemRef = callExpression(memberExpression(elemRef, identifier("slice")), [numericLiteral(i)]);
  72459. elem = elem.argument;
  72460. } else {
  72461. elemRef = memberExpression(arrayRef, numericLiteral(i), true);
  72462. }
  72463. this.push(elem, elemRef);
  72464. }
  72465. };
  72466. _proto.init = function init(pattern, ref) {
  72467. if (!isArrayExpression(ref) && !isMemberExpression(ref)) {
  72468. var memo = this.scope.maybeGenerateMemoised(ref, true);
  72469. if (memo) {
  72470. this.nodes.push(this.buildVariableDeclaration(memo, cloneNode(ref)));
  72471. ref = memo;
  72472. }
  72473. }
  72474. this.push(pattern, ref);
  72475. return this.nodes;
  72476. };
  72477. return DestructuringTransformer;
  72478. }();
  72479. return {
  72480. name: "transform-destructuring",
  72481. visitor: {
  72482. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  72483. var declaration = path.get("declaration");
  72484. if (!declaration.isVariableDeclaration()) return;
  72485. if (!variableDeclarationHasPattern(declaration.node)) return;
  72486. var specifiers = [];
  72487. for (var _i7 = 0, _Object$keys = Object.keys(path.getOuterBindingIdentifiers(path)); _i7 < _Object$keys.length; _i7++) {
  72488. var name = _Object$keys[_i7];
  72489. specifiers.push(exportSpecifier(identifier(name), identifier(name)));
  72490. }
  72491. path.replaceWith(declaration.node);
  72492. path.insertAfter(exportNamedDeclaration(null, specifiers));
  72493. },
  72494. ForXStatement: function ForXStatement(path) {
  72495. var _this = this;
  72496. var node = path.node,
  72497. scope = path.scope;
  72498. var left = node.left;
  72499. if (isPattern(left)) {
  72500. var temp = scope.generateUidIdentifier("ref");
  72501. node.left = variableDeclaration("var", [variableDeclarator(temp)]);
  72502. path.ensureBlock();
  72503. if (node.body.body.length === 0 && path.isCompletionRecord()) {
  72504. node.body.body.unshift(expressionStatement(scope.buildUndefinedNode()));
  72505. }
  72506. node.body.body.unshift(expressionStatement(assignmentExpression("=", left, temp)));
  72507. return;
  72508. }
  72509. if (!isVariableDeclaration(left)) return;
  72510. var pattern = left.declarations[0].id;
  72511. if (!isPattern(pattern)) return;
  72512. var key = scope.generateUidIdentifier("ref");
  72513. node.left = variableDeclaration(left.kind, [variableDeclarator(key, null)]);
  72514. var nodes = [];
  72515. var destructuring = new DestructuringTransformer({
  72516. kind: left.kind,
  72517. scope: scope,
  72518. nodes: nodes,
  72519. iterableIsArray: iterableIsArray,
  72520. arrayLikeIsIterable: arrayLikeIsIterable,
  72521. addHelper: function addHelper(name) {
  72522. return _this.addHelper(name);
  72523. }
  72524. });
  72525. destructuring.init(pattern, key);
  72526. path.ensureBlock();
  72527. var block = node.body;
  72528. block.body = nodes.concat(block.body);
  72529. },
  72530. CatchClause: function CatchClause(_ref2) {
  72531. var _this2 = this;
  72532. var node = _ref2.node,
  72533. scope = _ref2.scope;
  72534. var pattern = node.param;
  72535. if (!isPattern(pattern)) return;
  72536. var ref = scope.generateUidIdentifier("ref");
  72537. node.param = ref;
  72538. var nodes = [];
  72539. var destructuring = new DestructuringTransformer({
  72540. kind: "let",
  72541. scope: scope,
  72542. nodes: nodes,
  72543. iterableIsArray: iterableIsArray,
  72544. arrayLikeIsIterable: arrayLikeIsIterable,
  72545. addHelper: function addHelper(name) {
  72546. return _this2.addHelper(name);
  72547. }
  72548. });
  72549. destructuring.init(pattern, ref);
  72550. node.body.body = nodes.concat(node.body.body);
  72551. },
  72552. AssignmentExpression: function AssignmentExpression(path) {
  72553. var _this3 = this;
  72554. var node = path.node,
  72555. scope = path.scope;
  72556. if (!isPattern(node.left)) return;
  72557. var nodes = [];
  72558. var destructuring = new DestructuringTransformer({
  72559. operator: node.operator,
  72560. scope: scope,
  72561. nodes: nodes,
  72562. iterableIsArray: iterableIsArray,
  72563. arrayLikeIsIterable: arrayLikeIsIterable,
  72564. addHelper: function addHelper(name) {
  72565. return _this3.addHelper(name);
  72566. }
  72567. });
  72568. var ref;
  72569. if (path.isCompletionRecord() || !path.parentPath.isExpressionStatement()) {
  72570. ref = scope.generateUidIdentifierBasedOnNode(node.right, "ref");
  72571. nodes.push(variableDeclaration("var", [variableDeclarator(ref, node.right)]));
  72572. if (isArrayExpression(node.right)) {
  72573. destructuring.arrays[ref.name] = true;
  72574. }
  72575. }
  72576. destructuring.init(node.left, ref || node.right);
  72577. if (ref) {
  72578. if (path.parentPath.isArrowFunctionExpression()) {
  72579. path.replaceWith(blockStatement([]));
  72580. nodes.push(returnStatement(cloneNode(ref)));
  72581. } else {
  72582. nodes.push(expressionStatement(cloneNode(ref)));
  72583. }
  72584. }
  72585. path.replaceWithMultiple(nodes);
  72586. path.scope.crawl();
  72587. },
  72588. VariableDeclaration: function VariableDeclaration(path) {
  72589. var _this4 = this;
  72590. var node = path.node,
  72591. scope = path.scope,
  72592. parent = path.parent;
  72593. if (isForXStatement(parent)) return;
  72594. if (!parent || !path.container) return;
  72595. if (!variableDeclarationHasPattern(node)) return;
  72596. var nodeKind = node.kind;
  72597. var nodeLoc = node.loc;
  72598. var nodes = [];
  72599. var declar;
  72600. for (var i = 0; i < node.declarations.length; i++) {
  72601. declar = node.declarations[i];
  72602. var patternId = declar.init;
  72603. var pattern = declar.id;
  72604. var destructuring = new DestructuringTransformer({
  72605. blockHoist: node._blockHoist,
  72606. nodes: nodes,
  72607. scope: scope,
  72608. kind: node.kind,
  72609. iterableIsArray: iterableIsArray,
  72610. arrayLikeIsIterable: arrayLikeIsIterable,
  72611. addHelper: function addHelper(name) {
  72612. return _this4.addHelper(name);
  72613. }
  72614. });
  72615. if (isPattern(pattern)) {
  72616. destructuring.init(pattern, patternId);
  72617. if (+i !== node.declarations.length - 1) {
  72618. inherits(nodes[nodes.length - 1], declar);
  72619. }
  72620. } else {
  72621. nodes.push(inherits(destructuring.buildVariableAssignment(declar.id, cloneNode(declar.init)), declar));
  72622. }
  72623. }
  72624. var tail = null;
  72625. var nodesOut = [];
  72626. for (var _i8 = 0, _nodes = nodes; _i8 < _nodes.length; _i8++) {
  72627. var _node = _nodes[_i8];
  72628. if (tail !== null && isVariableDeclaration(_node)) {
  72629. var _tail$declarations;
  72630. (_tail$declarations = tail.declarations).push.apply(_tail$declarations, _toConsumableArray(_node.declarations));
  72631. } else {
  72632. _node.kind = nodeKind;
  72633. if (!_node.loc) {
  72634. _node.loc = nodeLoc;
  72635. }
  72636. nodesOut.push(_node);
  72637. tail = isVariableDeclaration(_node) ? _node : null;
  72638. }
  72639. }
  72640. for (var _i9 = 0, _nodesOut = nodesOut; _i9 < _nodesOut.length; _i9++) {
  72641. var nodeOut = _nodesOut[_i9];
  72642. if (!nodeOut.declarations) continue;
  72643. for (var _iterator = _createForOfIteratorHelperLoose(nodeOut.declarations), _step; !(_step = _iterator()).done;) {
  72644. var declaration = _step.value;
  72645. var name = declaration.id.name;
  72646. if (scope.bindings[name]) {
  72647. scope.bindings[name].kind = nodeOut.kind;
  72648. }
  72649. }
  72650. }
  72651. if (nodesOut.length === 1) {
  72652. path.replaceWith(nodesOut[0]);
  72653. } else {
  72654. path.replaceWithMultiple(nodesOut);
  72655. }
  72656. }
  72657. }
  72658. };
  72659. });
  72660. var _transformDotallRegex = declare(function (api) {
  72661. api.assertVersion(7);
  72662. return createRegExpFeaturePlugin({
  72663. name: "transform-dotall-regex",
  72664. feature: "dotAllFlag"
  72665. });
  72666. });
  72667. function getName(key) {
  72668. if (isIdentifier(key)) {
  72669. return key.name;
  72670. }
  72671. return key.value.toString();
  72672. }
  72673. var _transformDuplicateKeys = declare(function (api) {
  72674. api.assertVersion(7);
  72675. return {
  72676. name: "transform-duplicate-keys",
  72677. visitor: {
  72678. ObjectExpression: function ObjectExpression(path) {
  72679. var node = path.node;
  72680. var plainProps = node.properties.filter(function (prop) {
  72681. return !isSpreadElement(prop) && !prop.computed;
  72682. });
  72683. var alreadySeenData = Object.create(null);
  72684. var alreadySeenGetters = Object.create(null);
  72685. var alreadySeenSetters = Object.create(null);
  72686. for (var _iterator = _createForOfIteratorHelperLoose(plainProps), _step; !(_step = _iterator()).done;) {
  72687. var prop = _step.value;
  72688. var name = getName(prop.key);
  72689. var isDuplicate = false;
  72690. switch (prop.kind) {
  72691. case "get":
  72692. if (alreadySeenData[name] || alreadySeenGetters[name]) {
  72693. isDuplicate = true;
  72694. }
  72695. alreadySeenGetters[name] = true;
  72696. break;
  72697. case "set":
  72698. if (alreadySeenData[name] || alreadySeenSetters[name]) {
  72699. isDuplicate = true;
  72700. }
  72701. alreadySeenSetters[name] = true;
  72702. break;
  72703. default:
  72704. if (alreadySeenData[name] || alreadySeenGetters[name] || alreadySeenSetters[name]) {
  72705. isDuplicate = true;
  72706. }
  72707. alreadySeenData[name] = true;
  72708. }
  72709. if (isDuplicate) {
  72710. prop.computed = true;
  72711. prop.key = stringLiteral(name);
  72712. }
  72713. }
  72714. }
  72715. }
  72716. };
  72717. });
  72718. function getObjRef(node, nodes, scope) {
  72719. var ref;
  72720. if (isIdentifier(node)) {
  72721. if (scope.hasBinding(node.name)) {
  72722. return node;
  72723. } else {
  72724. ref = node;
  72725. }
  72726. } else if (isMemberExpression(node)) {
  72727. ref = node.object;
  72728. if (isSuper(ref) || isIdentifier(ref) && scope.hasBinding(ref.name)) {
  72729. return ref;
  72730. }
  72731. } else {
  72732. throw new Error("We can't explode this node type " + node["type"]);
  72733. }
  72734. var temp = scope.generateUidIdentifierBasedOnNode(ref);
  72735. scope.push({
  72736. id: temp
  72737. });
  72738. nodes.push(assignmentExpression("=", cloneNode(temp), cloneNode(ref)));
  72739. return temp;
  72740. }
  72741. function getPropRef(node, nodes, scope) {
  72742. var prop = node.property;
  72743. if (isPrivateName(prop)) {
  72744. throw new Error("We can't generate property ref for private name, please install `@babel/plugin-proposal-class-properties`");
  72745. }
  72746. var key = toComputedKey$1(node, prop);
  72747. if (isLiteral(key) && isPureish(key)) return key;
  72748. var temp = scope.generateUidIdentifierBasedOnNode(prop);
  72749. scope.push({
  72750. id: temp
  72751. });
  72752. nodes.push(assignmentExpression("=", cloneNode(temp), cloneNode(prop)));
  72753. return temp;
  72754. }
  72755. function explode (node, nodes, file, scope, allowedSingleIdent) {
  72756. var obj;
  72757. if (isIdentifier(node) && allowedSingleIdent) {
  72758. obj = node;
  72759. } else {
  72760. obj = getObjRef(node, nodes, scope);
  72761. }
  72762. var ref, uid;
  72763. if (isIdentifier(node)) {
  72764. ref = cloneNode(node);
  72765. uid = obj;
  72766. } else {
  72767. var prop = getPropRef(node, nodes, scope);
  72768. var computed = node.computed || isLiteral(prop);
  72769. uid = memberExpression(cloneNode(obj), cloneNode(prop), computed);
  72770. ref = memberExpression(cloneNode(obj), cloneNode(prop), computed);
  72771. }
  72772. return {
  72773. uid: uid,
  72774. ref: ref
  72775. };
  72776. }
  72777. function build (opts) {
  72778. var build = opts.build,
  72779. operator = opts.operator;
  72780. return {
  72781. AssignmentExpression: function AssignmentExpression(path) {
  72782. var node = path.node,
  72783. scope = path.scope;
  72784. if (node.operator !== operator + "=") return;
  72785. var nodes = [];
  72786. var exploded = explode(node.left, nodes, this, scope);
  72787. nodes.push(assignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
  72788. path.replaceWith(sequenceExpression(nodes));
  72789. },
  72790. BinaryExpression: function BinaryExpression(path) {
  72791. var node = path.node;
  72792. if (node.operator === operator) {
  72793. path.replaceWith(build(node.left, node.right));
  72794. }
  72795. }
  72796. };
  72797. }
  72798. var transformExponentialOperator = declare(function (api) {
  72799. api.assertVersion(7);
  72800. return {
  72801. name: "transform-exponentiation-operator",
  72802. visitor: build({
  72803. operator: "**",
  72804. build: function build(left, right) {
  72805. return callExpression(memberExpression(identifier("Math"), identifier("pow")), [left, right]);
  72806. }
  72807. })
  72808. };
  72809. });
  72810. var transformFlowComments = declare(function (api) {
  72811. api.assertVersion(7);
  72812. function commentFromString(comment) {
  72813. return typeof comment === "string" ? {
  72814. type: "CommentBlock",
  72815. value: comment
  72816. } : comment;
  72817. }
  72818. function attachComment(_ref) {
  72819. var _toPath;
  72820. var ofPath = _ref.ofPath,
  72821. toPath = _ref.toPath,
  72822. _ref$where = _ref.where,
  72823. where = _ref$where === void 0 ? "trailing" : _ref$where,
  72824. _ref$optional = _ref.optional,
  72825. optional = _ref$optional === void 0 ? false : _ref$optional,
  72826. _ref$comments = _ref.comments,
  72827. comments = _ref$comments === void 0 ? generateComment(ofPath, optional) : _ref$comments,
  72828. _ref$keepType = _ref.keepType,
  72829. keepType = _ref$keepType === void 0 ? false : _ref$keepType;
  72830. if (!((_toPath = toPath) != null && _toPath.node)) {
  72831. toPath = ofPath.getPrevSibling();
  72832. where = "trailing";
  72833. }
  72834. if (!toPath.node) {
  72835. toPath = ofPath.getNextSibling();
  72836. where = "leading";
  72837. }
  72838. if (!toPath.node) {
  72839. toPath = ofPath.parentPath;
  72840. where = "inner";
  72841. }
  72842. if (!Array.isArray(comments)) {
  72843. comments = [comments];
  72844. }
  72845. comments = comments.map(commentFromString);
  72846. if (!keepType && ofPath != null && ofPath.node) {
  72847. var node = ofPath.node;
  72848. var parent = ofPath.parentPath;
  72849. var prev = ofPath.getPrevSibling();
  72850. var next = ofPath.getNextSibling();
  72851. var isSingleChild = !(prev.node || next.node);
  72852. var leading = node.leadingComments;
  72853. var trailing = node.trailingComments;
  72854. if (isSingleChild && leading) {
  72855. parent.addComments("inner", leading);
  72856. }
  72857. toPath.addComments(where, comments);
  72858. ofPath.remove();
  72859. if (isSingleChild && trailing) {
  72860. parent.addComments("inner", trailing);
  72861. }
  72862. } else {
  72863. toPath.addComments(where, comments);
  72864. }
  72865. }
  72866. function wrapInFlowComment(path) {
  72867. attachComment({
  72868. ofPath: path,
  72869. comments: generateComment(path, path.parent.optional)
  72870. });
  72871. }
  72872. function generateComment(path, optional) {
  72873. var comment = path.getSource().replace(/\*-\//g, "*-ESCAPED/").replace(/\*\//g, "*-/");
  72874. if (optional) comment = "?" + comment;
  72875. if (comment[0] !== ":") comment = ":: " + comment;
  72876. return comment;
  72877. }
  72878. function isTypeImport(importKind) {
  72879. return importKind === "type" || importKind === "typeof";
  72880. }
  72881. return {
  72882. name: "transform-flow-comments",
  72883. inherits: syntaxFlow,
  72884. visitor: {
  72885. TypeCastExpression: function TypeCastExpression(path) {
  72886. var node = path.node;
  72887. attachComment({
  72888. ofPath: path.get("typeAnnotation"),
  72889. toPath: path.get("expression"),
  72890. keepType: true
  72891. });
  72892. path.replaceWith(parenthesizedExpression(node.expression));
  72893. },
  72894. Identifier: function Identifier(path) {
  72895. if (path.parentPath.isFlow()) return;
  72896. var node = path.node;
  72897. if (node.typeAnnotation) {
  72898. attachComment({
  72899. ofPath: path.get("typeAnnotation"),
  72900. toPath: path,
  72901. optional: node.optional || node.typeAnnotation.optional
  72902. });
  72903. if (node.optional) {
  72904. node.optional = false;
  72905. }
  72906. } else if (node.optional) {
  72907. attachComment({
  72908. toPath: path,
  72909. comments: ":: ?"
  72910. });
  72911. node.optional = false;
  72912. }
  72913. },
  72914. AssignmentPattern: {
  72915. exit: function exit(_ref2) {
  72916. var node = _ref2.node;
  72917. var left = node.left;
  72918. if (left.optional) {
  72919. left.optional = false;
  72920. }
  72921. }
  72922. },
  72923. Function: function Function(path) {
  72924. if (path.isDeclareFunction()) return;
  72925. var node = path.node;
  72926. if (node.typeParameters) {
  72927. attachComment({
  72928. ofPath: path.get("typeParameters"),
  72929. toPath: path.get("id"),
  72930. optional: node.typeParameters.optional
  72931. });
  72932. }
  72933. if (node.returnType) {
  72934. attachComment({
  72935. ofPath: path.get("returnType"),
  72936. toPath: path.get("body"),
  72937. where: "leading",
  72938. optional: node.returnType.typeAnnotation.optional
  72939. });
  72940. }
  72941. },
  72942. ClassProperty: function ClassProperty(path) {
  72943. var node = path.node;
  72944. if (!node.value) {
  72945. wrapInFlowComment(path);
  72946. } else if (node.typeAnnotation) {
  72947. attachComment({
  72948. ofPath: path.get("typeAnnotation"),
  72949. toPath: path.get("key"),
  72950. optional: node.typeAnnotation.optional
  72951. });
  72952. }
  72953. },
  72954. ExportNamedDeclaration: function ExportNamedDeclaration(path) {
  72955. var node = path.node;
  72956. if (node.exportKind !== "type" && !isFlow(node.declaration)) {
  72957. return;
  72958. }
  72959. wrapInFlowComment(path);
  72960. },
  72961. ImportDeclaration: function ImportDeclaration(path) {
  72962. var node = path.node;
  72963. if (isTypeImport(node.importKind)) {
  72964. wrapInFlowComment(path);
  72965. return;
  72966. }
  72967. var typeSpecifiers = node.specifiers.filter(function (specifier) {
  72968. return isTypeImport(specifier.importKind);
  72969. });
  72970. var nonTypeSpecifiers = node.specifiers.filter(function (specifier) {
  72971. return !isTypeImport(specifier.importKind);
  72972. });
  72973. node.specifiers = nonTypeSpecifiers;
  72974. if (typeSpecifiers.length > 0) {
  72975. var typeImportNode = cloneNode(node);
  72976. typeImportNode.specifiers = typeSpecifiers;
  72977. var comment = ":: " + generate$1(typeImportNode).code;
  72978. if (nonTypeSpecifiers.length > 0) {
  72979. attachComment({
  72980. toPath: path,
  72981. comments: comment
  72982. });
  72983. } else {
  72984. attachComment({
  72985. ofPath: path,
  72986. comments: comment
  72987. });
  72988. }
  72989. }
  72990. },
  72991. ObjectPattern: function ObjectPattern(path) {
  72992. var node = path.node;
  72993. if (node.typeAnnotation) {
  72994. attachComment({
  72995. ofPath: path.get("typeAnnotation"),
  72996. toPath: path,
  72997. optional: node.optional || node.typeAnnotation.optional
  72998. });
  72999. }
  73000. },
  73001. Flow: function Flow(path) {
  73002. wrapInFlowComment(path);
  73003. },
  73004. Class: function Class(path) {
  73005. var node = path.node;
  73006. var comments = [];
  73007. if (node.typeParameters) {
  73008. var typeParameters = path.get("typeParameters");
  73009. comments.push(generateComment(typeParameters, node.typeParameters.optional));
  73010. var trailingComments = node.typeParameters.trailingComments;
  73011. if (trailingComments) {
  73012. var _comments;
  73013. (_comments = comments).push.apply(_comments, _toConsumableArray(trailingComments));
  73014. }
  73015. typeParameters.remove();
  73016. }
  73017. if (node.superClass) {
  73018. if (comments.length > 0) {
  73019. attachComment({
  73020. toPath: path.get("id"),
  73021. comments: comments
  73022. });
  73023. comments = [];
  73024. }
  73025. if (node.superTypeParameters) {
  73026. var superTypeParameters = path.get("superTypeParameters");
  73027. comments.push(generateComment(superTypeParameters, superTypeParameters.node.optional));
  73028. superTypeParameters.remove();
  73029. }
  73030. }
  73031. if (node["implements"]) {
  73032. var impls = path.get("implements");
  73033. var comment = "implements " + impls.map(function (impl) {
  73034. return generateComment(impl).replace(/^:: /, "");
  73035. }).join(", ");
  73036. delete node["implements"];
  73037. if (comments.length === 1) {
  73038. comments[0] += " " + comment;
  73039. } else {
  73040. comments.push(":: " + comment);
  73041. }
  73042. }
  73043. if (comments.length > 0) {
  73044. attachComment({
  73045. toPath: path.get("body"),
  73046. where: "leading",
  73047. comments: comments
  73048. });
  73049. }
  73050. }
  73051. }
  73052. };
  73053. });
  73054. var transformFlowStripTypes = declare(function (api, opts) {
  73055. api.assertVersion(7);
  73056. var FLOW_DIRECTIVE = /(@flow(\s+(strict(-local)?|weak))?|@noflow)/;
  73057. var skipStrip = false;
  73058. var _opts$requireDirectiv = opts.requireDirective,
  73059. requireDirective = _opts$requireDirectiv === void 0 ? false : _opts$requireDirectiv;
  73060. {
  73061. var _opts$allowDeclareFie = opts.allowDeclareFields,
  73062. allowDeclareFields = _opts$allowDeclareFie === void 0 ? false : _opts$allowDeclareFie;
  73063. }
  73064. return {
  73065. name: "transform-flow-strip-types",
  73066. inherits: syntaxFlow,
  73067. visitor: {
  73068. Program: function Program(path, _ref) {
  73069. var comments = _ref.file.ast.comments;
  73070. skipStrip = false;
  73071. var directiveFound = false;
  73072. if (comments) {
  73073. for (var _i = 0, _arr = comments; _i < _arr.length; _i++) {
  73074. var comment = _arr[_i];
  73075. if (FLOW_DIRECTIVE.test(comment.value)) {
  73076. directiveFound = true;
  73077. comment.value = comment.value.replace(FLOW_DIRECTIVE, "");
  73078. if (!comment.value.replace(/\*/g, "").trim()) {
  73079. comment.ignore = true;
  73080. }
  73081. }
  73082. }
  73083. }
  73084. if (!directiveFound && requireDirective) {
  73085. skipStrip = true;
  73086. }
  73087. },
  73088. ImportDeclaration: function ImportDeclaration(path) {
  73089. if (skipStrip) return;
  73090. if (!path.node.specifiers.length) return;
  73091. var typeCount = 0;
  73092. path.node.specifiers.forEach(function (_ref2) {
  73093. var importKind = _ref2.importKind;
  73094. if (importKind === "type" || importKind === "typeof") {
  73095. typeCount++;
  73096. }
  73097. });
  73098. if (typeCount === path.node.specifiers.length) {
  73099. path.remove();
  73100. }
  73101. },
  73102. Flow: function Flow(path) {
  73103. if (skipStrip) {
  73104. throw path.buildCodeFrameError("A @flow directive is required when using Flow annotations with " + "the `requireDirective` option.");
  73105. }
  73106. path.remove();
  73107. },
  73108. ClassPrivateProperty: function ClassPrivateProperty(path) {
  73109. if (skipStrip) return;
  73110. path.node.typeAnnotation = null;
  73111. },
  73112. Class: function Class(path) {
  73113. if (skipStrip) return;
  73114. path.node["implements"] = null;
  73115. path.get("body.body").forEach(function (child) {
  73116. if (child.isClassProperty()) {
  73117. var node = child.node;
  73118. {
  73119. if (!allowDeclareFields && node.declare) {
  73120. throw child.buildCodeFrameError("The 'declare' modifier is only allowed when the " + "'allowDeclareFields' option of " + "@babel/plugin-transform-flow-strip-types or " + "@babel/preset-flow is enabled.");
  73121. }
  73122. }
  73123. if (node.declare) {
  73124. child.remove();
  73125. } else {
  73126. {
  73127. if (!allowDeclareFields && !node.value && !node.decorators) {
  73128. child.remove();
  73129. return;
  73130. }
  73131. }
  73132. node.variance = null;
  73133. node.typeAnnotation = null;
  73134. }
  73135. }
  73136. });
  73137. },
  73138. AssignmentPattern: function AssignmentPattern(_ref3) {
  73139. var node = _ref3.node;
  73140. if (skipStrip) return;
  73141. node.left.optional = false;
  73142. },
  73143. Function: function Function(_ref4) {
  73144. var node = _ref4.node;
  73145. if (skipStrip) return;
  73146. if (node.params.length > 0 && node.params[0].type === "Identifier" && node.params[0].name === "this") {
  73147. node.params.shift();
  73148. }
  73149. for (var i = 0; i < node.params.length; i++) {
  73150. var param = node.params[i];
  73151. param.optional = false;
  73152. if (param.type === "AssignmentPattern") {
  73153. param.left.optional = false;
  73154. }
  73155. }
  73156. node.predicate = null;
  73157. },
  73158. TypeCastExpression: function TypeCastExpression(path) {
  73159. if (skipStrip) return;
  73160. var node = path.node;
  73161. do {
  73162. node = node.expression;
  73163. } while (isTypeCastExpression(node));
  73164. path.replaceWith(node);
  73165. },
  73166. CallExpression: function CallExpression(_ref5) {
  73167. var node = _ref5.node;
  73168. if (skipStrip) return;
  73169. node.typeArguments = null;
  73170. },
  73171. OptionalCallExpression: function OptionalCallExpression(_ref6) {
  73172. var node = _ref6.node;
  73173. if (skipStrip) return;
  73174. node.typeArguments = null;
  73175. },
  73176. NewExpression: function NewExpression(_ref7) {
  73177. var node = _ref7.node;
  73178. if (skipStrip) return;
  73179. node.typeArguments = null;
  73180. }
  73181. }
  73182. };
  73183. });
  73184. function transformWithoutHelper(loose, path, state) {
  73185. var pushComputedProps = loose ? pushComputedPropsLoose : pushComputedPropsSpec;
  73186. var node = path.node;
  73187. var build = pushComputedProps(path, state);
  73188. var declar = build.declar;
  73189. var loop = build.loop;
  73190. var block = loop.body;
  73191. path.ensureBlock();
  73192. if (declar) {
  73193. block.body.push(declar);
  73194. }
  73195. block.body = block.body.concat(node.body.body);
  73196. inherits(loop, node);
  73197. inherits(loop.body, node.body);
  73198. if (build.replaceParent) {
  73199. path.parentPath.replaceWithMultiple(build.node);
  73200. path.remove();
  73201. } else {
  73202. path.replaceWithMultiple(build.node);
  73203. }
  73204. }
  73205. var buildForOfLoose = template$2("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n INTERMEDIATE;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n");
  73206. var buildForOf = template$2("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY;\n !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done);\n ITERATOR_COMPLETION = true\n ) {}\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n");
  73207. function pushComputedPropsLoose(path, file) {
  73208. var node = path.node,
  73209. scope = path.scope,
  73210. parent = path.parent;
  73211. var left = node.left;
  73212. var declar, id, intermediate;
  73213. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  73214. id = left;
  73215. intermediate = null;
  73216. } else if (isVariableDeclaration(left)) {
  73217. id = scope.generateUidIdentifier("ref");
  73218. declar = variableDeclaration(left.kind, [variableDeclarator(left.declarations[0].id, identifier(id.name))]);
  73219. intermediate = variableDeclaration("var", [variableDeclarator(identifier(id.name))]);
  73220. } else {
  73221. throw file.buildCodeFrameError(left, "Unknown node type " + left.type + " in ForStatement");
  73222. }
  73223. var iteratorKey = scope.generateUidIdentifier("iterator");
  73224. var isArrayKey = scope.generateUidIdentifier("isArray");
  73225. var loop = buildForOfLoose({
  73226. LOOP_OBJECT: iteratorKey,
  73227. IS_ARRAY: isArrayKey,
  73228. OBJECT: node.right,
  73229. INDEX: scope.generateUidIdentifier("i"),
  73230. ID: id,
  73231. INTERMEDIATE: intermediate
  73232. });
  73233. var isLabeledParent = isLabeledStatement(parent);
  73234. var labeled;
  73235. if (isLabeledParent) {
  73236. labeled = labeledStatement(parent.label, loop);
  73237. }
  73238. return {
  73239. replaceParent: isLabeledParent,
  73240. declar: declar,
  73241. node: labeled || loop,
  73242. loop: loop
  73243. };
  73244. }
  73245. function pushComputedPropsSpec(path, file) {
  73246. var node = path.node,
  73247. scope = path.scope,
  73248. parent = path.parent;
  73249. var left = node.left;
  73250. var declar;
  73251. var stepKey = scope.generateUid("step");
  73252. var stepValue = memberExpression(identifier(stepKey), identifier("value"));
  73253. if (isIdentifier(left) || isPattern(left) || isMemberExpression(left)) {
  73254. declar = expressionStatement(assignmentExpression("=", left, stepValue));
  73255. } else if (isVariableDeclaration(left)) {
  73256. declar = variableDeclaration(left.kind, [variableDeclarator(left.declarations[0].id, stepValue)]);
  73257. } else {
  73258. throw file.buildCodeFrameError(left, "Unknown node type " + left.type + " in ForStatement");
  73259. }
  73260. var template = buildForOf({
  73261. ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"),
  73262. ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"),
  73263. ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"),
  73264. ITERATOR_KEY: scope.generateUidIdentifier("iterator"),
  73265. STEP_KEY: identifier(stepKey),
  73266. OBJECT: node.right
  73267. });
  73268. var isLabeledParent = isLabeledStatement(parent);
  73269. var tryBody = template[3].block.body;
  73270. var loop = tryBody[0];
  73271. if (isLabeledParent) {
  73272. tryBody[0] = labeledStatement(parent.label, loop);
  73273. }
  73274. return {
  73275. replaceParent: isLabeledParent,
  73276. declar: declar,
  73277. loop: loop,
  73278. node: template
  73279. };
  73280. }
  73281. var _templateObject$9, _templateObject2$5, _templateObject3$4;
  73282. var _transformForOf = declare(function (api, options) {
  73283. var _options$assumeArray, _options$allowArrayLi, _api$assumption;
  73284. api.assertVersion(7);
  73285. {
  73286. var assumeArray = options.assumeArray,
  73287. allowArrayLike = options.allowArrayLike,
  73288. loose = options.loose;
  73289. if (loose === true && assumeArray === true) {
  73290. throw new Error("The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of");
  73291. }
  73292. if (assumeArray === true && allowArrayLike === true) {
  73293. throw new Error("The assumeArray and allowArrayLike options cannot be used together in @babel/plugin-transform-for-of");
  73294. }
  73295. if (allowArrayLike && /^7\.\d\./.test(api.version)) {
  73296. throw new Error("The allowArrayLike is only supported when using @babel/core@^7.10.0");
  73297. }
  73298. }
  73299. var iterableIsArray = (_options$assumeArray = options.assumeArray) != null ? _options$assumeArray : !options.loose && api.assumption("iterableIsArray");
  73300. var arrayLikeIsIterable = (_options$allowArrayLi = options.allowArrayLike) != null ? _options$allowArrayLi : api.assumption("arrayLikeIsIterable");
  73301. var skipteratorClosing = (_api$assumption = api.assumption("skipForOfIteratorClosing")) != null ? _api$assumption : options.loose;
  73302. if (iterableIsArray && arrayLikeIsIterable) {
  73303. throw new Error("The \"iterableIsArray\" and \"arrayLikeIsIterable\" assumptions are not compatible.");
  73304. }
  73305. if (iterableIsArray) {
  73306. return {
  73307. name: "transform-for-of",
  73308. visitor: {
  73309. ForOfStatement: function ForOfStatement(path) {
  73310. var scope = path.scope;
  73311. var _path$node = path.node,
  73312. left = _path$node.left,
  73313. right = _path$node.right,
  73314. isAwait = _path$node["await"];
  73315. if (isAwait) {
  73316. return;
  73317. }
  73318. var i = scope.generateUidIdentifier("i");
  73319. var array = scope.maybeGenerateMemoised(right, true);
  73320. var inits = [variableDeclarator(i, numericLiteral(0))];
  73321. if (array) {
  73322. inits.push(variableDeclarator(array, right));
  73323. } else {
  73324. array = right;
  73325. }
  73326. var item = memberExpression(cloneNode(array), cloneNode(i), true);
  73327. var assignment;
  73328. if (isVariableDeclaration(left)) {
  73329. assignment = left;
  73330. assignment.declarations[0].init = item;
  73331. } else {
  73332. assignment = expressionStatement(assignmentExpression("=", left, item));
  73333. }
  73334. var blockBody;
  73335. var body = path.get("body");
  73336. if (body.isBlockStatement() && Object.keys(path.getBindingIdentifiers()).some(function (id) {
  73337. return body.scope.hasOwnBinding(id);
  73338. })) {
  73339. blockBody = blockStatement([assignment, body.node]);
  73340. } else {
  73341. blockBody = toBlock(body.node);
  73342. blockBody.body.unshift(assignment);
  73343. }
  73344. path.replaceWith(forStatement(variableDeclaration("let", inits), binaryExpression("<", cloneNode(i), memberExpression(cloneNode(array), identifier("length"))), updateExpression("++", cloneNode(i)), blockBody));
  73345. }
  73346. }
  73347. };
  73348. }
  73349. var buildForOfArray = template$2(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;\n "])));
  73350. var buildForOfNoIteratorClosing = template$2.statements(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n for (var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n !(STEP_KEY = ITERATOR_HELPER()).done;) BODY;\n "])));
  73351. var buildForOf = template$2.statements(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n var ITERATOR_HELPER = CREATE_ITERATOR_HELPER(OBJECT, ARRAY_LIKE_IS_ITERABLE), STEP_KEY;\n try {\n for (ITERATOR_HELPER.s(); !(STEP_KEY = ITERATOR_HELPER.n()).done;) BODY;\n } catch (err) {\n ITERATOR_HELPER.e(err);\n } finally {\n ITERATOR_HELPER.f();\n }\n "])));
  73352. var builder = skipteratorClosing ? {
  73353. build: buildForOfNoIteratorClosing,
  73354. helper: "createForOfIteratorHelperLoose",
  73355. getContainer: function getContainer(nodes) {
  73356. return nodes;
  73357. }
  73358. } : {
  73359. build: buildForOf,
  73360. helper: "createForOfIteratorHelper",
  73361. getContainer: function getContainer(nodes) {
  73362. return nodes[1].block.body;
  73363. }
  73364. };
  73365. function _ForOfStatementArray(path) {
  73366. var node = path.node,
  73367. scope = path.scope;
  73368. var right = scope.generateUidIdentifierBasedOnNode(node.right, "arr");
  73369. var iterationKey = scope.generateUidIdentifier("i");
  73370. var loop = buildForOfArray({
  73371. BODY: node.body,
  73372. KEY: iterationKey,
  73373. NAME: right,
  73374. ARR: node.right
  73375. });
  73376. inherits(loop, node);
  73377. ensureBlock$1(loop);
  73378. var iterationValue = memberExpression(cloneNode(right), cloneNode(iterationKey), true);
  73379. var left = node.left;
  73380. if (isVariableDeclaration(left)) {
  73381. left.declarations[0].init = iterationValue;
  73382. loop.body.body.unshift(left);
  73383. } else {
  73384. loop.body.body.unshift(expressionStatement(assignmentExpression("=", left, iterationValue)));
  73385. }
  73386. return loop;
  73387. }
  73388. return {
  73389. name: "transform-for-of",
  73390. visitor: {
  73391. ForOfStatement: function ForOfStatement(path, state) {
  73392. var right = path.get("right");
  73393. if (right.isArrayExpression() || right.isGenericType("Array") || isArrayTypeAnnotation(right.getTypeAnnotation())) {
  73394. path.replaceWith(_ForOfStatementArray(path));
  73395. return;
  73396. }
  73397. if (!state.availableHelper(builder.helper)) {
  73398. transformWithoutHelper(skipteratorClosing, path, state);
  73399. return;
  73400. }
  73401. var node = path.node,
  73402. parent = path.parent,
  73403. scope = path.scope;
  73404. var left = node.left;
  73405. var declar;
  73406. var stepKey = scope.generateUid("step");
  73407. var stepValue = memberExpression(identifier(stepKey), identifier("value"));
  73408. if (isVariableDeclaration(left)) {
  73409. declar = variableDeclaration(left.kind, [variableDeclarator(left.declarations[0].id, stepValue)]);
  73410. } else {
  73411. declar = expressionStatement(assignmentExpression("=", left, stepValue));
  73412. }
  73413. path.ensureBlock();
  73414. node.body.body.unshift(declar);
  73415. var nodes = builder.build({
  73416. CREATE_ITERATOR_HELPER: state.addHelper(builder.helper),
  73417. ITERATOR_HELPER: scope.generateUidIdentifier("iterator"),
  73418. ARRAY_LIKE_IS_ITERABLE: arrayLikeIsIterable ? booleanLiteral(true) : null,
  73419. STEP_KEY: identifier(stepKey),
  73420. OBJECT: node.right,
  73421. BODY: node.body
  73422. });
  73423. var container = builder.getContainer(nodes);
  73424. inherits(container[0], node);
  73425. inherits(container[0].body, node.body);
  73426. if (isLabeledStatement(parent)) {
  73427. container[0] = labeledStatement(parent.label, container[0]);
  73428. path.parentPath.replaceWithMultiple(nodes);
  73429. path.skip();
  73430. } else {
  73431. path.replaceWithMultiple(nodes);
  73432. }
  73433. }
  73434. }
  73435. };
  73436. });
  73437. var _transformFunctionName = declare(function (api) {
  73438. api.assertVersion(7);
  73439. return {
  73440. name: "transform-function-name",
  73441. visitor: {
  73442. FunctionExpression: {
  73443. exit: function exit(path) {
  73444. if (path.key !== "value" && !path.parentPath.isObjectProperty()) {
  73445. var replacement = nameFunction(path);
  73446. if (replacement) path.replaceWith(replacement);
  73447. }
  73448. }
  73449. },
  73450. ObjectProperty: function ObjectProperty(path) {
  73451. var value = path.get("value");
  73452. if (value.isFunction()) {
  73453. var newNode = nameFunction(value);
  73454. if (newNode) value.replaceWith(newNode);
  73455. }
  73456. }
  73457. }
  73458. };
  73459. });
  73460. var transformInstanceof = declare(function (api) {
  73461. api.assertVersion(7);
  73462. return {
  73463. name: "transform-instanceof",
  73464. visitor: {
  73465. BinaryExpression: function BinaryExpression(path) {
  73466. var node = path.node;
  73467. if (node.operator === "instanceof") {
  73468. var helper = this.addHelper("instanceof");
  73469. var isUnderHelper = path.findParent(function (path) {
  73470. return path.isVariableDeclarator() && path.node.id === helper || path.isFunctionDeclaration() && path.node.id && path.node.id.name === helper.name;
  73471. });
  73472. if (isUnderHelper) {
  73473. return;
  73474. } else {
  73475. path.replaceWith(callExpression(helper, [node.left, node.right]));
  73476. }
  73477. }
  73478. }
  73479. }
  73480. };
  73481. });
  73482. var transformJscript = declare(function (api) {
  73483. api.assertVersion(7);
  73484. return {
  73485. name: "transform-jscript",
  73486. visitor: {
  73487. FunctionExpression: {
  73488. exit: function exit(path) {
  73489. var node = path.node;
  73490. if (!node.id) return;
  73491. path.replaceWith(callExpression(functionExpression(null, [], blockStatement([toStatement(node), returnStatement(cloneNode(node.id))])), []));
  73492. }
  73493. }
  73494. }
  73495. };
  73496. });
  73497. var _transformLiterals = declare(function (api) {
  73498. api.assertVersion(7);
  73499. return {
  73500. name: "transform-literals",
  73501. visitor: {
  73502. NumericLiteral: function NumericLiteral(_ref) {
  73503. var node = _ref.node;
  73504. if (node.extra && /^0[ob]/i.test(node.extra.raw)) {
  73505. node.extra = undefined;
  73506. }
  73507. },
  73508. StringLiteral: function StringLiteral(_ref2) {
  73509. var node = _ref2.node;
  73510. if (node.extra && /\\[u]/gi.test(node.extra.raw)) {
  73511. node.extra = undefined;
  73512. }
  73513. }
  73514. }
  73515. };
  73516. });
  73517. var _transformMemberExpressionLiterals = declare(function (api) {
  73518. api.assertVersion(7);
  73519. return {
  73520. name: "transform-member-expression-literals",
  73521. visitor: {
  73522. MemberExpression: {
  73523. exit: function exit(_ref) {
  73524. var node = _ref.node;
  73525. var prop = node.property;
  73526. if (!node.computed && isIdentifier(prop) && !isValidES3Identifier(prop.name)) {
  73527. node.property = stringLiteral(prop.name);
  73528. node.computed = true;
  73529. }
  73530. }
  73531. }
  73532. }
  73533. };
  73534. });
  73535. var _slicedToArray$1 = function () {
  73536. function sliceIterator(arr, i) {
  73537. var _arr = [];
  73538. var _n = true;
  73539. var _d = false;
  73540. var _e = undefined;
  73541. try {
  73542. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  73543. _arr.push(_s.value);
  73544. if (i && _arr.length === i) break;
  73545. }
  73546. } catch (err) {
  73547. _d = true;
  73548. _e = err;
  73549. } finally {
  73550. try {
  73551. if (!_n && _i["return"]) _i["return"]();
  73552. } finally {
  73553. if (_d) throw _e;
  73554. }
  73555. }
  73556. return _arr;
  73557. }
  73558. return function (arr, i) {
  73559. if (Array.isArray(arr)) {
  73560. return arr;
  73561. } else if (Symbol.iterator in Object(arr)) {
  73562. return sliceIterator(arr, i);
  73563. } else {
  73564. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  73565. }
  73566. };
  73567. }();
  73568. var getImportSource_1$1 = getImportSource$4;
  73569. var createDynamicImportTransform_1$1 = createDynamicImportTransform$1;
  73570. function getImportSource$4(t, callNode) {
  73571. var importArguments = callNode.arguments;
  73572. var _importArguments = _slicedToArray$1(importArguments, 1),
  73573. importPath = _importArguments[0];
  73574. var isString = t.isStringLiteral(importPath) || t.isTemplateLiteral(importPath);
  73575. if (isString) {
  73576. t.removeComments(importPath);
  73577. return importPath;
  73578. }
  73579. return t.templateLiteral([t.templateElement({
  73580. raw: '',
  73581. cooked: ''
  73582. }), t.templateElement({
  73583. raw: '',
  73584. cooked: ''
  73585. }, true)], importArguments);
  73586. }
  73587. function createDynamicImportTransform$1(_ref) {
  73588. var template = _ref.template,
  73589. t = _ref.types;
  73590. var builders = {
  73591. 'static': {
  73592. interop: template('Promise.resolve().then(() => INTEROP(require(SOURCE)))'),
  73593. noInterop: template('Promise.resolve().then(() => require(SOURCE))')
  73594. },
  73595. dynamic: {
  73596. interop: template('Promise.resolve(SOURCE).then(s => INTEROP(require(s)))'),
  73597. noInterop: template('Promise.resolve(SOURCE).then(s => require(s))')
  73598. }
  73599. };
  73600. var visited = typeof WeakSet === 'function' && new WeakSet();
  73601. var isString = function isString(node) {
  73602. return t.isStringLiteral(node) || t.isTemplateLiteral(node) && node.expressions.length === 0;
  73603. };
  73604. return function (context, path) {
  73605. if (visited) {
  73606. if (visited.has(path)) {
  73607. return;
  73608. }
  73609. visited.add(path);
  73610. }
  73611. var SOURCE = getImportSource$4(t, path.parent);
  73612. var builder = isString(SOURCE) ? builders['static'] : builders.dynamic;
  73613. var newImport = context.opts.noInterop ? builder.noInterop({
  73614. SOURCE: SOURCE
  73615. }) : builder.interop({
  73616. SOURCE: SOURCE,
  73617. INTEROP: context.addHelper('interopRequireWildcard')
  73618. });
  73619. path.parentPath.replaceWith(newImport);
  73620. };
  73621. }
  73622. var utils$3 = Object.defineProperty({
  73623. getImportSource: getImportSource_1$1,
  73624. createDynamicImportTransform: createDynamicImportTransform_1$1
  73625. }, '__esModule', {
  73626. value: true
  73627. });
  73628. var utils$2 = utils$3;
  73629. var _templateObject$8;
  73630. var buildWrapper$1 = template$2("\n define(MODULE_NAME, AMD_ARGUMENTS, function(IMPORT_NAMES) {\n })\n");
  73631. var buildAnonymousWrapper = template$2("\n define([\"require\"], function(REQUIRE) {\n })\n");
  73632. function injectWrapper(path, wrapper) {
  73633. var _path$node = path.node,
  73634. body = _path$node.body,
  73635. directives = _path$node.directives;
  73636. path.node.directives = [];
  73637. path.node.body = [];
  73638. var amdWrapper = path.pushContainer("body", wrapper)[0];
  73639. var amdFactory = amdWrapper.get("expression.arguments").filter(function (arg) {
  73640. return arg.isFunctionExpression();
  73641. })[0].get("body");
  73642. amdFactory.pushContainer("directives", directives);
  73643. amdFactory.pushContainer("body", body);
  73644. }
  73645. var _transformModulesAmd = declare(function (api, options) {
  73646. var _api$assumption, _api$assumption2;
  73647. api.assertVersion(7);
  73648. var allowTopLevelThis = options.allowTopLevelThis,
  73649. strict = options.strict,
  73650. strictMode = options.strictMode,
  73651. importInterop = options.importInterop,
  73652. noInterop = options.noInterop;
  73653. var constantReexports = (_api$assumption = api.assumption("constantReexports")) != null ? _api$assumption : options.loose;
  73654. var enumerableModuleMeta = (_api$assumption2 = api.assumption("enumerableModuleMeta")) != null ? _api$assumption2 : options.loose;
  73655. return {
  73656. name: "transform-modules-amd",
  73657. pre: function pre() {
  73658. this.file.set("@babel/plugin-transform-modules-*", "amd");
  73659. },
  73660. visitor: {
  73661. CallExpression: function CallExpression(path, state) {
  73662. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) return;
  73663. if (!path.get("callee").isImport()) return;
  73664. var requireId = state.requireId,
  73665. resolveId = state.resolveId,
  73666. rejectId = state.rejectId;
  73667. if (!requireId) {
  73668. requireId = path.scope.generateUidIdentifier("require");
  73669. state.requireId = requireId;
  73670. }
  73671. if (!resolveId || !rejectId) {
  73672. resolveId = path.scope.generateUidIdentifier("resolve");
  73673. rejectId = path.scope.generateUidIdentifier("reject");
  73674. state.resolveId = resolveId;
  73675. state.rejectId = rejectId;
  73676. }
  73677. var result = identifier("imported");
  73678. if (!noInterop) result = wrapInterop(path, result, "namespace");
  73679. path.replaceWith(template$2.expression.ast(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n new Promise((", ", ", ") =>\n ", "(\n [", "],\n imported => ", "(", "),\n ", "\n )\n )"])), resolveId, rejectId, requireId, utils$2.getImportSource(t$p, path.node), cloneNode(resolveId), result, cloneNode(rejectId)));
  73680. },
  73681. Program: {
  73682. exit: function exit(path, _ref) {
  73683. var requireId = _ref.requireId;
  73684. if (!isModule(path)) {
  73685. if (requireId) {
  73686. injectWrapper(path, buildAnonymousWrapper({
  73687. REQUIRE: cloneNode(requireId)
  73688. }));
  73689. }
  73690. return;
  73691. }
  73692. var amdArgs = [];
  73693. var importNames = [];
  73694. if (requireId) {
  73695. amdArgs.push(stringLiteral("require"));
  73696. importNames.push(cloneNode(requireId));
  73697. }
  73698. var moduleName = getModuleName(this.file.opts, options);
  73699. if (moduleName) moduleName = stringLiteral(moduleName);
  73700. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  73701. enumerableModuleMeta: enumerableModuleMeta,
  73702. constantReexports: constantReexports,
  73703. strict: strict,
  73704. strictMode: strictMode,
  73705. allowTopLevelThis: allowTopLevelThis,
  73706. importInterop: importInterop,
  73707. noInterop: noInterop
  73708. }),
  73709. meta = _rewriteModuleStateme.meta,
  73710. headers = _rewriteModuleStateme.headers;
  73711. if (hasExports(meta)) {
  73712. amdArgs.push(stringLiteral("exports"));
  73713. importNames.push(identifier(meta.exportName));
  73714. }
  73715. for (var _iterator = _createForOfIteratorHelperLoose(meta.source), _step; !(_step = _iterator()).done;) {
  73716. var _step$value = _slicedToArray$2(_step.value, 2),
  73717. source = _step$value[0],
  73718. metadata = _step$value[1];
  73719. amdArgs.push(stringLiteral(source));
  73720. importNames.push(identifier(metadata.name));
  73721. if (!isSideEffectImport(metadata)) {
  73722. var interop = wrapInterop(path, identifier(metadata.name), metadata.interop);
  73723. if (interop) {
  73724. var header = expressionStatement(assignmentExpression("=", identifier(metadata.name), interop));
  73725. header.loc = metadata.loc;
  73726. headers.push(header);
  73727. }
  73728. }
  73729. headers.push.apply(headers, _toConsumableArray(buildNamespaceInitStatements(meta, metadata, constantReexports)));
  73730. }
  73731. ensureStatementsHoisted(headers);
  73732. path.unshiftContainer("body", headers);
  73733. injectWrapper(path, buildWrapper$1({
  73734. MODULE_NAME: moduleName,
  73735. AMD_ARGUMENTS: arrayExpression(amdArgs),
  73736. IMPORT_NAMES: importNames
  73737. }));
  73738. }
  73739. }
  73740. }
  73741. };
  73742. });
  73743. var _slicedToArray = function () {
  73744. function sliceIterator(arr, i) {
  73745. var _arr = [];
  73746. var _n = true;
  73747. var _d = false;
  73748. var _e = undefined;
  73749. try {
  73750. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  73751. _arr.push(_s.value);
  73752. if (i && _arr.length === i) break;
  73753. }
  73754. } catch (err) {
  73755. _d = true;
  73756. _e = err;
  73757. } finally {
  73758. try {
  73759. if (!_n && _i["return"]) _i["return"]();
  73760. } finally {
  73761. if (_d) throw _e;
  73762. }
  73763. }
  73764. return _arr;
  73765. }
  73766. return function (arr, i) {
  73767. if (Array.isArray(arr)) {
  73768. return arr;
  73769. } else if (Symbol.iterator in Object(arr)) {
  73770. return sliceIterator(arr, i);
  73771. } else {
  73772. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  73773. }
  73774. };
  73775. }();
  73776. var getImportSource_1 = getImportSource$3;
  73777. var createDynamicImportTransform_1 = createDynamicImportTransform;
  73778. function getImportSource$3(t, callNode) {
  73779. var importArguments = callNode.arguments;
  73780. var _importArguments = _slicedToArray(importArguments, 1),
  73781. importPath = _importArguments[0];
  73782. var isString = t.isStringLiteral(importPath) || t.isTemplateLiteral(importPath);
  73783. if (isString) {
  73784. t.removeComments(importPath);
  73785. return importPath;
  73786. }
  73787. return t.templateLiteral([t.templateElement({
  73788. raw: '',
  73789. cooked: ''
  73790. }), t.templateElement({
  73791. raw: '',
  73792. cooked: ''
  73793. }, true)], importArguments);
  73794. }
  73795. function createDynamicImportTransform(_ref) {
  73796. var template = _ref.template,
  73797. t = _ref.types;
  73798. var builders = {
  73799. 'static': {
  73800. interop: template('Promise.resolve().then(() => INTEROP(require(SOURCE)))'),
  73801. noInterop: template('Promise.resolve().then(() => require(SOURCE))')
  73802. },
  73803. dynamic: {
  73804. interop: template('Promise.resolve(SOURCE).then(s => INTEROP(require(s)))'),
  73805. noInterop: template('Promise.resolve(SOURCE).then(s => require(s))')
  73806. }
  73807. };
  73808. var visited = typeof WeakSet === 'function' && new WeakSet();
  73809. var isString = function isString(node) {
  73810. return t.isStringLiteral(node) || t.isTemplateLiteral(node) && node.expressions.length === 0;
  73811. };
  73812. return function (context, path) {
  73813. if (visited) {
  73814. if (visited.has(path)) {
  73815. return;
  73816. }
  73817. visited.add(path);
  73818. }
  73819. var SOURCE = getImportSource$3(t, path.parent);
  73820. var builder = isString(SOURCE) ? builders['static'] : builders.dynamic;
  73821. var newImport = context.opts.noInterop ? builder.noInterop({
  73822. SOURCE: SOURCE
  73823. }) : builder.interop({
  73824. SOURCE: SOURCE,
  73825. INTEROP: context.addHelper('interopRequireWildcard')
  73826. });
  73827. path.parentPath.replaceWith(newImport);
  73828. };
  73829. }
  73830. var utils$1 = Object.defineProperty({
  73831. getImportSource: getImportSource_1,
  73832. createDynamicImportTransform: createDynamicImportTransform_1
  73833. }, '__esModule', {
  73834. value: true
  73835. });
  73836. var utils = utils$1;
  73837. var _templateObject$7, _templateObject2$4, _templateObject3$3;
  73838. var _transformModulesCommonjs = declare(function (api, options) {
  73839. var _api$assumption, _api$assumption2;
  73840. api.assertVersion(7);
  73841. var transformImportCall = utils.createDynamicImportTransform(api);
  73842. var _options$strictNamesp = options.strictNamespace,
  73843. strictNamespace = _options$strictNamesp === void 0 ? false : _options$strictNamesp,
  73844. _options$mjsStrictNam = options.mjsStrictNamespace,
  73845. mjsStrictNamespace = _options$mjsStrictNam === void 0 ? true : _options$mjsStrictNam,
  73846. allowTopLevelThis = options.allowTopLevelThis,
  73847. strict = options.strict,
  73848. strictMode = options.strictMode,
  73849. noInterop = options.noInterop,
  73850. importInterop = options.importInterop,
  73851. _options$lazy = options.lazy,
  73852. lazy = _options$lazy === void 0 ? false : _options$lazy,
  73853. _options$allowCommonJ = options.allowCommonJSExports,
  73854. allowCommonJSExports = _options$allowCommonJ === void 0 ? true : _options$allowCommonJ;
  73855. var constantReexports = (_api$assumption = api.assumption("constantReexports")) != null ? _api$assumption : options.loose;
  73856. var enumerableModuleMeta = (_api$assumption2 = api.assumption("enumerableModuleMeta")) != null ? _api$assumption2 : options.loose;
  73857. if (typeof lazy !== "boolean" && typeof lazy !== "function" && (!Array.isArray(lazy) || !lazy.every(function (item) {
  73858. return typeof item === "string";
  73859. }))) {
  73860. throw new Error(".lazy must be a boolean, array of strings, or a function");
  73861. }
  73862. if (typeof strictNamespace !== "boolean") {
  73863. throw new Error(".strictNamespace must be a boolean, or undefined");
  73864. }
  73865. if (typeof mjsStrictNamespace !== "boolean") {
  73866. throw new Error(".mjsStrictNamespace must be a boolean, or undefined");
  73867. }
  73868. var getAssertion = function getAssertion(localName) {
  73869. return template$2.expression.ast(_templateObject$7 || (_templateObject$7 = _taggedTemplateLiteralLoose(["\n (function(){\n throw new Error(\n \"The CommonJS '\" + \"", "\" + \"' variable is not available in ES6 modules.\" +\n \"Consider setting setting sourceType:script or sourceType:unambiguous in your \" +\n \"Babel config for this file.\");\n })()\n "])), localName);
  73870. };
  73871. var moduleExportsVisitor = {
  73872. ReferencedIdentifier: function ReferencedIdentifier(path) {
  73873. var localName = path.node.name;
  73874. if (localName !== "module" && localName !== "exports") return;
  73875. var localBinding = path.scope.getBinding(localName);
  73876. var rootBinding = this.scope.getBinding(localName);
  73877. if (rootBinding !== localBinding || path.parentPath.isObjectProperty({
  73878. value: path.node
  73879. }) && path.parentPath.parentPath.isObjectPattern() || path.parentPath.isAssignmentExpression({
  73880. left: path.node
  73881. }) || path.isAssignmentExpression({
  73882. left: path.node
  73883. })) {
  73884. return;
  73885. }
  73886. path.replaceWith(getAssertion(localName));
  73887. },
  73888. AssignmentExpression: function AssignmentExpression(path) {
  73889. var _this = this;
  73890. var left = path.get("left");
  73891. if (left.isIdentifier()) {
  73892. var localName = path.node.name;
  73893. if (localName !== "module" && localName !== "exports") return;
  73894. var localBinding = path.scope.getBinding(localName);
  73895. var rootBinding = this.scope.getBinding(localName);
  73896. if (rootBinding !== localBinding) return;
  73897. var right = path.get("right");
  73898. right.replaceWith(sequenceExpression([right.node, getAssertion(localName)]));
  73899. } else if (left.isPattern()) {
  73900. var ids = left.getOuterBindingIdentifiers();
  73901. var _localName = Object.keys(ids).filter(function (localName) {
  73902. if (localName !== "module" && localName !== "exports") return false;
  73903. return _this.scope.getBinding(localName) === path.scope.getBinding(localName);
  73904. })[0];
  73905. if (_localName) {
  73906. var _right = path.get("right");
  73907. _right.replaceWith(sequenceExpression([_right.node, getAssertion(_localName)]));
  73908. }
  73909. }
  73910. }
  73911. };
  73912. return {
  73913. name: "transform-modules-commonjs",
  73914. pre: function pre() {
  73915. this.file.set("@babel/plugin-transform-modules-*", "commonjs");
  73916. },
  73917. visitor: {
  73918. CallExpression: function CallExpression(path) {
  73919. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) return;
  73920. if (!path.get("callee").isImport()) return;
  73921. var scope = path.scope;
  73922. do {
  73923. scope.rename("require");
  73924. } while (scope = scope.parent);
  73925. transformImportCall(this, path.get("callee"));
  73926. },
  73927. Program: {
  73928. exit: function exit(path, state) {
  73929. if (!isModule(path)) return;
  73930. path.scope.rename("exports");
  73931. path.scope.rename("module");
  73932. path.scope.rename("require");
  73933. path.scope.rename("__filename");
  73934. path.scope.rename("__dirname");
  73935. if (!allowCommonJSExports) {
  73936. simplifyAccess(path, new Set(["module", "exports"]));
  73937. path.traverse(moduleExportsVisitor, {
  73938. scope: path.scope
  73939. });
  73940. }
  73941. var moduleName = getModuleName(this.file.opts, options);
  73942. if (moduleName) moduleName = stringLiteral(moduleName);
  73943. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  73944. exportName: "exports",
  73945. constantReexports: constantReexports,
  73946. enumerableModuleMeta: enumerableModuleMeta,
  73947. strict: strict,
  73948. strictMode: strictMode,
  73949. allowTopLevelThis: allowTopLevelThis,
  73950. noInterop: noInterop,
  73951. importInterop: importInterop,
  73952. lazy: lazy,
  73953. esNamespaceOnly: typeof state.filename === "string" && /\.mjs$/.test(state.filename) ? mjsStrictNamespace : strictNamespace
  73954. }),
  73955. meta = _rewriteModuleStateme.meta,
  73956. headers = _rewriteModuleStateme.headers;
  73957. for (var _iterator = _createForOfIteratorHelperLoose(meta.source), _step; !(_step = _iterator()).done;) {
  73958. var _step$value = _slicedToArray$2(_step.value, 2),
  73959. source = _step$value[0],
  73960. metadata = _step$value[1];
  73961. var loadExpr = callExpression(identifier("require"), [stringLiteral(source)]);
  73962. var header = void 0;
  73963. if (isSideEffectImport(metadata)) {
  73964. if (metadata.lazy) throw new Error("Assertion failure");
  73965. header = expressionStatement(loadExpr);
  73966. } else {
  73967. var init = wrapInterop(path, loadExpr, metadata.interop) || loadExpr;
  73968. if (metadata.lazy) {
  73969. header = template$2.ast(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n function ", "() {\n const data = ", ";\n ", " = function(){ return data; };\n return data;\n }\n "])), metadata.name, init, metadata.name);
  73970. } else {
  73971. header = template$2.ast(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n var ", " = ", ";\n "])), metadata.name, init);
  73972. }
  73973. }
  73974. header.loc = metadata.loc;
  73975. headers.push(header);
  73976. headers.push.apply(headers, _toConsumableArray(buildNamespaceInitStatements(meta, metadata, constantReexports)));
  73977. }
  73978. ensureStatementsHoisted(headers);
  73979. path.unshiftContainer("body", headers);
  73980. }
  73981. }
  73982. }
  73983. };
  73984. });
  73985. var buildTemplate = template$2("\n SYSTEM_REGISTER(MODULE_NAME, SOURCES, function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n \"use strict\";\n BEFORE_BODY;\n return {\n setters: SETTERS,\n execute: EXECUTE,\n };\n });\n");
  73986. var buildExportAll = template$2("\n for (var KEY in TARGET) {\n if (KEY !== \"default\" && KEY !== \"__esModule\") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n");
  73987. var MISSING_PLUGIN_WARNING = "WARNING: Dynamic import() transformation must be enabled using the\n @babel/plugin-proposal-dynamic-import plugin. Babel 8 will\n no longer transform import() without using that plugin.\n";
  73988. function getExportSpecifierName(node, stringSpecifiers) {
  73989. if (node.type === "Identifier") {
  73990. return node.name;
  73991. } else if (node.type === "StringLiteral") {
  73992. var stringValue = node.value;
  73993. if (!isIdentifierName(stringValue)) {
  73994. stringSpecifiers.add(stringValue);
  73995. }
  73996. return stringValue;
  73997. } else {
  73998. throw new Error("Expected export specifier to be either Identifier or StringLiteral, got " + node.type);
  73999. }
  74000. }
  74001. function constructExportCall(path, exportIdent, exportNames, exportValues, exportStarTarget, stringSpecifiers) {
  74002. var statements = [];
  74003. if (!exportStarTarget) {
  74004. if (exportNames.length === 1) {
  74005. statements.push(expressionStatement(callExpression(exportIdent, [stringLiteral(exportNames[0]), exportValues[0]])));
  74006. } else {
  74007. var objectProperties = [];
  74008. for (var i = 0; i < exportNames.length; i++) {
  74009. var exportName = exportNames[i];
  74010. var exportValue = exportValues[i];
  74011. objectProperties.push(objectProperty(stringSpecifiers.has(exportName) ? stringLiteral(exportName) : identifier(exportName), exportValue));
  74012. }
  74013. statements.push(expressionStatement(callExpression(exportIdent, [objectExpression(objectProperties)])));
  74014. }
  74015. } else {
  74016. var exportObj = path.scope.generateUid("exportObj");
  74017. statements.push(variableDeclaration("var", [variableDeclarator(identifier(exportObj), objectExpression([]))]));
  74018. statements.push(buildExportAll({
  74019. KEY: path.scope.generateUidIdentifier("key"),
  74020. EXPORT_OBJ: identifier(exportObj),
  74021. TARGET: exportStarTarget
  74022. }));
  74023. for (var _i = 0; _i < exportNames.length; _i++) {
  74024. var _exportName = exportNames[_i];
  74025. var _exportValue = exportValues[_i];
  74026. statements.push(expressionStatement(assignmentExpression("=", memberExpression(identifier(exportObj), identifier(_exportName)), _exportValue)));
  74027. }
  74028. statements.push(expressionStatement(callExpression(exportIdent, [identifier(exportObj)])));
  74029. }
  74030. return statements;
  74031. }
  74032. var _transformModulesSystemjs = declare(function (api, options) {
  74033. api.assertVersion(7);
  74034. var _options$systemGlobal = options.systemGlobal,
  74035. systemGlobal = _options$systemGlobal === void 0 ? "System" : _options$systemGlobal,
  74036. _options$allowTopLeve = options.allowTopLevelThis,
  74037. allowTopLevelThis = _options$allowTopLeve === void 0 ? false : _options$allowTopLeve;
  74038. var IGNORE_REASSIGNMENT_SYMBOL = Symbol();
  74039. var reassignmentVisitor = {
  74040. "AssignmentExpression|UpdateExpression": function AssignmentExpressionUpdateExpression(path) {
  74041. if (path.node[IGNORE_REASSIGNMENT_SYMBOL]) return;
  74042. path.node[IGNORE_REASSIGNMENT_SYMBOL] = true;
  74043. var arg = path.get(path.isAssignmentExpression() ? "left" : "argument");
  74044. if (arg.isObjectPattern() || arg.isArrayPattern()) {
  74045. var exprs = [path.node];
  74046. for (var _i2 = 0, _Object$keys = Object.keys(arg.getBindingIdentifiers()); _i2 < _Object$keys.length; _i2++) {
  74047. var _name = _Object$keys[_i2];
  74048. if (this.scope.getBinding(_name) !== path.scope.getBinding(_name)) {
  74049. return;
  74050. }
  74051. var _exportedNames = this.exports[_name];
  74052. if (!_exportedNames) return;
  74053. for (var _iterator = _createForOfIteratorHelperLoose(_exportedNames), _step; !(_step = _iterator()).done;) {
  74054. var exportedName = _step.value;
  74055. exprs.push(this.buildCall(exportedName, identifier(_name)).expression);
  74056. }
  74057. }
  74058. path.replaceWith(sequenceExpression(exprs));
  74059. return;
  74060. }
  74061. if (!arg.isIdentifier()) return;
  74062. var name = arg.node.name;
  74063. if (this.scope.getBinding(name) !== path.scope.getBinding(name)) return;
  74064. var exportedNames = this.exports[name];
  74065. if (!exportedNames) return;
  74066. var node = path.node;
  74067. var isPostUpdateExpression = path.isUpdateExpression({
  74068. prefix: false
  74069. });
  74070. if (isPostUpdateExpression) {
  74071. node = binaryExpression(node.operator[0], unaryExpression("+", cloneNode(node.argument)), numericLiteral(1));
  74072. }
  74073. for (var _iterator2 = _createForOfIteratorHelperLoose(exportedNames), _step2; !(_step2 = _iterator2()).done;) {
  74074. var _exportedName = _step2.value;
  74075. node = this.buildCall(_exportedName, node).expression;
  74076. }
  74077. if (isPostUpdateExpression) {
  74078. node = sequenceExpression([node, path.node]);
  74079. }
  74080. path.replaceWith(node);
  74081. }
  74082. };
  74083. return {
  74084. name: "transform-modules-systemjs",
  74085. pre: function pre() {
  74086. this.file.set("@babel/plugin-transform-modules-*", "systemjs");
  74087. },
  74088. visitor: {
  74089. CallExpression: function CallExpression(path, state) {
  74090. if (isImport(path.node.callee)) {
  74091. if (!this.file.has("@babel/plugin-proposal-dynamic-import")) {
  74092. {
  74093. console.warn(MISSING_PLUGIN_WARNING);
  74094. }
  74095. }
  74096. path.replaceWith(callExpression(memberExpression(identifier(state.contextIdent), identifier("import")), [utils$2.getImportSource(t$p, path.node)]));
  74097. }
  74098. },
  74099. MetaProperty: function MetaProperty(path, state) {
  74100. if (path.node.meta.name === "import" && path.node.property.name === "meta") {
  74101. path.replaceWith(memberExpression(identifier(state.contextIdent), identifier("meta")));
  74102. }
  74103. },
  74104. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  74105. if (path.node.name === "__moduleName" && !path.scope.hasBinding("__moduleName")) {
  74106. path.replaceWith(memberExpression(identifier(state.contextIdent), identifier("id")));
  74107. }
  74108. },
  74109. Program: {
  74110. enter: function enter(path, state) {
  74111. state.contextIdent = path.scope.generateUid("context");
  74112. state.stringSpecifiers = new Set();
  74113. if (!allowTopLevelThis) {
  74114. rewriteThis(path);
  74115. }
  74116. },
  74117. exit: function exit(path, state) {
  74118. var scope = path.scope;
  74119. var exportIdent = scope.generateUid("export");
  74120. var contextIdent = state.contextIdent,
  74121. stringSpecifiers = state.stringSpecifiers;
  74122. var exportMap = Object.create(null);
  74123. var modules = [];
  74124. var beforeBody = [];
  74125. var setters = [];
  74126. var sources = [];
  74127. var variableIds = [];
  74128. var removedPaths = [];
  74129. function addExportName(key, val) {
  74130. exportMap[key] = exportMap[key] || [];
  74131. exportMap[key].push(val);
  74132. }
  74133. function pushModule(source, key, specifiers) {
  74134. var module;
  74135. modules.forEach(function (m) {
  74136. if (m.key === source) {
  74137. module = m;
  74138. }
  74139. });
  74140. if (!module) {
  74141. modules.push(module = {
  74142. key: source,
  74143. imports: [],
  74144. exports: []
  74145. });
  74146. }
  74147. module[key] = module[key].concat(specifiers);
  74148. }
  74149. function buildExportCall(name, val) {
  74150. return expressionStatement(callExpression(identifier(exportIdent), [stringLiteral(name), val]));
  74151. }
  74152. var exportNames = [];
  74153. var exportValues = [];
  74154. var body = path.get("body");
  74155. for (var _iterator3 = _createForOfIteratorHelperLoose(body), _step3; !(_step3 = _iterator3()).done;) {
  74156. var _path2 = _step3.value;
  74157. if (_path2.isFunctionDeclaration()) {
  74158. beforeBody.push(_path2.node);
  74159. removedPaths.push(_path2);
  74160. } else if (_path2.isClassDeclaration()) {
  74161. variableIds.push(cloneNode(_path2.node.id));
  74162. _path2.replaceWith(expressionStatement(assignmentExpression("=", cloneNode(_path2.node.id), toExpression(_path2.node))));
  74163. } else if (_path2.isImportDeclaration()) {
  74164. var source = _path2.node.source.value;
  74165. pushModule(source, "imports", _path2.node.specifiers);
  74166. for (var _i4 = 0, _Object$keys2 = Object.keys(_path2.getBindingIdentifiers()); _i4 < _Object$keys2.length; _i4++) {
  74167. var name = _Object$keys2[_i4];
  74168. scope.removeBinding(name);
  74169. variableIds.push(identifier(name));
  74170. }
  74171. _path2.remove();
  74172. } else if (_path2.isExportAllDeclaration()) {
  74173. pushModule(_path2.node.source.value, "exports", _path2.node);
  74174. _path2.remove();
  74175. } else if (_path2.isExportDefaultDeclaration()) {
  74176. var declar = _path2.get("declaration");
  74177. var id = declar.node.id;
  74178. if (declar.isClassDeclaration()) {
  74179. if (id) {
  74180. exportNames.push("default");
  74181. exportValues.push(scope.buildUndefinedNode());
  74182. variableIds.push(cloneNode(id));
  74183. addExportName(id.name, "default");
  74184. _path2.replaceWith(expressionStatement(assignmentExpression("=", cloneNode(id), toExpression(declar.node))));
  74185. } else {
  74186. exportNames.push("default");
  74187. exportValues.push(toExpression(declar.node));
  74188. removedPaths.push(_path2);
  74189. }
  74190. } else if (declar.isFunctionDeclaration()) {
  74191. if (id) {
  74192. beforeBody.push(declar.node);
  74193. exportNames.push("default");
  74194. exportValues.push(cloneNode(id));
  74195. addExportName(id.name, "default");
  74196. } else {
  74197. exportNames.push("default");
  74198. exportValues.push(toExpression(declar.node));
  74199. }
  74200. removedPaths.push(_path2);
  74201. } else {
  74202. _path2.replaceWith(buildExportCall("default", declar.node));
  74203. }
  74204. } else if (_path2.isExportNamedDeclaration()) {
  74205. var _declar = _path2.get("declaration");
  74206. if (_declar.node) {
  74207. _path2.replaceWith(_declar);
  74208. if (_path2.isFunction()) {
  74209. var node = _declar.node;
  74210. var _name2 = node.id.name;
  74211. addExportName(_name2, _name2);
  74212. beforeBody.push(node);
  74213. exportNames.push(_name2);
  74214. exportValues.push(cloneNode(node.id));
  74215. removedPaths.push(_path2);
  74216. } else if (_path2.isClass()) {
  74217. var _name3 = _declar.node.id.name;
  74218. exportNames.push(_name3);
  74219. exportValues.push(scope.buildUndefinedNode());
  74220. variableIds.push(cloneNode(_declar.node.id));
  74221. _path2.replaceWith(expressionStatement(assignmentExpression("=", cloneNode(_declar.node.id), toExpression(_declar.node))));
  74222. addExportName(_name3, _name3);
  74223. } else {
  74224. for (var _i5 = 0, _Object$keys3 = Object.keys(_declar.getBindingIdentifiers()); _i5 < _Object$keys3.length; _i5++) {
  74225. var _name4 = _Object$keys3[_i5];
  74226. addExportName(_name4, _name4);
  74227. }
  74228. }
  74229. } else {
  74230. var specifiers = _path2.node.specifiers;
  74231. if (specifiers != null && specifiers.length) {
  74232. if (_path2.node.source) {
  74233. pushModule(_path2.node.source.value, "exports", specifiers);
  74234. _path2.remove();
  74235. } else {
  74236. var nodes = [];
  74237. for (var _iterator7 = _createForOfIteratorHelperLoose(specifiers), _step7; !(_step7 = _iterator7()).done;) {
  74238. var specifier = _step7.value;
  74239. var local = specifier.local,
  74240. exported = specifier.exported;
  74241. var binding = scope.getBinding(local.name);
  74242. var exportedName = getExportSpecifierName(exported, stringSpecifiers);
  74243. if (binding && isFunctionDeclaration(binding.path.node)) {
  74244. exportNames.push(exportedName);
  74245. exportValues.push(cloneNode(local));
  74246. } else if (!binding) {
  74247. nodes.push(buildExportCall(exportedName, local));
  74248. }
  74249. addExportName(local.name, exportedName);
  74250. }
  74251. _path2.replaceWithMultiple(nodes);
  74252. }
  74253. } else {
  74254. _path2.remove();
  74255. }
  74256. }
  74257. }
  74258. }
  74259. modules.forEach(function (specifiers) {
  74260. var setterBody = [];
  74261. var target = scope.generateUid(specifiers.key);
  74262. for (var _iterator4 = _createForOfIteratorHelperLoose(specifiers.imports), _step4; !(_step4 = _iterator4()).done;) {
  74263. var specifier = _step4.value;
  74264. if (isImportNamespaceSpecifier(specifier)) {
  74265. setterBody.push(expressionStatement(assignmentExpression("=", specifier.local, identifier(target))));
  74266. } else if (isImportDefaultSpecifier(specifier)) {
  74267. specifier = importSpecifier(specifier.local, identifier("default"));
  74268. }
  74269. if (isImportSpecifier(specifier)) {
  74270. var _specifier = specifier,
  74271. imported = _specifier.imported;
  74272. setterBody.push(expressionStatement(assignmentExpression("=", specifier.local, memberExpression(identifier(target), specifier.imported, imported.type === "StringLiteral"))));
  74273. }
  74274. }
  74275. if (specifiers.exports.length) {
  74276. var _exportNames = [];
  74277. var _exportValues = [];
  74278. var hasExportStar = false;
  74279. for (var _iterator5 = _createForOfIteratorHelperLoose(specifiers.exports), _step5; !(_step5 = _iterator5()).done;) {
  74280. var node = _step5.value;
  74281. if (isExportAllDeclaration(node)) {
  74282. hasExportStar = true;
  74283. } else if (isExportSpecifier(node)) {
  74284. var exportedName = getExportSpecifierName(node.exported, stringSpecifiers);
  74285. _exportNames.push(exportedName);
  74286. _exportValues.push(memberExpression(identifier(target), node.local, isStringLiteral(node.local)));
  74287. } else ;
  74288. }
  74289. setterBody = setterBody.concat(constructExportCall(path, identifier(exportIdent), _exportNames, _exportValues, hasExportStar ? identifier(target) : null, stringSpecifiers));
  74290. }
  74291. sources.push(stringLiteral(specifiers.key));
  74292. setters.push(functionExpression(null, [identifier(target)], blockStatement(setterBody)));
  74293. });
  74294. var moduleName = getModuleName(this.file.opts, options);
  74295. if (moduleName) moduleName = stringLiteral(moduleName);
  74296. hoistVariables(path, function (id, name, hasInit) {
  74297. variableIds.push(id);
  74298. if (!hasInit && name in exportMap) {
  74299. for (var _iterator6 = _createForOfIteratorHelperLoose(exportMap[name]), _step6; !(_step6 = _iterator6()).done;) {
  74300. var exported = _step6.value;
  74301. exportNames.push(exported);
  74302. exportValues.push(scope.buildUndefinedNode());
  74303. }
  74304. }
  74305. }, null);
  74306. if (variableIds.length) {
  74307. beforeBody.unshift(variableDeclaration("var", variableIds.map(function (id) {
  74308. return variableDeclarator(id);
  74309. })));
  74310. }
  74311. if (exportNames.length) {
  74312. beforeBody = beforeBody.concat(constructExportCall(path, identifier(exportIdent), exportNames, exportValues, null, stringSpecifiers));
  74313. }
  74314. path.traverse(reassignmentVisitor, {
  74315. exports: exportMap,
  74316. buildCall: buildExportCall,
  74317. scope: scope
  74318. });
  74319. for (var _i3 = 0, _removedPaths = removedPaths; _i3 < _removedPaths.length; _i3++) {
  74320. var _path = _removedPaths[_i3];
  74321. _path.remove();
  74322. }
  74323. var hasTLA = false;
  74324. path.traverse({
  74325. AwaitExpression: function AwaitExpression(path) {
  74326. hasTLA = true;
  74327. path.stop();
  74328. },
  74329. Function: function Function(path) {
  74330. path.skip();
  74331. },
  74332. noScope: true
  74333. });
  74334. path.node.body = [buildTemplate({
  74335. SYSTEM_REGISTER: memberExpression(identifier(systemGlobal), identifier("register")),
  74336. BEFORE_BODY: beforeBody,
  74337. MODULE_NAME: moduleName,
  74338. SETTERS: arrayExpression(setters),
  74339. EXECUTE: functionExpression(null, [], blockStatement(path.node.body), false, hasTLA),
  74340. SOURCES: arrayExpression(sources),
  74341. EXPORT_IDENTIFIER: identifier(exportIdent),
  74342. CONTEXT_IDENTIFIER: identifier(contextIdent)
  74343. })];
  74344. }
  74345. }
  74346. }
  74347. };
  74348. });
  74349. var buildPrerequisiteAssignment = template$2("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n");
  74350. var buildWrapper = template$2("\n (function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== \"undefined\") {\n factory(COMMONJS_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n\n GLOBAL_TO_ASSIGN;\n }\n })(\n typeof globalThis !== \"undefined\" ? globalThis\n : typeof self !== \"undefined\" ? self\n : this,\n function(IMPORT_NAMES) {\n })\n");
  74351. var _transformModulesUmd = declare(function (api, options) {
  74352. var _api$assumption, _api$assumption2;
  74353. api.assertVersion(7);
  74354. var globals = options.globals,
  74355. exactGlobals = options.exactGlobals,
  74356. allowTopLevelThis = options.allowTopLevelThis,
  74357. strict = options.strict,
  74358. strictMode = options.strictMode,
  74359. noInterop = options.noInterop,
  74360. importInterop = options.importInterop;
  74361. var constantReexports = (_api$assumption = api.assumption("constantReexports")) != null ? _api$assumption : options.loose;
  74362. var enumerableModuleMeta = (_api$assumption2 = api.assumption("enumerableModuleMeta")) != null ? _api$assumption2 : options.loose;
  74363. function buildBrowserInit(browserGlobals, exactGlobals, filename, moduleName) {
  74364. var moduleNameOrBasename = moduleName ? moduleName.value : basename(filename, extname(filename));
  74365. var globalToAssign = memberExpression(identifier("global"), identifier(toIdentifier(moduleNameOrBasename)));
  74366. var initAssignments = [];
  74367. if (exactGlobals) {
  74368. var globalName = browserGlobals[moduleNameOrBasename];
  74369. if (globalName) {
  74370. initAssignments = [];
  74371. var members = globalName.split(".");
  74372. globalToAssign = members.slice(1).reduce(function (accum, curr) {
  74373. initAssignments.push(buildPrerequisiteAssignment({
  74374. GLOBAL_REFERENCE: cloneNode(accum)
  74375. }));
  74376. return memberExpression(accum, identifier(curr));
  74377. }, memberExpression(identifier("global"), identifier(members[0])));
  74378. }
  74379. }
  74380. initAssignments.push(expressionStatement(assignmentExpression("=", globalToAssign, memberExpression(identifier("mod"), identifier("exports")))));
  74381. return initAssignments;
  74382. }
  74383. function buildBrowserArg(browserGlobals, exactGlobals, source) {
  74384. var memberExpression$1;
  74385. if (exactGlobals) {
  74386. var globalRef = browserGlobals[source];
  74387. if (globalRef) {
  74388. memberExpression$1 = globalRef.split(".").reduce(function (accum, curr) {
  74389. return memberExpression(accum, identifier(curr));
  74390. }, identifier("global"));
  74391. } else {
  74392. memberExpression$1 = memberExpression(identifier("global"), identifier(toIdentifier(source)));
  74393. }
  74394. } else {
  74395. var requireName = basename(source, extname(source));
  74396. var globalName = browserGlobals[requireName] || requireName;
  74397. memberExpression$1 = memberExpression(identifier("global"), identifier(toIdentifier(globalName)));
  74398. }
  74399. return memberExpression$1;
  74400. }
  74401. return {
  74402. name: "transform-modules-umd",
  74403. visitor: {
  74404. Program: {
  74405. exit: function exit(path) {
  74406. if (!isModule(path)) return;
  74407. var browserGlobals = globals || {};
  74408. var moduleName = getModuleName(this.file.opts, options);
  74409. if (moduleName) moduleName = stringLiteral(moduleName);
  74410. var _rewriteModuleStateme = rewriteModuleStatementsAndPrepareHeader(path, {
  74411. constantReexports: constantReexports,
  74412. enumerableModuleMeta: enumerableModuleMeta,
  74413. strict: strict,
  74414. strictMode: strictMode,
  74415. allowTopLevelThis: allowTopLevelThis,
  74416. noInterop: noInterop,
  74417. importInterop: importInterop
  74418. }),
  74419. meta = _rewriteModuleStateme.meta,
  74420. headers = _rewriteModuleStateme.headers;
  74421. var amdArgs = [];
  74422. var commonjsArgs = [];
  74423. var browserArgs = [];
  74424. var importNames = [];
  74425. if (hasExports(meta)) {
  74426. amdArgs.push(stringLiteral("exports"));
  74427. commonjsArgs.push(identifier("exports"));
  74428. browserArgs.push(memberExpression(identifier("mod"), identifier("exports")));
  74429. importNames.push(identifier(meta.exportName));
  74430. }
  74431. for (var _iterator = _createForOfIteratorHelperLoose(meta.source), _step; !(_step = _iterator()).done;) {
  74432. var _step$value = _slicedToArray$2(_step.value, 2),
  74433. source = _step$value[0],
  74434. metadata = _step$value[1];
  74435. amdArgs.push(stringLiteral(source));
  74436. commonjsArgs.push(callExpression(identifier("require"), [stringLiteral(source)]));
  74437. browserArgs.push(buildBrowserArg(browserGlobals, exactGlobals, source));
  74438. importNames.push(identifier(metadata.name));
  74439. if (!isSideEffectImport(metadata)) {
  74440. var interop = wrapInterop(path, identifier(metadata.name), metadata.interop);
  74441. if (interop) {
  74442. var header = expressionStatement(assignmentExpression("=", identifier(metadata.name), interop));
  74443. header.loc = meta.loc;
  74444. headers.push(header);
  74445. }
  74446. }
  74447. headers.push.apply(headers, _toConsumableArray(buildNamespaceInitStatements(meta, metadata, constantReexports)));
  74448. }
  74449. ensureStatementsHoisted(headers);
  74450. path.unshiftContainer("body", headers);
  74451. var _path$node = path.node,
  74452. body = _path$node.body,
  74453. directives = _path$node.directives;
  74454. path.node.directives = [];
  74455. path.node.body = [];
  74456. var umdWrapper = path.pushContainer("body", [buildWrapper({
  74457. MODULE_NAME: moduleName,
  74458. AMD_ARGUMENTS: arrayExpression(amdArgs),
  74459. COMMONJS_ARGUMENTS: commonjsArgs,
  74460. BROWSER_ARGUMENTS: browserArgs,
  74461. IMPORT_NAMES: importNames,
  74462. GLOBAL_TO_ASSIGN: buildBrowserInit(browserGlobals, exactGlobals, this.filename || "unknown", moduleName)
  74463. })])[0];
  74464. var umdFactory = umdWrapper.get("expression.arguments")[1].get("body");
  74465. umdFactory.pushContainer("directives", directives);
  74466. umdFactory.pushContainer("body", body);
  74467. }
  74468. }
  74469. }
  74470. };
  74471. });
  74472. function _transformNamedCapturingGroupsRegex (core, options) {
  74473. var _options$runtime = options.runtime,
  74474. runtime = _options$runtime === void 0 ? true : _options$runtime;
  74475. if (typeof runtime !== "boolean") {
  74476. throw new Error("The 'runtime' option must be boolean");
  74477. }
  74478. return createRegExpFeaturePlugin({
  74479. name: "transform-named-capturing-groups-regex",
  74480. feature: "namedCaptureGroups",
  74481. options: {
  74482. runtime: runtime
  74483. }
  74484. });
  74485. }
  74486. var _transformNewTarget = declare(function (api) {
  74487. api.assertVersion(7);
  74488. return {
  74489. name: "transform-new-target",
  74490. visitor: {
  74491. MetaProperty: function MetaProperty(path) {
  74492. var meta = path.get("meta");
  74493. var property = path.get("property");
  74494. var scope = path.scope;
  74495. if (meta.isIdentifier({
  74496. name: "new"
  74497. }) && property.isIdentifier({
  74498. name: "target"
  74499. })) {
  74500. var func = path.findParent(function (path) {
  74501. if (path.isClass()) return true;
  74502. if (path.isFunction() && !path.isArrowFunctionExpression()) {
  74503. if (path.isClassMethod({
  74504. kind: "constructor"
  74505. })) {
  74506. return false;
  74507. }
  74508. return true;
  74509. }
  74510. return false;
  74511. });
  74512. if (!func) {
  74513. throw path.buildCodeFrameError("new.target must be under a (non-arrow) function or a class.");
  74514. }
  74515. var node = func.node;
  74516. if (!node.id) {
  74517. if (func.isMethod()) {
  74518. path.replaceWith(scope.buildUndefinedNode());
  74519. return;
  74520. }
  74521. node.id = scope.generateUidIdentifier("target");
  74522. }
  74523. var _constructor = memberExpression(thisExpression(), identifier("constructor"));
  74524. if (func.isClass()) {
  74525. path.replaceWith(_constructor);
  74526. return;
  74527. }
  74528. path.replaceWith(conditionalExpression(binaryExpression("instanceof", thisExpression(), cloneNode(node.id)), _constructor, scope.buildUndefinedNode()));
  74529. }
  74530. }
  74531. }
  74532. };
  74533. });
  74534. var transformObjectAssign = declare(function (api) {
  74535. api.assertVersion(7);
  74536. return {
  74537. name: "transform-object-assign",
  74538. visitor: {
  74539. CallExpression: function CallExpression(path, file) {
  74540. if (path.get("callee").matchesPattern("Object.assign")) {
  74541. path.node.callee = file.addHelper("extends");
  74542. }
  74543. }
  74544. }
  74545. };
  74546. });
  74547. function replacePropertySuper(path, getObjectRef, file) {
  74548. var replaceSupers = new ReplaceSupers({
  74549. getObjectRef: getObjectRef,
  74550. methodPath: path,
  74551. file: file
  74552. });
  74553. replaceSupers.replace();
  74554. }
  74555. var _transformObjectSuper = declare(function (api) {
  74556. api.assertVersion(7);
  74557. return {
  74558. name: "transform-object-super",
  74559. visitor: {
  74560. ObjectExpression: function ObjectExpression(path, state) {
  74561. var objectRef;
  74562. var getObjectRef = function getObjectRef() {
  74563. return objectRef = objectRef || path.scope.generateUidIdentifier("obj");
  74564. };
  74565. path.get("properties").forEach(function (propPath) {
  74566. if (!propPath.isMethod()) return;
  74567. replacePropertySuper(propPath, getObjectRef, state);
  74568. });
  74569. if (objectRef) {
  74570. path.scope.push({
  74571. id: cloneNode(objectRef)
  74572. });
  74573. path.replaceWith(assignmentExpression("=", cloneNode(objectRef), path.node));
  74574. }
  74575. }
  74576. }
  74577. };
  74578. });
  74579. var transformObjectSetPrototypeOfToAssign = declare(function (api) {
  74580. api.assertVersion(7);
  74581. return {
  74582. name: "transform-object-set-prototype-of-to-assign",
  74583. visitor: {
  74584. CallExpression: function CallExpression(path, file) {
  74585. if (path.get("callee").matchesPattern("Object.setPrototypeOf")) {
  74586. path.node.callee = file.addHelper("defaults");
  74587. }
  74588. }
  74589. }
  74590. };
  74591. });
  74592. var _transformPropertyLiterals = declare(function (api) {
  74593. api.assertVersion(7);
  74594. return {
  74595. name: "transform-property-literals",
  74596. visitor: {
  74597. ObjectProperty: {
  74598. exit: function exit(_ref) {
  74599. var node = _ref.node;
  74600. var key = node.key;
  74601. if (!node.computed && isIdentifier(key) && !isValidES3Identifier(key.name)) {
  74602. node.key = stringLiteral(key.name);
  74603. }
  74604. }
  74605. }
  74606. }
  74607. };
  74608. });
  74609. function toKind(node) {
  74610. if (isClassMethod(node) || isObjectMethod(node)) {
  74611. if (node.kind === "get" || node.kind === "set") {
  74612. return node.kind;
  74613. }
  74614. }
  74615. return "value";
  74616. }
  74617. var has$7 = Function.prototype.call.bind(Object.prototype.hasOwnProperty);
  74618. function push$1(mutatorMap, node, kind, file, scope) {
  74619. var alias = toKeyAlias(node);
  74620. var map = {};
  74621. if (has$7(mutatorMap, alias)) map = mutatorMap[alias];
  74622. mutatorMap[alias] = map;
  74623. map._inherits = map._inherits || [];
  74624. map._inherits.push(node);
  74625. map._key = node.key;
  74626. if (node.computed) {
  74627. map._computed = true;
  74628. }
  74629. if (node.decorators) {
  74630. var decorators = map.decorators = map.decorators || arrayExpression([]);
  74631. decorators.elements = decorators.elements.concat(node.decorators.map(function (dec) {
  74632. return dec.expression;
  74633. }).reverse());
  74634. }
  74635. if (map.value || map.initializer) {
  74636. throw file.buildCodeFrameError(node, "Key conflict with sibling node");
  74637. }
  74638. var key, value;
  74639. if (isObjectProperty(node) || isObjectMethod(node) || isClassMethod(node)) {
  74640. key = toComputedKey$1(node, node.key);
  74641. }
  74642. if (isProperty(node)) {
  74643. value = node.value;
  74644. } else if (isObjectMethod(node) || isClassMethod(node)) {
  74645. value = functionExpression(null, node.params, node.body, node.generator, node.async);
  74646. value.returnType = node.returnType;
  74647. }
  74648. var inheritedKind = toKind(node);
  74649. if (!kind || inheritedKind !== "value") {
  74650. kind = inheritedKind;
  74651. }
  74652. if (scope && isStringLiteral(key) && (kind === "value" || kind === "initializer") && isFunctionExpression(value)) {
  74653. value = nameFunction({
  74654. id: key,
  74655. node: value,
  74656. scope: scope
  74657. });
  74658. }
  74659. if (value) {
  74660. inheritsComments(value, node);
  74661. map[kind] = value;
  74662. }
  74663. return map;
  74664. }
  74665. function toClassObject(mutatorMap) {
  74666. var objExpr = objectExpression([]);
  74667. Object.keys(mutatorMap).forEach(function (mutatorMapKey) {
  74668. var map = mutatorMap[mutatorMapKey];
  74669. var mapNode = objectExpression([]);
  74670. var propNode = objectProperty(map._key, mapNode, map._computed);
  74671. Object.keys(map).forEach(function (key) {
  74672. var node = map[key];
  74673. if (key[0] === "_") return;
  74674. var prop = objectProperty(identifier(key), node);
  74675. inheritsComments(prop, node);
  74676. removeComments(node);
  74677. mapNode.properties.push(prop);
  74678. });
  74679. objExpr.properties.push(propNode);
  74680. });
  74681. return objExpr;
  74682. }
  74683. function toDefineObject(mutatorMap) {
  74684. Object.keys(mutatorMap).forEach(function (key) {
  74685. var map = mutatorMap[key];
  74686. if (map.value) map.writable = booleanLiteral(true);
  74687. map.configurable = booleanLiteral(true);
  74688. map.enumerable = booleanLiteral(true);
  74689. });
  74690. return toClassObject(mutatorMap);
  74691. }
  74692. var transformPropertyMutators = declare(function (api) {
  74693. api.assertVersion(7);
  74694. return {
  74695. name: "transform-property-mutators",
  74696. visitor: {
  74697. ObjectExpression: function ObjectExpression(path, file) {
  74698. var node = path.node;
  74699. var hasAny = false;
  74700. for (var _i = 0, _arr = node.properties; _i < _arr.length; _i++) {
  74701. var prop = _arr[_i];
  74702. if (prop.kind === "get" || prop.kind === "set") {
  74703. hasAny = true;
  74704. break;
  74705. }
  74706. }
  74707. if (!hasAny) return;
  74708. var mutatorMap = {};
  74709. node.properties = node.properties.filter(function (prop) {
  74710. if (!prop.computed && (prop.kind === "get" || prop.kind === "set")) {
  74711. push$1(mutatorMap, prop, null, file);
  74712. return false;
  74713. } else {
  74714. return true;
  74715. }
  74716. });
  74717. path.replaceWith(callExpression(memberExpression(identifier("Object"), identifier("defineProperties")), [node, toDefineObject(mutatorMap)]));
  74718. }
  74719. }
  74720. };
  74721. });
  74722. var transformProtoToAssign = declare(function (api) {
  74723. api.assertVersion(7);
  74724. function isProtoKey(node) {
  74725. return isLiteral(toComputedKey$1(node, node.key), {
  74726. value: "__proto__"
  74727. });
  74728. }
  74729. function isProtoAssignmentExpression(node) {
  74730. var left = node.left;
  74731. return isMemberExpression(left) && isLiteral(toComputedKey$1(left, left.property), {
  74732. value: "__proto__"
  74733. });
  74734. }
  74735. function buildDefaultsCallExpression(expr, ref, file) {
  74736. return expressionStatement(callExpression(file.addHelper("defaults"), [ref, expr.right]));
  74737. }
  74738. return {
  74739. name: "transform-proto-to-assign",
  74740. visitor: {
  74741. AssignmentExpression: function AssignmentExpression(path, file) {
  74742. if (!isProtoAssignmentExpression(path.node)) return;
  74743. var nodes = [];
  74744. var left = path.node.left.object;
  74745. var temp = path.scope.maybeGenerateMemoised(left);
  74746. if (temp) {
  74747. nodes.push(expressionStatement(assignmentExpression("=", temp, left)));
  74748. }
  74749. nodes.push(buildDefaultsCallExpression(path.node, cloneNode(temp || left), file));
  74750. if (temp) nodes.push(cloneNode(temp));
  74751. path.replaceWithMultiple(nodes);
  74752. },
  74753. ExpressionStatement: function ExpressionStatement(path, file) {
  74754. var expr = path.node.expression;
  74755. if (!isAssignmentExpression(expr, {
  74756. operator: "="
  74757. })) return;
  74758. if (isProtoAssignmentExpression(expr)) {
  74759. path.replaceWith(buildDefaultsCallExpression(expr, expr.left.object, file));
  74760. }
  74761. },
  74762. ObjectExpression: function ObjectExpression(path, file) {
  74763. var proto;
  74764. var node = path.node;
  74765. var properties = node.properties;
  74766. for (var i = 0; i < properties.length; i++) {
  74767. var prop = properties[i];
  74768. if (isProtoKey(prop)) {
  74769. proto = prop.value;
  74770. properties.splice(i, 1);
  74771. break;
  74772. }
  74773. }
  74774. if (proto) {
  74775. var args = [objectExpression([]), proto];
  74776. if (node.properties.length) args.push(node);
  74777. path.replaceWith(callExpression(file.addHelper("extends"), args));
  74778. }
  74779. }
  74780. }
  74781. };
  74782. });
  74783. var _templateObject$6;
  74784. var transformReactConstantElements = declare(function (api, options) {
  74785. api.assertVersion(7);
  74786. var allowMutablePropsOnTags = options.allowMutablePropsOnTags;
  74787. if (allowMutablePropsOnTags != null && !Array.isArray(allowMutablePropsOnTags)) {
  74788. throw new Error(".allowMutablePropsOnTags must be an array, null, or undefined.");
  74789. }
  74790. var HOISTED = new WeakMap();
  74791. function declares(node, scope) {
  74792. if (isJSXIdentifier(node, {
  74793. name: "this"
  74794. }) || isJSXIdentifier(node, {
  74795. name: "arguments"
  74796. }) || isJSXIdentifier(node, {
  74797. name: "super"
  74798. }) || isJSXIdentifier(node, {
  74799. name: "new"
  74800. })) {
  74801. var path = scope.path;
  74802. return path.isFunctionParent() && !path.isArrowFunctionExpression();
  74803. }
  74804. return scope.hasOwnBinding(node.name);
  74805. }
  74806. function isHoistingScope(_ref) {
  74807. var path = _ref.path;
  74808. return path.isFunctionParent() || path.isLoop() || path.isProgram();
  74809. }
  74810. function getHoistingScope(scope) {
  74811. while (!isHoistingScope(scope)) {
  74812. scope = scope.parent;
  74813. }
  74814. return scope;
  74815. }
  74816. var analyzer = {
  74817. enter: function enter(path, state) {
  74818. var stop = function stop() {
  74819. state.isImmutable = false;
  74820. path.stop();
  74821. };
  74822. if (path.isJSXClosingElement()) {
  74823. path.skip();
  74824. return;
  74825. }
  74826. if (path.isJSXIdentifier({
  74827. name: "ref"
  74828. }) && path.parentPath.isJSXAttribute({
  74829. name: path.node
  74830. })) {
  74831. return stop();
  74832. }
  74833. if (path.isJSXIdentifier() || path.isJSXMemberExpression() || path.isJSXNamespacedName()) {
  74834. return;
  74835. }
  74836. if (path.isIdentifier()) {
  74837. var binding = path.scope.getBinding(path.node.name);
  74838. if (binding && binding.constant) return;
  74839. }
  74840. if (!path.isImmutable()) {
  74841. if (path.isPure()) {
  74842. var expressionResult = path.evaluate();
  74843. if (expressionResult.confident) {
  74844. var value = expressionResult.value;
  74845. var isMutable = !state.mutablePropsAllowed && value && typeof value === "object" || typeof value === "function";
  74846. if (!isMutable) {
  74847. path.skip();
  74848. return;
  74849. }
  74850. } else if (isIdentifier(expressionResult.deopt)) {
  74851. return;
  74852. }
  74853. }
  74854. stop();
  74855. }
  74856. },
  74857. ReferencedIdentifier: function ReferencedIdentifier(path, state) {
  74858. var node = path.node;
  74859. var scope = path.scope;
  74860. while (scope) {
  74861. if (scope === state.targetScope) return;
  74862. if (declares(node, scope)) break;
  74863. scope = scope.parent;
  74864. }
  74865. state.targetScope = getHoistingScope(scope);
  74866. }
  74867. };
  74868. return {
  74869. name: "transform-react-constant-elements",
  74870. visitor: {
  74871. JSXElement: function JSXElement(path) {
  74872. var _jsxScope;
  74873. if (HOISTED.has(path.node)) return;
  74874. HOISTED.set(path.node, path.scope);
  74875. var name = path.node.openingElement.name;
  74876. var mutablePropsAllowed = false;
  74877. if (allowMutablePropsOnTags != null) {
  74878. var lastSegment = name;
  74879. while (isJSXMemberExpression(lastSegment)) {
  74880. lastSegment = lastSegment.property;
  74881. }
  74882. var elementName = lastSegment.name;
  74883. mutablePropsAllowed = allowMutablePropsOnTags.includes(elementName);
  74884. }
  74885. var state = {
  74886. isImmutable: true,
  74887. mutablePropsAllowed: mutablePropsAllowed,
  74888. targetScope: path.scope.getProgramParent()
  74889. };
  74890. path.traverse(analyzer, state);
  74891. if (!state.isImmutable) return;
  74892. var targetScope = state.targetScope;
  74893. HOISTED.set(path.node, targetScope);
  74894. var jsxScope;
  74895. var current = path;
  74896. while (!jsxScope && current.parentPath.isJSX()) {
  74897. current = current.parentPath;
  74898. jsxScope = HOISTED.get(current.node);
  74899. }
  74900. (_jsxScope = jsxScope) != null ? _jsxScope : jsxScope = getHoistingScope(path.scope);
  74901. if (targetScope === jsxScope) return;
  74902. var id = path.scope.generateUidBasedOnNode(name);
  74903. targetScope.push({
  74904. id: identifier(id)
  74905. });
  74906. var replacement = template$2.expression.ast(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteralLoose(["\n ", " || (", " = ", ")\n "])), identifier(id), identifier(id), path.node);
  74907. if (path.parentPath.isJSXElement() || path.parentPath.isJSXAttribute()) {
  74908. replacement = jsxExpressionContainer(replacement);
  74909. }
  74910. path.replaceWith(replacement);
  74911. }
  74912. }
  74913. };
  74914. });
  74915. var transformReactDisplayName = declare(function (api) {
  74916. api.assertVersion(7);
  74917. function addDisplayName(id, call) {
  74918. var props = call.arguments[0].properties;
  74919. var safe = true;
  74920. for (var i = 0; i < props.length; i++) {
  74921. var prop = props[i];
  74922. var key = toComputedKey$1(prop);
  74923. if (isLiteral(key, {
  74924. value: "displayName"
  74925. })) {
  74926. safe = false;
  74927. break;
  74928. }
  74929. }
  74930. if (safe) {
  74931. props.unshift(objectProperty(identifier("displayName"), stringLiteral(id)));
  74932. }
  74933. }
  74934. var isCreateClassCallExpression = buildMatchMemberExpression("React.createClass");
  74935. var isCreateClassAddon = function isCreateClassAddon(callee) {
  74936. return callee.name === "createReactClass";
  74937. };
  74938. function isCreateClass(node) {
  74939. if (!node || !isCallExpression(node)) return false;
  74940. if (!isCreateClassCallExpression(node.callee) && !isCreateClassAddon(node.callee)) {
  74941. return false;
  74942. }
  74943. var args = node.arguments;
  74944. if (args.length !== 1) return false;
  74945. var first = args[0];
  74946. if (!isObjectExpression(first)) return false;
  74947. return true;
  74948. }
  74949. return {
  74950. name: "transform-react-display-name",
  74951. visitor: {
  74952. ExportDefaultDeclaration: function ExportDefaultDeclaration(_ref, state) {
  74953. var node = _ref.node;
  74954. if (isCreateClass(node.declaration)) {
  74955. var filename = state.filename || "unknown";
  74956. var displayName = path$1.basename(filename, path$1.extname(filename));
  74957. if (displayName === "index") {
  74958. displayName = path$1.basename(path$1.dirname(filename));
  74959. }
  74960. addDisplayName(displayName, node.declaration);
  74961. }
  74962. },
  74963. CallExpression: function CallExpression(path) {
  74964. var node = path.node;
  74965. if (!isCreateClass(node)) return;
  74966. var id;
  74967. path.find(function (path) {
  74968. if (path.isAssignmentExpression()) {
  74969. id = path.node.left;
  74970. } else if (path.isObjectProperty()) {
  74971. id = path.node.key;
  74972. } else if (path.isVariableDeclarator()) {
  74973. id = path.node.id;
  74974. } else if (path.isStatement()) {
  74975. return true;
  74976. }
  74977. if (id) return true;
  74978. });
  74979. if (!id) return;
  74980. if (isMemberExpression(id)) {
  74981. id = id.property;
  74982. }
  74983. if (isIdentifier(id)) {
  74984. addDisplayName(id.name, node);
  74985. }
  74986. }
  74987. }
  74988. };
  74989. });
  74990. function helper (opts) {
  74991. var visitor = {};
  74992. visitor.JSXNamespacedName = function (path) {
  74993. if (opts.throwIfNamespace) {
  74994. throw path.buildCodeFrameError("Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning.");
  74995. }
  74996. };
  74997. visitor.JSXSpreadChild = function (path) {
  74998. throw path.buildCodeFrameError("Spread children are not supported in React.");
  74999. };
  75000. visitor.JSXElement = {
  75001. exit: function exit(path, file) {
  75002. var callExpr = buildElementCall(path, file);
  75003. if (callExpr) {
  75004. path.replaceWith(inherits(callExpr, path.node));
  75005. }
  75006. }
  75007. };
  75008. visitor.JSXFragment = {
  75009. exit: function exit(path, file) {
  75010. if (opts.compat) {
  75011. throw path.buildCodeFrameError("Fragment tags are only supported in React 16 and up.");
  75012. }
  75013. var callExpr = buildFragmentCall(path, file);
  75014. if (callExpr) {
  75015. path.replaceWith(inherits(callExpr, path.node));
  75016. }
  75017. }
  75018. };
  75019. return visitor;
  75020. function convertJSXIdentifier(node, parent) {
  75021. if (isJSXIdentifier(node)) {
  75022. if (node.name === "this" && isReferenced(node, parent)) {
  75023. return thisExpression();
  75024. } else if (isValidIdentifier(node.name, false)) {
  75025. node.type = "Identifier";
  75026. } else {
  75027. return stringLiteral(node.name);
  75028. }
  75029. } else if (isJSXMemberExpression(node)) {
  75030. return memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
  75031. } else if (isJSXNamespacedName(node)) {
  75032. return stringLiteral(node.namespace.name + ":" + node.name.name);
  75033. }
  75034. return node;
  75035. }
  75036. function convertAttributeValue(node) {
  75037. if (isJSXExpressionContainer(node)) {
  75038. return node.expression;
  75039. } else {
  75040. return node;
  75041. }
  75042. }
  75043. function convertAttribute(node) {
  75044. var value = convertAttributeValue(node.value || booleanLiteral(true));
  75045. if (isJSXSpreadAttribute(node)) {
  75046. return spreadElement(node.argument);
  75047. }
  75048. if (isStringLiteral(value) && !isJSXExpressionContainer(node.value)) {
  75049. var _value$extra;
  75050. value.value = value.value.replace(/\n\s+/g, " ");
  75051. (_value$extra = value.extra) == null ? true : delete _value$extra.raw;
  75052. }
  75053. if (isJSXNamespacedName(node.name)) {
  75054. node.name = stringLiteral(node.name.namespace.name + ":" + node.name.name.name);
  75055. } else if (isValidIdentifier(node.name.name, false)) {
  75056. node.name.type = "Identifier";
  75057. } else {
  75058. node.name = stringLiteral(node.name.name);
  75059. }
  75060. return inherits(objectProperty(node.name, value), node);
  75061. }
  75062. function buildElementCall(path, file) {
  75063. if (opts.filter && !opts.filter(path.node, file)) return;
  75064. var openingPath = path.get("openingElement");
  75065. openingPath.parent.children = react.buildChildren(openingPath.parent);
  75066. var tagExpr = convertJSXIdentifier(openingPath.node.name, openingPath.node);
  75067. var args = [];
  75068. var tagName;
  75069. if (isIdentifier(tagExpr)) {
  75070. tagName = tagExpr.name;
  75071. } else if (isLiteral(tagExpr)) {
  75072. tagName = tagExpr.value;
  75073. }
  75074. var state = {
  75075. tagExpr: tagExpr,
  75076. tagName: tagName,
  75077. args: args,
  75078. pure: false
  75079. };
  75080. if (opts.pre) {
  75081. opts.pre(state, file);
  75082. }
  75083. var attribs = openingPath.node.attributes;
  75084. if (attribs.length) {
  75085. {
  75086. attribs = buildOpeningElementAttributes(attribs, file);
  75087. }
  75088. } else {
  75089. attribs = nullLiteral();
  75090. }
  75091. args.push.apply(args, [attribs].concat(_toConsumableArray(path.node.children)));
  75092. if (opts.post) {
  75093. opts.post(state, file);
  75094. }
  75095. var call = state.call || callExpression(state.callee, args);
  75096. if (state.pure) annotateAsPure(call);
  75097. return call;
  75098. }
  75099. function pushProps(_props, objs) {
  75100. if (!_props.length) return _props;
  75101. objs.push(objectExpression(_props));
  75102. return [];
  75103. }
  75104. function buildOpeningElementAttributes(attribs, file) {
  75105. var _props = [];
  75106. var objs = [];
  75107. var _file$opts$useSpread = file.opts.useSpread,
  75108. useSpread = _file$opts$useSpread === void 0 ? false : _file$opts$useSpread;
  75109. if (typeof useSpread !== "boolean") {
  75110. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useSpread (defaults to false)");
  75111. }
  75112. var useBuiltIns = file.opts.useBuiltIns || false;
  75113. if (typeof useBuiltIns !== "boolean") {
  75114. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)");
  75115. }
  75116. if (useSpread && useBuiltIns) {
  75117. throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread " + "but not both");
  75118. }
  75119. if (useSpread) {
  75120. var props = attribs.map(convertAttribute);
  75121. return objectExpression(props);
  75122. }
  75123. while (attribs.length) {
  75124. var prop = attribs.shift();
  75125. if (isJSXSpreadAttribute(prop)) {
  75126. _props = pushProps(_props, objs);
  75127. objs.push(prop.argument);
  75128. } else {
  75129. _props.push(convertAttribute(prop));
  75130. }
  75131. }
  75132. pushProps(_props, objs);
  75133. if (objs.length === 1) {
  75134. attribs = objs[0];
  75135. } else {
  75136. if (!isObjectExpression(objs[0])) {
  75137. objs.unshift(objectExpression([]));
  75138. }
  75139. var helper = useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : file.addHelper("extends");
  75140. attribs = callExpression(helper, objs);
  75141. }
  75142. return attribs;
  75143. }
  75144. function buildFragmentCall(path, file) {
  75145. if (opts.filter && !opts.filter(path.node, file)) return;
  75146. var openingPath = path.get("openingElement");
  75147. openingPath.parent.children = react.buildChildren(openingPath.parent);
  75148. var args = [];
  75149. var tagName = null;
  75150. var tagExpr = file.get("jsxFragIdentifier")();
  75151. var state = {
  75152. tagExpr: tagExpr,
  75153. tagName: tagName,
  75154. args: args,
  75155. pure: false
  75156. };
  75157. if (opts.pre) {
  75158. opts.pre(state, file);
  75159. }
  75160. args.push.apply(args, [nullLiteral()].concat(_toConsumableArray(path.node.children)));
  75161. if (opts.post) {
  75162. opts.post(state, file);
  75163. }
  75164. file.set("usedFragment", true);
  75165. var call = state.call || callExpression(state.callee, args);
  75166. if (state.pure) annotateAsPure(call);
  75167. return call;
  75168. }
  75169. }
  75170. var transformReactInlineElements = declare(function (api) {
  75171. api.assertVersion(7);
  75172. function hasRefOrSpread(attrs) {
  75173. for (var i = 0; i < attrs.length; i++) {
  75174. var attr = attrs[i];
  75175. if (isJSXSpreadAttribute(attr)) return true;
  75176. if (isJSXAttributeOfName(attr, "ref")) return true;
  75177. }
  75178. return false;
  75179. }
  75180. function isJSXAttributeOfName(attr, name) {
  75181. return isJSXAttribute(attr) && isJSXIdentifier(attr.name, {
  75182. name: name
  75183. });
  75184. }
  75185. var visitor = helper({
  75186. filter: function filter(node) {
  75187. return node.openingElement && !hasRefOrSpread(node.openingElement.attributes);
  75188. },
  75189. pre: function pre(state) {
  75190. var tagName = state.tagName;
  75191. var args = state.args;
  75192. if (react.isCompatTag(tagName)) {
  75193. args.push(stringLiteral(tagName));
  75194. } else {
  75195. args.push(state.tagExpr);
  75196. }
  75197. },
  75198. post: function post(state, pass) {
  75199. state.callee = pass.addHelper("jsx");
  75200. var props = state.args[1];
  75201. var hasKey = false;
  75202. if (isObjectExpression(props)) {
  75203. var keyIndex = props.properties.findIndex(function (prop) {
  75204. return isIdentifier(prop.key, {
  75205. name: "key"
  75206. });
  75207. });
  75208. if (keyIndex > -1) {
  75209. state.args.splice(2, 0, props.properties[keyIndex].value);
  75210. props.properties.splice(keyIndex, 1);
  75211. hasKey = true;
  75212. }
  75213. } else if (isNullLiteral(props)) {
  75214. state.args.splice(1, 1, objectExpression([]));
  75215. }
  75216. if (!hasKey && state.args.length > 2) {
  75217. state.args.splice(2, 0, unaryExpression("void", numericLiteral(0)));
  75218. }
  75219. state.pure = true;
  75220. }
  75221. });
  75222. return {
  75223. name: "transform-react-inline-elements",
  75224. visitor: visitor
  75225. };
  75226. });
  75227. var DEFAULT = {
  75228. importSource: "react",
  75229. runtime: "automatic",
  75230. pragma: "React.createElement",
  75231. pragmaFrag: "React.Fragment"
  75232. };
  75233. var JSX_SOURCE_ANNOTATION_REGEX = /\*?\s*@jsxImportSource\s+([^\s]+)/;
  75234. var JSX_RUNTIME_ANNOTATION_REGEX = /\*?\s*@jsxRuntime\s+([^\s]+)/;
  75235. var JSX_ANNOTATION_REGEX = /\*?\s*@jsx\s+([^\s]+)/;
  75236. var JSX_FRAG_ANNOTATION_REGEX = /\*?\s*@jsxFrag\s+([^\s]+)/;
  75237. var get = function get(pass, name) {
  75238. return pass.get("@babel/plugin-react-jsx/" + name);
  75239. };
  75240. var set = function set(pass, name, v) {
  75241. return pass.set("@babel/plugin-react-jsx/" + name, v);
  75242. };
  75243. function createPlugin(_ref) {
  75244. var name = _ref.name,
  75245. development = _ref.development;
  75246. return declare(function (api, options) {
  75247. var PURE_ANNOTATION = options.pure,
  75248. _options$throwIfNames = options.throwIfNamespace,
  75249. throwIfNamespace = _options$throwIfNames === void 0 ? true : _options$throwIfNames,
  75250. filter = options.filter,
  75251. _options$runtime = options.runtime,
  75252. RUNTIME_DEFAULT = _options$runtime === void 0 ? development ? "automatic" : "classic" : _options$runtime,
  75253. _options$importSource = options.importSource,
  75254. IMPORT_SOURCE_DEFAULT = _options$importSource === void 0 ? DEFAULT.importSource : _options$importSource,
  75255. _options$pragma = options.pragma,
  75256. PRAGMA_DEFAULT = _options$pragma === void 0 ? DEFAULT.pragma : _options$pragma,
  75257. _options$pragmaFrag = options.pragmaFrag,
  75258. PRAGMA_FRAG_DEFAULT = _options$pragmaFrag === void 0 ? DEFAULT.pragmaFrag : _options$pragmaFrag;
  75259. {
  75260. var _options$useSpread = options.useSpread,
  75261. useSpread = _options$useSpread === void 0 ? false : _options$useSpread,
  75262. _options$useBuiltIns = options.useBuiltIns,
  75263. useBuiltIns = _options$useBuiltIns === void 0 ? false : _options$useBuiltIns;
  75264. if (RUNTIME_DEFAULT === "classic") {
  75265. if (typeof useSpread !== "boolean") {
  75266. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useSpread (defaults to false)");
  75267. }
  75268. if (typeof useBuiltIns !== "boolean") {
  75269. throw new Error("transform-react-jsx currently only accepts a boolean option for " + "useBuiltIns (defaults to false)");
  75270. }
  75271. if (useSpread && useBuiltIns) {
  75272. throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread " + "but not both");
  75273. }
  75274. }
  75275. }
  75276. var injectMetaPropertiesVisitor = {
  75277. JSXOpeningElement: function JSXOpeningElement(path, state) {
  75278. for (var _iterator = _createForOfIteratorHelperLoose(path.get("attributes")), _step; !(_step = _iterator()).done;) {
  75279. var attr = _step.value;
  75280. if (!attr.isJSXElement()) continue;
  75281. var _name = attr.node.name.name;
  75282. if (_name === "__source" || _name === "__self") {
  75283. throw path.buildCodeFrameError("__source and __self should not be defined in props and are reserved for internal usage.");
  75284. }
  75285. }
  75286. var self = jsxAttribute(jsxIdentifier("__self"), jsxExpressionContainer(thisExpression()));
  75287. var source = jsxAttribute(jsxIdentifier("__source"), jsxExpressionContainer(makeSource(path, state)));
  75288. path.pushContainer("attributes", [self, source]);
  75289. }
  75290. };
  75291. return {
  75292. name: name,
  75293. inherits: syntaxJsx,
  75294. visitor: {
  75295. JSXNamespacedName: function JSXNamespacedName(path) {
  75296. if (throwIfNamespace) {
  75297. throw path.buildCodeFrameError("Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning.");
  75298. }
  75299. },
  75300. JSXSpreadChild: function JSXSpreadChild(path) {
  75301. throw path.buildCodeFrameError("Spread children are not supported in React.");
  75302. },
  75303. Program: {
  75304. enter: function enter(path, state) {
  75305. var file = state.file;
  75306. var runtime = RUNTIME_DEFAULT;
  75307. var source = IMPORT_SOURCE_DEFAULT;
  75308. var pragma = PRAGMA_DEFAULT;
  75309. var pragmaFrag = PRAGMA_FRAG_DEFAULT;
  75310. var sourceSet = !!options.importSource;
  75311. var pragmaSet = !!options.pragma;
  75312. var pragmaFragSet = !!options.pragmaFrag;
  75313. if (file.ast.comments) {
  75314. for (var _iterator2 = _createForOfIteratorHelperLoose(file.ast.comments), _step2; !(_step2 = _iterator2()).done;) {
  75315. var comment = _step2.value;
  75316. var sourceMatches = JSX_SOURCE_ANNOTATION_REGEX.exec(comment.value);
  75317. if (sourceMatches) {
  75318. source = sourceMatches[1];
  75319. sourceSet = true;
  75320. }
  75321. var runtimeMatches = JSX_RUNTIME_ANNOTATION_REGEX.exec(comment.value);
  75322. if (runtimeMatches) {
  75323. runtime = runtimeMatches[1];
  75324. }
  75325. var jsxMatches = JSX_ANNOTATION_REGEX.exec(comment.value);
  75326. if (jsxMatches) {
  75327. pragma = jsxMatches[1];
  75328. pragmaSet = true;
  75329. }
  75330. var jsxFragMatches = JSX_FRAG_ANNOTATION_REGEX.exec(comment.value);
  75331. if (jsxFragMatches) {
  75332. pragmaFrag = jsxFragMatches[1];
  75333. pragmaFragSet = true;
  75334. }
  75335. }
  75336. }
  75337. set(state, "runtime", runtime);
  75338. if (runtime === "classic") {
  75339. if (sourceSet) {
  75340. throw path.buildCodeFrameError("importSource cannot be set when runtime is classic.");
  75341. }
  75342. var createElement = toMemberExpression(pragma);
  75343. var fragment = toMemberExpression(pragmaFrag);
  75344. set(state, "id/createElement", function () {
  75345. return cloneNode(createElement);
  75346. });
  75347. set(state, "id/fragment", function () {
  75348. return cloneNode(fragment);
  75349. });
  75350. set(state, "defaultPure", pragma === DEFAULT.pragma);
  75351. } else if (runtime === "automatic") {
  75352. if (pragmaSet || pragmaFragSet) {
  75353. throw path.buildCodeFrameError("pragma and pragmaFrag cannot be set when runtime is automatic.");
  75354. }
  75355. var define = function define(name, id) {
  75356. return set(state, name, createImportLazily(state, path, id, source));
  75357. };
  75358. define("id/jsx", development ? "jsxDEV" : "jsx");
  75359. define("id/jsxs", development ? "jsxDEV" : "jsxs");
  75360. define("id/createElement", "createElement");
  75361. define("id/fragment", "Fragment");
  75362. set(state, "defaultPure", source === DEFAULT.importSource);
  75363. } else {
  75364. throw path.buildCodeFrameError("Runtime must be either \"classic\" or \"automatic\".");
  75365. }
  75366. if (development) {
  75367. path.traverse(injectMetaPropertiesVisitor, state);
  75368. }
  75369. }
  75370. },
  75371. JSXElement: {
  75372. exit: function exit(path, file) {
  75373. var callExpr;
  75374. if (get(file, "runtime") === "classic" || shouldUseCreateElement(path)) {
  75375. callExpr = buildCreateElementCall(path, file);
  75376. } else {
  75377. callExpr = buildJSXElementCall(path, file);
  75378. }
  75379. path.replaceWith(inherits(callExpr, path.node));
  75380. }
  75381. },
  75382. JSXFragment: {
  75383. exit: function exit(path, file) {
  75384. var callExpr;
  75385. if (get(file, "runtime") === "classic") {
  75386. callExpr = buildCreateElementFragmentCall(path, file);
  75387. } else {
  75388. callExpr = buildJSXFragmentCall(path, file);
  75389. }
  75390. path.replaceWith(inherits(callExpr, path.node));
  75391. }
  75392. },
  75393. JSXAttribute: function JSXAttribute(path) {
  75394. if (isJSXElement(path.node.value)) {
  75395. path.node.value = jsxExpressionContainer(path.node.value);
  75396. }
  75397. }
  75398. }
  75399. };
  75400. function call(pass, name, args) {
  75401. var node = callExpression(get(pass, "id/" + name)(), args);
  75402. if (PURE_ANNOTATION != null ? PURE_ANNOTATION : get(pass, "defaultPure")) annotateAsPure(node);
  75403. return node;
  75404. }
  75405. function shouldUseCreateElement(path) {
  75406. var openingPath = path.get("openingElement");
  75407. var attributes = openingPath.node.attributes;
  75408. var seenPropsSpread = false;
  75409. for (var i = 0; i < attributes.length; i++) {
  75410. var attr = attributes[i];
  75411. if (seenPropsSpread && isJSXAttribute(attr) && attr.name.name === "key") {
  75412. return true;
  75413. } else if (isJSXSpreadAttribute(attr)) {
  75414. seenPropsSpread = true;
  75415. }
  75416. }
  75417. return false;
  75418. }
  75419. function convertJSXIdentifier(node, parent) {
  75420. if (isJSXIdentifier(node)) {
  75421. if (node.name === "this" && isReferenced(node, parent)) {
  75422. return thisExpression();
  75423. } else if (isValidIdentifier(node.name, false)) {
  75424. node.type = "Identifier";
  75425. } else {
  75426. return stringLiteral(node.name);
  75427. }
  75428. } else if (isJSXMemberExpression(node)) {
  75429. return memberExpression(convertJSXIdentifier(node.object, node), convertJSXIdentifier(node.property, node));
  75430. } else if (isJSXNamespacedName(node)) {
  75431. return stringLiteral(node.namespace.name + ":" + node.name.name);
  75432. }
  75433. return node;
  75434. }
  75435. function convertAttributeValue(node) {
  75436. if (isJSXExpressionContainer(node)) {
  75437. return node.expression;
  75438. } else {
  75439. return node;
  75440. }
  75441. }
  75442. function accumulateAttribute(array, attribute) {
  75443. if (isJSXSpreadAttribute(attribute.node)) {
  75444. var arg = attribute.node.argument;
  75445. if (isObjectExpression(arg)) {
  75446. array.push.apply(array, _toConsumableArray(arg.properties));
  75447. } else {
  75448. array.push(spreadElement(arg));
  75449. }
  75450. return array;
  75451. }
  75452. var value = convertAttributeValue(attribute.node.name.name !== "key" ? attribute.node.value || booleanLiteral(true) : attribute.node.value);
  75453. if (attribute.node.name.name === "key" && value === null) {
  75454. throw attribute.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.');
  75455. }
  75456. if (isStringLiteral(value) && !isJSXExpressionContainer(attribute.node.value)) {
  75457. var _value$extra;
  75458. value.value = value.value.replace(/\n\s+/g, " ");
  75459. (_value$extra = value.extra) == null ? true : delete _value$extra.raw;
  75460. }
  75461. if (isJSXNamespacedName(attribute.node.name)) {
  75462. attribute.node.name = stringLiteral(attribute.node.name.namespace.name + ":" + attribute.node.name.name.name);
  75463. } else if (isValidIdentifier(attribute.node.name.name, false)) {
  75464. attribute.node.name.type = "Identifier";
  75465. } else {
  75466. attribute.node.name = stringLiteral(attribute.node.name.name);
  75467. }
  75468. array.push(inherits(objectProperty(attribute.node.name, value), attribute.node));
  75469. return array;
  75470. }
  75471. function buildChildrenProperty(children) {
  75472. var childrenNode;
  75473. if (children.length === 1) {
  75474. childrenNode = children[0];
  75475. } else if (children.length > 1) {
  75476. childrenNode = arrayExpression(children);
  75477. } else {
  75478. return undefined;
  75479. }
  75480. return objectProperty(identifier("children"), childrenNode);
  75481. }
  75482. function buildJSXElementCall(path, file) {
  75483. var openingPath = path.get("openingElement");
  75484. var args = [getTag(openingPath)];
  75485. var attribsArray = [];
  75486. var extracted = Object.create(null);
  75487. for (var _iterator3 = _createForOfIteratorHelperLoose(openingPath.get("attributes")), _step3; !(_step3 = _iterator3()).done;) {
  75488. var attr = _step3.value;
  75489. if (attr.isJSXAttribute() && isJSXIdentifier(attr.node.name)) {
  75490. var _name2 = attr.node.name.name;
  75491. switch (_name2) {
  75492. case "__source":
  75493. case "__self":
  75494. if (extracted[_name2]) throw sourceSelfError(path, _name2);
  75495. case "key":
  75496. {
  75497. var keyValue = convertAttributeValue(attr.node.value);
  75498. if (keyValue === null) {
  75499. throw attr.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.');
  75500. }
  75501. extracted[_name2] = keyValue;
  75502. break;
  75503. }
  75504. default:
  75505. attribsArray.push(attr);
  75506. }
  75507. } else {
  75508. attribsArray.push(attr);
  75509. }
  75510. }
  75511. var children = react.buildChildren(path.node);
  75512. var attribs;
  75513. if (attribsArray.length || children.length) {
  75514. attribs = buildJSXOpeningElementAttributes(attribsArray, file, children);
  75515. } else {
  75516. attribs = objectExpression([]);
  75517. }
  75518. args.push(attribs);
  75519. if (development) {
  75520. var _extracted$key, _extracted$__source, _extracted$__self;
  75521. args.push((_extracted$key = extracted.key) != null ? _extracted$key : path.scope.buildUndefinedNode(), booleanLiteral(children.length > 1), (_extracted$__source = extracted.__source) != null ? _extracted$__source : path.scope.buildUndefinedNode(), (_extracted$__self = extracted.__self) != null ? _extracted$__self : thisExpression());
  75522. } else if (extracted.key !== undefined) {
  75523. args.push(extracted.key);
  75524. }
  75525. return call(file, children.length > 1 ? "jsxs" : "jsx", args);
  75526. }
  75527. function buildJSXOpeningElementAttributes(attribs, file, children) {
  75528. var props = attribs.reduce(accumulateAttribute, []);
  75529. if ((children == null ? void 0 : children.length) > 0) {
  75530. props.push(buildChildrenProperty(children));
  75531. }
  75532. return objectExpression(props);
  75533. }
  75534. function buildJSXFragmentCall(path, file) {
  75535. var args = [get(file, "id/fragment")()];
  75536. var children = react.buildChildren(path.node);
  75537. args.push(objectExpression(children.length > 0 ? [buildChildrenProperty(children)] : []));
  75538. if (development) {
  75539. args.push(path.scope.buildUndefinedNode(), booleanLiteral(children.length > 1));
  75540. }
  75541. return call(file, children.length > 1 ? "jsxs" : "jsx", args);
  75542. }
  75543. function buildCreateElementFragmentCall(path, file) {
  75544. if (filter && !filter(path.node, file)) return;
  75545. return call(file, "createElement", [get(file, "id/fragment")(), nullLiteral()].concat(_toConsumableArray(react.buildChildren(path.node))));
  75546. }
  75547. function buildCreateElementCall(path, file) {
  75548. var openingPath = path.get("openingElement");
  75549. return call(file, "createElement", [getTag(openingPath), buildCreateElementOpeningElementAttributes(file, path, openingPath.get("attributes"))].concat(_toConsumableArray(react.buildChildren(path.node))));
  75550. }
  75551. function getTag(openingPath) {
  75552. var tagExpr = convertJSXIdentifier(openingPath.node.name, openingPath.node);
  75553. var tagName;
  75554. if (isIdentifier(tagExpr)) {
  75555. tagName = tagExpr.name;
  75556. } else if (isLiteral(tagExpr)) {
  75557. tagName = tagExpr.value;
  75558. }
  75559. if (react.isCompatTag(tagName)) {
  75560. return stringLiteral(tagName);
  75561. } else {
  75562. return tagExpr;
  75563. }
  75564. }
  75565. function buildCreateElementOpeningElementAttributes(file, path, attribs) {
  75566. var runtime = get(file, "runtime");
  75567. {
  75568. if (runtime !== "automatic") {
  75569. var objs = [];
  75570. var _props = attribs.reduce(accumulateAttribute, []);
  75571. if (!useSpread) {
  75572. var start = 0;
  75573. _props.forEach(function (prop, i) {
  75574. if (isSpreadElement(prop)) {
  75575. if (i > start) {
  75576. objs.push(objectExpression(_props.slice(start, i)));
  75577. }
  75578. objs.push(prop.argument);
  75579. start = i + 1;
  75580. }
  75581. });
  75582. if (_props.length > start) {
  75583. objs.push(objectExpression(_props.slice(start)));
  75584. }
  75585. } else if (_props.length) {
  75586. objs.push(objectExpression(_props));
  75587. }
  75588. if (!objs.length) {
  75589. return nullLiteral();
  75590. }
  75591. if (objs.length === 1) {
  75592. return objs[0];
  75593. }
  75594. if (!isObjectExpression(objs[0])) {
  75595. objs.unshift(objectExpression([]));
  75596. }
  75597. var helper = useBuiltIns ? memberExpression(identifier("Object"), identifier("assign")) : file.addHelper("extends");
  75598. return callExpression(helper, objs);
  75599. }
  75600. }
  75601. var props = [];
  75602. var found = Object.create(null);
  75603. for (var _iterator4 = _createForOfIteratorHelperLoose(attribs), _step4; !(_step4 = _iterator4()).done;) {
  75604. var attr = _step4.value;
  75605. var _name3 = isJSXAttribute(attr) && isJSXIdentifier(attr.name) && attr.name.name;
  75606. if (runtime === "automatic" && (_name3 === "__source" || _name3 === "__self")) {
  75607. if (found[_name3]) throw sourceSelfError(path, _name3);
  75608. found[_name3] = true;
  75609. }
  75610. accumulateAttribute(props, attr);
  75611. }
  75612. return props.length === 1 && isSpreadElement(props[0]) ? props[0].argument : props.length > 0 ? objectExpression(props) : nullLiteral();
  75613. }
  75614. });
  75615. function getSource(source, importName) {
  75616. switch (importName) {
  75617. case "Fragment":
  75618. return source + "/" + (development ? "jsx-dev-runtime" : "jsx-runtime");
  75619. case "jsxDEV":
  75620. return source + "/jsx-dev-runtime";
  75621. case "jsx":
  75622. case "jsxs":
  75623. return source + "/jsx-runtime";
  75624. case "createElement":
  75625. return source;
  75626. }
  75627. }
  75628. function createImportLazily(pass, path, importName, source) {
  75629. return function () {
  75630. var actualSource = getSource(source, importName);
  75631. if (isModule(path)) {
  75632. var reference = get(pass, "imports/" + importName);
  75633. if (reference) return cloneNode(reference);
  75634. reference = addNamed(path, importName, actualSource, {
  75635. importedInterop: "uncompiled",
  75636. importPosition: "after"
  75637. });
  75638. set(pass, "imports/" + importName, reference);
  75639. return reference;
  75640. } else {
  75641. var _reference = get(pass, "requires/" + actualSource);
  75642. if (_reference) {
  75643. _reference = cloneNode(_reference);
  75644. } else {
  75645. _reference = addNamespace(path, actualSource, {
  75646. importedInterop: "uncompiled"
  75647. });
  75648. set(pass, "requires/" + actualSource, _reference);
  75649. }
  75650. return memberExpression(_reference, identifier(importName));
  75651. }
  75652. };
  75653. }
  75654. }
  75655. function toMemberExpression(id) {
  75656. return id.split(".").map(function (name) {
  75657. return identifier(name);
  75658. }).reduce(function (object, property) {
  75659. return memberExpression(object, property);
  75660. });
  75661. }
  75662. function makeSource(path, state) {
  75663. var location = path.node.loc;
  75664. if (!location) {
  75665. return path.scope.buildUndefinedNode();
  75666. }
  75667. if (!state.fileNameIdentifier) {
  75668. var _state$filename = state.filename,
  75669. filename = _state$filename === void 0 ? "" : _state$filename;
  75670. var fileNameIdentifier = path.scope.generateUidIdentifier("_jsxFileName");
  75671. var scope = path.hub.getScope();
  75672. if (scope) {
  75673. scope.push({
  75674. id: fileNameIdentifier,
  75675. init: stringLiteral(filename)
  75676. });
  75677. }
  75678. state.fileNameIdentifier = fileNameIdentifier;
  75679. }
  75680. return makeTrace(cloneNode(state.fileNameIdentifier), location.start.line, location.start.column);
  75681. }
  75682. function makeTrace(fileNameIdentifier, lineNumber, column0Based) {
  75683. var fileLineLiteral = lineNumber != null ? numericLiteral(lineNumber) : nullLiteral();
  75684. var fileColumnLiteral = column0Based != null ? numericLiteral(column0Based + 1) : nullLiteral();
  75685. var fileNameProperty = objectProperty(identifier("fileName"), fileNameIdentifier);
  75686. var lineNumberProperty = objectProperty(identifier("lineNumber"), fileLineLiteral);
  75687. var columnNumberProperty = objectProperty(identifier("columnNumber"), fileColumnLiteral);
  75688. return objectExpression([fileNameProperty, lineNumberProperty, columnNumberProperty]);
  75689. }
  75690. function sourceSelfError(path, name) {
  75691. var pluginName = "transform-react-jsx-" + name.slice(2);
  75692. return path.buildCodeFrameError("Duplicate " + name + " prop found. You are most likely using the deprecated " + pluginName + " Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.");
  75693. }
  75694. var transformReactJSX = createPlugin({
  75695. name: "transform-react-jsx",
  75696. development: false
  75697. });
  75698. var transformReactJsxCompat = declare(function (api) {
  75699. api.assertVersion(7);
  75700. return {
  75701. name: "transform-react-jsx-compat",
  75702. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  75703. parserOpts.plugins.push("jsx");
  75704. },
  75705. visitor: helper({
  75706. pre: function pre(state) {
  75707. state.callee = state.tagExpr;
  75708. },
  75709. post: function post(state) {
  75710. if (react.isCompatTag(state.tagName)) {
  75711. state.call = callExpression(memberExpression(memberExpression(identifier("React"), identifier("DOM")), state.tagExpr, isLiteral(state.tagExpr)), state.args);
  75712. }
  75713. },
  75714. compat: true
  75715. })
  75716. };
  75717. });
  75718. var transformReactJSXDevelopment = createPlugin({
  75719. name: "transform-react-jsx/development",
  75720. development: true
  75721. });
  75722. var TRACE_ID$1 = "__self";
  75723. var transformReactJsxSelf = declare(function (api) {
  75724. api.assertVersion(7);
  75725. var visitor = {
  75726. JSXOpeningElement: function JSXOpeningElement(_ref) {
  75727. var node = _ref.node;
  75728. var id = jsxIdentifier(TRACE_ID$1);
  75729. var trace = thisExpression();
  75730. node.attributes.push(jsxAttribute(id, jsxExpressionContainer(trace)));
  75731. }
  75732. };
  75733. return {
  75734. name: "transform-react-jsx-self",
  75735. visitor: {
  75736. Program: function Program(path) {
  75737. path.traverse(visitor);
  75738. }
  75739. }
  75740. };
  75741. });
  75742. var TRACE_ID = "__source";
  75743. var FILE_NAME_VAR = "_jsxFileName";
  75744. var transformReactJsxSource = declare(function (api) {
  75745. api.assertVersion(7);
  75746. function makeTrace(fileNameIdentifier, lineNumber, column0Based) {
  75747. var fileLineLiteral = lineNumber != null ? numericLiteral(lineNumber) : nullLiteral();
  75748. var fileColumnLiteral = column0Based != null ? numericLiteral(column0Based + 1) : nullLiteral();
  75749. var fileNameProperty = objectProperty(identifier("fileName"), fileNameIdentifier);
  75750. var lineNumberProperty = objectProperty(identifier("lineNumber"), fileLineLiteral);
  75751. var columnNumberProperty = objectProperty(identifier("columnNumber"), fileColumnLiteral);
  75752. return objectExpression([fileNameProperty, lineNumberProperty, columnNumberProperty]);
  75753. }
  75754. var visitor = {
  75755. JSXOpeningElement: function JSXOpeningElement(path, state) {
  75756. var id = jsxIdentifier(TRACE_ID);
  75757. var location = path.container.openingElement.loc;
  75758. if (!location) {
  75759. return;
  75760. }
  75761. var attributes = path.container.openingElement.attributes;
  75762. for (var i = 0; i < attributes.length; i++) {
  75763. var name = attributes[i].name;
  75764. if ((name == null ? void 0 : name.name) === TRACE_ID) {
  75765. return;
  75766. }
  75767. }
  75768. if (!state.fileNameIdentifier) {
  75769. var fileName = state.filename || "";
  75770. var fileNameIdentifier = path.scope.generateUidIdentifier(FILE_NAME_VAR);
  75771. var scope = path.hub.getScope();
  75772. if (scope) {
  75773. scope.push({
  75774. id: fileNameIdentifier,
  75775. init: stringLiteral(fileName)
  75776. });
  75777. }
  75778. state.fileNameIdentifier = fileNameIdentifier;
  75779. }
  75780. var trace = makeTrace(cloneNode(state.fileNameIdentifier), location.start.line, location.start.column);
  75781. attributes.push(jsxAttribute(id, jsxExpressionContainer(trace)));
  75782. }
  75783. };
  75784. return {
  75785. name: "transform-react-jsx-source",
  75786. visitor: visitor
  75787. };
  75788. });
  75789. var _typeof_1 = createCommonjsModule(function (module) {
  75790. function _typeof(obj) {
  75791. "@babel/helpers - typeof";
  75792. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  75793. module.exports = _typeof = function _typeof(obj) {
  75794. return typeof obj;
  75795. };
  75796. module.exports["default"] = module.exports, module.exports.__esModule = true;
  75797. } else {
  75798. module.exports = _typeof = function _typeof(obj) {
  75799. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  75800. };
  75801. module.exports["default"] = module.exports, module.exports.__esModule = true;
  75802. }
  75803. return _typeof(obj);
  75804. }
  75805. module.exports = _typeof;
  75806. module.exports["default"] = module.exports, module.exports.__esModule = true;
  75807. }, "/$$rollup_base$$/node_modules/@babel/runtime/helpers");
  75808. var interopRequireWildcard = createCommonjsModule(function (module) {
  75809. var _typeof = _typeof_1["default"];
  75810. function _getRequireWildcardCache(nodeInterop) {
  75811. if (typeof WeakMap !== "function") return null;
  75812. var cacheBabelInterop = new WeakMap();
  75813. var cacheNodeInterop = new WeakMap();
  75814. return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
  75815. return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
  75816. })(nodeInterop);
  75817. }
  75818. function _interopRequireWildcard(obj, nodeInterop) {
  75819. if (!nodeInterop && obj && obj.__esModule) {
  75820. return obj;
  75821. }
  75822. if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
  75823. return {
  75824. "default": obj
  75825. };
  75826. }
  75827. var cache = _getRequireWildcardCache(nodeInterop);
  75828. if (cache && cache.has(obj)) {
  75829. return cache.get(obj);
  75830. }
  75831. var newObj = {};
  75832. var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
  75833. for (var key in obj) {
  75834. if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
  75835. var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
  75836. if (desc && (desc.get || desc.set)) {
  75837. Object.defineProperty(newObj, key, desc);
  75838. } else {
  75839. newObj[key] = obj[key];
  75840. }
  75841. }
  75842. }
  75843. newObj["default"] = obj;
  75844. if (cache) {
  75845. cache.set(obj, newObj);
  75846. }
  75847. return newObj;
  75848. }
  75849. module.exports = _interopRequireWildcard;
  75850. module.exports["default"] = module.exports, module.exports.__esModule = true;
  75851. }, "/$$rollup_base$$/node_modules/@babel/runtime/helpers");
  75852. var interopRequireDefault = createCommonjsModule(function (module) {
  75853. function _interopRequireDefault(obj) {
  75854. return obj && obj.__esModule ? obj : {
  75855. "default": obj
  75856. };
  75857. }
  75858. module.exports = _interopRequireDefault;
  75859. module.exports["default"] = module.exports, module.exports.__esModule = true;
  75860. }, "/$$rollup_base$$/node_modules/@babel/runtime/helpers");
  75861. var wrapWithTypes_1 = wrapWithTypes;
  75862. var getTypes_1 = getTypes;
  75863. var runtimeProperty_1 = runtimeProperty;
  75864. var isReference_1 = isReference;
  75865. var replaceWithOrRemove_1 = replaceWithOrRemove;
  75866. var currentTypes = null;
  75867. function wrapWithTypes(types, fn) {
  75868. return function () {
  75869. var oldTypes = currentTypes;
  75870. currentTypes = types;
  75871. try {
  75872. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  75873. args[_key] = arguments[_key];
  75874. }
  75875. return fn.apply(this, args);
  75876. } finally {
  75877. currentTypes = oldTypes;
  75878. }
  75879. };
  75880. }
  75881. function getTypes() {
  75882. return currentTypes;
  75883. }
  75884. function runtimeProperty(name) {
  75885. var t = getTypes();
  75886. return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
  75887. }
  75888. function isReference(path) {
  75889. return path.isReferenced() || path.parentPath.isAssignmentExpression({
  75890. left: path.node
  75891. });
  75892. }
  75893. function replaceWithOrRemove(path, replacement) {
  75894. if (replacement) {
  75895. path.replaceWith(replacement);
  75896. } else {
  75897. path.remove();
  75898. }
  75899. }
  75900. var util$3 = Object.defineProperty({
  75901. wrapWithTypes: wrapWithTypes_1,
  75902. getTypes: getTypes_1,
  75903. runtimeProperty: runtimeProperty_1,
  75904. isReference: isReference_1,
  75905. replaceWithOrRemove: replaceWithOrRemove_1
  75906. }, '__esModule', {
  75907. value: true
  75908. });
  75909. var util$2 = interopRequireWildcard(util$3);
  75910. var hasOwn$3 = Object.prototype.hasOwnProperty;
  75911. var hoist_1 = function hoist_1(funPath) {
  75912. var t = util$2.getTypes();
  75913. t.assertFunction(funPath.node);
  75914. var vars = {};
  75915. function varDeclToExpr(_ref, includeIdentifiers) {
  75916. var vdec = _ref.node,
  75917. scope = _ref.scope;
  75918. t.assertVariableDeclaration(vdec);
  75919. var exprs = [];
  75920. vdec.declarations.forEach(function (dec) {
  75921. vars[dec.id.name] = t.identifier(dec.id.name);
  75922. scope.removeBinding(dec.id.name);
  75923. if (dec.init) {
  75924. exprs.push(t.assignmentExpression("=", dec.id, dec.init));
  75925. } else if (includeIdentifiers) {
  75926. exprs.push(dec.id);
  75927. }
  75928. });
  75929. if (exprs.length === 0) return null;
  75930. if (exprs.length === 1) return exprs[0];
  75931. return t.sequenceExpression(exprs);
  75932. }
  75933. funPath.get("body").traverse({
  75934. VariableDeclaration: {
  75935. exit: function exit(path) {
  75936. var expr = varDeclToExpr(path, false);
  75937. if (expr === null) {
  75938. path.remove();
  75939. } else {
  75940. util$2.replaceWithOrRemove(path, t.expressionStatement(expr));
  75941. }
  75942. path.skip();
  75943. }
  75944. },
  75945. ForStatement: function ForStatement(path) {
  75946. var init = path.get("init");
  75947. if (init.isVariableDeclaration()) {
  75948. util$2.replaceWithOrRemove(init, varDeclToExpr(init, false));
  75949. }
  75950. },
  75951. ForXStatement: function ForXStatement(path) {
  75952. var left = path.get("left");
  75953. if (left.isVariableDeclaration()) {
  75954. util$2.replaceWithOrRemove(left, varDeclToExpr(left, true));
  75955. }
  75956. },
  75957. FunctionDeclaration: function FunctionDeclaration(path) {
  75958. var node = path.node;
  75959. vars[node.id.name] = node.id;
  75960. var assignment = t.expressionStatement(t.assignmentExpression("=", t.clone(node.id), t.functionExpression(path.scope.generateUidIdentifierBasedOnNode(node), node.params, node.body, node.generator, node.expression)));
  75961. if (path.parentPath.isBlockStatement()) {
  75962. path.parentPath.unshiftContainer("body", assignment);
  75963. path.remove();
  75964. } else {
  75965. util$2.replaceWithOrRemove(path, assignment);
  75966. }
  75967. path.scope.removeBinding(node.id.name);
  75968. path.skip();
  75969. },
  75970. FunctionExpression: function FunctionExpression(path) {
  75971. path.skip();
  75972. },
  75973. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  75974. path.skip();
  75975. }
  75976. });
  75977. var paramNames = {};
  75978. funPath.get("params").forEach(function (paramPath) {
  75979. var param = paramPath.node;
  75980. if (t.isIdentifier(param)) {
  75981. paramNames[param.name] = param;
  75982. }
  75983. });
  75984. var declarations = [];
  75985. Object.keys(vars).forEach(function (name) {
  75986. if (!hasOwn$3.call(paramNames, name)) {
  75987. declarations.push(t.variableDeclarator(vars[name], null));
  75988. }
  75989. });
  75990. if (declarations.length === 0) {
  75991. return null;
  75992. }
  75993. return t.variableDeclaration("var", declarations);
  75994. };
  75995. var hoist$2 = {
  75996. hoist: hoist_1
  75997. };
  75998. var _assert$3 = interopRequireDefault(assert_1);
  75999. function Entry$1() {
  76000. _assert$3["default"].ok(this instanceof Entry$1);
  76001. }
  76002. function FunctionEntry(returnLoc) {
  76003. Entry$1.call(this);
  76004. (0, util$3.getTypes)().assertLiteral(returnLoc);
  76005. this.returnLoc = returnLoc;
  76006. }
  76007. (0, util$5.inherits)(FunctionEntry, Entry$1);
  76008. var FunctionEntry_1 = FunctionEntry;
  76009. function LoopEntry(breakLoc, continueLoc, label) {
  76010. Entry$1.call(this);
  76011. var t = (0, util$3.getTypes)();
  76012. t.assertLiteral(breakLoc);
  76013. t.assertLiteral(continueLoc);
  76014. if (label) {
  76015. t.assertIdentifier(label);
  76016. } else {
  76017. label = null;
  76018. }
  76019. this.breakLoc = breakLoc;
  76020. this.continueLoc = continueLoc;
  76021. this.label = label;
  76022. }
  76023. (0, util$5.inherits)(LoopEntry, Entry$1);
  76024. var LoopEntry_1 = LoopEntry;
  76025. function SwitchEntry(breakLoc) {
  76026. Entry$1.call(this);
  76027. (0, util$3.getTypes)().assertLiteral(breakLoc);
  76028. this.breakLoc = breakLoc;
  76029. }
  76030. (0, util$5.inherits)(SwitchEntry, Entry$1);
  76031. var SwitchEntry_1 = SwitchEntry;
  76032. function TryEntry(firstLoc, catchEntry, finallyEntry) {
  76033. Entry$1.call(this);
  76034. var t = (0, util$3.getTypes)();
  76035. t.assertLiteral(firstLoc);
  76036. if (catchEntry) {
  76037. _assert$3["default"].ok(catchEntry instanceof CatchEntry);
  76038. } else {
  76039. catchEntry = null;
  76040. }
  76041. if (finallyEntry) {
  76042. _assert$3["default"].ok(finallyEntry instanceof FinallyEntry);
  76043. } else {
  76044. finallyEntry = null;
  76045. }
  76046. _assert$3["default"].ok(catchEntry || finallyEntry);
  76047. this.firstLoc = firstLoc;
  76048. this.catchEntry = catchEntry;
  76049. this.finallyEntry = finallyEntry;
  76050. }
  76051. (0, util$5.inherits)(TryEntry, Entry$1);
  76052. var TryEntry_1 = TryEntry;
  76053. function CatchEntry(firstLoc, paramId) {
  76054. Entry$1.call(this);
  76055. var t = (0, util$3.getTypes)();
  76056. t.assertLiteral(firstLoc);
  76057. t.assertIdentifier(paramId);
  76058. this.firstLoc = firstLoc;
  76059. this.paramId = paramId;
  76060. }
  76061. (0, util$5.inherits)(CatchEntry, Entry$1);
  76062. var CatchEntry_1 = CatchEntry;
  76063. function FinallyEntry(firstLoc, afterLoc) {
  76064. Entry$1.call(this);
  76065. var t = (0, util$3.getTypes)();
  76066. t.assertLiteral(firstLoc);
  76067. t.assertLiteral(afterLoc);
  76068. this.firstLoc = firstLoc;
  76069. this.afterLoc = afterLoc;
  76070. }
  76071. (0, util$5.inherits)(FinallyEntry, Entry$1);
  76072. var FinallyEntry_1 = FinallyEntry;
  76073. function LabeledEntry(breakLoc, label) {
  76074. Entry$1.call(this);
  76075. var t = (0, util$3.getTypes)();
  76076. t.assertLiteral(breakLoc);
  76077. t.assertIdentifier(label);
  76078. this.breakLoc = breakLoc;
  76079. this.label = label;
  76080. }
  76081. (0, util$5.inherits)(LabeledEntry, Entry$1);
  76082. var LabeledEntry_1 = LabeledEntry;
  76083. function LeapManager(emitter) {
  76084. _assert$3["default"].ok(this instanceof LeapManager);
  76085. _assert$3["default"].ok(emitter instanceof emit.Emitter);
  76086. this.emitter = emitter;
  76087. this.entryStack = [new FunctionEntry(emitter.finalLoc)];
  76088. }
  76089. var LMp = LeapManager.prototype;
  76090. var LeapManager_1 = LeapManager;
  76091. LMp.withEntry = function (entry, callback) {
  76092. _assert$3["default"].ok(entry instanceof Entry$1);
  76093. this.entryStack.push(entry);
  76094. try {
  76095. callback.call(this.emitter);
  76096. } finally {
  76097. var popped = this.entryStack.pop();
  76098. _assert$3["default"].strictEqual(popped, entry);
  76099. }
  76100. };
  76101. LMp._findLeapLocation = function (property, label) {
  76102. for (var i = this.entryStack.length - 1; i >= 0; --i) {
  76103. var entry = this.entryStack[i];
  76104. var loc = entry[property];
  76105. if (loc) {
  76106. if (label) {
  76107. if (entry.label && entry.label.name === label.name) {
  76108. return loc;
  76109. }
  76110. } else if (entry instanceof LabeledEntry) ; else {
  76111. return loc;
  76112. }
  76113. }
  76114. }
  76115. return null;
  76116. };
  76117. LMp.getBreakLoc = function (label) {
  76118. return this._findLeapLocation("breakLoc", label);
  76119. };
  76120. LMp.getContinueLoc = function (label) {
  76121. return this._findLeapLocation("continueLoc", label);
  76122. };
  76123. var leap$1 = {
  76124. FunctionEntry: FunctionEntry_1,
  76125. LoopEntry: LoopEntry_1,
  76126. SwitchEntry: SwitchEntry_1,
  76127. TryEntry: TryEntry_1,
  76128. CatchEntry: CatchEntry_1,
  76129. FinallyEntry: FinallyEntry_1,
  76130. LabeledEntry: LabeledEntry_1,
  76131. LeapManager: LeapManager_1
  76132. };
  76133. var originalObject = Object;
  76134. var originalDefProp = Object.defineProperty;
  76135. var originalCreate = Object.create;
  76136. function defProp(obj, name, value) {
  76137. if (originalDefProp) try {
  76138. originalDefProp.call(originalObject, obj, name, {
  76139. value: value
  76140. });
  76141. } catch (definePropertyIsBrokenInIE8) {
  76142. obj[name] = value;
  76143. } else {
  76144. obj[name] = value;
  76145. }
  76146. }
  76147. function makeSafeToCall(fun) {
  76148. if (fun) {
  76149. defProp(fun, "call", fun.call);
  76150. defProp(fun, "apply", fun.apply);
  76151. }
  76152. return fun;
  76153. }
  76154. makeSafeToCall(originalDefProp);
  76155. makeSafeToCall(originalCreate);
  76156. var hasOwn$2 = makeSafeToCall(Object.prototype.hasOwnProperty);
  76157. var numToStr = makeSafeToCall(Number.prototype.toString);
  76158. var strSlice = makeSafeToCall(String.prototype.slice);
  76159. var cloner = function cloner() {};
  76160. function create(prototype) {
  76161. if (originalCreate) {
  76162. return originalCreate.call(originalObject, prototype);
  76163. }
  76164. cloner.prototype = prototype || null;
  76165. return new cloner();
  76166. }
  76167. var rand = Math.random;
  76168. var uniqueKeys = create(null);
  76169. function makeUniqueKey() {
  76170. do {
  76171. var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2));
  76172. } while (hasOwn$2.call(uniqueKeys, uniqueKey));
  76173. return uniqueKeys[uniqueKey] = uniqueKey;
  76174. }
  76175. function internString(str) {
  76176. var obj = {};
  76177. obj[str] = true;
  76178. return Object.keys(obj)[0];
  76179. }
  76180. var makeUniqueKey_1 = makeUniqueKey;
  76181. var originalGetOPNs = Object.getOwnPropertyNames;
  76182. Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
  76183. for (var names = originalGetOPNs(object), src = 0, dst = 0, len = names.length; src < len; ++src) {
  76184. if (!hasOwn$2.call(uniqueKeys, names[src])) {
  76185. if (src > dst) {
  76186. names[dst] = names[src];
  76187. }
  76188. ++dst;
  76189. }
  76190. }
  76191. names.length = dst;
  76192. return names;
  76193. };
  76194. function defaultCreatorFn(object) {
  76195. return create(null);
  76196. }
  76197. function makeAccessor(secretCreatorFn) {
  76198. var brand = makeUniqueKey();
  76199. var passkey = create(null);
  76200. secretCreatorFn = secretCreatorFn || defaultCreatorFn;
  76201. function register(object) {
  76202. var secret;
  76203. function vault(key, forget) {
  76204. if (key === passkey) {
  76205. return forget ? secret = null : secret || (secret = secretCreatorFn(object));
  76206. }
  76207. }
  76208. defProp(object, brand, vault);
  76209. }
  76210. function accessor(object) {
  76211. if (!hasOwn$2.call(object, brand)) register(object);
  76212. return object[brand](passkey);
  76213. }
  76214. accessor.forget = function (object) {
  76215. if (hasOwn$2.call(object, brand)) object[brand](passkey, true);
  76216. };
  76217. return accessor;
  76218. }
  76219. var makeAccessor_1 = makeAccessor;
  76220. var _private = {
  76221. makeUniqueKey: makeUniqueKey_1,
  76222. makeAccessor: makeAccessor_1
  76223. };
  76224. var _assert$2 = interopRequireDefault(assert_1);
  76225. var m = (0, _private.makeAccessor)();
  76226. var hasOwn$1 = Object.prototype.hasOwnProperty;
  76227. function makePredicate(propertyName, knownTypes) {
  76228. function onlyChildren(node) {
  76229. var t = (0, util$3.getTypes)();
  76230. t.assertNode(node);
  76231. var result = false;
  76232. function check(child) {
  76233. if (result) ; else if (Array.isArray(child)) {
  76234. child.some(check);
  76235. } else if (t.isNode(child)) {
  76236. _assert$2["default"].strictEqual(result, false);
  76237. result = predicate(child);
  76238. }
  76239. return result;
  76240. }
  76241. var keys = t.VISITOR_KEYS[node.type];
  76242. if (keys) {
  76243. for (var i = 0; i < keys.length; i++) {
  76244. var key = keys[i];
  76245. var child = node[key];
  76246. check(child);
  76247. }
  76248. }
  76249. return result;
  76250. }
  76251. function predicate(node) {
  76252. (0, util$3.getTypes)().assertNode(node);
  76253. var meta = m(node);
  76254. if (hasOwn$1.call(meta, propertyName)) return meta[propertyName];
  76255. if (hasOwn$1.call(opaqueTypes, node.type)) return meta[propertyName] = false;
  76256. if (hasOwn$1.call(knownTypes, node.type)) return meta[propertyName] = true;
  76257. return meta[propertyName] = onlyChildren(node);
  76258. }
  76259. predicate.onlyChildren = onlyChildren;
  76260. return predicate;
  76261. }
  76262. var opaqueTypes = {
  76263. FunctionExpression: true,
  76264. ArrowFunctionExpression: true
  76265. };
  76266. var sideEffectTypes = {
  76267. CallExpression: true,
  76268. ForInStatement: true,
  76269. UnaryExpression: true,
  76270. BinaryExpression: true,
  76271. AssignmentExpression: true,
  76272. UpdateExpression: true,
  76273. NewExpression: true
  76274. };
  76275. var leapTypes = {
  76276. YieldExpression: true,
  76277. BreakStatement: true,
  76278. ContinueStatement: true,
  76279. ReturnStatement: true,
  76280. ThrowStatement: true
  76281. };
  76282. for (var type in leapTypes) {
  76283. if (hasOwn$1.call(leapTypes, type)) {
  76284. sideEffectTypes[type] = leapTypes[type];
  76285. }
  76286. }
  76287. var hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes);
  76288. var containsLeap = makePredicate("containsLeap", leapTypes);
  76289. var meta$1 = {
  76290. hasSideEffects: hasSideEffects,
  76291. containsLeap: containsLeap
  76292. };
  76293. var _assert$1 = interopRequireDefault(assert_1);
  76294. var leap = interopRequireWildcard(leap$1);
  76295. var meta = interopRequireWildcard(meta$1);
  76296. var util$1 = interopRequireWildcard(util$3);
  76297. var hasOwn = Object.prototype.hasOwnProperty;
  76298. function Emitter(contextId) {
  76299. _assert$1["default"].ok(this instanceof Emitter);
  76300. util$1.getTypes().assertIdentifier(contextId);
  76301. this.nextTempId = 0;
  76302. this.contextId = contextId;
  76303. this.listing = [];
  76304. this.marked = [true];
  76305. this.insertedLocs = new Set();
  76306. this.finalLoc = this.loc();
  76307. this.tryEntries = [];
  76308. this.leapManager = new leap.LeapManager(this);
  76309. }
  76310. var Ep = Emitter.prototype;
  76311. var Emitter_1 = Emitter;
  76312. Ep.loc = function () {
  76313. var l = util$1.getTypes().numericLiteral(-1);
  76314. this.insertedLocs.add(l);
  76315. return l;
  76316. };
  76317. Ep.getInsertedLocs = function () {
  76318. return this.insertedLocs;
  76319. };
  76320. Ep.getContextId = function () {
  76321. return util$1.getTypes().clone(this.contextId);
  76322. };
  76323. Ep.mark = function (loc) {
  76324. util$1.getTypes().assertLiteral(loc);
  76325. var index = this.listing.length;
  76326. if (loc.value === -1) {
  76327. loc.value = index;
  76328. } else {
  76329. _assert$1["default"].strictEqual(loc.value, index);
  76330. }
  76331. this.marked[index] = true;
  76332. return loc;
  76333. };
  76334. Ep.emit = function (node) {
  76335. var t = util$1.getTypes();
  76336. if (t.isExpression(node)) {
  76337. node = t.expressionStatement(node);
  76338. }
  76339. t.assertStatement(node);
  76340. this.listing.push(node);
  76341. };
  76342. Ep.emitAssign = function (lhs, rhs) {
  76343. this.emit(this.assign(lhs, rhs));
  76344. return lhs;
  76345. };
  76346. Ep.assign = function (lhs, rhs) {
  76347. var t = util$1.getTypes();
  76348. return t.expressionStatement(t.assignmentExpression("=", t.cloneDeep(lhs), rhs));
  76349. };
  76350. Ep.contextProperty = function (name, computed) {
  76351. var t = util$1.getTypes();
  76352. return t.memberExpression(this.getContextId(), computed ? t.stringLiteral(name) : t.identifier(name), !!computed);
  76353. };
  76354. Ep.stop = function (rval) {
  76355. if (rval) {
  76356. this.setReturnValue(rval);
  76357. }
  76358. this.jump(this.finalLoc);
  76359. };
  76360. Ep.setReturnValue = function (valuePath) {
  76361. util$1.getTypes().assertExpression(valuePath.value);
  76362. this.emitAssign(this.contextProperty("rval"), this.explodeExpression(valuePath));
  76363. };
  76364. Ep.clearPendingException = function (tryLoc, assignee) {
  76365. var t = util$1.getTypes();
  76366. t.assertLiteral(tryLoc);
  76367. var catchCall = t.callExpression(this.contextProperty("catch", true), [t.clone(tryLoc)]);
  76368. if (assignee) {
  76369. this.emitAssign(assignee, catchCall);
  76370. } else {
  76371. this.emit(catchCall);
  76372. }
  76373. };
  76374. Ep.jump = function (toLoc) {
  76375. this.emitAssign(this.contextProperty("next"), toLoc);
  76376. this.emit(util$1.getTypes().breakStatement());
  76377. };
  76378. Ep.jumpIf = function (test, toLoc) {
  76379. var t = util$1.getTypes();
  76380. t.assertExpression(test);
  76381. t.assertLiteral(toLoc);
  76382. this.emit(t.ifStatement(test, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  76383. };
  76384. Ep.jumpIfNot = function (test, toLoc) {
  76385. var t = util$1.getTypes();
  76386. t.assertExpression(test);
  76387. t.assertLiteral(toLoc);
  76388. var negatedTest;
  76389. if (t.isUnaryExpression(test) && test.operator === "!") {
  76390. negatedTest = test.argument;
  76391. } else {
  76392. negatedTest = t.unaryExpression("!", test);
  76393. }
  76394. this.emit(t.ifStatement(negatedTest, t.blockStatement([this.assign(this.contextProperty("next"), toLoc), t.breakStatement()])));
  76395. };
  76396. Ep.makeTempVar = function () {
  76397. return this.contextProperty("t" + this.nextTempId++);
  76398. };
  76399. Ep.getContextFunction = function (id) {
  76400. var t = util$1.getTypes();
  76401. return t.functionExpression(id || null, [this.getContextId()], t.blockStatement([this.getDispatchLoop()]), false, false);
  76402. };
  76403. Ep.getDispatchLoop = function () {
  76404. var self = this;
  76405. var t = util$1.getTypes();
  76406. var cases = [];
  76407. var current;
  76408. var alreadyEnded = false;
  76409. self.listing.forEach(function (stmt, i) {
  76410. if (self.marked.hasOwnProperty(i)) {
  76411. cases.push(t.switchCase(t.numericLiteral(i), current = []));
  76412. alreadyEnded = false;
  76413. }
  76414. if (!alreadyEnded) {
  76415. current.push(stmt);
  76416. if (t.isCompletionStatement(stmt)) alreadyEnded = true;
  76417. }
  76418. });
  76419. this.finalLoc.value = this.listing.length;
  76420. cases.push(t.switchCase(this.finalLoc, []), t.switchCase(t.stringLiteral("end"), [t.returnStatement(t.callExpression(this.contextProperty("stop"), []))]));
  76421. return t.whileStatement(t.numericLiteral(1), t.switchStatement(t.assignmentExpression("=", this.contextProperty("prev"), this.contextProperty("next")), cases));
  76422. };
  76423. Ep.getTryLocsList = function () {
  76424. if (this.tryEntries.length === 0) {
  76425. return null;
  76426. }
  76427. var t = util$1.getTypes();
  76428. var lastLocValue = 0;
  76429. return t.arrayExpression(this.tryEntries.map(function (tryEntry) {
  76430. var thisLocValue = tryEntry.firstLoc.value;
  76431. _assert$1["default"].ok(thisLocValue >= lastLocValue, "try entries out of order");
  76432. lastLocValue = thisLocValue;
  76433. var ce = tryEntry.catchEntry;
  76434. var fe = tryEntry.finallyEntry;
  76435. var locs = [tryEntry.firstLoc, ce ? ce.firstLoc : null];
  76436. if (fe) {
  76437. locs[2] = fe.firstLoc;
  76438. locs[3] = fe.afterLoc;
  76439. }
  76440. return t.arrayExpression(locs.map(function (loc) {
  76441. return loc && t.clone(loc);
  76442. }));
  76443. }));
  76444. };
  76445. Ep.explode = function (path, ignoreResult) {
  76446. var t = util$1.getTypes();
  76447. var node = path.node;
  76448. var self = this;
  76449. t.assertNode(node);
  76450. if (t.isDeclaration(node)) throw getDeclError(node);
  76451. if (t.isStatement(node)) return self.explodeStatement(path);
  76452. if (t.isExpression(node)) return self.explodeExpression(path, ignoreResult);
  76453. switch (node.type) {
  76454. case "Program":
  76455. return path.get("body").map(self.explodeStatement, self);
  76456. case "VariableDeclarator":
  76457. throw getDeclError(node);
  76458. case "Property":
  76459. case "SwitchCase":
  76460. case "CatchClause":
  76461. throw new Error(node.type + " nodes should be handled by their parents");
  76462. default:
  76463. throw new Error("unknown Node of type " + JSON.stringify(node.type));
  76464. }
  76465. };
  76466. function getDeclError(node) {
  76467. return new Error("all declarations should have been transformed into " + "assignments before the Exploder began its work: " + JSON.stringify(node));
  76468. }
  76469. Ep.explodeStatement = function (path, labelId) {
  76470. var t = util$1.getTypes();
  76471. var stmt = path.node;
  76472. var self = this;
  76473. var before, after, head;
  76474. t.assertStatement(stmt);
  76475. if (labelId) {
  76476. t.assertIdentifier(labelId);
  76477. } else {
  76478. labelId = null;
  76479. }
  76480. if (t.isBlockStatement(stmt)) {
  76481. path.get("body").forEach(function (path) {
  76482. self.explodeStatement(path);
  76483. });
  76484. return;
  76485. }
  76486. if (!meta.containsLeap(stmt)) {
  76487. self.emit(stmt);
  76488. return;
  76489. }
  76490. switch (stmt.type) {
  76491. case "ExpressionStatement":
  76492. self.explodeExpression(path.get("expression"), true);
  76493. break;
  76494. case "LabeledStatement":
  76495. after = this.loc();
  76496. self.leapManager.withEntry(new leap.LabeledEntry(after, stmt.label), function () {
  76497. self.explodeStatement(path.get("body"), stmt.label);
  76498. });
  76499. self.mark(after);
  76500. break;
  76501. case "WhileStatement":
  76502. before = this.loc();
  76503. after = this.loc();
  76504. self.mark(before);
  76505. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  76506. self.leapManager.withEntry(new leap.LoopEntry(after, before, labelId), function () {
  76507. self.explodeStatement(path.get("body"));
  76508. });
  76509. self.jump(before);
  76510. self.mark(after);
  76511. break;
  76512. case "DoWhileStatement":
  76513. var first = this.loc();
  76514. var test = this.loc();
  76515. after = this.loc();
  76516. self.mark(first);
  76517. self.leapManager.withEntry(new leap.LoopEntry(after, test, labelId), function () {
  76518. self.explode(path.get("body"));
  76519. });
  76520. self.mark(test);
  76521. self.jumpIf(self.explodeExpression(path.get("test")), first);
  76522. self.mark(after);
  76523. break;
  76524. case "ForStatement":
  76525. head = this.loc();
  76526. var update = this.loc();
  76527. after = this.loc();
  76528. if (stmt.init) {
  76529. self.explode(path.get("init"), true);
  76530. }
  76531. self.mark(head);
  76532. if (stmt.test) {
  76533. self.jumpIfNot(self.explodeExpression(path.get("test")), after);
  76534. }
  76535. self.leapManager.withEntry(new leap.LoopEntry(after, update, labelId), function () {
  76536. self.explodeStatement(path.get("body"));
  76537. });
  76538. self.mark(update);
  76539. if (stmt.update) {
  76540. self.explode(path.get("update"), true);
  76541. }
  76542. self.jump(head);
  76543. self.mark(after);
  76544. break;
  76545. case "TypeCastExpression":
  76546. return self.explodeExpression(path.get("expression"));
  76547. case "ForInStatement":
  76548. head = this.loc();
  76549. after = this.loc();
  76550. var keyIterNextFn = self.makeTempVar();
  76551. self.emitAssign(keyIterNextFn, t.callExpression(util$1.runtimeProperty("keys"), [self.explodeExpression(path.get("right"))]));
  76552. self.mark(head);
  76553. var keyInfoTmpVar = self.makeTempVar();
  76554. self.jumpIf(t.memberExpression(t.assignmentExpression("=", keyInfoTmpVar, t.callExpression(t.cloneDeep(keyIterNextFn), [])), t.identifier("done"), false), after);
  76555. self.emitAssign(stmt.left, t.memberExpression(t.cloneDeep(keyInfoTmpVar), t.identifier("value"), false));
  76556. self.leapManager.withEntry(new leap.LoopEntry(after, head, labelId), function () {
  76557. self.explodeStatement(path.get("body"));
  76558. });
  76559. self.jump(head);
  76560. self.mark(after);
  76561. break;
  76562. case "BreakStatement":
  76563. self.emitAbruptCompletion({
  76564. type: "break",
  76565. target: self.leapManager.getBreakLoc(stmt.label)
  76566. });
  76567. break;
  76568. case "ContinueStatement":
  76569. self.emitAbruptCompletion({
  76570. type: "continue",
  76571. target: self.leapManager.getContinueLoc(stmt.label)
  76572. });
  76573. break;
  76574. case "SwitchStatement":
  76575. var disc = self.emitAssign(self.makeTempVar(), self.explodeExpression(path.get("discriminant")));
  76576. after = this.loc();
  76577. var defaultLoc = this.loc();
  76578. var condition = defaultLoc;
  76579. var caseLocs = [];
  76580. var cases = stmt.cases || [];
  76581. for (var i = cases.length - 1; i >= 0; --i) {
  76582. var c = cases[i];
  76583. t.assertSwitchCase(c);
  76584. if (c.test) {
  76585. condition = t.conditionalExpression(t.binaryExpression("===", t.cloneDeep(disc), c.test), caseLocs[i] = this.loc(), condition);
  76586. } else {
  76587. caseLocs[i] = defaultLoc;
  76588. }
  76589. }
  76590. var discriminant = path.get("discriminant");
  76591. util$1.replaceWithOrRemove(discriminant, condition);
  76592. self.jump(self.explodeExpression(discriminant));
  76593. self.leapManager.withEntry(new leap.SwitchEntry(after), function () {
  76594. path.get("cases").forEach(function (casePath) {
  76595. var i = casePath.key;
  76596. self.mark(caseLocs[i]);
  76597. casePath.get("consequent").forEach(function (path) {
  76598. self.explodeStatement(path);
  76599. });
  76600. });
  76601. });
  76602. self.mark(after);
  76603. if (defaultLoc.value === -1) {
  76604. self.mark(defaultLoc);
  76605. _assert$1["default"].strictEqual(after.value, defaultLoc.value);
  76606. }
  76607. break;
  76608. case "IfStatement":
  76609. var elseLoc = stmt.alternate && this.loc();
  76610. after = this.loc();
  76611. self.jumpIfNot(self.explodeExpression(path.get("test")), elseLoc || after);
  76612. self.explodeStatement(path.get("consequent"));
  76613. if (elseLoc) {
  76614. self.jump(after);
  76615. self.mark(elseLoc);
  76616. self.explodeStatement(path.get("alternate"));
  76617. }
  76618. self.mark(after);
  76619. break;
  76620. case "ReturnStatement":
  76621. self.emitAbruptCompletion({
  76622. type: "return",
  76623. value: self.explodeExpression(path.get("argument"))
  76624. });
  76625. break;
  76626. case "WithStatement":
  76627. throw new Error("WithStatement not supported in generator functions.");
  76628. case "TryStatement":
  76629. after = this.loc();
  76630. var handler = stmt.handler;
  76631. var catchLoc = handler && this.loc();
  76632. var catchEntry = catchLoc && new leap.CatchEntry(catchLoc, handler.param);
  76633. var finallyLoc = stmt.finalizer && this.loc();
  76634. var finallyEntry = finallyLoc && new leap.FinallyEntry(finallyLoc, after);
  76635. var tryEntry = new leap.TryEntry(self.getUnmarkedCurrentLoc(), catchEntry, finallyEntry);
  76636. self.tryEntries.push(tryEntry);
  76637. self.updateContextPrevLoc(tryEntry.firstLoc);
  76638. self.leapManager.withEntry(tryEntry, function () {
  76639. self.explodeStatement(path.get("block"));
  76640. if (catchLoc) {
  76641. if (finallyLoc) {
  76642. self.jump(finallyLoc);
  76643. } else {
  76644. self.jump(after);
  76645. }
  76646. self.updateContextPrevLoc(self.mark(catchLoc));
  76647. var bodyPath = path.get("handler.body");
  76648. var safeParam = self.makeTempVar();
  76649. self.clearPendingException(tryEntry.firstLoc, safeParam);
  76650. bodyPath.traverse(catchParamVisitor, {
  76651. getSafeParam: function getSafeParam() {
  76652. return t.cloneDeep(safeParam);
  76653. },
  76654. catchParamName: handler.param.name
  76655. });
  76656. self.leapManager.withEntry(catchEntry, function () {
  76657. self.explodeStatement(bodyPath);
  76658. });
  76659. }
  76660. if (finallyLoc) {
  76661. self.updateContextPrevLoc(self.mark(finallyLoc));
  76662. self.leapManager.withEntry(finallyEntry, function () {
  76663. self.explodeStatement(path.get("finalizer"));
  76664. });
  76665. self.emit(t.returnStatement(t.callExpression(self.contextProperty("finish"), [finallyEntry.firstLoc])));
  76666. }
  76667. });
  76668. self.mark(after);
  76669. break;
  76670. case "ThrowStatement":
  76671. self.emit(t.throwStatement(self.explodeExpression(path.get("argument"))));
  76672. break;
  76673. default:
  76674. throw new Error("unknown Statement of type " + JSON.stringify(stmt.type));
  76675. }
  76676. };
  76677. var catchParamVisitor = {
  76678. Identifier: function Identifier(path, state) {
  76679. if (path.node.name === state.catchParamName && util$1.isReference(path)) {
  76680. util$1.replaceWithOrRemove(path, state.getSafeParam());
  76681. }
  76682. },
  76683. Scope: function Scope(path, state) {
  76684. if (path.scope.hasOwnBinding(state.catchParamName)) {
  76685. path.skip();
  76686. }
  76687. }
  76688. };
  76689. Ep.emitAbruptCompletion = function (record) {
  76690. if (!isValidCompletion(record)) {
  76691. _assert$1["default"].ok(false, "invalid completion record: " + JSON.stringify(record));
  76692. }
  76693. _assert$1["default"].notStrictEqual(record.type, "normal", "normal completions are not abrupt");
  76694. var t = util$1.getTypes();
  76695. var abruptArgs = [t.stringLiteral(record.type)];
  76696. if (record.type === "break" || record.type === "continue") {
  76697. t.assertLiteral(record.target);
  76698. abruptArgs[1] = this.insertedLocs.has(record.target) ? record.target : t.cloneDeep(record.target);
  76699. } else if (record.type === "return" || record.type === "throw") {
  76700. if (record.value) {
  76701. t.assertExpression(record.value);
  76702. abruptArgs[1] = this.insertedLocs.has(record.value) ? record.value : t.cloneDeep(record.value);
  76703. }
  76704. }
  76705. this.emit(t.returnStatement(t.callExpression(this.contextProperty("abrupt"), abruptArgs)));
  76706. };
  76707. function isValidCompletion(record) {
  76708. var type = record.type;
  76709. if (type === "normal") {
  76710. return !hasOwn.call(record, "target");
  76711. }
  76712. if (type === "break" || type === "continue") {
  76713. return !hasOwn.call(record, "value") && util$1.getTypes().isLiteral(record.target);
  76714. }
  76715. if (type === "return" || type === "throw") {
  76716. return hasOwn.call(record, "value") && !hasOwn.call(record, "target");
  76717. }
  76718. return false;
  76719. }
  76720. Ep.getUnmarkedCurrentLoc = function () {
  76721. return util$1.getTypes().numericLiteral(this.listing.length);
  76722. };
  76723. Ep.updateContextPrevLoc = function (loc) {
  76724. var t = util$1.getTypes();
  76725. if (loc) {
  76726. t.assertLiteral(loc);
  76727. if (loc.value === -1) {
  76728. loc.value = this.listing.length;
  76729. } else {
  76730. _assert$1["default"].strictEqual(loc.value, this.listing.length);
  76731. }
  76732. } else {
  76733. loc = this.getUnmarkedCurrentLoc();
  76734. }
  76735. this.emitAssign(this.contextProperty("prev"), loc);
  76736. };
  76737. Ep.explodeExpression = function (path, ignoreResult) {
  76738. var t = util$1.getTypes();
  76739. var expr = path.node;
  76740. if (expr) {
  76741. t.assertExpression(expr);
  76742. } else {
  76743. return expr;
  76744. }
  76745. var self = this;
  76746. var result;
  76747. var after;
  76748. function finish(expr) {
  76749. t.assertExpression(expr);
  76750. if (ignoreResult) {
  76751. self.emit(expr);
  76752. } else {
  76753. return expr;
  76754. }
  76755. }
  76756. if (!meta.containsLeap(expr)) {
  76757. return finish(expr);
  76758. }
  76759. var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);
  76760. function explodeViaTempVar(tempVar, childPath, ignoreChildResult) {
  76761. _assert$1["default"].ok(!ignoreChildResult || !tempVar, "Ignoring the result of a child expression but forcing it to " + "be assigned to a temporary variable?");
  76762. var result = self.explodeExpression(childPath, ignoreChildResult);
  76763. if (ignoreChildResult) ; else if (tempVar || hasLeapingChildren && !t.isLiteral(result)) {
  76764. result = self.emitAssign(tempVar || self.makeTempVar(), result);
  76765. }
  76766. return result;
  76767. }
  76768. switch (expr.type) {
  76769. case "MemberExpression":
  76770. return finish(t.memberExpression(self.explodeExpression(path.get("object")), expr.computed ? explodeViaTempVar(null, path.get("property")) : expr.property, expr.computed));
  76771. case "CallExpression":
  76772. var calleePath = path.get("callee");
  76773. var argsPath = path.get("arguments");
  76774. var newCallee;
  76775. var newArgs = [];
  76776. var hasLeapingArgs = false;
  76777. argsPath.forEach(function (argPath) {
  76778. hasLeapingArgs = hasLeapingArgs || meta.containsLeap(argPath.node);
  76779. });
  76780. if (t.isMemberExpression(calleePath.node)) {
  76781. if (hasLeapingArgs) {
  76782. var newObject = explodeViaTempVar(self.makeTempVar(), calleePath.get("object"));
  76783. var newProperty = calleePath.node.computed ? explodeViaTempVar(null, calleePath.get("property")) : calleePath.node.property;
  76784. newArgs.unshift(newObject);
  76785. newCallee = t.memberExpression(t.memberExpression(t.cloneDeep(newObject), newProperty, calleePath.node.computed), t.identifier("call"), false);
  76786. } else {
  76787. newCallee = self.explodeExpression(calleePath);
  76788. }
  76789. } else {
  76790. newCallee = explodeViaTempVar(null, calleePath);
  76791. if (t.isMemberExpression(newCallee)) {
  76792. newCallee = t.sequenceExpression([t.numericLiteral(0), t.cloneDeep(newCallee)]);
  76793. }
  76794. }
  76795. argsPath.forEach(function (argPath) {
  76796. newArgs.push(explodeViaTempVar(null, argPath));
  76797. });
  76798. return finish(t.callExpression(newCallee, newArgs.map(function (arg) {
  76799. return t.cloneDeep(arg);
  76800. })));
  76801. case "NewExpression":
  76802. return finish(t.newExpression(explodeViaTempVar(null, path.get("callee")), path.get("arguments").map(function (argPath) {
  76803. return explodeViaTempVar(null, argPath);
  76804. })));
  76805. case "ObjectExpression":
  76806. return finish(t.objectExpression(path.get("properties").map(function (propPath) {
  76807. if (propPath.isObjectProperty()) {
  76808. return t.objectProperty(propPath.node.key, explodeViaTempVar(null, propPath.get("value")), propPath.node.computed);
  76809. } else {
  76810. return propPath.node;
  76811. }
  76812. })));
  76813. case "ArrayExpression":
  76814. return finish(t.arrayExpression(path.get("elements").map(function (elemPath) {
  76815. return explodeViaTempVar(null, elemPath);
  76816. })));
  76817. case "SequenceExpression":
  76818. var lastIndex = expr.expressions.length - 1;
  76819. path.get("expressions").forEach(function (exprPath) {
  76820. if (exprPath.key === lastIndex) {
  76821. result = self.explodeExpression(exprPath, ignoreResult);
  76822. } else {
  76823. self.explodeExpression(exprPath, true);
  76824. }
  76825. });
  76826. return result;
  76827. case "LogicalExpression":
  76828. after = this.loc();
  76829. if (!ignoreResult) {
  76830. result = self.makeTempVar();
  76831. }
  76832. var left = explodeViaTempVar(result, path.get("left"));
  76833. if (expr.operator === "&&") {
  76834. self.jumpIfNot(left, after);
  76835. } else {
  76836. _assert$1["default"].strictEqual(expr.operator, "||");
  76837. self.jumpIf(left, after);
  76838. }
  76839. explodeViaTempVar(result, path.get("right"), ignoreResult);
  76840. self.mark(after);
  76841. return result;
  76842. case "ConditionalExpression":
  76843. var elseLoc = this.loc();
  76844. after = this.loc();
  76845. var test = self.explodeExpression(path.get("test"));
  76846. self.jumpIfNot(test, elseLoc);
  76847. if (!ignoreResult) {
  76848. result = self.makeTempVar();
  76849. }
  76850. explodeViaTempVar(result, path.get("consequent"), ignoreResult);
  76851. self.jump(after);
  76852. self.mark(elseLoc);
  76853. explodeViaTempVar(result, path.get("alternate"), ignoreResult);
  76854. self.mark(after);
  76855. return result;
  76856. case "UnaryExpression":
  76857. return finish(t.unaryExpression(expr.operator, self.explodeExpression(path.get("argument")), !!expr.prefix));
  76858. case "BinaryExpression":
  76859. return finish(t.binaryExpression(expr.operator, explodeViaTempVar(null, path.get("left")), explodeViaTempVar(null, path.get("right"))));
  76860. case "AssignmentExpression":
  76861. if (expr.operator === "=") {
  76862. return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right"))));
  76863. }
  76864. var lhs = self.explodeExpression(path.get("left"));
  76865. var temp = self.emitAssign(self.makeTempVar(), lhs);
  76866. return finish(t.assignmentExpression("=", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get("right")))));
  76867. case "UpdateExpression":
  76868. return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix));
  76869. case "YieldExpression":
  76870. after = this.loc();
  76871. var arg = expr.argument && self.explodeExpression(path.get("argument"));
  76872. if (arg && expr.delegate) {
  76873. var _result = self.makeTempVar();
  76874. var _ret = t.returnStatement(t.callExpression(self.contextProperty("delegateYield"), [arg, t.stringLiteral(_result.property.name), after]));
  76875. _ret.loc = expr.loc;
  76876. self.emit(_ret);
  76877. self.mark(after);
  76878. return _result;
  76879. }
  76880. self.emitAssign(self.contextProperty("next"), after);
  76881. var ret = t.returnStatement(t.cloneDeep(arg) || null);
  76882. ret.loc = expr.loc;
  76883. self.emit(ret);
  76884. self.mark(after);
  76885. return self.contextProperty("sent");
  76886. default:
  76887. throw new Error("unknown Expression of type " + JSON.stringify(expr.type));
  76888. }
  76889. };
  76890. var emit = {
  76891. Emitter: Emitter_1
  76892. };
  76893. var replaceShorthandObjectMethod_1 = createCommonjsModule(function (module, exports) {
  76894. exports.__esModule = true;
  76895. exports["default"] = replaceShorthandObjectMethod;
  76896. var util = interopRequireWildcard(util$3);
  76897. function replaceShorthandObjectMethod(path) {
  76898. var t = util.getTypes();
  76899. if (!path.node || !t.isFunction(path.node)) {
  76900. throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");
  76901. }
  76902. if (!t.isObjectMethod(path.node)) {
  76903. return path;
  76904. }
  76905. if (!path.node.generator) {
  76906. return path;
  76907. }
  76908. var parameters = path.node.params.map(function (param) {
  76909. return t.cloneDeep(param);
  76910. });
  76911. var functionExpression = t.functionExpression(null, parameters, t.cloneDeep(path.node.body), path.node.generator, path.node.async);
  76912. util.replaceWithOrRemove(path, t.objectProperty(t.cloneDeep(path.node.key), functionExpression, path.node.computed, false));
  76913. return path.get("value");
  76914. }
  76915. }, "/$$rollup_base$$/node_modules/regenerator-transform/lib");
  76916. var _assert = interopRequireDefault(assert_1);
  76917. var _replaceShorthandObjectMethod = interopRequireDefault(replaceShorthandObjectMethod_1);
  76918. var util = interopRequireWildcard(util$3);
  76919. var getVisitor = function getVisitor(_ref) {
  76920. var t = _ref.types;
  76921. return {
  76922. Method: function Method(path, state) {
  76923. var node = path.node;
  76924. if (!shouldRegenerate(node, state)) return;
  76925. var container = t.functionExpression(null, [], t.cloneNode(node.body, false), node.generator, node.async);
  76926. path.get("body").set("body", [t.returnStatement(t.callExpression(container, []))]);
  76927. node.async = false;
  76928. node.generator = false;
  76929. path.get("body.body.0.argument.callee").unwrapFunctionEnvironment();
  76930. },
  76931. Function: {
  76932. exit: util.wrapWithTypes(t, function (path, state) {
  76933. var node = path.node;
  76934. if (!shouldRegenerate(node, state)) return;
  76935. path = (0, _replaceShorthandObjectMethod["default"])(path);
  76936. node = path.node;
  76937. var contextId = path.scope.generateUidIdentifier("context");
  76938. var argsId = path.scope.generateUidIdentifier("args");
  76939. path.ensureBlock();
  76940. var bodyBlockPath = path.get("body");
  76941. if (node.async) {
  76942. bodyBlockPath.traverse(awaitVisitor);
  76943. }
  76944. bodyBlockPath.traverse(functionSentVisitor, {
  76945. context: contextId
  76946. });
  76947. var outerBody = [];
  76948. var innerBody = [];
  76949. bodyBlockPath.get("body").forEach(function (childPath) {
  76950. var node = childPath.node;
  76951. if (t.isExpressionStatement(node) && t.isStringLiteral(node.expression)) {
  76952. outerBody.push(node);
  76953. } else if (node && node._blockHoist != null) {
  76954. outerBody.push(node);
  76955. } else {
  76956. innerBody.push(node);
  76957. }
  76958. });
  76959. if (outerBody.length > 0) {
  76960. bodyBlockPath.node.body = innerBody;
  76961. }
  76962. var outerFnExpr = getOuterFnExpr(path);
  76963. t.assertIdentifier(node.id);
  76964. var innerFnId = t.identifier(node.id.name + "$");
  76965. var vars = (0, hoist$2.hoist)(path);
  76966. var context = {
  76967. usesThis: false,
  76968. usesArguments: false,
  76969. getArgsId: function getArgsId() {
  76970. return t.clone(argsId);
  76971. }
  76972. };
  76973. path.traverse(argumentsThisVisitor, context);
  76974. if (context.usesArguments) {
  76975. vars = vars || t.variableDeclaration("var", []);
  76976. var argumentIdentifier = t.identifier("arguments");
  76977. argumentIdentifier._shadowedFunctionLiteral = path;
  76978. vars.declarations.push(t.variableDeclarator(t.clone(argsId), argumentIdentifier));
  76979. }
  76980. var emitter = new emit.Emitter(contextId);
  76981. emitter.explode(path.get("body"));
  76982. if (vars && vars.declarations.length > 0) {
  76983. outerBody.push(vars);
  76984. }
  76985. var wrapArgs = [emitter.getContextFunction(innerFnId)];
  76986. var tryLocsList = emitter.getTryLocsList();
  76987. if (node.generator) {
  76988. wrapArgs.push(outerFnExpr);
  76989. } else if (context.usesThis || tryLocsList || node.async) {
  76990. wrapArgs.push(t.nullLiteral());
  76991. }
  76992. if (context.usesThis) {
  76993. wrapArgs.push(t.thisExpression());
  76994. } else if (tryLocsList || node.async) {
  76995. wrapArgs.push(t.nullLiteral());
  76996. }
  76997. if (tryLocsList) {
  76998. wrapArgs.push(tryLocsList);
  76999. } else if (node.async) {
  77000. wrapArgs.push(t.nullLiteral());
  77001. }
  77002. if (node.async) {
  77003. var currentScope = path.scope;
  77004. do {
  77005. if (currentScope.hasOwnBinding("Promise")) currentScope.rename("Promise");
  77006. } while (currentScope = currentScope.parent);
  77007. wrapArgs.push(t.identifier("Promise"));
  77008. }
  77009. var wrapCall = t.callExpression(util.runtimeProperty(node.async ? "async" : "wrap"), wrapArgs);
  77010. outerBody.push(t.returnStatement(wrapCall));
  77011. node.body = t.blockStatement(outerBody);
  77012. path.get("body.body").forEach(function (p) {
  77013. return p.scope.registerDeclaration(p);
  77014. });
  77015. var oldDirectives = bodyBlockPath.node.directives;
  77016. if (oldDirectives) {
  77017. node.body.directives = oldDirectives;
  77018. }
  77019. var wasGeneratorFunction = node.generator;
  77020. if (wasGeneratorFunction) {
  77021. node.generator = false;
  77022. }
  77023. if (node.async) {
  77024. node.async = false;
  77025. }
  77026. if (wasGeneratorFunction && t.isExpression(node)) {
  77027. util.replaceWithOrRemove(path, t.callExpression(util.runtimeProperty("mark"), [node]));
  77028. path.addComment("leading", "#__PURE__");
  77029. }
  77030. var insertedLocs = emitter.getInsertedLocs();
  77031. path.traverse({
  77032. NumericLiteral: function NumericLiteral(path) {
  77033. if (!insertedLocs.has(path.node)) {
  77034. return;
  77035. }
  77036. path.replaceWith(t.numericLiteral(path.node.value));
  77037. }
  77038. });
  77039. path.requeue();
  77040. })
  77041. }
  77042. };
  77043. };
  77044. function shouldRegenerate(node, state) {
  77045. if (node.generator) {
  77046. if (node.async) {
  77047. return state.opts.asyncGenerators !== false;
  77048. } else {
  77049. return state.opts.generators !== false;
  77050. }
  77051. } else if (node.async) {
  77052. return state.opts.async !== false;
  77053. } else {
  77054. return false;
  77055. }
  77056. }
  77057. function getOuterFnExpr(funPath) {
  77058. var t = util.getTypes();
  77059. var node = funPath.node;
  77060. t.assertFunction(node);
  77061. if (!node.id) {
  77062. node.id = funPath.scope.parent.generateUidIdentifier("callee");
  77063. }
  77064. if (node.generator && t.isFunctionDeclaration(node)) {
  77065. return getMarkedFunctionId(funPath);
  77066. }
  77067. return t.clone(node.id);
  77068. }
  77069. var getMarkInfo = (0, _private.makeAccessor)();
  77070. function getMarkedFunctionId(funPath) {
  77071. var t = util.getTypes();
  77072. var node = funPath.node;
  77073. t.assertIdentifier(node.id);
  77074. var blockPath = funPath.findParent(function (path) {
  77075. return path.isProgram() || path.isBlockStatement();
  77076. });
  77077. if (!blockPath) {
  77078. return node.id;
  77079. }
  77080. var block = blockPath.node;
  77081. _assert["default"].ok(Array.isArray(block.body));
  77082. var info = getMarkInfo(block);
  77083. if (!info.decl) {
  77084. info.decl = t.variableDeclaration("var", []);
  77085. blockPath.unshiftContainer("body", info.decl);
  77086. info.declPath = blockPath.get("body.0");
  77087. }
  77088. _assert["default"].strictEqual(info.declPath.node, info.decl);
  77089. var markedId = blockPath.scope.generateUidIdentifier("marked");
  77090. var markCallExp = t.callExpression(util.runtimeProperty("mark"), [t.clone(node.id)]);
  77091. var index = info.decl.declarations.push(t.variableDeclarator(markedId, markCallExp)) - 1;
  77092. var markCallExpPath = info.declPath.get("declarations." + index + ".init");
  77093. _assert["default"].strictEqual(markCallExpPath.node, markCallExp);
  77094. markCallExpPath.addComment("leading", "#__PURE__");
  77095. return t.clone(markedId);
  77096. }
  77097. var argumentsThisVisitor = {
  77098. "FunctionExpression|FunctionDeclaration|Method": function FunctionExpressionFunctionDeclarationMethod(path) {
  77099. path.skip();
  77100. },
  77101. Identifier: function Identifier(path, state) {
  77102. if (path.node.name === "arguments" && util.isReference(path)) {
  77103. util.replaceWithOrRemove(path, state.getArgsId());
  77104. state.usesArguments = true;
  77105. }
  77106. },
  77107. ThisExpression: function ThisExpression(path, state) {
  77108. state.usesThis = true;
  77109. }
  77110. };
  77111. var functionSentVisitor = {
  77112. MetaProperty: function MetaProperty(path) {
  77113. var node = path.node;
  77114. if (node.meta.name === "function" && node.property.name === "sent") {
  77115. var t = util.getTypes();
  77116. util.replaceWithOrRemove(path, t.memberExpression(t.clone(this.context), t.identifier("_sent")));
  77117. }
  77118. }
  77119. };
  77120. var awaitVisitor = {
  77121. Function: function Function(path) {
  77122. path.skip();
  77123. },
  77124. AwaitExpression: function AwaitExpression(path) {
  77125. var t = util.getTypes();
  77126. var argument = path.node.argument;
  77127. util.replaceWithOrRemove(path, t.yieldExpression(t.callExpression(util.runtimeProperty("awrap"), [argument]), false));
  77128. }
  77129. };
  77130. var visit = {
  77131. getVisitor: getVisitor
  77132. };
  77133. var lib$b = createCommonjsModule(function (module, exports) {
  77134. exports.__esModule = true;
  77135. exports["default"] = _default;
  77136. function _default(context) {
  77137. var plugin = {
  77138. visitor: (0, visit.getVisitor)(context)
  77139. };
  77140. var version = context && context.version;
  77141. if (version && parseInt(version, 10) >= 7) {
  77142. plugin.name = "regenerator-transform";
  77143. }
  77144. return plugin;
  77145. }
  77146. }, "/$$rollup_base$$/node_modules/regenerator-transform/lib");
  77147. var _transformRegenerator = lib$b["default"];
  77148. var _transformReservedWords = declare(function (api) {
  77149. api.assertVersion(7);
  77150. return {
  77151. name: "transform-reserved-words",
  77152. visitor: {
  77153. "BindingIdentifier|ReferencedIdentifier": function BindingIdentifierReferencedIdentifier(path) {
  77154. if (!isValidES3Identifier(path.node.name)) {
  77155. path.scope.rename(path.node.name);
  77156. }
  77157. }
  77158. }
  77159. };
  77160. });
  77161. var SEMVER_SPEC_VERSION$1 = '2.0.0';
  77162. var MAX_LENGTH$5 = 256;
  77163. var MAX_SAFE_INTEGER$3 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  77164. var MAX_SAFE_COMPONENT_LENGTH$1 = 16;
  77165. var constants$1 = {
  77166. SEMVER_SPEC_VERSION: SEMVER_SPEC_VERSION$1,
  77167. MAX_LENGTH: MAX_LENGTH$5,
  77168. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$3,
  77169. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH$1
  77170. };
  77171. var debug$1 = typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG) ? function () {
  77172. var _console;
  77173. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  77174. args[_key] = arguments[_key];
  77175. }
  77176. return (_console = console).error.apply(_console, ['SEMVER'].concat(args));
  77177. } : function () {};
  77178. var debug_1$1 = debug$1;
  77179. var re_1$1 = createCommonjsModule(function (module, exports) {
  77180. var MAX_SAFE_COMPONENT_LENGTH = constants$1.MAX_SAFE_COMPONENT_LENGTH;
  77181. exports = module.exports = {};
  77182. var re = exports.re = [];
  77183. var src = exports.src = [];
  77184. var t = exports.t = {};
  77185. var R = 0;
  77186. var createToken = function createToken(name, value, isGlobal) {
  77187. var index = R++;
  77188. debug_1$1(index, value);
  77189. t[name] = index;
  77190. src[index] = value;
  77191. re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
  77192. };
  77193. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
  77194. createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
  77195. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
  77196. createToken('MAINVERSION', "(" + src[t.NUMERICIDENTIFIER] + ")\\." + ("(" + src[t.NUMERICIDENTIFIER] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIER] + ")"));
  77197. createToken('MAINVERSIONLOOSE', "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\." + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"));
  77198. createToken('PRERELEASEIDENTIFIER', "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  77199. createToken('PRERELEASEIDENTIFIERLOOSE', "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  77200. createToken('PRERELEASE', "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))");
  77201. createToken('PRERELEASELOOSE', "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))");
  77202. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
  77203. createToken('BUILD', "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))");
  77204. createToken('FULLPLAIN', "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?");
  77205. createToken('FULL', "^" + src[t.FULLPLAIN] + "$");
  77206. createToken('LOOSEPLAIN', "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?");
  77207. createToken('LOOSE', "^" + src[t.LOOSEPLAIN] + "$");
  77208. createToken('GTLT', '((?:<|>)?=?)');
  77209. createToken('XRANGEIDENTIFIERLOOSE', src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*");
  77210. createToken('XRANGEIDENTIFIER', src[t.NUMERICIDENTIFIER] + "|x|X|\\*");
  77211. createToken('XRANGEPLAIN', "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  77212. createToken('XRANGEPLAINLOOSE', "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  77213. createToken('XRANGE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$");
  77214. createToken('XRANGELOOSE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$");
  77215. createToken('COERCE', "" + ('(^|[^\\d])' + '(\\d{1,') + MAX_SAFE_COMPONENT_LENGTH + "})" + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + "(?:$|[^\\d])");
  77216. createToken('COERCERTL', src[t.COERCE], true);
  77217. createToken('LONETILDE', '(?:~>?)');
  77218. createToken('TILDETRIM', "(\\s*)" + src[t.LONETILDE] + "\\s+", true);
  77219. exports.tildeTrimReplace = '$1~';
  77220. createToken('TILDE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$");
  77221. createToken('TILDELOOSE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$");
  77222. createToken('LONECARET', '(?:\\^)');
  77223. createToken('CARETTRIM', "(\\s*)" + src[t.LONECARET] + "\\s+", true);
  77224. exports.caretTrimReplace = '$1^';
  77225. createToken('CARET', "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$");
  77226. createToken('CARETLOOSE', "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$");
  77227. createToken('COMPARATORLOOSE', "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$");
  77228. createToken('COMPARATOR', "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$");
  77229. createToken('COMPARATORTRIM', "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")", true);
  77230. exports.comparatorTrimReplace = '$1$2$3';
  77231. createToken('HYPHENRANGE', "^\\s*(" + src[t.XRANGEPLAIN] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAIN] + ")") + "\\s*$");
  77232. createToken('HYPHENRANGELOOSE', "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAINLOOSE] + ")") + "\\s*$");
  77233. createToken('STAR', '(<|>)?=?\\s*\\*');
  77234. createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$');
  77235. createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$');
  77236. }, "/$$rollup_base$$/node_modules/semver-BABEL_8_BREAKING-true/internal");
  77237. var opts = ['includePrerelease', 'loose', 'rtl'];
  77238. var parseOptions = function parseOptions(options) {
  77239. return !options ? {} : typeof options !== 'object' ? {
  77240. loose: true
  77241. } : opts.filter(function (k) {
  77242. return options[k];
  77243. }).reduce(function (options, k) {
  77244. options[k] = true;
  77245. return options;
  77246. }, {});
  77247. };
  77248. var parseOptions_1 = parseOptions;
  77249. var numeric$1 = /^[0-9]+$/;
  77250. var compareIdentifiers$3 = function compareIdentifiers(a, b) {
  77251. var anum = numeric$1.test(a);
  77252. var bnum = numeric$1.test(b);
  77253. if (anum && bnum) {
  77254. a = +a;
  77255. b = +b;
  77256. }
  77257. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  77258. };
  77259. var rcompareIdentifiers$1 = function rcompareIdentifiers(a, b) {
  77260. return compareIdentifiers$3(b, a);
  77261. };
  77262. var identifiers$1 = {
  77263. compareIdentifiers: compareIdentifiers$3,
  77264. rcompareIdentifiers: rcompareIdentifiers$1
  77265. };
  77266. var MAX_LENGTH$4 = constants$1.MAX_LENGTH,
  77267. MAX_SAFE_INTEGER$2 = constants$1.MAX_SAFE_INTEGER;
  77268. var re$7 = re_1$1.re,
  77269. t$e = re_1$1.t;
  77270. var compareIdentifiers$2 = identifiers$1.compareIdentifiers;
  77271. var SemVer$1 = function () {
  77272. function SemVer(version, options) {
  77273. options = parseOptions_1(options);
  77274. if (version instanceof SemVer) {
  77275. if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
  77276. return version;
  77277. } else {
  77278. version = version.version;
  77279. }
  77280. } else if (typeof version !== 'string') {
  77281. throw new TypeError("Invalid Version: " + version);
  77282. }
  77283. if (version.length > MAX_LENGTH$4) {
  77284. throw new TypeError("version is longer than " + MAX_LENGTH$4 + " characters");
  77285. }
  77286. debug_1$1('SemVer', version, options);
  77287. this.options = options;
  77288. this.loose = !!options.loose;
  77289. this.includePrerelease = !!options.includePrerelease;
  77290. var m = version.trim().match(options.loose ? re$7[t$e.LOOSE] : re$7[t$e.FULL]);
  77291. if (!m) {
  77292. throw new TypeError("Invalid Version: " + version);
  77293. }
  77294. this.raw = version;
  77295. this.major = +m[1];
  77296. this.minor = +m[2];
  77297. this.patch = +m[3];
  77298. if (this.major > MAX_SAFE_INTEGER$2 || this.major < 0) {
  77299. throw new TypeError('Invalid major version');
  77300. }
  77301. if (this.minor > MAX_SAFE_INTEGER$2 || this.minor < 0) {
  77302. throw new TypeError('Invalid minor version');
  77303. }
  77304. if (this.patch > MAX_SAFE_INTEGER$2 || this.patch < 0) {
  77305. throw new TypeError('Invalid patch version');
  77306. }
  77307. if (!m[4]) {
  77308. this.prerelease = [];
  77309. } else {
  77310. this.prerelease = m[4].split('.').map(function (id) {
  77311. if (/^[0-9]+$/.test(id)) {
  77312. var num = +id;
  77313. if (num >= 0 && num < MAX_SAFE_INTEGER$2) {
  77314. return num;
  77315. }
  77316. }
  77317. return id;
  77318. });
  77319. }
  77320. this.build = m[5] ? m[5].split('.') : [];
  77321. this.format();
  77322. }
  77323. var _proto = SemVer.prototype;
  77324. _proto.format = function format() {
  77325. this.version = this.major + "." + this.minor + "." + this.patch;
  77326. if (this.prerelease.length) {
  77327. this.version += "-" + this.prerelease.join('.');
  77328. }
  77329. return this.version;
  77330. };
  77331. _proto.toString = function toString() {
  77332. return this.version;
  77333. };
  77334. _proto.compare = function compare(other) {
  77335. debug_1$1('SemVer.compare', this.version, this.options, other);
  77336. if (!(other instanceof SemVer)) {
  77337. if (typeof other === 'string' && other === this.version) {
  77338. return 0;
  77339. }
  77340. other = new SemVer(other, this.options);
  77341. }
  77342. if (other.version === this.version) {
  77343. return 0;
  77344. }
  77345. return this.compareMain(other) || this.comparePre(other);
  77346. };
  77347. _proto.compareMain = function compareMain(other) {
  77348. if (!(other instanceof SemVer)) {
  77349. other = new SemVer(other, this.options);
  77350. }
  77351. return compareIdentifiers$2(this.major, other.major) || compareIdentifiers$2(this.minor, other.minor) || compareIdentifiers$2(this.patch, other.patch);
  77352. };
  77353. _proto.comparePre = function comparePre(other) {
  77354. if (!(other instanceof SemVer)) {
  77355. other = new SemVer(other, this.options);
  77356. }
  77357. if (this.prerelease.length && !other.prerelease.length) {
  77358. return -1;
  77359. } else if (!this.prerelease.length && other.prerelease.length) {
  77360. return 1;
  77361. } else if (!this.prerelease.length && !other.prerelease.length) {
  77362. return 0;
  77363. }
  77364. var i = 0;
  77365. do {
  77366. var a = this.prerelease[i];
  77367. var b = other.prerelease[i];
  77368. debug_1$1('prerelease compare', i, a, b);
  77369. if (a === undefined && b === undefined) {
  77370. return 0;
  77371. } else if (b === undefined) {
  77372. return 1;
  77373. } else if (a === undefined) {
  77374. return -1;
  77375. } else if (a === b) {
  77376. continue;
  77377. } else {
  77378. return compareIdentifiers$2(a, b);
  77379. }
  77380. } while (++i);
  77381. };
  77382. _proto.compareBuild = function compareBuild(other) {
  77383. if (!(other instanceof SemVer)) {
  77384. other = new SemVer(other, this.options);
  77385. }
  77386. var i = 0;
  77387. do {
  77388. var a = this.build[i];
  77389. var b = other.build[i];
  77390. debug_1$1('prerelease compare', i, a, b);
  77391. if (a === undefined && b === undefined) {
  77392. return 0;
  77393. } else if (b === undefined) {
  77394. return 1;
  77395. } else if (a === undefined) {
  77396. return -1;
  77397. } else if (a === b) {
  77398. continue;
  77399. } else {
  77400. return compareIdentifiers$2(a, b);
  77401. }
  77402. } while (++i);
  77403. };
  77404. _proto.inc = function inc(release, identifier) {
  77405. switch (release) {
  77406. case 'premajor':
  77407. this.prerelease.length = 0;
  77408. this.patch = 0;
  77409. this.minor = 0;
  77410. this.major++;
  77411. this.inc('pre', identifier);
  77412. break;
  77413. case 'preminor':
  77414. this.prerelease.length = 0;
  77415. this.patch = 0;
  77416. this.minor++;
  77417. this.inc('pre', identifier);
  77418. break;
  77419. case 'prepatch':
  77420. this.prerelease.length = 0;
  77421. this.inc('patch', identifier);
  77422. this.inc('pre', identifier);
  77423. break;
  77424. case 'prerelease':
  77425. if (this.prerelease.length === 0) {
  77426. this.inc('patch', identifier);
  77427. }
  77428. this.inc('pre', identifier);
  77429. break;
  77430. case 'major':
  77431. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  77432. this.major++;
  77433. }
  77434. this.minor = 0;
  77435. this.patch = 0;
  77436. this.prerelease = [];
  77437. break;
  77438. case 'minor':
  77439. if (this.patch !== 0 || this.prerelease.length === 0) {
  77440. this.minor++;
  77441. }
  77442. this.patch = 0;
  77443. this.prerelease = [];
  77444. break;
  77445. case 'patch':
  77446. if (this.prerelease.length === 0) {
  77447. this.patch++;
  77448. }
  77449. this.prerelease = [];
  77450. break;
  77451. case 'pre':
  77452. if (this.prerelease.length === 0) {
  77453. this.prerelease = [0];
  77454. } else {
  77455. var i = this.prerelease.length;
  77456. while (--i >= 0) {
  77457. if (typeof this.prerelease[i] === 'number') {
  77458. this.prerelease[i]++;
  77459. i = -2;
  77460. }
  77461. }
  77462. if (i === -1) {
  77463. this.prerelease.push(0);
  77464. }
  77465. }
  77466. if (identifier) {
  77467. if (this.prerelease[0] === identifier) {
  77468. if (isNaN(this.prerelease[1])) {
  77469. this.prerelease = [identifier, 0];
  77470. }
  77471. } else {
  77472. this.prerelease = [identifier, 0];
  77473. }
  77474. }
  77475. break;
  77476. default:
  77477. throw new Error("invalid increment argument: " + release);
  77478. }
  77479. this.format();
  77480. this.raw = this.version;
  77481. return this;
  77482. };
  77483. return SemVer;
  77484. }();
  77485. var semver$6 = SemVer$1;
  77486. var MAX_LENGTH$3 = constants$1.MAX_LENGTH;
  77487. var re$6 = re_1$1.re,
  77488. t$d = re_1$1.t;
  77489. var parse$1 = function parse(version, options) {
  77490. options = parseOptions_1(options);
  77491. if (version instanceof semver$6) {
  77492. return version;
  77493. }
  77494. if (typeof version !== 'string') {
  77495. return null;
  77496. }
  77497. if (version.length > MAX_LENGTH$3) {
  77498. return null;
  77499. }
  77500. var r = options.loose ? re$6[t$d.LOOSE] : re$6[t$d.FULL];
  77501. if (!r.test(version)) {
  77502. return null;
  77503. }
  77504. try {
  77505. return new semver$6(version, options);
  77506. } catch (er) {
  77507. return null;
  77508. }
  77509. };
  77510. var parse_1$1 = parse$1;
  77511. var valid$1 = function valid(version, options) {
  77512. var v = parse_1$1(version, options);
  77513. return v ? v.version : null;
  77514. };
  77515. var valid_1 = valid$1;
  77516. var clean = function clean(version, options) {
  77517. var s = parse_1$1(version.trim().replace(/^[=v]+/, ''), options);
  77518. return s ? s.version : null;
  77519. };
  77520. var clean_1 = clean;
  77521. var inc = function inc(version, release, options, identifier) {
  77522. if (typeof options === 'string') {
  77523. identifier = options;
  77524. options = undefined;
  77525. }
  77526. try {
  77527. return new semver$6(version, options).inc(release, identifier).version;
  77528. } catch (er) {
  77529. return null;
  77530. }
  77531. };
  77532. var inc_1 = inc;
  77533. var compare$3 = function compare(a, b, loose) {
  77534. return new semver$6(a, loose).compare(new semver$6(b, loose));
  77535. };
  77536. var compare_1$1 = compare$3;
  77537. var eq$1 = function eq(a, b, loose) {
  77538. return compare_1$1(a, b, loose) === 0;
  77539. };
  77540. var eq_1$1 = eq$1;
  77541. var diff = function diff(version1, version2) {
  77542. if (eq_1$1(version1, version2)) {
  77543. return null;
  77544. } else {
  77545. var v1 = parse_1$1(version1);
  77546. var v2 = parse_1$1(version2);
  77547. var hasPre = v1.prerelease.length || v2.prerelease.length;
  77548. var prefix = hasPre ? 'pre' : '';
  77549. var defaultResult = hasPre ? 'prerelease' : '';
  77550. for (var key in v1) {
  77551. if (key === 'major' || key === 'minor' || key === 'patch') {
  77552. if (v1[key] !== v2[key]) {
  77553. return prefix + key;
  77554. }
  77555. }
  77556. }
  77557. return defaultResult;
  77558. }
  77559. };
  77560. var diff_1 = diff;
  77561. var major = function major(a, loose) {
  77562. return new semver$6(a, loose).major;
  77563. };
  77564. var major_1 = major;
  77565. var minor = function minor(a, loose) {
  77566. return new semver$6(a, loose).minor;
  77567. };
  77568. var minor_1 = minor;
  77569. var patch = function patch(a, loose) {
  77570. return new semver$6(a, loose).patch;
  77571. };
  77572. var patch_1 = patch;
  77573. var prerelease = function prerelease(version, options) {
  77574. var parsed = parse_1$1(version, options);
  77575. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  77576. };
  77577. var prerelease_1 = prerelease;
  77578. var rcompare = function rcompare(a, b, loose) {
  77579. return compare_1$1(b, a, loose);
  77580. };
  77581. var rcompare_1 = rcompare;
  77582. var compareLoose = function compareLoose(a, b) {
  77583. return compare_1$1(a, b, true);
  77584. };
  77585. var compareLoose_1 = compareLoose;
  77586. var compareBuild = function compareBuild(a, b, loose) {
  77587. var versionA = new semver$6(a, loose);
  77588. var versionB = new semver$6(b, loose);
  77589. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  77590. };
  77591. var compareBuild_1 = compareBuild;
  77592. var sort = function sort(list, loose) {
  77593. return list.sort(function (a, b) {
  77594. return compareBuild_1(a, b, loose);
  77595. });
  77596. };
  77597. var sort_1 = sort;
  77598. var rsort = function rsort(list, loose) {
  77599. return list.sort(function (a, b) {
  77600. return compareBuild_1(b, a, loose);
  77601. });
  77602. };
  77603. var rsort_1 = rsort;
  77604. var gt$1 = function gt(a, b, loose) {
  77605. return compare_1$1(a, b, loose) > 0;
  77606. };
  77607. var gt_1$1 = gt$1;
  77608. var lt$1 = function lt(a, b, loose) {
  77609. return compare_1$1(a, b, loose) < 0;
  77610. };
  77611. var lt_1$1 = lt$1;
  77612. var neq$1 = function neq(a, b, loose) {
  77613. return compare_1$1(a, b, loose) !== 0;
  77614. };
  77615. var neq_1$1 = neq$1;
  77616. var gte$1 = function gte(a, b, loose) {
  77617. return compare_1$1(a, b, loose) >= 0;
  77618. };
  77619. var gte_1$1 = gte$1;
  77620. var lte$1 = function lte(a, b, loose) {
  77621. return compare_1$1(a, b, loose) <= 0;
  77622. };
  77623. var lte_1$1 = lte$1;
  77624. var cmp$1 = function cmp(a, op, b, loose) {
  77625. switch (op) {
  77626. case '===':
  77627. if (typeof a === 'object') a = a.version;
  77628. if (typeof b === 'object') b = b.version;
  77629. return a === b;
  77630. case '!==':
  77631. if (typeof a === 'object') a = a.version;
  77632. if (typeof b === 'object') b = b.version;
  77633. return a !== b;
  77634. case '':
  77635. case '=':
  77636. case '==':
  77637. return eq_1$1(a, b, loose);
  77638. case '!=':
  77639. return neq_1$1(a, b, loose);
  77640. case '>':
  77641. return gt_1$1(a, b, loose);
  77642. case '>=':
  77643. return gte_1$1(a, b, loose);
  77644. case '<':
  77645. return lt_1$1(a, b, loose);
  77646. case '<=':
  77647. return lte_1$1(a, b, loose);
  77648. default:
  77649. throw new TypeError("Invalid operator: " + op);
  77650. }
  77651. };
  77652. var cmp_1$1 = cmp$1;
  77653. var re$5 = re_1$1.re,
  77654. t$c = re_1$1.t;
  77655. var coerce$1 = function coerce(version, options) {
  77656. if (version instanceof semver$6) {
  77657. return version;
  77658. }
  77659. if (typeof version === 'number') {
  77660. version = String(version);
  77661. }
  77662. if (typeof version !== 'string') {
  77663. return null;
  77664. }
  77665. options = options || {};
  77666. var match = null;
  77667. if (!options.rtl) {
  77668. match = version.match(re$5[t$c.COERCE]);
  77669. } else {
  77670. var next;
  77671. while ((next = re$5[t$c.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  77672. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  77673. match = next;
  77674. }
  77675. re$5[t$c.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  77676. }
  77677. re$5[t$c.COERCERTL].lastIndex = -1;
  77678. }
  77679. if (match === null) return null;
  77680. return parse_1$1(match[2] + "." + (match[3] || '0') + "." + (match[4] || '0'), options);
  77681. };
  77682. var coerce_1$1 = coerce$1;
  77683. var iterator = function iterator(Yallist) {
  77684. Yallist.prototype[Symbol.iterator] = regenerator.mark(function _callee() {
  77685. var walker;
  77686. return regenerator.wrap(function _callee$(_context) {
  77687. while (1) {
  77688. switch (_context.prev = _context.next) {
  77689. case 0:
  77690. walker = this.head;
  77691. case 1:
  77692. if (!walker) {
  77693. _context.next = 7;
  77694. break;
  77695. }
  77696. _context.next = 4;
  77697. return walker.value;
  77698. case 4:
  77699. walker = walker.next;
  77700. _context.next = 1;
  77701. break;
  77702. case 7:
  77703. case "end":
  77704. return _context.stop();
  77705. }
  77706. }
  77707. }, _callee, this);
  77708. });
  77709. };
  77710. var yallist = Yallist;
  77711. Yallist.Node = Node;
  77712. Yallist.create = Yallist;
  77713. function Yallist(list) {
  77714. var self = this;
  77715. if (!(self instanceof Yallist)) {
  77716. self = new Yallist();
  77717. }
  77718. self.tail = null;
  77719. self.head = null;
  77720. self.length = 0;
  77721. if (list && typeof list.forEach === 'function') {
  77722. list.forEach(function (item) {
  77723. self.push(item);
  77724. });
  77725. } else if (arguments.length > 0) {
  77726. for (var i = 0, l = arguments.length; i < l; i++) {
  77727. self.push(arguments[i]);
  77728. }
  77729. }
  77730. return self;
  77731. }
  77732. Yallist.prototype.removeNode = function (node) {
  77733. if (node.list !== this) {
  77734. throw new Error('removing node which does not belong to this list');
  77735. }
  77736. var next = node.next;
  77737. var prev = node.prev;
  77738. if (next) {
  77739. next.prev = prev;
  77740. }
  77741. if (prev) {
  77742. prev.next = next;
  77743. }
  77744. if (node === this.head) {
  77745. this.head = next;
  77746. }
  77747. if (node === this.tail) {
  77748. this.tail = prev;
  77749. }
  77750. node.list.length--;
  77751. node.next = null;
  77752. node.prev = null;
  77753. node.list = null;
  77754. return next;
  77755. };
  77756. Yallist.prototype.unshiftNode = function (node) {
  77757. if (node === this.head) {
  77758. return;
  77759. }
  77760. if (node.list) {
  77761. node.list.removeNode(node);
  77762. }
  77763. var head = this.head;
  77764. node.list = this;
  77765. node.next = head;
  77766. if (head) {
  77767. head.prev = node;
  77768. }
  77769. this.head = node;
  77770. if (!this.tail) {
  77771. this.tail = node;
  77772. }
  77773. this.length++;
  77774. };
  77775. Yallist.prototype.pushNode = function (node) {
  77776. if (node === this.tail) {
  77777. return;
  77778. }
  77779. if (node.list) {
  77780. node.list.removeNode(node);
  77781. }
  77782. var tail = this.tail;
  77783. node.list = this;
  77784. node.prev = tail;
  77785. if (tail) {
  77786. tail.next = node;
  77787. }
  77788. this.tail = node;
  77789. if (!this.head) {
  77790. this.head = node;
  77791. }
  77792. this.length++;
  77793. };
  77794. Yallist.prototype.push = function () {
  77795. for (var i = 0, l = arguments.length; i < l; i++) {
  77796. push(this, arguments[i]);
  77797. }
  77798. return this.length;
  77799. };
  77800. Yallist.prototype.unshift = function () {
  77801. for (var i = 0, l = arguments.length; i < l; i++) {
  77802. unshift(this, arguments[i]);
  77803. }
  77804. return this.length;
  77805. };
  77806. Yallist.prototype.pop = function () {
  77807. if (!this.tail) {
  77808. return undefined;
  77809. }
  77810. var res = this.tail.value;
  77811. this.tail = this.tail.prev;
  77812. if (this.tail) {
  77813. this.tail.next = null;
  77814. } else {
  77815. this.head = null;
  77816. }
  77817. this.length--;
  77818. return res;
  77819. };
  77820. Yallist.prototype.shift = function () {
  77821. if (!this.head) {
  77822. return undefined;
  77823. }
  77824. var res = this.head.value;
  77825. this.head = this.head.next;
  77826. if (this.head) {
  77827. this.head.prev = null;
  77828. } else {
  77829. this.tail = null;
  77830. }
  77831. this.length--;
  77832. return res;
  77833. };
  77834. Yallist.prototype.forEach = function (fn, thisp) {
  77835. thisp = thisp || this;
  77836. for (var walker = this.head, i = 0; walker !== null; i++) {
  77837. fn.call(thisp, walker.value, i, this);
  77838. walker = walker.next;
  77839. }
  77840. };
  77841. Yallist.prototype.forEachReverse = function (fn, thisp) {
  77842. thisp = thisp || this;
  77843. for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
  77844. fn.call(thisp, walker.value, i, this);
  77845. walker = walker.prev;
  77846. }
  77847. };
  77848. Yallist.prototype.get = function (n) {
  77849. for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
  77850. walker = walker.next;
  77851. }
  77852. if (i === n && walker !== null) {
  77853. return walker.value;
  77854. }
  77855. };
  77856. Yallist.prototype.getReverse = function (n) {
  77857. for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
  77858. walker = walker.prev;
  77859. }
  77860. if (i === n && walker !== null) {
  77861. return walker.value;
  77862. }
  77863. };
  77864. Yallist.prototype.map = function (fn, thisp) {
  77865. thisp = thisp || this;
  77866. var res = new Yallist();
  77867. for (var walker = this.head; walker !== null;) {
  77868. res.push(fn.call(thisp, walker.value, this));
  77869. walker = walker.next;
  77870. }
  77871. return res;
  77872. };
  77873. Yallist.prototype.mapReverse = function (fn, thisp) {
  77874. thisp = thisp || this;
  77875. var res = new Yallist();
  77876. for (var walker = this.tail; walker !== null;) {
  77877. res.push(fn.call(thisp, walker.value, this));
  77878. walker = walker.prev;
  77879. }
  77880. return res;
  77881. };
  77882. Yallist.prototype.reduce = function (fn, initial) {
  77883. var acc;
  77884. var walker = this.head;
  77885. if (arguments.length > 1) {
  77886. acc = initial;
  77887. } else if (this.head) {
  77888. walker = this.head.next;
  77889. acc = this.head.value;
  77890. } else {
  77891. throw new TypeError('Reduce of empty list with no initial value');
  77892. }
  77893. for (var i = 0; walker !== null; i++) {
  77894. acc = fn(acc, walker.value, i);
  77895. walker = walker.next;
  77896. }
  77897. return acc;
  77898. };
  77899. Yallist.prototype.reduceReverse = function (fn, initial) {
  77900. var acc;
  77901. var walker = this.tail;
  77902. if (arguments.length > 1) {
  77903. acc = initial;
  77904. } else if (this.tail) {
  77905. walker = this.tail.prev;
  77906. acc = this.tail.value;
  77907. } else {
  77908. throw new TypeError('Reduce of empty list with no initial value');
  77909. }
  77910. for (var i = this.length - 1; walker !== null; i--) {
  77911. acc = fn(acc, walker.value, i);
  77912. walker = walker.prev;
  77913. }
  77914. return acc;
  77915. };
  77916. Yallist.prototype.toArray = function () {
  77917. var arr = new Array(this.length);
  77918. for (var i = 0, walker = this.head; walker !== null; i++) {
  77919. arr[i] = walker.value;
  77920. walker = walker.next;
  77921. }
  77922. return arr;
  77923. };
  77924. Yallist.prototype.toArrayReverse = function () {
  77925. var arr = new Array(this.length);
  77926. for (var i = 0, walker = this.tail; walker !== null; i++) {
  77927. arr[i] = walker.value;
  77928. walker = walker.prev;
  77929. }
  77930. return arr;
  77931. };
  77932. Yallist.prototype.slice = function (from, to) {
  77933. to = to || this.length;
  77934. if (to < 0) {
  77935. to += this.length;
  77936. }
  77937. from = from || 0;
  77938. if (from < 0) {
  77939. from += this.length;
  77940. }
  77941. var ret = new Yallist();
  77942. if (to < from || to < 0) {
  77943. return ret;
  77944. }
  77945. if (from < 0) {
  77946. from = 0;
  77947. }
  77948. if (to > this.length) {
  77949. to = this.length;
  77950. }
  77951. for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
  77952. walker = walker.next;
  77953. }
  77954. for (; walker !== null && i < to; i++, walker = walker.next) {
  77955. ret.push(walker.value);
  77956. }
  77957. return ret;
  77958. };
  77959. Yallist.prototype.sliceReverse = function (from, to) {
  77960. to = to || this.length;
  77961. if (to < 0) {
  77962. to += this.length;
  77963. }
  77964. from = from || 0;
  77965. if (from < 0) {
  77966. from += this.length;
  77967. }
  77968. var ret = new Yallist();
  77969. if (to < from || to < 0) {
  77970. return ret;
  77971. }
  77972. if (from < 0) {
  77973. from = 0;
  77974. }
  77975. if (to > this.length) {
  77976. to = this.length;
  77977. }
  77978. for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
  77979. walker = walker.prev;
  77980. }
  77981. for (; walker !== null && i > from; i--, walker = walker.prev) {
  77982. ret.push(walker.value);
  77983. }
  77984. return ret;
  77985. };
  77986. Yallist.prototype.splice = function (start, deleteCount) {
  77987. if (start > this.length) {
  77988. start = this.length - 1;
  77989. }
  77990. if (start < 0) {
  77991. start = this.length + start;
  77992. }
  77993. for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
  77994. walker = walker.next;
  77995. }
  77996. var ret = [];
  77997. for (var i = 0; walker && i < deleteCount; i++) {
  77998. ret.push(walker.value);
  77999. walker = this.removeNode(walker);
  78000. }
  78001. if (walker === null) {
  78002. walker = this.tail;
  78003. }
  78004. if (walker !== this.head && walker !== this.tail) {
  78005. walker = walker.prev;
  78006. }
  78007. for (var i = 0; i < (arguments.length <= 2 ? 0 : arguments.length - 2); i++) {
  78008. walker = insert(this, walker, i + 2 < 2 || arguments.length <= i + 2 ? undefined : arguments[i + 2]);
  78009. }
  78010. return ret;
  78011. };
  78012. Yallist.prototype.reverse = function () {
  78013. var head = this.head;
  78014. var tail = this.tail;
  78015. for (var walker = head; walker !== null; walker = walker.prev) {
  78016. var p = walker.prev;
  78017. walker.prev = walker.next;
  78018. walker.next = p;
  78019. }
  78020. this.head = tail;
  78021. this.tail = head;
  78022. return this;
  78023. };
  78024. function insert(self, node, value) {
  78025. var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
  78026. if (inserted.next === null) {
  78027. self.tail = inserted;
  78028. }
  78029. if (inserted.prev === null) {
  78030. self.head = inserted;
  78031. }
  78032. self.length++;
  78033. return inserted;
  78034. }
  78035. function push(self, item) {
  78036. self.tail = new Node(item, self.tail, null, self);
  78037. if (!self.head) {
  78038. self.head = self.tail;
  78039. }
  78040. self.length++;
  78041. }
  78042. function unshift(self, item) {
  78043. self.head = new Node(item, null, self.head, self);
  78044. if (!self.tail) {
  78045. self.tail = self.head;
  78046. }
  78047. self.length++;
  78048. }
  78049. function Node(value, prev, next, list) {
  78050. if (!(this instanceof Node)) {
  78051. return new Node(value, prev, next, list);
  78052. }
  78053. this.list = list;
  78054. this.value = value;
  78055. if (prev) {
  78056. prev.next = this;
  78057. this.prev = prev;
  78058. } else {
  78059. this.prev = null;
  78060. }
  78061. if (next) {
  78062. next.prev = this;
  78063. this.next = next;
  78064. } else {
  78065. this.next = null;
  78066. }
  78067. }
  78068. try {
  78069. iterator(Yallist);
  78070. } catch (er) {}
  78071. var MAX = Symbol('max');
  78072. var LENGTH = Symbol('length');
  78073. var LENGTH_CALCULATOR = Symbol('lengthCalculator');
  78074. var ALLOW_STALE = Symbol('allowStale');
  78075. var MAX_AGE = Symbol('maxAge');
  78076. var DISPOSE = Symbol('dispose');
  78077. var NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
  78078. var LRU_LIST = Symbol('lruList');
  78079. var CACHE = Symbol('cache');
  78080. var UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
  78081. var naiveLength = function naiveLength() {
  78082. return 1;
  78083. };
  78084. var LRUCache = function () {
  78085. function LRUCache(options) {
  78086. if (typeof options === 'number') options = {
  78087. max: options
  78088. };
  78089. if (!options) options = {};
  78090. if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number');
  78091. this[MAX] = options.max || Infinity;
  78092. var lc = options.length || naiveLength;
  78093. this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc;
  78094. this[ALLOW_STALE] = options.stale || false;
  78095. if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number');
  78096. this[MAX_AGE] = options.maxAge || 0;
  78097. this[DISPOSE] = options.dispose;
  78098. this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
  78099. this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
  78100. this.reset();
  78101. }
  78102. var _proto = LRUCache.prototype;
  78103. _proto.rforEach = function rforEach(fn, thisp) {
  78104. thisp = thisp || this;
  78105. for (var walker = this[LRU_LIST].tail; walker !== null;) {
  78106. var prev = walker.prev;
  78107. forEachStep(this, fn, walker, thisp);
  78108. walker = prev;
  78109. }
  78110. };
  78111. _proto.forEach = function forEach(fn, thisp) {
  78112. thisp = thisp || this;
  78113. for (var walker = this[LRU_LIST].head; walker !== null;) {
  78114. var next = walker.next;
  78115. forEachStep(this, fn, walker, thisp);
  78116. walker = next;
  78117. }
  78118. };
  78119. _proto.keys = function keys() {
  78120. return this[LRU_LIST].toArray().map(function (k) {
  78121. return k.key;
  78122. });
  78123. };
  78124. _proto.values = function values() {
  78125. return this[LRU_LIST].toArray().map(function (k) {
  78126. return k.value;
  78127. });
  78128. };
  78129. _proto.reset = function reset() {
  78130. var _this = this;
  78131. if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
  78132. this[LRU_LIST].forEach(function (hit) {
  78133. return _this[DISPOSE](hit.key, hit.value);
  78134. });
  78135. }
  78136. this[CACHE] = new Map();
  78137. this[LRU_LIST] = new yallist();
  78138. this[LENGTH] = 0;
  78139. };
  78140. _proto.dump = function dump() {
  78141. var _this2 = this;
  78142. return this[LRU_LIST].map(function (hit) {
  78143. return isStale(_this2, hit) ? false : {
  78144. k: hit.key,
  78145. v: hit.value,
  78146. e: hit.now + (hit.maxAge || 0)
  78147. };
  78148. }).toArray().filter(function (h) {
  78149. return h;
  78150. });
  78151. };
  78152. _proto.dumpLru = function dumpLru() {
  78153. return this[LRU_LIST];
  78154. };
  78155. _proto.set = function set(key, value, maxAge) {
  78156. maxAge = maxAge || this[MAX_AGE];
  78157. if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number');
  78158. var now = maxAge ? Date.now() : 0;
  78159. var len = this[LENGTH_CALCULATOR](value, key);
  78160. if (this[CACHE].has(key)) {
  78161. if (len > this[MAX]) {
  78162. _del(this, this[CACHE].get(key));
  78163. return false;
  78164. }
  78165. var node = this[CACHE].get(key);
  78166. var item = node.value;
  78167. if (this[DISPOSE]) {
  78168. if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
  78169. }
  78170. item.now = now;
  78171. item.maxAge = maxAge;
  78172. item.value = value;
  78173. this[LENGTH] += len - item.length;
  78174. item.length = len;
  78175. this.get(key);
  78176. trim(this);
  78177. return true;
  78178. }
  78179. var hit = new Entry(key, value, len, now, maxAge);
  78180. if (hit.length > this[MAX]) {
  78181. if (this[DISPOSE]) this[DISPOSE](key, value);
  78182. return false;
  78183. }
  78184. this[LENGTH] += hit.length;
  78185. this[LRU_LIST].unshift(hit);
  78186. this[CACHE].set(key, this[LRU_LIST].head);
  78187. trim(this);
  78188. return true;
  78189. };
  78190. _proto.has = function has(key) {
  78191. if (!this[CACHE].has(key)) return false;
  78192. var hit = this[CACHE].get(key).value;
  78193. return !isStale(this, hit);
  78194. };
  78195. _proto.get = function get(key) {
  78196. return _get(this, key, true);
  78197. };
  78198. _proto.peek = function peek(key) {
  78199. return _get(this, key, false);
  78200. };
  78201. _proto.pop = function pop() {
  78202. var node = this[LRU_LIST].tail;
  78203. if (!node) return null;
  78204. _del(this, node);
  78205. return node.value;
  78206. };
  78207. _proto.del = function del(key) {
  78208. _del(this, this[CACHE].get(key));
  78209. };
  78210. _proto.load = function load(arr) {
  78211. this.reset();
  78212. var now = Date.now();
  78213. for (var l = arr.length - 1; l >= 0; l--) {
  78214. var hit = arr[l];
  78215. var expiresAt = hit.e || 0;
  78216. if (expiresAt === 0) this.set(hit.k, hit.v);else {
  78217. var maxAge = expiresAt - now;
  78218. if (maxAge > 0) {
  78219. this.set(hit.k, hit.v, maxAge);
  78220. }
  78221. }
  78222. }
  78223. };
  78224. _proto.prune = function prune() {
  78225. var _this3 = this;
  78226. this[CACHE].forEach(function (value, key) {
  78227. return _get(_this3, key, false);
  78228. });
  78229. };
  78230. _createClass(LRUCache, [{
  78231. key: "max",
  78232. get: function get() {
  78233. return this[MAX];
  78234. },
  78235. set: function set(mL) {
  78236. if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number');
  78237. this[MAX] = mL || Infinity;
  78238. trim(this);
  78239. }
  78240. }, {
  78241. key: "allowStale",
  78242. get: function get() {
  78243. return this[ALLOW_STALE];
  78244. },
  78245. set: function set(allowStale) {
  78246. this[ALLOW_STALE] = !!allowStale;
  78247. }
  78248. }, {
  78249. key: "maxAge",
  78250. get: function get() {
  78251. return this[MAX_AGE];
  78252. },
  78253. set: function set(mA) {
  78254. if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number');
  78255. this[MAX_AGE] = mA;
  78256. trim(this);
  78257. }
  78258. }, {
  78259. key: "lengthCalculator",
  78260. get: function get() {
  78261. return this[LENGTH_CALCULATOR];
  78262. },
  78263. set: function set(lC) {
  78264. var _this4 = this;
  78265. if (typeof lC !== 'function') lC = naiveLength;
  78266. if (lC !== this[LENGTH_CALCULATOR]) {
  78267. this[LENGTH_CALCULATOR] = lC;
  78268. this[LENGTH] = 0;
  78269. this[LRU_LIST].forEach(function (hit) {
  78270. hit.length = _this4[LENGTH_CALCULATOR](hit.value, hit.key);
  78271. _this4[LENGTH] += hit.length;
  78272. });
  78273. }
  78274. trim(this);
  78275. }
  78276. }, {
  78277. key: "length",
  78278. get: function get() {
  78279. return this[LENGTH];
  78280. }
  78281. }, {
  78282. key: "itemCount",
  78283. get: function get() {
  78284. return this[LRU_LIST].length;
  78285. }
  78286. }]);
  78287. return LRUCache;
  78288. }();
  78289. var _get = function _get(self, key, doUse) {
  78290. var node = self[CACHE].get(key);
  78291. if (node) {
  78292. var hit = node.value;
  78293. if (isStale(self, hit)) {
  78294. _del(self, node);
  78295. if (!self[ALLOW_STALE]) return undefined;
  78296. } else {
  78297. if (doUse) {
  78298. if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
  78299. self[LRU_LIST].unshiftNode(node);
  78300. }
  78301. }
  78302. return hit.value;
  78303. }
  78304. };
  78305. var isStale = function isStale(self, hit) {
  78306. if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
  78307. var diff = Date.now() - hit.now;
  78308. return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
  78309. };
  78310. var trim = function trim(self) {
  78311. if (self[LENGTH] > self[MAX]) {
  78312. for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) {
  78313. var prev = walker.prev;
  78314. _del(self, walker);
  78315. walker = prev;
  78316. }
  78317. }
  78318. };
  78319. var _del = function _del(self, node) {
  78320. if (node) {
  78321. var hit = node.value;
  78322. if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
  78323. self[LENGTH] -= hit.length;
  78324. self[CACHE]["delete"](hit.key);
  78325. self[LRU_LIST].removeNode(node);
  78326. }
  78327. };
  78328. var Entry = function Entry(key, value, length, now, maxAge) {
  78329. this.key = key;
  78330. this.value = value;
  78331. this.length = length;
  78332. this.now = now;
  78333. this.maxAge = maxAge || 0;
  78334. };
  78335. var forEachStep = function forEachStep(self, fn, node, thisp) {
  78336. var hit = node.value;
  78337. if (isStale(self, hit)) {
  78338. _del(self, node);
  78339. if (!self[ALLOW_STALE]) hit = undefined;
  78340. }
  78341. if (hit) fn.call(thisp, hit.value, hit.key, self);
  78342. };
  78343. var lruCache = LRUCache;
  78344. var Range = function () {
  78345. function Range(range, options) {
  78346. var _this = this;
  78347. options = parseOptions_1(options);
  78348. if (range instanceof Range) {
  78349. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  78350. return range;
  78351. } else {
  78352. return new Range(range.raw, options);
  78353. }
  78354. }
  78355. if (range instanceof comparator) {
  78356. this.raw = range.value;
  78357. this.set = [[range]];
  78358. this.format();
  78359. return this;
  78360. }
  78361. this.options = options;
  78362. this.loose = !!options.loose;
  78363. this.includePrerelease = !!options.includePrerelease;
  78364. this.raw = range;
  78365. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  78366. return _this.parseRange(range.trim());
  78367. }).filter(function (c) {
  78368. return c.length;
  78369. });
  78370. if (!this.set.length) {
  78371. throw new TypeError("Invalid SemVer Range: " + range);
  78372. }
  78373. if (this.set.length > 1) {
  78374. var first = this.set[0];
  78375. this.set = this.set.filter(function (c) {
  78376. return !isNullSet(c[0]);
  78377. });
  78378. if (this.set.length === 0) this.set = [first];else if (this.set.length > 1) {
  78379. for (var _iterator = _createForOfIteratorHelperLoose(this.set), _step; !(_step = _iterator()).done;) {
  78380. var c = _step.value;
  78381. if (c.length === 1 && isAny(c[0])) {
  78382. this.set = [c];
  78383. break;
  78384. }
  78385. }
  78386. }
  78387. }
  78388. this.format();
  78389. }
  78390. var _proto = Range.prototype;
  78391. _proto.format = function format() {
  78392. this.range = this.set.map(function (comps) {
  78393. return comps.join(' ').trim();
  78394. }).join('||').trim();
  78395. return this.range;
  78396. };
  78397. _proto.toString = function toString() {
  78398. return this.range;
  78399. };
  78400. _proto.parseRange = function parseRange(range) {
  78401. var _this2 = this;
  78402. range = range.trim();
  78403. var memoOpts = Object.keys(this.options).join(',');
  78404. var memoKey = "parseRange:" + memoOpts + ":" + range;
  78405. var cached = cache.get(memoKey);
  78406. if (cached) return cached;
  78407. var loose = this.options.loose;
  78408. var hr = loose ? re$4[t$b.HYPHENRANGELOOSE] : re$4[t$b.HYPHENRANGE];
  78409. range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
  78410. debug_1$1('hyphen replace', range);
  78411. range = range.replace(re$4[t$b.COMPARATORTRIM], comparatorTrimReplace);
  78412. debug_1$1('comparator trim', range, re$4[t$b.COMPARATORTRIM]);
  78413. range = range.replace(re$4[t$b.TILDETRIM], tildeTrimReplace);
  78414. range = range.replace(re$4[t$b.CARETTRIM], caretTrimReplace);
  78415. range = range.split(/\s+/).join(' ');
  78416. var compRe = loose ? re$4[t$b.COMPARATORLOOSE] : re$4[t$b.COMPARATOR];
  78417. var rangeList = range.split(' ').map(function (comp) {
  78418. return parseComparator(comp, _this2.options);
  78419. }).join(' ').split(/\s+/).map(function (comp) {
  78420. return replaceGTE0(comp, _this2.options);
  78421. }).filter(this.options.loose ? function (comp) {
  78422. return !!comp.match(compRe);
  78423. } : function () {
  78424. return true;
  78425. }).map(function (comp) {
  78426. return new comparator(comp, _this2.options);
  78427. });
  78428. rangeList.length;
  78429. var rangeMap = new Map();
  78430. for (var _iterator2 = _createForOfIteratorHelperLoose(rangeList), _step2; !(_step2 = _iterator2()).done;) {
  78431. var comp = _step2.value;
  78432. if (isNullSet(comp)) return [comp];
  78433. rangeMap.set(comp.value, comp);
  78434. }
  78435. if (rangeMap.size > 1 && rangeMap.has('')) rangeMap["delete"]('');
  78436. var result = _toConsumableArray(rangeMap.values());
  78437. cache.set(memoKey, result);
  78438. return result;
  78439. };
  78440. _proto.intersects = function intersects(range, options) {
  78441. if (!(range instanceof Range)) {
  78442. throw new TypeError('a Range is required');
  78443. }
  78444. return this.set.some(function (thisComparators) {
  78445. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  78446. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  78447. return rangeComparators.every(function (rangeComparator) {
  78448. return thisComparator.intersects(rangeComparator, options);
  78449. });
  78450. });
  78451. });
  78452. });
  78453. };
  78454. _proto.test = function test(version) {
  78455. if (!version) {
  78456. return false;
  78457. }
  78458. if (typeof version === 'string') {
  78459. try {
  78460. version = new semver$6(version, this.options);
  78461. } catch (er) {
  78462. return false;
  78463. }
  78464. }
  78465. for (var i = 0; i < this.set.length; i++) {
  78466. if (testSet(this.set[i], version, this.options)) {
  78467. return true;
  78468. }
  78469. }
  78470. return false;
  78471. };
  78472. return Range;
  78473. }();
  78474. var range = Range;
  78475. var cache = new lruCache({
  78476. max: 1000
  78477. });
  78478. var re$4 = re_1$1.re,
  78479. t$b = re_1$1.t,
  78480. comparatorTrimReplace = re_1$1.comparatorTrimReplace,
  78481. tildeTrimReplace = re_1$1.tildeTrimReplace,
  78482. caretTrimReplace = re_1$1.caretTrimReplace;
  78483. var isNullSet = function isNullSet(c) {
  78484. return c.value === '<0.0.0-0';
  78485. };
  78486. var isAny = function isAny(c) {
  78487. return c.value === '';
  78488. };
  78489. var isSatisfiable = function isSatisfiable(comparators, options) {
  78490. var result = true;
  78491. var remainingComparators = comparators.slice();
  78492. var testComparator = remainingComparators.pop();
  78493. while (result && remainingComparators.length) {
  78494. result = remainingComparators.every(function (otherComparator) {
  78495. return testComparator.intersects(otherComparator, options);
  78496. });
  78497. testComparator = remainingComparators.pop();
  78498. }
  78499. return result;
  78500. };
  78501. var parseComparator = function parseComparator(comp, options) {
  78502. debug_1$1('comp', comp, options);
  78503. comp = replaceCarets(comp, options);
  78504. debug_1$1('caret', comp);
  78505. comp = replaceTildes(comp, options);
  78506. debug_1$1('tildes', comp);
  78507. comp = replaceXRanges(comp, options);
  78508. debug_1$1('xrange', comp);
  78509. comp = replaceStars(comp, options);
  78510. debug_1$1('stars', comp);
  78511. return comp;
  78512. };
  78513. var isX = function isX(id) {
  78514. return !id || id.toLowerCase() === 'x' || id === '*';
  78515. };
  78516. var replaceTildes = function replaceTildes(comp, options) {
  78517. return comp.trim().split(/\s+/).map(function (comp) {
  78518. return replaceTilde(comp, options);
  78519. }).join(' ');
  78520. };
  78521. var replaceTilde = function replaceTilde(comp, options) {
  78522. var r = options.loose ? re$4[t$b.TILDELOOSE] : re$4[t$b.TILDE];
  78523. return comp.replace(r, function (_, M, m, p, pr) {
  78524. debug_1$1('tilde', comp, _, M, m, p, pr);
  78525. var ret;
  78526. if (isX(M)) {
  78527. ret = '';
  78528. } else if (isX(m)) {
  78529. ret = ">=" + M + ".0.0 <" + (+M + 1) + ".0.0-0";
  78530. } else if (isX(p)) {
  78531. ret = ">=" + M + "." + m + ".0 <" + M + "." + (+m + 1) + ".0-0";
  78532. } else if (pr) {
  78533. debug_1$1('replaceTilde pr', pr);
  78534. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  78535. } else {
  78536. ret = ">=" + M + "." + m + "." + p + " <" + M + "." + (+m + 1) + ".0-0";
  78537. }
  78538. debug_1$1('tilde return', ret);
  78539. return ret;
  78540. });
  78541. };
  78542. var replaceCarets = function replaceCarets(comp, options) {
  78543. return comp.trim().split(/\s+/).map(function (comp) {
  78544. return replaceCaret(comp, options);
  78545. }).join(' ');
  78546. };
  78547. var replaceCaret = function replaceCaret(comp, options) {
  78548. debug_1$1('caret', comp, options);
  78549. var r = options.loose ? re$4[t$b.CARETLOOSE] : re$4[t$b.CARET];
  78550. var z = options.includePrerelease ? '-0' : '';
  78551. return comp.replace(r, function (_, M, m, p, pr) {
  78552. debug_1$1('caret', comp, _, M, m, p, pr);
  78553. var ret;
  78554. if (isX(M)) {
  78555. ret = '';
  78556. } else if (isX(m)) {
  78557. ret = ">=" + M + ".0.0" + z + " <" + (+M + 1) + ".0.0-0";
  78558. } else if (isX(p)) {
  78559. if (M === '0') {
  78560. ret = ">=" + M + "." + m + ".0" + z + " <" + M + "." + (+m + 1) + ".0-0";
  78561. } else {
  78562. ret = ">=" + M + "." + m + ".0" + z + " <" + (+M + 1) + ".0.0-0";
  78563. }
  78564. } else if (pr) {
  78565. debug_1$1('replaceCaret pr', pr);
  78566. if (M === '0') {
  78567. if (m === '0') {
  78568. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + m + "." + (+p + 1) + "-0";
  78569. } else {
  78570. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  78571. }
  78572. } else {
  78573. ret = ">=" + M + "." + m + "." + p + "-" + pr + " <" + (+M + 1) + ".0.0-0";
  78574. }
  78575. } else {
  78576. debug_1$1('no pr');
  78577. if (M === '0') {
  78578. if (m === '0') {
  78579. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + m + "." + (+p + 1) + "-0";
  78580. } else {
  78581. ret = ">=" + M + "." + m + "." + p + z + " <" + M + "." + (+m + 1) + ".0-0";
  78582. }
  78583. } else {
  78584. ret = ">=" + M + "." + m + "." + p + " <" + (+M + 1) + ".0.0-0";
  78585. }
  78586. }
  78587. debug_1$1('caret return', ret);
  78588. return ret;
  78589. });
  78590. };
  78591. var replaceXRanges = function replaceXRanges(comp, options) {
  78592. debug_1$1('replaceXRanges', comp, options);
  78593. return comp.split(/\s+/).map(function (comp) {
  78594. return replaceXRange(comp, options);
  78595. }).join(' ');
  78596. };
  78597. var replaceXRange = function replaceXRange(comp, options) {
  78598. comp = comp.trim();
  78599. var r = options.loose ? re$4[t$b.XRANGELOOSE] : re$4[t$b.XRANGE];
  78600. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  78601. debug_1$1('xRange', comp, ret, gtlt, M, m, p, pr);
  78602. var xM = isX(M);
  78603. var xm = xM || isX(m);
  78604. var xp = xm || isX(p);
  78605. var anyX = xp;
  78606. if (gtlt === '=' && anyX) {
  78607. gtlt = '';
  78608. }
  78609. pr = options.includePrerelease ? '-0' : '';
  78610. if (xM) {
  78611. if (gtlt === '>' || gtlt === '<') {
  78612. ret = '<0.0.0-0';
  78613. } else {
  78614. ret = '*';
  78615. }
  78616. } else if (gtlt && anyX) {
  78617. if (xm) {
  78618. m = 0;
  78619. }
  78620. p = 0;
  78621. if (gtlt === '>') {
  78622. gtlt = '>=';
  78623. if (xm) {
  78624. M = +M + 1;
  78625. m = 0;
  78626. p = 0;
  78627. } else {
  78628. m = +m + 1;
  78629. p = 0;
  78630. }
  78631. } else if (gtlt === '<=') {
  78632. gtlt = '<';
  78633. if (xm) {
  78634. M = +M + 1;
  78635. } else {
  78636. m = +m + 1;
  78637. }
  78638. }
  78639. if (gtlt === '<') pr = '-0';
  78640. ret = gtlt + M + "." + m + "." + p + pr;
  78641. } else if (xm) {
  78642. ret = ">=" + M + ".0.0" + pr + " <" + (+M + 1) + ".0.0-0";
  78643. } else if (xp) {
  78644. ret = ">=" + M + "." + m + ".0" + pr + " <" + M + "." + (+m + 1) + ".0-0";
  78645. }
  78646. debug_1$1('xRange return', ret);
  78647. return ret;
  78648. });
  78649. };
  78650. var replaceStars = function replaceStars(comp, options) {
  78651. debug_1$1('replaceStars', comp, options);
  78652. return comp.trim().replace(re$4[t$b.STAR], '');
  78653. };
  78654. var replaceGTE0 = function replaceGTE0(comp, options) {
  78655. debug_1$1('replaceGTE0', comp, options);
  78656. return comp.trim().replace(re$4[options.includePrerelease ? t$b.GTE0PRE : t$b.GTE0], '');
  78657. };
  78658. var hyphenReplace = function hyphenReplace(incPr) {
  78659. return function ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  78660. if (isX(fM)) {
  78661. from = '';
  78662. } else if (isX(fm)) {
  78663. from = ">=" + fM + ".0.0" + (incPr ? '-0' : '');
  78664. } else if (isX(fp)) {
  78665. from = ">=" + fM + "." + fm + ".0" + (incPr ? '-0' : '');
  78666. } else if (fpr) {
  78667. from = ">=" + from;
  78668. } else {
  78669. from = ">=" + from + (incPr ? '-0' : '');
  78670. }
  78671. if (isX(tM)) {
  78672. to = '';
  78673. } else if (isX(tm)) {
  78674. to = "<" + (+tM + 1) + ".0.0-0";
  78675. } else if (isX(tp)) {
  78676. to = "<" + tM + "." + (+tm + 1) + ".0-0";
  78677. } else if (tpr) {
  78678. to = "<=" + tM + "." + tm + "." + tp + "-" + tpr;
  78679. } else if (incPr) {
  78680. to = "<" + tM + "." + tm + "." + (+tp + 1) + "-0";
  78681. } else {
  78682. to = "<=" + to;
  78683. }
  78684. return (from + " " + to).trim();
  78685. };
  78686. };
  78687. var testSet = function testSet(set, version, options) {
  78688. for (var i = 0; i < set.length; i++) {
  78689. if (!set[i].test(version)) {
  78690. return false;
  78691. }
  78692. }
  78693. if (version.prerelease.length && !options.includePrerelease) {
  78694. for (var _i = 0; _i < set.length; _i++) {
  78695. debug_1$1(set[_i].semver);
  78696. if (set[_i].semver === comparator.ANY) {
  78697. continue;
  78698. }
  78699. if (set[_i].semver.prerelease.length > 0) {
  78700. var allowed = set[_i].semver;
  78701. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  78702. return true;
  78703. }
  78704. }
  78705. }
  78706. return false;
  78707. }
  78708. return true;
  78709. };
  78710. var ANY$2 = Symbol('SemVer ANY');
  78711. var Comparator = function () {
  78712. function Comparator(comp, options) {
  78713. options = parseOptions_1(options);
  78714. if (comp instanceof Comparator) {
  78715. if (comp.loose === !!options.loose) {
  78716. return comp;
  78717. } else {
  78718. comp = comp.value;
  78719. }
  78720. }
  78721. debug_1$1('comparator', comp, options);
  78722. this.options = options;
  78723. this.loose = !!options.loose;
  78724. this.parse(comp);
  78725. if (this.semver === ANY$2) {
  78726. this.value = '';
  78727. } else {
  78728. this.value = this.operator + this.semver.version;
  78729. }
  78730. debug_1$1('comp', this);
  78731. }
  78732. var _proto = Comparator.prototype;
  78733. _proto.parse = function parse(comp) {
  78734. var r = this.options.loose ? re$3[t$a.COMPARATORLOOSE] : re$3[t$a.COMPARATOR];
  78735. var m = comp.match(r);
  78736. if (!m) {
  78737. throw new TypeError("Invalid comparator: " + comp);
  78738. }
  78739. this.operator = m[1] !== undefined ? m[1] : '';
  78740. if (this.operator === '=') {
  78741. this.operator = '';
  78742. }
  78743. if (!m[2]) {
  78744. this.semver = ANY$2;
  78745. } else {
  78746. this.semver = new semver$6(m[2], this.options.loose);
  78747. }
  78748. };
  78749. _proto.toString = function toString() {
  78750. return this.value;
  78751. };
  78752. _proto.test = function test(version) {
  78753. debug_1$1('Comparator.test', version, this.options.loose);
  78754. if (this.semver === ANY$2 || version === ANY$2) {
  78755. return true;
  78756. }
  78757. if (typeof version === 'string') {
  78758. try {
  78759. version = new semver$6(version, this.options);
  78760. } catch (er) {
  78761. return false;
  78762. }
  78763. }
  78764. return cmp_1$1(version, this.operator, this.semver, this.options);
  78765. };
  78766. _proto.intersects = function intersects(comp, options) {
  78767. if (!(comp instanceof Comparator)) {
  78768. throw new TypeError('a Comparator is required');
  78769. }
  78770. if (!options || typeof options !== 'object') {
  78771. options = {
  78772. loose: !!options,
  78773. includePrerelease: false
  78774. };
  78775. }
  78776. if (this.operator === '') {
  78777. if (this.value === '') {
  78778. return true;
  78779. }
  78780. return new range(comp.value, options).test(this.value);
  78781. } else if (comp.operator === '') {
  78782. if (comp.value === '') {
  78783. return true;
  78784. }
  78785. return new range(this.value, options).test(comp.semver);
  78786. }
  78787. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  78788. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  78789. var sameSemVer = this.semver.version === comp.semver.version;
  78790. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  78791. var oppositeDirectionsLessThan = cmp_1$1(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  78792. var oppositeDirectionsGreaterThan = cmp_1$1(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  78793. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  78794. };
  78795. _createClass(Comparator, null, [{
  78796. key: "ANY",
  78797. get: function get() {
  78798. return ANY$2;
  78799. }
  78800. }]);
  78801. return Comparator;
  78802. }();
  78803. var comparator = Comparator;
  78804. var re$3 = re_1$1.re,
  78805. t$a = re_1$1.t;
  78806. var satisfies = function satisfies(version, range$1, options) {
  78807. try {
  78808. range$1 = new range(range$1, options);
  78809. } catch (er) {
  78810. return false;
  78811. }
  78812. return range$1.test(version);
  78813. };
  78814. var satisfies_1 = satisfies;
  78815. var toComparators = function toComparators(range$1, options) {
  78816. return new range(range$1, options).set.map(function (comp) {
  78817. return comp.map(function (c) {
  78818. return c.value;
  78819. }).join(' ').trim().split(' ');
  78820. });
  78821. };
  78822. var toComparators_1 = toComparators;
  78823. var maxSatisfying = function maxSatisfying(versions, range$1, options) {
  78824. var max = null;
  78825. var maxSV = null;
  78826. var rangeObj = null;
  78827. try {
  78828. rangeObj = new range(range$1, options);
  78829. } catch (er) {
  78830. return null;
  78831. }
  78832. versions.forEach(function (v) {
  78833. if (rangeObj.test(v)) {
  78834. if (!max || maxSV.compare(v) === -1) {
  78835. max = v;
  78836. maxSV = new semver$6(max, options);
  78837. }
  78838. }
  78839. });
  78840. return max;
  78841. };
  78842. var maxSatisfying_1 = maxSatisfying;
  78843. var minSatisfying = function minSatisfying(versions, range$1, options) {
  78844. var min = null;
  78845. var minSV = null;
  78846. var rangeObj = null;
  78847. try {
  78848. rangeObj = new range(range$1, options);
  78849. } catch (er) {
  78850. return null;
  78851. }
  78852. versions.forEach(function (v) {
  78853. if (rangeObj.test(v)) {
  78854. if (!min || minSV.compare(v) === 1) {
  78855. min = v;
  78856. minSV = new semver$6(min, options);
  78857. }
  78858. }
  78859. });
  78860. return min;
  78861. };
  78862. var minSatisfying_1 = minSatisfying;
  78863. var minVersion = function minVersion(range$1, loose) {
  78864. range$1 = new range(range$1, loose);
  78865. var minver = new semver$6('0.0.0');
  78866. if (range$1.test(minver)) {
  78867. return minver;
  78868. }
  78869. minver = new semver$6('0.0.0-0');
  78870. if (range$1.test(minver)) {
  78871. return minver;
  78872. }
  78873. minver = null;
  78874. var _loop = function _loop(i) {
  78875. var comparators = range$1.set[i];
  78876. var setMin = null;
  78877. comparators.forEach(function (comparator) {
  78878. var compver = new semver$6(comparator.semver.version);
  78879. switch (comparator.operator) {
  78880. case '>':
  78881. if (compver.prerelease.length === 0) {
  78882. compver.patch++;
  78883. } else {
  78884. compver.prerelease.push(0);
  78885. }
  78886. compver.raw = compver.format();
  78887. case '':
  78888. case '>=':
  78889. if (!setMin || gt_1$1(compver, setMin)) {
  78890. setMin = compver;
  78891. }
  78892. break;
  78893. case '<':
  78894. case '<=':
  78895. break;
  78896. default:
  78897. throw new Error("Unexpected operation: " + comparator.operator);
  78898. }
  78899. });
  78900. if (setMin && (!minver || gt_1$1(minver, setMin))) minver = setMin;
  78901. };
  78902. for (var i = 0; i < range$1.set.length; ++i) {
  78903. _loop(i);
  78904. }
  78905. if (minver && range$1.test(minver)) {
  78906. return minver;
  78907. }
  78908. return null;
  78909. };
  78910. var minVersion_1 = minVersion;
  78911. var validRange = function validRange(range$1, options) {
  78912. try {
  78913. return new range(range$1, options).range || '*';
  78914. } catch (er) {
  78915. return null;
  78916. }
  78917. };
  78918. var valid = validRange;
  78919. var ANY$1 = comparator.ANY;
  78920. var outside = function outside(version, range$1, hilo, options) {
  78921. version = new semver$6(version, options);
  78922. range$1 = new range(range$1, options);
  78923. var gtfn, ltefn, ltfn, comp, ecomp;
  78924. switch (hilo) {
  78925. case '>':
  78926. gtfn = gt_1$1;
  78927. ltefn = lte_1$1;
  78928. ltfn = lt_1$1;
  78929. comp = '>';
  78930. ecomp = '>=';
  78931. break;
  78932. case '<':
  78933. gtfn = lt_1$1;
  78934. ltefn = gte_1$1;
  78935. ltfn = gt_1$1;
  78936. comp = '<';
  78937. ecomp = '<=';
  78938. break;
  78939. default:
  78940. throw new TypeError('Must provide a hilo val of "<" or ">"');
  78941. }
  78942. if (satisfies_1(version, range$1, options)) {
  78943. return false;
  78944. }
  78945. var _loop = function _loop(i) {
  78946. var comparators = range$1.set[i];
  78947. var high = null;
  78948. var low = null;
  78949. comparators.forEach(function (comparator$1) {
  78950. if (comparator$1.semver === ANY$1) {
  78951. comparator$1 = new comparator('>=0.0.0');
  78952. }
  78953. high = high || comparator$1;
  78954. low = low || comparator$1;
  78955. if (gtfn(comparator$1.semver, high.semver, options)) {
  78956. high = comparator$1;
  78957. } else if (ltfn(comparator$1.semver, low.semver, options)) {
  78958. low = comparator$1;
  78959. }
  78960. });
  78961. if (high.operator === comp || high.operator === ecomp) {
  78962. return {
  78963. v: false
  78964. };
  78965. }
  78966. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  78967. return {
  78968. v: false
  78969. };
  78970. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  78971. return {
  78972. v: false
  78973. };
  78974. }
  78975. };
  78976. for (var i = 0; i < range$1.set.length; ++i) {
  78977. var _ret = _loop(i);
  78978. if (typeof _ret === "object") return _ret.v;
  78979. }
  78980. return true;
  78981. };
  78982. var outside_1 = outside;
  78983. var gtr = function gtr(version, range, options) {
  78984. return outside_1(version, range, '>', options);
  78985. };
  78986. var gtr_1 = gtr;
  78987. var ltr = function ltr(version, range, options) {
  78988. return outside_1(version, range, '<', options);
  78989. };
  78990. var ltr_1 = ltr;
  78991. var intersects = function intersects(r1, r2, options) {
  78992. r1 = new range(r1, options);
  78993. r2 = new range(r2, options);
  78994. return r1.intersects(r2);
  78995. };
  78996. var intersects_1 = intersects;
  78997. var simplify = function simplify(versions, range, options) {
  78998. var set = [];
  78999. var min = null;
  79000. var prev = null;
  79001. var v = versions.sort(function (a, b) {
  79002. return compare_1$1(a, b, options);
  79003. });
  79004. for (var _iterator = _createForOfIteratorHelperLoose(v), _step; !(_step = _iterator()).done;) {
  79005. var version = _step.value;
  79006. var included = satisfies_1(version, range, options);
  79007. if (included) {
  79008. prev = version;
  79009. if (!min) min = version;
  79010. } else {
  79011. if (prev) {
  79012. set.push([min, prev]);
  79013. }
  79014. prev = null;
  79015. min = null;
  79016. }
  79017. }
  79018. if (min) set.push([min, null]);
  79019. var ranges = [];
  79020. for (var _i = 0, _set = set; _i < _set.length; _i++) {
  79021. var _set$_i = _slicedToArray$2(_set[_i], 2),
  79022. _min = _set$_i[0],
  79023. max = _set$_i[1];
  79024. if (_min === max) ranges.push(_min);else if (!max && _min === v[0]) ranges.push('*');else if (!max) ranges.push(">=" + _min);else if (_min === v[0]) ranges.push("<=" + max);else ranges.push(_min + " - " + max);
  79025. }
  79026. var simplified = ranges.join(' || ');
  79027. var original = typeof range.raw === 'string' ? range.raw : String(range);
  79028. return simplified.length < original.length ? simplified : range;
  79029. };
  79030. var ANY = comparator.ANY;
  79031. var subset = function subset(sub, dom, options) {
  79032. if (sub === dom) return true;
  79033. sub = new range(sub, options);
  79034. dom = new range(dom, options);
  79035. var sawNonNull = false;
  79036. OUTER: for (var _iterator = _createForOfIteratorHelperLoose(sub.set), _step; !(_step = _iterator()).done;) {
  79037. var simpleSub = _step.value;
  79038. for (var _iterator2 = _createForOfIteratorHelperLoose(dom.set), _step2; !(_step2 = _iterator2()).done;) {
  79039. var simpleDom = _step2.value;
  79040. var isSub = simpleSubset(simpleSub, simpleDom, options);
  79041. sawNonNull = sawNonNull || isSub !== null;
  79042. if (isSub) continue OUTER;
  79043. }
  79044. if (sawNonNull) return false;
  79045. }
  79046. return true;
  79047. };
  79048. var simpleSubset = function simpleSubset(sub, dom, options) {
  79049. if (sub === dom) return true;
  79050. if (sub.length === 1 && sub[0].semver === ANY) return dom.length === 1 && dom[0].semver === ANY;
  79051. var eqSet = new Set();
  79052. var gt, lt;
  79053. for (var _iterator3 = _createForOfIteratorHelperLoose(sub), _step3; !(_step3 = _iterator3()).done;) {
  79054. var c = _step3.value;
  79055. if (c.operator === '>' || c.operator === '>=') gt = higherGT(gt, c, options);else if (c.operator === '<' || c.operator === '<=') lt = lowerLT(lt, c, options);else eqSet.add(c.semver);
  79056. }
  79057. if (eqSet.size > 1) return null;
  79058. var gtltComp;
  79059. if (gt && lt) {
  79060. gtltComp = compare_1$1(gt.semver, lt.semver, options);
  79061. if (gtltComp > 0) return null;else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null;
  79062. }
  79063. for (var _iterator4 = _createForOfIteratorHelperLoose(eqSet), _step4; !(_step4 = _iterator4()).done;) {
  79064. var eq = _step4.value;
  79065. if (gt && !satisfies_1(eq, String(gt), options)) return null;
  79066. if (lt && !satisfies_1(eq, String(lt), options)) return null;
  79067. for (var _iterator6 = _createForOfIteratorHelperLoose(dom), _step6; !(_step6 = _iterator6()).done;) {
  79068. var _c = _step6.value;
  79069. if (!satisfies_1(eq, String(_c), options)) return false;
  79070. }
  79071. return true;
  79072. }
  79073. var higher, lower;
  79074. var hasDomLT, hasDomGT;
  79075. for (var _iterator5 = _createForOfIteratorHelperLoose(dom), _step5; !(_step5 = _iterator5()).done;) {
  79076. var _c2 = _step5.value;
  79077. hasDomGT = hasDomGT || _c2.operator === '>' || _c2.operator === '>=';
  79078. hasDomLT = hasDomLT || _c2.operator === '<' || _c2.operator === '<=';
  79079. if (gt) {
  79080. if (_c2.operator === '>' || _c2.operator === '>=') {
  79081. higher = higherGT(gt, _c2, options);
  79082. if (higher === _c2 && higher !== gt) return false;
  79083. } else if (gt.operator === '>=' && !satisfies_1(gt.semver, String(_c2), options)) return false;
  79084. }
  79085. if (lt) {
  79086. if (_c2.operator === '<' || _c2.operator === '<=') {
  79087. lower = lowerLT(lt, _c2, options);
  79088. if (lower === _c2 && lower !== lt) return false;
  79089. } else if (lt.operator === '<=' && !satisfies_1(lt.semver, String(_c2), options)) return false;
  79090. }
  79091. if (!_c2.operator && (lt || gt) && gtltComp !== 0) return false;
  79092. }
  79093. if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
  79094. if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
  79095. return true;
  79096. };
  79097. var higherGT = function higherGT(a, b, options) {
  79098. if (!a) return b;
  79099. var comp = compare_1$1(a.semver, b.semver, options);
  79100. return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a;
  79101. };
  79102. var lowerLT = function lowerLT(a, b, options) {
  79103. if (!a) return b;
  79104. var comp = compare_1$1(a.semver, b.semver, options);
  79105. return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a;
  79106. };
  79107. var subset_1 = subset;
  79108. ({
  79109. re: re_1$1.re,
  79110. src: re_1$1.src,
  79111. tokens: re_1$1.t,
  79112. SEMVER_SPEC_VERSION: constants$1.SEMVER_SPEC_VERSION,
  79113. SemVer: semver$6,
  79114. compareIdentifiers: identifiers$1.compareIdentifiers,
  79115. rcompareIdentifiers: identifiers$1.rcompareIdentifiers,
  79116. parse: parse_1$1,
  79117. valid: valid_1,
  79118. clean: clean_1,
  79119. inc: inc_1,
  79120. diff: diff_1,
  79121. major: major_1,
  79122. minor: minor_1,
  79123. patch: patch_1,
  79124. prerelease: prerelease_1,
  79125. compare: compare_1$1,
  79126. rcompare: rcompare_1,
  79127. compareLoose: compareLoose_1,
  79128. compareBuild: compareBuild_1,
  79129. sort: sort_1,
  79130. rsort: rsort_1,
  79131. gt: gt_1$1,
  79132. lt: lt_1$1,
  79133. eq: eq_1$1,
  79134. neq: neq_1$1,
  79135. gte: gte_1$1,
  79136. lte: lte_1$1,
  79137. cmp: cmp_1$1,
  79138. coerce: coerce_1$1,
  79139. Comparator: comparator,
  79140. Range: range,
  79141. satisfies: satisfies_1,
  79142. toComparators: toComparators_1,
  79143. maxSatisfying: maxSatisfying_1,
  79144. minSatisfying: minSatisfying_1,
  79145. minVersion: minVersion_1,
  79146. validRange: valid,
  79147. outside: outside_1,
  79148. gtr: gtr_1,
  79149. ltr: ltr_1,
  79150. intersects: intersects_1,
  79151. simplifyRange: simplify,
  79152. subset: subset_1
  79153. });
  79154. var semver$5 = createCommonjsModule(function (module, exports) {
  79155. exports = module.exports = SemVer;
  79156. var debug;
  79157. if (typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG)) {
  79158. debug = function debug() {
  79159. var args = Array.prototype.slice.call(arguments, 0);
  79160. args.unshift('SEMVER');
  79161. console.log.apply(console, args);
  79162. };
  79163. } else {
  79164. debug = function debug() {};
  79165. }
  79166. exports.SEMVER_SPEC_VERSION = '2.0.0';
  79167. var MAX_LENGTH = 256;
  79168. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  79169. var MAX_SAFE_COMPONENT_LENGTH = 16;
  79170. var re = exports.re = [];
  79171. var src = exports.src = [];
  79172. var t = exports.tokens = {};
  79173. var R = 0;
  79174. function tok(n) {
  79175. t[n] = R++;
  79176. }
  79177. tok('NUMERICIDENTIFIER');
  79178. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  79179. tok('NUMERICIDENTIFIERLOOSE');
  79180. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  79181. tok('NONNUMERICIDENTIFIER');
  79182. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  79183. tok('MAINVERSION');
  79184. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  79185. tok('MAINVERSIONLOOSE');
  79186. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  79187. tok('PRERELEASEIDENTIFIER');
  79188. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  79189. tok('PRERELEASEIDENTIFIERLOOSE');
  79190. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  79191. tok('PRERELEASE');
  79192. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  79193. tok('PRERELEASELOOSE');
  79194. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  79195. tok('BUILDIDENTIFIER');
  79196. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  79197. tok('BUILD');
  79198. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  79199. tok('FULL');
  79200. tok('FULLPLAIN');
  79201. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  79202. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  79203. tok('LOOSEPLAIN');
  79204. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  79205. tok('LOOSE');
  79206. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  79207. tok('GTLT');
  79208. src[t.GTLT] = '((?:<|>)?=?)';
  79209. tok('XRANGEIDENTIFIERLOOSE');
  79210. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  79211. tok('XRANGEIDENTIFIER');
  79212. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  79213. tok('XRANGEPLAIN');
  79214. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  79215. tok('XRANGEPLAINLOOSE');
  79216. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  79217. tok('XRANGE');
  79218. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  79219. tok('XRANGELOOSE');
  79220. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  79221. tok('COERCE');
  79222. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  79223. tok('COERCERTL');
  79224. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  79225. tok('LONETILDE');
  79226. src[t.LONETILDE] = '(?:~>?)';
  79227. tok('TILDETRIM');
  79228. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  79229. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  79230. var tildeTrimReplace = '$1~';
  79231. tok('TILDE');
  79232. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  79233. tok('TILDELOOSE');
  79234. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  79235. tok('LONECARET');
  79236. src[t.LONECARET] = '(?:\\^)';
  79237. tok('CARETTRIM');
  79238. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  79239. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  79240. var caretTrimReplace = '$1^';
  79241. tok('CARET');
  79242. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  79243. tok('CARETLOOSE');
  79244. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  79245. tok('COMPARATORLOOSE');
  79246. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  79247. tok('COMPARATOR');
  79248. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  79249. tok('COMPARATORTRIM');
  79250. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  79251. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  79252. var comparatorTrimReplace = '$1$2$3';
  79253. tok('HYPHENRANGE');
  79254. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  79255. tok('HYPHENRANGELOOSE');
  79256. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  79257. tok('STAR');
  79258. src[t.STAR] = '(<|>)?=?\\s*\\*';
  79259. for (var i = 0; i < R; i++) {
  79260. debug(i, src[i]);
  79261. if (!re[i]) {
  79262. re[i] = new RegExp(src[i]);
  79263. }
  79264. }
  79265. exports.parse = parse;
  79266. function parse(version, options) {
  79267. if (!options || typeof options !== 'object') {
  79268. options = {
  79269. loose: !!options,
  79270. includePrerelease: false
  79271. };
  79272. }
  79273. if (version instanceof SemVer) {
  79274. return version;
  79275. }
  79276. if (typeof version !== 'string') {
  79277. return null;
  79278. }
  79279. if (version.length > MAX_LENGTH) {
  79280. return null;
  79281. }
  79282. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  79283. if (!r.test(version)) {
  79284. return null;
  79285. }
  79286. try {
  79287. return new SemVer(version, options);
  79288. } catch (er) {
  79289. return null;
  79290. }
  79291. }
  79292. exports.valid = valid;
  79293. function valid(version, options) {
  79294. var v = parse(version, options);
  79295. return v ? v.version : null;
  79296. }
  79297. exports.clean = clean;
  79298. function clean(version, options) {
  79299. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  79300. return s ? s.version : null;
  79301. }
  79302. exports.SemVer = SemVer;
  79303. function SemVer(version, options) {
  79304. if (!options || typeof options !== 'object') {
  79305. options = {
  79306. loose: !!options,
  79307. includePrerelease: false
  79308. };
  79309. }
  79310. if (version instanceof SemVer) {
  79311. if (version.loose === options.loose) {
  79312. return version;
  79313. } else {
  79314. version = version.version;
  79315. }
  79316. } else if (typeof version !== 'string') {
  79317. throw new TypeError('Invalid Version: ' + version);
  79318. }
  79319. if (version.length > MAX_LENGTH) {
  79320. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  79321. }
  79322. if (!(this instanceof SemVer)) {
  79323. return new SemVer(version, options);
  79324. }
  79325. debug('SemVer', version, options);
  79326. this.options = options;
  79327. this.loose = !!options.loose;
  79328. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  79329. if (!m) {
  79330. throw new TypeError('Invalid Version: ' + version);
  79331. }
  79332. this.raw = version;
  79333. this.major = +m[1];
  79334. this.minor = +m[2];
  79335. this.patch = +m[3];
  79336. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  79337. throw new TypeError('Invalid major version');
  79338. }
  79339. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  79340. throw new TypeError('Invalid minor version');
  79341. }
  79342. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  79343. throw new TypeError('Invalid patch version');
  79344. }
  79345. if (!m[4]) {
  79346. this.prerelease = [];
  79347. } else {
  79348. this.prerelease = m[4].split('.').map(function (id) {
  79349. if (/^[0-9]+$/.test(id)) {
  79350. var num = +id;
  79351. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  79352. return num;
  79353. }
  79354. }
  79355. return id;
  79356. });
  79357. }
  79358. this.build = m[5] ? m[5].split('.') : [];
  79359. this.format();
  79360. }
  79361. SemVer.prototype.format = function () {
  79362. this.version = this.major + '.' + this.minor + '.' + this.patch;
  79363. if (this.prerelease.length) {
  79364. this.version += '-' + this.prerelease.join('.');
  79365. }
  79366. return this.version;
  79367. };
  79368. SemVer.prototype.toString = function () {
  79369. return this.version;
  79370. };
  79371. SemVer.prototype.compare = function (other) {
  79372. debug('SemVer.compare', this.version, this.options, other);
  79373. if (!(other instanceof SemVer)) {
  79374. other = new SemVer(other, this.options);
  79375. }
  79376. return this.compareMain(other) || this.comparePre(other);
  79377. };
  79378. SemVer.prototype.compareMain = function (other) {
  79379. if (!(other instanceof SemVer)) {
  79380. other = new SemVer(other, this.options);
  79381. }
  79382. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  79383. };
  79384. SemVer.prototype.comparePre = function (other) {
  79385. if (!(other instanceof SemVer)) {
  79386. other = new SemVer(other, this.options);
  79387. }
  79388. if (this.prerelease.length && !other.prerelease.length) {
  79389. return -1;
  79390. } else if (!this.prerelease.length && other.prerelease.length) {
  79391. return 1;
  79392. } else if (!this.prerelease.length && !other.prerelease.length) {
  79393. return 0;
  79394. }
  79395. var i = 0;
  79396. do {
  79397. var a = this.prerelease[i];
  79398. var b = other.prerelease[i];
  79399. debug('prerelease compare', i, a, b);
  79400. if (a === undefined && b === undefined) {
  79401. return 0;
  79402. } else if (b === undefined) {
  79403. return 1;
  79404. } else if (a === undefined) {
  79405. return -1;
  79406. } else if (a === b) {
  79407. continue;
  79408. } else {
  79409. return compareIdentifiers(a, b);
  79410. }
  79411. } while (++i);
  79412. };
  79413. SemVer.prototype.compareBuild = function (other) {
  79414. if (!(other instanceof SemVer)) {
  79415. other = new SemVer(other, this.options);
  79416. }
  79417. var i = 0;
  79418. do {
  79419. var a = this.build[i];
  79420. var b = other.build[i];
  79421. debug('prerelease compare', i, a, b);
  79422. if (a === undefined && b === undefined) {
  79423. return 0;
  79424. } else if (b === undefined) {
  79425. return 1;
  79426. } else if (a === undefined) {
  79427. return -1;
  79428. } else if (a === b) {
  79429. continue;
  79430. } else {
  79431. return compareIdentifiers(a, b);
  79432. }
  79433. } while (++i);
  79434. };
  79435. SemVer.prototype.inc = function (release, identifier) {
  79436. switch (release) {
  79437. case 'premajor':
  79438. this.prerelease.length = 0;
  79439. this.patch = 0;
  79440. this.minor = 0;
  79441. this.major++;
  79442. this.inc('pre', identifier);
  79443. break;
  79444. case 'preminor':
  79445. this.prerelease.length = 0;
  79446. this.patch = 0;
  79447. this.minor++;
  79448. this.inc('pre', identifier);
  79449. break;
  79450. case 'prepatch':
  79451. this.prerelease.length = 0;
  79452. this.inc('patch', identifier);
  79453. this.inc('pre', identifier);
  79454. break;
  79455. case 'prerelease':
  79456. if (this.prerelease.length === 0) {
  79457. this.inc('patch', identifier);
  79458. }
  79459. this.inc('pre', identifier);
  79460. break;
  79461. case 'major':
  79462. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  79463. this.major++;
  79464. }
  79465. this.minor = 0;
  79466. this.patch = 0;
  79467. this.prerelease = [];
  79468. break;
  79469. case 'minor':
  79470. if (this.patch !== 0 || this.prerelease.length === 0) {
  79471. this.minor++;
  79472. }
  79473. this.patch = 0;
  79474. this.prerelease = [];
  79475. break;
  79476. case 'patch':
  79477. if (this.prerelease.length === 0) {
  79478. this.patch++;
  79479. }
  79480. this.prerelease = [];
  79481. break;
  79482. case 'pre':
  79483. if (this.prerelease.length === 0) {
  79484. this.prerelease = [0];
  79485. } else {
  79486. var i = this.prerelease.length;
  79487. while (--i >= 0) {
  79488. if (typeof this.prerelease[i] === 'number') {
  79489. this.prerelease[i]++;
  79490. i = -2;
  79491. }
  79492. }
  79493. if (i === -1) {
  79494. this.prerelease.push(0);
  79495. }
  79496. }
  79497. if (identifier) {
  79498. if (this.prerelease[0] === identifier) {
  79499. if (isNaN(this.prerelease[1])) {
  79500. this.prerelease = [identifier, 0];
  79501. }
  79502. } else {
  79503. this.prerelease = [identifier, 0];
  79504. }
  79505. }
  79506. break;
  79507. default:
  79508. throw new Error('invalid increment argument: ' + release);
  79509. }
  79510. this.format();
  79511. this.raw = this.version;
  79512. return this;
  79513. };
  79514. exports.inc = inc;
  79515. function inc(version, release, loose, identifier) {
  79516. if (typeof loose === 'string') {
  79517. identifier = loose;
  79518. loose = undefined;
  79519. }
  79520. try {
  79521. return new SemVer(version, loose).inc(release, identifier).version;
  79522. } catch (er) {
  79523. return null;
  79524. }
  79525. }
  79526. exports.diff = diff;
  79527. function diff(version1, version2) {
  79528. if (eq(version1, version2)) {
  79529. return null;
  79530. } else {
  79531. var v1 = parse(version1);
  79532. var v2 = parse(version2);
  79533. var prefix = '';
  79534. if (v1.prerelease.length || v2.prerelease.length) {
  79535. prefix = 'pre';
  79536. var defaultResult = 'prerelease';
  79537. }
  79538. for (var key in v1) {
  79539. if (key === 'major' || key === 'minor' || key === 'patch') {
  79540. if (v1[key] !== v2[key]) {
  79541. return prefix + key;
  79542. }
  79543. }
  79544. }
  79545. return defaultResult;
  79546. }
  79547. }
  79548. exports.compareIdentifiers = compareIdentifiers;
  79549. var numeric = /^[0-9]+$/;
  79550. function compareIdentifiers(a, b) {
  79551. var anum = numeric.test(a);
  79552. var bnum = numeric.test(b);
  79553. if (anum && bnum) {
  79554. a = +a;
  79555. b = +b;
  79556. }
  79557. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  79558. }
  79559. exports.rcompareIdentifiers = rcompareIdentifiers;
  79560. function rcompareIdentifiers(a, b) {
  79561. return compareIdentifiers(b, a);
  79562. }
  79563. exports.major = major;
  79564. function major(a, loose) {
  79565. return new SemVer(a, loose).major;
  79566. }
  79567. exports.minor = minor;
  79568. function minor(a, loose) {
  79569. return new SemVer(a, loose).minor;
  79570. }
  79571. exports.patch = patch;
  79572. function patch(a, loose) {
  79573. return new SemVer(a, loose).patch;
  79574. }
  79575. exports.compare = compare;
  79576. function compare(a, b, loose) {
  79577. return new SemVer(a, loose).compare(new SemVer(b, loose));
  79578. }
  79579. exports.compareLoose = compareLoose;
  79580. function compareLoose(a, b) {
  79581. return compare(a, b, true);
  79582. }
  79583. exports.compareBuild = compareBuild;
  79584. function compareBuild(a, b, loose) {
  79585. var versionA = new SemVer(a, loose);
  79586. var versionB = new SemVer(b, loose);
  79587. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  79588. }
  79589. exports.rcompare = rcompare;
  79590. function rcompare(a, b, loose) {
  79591. return compare(b, a, loose);
  79592. }
  79593. exports.sort = sort;
  79594. function sort(list, loose) {
  79595. return list.sort(function (a, b) {
  79596. return exports.compareBuild(a, b, loose);
  79597. });
  79598. }
  79599. exports.rsort = rsort;
  79600. function rsort(list, loose) {
  79601. return list.sort(function (a, b) {
  79602. return exports.compareBuild(b, a, loose);
  79603. });
  79604. }
  79605. exports.gt = gt;
  79606. function gt(a, b, loose) {
  79607. return compare(a, b, loose) > 0;
  79608. }
  79609. exports.lt = lt;
  79610. function lt(a, b, loose) {
  79611. return compare(a, b, loose) < 0;
  79612. }
  79613. exports.eq = eq;
  79614. function eq(a, b, loose) {
  79615. return compare(a, b, loose) === 0;
  79616. }
  79617. exports.neq = neq;
  79618. function neq(a, b, loose) {
  79619. return compare(a, b, loose) !== 0;
  79620. }
  79621. exports.gte = gte;
  79622. function gte(a, b, loose) {
  79623. return compare(a, b, loose) >= 0;
  79624. }
  79625. exports.lte = lte;
  79626. function lte(a, b, loose) {
  79627. return compare(a, b, loose) <= 0;
  79628. }
  79629. exports.cmp = cmp;
  79630. function cmp(a, op, b, loose) {
  79631. switch (op) {
  79632. case '===':
  79633. if (typeof a === 'object') a = a.version;
  79634. if (typeof b === 'object') b = b.version;
  79635. return a === b;
  79636. case '!==':
  79637. if (typeof a === 'object') a = a.version;
  79638. if (typeof b === 'object') b = b.version;
  79639. return a !== b;
  79640. case '':
  79641. case '=':
  79642. case '==':
  79643. return eq(a, b, loose);
  79644. case '!=':
  79645. return neq(a, b, loose);
  79646. case '>':
  79647. return gt(a, b, loose);
  79648. case '>=':
  79649. return gte(a, b, loose);
  79650. case '<':
  79651. return lt(a, b, loose);
  79652. case '<=':
  79653. return lte(a, b, loose);
  79654. default:
  79655. throw new TypeError('Invalid operator: ' + op);
  79656. }
  79657. }
  79658. exports.Comparator = Comparator;
  79659. function Comparator(comp, options) {
  79660. if (!options || typeof options !== 'object') {
  79661. options = {
  79662. loose: !!options,
  79663. includePrerelease: false
  79664. };
  79665. }
  79666. if (comp instanceof Comparator) {
  79667. if (comp.loose === !!options.loose) {
  79668. return comp;
  79669. } else {
  79670. comp = comp.value;
  79671. }
  79672. }
  79673. if (!(this instanceof Comparator)) {
  79674. return new Comparator(comp, options);
  79675. }
  79676. debug('comparator', comp, options);
  79677. this.options = options;
  79678. this.loose = !!options.loose;
  79679. this.parse(comp);
  79680. if (this.semver === ANY) {
  79681. this.value = '';
  79682. } else {
  79683. this.value = this.operator + this.semver.version;
  79684. }
  79685. debug('comp', this);
  79686. }
  79687. var ANY = {};
  79688. Comparator.prototype.parse = function (comp) {
  79689. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  79690. var m = comp.match(r);
  79691. if (!m) {
  79692. throw new TypeError('Invalid comparator: ' + comp);
  79693. }
  79694. this.operator = m[1] !== undefined ? m[1] : '';
  79695. if (this.operator === '=') {
  79696. this.operator = '';
  79697. }
  79698. if (!m[2]) {
  79699. this.semver = ANY;
  79700. } else {
  79701. this.semver = new SemVer(m[2], this.options.loose);
  79702. }
  79703. };
  79704. Comparator.prototype.toString = function () {
  79705. return this.value;
  79706. };
  79707. Comparator.prototype.test = function (version) {
  79708. debug('Comparator.test', version, this.options.loose);
  79709. if (this.semver === ANY || version === ANY) {
  79710. return true;
  79711. }
  79712. if (typeof version === 'string') {
  79713. try {
  79714. version = new SemVer(version, this.options);
  79715. } catch (er) {
  79716. return false;
  79717. }
  79718. }
  79719. return cmp(version, this.operator, this.semver, this.options);
  79720. };
  79721. Comparator.prototype.intersects = function (comp, options) {
  79722. if (!(comp instanceof Comparator)) {
  79723. throw new TypeError('a Comparator is required');
  79724. }
  79725. if (!options || typeof options !== 'object') {
  79726. options = {
  79727. loose: !!options,
  79728. includePrerelease: false
  79729. };
  79730. }
  79731. var rangeTmp;
  79732. if (this.operator === '') {
  79733. if (this.value === '') {
  79734. return true;
  79735. }
  79736. rangeTmp = new Range(comp.value, options);
  79737. return satisfies(this.value, rangeTmp, options);
  79738. } else if (comp.operator === '') {
  79739. if (comp.value === '') {
  79740. return true;
  79741. }
  79742. rangeTmp = new Range(this.value, options);
  79743. return satisfies(comp.semver, rangeTmp, options);
  79744. }
  79745. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  79746. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  79747. var sameSemVer = this.semver.version === comp.semver.version;
  79748. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  79749. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  79750. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  79751. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  79752. };
  79753. exports.Range = Range;
  79754. function Range(range, options) {
  79755. if (!options || typeof options !== 'object') {
  79756. options = {
  79757. loose: !!options,
  79758. includePrerelease: false
  79759. };
  79760. }
  79761. if (range instanceof Range) {
  79762. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  79763. return range;
  79764. } else {
  79765. return new Range(range.raw, options);
  79766. }
  79767. }
  79768. if (range instanceof Comparator) {
  79769. return new Range(range.value, options);
  79770. }
  79771. if (!(this instanceof Range)) {
  79772. return new Range(range, options);
  79773. }
  79774. this.options = options;
  79775. this.loose = !!options.loose;
  79776. this.includePrerelease = !!options.includePrerelease;
  79777. this.raw = range;
  79778. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  79779. return this.parseRange(range.trim());
  79780. }, this).filter(function (c) {
  79781. return c.length;
  79782. });
  79783. if (!this.set.length) {
  79784. throw new TypeError('Invalid SemVer Range: ' + range);
  79785. }
  79786. this.format();
  79787. }
  79788. Range.prototype.format = function () {
  79789. this.range = this.set.map(function (comps) {
  79790. return comps.join(' ').trim();
  79791. }).join('||').trim();
  79792. return this.range;
  79793. };
  79794. Range.prototype.toString = function () {
  79795. return this.range;
  79796. };
  79797. Range.prototype.parseRange = function (range) {
  79798. var loose = this.options.loose;
  79799. range = range.trim();
  79800. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  79801. range = range.replace(hr, hyphenReplace);
  79802. debug('hyphen replace', range);
  79803. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  79804. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  79805. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  79806. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  79807. range = range.split(/\s+/).join(' ');
  79808. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  79809. var set = range.split(' ').map(function (comp) {
  79810. return parseComparator(comp, this.options);
  79811. }, this).join(' ').split(/\s+/);
  79812. if (this.options.loose) {
  79813. set = set.filter(function (comp) {
  79814. return !!comp.match(compRe);
  79815. });
  79816. }
  79817. set = set.map(function (comp) {
  79818. return new Comparator(comp, this.options);
  79819. }, this);
  79820. return set;
  79821. };
  79822. Range.prototype.intersects = function (range, options) {
  79823. if (!(range instanceof Range)) {
  79824. throw new TypeError('a Range is required');
  79825. }
  79826. return this.set.some(function (thisComparators) {
  79827. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  79828. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  79829. return rangeComparators.every(function (rangeComparator) {
  79830. return thisComparator.intersects(rangeComparator, options);
  79831. });
  79832. });
  79833. });
  79834. });
  79835. };
  79836. function isSatisfiable(comparators, options) {
  79837. var result = true;
  79838. var remainingComparators = comparators.slice();
  79839. var testComparator = remainingComparators.pop();
  79840. while (result && remainingComparators.length) {
  79841. result = remainingComparators.every(function (otherComparator) {
  79842. return testComparator.intersects(otherComparator, options);
  79843. });
  79844. testComparator = remainingComparators.pop();
  79845. }
  79846. return result;
  79847. }
  79848. exports.toComparators = toComparators;
  79849. function toComparators(range, options) {
  79850. return new Range(range, options).set.map(function (comp) {
  79851. return comp.map(function (c) {
  79852. return c.value;
  79853. }).join(' ').trim().split(' ');
  79854. });
  79855. }
  79856. function parseComparator(comp, options) {
  79857. debug('comp', comp, options);
  79858. comp = replaceCarets(comp, options);
  79859. debug('caret', comp);
  79860. comp = replaceTildes(comp, options);
  79861. debug('tildes', comp);
  79862. comp = replaceXRanges(comp, options);
  79863. debug('xrange', comp);
  79864. comp = replaceStars(comp, options);
  79865. debug('stars', comp);
  79866. return comp;
  79867. }
  79868. function isX(id) {
  79869. return !id || id.toLowerCase() === 'x' || id === '*';
  79870. }
  79871. function replaceTildes(comp, options) {
  79872. return comp.trim().split(/\s+/).map(function (comp) {
  79873. return replaceTilde(comp, options);
  79874. }).join(' ');
  79875. }
  79876. function replaceTilde(comp, options) {
  79877. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  79878. return comp.replace(r, function (_, M, m, p, pr) {
  79879. debug('tilde', comp, _, M, m, p, pr);
  79880. var ret;
  79881. if (isX(M)) {
  79882. ret = '';
  79883. } else if (isX(m)) {
  79884. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  79885. } else if (isX(p)) {
  79886. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  79887. } else if (pr) {
  79888. debug('replaceTilde pr', pr);
  79889. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  79890. } else {
  79891. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  79892. }
  79893. debug('tilde return', ret);
  79894. return ret;
  79895. });
  79896. }
  79897. function replaceCarets(comp, options) {
  79898. return comp.trim().split(/\s+/).map(function (comp) {
  79899. return replaceCaret(comp, options);
  79900. }).join(' ');
  79901. }
  79902. function replaceCaret(comp, options) {
  79903. debug('caret', comp, options);
  79904. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  79905. return comp.replace(r, function (_, M, m, p, pr) {
  79906. debug('caret', comp, _, M, m, p, pr);
  79907. var ret;
  79908. if (isX(M)) {
  79909. ret = '';
  79910. } else if (isX(m)) {
  79911. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  79912. } else if (isX(p)) {
  79913. if (M === '0') {
  79914. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  79915. } else {
  79916. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  79917. }
  79918. } else if (pr) {
  79919. debug('replaceCaret pr', pr);
  79920. if (M === '0') {
  79921. if (m === '0') {
  79922. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  79923. } else {
  79924. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  79925. }
  79926. } else {
  79927. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  79928. }
  79929. } else {
  79930. debug('no pr');
  79931. if (M === '0') {
  79932. if (m === '0') {
  79933. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  79934. } else {
  79935. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  79936. }
  79937. } else {
  79938. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  79939. }
  79940. }
  79941. debug('caret return', ret);
  79942. return ret;
  79943. });
  79944. }
  79945. function replaceXRanges(comp, options) {
  79946. debug('replaceXRanges', comp, options);
  79947. return comp.split(/\s+/).map(function (comp) {
  79948. return replaceXRange(comp, options);
  79949. }).join(' ');
  79950. }
  79951. function replaceXRange(comp, options) {
  79952. comp = comp.trim();
  79953. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  79954. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  79955. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  79956. var xM = isX(M);
  79957. var xm = xM || isX(m);
  79958. var xp = xm || isX(p);
  79959. var anyX = xp;
  79960. if (gtlt === '=' && anyX) {
  79961. gtlt = '';
  79962. }
  79963. pr = options.includePrerelease ? '-0' : '';
  79964. if (xM) {
  79965. if (gtlt === '>' || gtlt === '<') {
  79966. ret = '<0.0.0-0';
  79967. } else {
  79968. ret = '*';
  79969. }
  79970. } else if (gtlt && anyX) {
  79971. if (xm) {
  79972. m = 0;
  79973. }
  79974. p = 0;
  79975. if (gtlt === '>') {
  79976. gtlt = '>=';
  79977. if (xm) {
  79978. M = +M + 1;
  79979. m = 0;
  79980. p = 0;
  79981. } else {
  79982. m = +m + 1;
  79983. p = 0;
  79984. }
  79985. } else if (gtlt === '<=') {
  79986. gtlt = '<';
  79987. if (xm) {
  79988. M = +M + 1;
  79989. } else {
  79990. m = +m + 1;
  79991. }
  79992. }
  79993. ret = gtlt + M + '.' + m + '.' + p + pr;
  79994. } else if (xm) {
  79995. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  79996. } else if (xp) {
  79997. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  79998. }
  79999. debug('xRange return', ret);
  80000. return ret;
  80001. });
  80002. }
  80003. function replaceStars(comp, options) {
  80004. debug('replaceStars', comp, options);
  80005. return comp.trim().replace(re[t.STAR], '');
  80006. }
  80007. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  80008. if (isX(fM)) {
  80009. from = '';
  80010. } else if (isX(fm)) {
  80011. from = '>=' + fM + '.0.0';
  80012. } else if (isX(fp)) {
  80013. from = '>=' + fM + '.' + fm + '.0';
  80014. } else {
  80015. from = '>=' + from;
  80016. }
  80017. if (isX(tM)) {
  80018. to = '';
  80019. } else if (isX(tm)) {
  80020. to = '<' + (+tM + 1) + '.0.0';
  80021. } else if (isX(tp)) {
  80022. to = '<' + tM + '.' + (+tm + 1) + '.0';
  80023. } else if (tpr) {
  80024. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  80025. } else {
  80026. to = '<=' + to;
  80027. }
  80028. return (from + ' ' + to).trim();
  80029. }
  80030. Range.prototype.test = function (version) {
  80031. if (!version) {
  80032. return false;
  80033. }
  80034. if (typeof version === 'string') {
  80035. try {
  80036. version = new SemVer(version, this.options);
  80037. } catch (er) {
  80038. return false;
  80039. }
  80040. }
  80041. for (var i = 0; i < this.set.length; i++) {
  80042. if (testSet(this.set[i], version, this.options)) {
  80043. return true;
  80044. }
  80045. }
  80046. return false;
  80047. };
  80048. function testSet(set, version, options) {
  80049. for (var i = 0; i < set.length; i++) {
  80050. if (!set[i].test(version)) {
  80051. return false;
  80052. }
  80053. }
  80054. if (version.prerelease.length && !options.includePrerelease) {
  80055. for (i = 0; i < set.length; i++) {
  80056. debug(set[i].semver);
  80057. if (set[i].semver === ANY) {
  80058. continue;
  80059. }
  80060. if (set[i].semver.prerelease.length > 0) {
  80061. var allowed = set[i].semver;
  80062. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  80063. return true;
  80064. }
  80065. }
  80066. }
  80067. return false;
  80068. }
  80069. return true;
  80070. }
  80071. exports.satisfies = satisfies;
  80072. function satisfies(version, range, options) {
  80073. try {
  80074. range = new Range(range, options);
  80075. } catch (er) {
  80076. return false;
  80077. }
  80078. return range.test(version);
  80079. }
  80080. exports.maxSatisfying = maxSatisfying;
  80081. function maxSatisfying(versions, range, options) {
  80082. var max = null;
  80083. var maxSV = null;
  80084. try {
  80085. var rangeObj = new Range(range, options);
  80086. } catch (er) {
  80087. return null;
  80088. }
  80089. versions.forEach(function (v) {
  80090. if (rangeObj.test(v)) {
  80091. if (!max || maxSV.compare(v) === -1) {
  80092. max = v;
  80093. maxSV = new SemVer(max, options);
  80094. }
  80095. }
  80096. });
  80097. return max;
  80098. }
  80099. exports.minSatisfying = minSatisfying;
  80100. function minSatisfying(versions, range, options) {
  80101. var min = null;
  80102. var minSV = null;
  80103. try {
  80104. var rangeObj = new Range(range, options);
  80105. } catch (er) {
  80106. return null;
  80107. }
  80108. versions.forEach(function (v) {
  80109. if (rangeObj.test(v)) {
  80110. if (!min || minSV.compare(v) === 1) {
  80111. min = v;
  80112. minSV = new SemVer(min, options);
  80113. }
  80114. }
  80115. });
  80116. return min;
  80117. }
  80118. exports.minVersion = minVersion;
  80119. function minVersion(range, loose) {
  80120. range = new Range(range, loose);
  80121. var minver = new SemVer('0.0.0');
  80122. if (range.test(minver)) {
  80123. return minver;
  80124. }
  80125. minver = new SemVer('0.0.0-0');
  80126. if (range.test(minver)) {
  80127. return minver;
  80128. }
  80129. minver = null;
  80130. for (var i = 0; i < range.set.length; ++i) {
  80131. var comparators = range.set[i];
  80132. comparators.forEach(function (comparator) {
  80133. var compver = new SemVer(comparator.semver.version);
  80134. switch (comparator.operator) {
  80135. case '>':
  80136. if (compver.prerelease.length === 0) {
  80137. compver.patch++;
  80138. } else {
  80139. compver.prerelease.push(0);
  80140. }
  80141. compver.raw = compver.format();
  80142. case '':
  80143. case '>=':
  80144. if (!minver || gt(minver, compver)) {
  80145. minver = compver;
  80146. }
  80147. break;
  80148. case '<':
  80149. case '<=':
  80150. break;
  80151. default:
  80152. throw new Error('Unexpected operation: ' + comparator.operator);
  80153. }
  80154. });
  80155. }
  80156. if (minver && range.test(minver)) {
  80157. return minver;
  80158. }
  80159. return null;
  80160. }
  80161. exports.validRange = validRange;
  80162. function validRange(range, options) {
  80163. try {
  80164. return new Range(range, options).range || '*';
  80165. } catch (er) {
  80166. return null;
  80167. }
  80168. }
  80169. exports.ltr = ltr;
  80170. function ltr(version, range, options) {
  80171. return outside(version, range, '<', options);
  80172. }
  80173. exports.gtr = gtr;
  80174. function gtr(version, range, options) {
  80175. return outside(version, range, '>', options);
  80176. }
  80177. exports.outside = outside;
  80178. function outside(version, range, hilo, options) {
  80179. version = new SemVer(version, options);
  80180. range = new Range(range, options);
  80181. var gtfn, ltefn, ltfn, comp, ecomp;
  80182. switch (hilo) {
  80183. case '>':
  80184. gtfn = gt;
  80185. ltefn = lte;
  80186. ltfn = lt;
  80187. comp = '>';
  80188. ecomp = '>=';
  80189. break;
  80190. case '<':
  80191. gtfn = lt;
  80192. ltefn = gte;
  80193. ltfn = gt;
  80194. comp = '<';
  80195. ecomp = '<=';
  80196. break;
  80197. default:
  80198. throw new TypeError('Must provide a hilo val of "<" or ">"');
  80199. }
  80200. if (satisfies(version, range, options)) {
  80201. return false;
  80202. }
  80203. for (var i = 0; i < range.set.length; ++i) {
  80204. var comparators = range.set[i];
  80205. var high = null;
  80206. var low = null;
  80207. comparators.forEach(function (comparator) {
  80208. if (comparator.semver === ANY) {
  80209. comparator = new Comparator('>=0.0.0');
  80210. }
  80211. high = high || comparator;
  80212. low = low || comparator;
  80213. if (gtfn(comparator.semver, high.semver, options)) {
  80214. high = comparator;
  80215. } else if (ltfn(comparator.semver, low.semver, options)) {
  80216. low = comparator;
  80217. }
  80218. });
  80219. if (high.operator === comp || high.operator === ecomp) {
  80220. return false;
  80221. }
  80222. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  80223. return false;
  80224. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  80225. return false;
  80226. }
  80227. }
  80228. return true;
  80229. }
  80230. exports.prerelease = prerelease;
  80231. function prerelease(version, options) {
  80232. var parsed = parse(version, options);
  80233. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  80234. }
  80235. exports.intersects = intersects;
  80236. function intersects(r1, r2, options) {
  80237. r1 = new Range(r1, options);
  80238. r2 = new Range(r2, options);
  80239. return r1.intersects(r2);
  80240. }
  80241. exports.coerce = coerce;
  80242. function coerce(version, options) {
  80243. if (version instanceof SemVer) {
  80244. return version;
  80245. }
  80246. if (typeof version === 'number') {
  80247. version = String(version);
  80248. }
  80249. if (typeof version !== 'string') {
  80250. return null;
  80251. }
  80252. options = options || {};
  80253. var match = null;
  80254. if (!options.rtl) {
  80255. match = version.match(re[t.COERCE]);
  80256. } else {
  80257. var next;
  80258. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  80259. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  80260. match = next;
  80261. }
  80262. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  80263. }
  80264. re[t.COERCERTL].lastIndex = -1;
  80265. }
  80266. if (match === null) {
  80267. return null;
  80268. }
  80269. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  80270. }
  80271. }, "/$$rollup_base$$/node_modules/semver-BABEL_8_BREAKING-false");
  80272. var semver$4 = semver$5;
  80273. function hasMinVersion$2(minVersion, runtimeVersion) {
  80274. if (!runtimeVersion) return true;
  80275. if (semver$4.valid(runtimeVersion)) runtimeVersion = "^" + runtimeVersion;
  80276. return !semver$4.intersects("<" + minVersion, runtimeVersion) && !semver$4.intersects(">=8.0.0", runtimeVersion);
  80277. }
  80278. function getRuntimePath (moduleName, dirname, absoluteRuntime) {
  80279. if (absoluteRuntime === false) return moduleName;
  80280. throw new Error("The 'absoluteRuntime' option is not supported when using @babel/standalone.");
  80281. }
  80282. var semver$3 = createCommonjsModule(function (module, exports) {
  80283. exports = module.exports = SemVer;
  80284. var debug;
  80285. if (typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG)) {
  80286. debug = function debug() {
  80287. var args = Array.prototype.slice.call(arguments, 0);
  80288. args.unshift('SEMVER');
  80289. console.log.apply(console, args);
  80290. };
  80291. } else {
  80292. debug = function debug() {};
  80293. }
  80294. exports.SEMVER_SPEC_VERSION = '2.0.0';
  80295. var MAX_LENGTH = 256;
  80296. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  80297. var MAX_SAFE_COMPONENT_LENGTH = 16;
  80298. var re = exports.re = [];
  80299. var src = exports.src = [];
  80300. var t = exports.tokens = {};
  80301. var R = 0;
  80302. function tok(n) {
  80303. t[n] = R++;
  80304. }
  80305. tok('NUMERICIDENTIFIER');
  80306. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  80307. tok('NUMERICIDENTIFIERLOOSE');
  80308. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  80309. tok('NONNUMERICIDENTIFIER');
  80310. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  80311. tok('MAINVERSION');
  80312. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  80313. tok('MAINVERSIONLOOSE');
  80314. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  80315. tok('PRERELEASEIDENTIFIER');
  80316. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  80317. tok('PRERELEASEIDENTIFIERLOOSE');
  80318. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  80319. tok('PRERELEASE');
  80320. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  80321. tok('PRERELEASELOOSE');
  80322. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  80323. tok('BUILDIDENTIFIER');
  80324. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  80325. tok('BUILD');
  80326. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  80327. tok('FULL');
  80328. tok('FULLPLAIN');
  80329. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  80330. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  80331. tok('LOOSEPLAIN');
  80332. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  80333. tok('LOOSE');
  80334. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  80335. tok('GTLT');
  80336. src[t.GTLT] = '((?:<|>)?=?)';
  80337. tok('XRANGEIDENTIFIERLOOSE');
  80338. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  80339. tok('XRANGEIDENTIFIER');
  80340. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  80341. tok('XRANGEPLAIN');
  80342. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  80343. tok('XRANGEPLAINLOOSE');
  80344. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  80345. tok('XRANGE');
  80346. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  80347. tok('XRANGELOOSE');
  80348. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  80349. tok('COERCE');
  80350. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  80351. tok('COERCERTL');
  80352. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  80353. tok('LONETILDE');
  80354. src[t.LONETILDE] = '(?:~>?)';
  80355. tok('TILDETRIM');
  80356. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  80357. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  80358. var tildeTrimReplace = '$1~';
  80359. tok('TILDE');
  80360. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  80361. tok('TILDELOOSE');
  80362. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  80363. tok('LONECARET');
  80364. src[t.LONECARET] = '(?:\\^)';
  80365. tok('CARETTRIM');
  80366. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  80367. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  80368. var caretTrimReplace = '$1^';
  80369. tok('CARET');
  80370. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  80371. tok('CARETLOOSE');
  80372. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  80373. tok('COMPARATORLOOSE');
  80374. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  80375. tok('COMPARATOR');
  80376. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  80377. tok('COMPARATORTRIM');
  80378. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  80379. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  80380. var comparatorTrimReplace = '$1$2$3';
  80381. tok('HYPHENRANGE');
  80382. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  80383. tok('HYPHENRANGELOOSE');
  80384. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  80385. tok('STAR');
  80386. src[t.STAR] = '(<|>)?=?\\s*\\*';
  80387. for (var i = 0; i < R; i++) {
  80388. debug(i, src[i]);
  80389. if (!re[i]) {
  80390. re[i] = new RegExp(src[i]);
  80391. }
  80392. }
  80393. exports.parse = parse;
  80394. function parse(version, options) {
  80395. if (!options || typeof options !== 'object') {
  80396. options = {
  80397. loose: !!options,
  80398. includePrerelease: false
  80399. };
  80400. }
  80401. if (version instanceof SemVer) {
  80402. return version;
  80403. }
  80404. if (typeof version !== 'string') {
  80405. return null;
  80406. }
  80407. if (version.length > MAX_LENGTH) {
  80408. return null;
  80409. }
  80410. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  80411. if (!r.test(version)) {
  80412. return null;
  80413. }
  80414. try {
  80415. return new SemVer(version, options);
  80416. } catch (er) {
  80417. return null;
  80418. }
  80419. }
  80420. exports.valid = valid;
  80421. function valid(version, options) {
  80422. var v = parse(version, options);
  80423. return v ? v.version : null;
  80424. }
  80425. exports.clean = clean;
  80426. function clean(version, options) {
  80427. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  80428. return s ? s.version : null;
  80429. }
  80430. exports.SemVer = SemVer;
  80431. function SemVer(version, options) {
  80432. if (!options || typeof options !== 'object') {
  80433. options = {
  80434. loose: !!options,
  80435. includePrerelease: false
  80436. };
  80437. }
  80438. if (version instanceof SemVer) {
  80439. if (version.loose === options.loose) {
  80440. return version;
  80441. } else {
  80442. version = version.version;
  80443. }
  80444. } else if (typeof version !== 'string') {
  80445. throw new TypeError('Invalid Version: ' + version);
  80446. }
  80447. if (version.length > MAX_LENGTH) {
  80448. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  80449. }
  80450. if (!(this instanceof SemVer)) {
  80451. return new SemVer(version, options);
  80452. }
  80453. debug('SemVer', version, options);
  80454. this.options = options;
  80455. this.loose = !!options.loose;
  80456. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  80457. if (!m) {
  80458. throw new TypeError('Invalid Version: ' + version);
  80459. }
  80460. this.raw = version;
  80461. this.major = +m[1];
  80462. this.minor = +m[2];
  80463. this.patch = +m[3];
  80464. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  80465. throw new TypeError('Invalid major version');
  80466. }
  80467. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  80468. throw new TypeError('Invalid minor version');
  80469. }
  80470. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  80471. throw new TypeError('Invalid patch version');
  80472. }
  80473. if (!m[4]) {
  80474. this.prerelease = [];
  80475. } else {
  80476. this.prerelease = m[4].split('.').map(function (id) {
  80477. if (/^[0-9]+$/.test(id)) {
  80478. var num = +id;
  80479. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  80480. return num;
  80481. }
  80482. }
  80483. return id;
  80484. });
  80485. }
  80486. this.build = m[5] ? m[5].split('.') : [];
  80487. this.format();
  80488. }
  80489. SemVer.prototype.format = function () {
  80490. this.version = this.major + '.' + this.minor + '.' + this.patch;
  80491. if (this.prerelease.length) {
  80492. this.version += '-' + this.prerelease.join('.');
  80493. }
  80494. return this.version;
  80495. };
  80496. SemVer.prototype.toString = function () {
  80497. return this.version;
  80498. };
  80499. SemVer.prototype.compare = function (other) {
  80500. debug('SemVer.compare', this.version, this.options, other);
  80501. if (!(other instanceof SemVer)) {
  80502. other = new SemVer(other, this.options);
  80503. }
  80504. return this.compareMain(other) || this.comparePre(other);
  80505. };
  80506. SemVer.prototype.compareMain = function (other) {
  80507. if (!(other instanceof SemVer)) {
  80508. other = new SemVer(other, this.options);
  80509. }
  80510. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  80511. };
  80512. SemVer.prototype.comparePre = function (other) {
  80513. if (!(other instanceof SemVer)) {
  80514. other = new SemVer(other, this.options);
  80515. }
  80516. if (this.prerelease.length && !other.prerelease.length) {
  80517. return -1;
  80518. } else if (!this.prerelease.length && other.prerelease.length) {
  80519. return 1;
  80520. } else if (!this.prerelease.length && !other.prerelease.length) {
  80521. return 0;
  80522. }
  80523. var i = 0;
  80524. do {
  80525. var a = this.prerelease[i];
  80526. var b = other.prerelease[i];
  80527. debug('prerelease compare', i, a, b);
  80528. if (a === undefined && b === undefined) {
  80529. return 0;
  80530. } else if (b === undefined) {
  80531. return 1;
  80532. } else if (a === undefined) {
  80533. return -1;
  80534. } else if (a === b) {
  80535. continue;
  80536. } else {
  80537. return compareIdentifiers(a, b);
  80538. }
  80539. } while (++i);
  80540. };
  80541. SemVer.prototype.compareBuild = function (other) {
  80542. if (!(other instanceof SemVer)) {
  80543. other = new SemVer(other, this.options);
  80544. }
  80545. var i = 0;
  80546. do {
  80547. var a = this.build[i];
  80548. var b = other.build[i];
  80549. debug('prerelease compare', i, a, b);
  80550. if (a === undefined && b === undefined) {
  80551. return 0;
  80552. } else if (b === undefined) {
  80553. return 1;
  80554. } else if (a === undefined) {
  80555. return -1;
  80556. } else if (a === b) {
  80557. continue;
  80558. } else {
  80559. return compareIdentifiers(a, b);
  80560. }
  80561. } while (++i);
  80562. };
  80563. SemVer.prototype.inc = function (release, identifier) {
  80564. switch (release) {
  80565. case 'premajor':
  80566. this.prerelease.length = 0;
  80567. this.patch = 0;
  80568. this.minor = 0;
  80569. this.major++;
  80570. this.inc('pre', identifier);
  80571. break;
  80572. case 'preminor':
  80573. this.prerelease.length = 0;
  80574. this.patch = 0;
  80575. this.minor++;
  80576. this.inc('pre', identifier);
  80577. break;
  80578. case 'prepatch':
  80579. this.prerelease.length = 0;
  80580. this.inc('patch', identifier);
  80581. this.inc('pre', identifier);
  80582. break;
  80583. case 'prerelease':
  80584. if (this.prerelease.length === 0) {
  80585. this.inc('patch', identifier);
  80586. }
  80587. this.inc('pre', identifier);
  80588. break;
  80589. case 'major':
  80590. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  80591. this.major++;
  80592. }
  80593. this.minor = 0;
  80594. this.patch = 0;
  80595. this.prerelease = [];
  80596. break;
  80597. case 'minor':
  80598. if (this.patch !== 0 || this.prerelease.length === 0) {
  80599. this.minor++;
  80600. }
  80601. this.patch = 0;
  80602. this.prerelease = [];
  80603. break;
  80604. case 'patch':
  80605. if (this.prerelease.length === 0) {
  80606. this.patch++;
  80607. }
  80608. this.prerelease = [];
  80609. break;
  80610. case 'pre':
  80611. if (this.prerelease.length === 0) {
  80612. this.prerelease = [0];
  80613. } else {
  80614. var i = this.prerelease.length;
  80615. while (--i >= 0) {
  80616. if (typeof this.prerelease[i] === 'number') {
  80617. this.prerelease[i]++;
  80618. i = -2;
  80619. }
  80620. }
  80621. if (i === -1) {
  80622. this.prerelease.push(0);
  80623. }
  80624. }
  80625. if (identifier) {
  80626. if (this.prerelease[0] === identifier) {
  80627. if (isNaN(this.prerelease[1])) {
  80628. this.prerelease = [identifier, 0];
  80629. }
  80630. } else {
  80631. this.prerelease = [identifier, 0];
  80632. }
  80633. }
  80634. break;
  80635. default:
  80636. throw new Error('invalid increment argument: ' + release);
  80637. }
  80638. this.format();
  80639. this.raw = this.version;
  80640. return this;
  80641. };
  80642. exports.inc = inc;
  80643. function inc(version, release, loose, identifier) {
  80644. if (typeof loose === 'string') {
  80645. identifier = loose;
  80646. loose = undefined;
  80647. }
  80648. try {
  80649. return new SemVer(version, loose).inc(release, identifier).version;
  80650. } catch (er) {
  80651. return null;
  80652. }
  80653. }
  80654. exports.diff = diff;
  80655. function diff(version1, version2) {
  80656. if (eq(version1, version2)) {
  80657. return null;
  80658. } else {
  80659. var v1 = parse(version1);
  80660. var v2 = parse(version2);
  80661. var prefix = '';
  80662. if (v1.prerelease.length || v2.prerelease.length) {
  80663. prefix = 'pre';
  80664. var defaultResult = 'prerelease';
  80665. }
  80666. for (var key in v1) {
  80667. if (key === 'major' || key === 'minor' || key === 'patch') {
  80668. if (v1[key] !== v2[key]) {
  80669. return prefix + key;
  80670. }
  80671. }
  80672. }
  80673. return defaultResult;
  80674. }
  80675. }
  80676. exports.compareIdentifiers = compareIdentifiers;
  80677. var numeric = /^[0-9]+$/;
  80678. function compareIdentifiers(a, b) {
  80679. var anum = numeric.test(a);
  80680. var bnum = numeric.test(b);
  80681. if (anum && bnum) {
  80682. a = +a;
  80683. b = +b;
  80684. }
  80685. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  80686. }
  80687. exports.rcompareIdentifiers = rcompareIdentifiers;
  80688. function rcompareIdentifiers(a, b) {
  80689. return compareIdentifiers(b, a);
  80690. }
  80691. exports.major = major;
  80692. function major(a, loose) {
  80693. return new SemVer(a, loose).major;
  80694. }
  80695. exports.minor = minor;
  80696. function minor(a, loose) {
  80697. return new SemVer(a, loose).minor;
  80698. }
  80699. exports.patch = patch;
  80700. function patch(a, loose) {
  80701. return new SemVer(a, loose).patch;
  80702. }
  80703. exports.compare = compare;
  80704. function compare(a, b, loose) {
  80705. return new SemVer(a, loose).compare(new SemVer(b, loose));
  80706. }
  80707. exports.compareLoose = compareLoose;
  80708. function compareLoose(a, b) {
  80709. return compare(a, b, true);
  80710. }
  80711. exports.compareBuild = compareBuild;
  80712. function compareBuild(a, b, loose) {
  80713. var versionA = new SemVer(a, loose);
  80714. var versionB = new SemVer(b, loose);
  80715. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  80716. }
  80717. exports.rcompare = rcompare;
  80718. function rcompare(a, b, loose) {
  80719. return compare(b, a, loose);
  80720. }
  80721. exports.sort = sort;
  80722. function sort(list, loose) {
  80723. return list.sort(function (a, b) {
  80724. return exports.compareBuild(a, b, loose);
  80725. });
  80726. }
  80727. exports.rsort = rsort;
  80728. function rsort(list, loose) {
  80729. return list.sort(function (a, b) {
  80730. return exports.compareBuild(b, a, loose);
  80731. });
  80732. }
  80733. exports.gt = gt;
  80734. function gt(a, b, loose) {
  80735. return compare(a, b, loose) > 0;
  80736. }
  80737. exports.lt = lt;
  80738. function lt(a, b, loose) {
  80739. return compare(a, b, loose) < 0;
  80740. }
  80741. exports.eq = eq;
  80742. function eq(a, b, loose) {
  80743. return compare(a, b, loose) === 0;
  80744. }
  80745. exports.neq = neq;
  80746. function neq(a, b, loose) {
  80747. return compare(a, b, loose) !== 0;
  80748. }
  80749. exports.gte = gte;
  80750. function gte(a, b, loose) {
  80751. return compare(a, b, loose) >= 0;
  80752. }
  80753. exports.lte = lte;
  80754. function lte(a, b, loose) {
  80755. return compare(a, b, loose) <= 0;
  80756. }
  80757. exports.cmp = cmp;
  80758. function cmp(a, op, b, loose) {
  80759. switch (op) {
  80760. case '===':
  80761. if (typeof a === 'object') a = a.version;
  80762. if (typeof b === 'object') b = b.version;
  80763. return a === b;
  80764. case '!==':
  80765. if (typeof a === 'object') a = a.version;
  80766. if (typeof b === 'object') b = b.version;
  80767. return a !== b;
  80768. case '':
  80769. case '=':
  80770. case '==':
  80771. return eq(a, b, loose);
  80772. case '!=':
  80773. return neq(a, b, loose);
  80774. case '>':
  80775. return gt(a, b, loose);
  80776. case '>=':
  80777. return gte(a, b, loose);
  80778. case '<':
  80779. return lt(a, b, loose);
  80780. case '<=':
  80781. return lte(a, b, loose);
  80782. default:
  80783. throw new TypeError('Invalid operator: ' + op);
  80784. }
  80785. }
  80786. exports.Comparator = Comparator;
  80787. function Comparator(comp, options) {
  80788. if (!options || typeof options !== 'object') {
  80789. options = {
  80790. loose: !!options,
  80791. includePrerelease: false
  80792. };
  80793. }
  80794. if (comp instanceof Comparator) {
  80795. if (comp.loose === !!options.loose) {
  80796. return comp;
  80797. } else {
  80798. comp = comp.value;
  80799. }
  80800. }
  80801. if (!(this instanceof Comparator)) {
  80802. return new Comparator(comp, options);
  80803. }
  80804. debug('comparator', comp, options);
  80805. this.options = options;
  80806. this.loose = !!options.loose;
  80807. this.parse(comp);
  80808. if (this.semver === ANY) {
  80809. this.value = '';
  80810. } else {
  80811. this.value = this.operator + this.semver.version;
  80812. }
  80813. debug('comp', this);
  80814. }
  80815. var ANY = {};
  80816. Comparator.prototype.parse = function (comp) {
  80817. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  80818. var m = comp.match(r);
  80819. if (!m) {
  80820. throw new TypeError('Invalid comparator: ' + comp);
  80821. }
  80822. this.operator = m[1] !== undefined ? m[1] : '';
  80823. if (this.operator === '=') {
  80824. this.operator = '';
  80825. }
  80826. if (!m[2]) {
  80827. this.semver = ANY;
  80828. } else {
  80829. this.semver = new SemVer(m[2], this.options.loose);
  80830. }
  80831. };
  80832. Comparator.prototype.toString = function () {
  80833. return this.value;
  80834. };
  80835. Comparator.prototype.test = function (version) {
  80836. debug('Comparator.test', version, this.options.loose);
  80837. if (this.semver === ANY || version === ANY) {
  80838. return true;
  80839. }
  80840. if (typeof version === 'string') {
  80841. try {
  80842. version = new SemVer(version, this.options);
  80843. } catch (er) {
  80844. return false;
  80845. }
  80846. }
  80847. return cmp(version, this.operator, this.semver, this.options);
  80848. };
  80849. Comparator.prototype.intersects = function (comp, options) {
  80850. if (!(comp instanceof Comparator)) {
  80851. throw new TypeError('a Comparator is required');
  80852. }
  80853. if (!options || typeof options !== 'object') {
  80854. options = {
  80855. loose: !!options,
  80856. includePrerelease: false
  80857. };
  80858. }
  80859. var rangeTmp;
  80860. if (this.operator === '') {
  80861. if (this.value === '') {
  80862. return true;
  80863. }
  80864. rangeTmp = new Range(comp.value, options);
  80865. return satisfies(this.value, rangeTmp, options);
  80866. } else if (comp.operator === '') {
  80867. if (comp.value === '') {
  80868. return true;
  80869. }
  80870. rangeTmp = new Range(this.value, options);
  80871. return satisfies(comp.semver, rangeTmp, options);
  80872. }
  80873. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  80874. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  80875. var sameSemVer = this.semver.version === comp.semver.version;
  80876. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  80877. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  80878. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  80879. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  80880. };
  80881. exports.Range = Range;
  80882. function Range(range, options) {
  80883. if (!options || typeof options !== 'object') {
  80884. options = {
  80885. loose: !!options,
  80886. includePrerelease: false
  80887. };
  80888. }
  80889. if (range instanceof Range) {
  80890. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  80891. return range;
  80892. } else {
  80893. return new Range(range.raw, options);
  80894. }
  80895. }
  80896. if (range instanceof Comparator) {
  80897. return new Range(range.value, options);
  80898. }
  80899. if (!(this instanceof Range)) {
  80900. return new Range(range, options);
  80901. }
  80902. this.options = options;
  80903. this.loose = !!options.loose;
  80904. this.includePrerelease = !!options.includePrerelease;
  80905. this.raw = range;
  80906. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  80907. return this.parseRange(range.trim());
  80908. }, this).filter(function (c) {
  80909. return c.length;
  80910. });
  80911. if (!this.set.length) {
  80912. throw new TypeError('Invalid SemVer Range: ' + range);
  80913. }
  80914. this.format();
  80915. }
  80916. Range.prototype.format = function () {
  80917. this.range = this.set.map(function (comps) {
  80918. return comps.join(' ').trim();
  80919. }).join('||').trim();
  80920. return this.range;
  80921. };
  80922. Range.prototype.toString = function () {
  80923. return this.range;
  80924. };
  80925. Range.prototype.parseRange = function (range) {
  80926. var loose = this.options.loose;
  80927. range = range.trim();
  80928. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  80929. range = range.replace(hr, hyphenReplace);
  80930. debug('hyphen replace', range);
  80931. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  80932. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  80933. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  80934. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  80935. range = range.split(/\s+/).join(' ');
  80936. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  80937. var set = range.split(' ').map(function (comp) {
  80938. return parseComparator(comp, this.options);
  80939. }, this).join(' ').split(/\s+/);
  80940. if (this.options.loose) {
  80941. set = set.filter(function (comp) {
  80942. return !!comp.match(compRe);
  80943. });
  80944. }
  80945. set = set.map(function (comp) {
  80946. return new Comparator(comp, this.options);
  80947. }, this);
  80948. return set;
  80949. };
  80950. Range.prototype.intersects = function (range, options) {
  80951. if (!(range instanceof Range)) {
  80952. throw new TypeError('a Range is required');
  80953. }
  80954. return this.set.some(function (thisComparators) {
  80955. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  80956. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  80957. return rangeComparators.every(function (rangeComparator) {
  80958. return thisComparator.intersects(rangeComparator, options);
  80959. });
  80960. });
  80961. });
  80962. });
  80963. };
  80964. function isSatisfiable(comparators, options) {
  80965. var result = true;
  80966. var remainingComparators = comparators.slice();
  80967. var testComparator = remainingComparators.pop();
  80968. while (result && remainingComparators.length) {
  80969. result = remainingComparators.every(function (otherComparator) {
  80970. return testComparator.intersects(otherComparator, options);
  80971. });
  80972. testComparator = remainingComparators.pop();
  80973. }
  80974. return result;
  80975. }
  80976. exports.toComparators = toComparators;
  80977. function toComparators(range, options) {
  80978. return new Range(range, options).set.map(function (comp) {
  80979. return comp.map(function (c) {
  80980. return c.value;
  80981. }).join(' ').trim().split(' ');
  80982. });
  80983. }
  80984. function parseComparator(comp, options) {
  80985. debug('comp', comp, options);
  80986. comp = replaceCarets(comp, options);
  80987. debug('caret', comp);
  80988. comp = replaceTildes(comp, options);
  80989. debug('tildes', comp);
  80990. comp = replaceXRanges(comp, options);
  80991. debug('xrange', comp);
  80992. comp = replaceStars(comp, options);
  80993. debug('stars', comp);
  80994. return comp;
  80995. }
  80996. function isX(id) {
  80997. return !id || id.toLowerCase() === 'x' || id === '*';
  80998. }
  80999. function replaceTildes(comp, options) {
  81000. return comp.trim().split(/\s+/).map(function (comp) {
  81001. return replaceTilde(comp, options);
  81002. }).join(' ');
  81003. }
  81004. function replaceTilde(comp, options) {
  81005. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  81006. return comp.replace(r, function (_, M, m, p, pr) {
  81007. debug('tilde', comp, _, M, m, p, pr);
  81008. var ret;
  81009. if (isX(M)) {
  81010. ret = '';
  81011. } else if (isX(m)) {
  81012. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  81013. } else if (isX(p)) {
  81014. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  81015. } else if (pr) {
  81016. debug('replaceTilde pr', pr);
  81017. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  81018. } else {
  81019. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  81020. }
  81021. debug('tilde return', ret);
  81022. return ret;
  81023. });
  81024. }
  81025. function replaceCarets(comp, options) {
  81026. return comp.trim().split(/\s+/).map(function (comp) {
  81027. return replaceCaret(comp, options);
  81028. }).join(' ');
  81029. }
  81030. function replaceCaret(comp, options) {
  81031. debug('caret', comp, options);
  81032. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  81033. return comp.replace(r, function (_, M, m, p, pr) {
  81034. debug('caret', comp, _, M, m, p, pr);
  81035. var ret;
  81036. if (isX(M)) {
  81037. ret = '';
  81038. } else if (isX(m)) {
  81039. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  81040. } else if (isX(p)) {
  81041. if (M === '0') {
  81042. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  81043. } else {
  81044. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  81045. }
  81046. } else if (pr) {
  81047. debug('replaceCaret pr', pr);
  81048. if (M === '0') {
  81049. if (m === '0') {
  81050. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  81051. } else {
  81052. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  81053. }
  81054. } else {
  81055. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  81056. }
  81057. } else {
  81058. debug('no pr');
  81059. if (M === '0') {
  81060. if (m === '0') {
  81061. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  81062. } else {
  81063. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  81064. }
  81065. } else {
  81066. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  81067. }
  81068. }
  81069. debug('caret return', ret);
  81070. return ret;
  81071. });
  81072. }
  81073. function replaceXRanges(comp, options) {
  81074. debug('replaceXRanges', comp, options);
  81075. return comp.split(/\s+/).map(function (comp) {
  81076. return replaceXRange(comp, options);
  81077. }).join(' ');
  81078. }
  81079. function replaceXRange(comp, options) {
  81080. comp = comp.trim();
  81081. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  81082. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  81083. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  81084. var xM = isX(M);
  81085. var xm = xM || isX(m);
  81086. var xp = xm || isX(p);
  81087. var anyX = xp;
  81088. if (gtlt === '=' && anyX) {
  81089. gtlt = '';
  81090. }
  81091. pr = options.includePrerelease ? '-0' : '';
  81092. if (xM) {
  81093. if (gtlt === '>' || gtlt === '<') {
  81094. ret = '<0.0.0-0';
  81095. } else {
  81096. ret = '*';
  81097. }
  81098. } else if (gtlt && anyX) {
  81099. if (xm) {
  81100. m = 0;
  81101. }
  81102. p = 0;
  81103. if (gtlt === '>') {
  81104. gtlt = '>=';
  81105. if (xm) {
  81106. M = +M + 1;
  81107. m = 0;
  81108. p = 0;
  81109. } else {
  81110. m = +m + 1;
  81111. p = 0;
  81112. }
  81113. } else if (gtlt === '<=') {
  81114. gtlt = '<';
  81115. if (xm) {
  81116. M = +M + 1;
  81117. } else {
  81118. m = +m + 1;
  81119. }
  81120. }
  81121. ret = gtlt + M + '.' + m + '.' + p + pr;
  81122. } else if (xm) {
  81123. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  81124. } else if (xp) {
  81125. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  81126. }
  81127. debug('xRange return', ret);
  81128. return ret;
  81129. });
  81130. }
  81131. function replaceStars(comp, options) {
  81132. debug('replaceStars', comp, options);
  81133. return comp.trim().replace(re[t.STAR], '');
  81134. }
  81135. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  81136. if (isX(fM)) {
  81137. from = '';
  81138. } else if (isX(fm)) {
  81139. from = '>=' + fM + '.0.0';
  81140. } else if (isX(fp)) {
  81141. from = '>=' + fM + '.' + fm + '.0';
  81142. } else {
  81143. from = '>=' + from;
  81144. }
  81145. if (isX(tM)) {
  81146. to = '';
  81147. } else if (isX(tm)) {
  81148. to = '<' + (+tM + 1) + '.0.0';
  81149. } else if (isX(tp)) {
  81150. to = '<' + tM + '.' + (+tm + 1) + '.0';
  81151. } else if (tpr) {
  81152. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  81153. } else {
  81154. to = '<=' + to;
  81155. }
  81156. return (from + ' ' + to).trim();
  81157. }
  81158. Range.prototype.test = function (version) {
  81159. if (!version) {
  81160. return false;
  81161. }
  81162. if (typeof version === 'string') {
  81163. try {
  81164. version = new SemVer(version, this.options);
  81165. } catch (er) {
  81166. return false;
  81167. }
  81168. }
  81169. for (var i = 0; i < this.set.length; i++) {
  81170. if (testSet(this.set[i], version, this.options)) {
  81171. return true;
  81172. }
  81173. }
  81174. return false;
  81175. };
  81176. function testSet(set, version, options) {
  81177. for (var i = 0; i < set.length; i++) {
  81178. if (!set[i].test(version)) {
  81179. return false;
  81180. }
  81181. }
  81182. if (version.prerelease.length && !options.includePrerelease) {
  81183. for (i = 0; i < set.length; i++) {
  81184. debug(set[i].semver);
  81185. if (set[i].semver === ANY) {
  81186. continue;
  81187. }
  81188. if (set[i].semver.prerelease.length > 0) {
  81189. var allowed = set[i].semver;
  81190. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  81191. return true;
  81192. }
  81193. }
  81194. }
  81195. return false;
  81196. }
  81197. return true;
  81198. }
  81199. exports.satisfies = satisfies;
  81200. function satisfies(version, range, options) {
  81201. try {
  81202. range = new Range(range, options);
  81203. } catch (er) {
  81204. return false;
  81205. }
  81206. return range.test(version);
  81207. }
  81208. exports.maxSatisfying = maxSatisfying;
  81209. function maxSatisfying(versions, range, options) {
  81210. var max = null;
  81211. var maxSV = null;
  81212. try {
  81213. var rangeObj = new Range(range, options);
  81214. } catch (er) {
  81215. return null;
  81216. }
  81217. versions.forEach(function (v) {
  81218. if (rangeObj.test(v)) {
  81219. if (!max || maxSV.compare(v) === -1) {
  81220. max = v;
  81221. maxSV = new SemVer(max, options);
  81222. }
  81223. }
  81224. });
  81225. return max;
  81226. }
  81227. exports.minSatisfying = minSatisfying;
  81228. function minSatisfying(versions, range, options) {
  81229. var min = null;
  81230. var minSV = null;
  81231. try {
  81232. var rangeObj = new Range(range, options);
  81233. } catch (er) {
  81234. return null;
  81235. }
  81236. versions.forEach(function (v) {
  81237. if (rangeObj.test(v)) {
  81238. if (!min || minSV.compare(v) === 1) {
  81239. min = v;
  81240. minSV = new SemVer(min, options);
  81241. }
  81242. }
  81243. });
  81244. return min;
  81245. }
  81246. exports.minVersion = minVersion;
  81247. function minVersion(range, loose) {
  81248. range = new Range(range, loose);
  81249. var minver = new SemVer('0.0.0');
  81250. if (range.test(minver)) {
  81251. return minver;
  81252. }
  81253. minver = new SemVer('0.0.0-0');
  81254. if (range.test(minver)) {
  81255. return minver;
  81256. }
  81257. minver = null;
  81258. for (var i = 0; i < range.set.length; ++i) {
  81259. var comparators = range.set[i];
  81260. comparators.forEach(function (comparator) {
  81261. var compver = new SemVer(comparator.semver.version);
  81262. switch (comparator.operator) {
  81263. case '>':
  81264. if (compver.prerelease.length === 0) {
  81265. compver.patch++;
  81266. } else {
  81267. compver.prerelease.push(0);
  81268. }
  81269. compver.raw = compver.format();
  81270. case '':
  81271. case '>=':
  81272. if (!minver || gt(minver, compver)) {
  81273. minver = compver;
  81274. }
  81275. break;
  81276. case '<':
  81277. case '<=':
  81278. break;
  81279. default:
  81280. throw new Error('Unexpected operation: ' + comparator.operator);
  81281. }
  81282. });
  81283. }
  81284. if (minver && range.test(minver)) {
  81285. return minver;
  81286. }
  81287. return null;
  81288. }
  81289. exports.validRange = validRange;
  81290. function validRange(range, options) {
  81291. try {
  81292. return new Range(range, options).range || '*';
  81293. } catch (er) {
  81294. return null;
  81295. }
  81296. }
  81297. exports.ltr = ltr;
  81298. function ltr(version, range, options) {
  81299. return outside(version, range, '<', options);
  81300. }
  81301. exports.gtr = gtr;
  81302. function gtr(version, range, options) {
  81303. return outside(version, range, '>', options);
  81304. }
  81305. exports.outside = outside;
  81306. function outside(version, range, hilo, options) {
  81307. version = new SemVer(version, options);
  81308. range = new Range(range, options);
  81309. var gtfn, ltefn, ltfn, comp, ecomp;
  81310. switch (hilo) {
  81311. case '>':
  81312. gtfn = gt;
  81313. ltefn = lte;
  81314. ltfn = lt;
  81315. comp = '>';
  81316. ecomp = '>=';
  81317. break;
  81318. case '<':
  81319. gtfn = lt;
  81320. ltefn = gte;
  81321. ltfn = gt;
  81322. comp = '<';
  81323. ecomp = '<=';
  81324. break;
  81325. default:
  81326. throw new TypeError('Must provide a hilo val of "<" or ">"');
  81327. }
  81328. if (satisfies(version, range, options)) {
  81329. return false;
  81330. }
  81331. for (var i = 0; i < range.set.length; ++i) {
  81332. var comparators = range.set[i];
  81333. var high = null;
  81334. var low = null;
  81335. comparators.forEach(function (comparator) {
  81336. if (comparator.semver === ANY) {
  81337. comparator = new Comparator('>=0.0.0');
  81338. }
  81339. high = high || comparator;
  81340. low = low || comparator;
  81341. if (gtfn(comparator.semver, high.semver, options)) {
  81342. high = comparator;
  81343. } else if (ltfn(comparator.semver, low.semver, options)) {
  81344. low = comparator;
  81345. }
  81346. });
  81347. if (high.operator === comp || high.operator === ecomp) {
  81348. return false;
  81349. }
  81350. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  81351. return false;
  81352. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  81353. return false;
  81354. }
  81355. }
  81356. return true;
  81357. }
  81358. exports.prerelease = prerelease;
  81359. function prerelease(version, options) {
  81360. var parsed = parse(version, options);
  81361. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  81362. }
  81363. exports.intersects = intersects;
  81364. function intersects(r1, r2, options) {
  81365. r1 = new Range(r1, options);
  81366. r2 = new Range(r2, options);
  81367. return r1.intersects(r2);
  81368. }
  81369. exports.coerce = coerce;
  81370. function coerce(version, options) {
  81371. if (version instanceof SemVer) {
  81372. return version;
  81373. }
  81374. if (typeof version === 'number') {
  81375. version = String(version);
  81376. }
  81377. if (typeof version !== 'string') {
  81378. return null;
  81379. }
  81380. options = options || {};
  81381. var match = null;
  81382. if (!options.rtl) {
  81383. match = version.match(re[t.COERCE]);
  81384. } else {
  81385. var next;
  81386. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  81387. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  81388. match = next;
  81389. }
  81390. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  81391. }
  81392. re[t.COERCERTL].lastIndex = -1;
  81393. }
  81394. if (match === null) {
  81395. return null;
  81396. }
  81397. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  81398. }
  81399. }, "/$$rollup_base$$/packages/babel-plugin-transform-runtime/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver");
  81400. var _excluded$1 = ["method", "targets", "ignoreBrowserslistConfig", "configPath", "debug", "shouldInjectPolyfill", "absoluteImports"];
  81401. var _templateObject$5, _templateObject2$3, _templateObject3$2;
  81402. var _ref$5 = undefined || babel,
  81403. t$1$3 = _ref$5.types,
  81404. template$1 = _ref$5.template;
  81405. function intersection$3(a, b) {
  81406. var result = new Set();
  81407. a.forEach(function (v) {
  81408. return b.has(v) && result.add(v);
  81409. });
  81410. return result;
  81411. }
  81412. function has$1$1(object, key) {
  81413. return Object.prototype.hasOwnProperty.call(object, key);
  81414. }
  81415. function getType$1(target) {
  81416. return Object.prototype.toString.call(target).slice(8, -1);
  81417. }
  81418. function resolveId$1(path) {
  81419. if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, true)) {
  81420. return path.node.name;
  81421. }
  81422. var _path$evaluate = path.evaluate(),
  81423. deopt = _path$evaluate.deopt;
  81424. if (deopt && deopt.isIdentifier()) {
  81425. return deopt.node.name;
  81426. }
  81427. }
  81428. function resolveKey$1(path, computed) {
  81429. if (computed === void 0) {
  81430. computed = false;
  81431. }
  81432. var node = path.node,
  81433. parent = path.parent,
  81434. scope = path.scope;
  81435. if (path.isStringLiteral()) return node.value;
  81436. var name = node.name;
  81437. var isIdentifier = path.isIdentifier();
  81438. if (isIdentifier && !(computed || parent.computed)) return name;
  81439. if (computed && path.isMemberExpression() && path.get("object").isIdentifier({
  81440. name: "Symbol"
  81441. }) && !scope.hasBinding("Symbol", true)) {
  81442. var sym = resolveKey$1(path.get("property"), path.node.computed);
  81443. if (sym) return "Symbol." + sym;
  81444. }
  81445. if (!isIdentifier || scope.hasBinding(name, true)) {
  81446. var _path$evaluate2 = path.evaluate(),
  81447. value = _path$evaluate2.value;
  81448. if (typeof value === "string") return value;
  81449. }
  81450. }
  81451. function resolveSource$1(obj) {
  81452. if (obj.isMemberExpression() && obj.get("property").isIdentifier({
  81453. name: "prototype"
  81454. })) {
  81455. var _id = resolveId$1(obj.get("object"));
  81456. if (_id) {
  81457. return {
  81458. id: _id,
  81459. placement: "prototype"
  81460. };
  81461. }
  81462. return {
  81463. id: null,
  81464. placement: null
  81465. };
  81466. }
  81467. var id = resolveId$1(obj);
  81468. if (id) {
  81469. return {
  81470. id: id,
  81471. placement: "static"
  81472. };
  81473. }
  81474. var _obj$evaluate = obj.evaluate(),
  81475. value = _obj$evaluate.value;
  81476. if (value !== undefined) {
  81477. return {
  81478. id: getType$1(value),
  81479. placement: "prototype"
  81480. };
  81481. } else if (obj.isRegExpLiteral()) {
  81482. return {
  81483. id: "RegExp",
  81484. placement: "prototype"
  81485. };
  81486. } else if (obj.isFunction()) {
  81487. return {
  81488. id: "Function",
  81489. placement: "prototype"
  81490. };
  81491. }
  81492. return {
  81493. id: null,
  81494. placement: null
  81495. };
  81496. }
  81497. function getImportSource$2(_ref2) {
  81498. var node = _ref2.node;
  81499. if (node.specifiers.length === 0) return node.source.value;
  81500. }
  81501. function getRequireSource$2(_ref3) {
  81502. var node = _ref3.node;
  81503. if (!t$1$3.isExpressionStatement(node)) return;
  81504. var expression = node.expression;
  81505. var isRequire = t$1$3.isCallExpression(expression) && t$1$3.isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && t$1$3.isStringLiteral(expression.arguments[0]);
  81506. if (isRequire) return expression.arguments[0].value;
  81507. }
  81508. function hoist$1(node) {
  81509. node._blockHoist = 3;
  81510. return node;
  81511. }
  81512. function createUtilsGetter$1(cache) {
  81513. return function (path) {
  81514. var prog = path.findParent(function (p) {
  81515. return p.isProgram();
  81516. });
  81517. return {
  81518. injectGlobalImport: function injectGlobalImport(url) {
  81519. cache.storeAnonymous(prog, url, function (isScript, source) {
  81520. return isScript ? template$1.statement.ast(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteralLoose(["require(", ")"])), source) : t$1$3.importDeclaration([], source);
  81521. });
  81522. },
  81523. injectNamedImport: function injectNamedImport(url, name, hint) {
  81524. if (hint === void 0) {
  81525. hint = name;
  81526. }
  81527. return cache.storeNamed(prog, url, name, function (isScript, source, name) {
  81528. var id = prog.scope.generateUidIdentifier(hint);
  81529. return {
  81530. node: isScript ? hoist$1(template$1.statement.ast(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteralLoose(["\n var ", " = require(", ").", "\n "])), id, source, name)) : t$1$3.importDeclaration([t$1$3.importSpecifier(id, name)], source),
  81531. name: id.name
  81532. };
  81533. });
  81534. },
  81535. injectDefaultImport: function injectDefaultImport(url, hint) {
  81536. if (hint === void 0) {
  81537. hint = url;
  81538. }
  81539. return cache.storeNamed(prog, url, "default", function (isScript, source) {
  81540. var id = prog.scope.generateUidIdentifier(hint);
  81541. return {
  81542. node: isScript ? hoist$1(template$1.statement.ast(_templateObject3$2 || (_templateObject3$2 = _taggedTemplateLiteralLoose(["var ", " = require(", ")"])), id, source)) : t$1$3.importDeclaration([t$1$3.importDefaultSpecifier(id)], source),
  81543. name: id.name
  81544. };
  81545. });
  81546. }
  81547. };
  81548. };
  81549. }
  81550. var _ref4$1 = undefined || babel,
  81551. t$9 = _ref4$1.types;
  81552. var ImportsCache$1 = function () {
  81553. function ImportsCache(resolver) {
  81554. this._imports = new WeakMap();
  81555. this._anonymousImports = new WeakMap();
  81556. this._lastImports = new WeakMap();
  81557. this._resolver = resolver;
  81558. }
  81559. var _proto = ImportsCache.prototype;
  81560. _proto.storeAnonymous = function storeAnonymous(programPath, url, getVal) {
  81561. var key = this._normalizeKey(programPath, url);
  81562. var imports = this._ensure(this._anonymousImports, programPath, Set);
  81563. if (imports.has(key)) return;
  81564. var node = getVal(programPath.node.sourceType === "script", t$9.stringLiteral(this._resolver(url)));
  81565. imports.add(key);
  81566. this._injectImport(programPath, node);
  81567. };
  81568. _proto.storeNamed = function storeNamed(programPath, url, name, getVal) {
  81569. var key = this._normalizeKey(programPath, url, name);
  81570. var imports = this._ensure(this._imports, programPath, Map);
  81571. if (!imports.has(key)) {
  81572. var _getVal = getVal(programPath.node.sourceType === "script", t$9.stringLiteral(this._resolver(url)), t$9.identifier(name)),
  81573. node = _getVal.node,
  81574. id = _getVal.name;
  81575. imports.set(key, id);
  81576. this._injectImport(programPath, node);
  81577. }
  81578. return t$9.identifier(imports.get(key));
  81579. };
  81580. _proto._injectImport = function _injectImport(programPath, node) {
  81581. var lastImport = this._lastImports.get(programPath);
  81582. if (lastImport && lastImport.node && lastImport.parent === programPath.node && lastImport.container === programPath.node.body) {
  81583. lastImport = lastImport.insertAfter(node);
  81584. } else {
  81585. lastImport = programPath.unshiftContainer("body", node);
  81586. }
  81587. lastImport = lastImport[lastImport.length - 1];
  81588. this._lastImports.set(programPath, lastImport);
  81589. };
  81590. _proto._ensure = function _ensure(map, programPath, Collection) {
  81591. var collection = map.get(programPath);
  81592. if (!collection) {
  81593. collection = new Collection();
  81594. map.set(programPath, collection);
  81595. }
  81596. return collection;
  81597. };
  81598. _proto._normalizeKey = function _normalizeKey(programPath, url, name) {
  81599. if (name === void 0) {
  81600. name = "";
  81601. }
  81602. var sourceType = programPath.node.sourceType;
  81603. return (name && sourceType) + "::" + url + "::" + name;
  81604. };
  81605. return ImportsCache;
  81606. }();
  81607. var presetEnvSilentDebugHeader$1 = "#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets";
  81608. function stringifyTargetsMultiline$1(targets) {
  81609. return JSON.stringify(prettifyTargets(targets), null, 2);
  81610. }
  81611. function patternToRegExp$1(pattern) {
  81612. if (pattern instanceof RegExp) return pattern;
  81613. try {
  81614. return new RegExp("^" + pattern + "$");
  81615. } catch (_unused) {
  81616. return null;
  81617. }
  81618. }
  81619. function buildUnusedError$1(label, unused) {
  81620. if (!unused.length) return "";
  81621. return " - The following \"" + label + "\" patterns didn't match any polyfill:\n" + unused.map(function (original) {
  81622. return " " + String(original) + "\n";
  81623. }).join("");
  81624. }
  81625. function buldDuplicatesError$1(duplicates) {
  81626. if (!duplicates.size) return "";
  81627. return " - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\n" + Array.from(duplicates, function (name) {
  81628. return " " + name + "\n";
  81629. }).join("");
  81630. }
  81631. function validateIncludeExclude$1(provider, polyfills, includePatterns, excludePatterns) {
  81632. var current;
  81633. var filter = function filter(pattern) {
  81634. var regexp = patternToRegExp$1(pattern);
  81635. if (!regexp) return false;
  81636. var matched = false;
  81637. for (var _iterator = _createForOfIteratorHelperLoose(polyfills), _step; !(_step = _iterator()).done;) {
  81638. var polyfill = _step.value;
  81639. if (regexp.test(polyfill)) {
  81640. matched = true;
  81641. current.add(polyfill);
  81642. }
  81643. }
  81644. return !matched;
  81645. };
  81646. var include = current = new Set();
  81647. var unusedInclude = Array.from(includePatterns).filter(filter);
  81648. var exclude = current = new Set();
  81649. var unusedExclude = Array.from(excludePatterns).filter(filter);
  81650. var duplicates = intersection$3(include, exclude);
  81651. if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {
  81652. throw new Error("Error while validating the \"" + provider + "\" provider options:\n" + buildUnusedError$1("include", unusedInclude) + buildUnusedError$1("exclude", unusedExclude) + buldDuplicatesError$1(duplicates));
  81653. }
  81654. return {
  81655. include: include,
  81656. exclude: exclude
  81657. };
  81658. }
  81659. function applyMissingDependenciesDefaults$1(options, babelApi) {
  81660. var _options$missingDepen = options.missingDependencies,
  81661. missingDependencies = _options$missingDepen === void 0 ? {} : _options$missingDepen;
  81662. if (missingDependencies === false) return false;
  81663. var caller = babelApi.caller(function (caller) {
  81664. return caller == null ? void 0 : caller.name;
  81665. });
  81666. var _missingDependencies$ = missingDependencies.log,
  81667. log = _missingDependencies$ === void 0 ? "deferred" : _missingDependencies$,
  81668. _missingDependencies$2 = missingDependencies.inject,
  81669. inject = _missingDependencies$2 === void 0 ? caller === "rollup-plugin-babel" ? "throw" : "import" : _missingDependencies$2,
  81670. _missingDependencies$3 = missingDependencies.all,
  81671. all = _missingDependencies$3 === void 0 ? false : _missingDependencies$3;
  81672. return {
  81673. log: log,
  81674. inject: inject,
  81675. all: all
  81676. };
  81677. }
  81678. var usage$1 = function usage(callProvider) {
  81679. function property(object, key, placement, path) {
  81680. return callProvider({
  81681. kind: "property",
  81682. object: object,
  81683. key: key,
  81684. placement: placement
  81685. }, path);
  81686. }
  81687. return {
  81688. ReferencedIdentifier: function ReferencedIdentifier(path) {
  81689. var name = path.node.name,
  81690. scope = path.scope;
  81691. if (scope.getBindingIdentifier(name)) return;
  81692. callProvider({
  81693. kind: "global",
  81694. name: name
  81695. }, path);
  81696. },
  81697. MemberExpression: function MemberExpression(path) {
  81698. var key = resolveKey$1(path.get("property"), path.node.computed);
  81699. if (!key || key === "prototype") return;
  81700. var object = path.get("object");
  81701. var binding = object.scope.getBinding(object.node.name);
  81702. if (binding && binding.path.isImportNamespaceSpecifier()) return;
  81703. var source = resolveSource$1(object);
  81704. return property(source.id, key, source.placement, path);
  81705. },
  81706. ObjectPattern: function ObjectPattern(path) {
  81707. var parentPath = path.parentPath,
  81708. parent = path.parent;
  81709. var obj;
  81710. if (parentPath.isVariableDeclarator()) {
  81711. obj = parentPath.get("init");
  81712. } else if (parentPath.isAssignmentExpression()) {
  81713. obj = parentPath.get("right");
  81714. } else if (parentPath.isFunction()) {
  81715. var grand = parentPath.parentPath;
  81716. if (grand.isCallExpression() || grand.isNewExpression()) {
  81717. if (grand.node.callee === parent) {
  81718. obj = grand.get("arguments")[path.key];
  81719. }
  81720. }
  81721. }
  81722. var id = null;
  81723. var placement = null;
  81724. if (obj) {
  81725. var _resolveSource = resolveSource$1(obj);
  81726. id = _resolveSource.id;
  81727. placement = _resolveSource.placement;
  81728. }
  81729. for (var _iterator2 = _createForOfIteratorHelperLoose(path.get("properties")), _step2; !(_step2 = _iterator2()).done;) {
  81730. var prop = _step2.value;
  81731. if (prop.isObjectProperty()) {
  81732. var key = resolveKey$1(prop.get("key"));
  81733. if (key) property(id, key, placement, prop);
  81734. }
  81735. }
  81736. },
  81737. BinaryExpression: function BinaryExpression(path) {
  81738. if (path.node.operator !== "in") return;
  81739. var source = resolveSource$1(path.get("right"));
  81740. var key = resolveKey$1(path.get("left"), true);
  81741. if (!key) return;
  81742. callProvider({
  81743. kind: "in",
  81744. object: source.id,
  81745. key: key,
  81746. placement: source.placement
  81747. }, path);
  81748. }
  81749. };
  81750. };
  81751. var entry$1 = function entry(callProvider) {
  81752. return {
  81753. ImportDeclaration: function ImportDeclaration(path) {
  81754. var source = getImportSource$2(path);
  81755. if (!source) return;
  81756. callProvider({
  81757. kind: "import",
  81758. source: source
  81759. }, path);
  81760. },
  81761. Program: function Program(path) {
  81762. path.get("body").forEach(function (bodyPath) {
  81763. var source = getRequireSource$2(bodyPath);
  81764. if (!source) return;
  81765. callProvider({
  81766. kind: "import",
  81767. source: source
  81768. }, bodyPath);
  81769. });
  81770. }
  81771. };
  81772. };
  81773. function resolve$1(dirname, moduleName, absoluteImports) {
  81774. if (absoluteImports === false) return moduleName;
  81775. throw new Error("\"absoluteImports\" is not supported in bundles prepared for the browser.");
  81776. }
  81777. function has$6(basedir, name) {
  81778. return true;
  81779. }
  81780. function logMissing$1(missingDeps) {}
  81781. function laterLogMissing$1(missingDeps) {}
  81782. var PossibleGlobalObjects$1 = new Set(["global", "globalThis", "self", "window"]);
  81783. function createMetaResolver$1(polyfills) {
  81784. var staticP = polyfills["static"],
  81785. instanceP = polyfills.instance,
  81786. globalP = polyfills.global;
  81787. return function (meta) {
  81788. if (meta.kind === "global" && globalP && has$1$1(globalP, meta.name)) {
  81789. return {
  81790. kind: "global",
  81791. desc: globalP[meta.name],
  81792. name: meta.name
  81793. };
  81794. }
  81795. if (meta.kind === "property" || meta.kind === "in") {
  81796. var placement = meta.placement,
  81797. object = meta.object,
  81798. key = meta.key;
  81799. if (object && placement === "static") {
  81800. if (globalP && PossibleGlobalObjects$1.has(object) && has$1$1(globalP, key)) {
  81801. return {
  81802. kind: "global",
  81803. desc: globalP[key],
  81804. name: key
  81805. };
  81806. }
  81807. if (staticP && has$1$1(staticP, object) && has$1$1(staticP[object], key)) {
  81808. return {
  81809. kind: "static",
  81810. desc: staticP[object][key],
  81811. name: object + "$" + key
  81812. };
  81813. }
  81814. }
  81815. if (instanceP && has$1$1(instanceP, key)) {
  81816. return {
  81817. kind: "instance",
  81818. desc: instanceP[key],
  81819. name: "" + key
  81820. };
  81821. }
  81822. }
  81823. };
  81824. }
  81825. var getTargets$1 = getTargets$2["default"] || getTargets$2;
  81826. function resolveOptions$1(options, babelApi) {
  81827. var method = options.method,
  81828. targetsOption = options.targets,
  81829. ignoreBrowserslistConfig = options.ignoreBrowserslistConfig,
  81830. configPath = options.configPath,
  81831. debug = options.debug,
  81832. shouldInjectPolyfill = options.shouldInjectPolyfill,
  81833. absoluteImports = options.absoluteImports,
  81834. providerOptions = _objectWithoutProperties(options, _excluded$1);
  81835. var methodName;
  81836. if (method === "usage-global") methodName = "usageGlobal";else if (method === "entry-global") methodName = "entryGlobal";else if (method === "usage-pure") methodName = "usagePure";else if (typeof method !== "string") {
  81837. throw new Error(".method must be a string");
  81838. } else {
  81839. throw new Error(".method must be one of \"entry-global\", \"usage-global\"" + (" or \"usage-pure\" (received " + JSON.stringify(method) + ")"));
  81840. }
  81841. if (typeof shouldInjectPolyfill === "function") {
  81842. if (options.include || options.exclude) {
  81843. throw new Error(".include and .exclude are not supported when using the" + " .shouldInjectPolyfill function.");
  81844. }
  81845. } else if (shouldInjectPolyfill != null) {
  81846. throw new Error(".shouldInjectPolyfill must be a function, or undefined" + (" (received " + JSON.stringify(shouldInjectPolyfill) + ")"));
  81847. }
  81848. if (absoluteImports != null && typeof absoluteImports !== "boolean" && typeof absoluteImports !== "string") {
  81849. throw new Error(".absoluteImports must be a boolean, a string, or undefined" + (" (received " + JSON.stringify(absoluteImports) + ")"));
  81850. }
  81851. var targets;
  81852. if (targetsOption || configPath || ignoreBrowserslistConfig) {
  81853. var targetsObj = typeof targetsOption === "string" || Array.isArray(targetsOption) ? {
  81854. browsers: targetsOption
  81855. } : targetsOption;
  81856. targets = getTargets$1(targetsObj, {
  81857. ignoreBrowserslistConfig: ignoreBrowserslistConfig,
  81858. configPath: configPath
  81859. });
  81860. } else {
  81861. targets = babelApi.targets();
  81862. }
  81863. return {
  81864. method: method,
  81865. methodName: methodName,
  81866. targets: targets,
  81867. absoluteImports: absoluteImports != null ? absoluteImports : false,
  81868. shouldInjectPolyfill: shouldInjectPolyfill,
  81869. debug: !!debug,
  81870. providerOptions: providerOptions
  81871. };
  81872. }
  81873. function instantiateProvider$1(factory, options, missingDependencies, dirname, debugLog, babelApi) {
  81874. var _resolveOptions = resolveOptions$1(options, babelApi),
  81875. method = _resolveOptions.method,
  81876. methodName = _resolveOptions.methodName,
  81877. targets = _resolveOptions.targets,
  81878. _debug = _resolveOptions.debug,
  81879. _shouldInjectPolyfill = _resolveOptions.shouldInjectPolyfill,
  81880. providerOptions = _resolveOptions.providerOptions,
  81881. absoluteImports = _resolveOptions.absoluteImports;
  81882. var getUtils = createUtilsGetter$1(new ImportsCache$1(function (moduleName) {
  81883. return resolve$1(dirname, moduleName, absoluteImports);
  81884. }));
  81885. var include, exclude;
  81886. var polyfillsSupport;
  81887. var polyfillsNames;
  81888. var filterPolyfills;
  81889. var depsCache = new Map();
  81890. var api = {
  81891. babel: babelApi,
  81892. getUtils: getUtils,
  81893. method: options.method,
  81894. targets: targets,
  81895. createMetaResolver: createMetaResolver$1,
  81896. shouldInjectPolyfill: function shouldInjectPolyfill(name) {
  81897. if (polyfillsNames === undefined) {
  81898. throw new Error("Internal error in the " + factory.name + " provider: " + "shouldInjectPolyfill() can't be called during initialization.");
  81899. }
  81900. if (!polyfillsNames.has(name)) {
  81901. console.warn("Internal error in the " + provider.name + " provider: " + ("unknown polyfill \"" + name + "\"."));
  81902. }
  81903. if (filterPolyfills && !filterPolyfills(name)) return false;
  81904. var shouldInject = isRequired(name, targets, {
  81905. compatData: polyfillsSupport,
  81906. includes: include,
  81907. excludes: exclude
  81908. });
  81909. if (_shouldInjectPolyfill) {
  81910. shouldInject = _shouldInjectPolyfill(name, shouldInject);
  81911. if (typeof shouldInject !== "boolean") {
  81912. throw new Error(".shouldInjectPolyfill must return a boolean.");
  81913. }
  81914. }
  81915. return shouldInject;
  81916. },
  81917. debug: function debug(name) {
  81918. debugLog().found = true;
  81919. if (!_debug || !name) return;
  81920. if (debugLog().polyfills.has(provider.name)) return;
  81921. debugLog().polyfills.set(name, polyfillsSupport && name && polyfillsSupport[name]);
  81922. },
  81923. assertDependency: function assertDependency(name, version) {
  81924. if (version === void 0) {
  81925. version = "*";
  81926. }
  81927. if (missingDependencies === false) return;
  81928. if (absoluteImports) {
  81929. return;
  81930. }
  81931. var dep = version === "*" ? name : name + "@^" + version;
  81932. var found = missingDependencies.all ? false : mapGetOr$1(depsCache, name + " :: " + dirname, function () {
  81933. return has$6();
  81934. });
  81935. if (!found) {
  81936. debugLog().missingDeps.add(dep);
  81937. }
  81938. }
  81939. };
  81940. var provider = factory(api, providerOptions, dirname);
  81941. if (typeof provider[methodName] !== "function") {
  81942. throw new Error("The \"" + (provider.name || factory.name) + "\" provider doesn't " + ("support the \"" + method + "\" polyfilling method."));
  81943. }
  81944. if (Array.isArray(provider.polyfills)) {
  81945. polyfillsNames = new Set(provider.polyfills);
  81946. filterPolyfills = provider.filterPolyfills;
  81947. } else if (provider.polyfills) {
  81948. polyfillsNames = new Set(Object.keys(provider.polyfills));
  81949. polyfillsSupport = provider.polyfills;
  81950. filterPolyfills = provider.filterPolyfills;
  81951. } else {
  81952. polyfillsNames = new Set();
  81953. }
  81954. var _validateIncludeExclu = validateIncludeExclude$1(provider.name || factory.name, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []);
  81955. include = _validateIncludeExclu.include;
  81956. exclude = _validateIncludeExclu.exclude;
  81957. return {
  81958. debug: _debug,
  81959. method: method,
  81960. targets: targets,
  81961. provider: provider,
  81962. callProvider: function callProvider(payload, path) {
  81963. var utils = getUtils(path);
  81964. provider[methodName](payload, utils, path);
  81965. }
  81966. };
  81967. }
  81968. function definePolyfillProvider$1(factory) {
  81969. return declare(function (babelApi, options, dirname) {
  81970. babelApi.assertVersion(7);
  81971. var traverse = babelApi.traverse;
  81972. var debugLog;
  81973. var missingDependencies = applyMissingDependenciesDefaults$1(options, babelApi);
  81974. var _instantiateProvider = instantiateProvider$1(factory, options, missingDependencies, dirname, function () {
  81975. return debugLog;
  81976. }, babelApi),
  81977. debug = _instantiateProvider.debug,
  81978. method = _instantiateProvider.method,
  81979. targets = _instantiateProvider.targets,
  81980. provider = _instantiateProvider.provider,
  81981. callProvider = _instantiateProvider.callProvider;
  81982. var createVisitor = method === "entry-global" ? entry$1 : usage$1;
  81983. var visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);
  81984. if (debug && debug !== presetEnvSilentDebugHeader$1) {
  81985. console.log(provider.name + ": `DEBUG` option");
  81986. console.log("\nUsing targets: " + stringifyTargetsMultiline$1(targets));
  81987. console.log("\nUsing polyfills with `" + method + "` method:");
  81988. }
  81989. return {
  81990. name: "inject-polyfills",
  81991. visitor: visitor,
  81992. pre: function pre() {
  81993. var _provider$pre;
  81994. debugLog = {
  81995. polyfills: new Map(),
  81996. found: false,
  81997. providers: new Set(),
  81998. missingDeps: new Set()
  81999. };
  82000. (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);
  82001. },
  82002. post: function post() {
  82003. var _provider$post;
  82004. (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);
  82005. if (missingDependencies !== false) {
  82006. if (missingDependencies.log === "per-file") {
  82007. logMissing$1(debugLog.missingDeps);
  82008. } else {
  82009. laterLogMissing$1(debugLog.missingDeps);
  82010. }
  82011. }
  82012. if (!debug) return;
  82013. if (this.filename) console.log("\n[" + this.filename + "]");
  82014. if (debugLog.polyfills.size === 0) {
  82015. console.log(method === "entry-global" ? debugLog.found ? "Based on your targets, the " + provider.name + " polyfill did not add any polyfill." : "The entry point for the " + provider.name + " polyfill has not been found." : "Based on your code and targets, the " + provider.name + " polyfill did not add any polyfill.");
  82016. return;
  82017. }
  82018. if (method === "entry-global") {
  82019. console.log("The " + provider.name + " polyfill entry has been replaced with " + "the following polyfills:");
  82020. } else {
  82021. console.log("The " + provider.name + " polyfill added the following polyfills:");
  82022. }
  82023. for (var _iterator3 = _createForOfIteratorHelperLoose(debugLog.polyfills), _step3; !(_step3 = _iterator3()).done;) {
  82024. var _step3$value = _slicedToArray$2(_step3.value, 2),
  82025. name = _step3$value[0],
  82026. support = _step3$value[1];
  82027. if (support) {
  82028. var filteredTargets = getInclusionReasons(name, targets, support);
  82029. var formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, ", ").replace(/^\{"/, '{ "').replace(/"\}$/, '" }');
  82030. console.log(" " + name + " " + formattedTargets);
  82031. } else {
  82032. console.log(" " + name);
  82033. }
  82034. }
  82035. }
  82036. };
  82037. });
  82038. }
  82039. function mapGetOr$1(map, key, getDefault) {
  82040. var val = map.get(key);
  82041. if (val === undefined) {
  82042. val = getDefault();
  82043. map.set(key, val);
  82044. }
  82045. return val;
  82046. }
  82047. var define$3 = function define(name, pure, global, meta) {
  82048. if (global === void 0) {
  82049. global = [];
  82050. }
  82051. return {
  82052. name: name,
  82053. pure: pure,
  82054. global: global,
  82055. meta: meta
  82056. };
  82057. };
  82058. var pureAndGlobal$1 = function pureAndGlobal(pure, global, minRuntimeVersion) {
  82059. if (minRuntimeVersion === void 0) {
  82060. minRuntimeVersion = null;
  82061. }
  82062. return define$3(global[0], pure, global, {
  82063. minRuntimeVersion: minRuntimeVersion
  82064. });
  82065. };
  82066. var globalOnly$1 = function globalOnly(global) {
  82067. return define$3(global[0], null, global);
  82068. };
  82069. var pureOnly$1 = function pureOnly(pure, name) {
  82070. return define$3(name, pure, []);
  82071. };
  82072. var ArrayNatureIterators$3 = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
  82073. var CommonIterators$3 = ["es6.string.iterator"].concat(ArrayNatureIterators$3);
  82074. var PromiseDependencies$3 = ["es6.object.to-string", "es6.promise"];
  82075. var BuiltIns$3 = {
  82076. DataView: globalOnly$1(["es6.typed.data-view"]),
  82077. Float32Array: globalOnly$1(["es6.typed.float32-array"]),
  82078. Float64Array: globalOnly$1(["es6.typed.float64-array"]),
  82079. Int8Array: globalOnly$1(["es6.typed.int8-array"]),
  82080. Int16Array: globalOnly$1(["es6.typed.int16-array"]),
  82081. Int32Array: globalOnly$1(["es6.typed.int32-array"]),
  82082. Map: pureAndGlobal$1("map", ["es6.map"].concat(_toConsumableArray(CommonIterators$3))),
  82083. Number: globalOnly$1(["es6.number.constructor"]),
  82084. Promise: pureAndGlobal$1("promise", PromiseDependencies$3),
  82085. RegExp: globalOnly$1(["es6.regexp.constructor"]),
  82086. Set: pureAndGlobal$1("set", ["es6.set"].concat(_toConsumableArray(CommonIterators$3))),
  82087. Symbol: pureAndGlobal$1("symbol", ["es6.symbol"]),
  82088. Uint8Array: globalOnly$1(["es6.typed.uint8-array"]),
  82089. Uint8ClampedArray: globalOnly$1(["es6.typed.uint8-clamped-array"]),
  82090. Uint16Array: globalOnly$1(["es6.typed.uint16-array"]),
  82091. Uint32Array: globalOnly$1(["es6.typed.uint32-array"]),
  82092. WeakMap: pureAndGlobal$1("weak-map", ["es6.weak-map"].concat(_toConsumableArray(CommonIterators$3))),
  82093. WeakSet: pureAndGlobal$1("weak-set", ["es6.weak-set"].concat(_toConsumableArray(CommonIterators$3))),
  82094. setImmediate: pureOnly$1("set-immediate", "web.immediate"),
  82095. clearImmediate: pureOnly$1("clear-immediate", "web.immediate"),
  82096. parseFloat: pureOnly$1("parse-float", "es6.parse-float"),
  82097. parseInt: pureOnly$1("parse-int", "es6.parse-int")
  82098. };
  82099. var InstanceProperties$3 = {
  82100. __defineGetter__: globalOnly$1(["es7.object.define-getter"]),
  82101. __defineSetter__: globalOnly$1(["es7.object.define-setter"]),
  82102. __lookupGetter__: globalOnly$1(["es7.object.lookup-getter"]),
  82103. __lookupSetter__: globalOnly$1(["es7.object.lookup-setter"]),
  82104. anchor: globalOnly$1(["es6.string.anchor"]),
  82105. big: globalOnly$1(["es6.string.big"]),
  82106. bind: globalOnly$1(["es6.function.bind"]),
  82107. blink: globalOnly$1(["es6.string.blink"]),
  82108. bold: globalOnly$1(["es6.string.bold"]),
  82109. codePointAt: globalOnly$1(["es6.string.code-point-at"]),
  82110. copyWithin: globalOnly$1(["es6.array.copy-within"]),
  82111. endsWith: globalOnly$1(["es6.string.ends-with"]),
  82112. entries: globalOnly$1(ArrayNatureIterators$3),
  82113. every: globalOnly$1(["es6.array.every"]),
  82114. fill: globalOnly$1(["es6.array.fill"]),
  82115. filter: globalOnly$1(["es6.array.filter"]),
  82116. "finally": globalOnly$1(["es7.promise.finally"].concat(PromiseDependencies$3)),
  82117. find: globalOnly$1(["es6.array.find"]),
  82118. findIndex: globalOnly$1(["es6.array.find-index"]),
  82119. fixed: globalOnly$1(["es6.string.fixed"]),
  82120. flags: globalOnly$1(["es6.regexp.flags"]),
  82121. flatMap: globalOnly$1(["es7.array.flat-map"]),
  82122. fontcolor: globalOnly$1(["es6.string.fontcolor"]),
  82123. fontsize: globalOnly$1(["es6.string.fontsize"]),
  82124. forEach: globalOnly$1(["es6.array.for-each"]),
  82125. includes: globalOnly$1(["es6.string.includes", "es7.array.includes"]),
  82126. indexOf: globalOnly$1(["es6.array.index-of"]),
  82127. italics: globalOnly$1(["es6.string.italics"]),
  82128. keys: globalOnly$1(ArrayNatureIterators$3),
  82129. lastIndexOf: globalOnly$1(["es6.array.last-index-of"]),
  82130. link: globalOnly$1(["es6.string.link"]),
  82131. map: globalOnly$1(["es6.array.map"]),
  82132. match: globalOnly$1(["es6.regexp.match"]),
  82133. name: globalOnly$1(["es6.function.name"]),
  82134. padStart: globalOnly$1(["es7.string.pad-start"]),
  82135. padEnd: globalOnly$1(["es7.string.pad-end"]),
  82136. reduce: globalOnly$1(["es6.array.reduce"]),
  82137. reduceRight: globalOnly$1(["es6.array.reduce-right"]),
  82138. repeat: globalOnly$1(["es6.string.repeat"]),
  82139. replace: globalOnly$1(["es6.regexp.replace"]),
  82140. search: globalOnly$1(["es6.regexp.search"]),
  82141. small: globalOnly$1(["es6.string.small"]),
  82142. some: globalOnly$1(["es6.array.some"]),
  82143. sort: globalOnly$1(["es6.array.sort"]),
  82144. split: globalOnly$1(["es6.regexp.split"]),
  82145. startsWith: globalOnly$1(["es6.string.starts-with"]),
  82146. strike: globalOnly$1(["es6.string.strike"]),
  82147. sub: globalOnly$1(["es6.string.sub"]),
  82148. sup: globalOnly$1(["es6.string.sup"]),
  82149. toISOString: globalOnly$1(["es6.date.to-iso-string"]),
  82150. toJSON: globalOnly$1(["es6.date.to-json"]),
  82151. toString: globalOnly$1(["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"]),
  82152. trim: globalOnly$1(["es6.string.trim"]),
  82153. trimEnd: globalOnly$1(["es7.string.trim-right"]),
  82154. trimLeft: globalOnly$1(["es7.string.trim-left"]),
  82155. trimRight: globalOnly$1(["es7.string.trim-right"]),
  82156. trimStart: globalOnly$1(["es7.string.trim-left"]),
  82157. values: globalOnly$1(ArrayNatureIterators$3)
  82158. };
  82159. if ("es6.array.slice" in corejs2BuiltIns) {
  82160. InstanceProperties$3.slice = globalOnly$1(["es6.array.slice"]);
  82161. }
  82162. var StaticProperties$3 = {
  82163. Array: {
  82164. from: pureAndGlobal$1("array/from", ["es6.symbol", "es6.array.from"].concat(_toConsumableArray(CommonIterators$3))),
  82165. isArray: pureAndGlobal$1("array/is-array", ["es6.array.is-array"]),
  82166. of: pureAndGlobal$1("array/of", ["es6.array.of"])
  82167. },
  82168. Date: {
  82169. now: pureAndGlobal$1("date/now", ["es6.date.now"])
  82170. },
  82171. JSON: {
  82172. stringify: pureOnly$1("json/stringify", "es6.symbol")
  82173. },
  82174. Math: {
  82175. acosh: pureAndGlobal$1("math/acosh", ["es6.math.acosh"], "7.0.1"),
  82176. asinh: pureAndGlobal$1("math/asinh", ["es6.math.asinh"], "7.0.1"),
  82177. atanh: pureAndGlobal$1("math/atanh", ["es6.math.atanh"], "7.0.1"),
  82178. cbrt: pureAndGlobal$1("math/cbrt", ["es6.math.cbrt"], "7.0.1"),
  82179. clz32: pureAndGlobal$1("math/clz32", ["es6.math.clz32"], "7.0.1"),
  82180. cosh: pureAndGlobal$1("math/cosh", ["es6.math.cosh"], "7.0.1"),
  82181. expm1: pureAndGlobal$1("math/expm1", ["es6.math.expm1"], "7.0.1"),
  82182. fround: pureAndGlobal$1("math/fround", ["es6.math.fround"], "7.0.1"),
  82183. hypot: pureAndGlobal$1("math/hypot", ["es6.math.hypot"], "7.0.1"),
  82184. imul: pureAndGlobal$1("math/imul", ["es6.math.imul"], "7.0.1"),
  82185. log1p: pureAndGlobal$1("math/log1p", ["es6.math.log1p"], "7.0.1"),
  82186. log10: pureAndGlobal$1("math/log10", ["es6.math.log10"], "7.0.1"),
  82187. log2: pureAndGlobal$1("math/log2", ["es6.math.log2"], "7.0.1"),
  82188. sign: pureAndGlobal$1("math/sign", ["es6.math.sign"], "7.0.1"),
  82189. sinh: pureAndGlobal$1("math/sinh", ["es6.math.sinh"], "7.0.1"),
  82190. tanh: pureAndGlobal$1("math/tanh", ["es6.math.tanh"], "7.0.1"),
  82191. trunc: pureAndGlobal$1("math/trunc", ["es6.math.trunc"], "7.0.1")
  82192. },
  82193. Number: {
  82194. EPSILON: pureAndGlobal$1("number/epsilon", ["es6.number.epsilon"]),
  82195. MIN_SAFE_INTEGER: pureAndGlobal$1("number/min-safe-integer", ["es6.number.min-safe-integer"]),
  82196. MAX_SAFE_INTEGER: pureAndGlobal$1("number/max-safe-integer", ["es6.number.max-safe-integer"]),
  82197. isFinite: pureAndGlobal$1("number/is-finite", ["es6.number.is-finite"]),
  82198. isInteger: pureAndGlobal$1("number/is-integer", ["es6.number.is-integer"]),
  82199. isSafeInteger: pureAndGlobal$1("number/is-safe-integer", ["es6.number.is-safe-integer"]),
  82200. isNaN: pureAndGlobal$1("number/is-nan", ["es6.number.is-nan"]),
  82201. parseFloat: pureAndGlobal$1("number/parse-float", ["es6.number.parse-float"]),
  82202. parseInt: pureAndGlobal$1("number/parse-int", ["es6.number.parse-int"])
  82203. },
  82204. Object: {
  82205. assign: pureAndGlobal$1("object/assign", ["es6.object.assign"]),
  82206. create: pureAndGlobal$1("object/create", ["es6.object.create"]),
  82207. defineProperties: pureAndGlobal$1("object/define-properties", ["es6.object.define-properties"]),
  82208. defineProperty: pureAndGlobal$1("object/define-property", ["es6.object.define-property"]),
  82209. entries: pureAndGlobal$1("object/entries", ["es7.object.entries"]),
  82210. freeze: pureAndGlobal$1("object/freeze", ["es6.object.freeze"]),
  82211. getOwnPropertyDescriptor: pureAndGlobal$1("object/get-own-property-descriptor", ["es6.object.get-own-property-descriptor"]),
  82212. getOwnPropertyDescriptors: pureAndGlobal$1("object/get-own-property-descriptors", ["es7.object.get-own-property-descriptors"]),
  82213. getOwnPropertyNames: pureAndGlobal$1("object/get-own-property-names", ["es6.object.get-own-property-names"]),
  82214. getOwnPropertySymbols: pureAndGlobal$1("object/get-own-property-symbols", ["es6.symbol"]),
  82215. getPrototypeOf: pureAndGlobal$1("object/get-prototype-of", ["es6.object.get-prototype-of"]),
  82216. is: pureAndGlobal$1("object/is", ["es6.object.is"]),
  82217. isExtensible: pureAndGlobal$1("object/is-extensible", ["es6.object.is-extensible"]),
  82218. isFrozen: pureAndGlobal$1("object/is-frozen", ["es6.object.is-frozen"]),
  82219. isSealed: pureAndGlobal$1("object/is-sealed", ["es6.object.is-sealed"]),
  82220. keys: pureAndGlobal$1("object/keys", ["es6.object.keys"]),
  82221. preventExtensions: pureAndGlobal$1("object/prevent-extensions", ["es6.object.prevent-extensions"]),
  82222. seal: pureAndGlobal$1("object/seal", ["es6.object.seal"]),
  82223. setPrototypeOf: pureAndGlobal$1("object/set-prototype-of", ["es6.object.set-prototype-of"]),
  82224. values: pureAndGlobal$1("object/values", ["es7.object.values"])
  82225. },
  82226. Promise: {
  82227. all: globalOnly$1(CommonIterators$3),
  82228. race: globalOnly$1(CommonIterators$3)
  82229. },
  82230. Reflect: {
  82231. apply: pureAndGlobal$1("reflect/apply", ["es6.reflect.apply"]),
  82232. construct: pureAndGlobal$1("reflect/construct", ["es6.reflect.construct"]),
  82233. defineProperty: pureAndGlobal$1("reflect/define-property", ["es6.reflect.define-property"]),
  82234. deleteProperty: pureAndGlobal$1("reflect/delete-property", ["es6.reflect.delete-property"]),
  82235. get: pureAndGlobal$1("reflect/get", ["es6.reflect.get"]),
  82236. getOwnPropertyDescriptor: pureAndGlobal$1("reflect/get-own-property-descriptor", ["es6.reflect.get-own-property-descriptor"]),
  82237. getPrototypeOf: pureAndGlobal$1("reflect/get-prototype-of", ["es6.reflect.get-prototype-of"]),
  82238. has: pureAndGlobal$1("reflect/has", ["es6.reflect.has"]),
  82239. isExtensible: pureAndGlobal$1("reflect/is-extensible", ["es6.reflect.is-extensible"]),
  82240. ownKeys: pureAndGlobal$1("reflect/own-keys", ["es6.reflect.own-keys"]),
  82241. preventExtensions: pureAndGlobal$1("reflect/prevent-extensions", ["es6.reflect.prevent-extensions"]),
  82242. set: pureAndGlobal$1("reflect/set", ["es6.reflect.set"]),
  82243. setPrototypeOf: pureAndGlobal$1("reflect/set-prototype-of", ["es6.reflect.set-prototype-of"])
  82244. },
  82245. String: {
  82246. at: pureOnly$1("string/at", "es7.string.at"),
  82247. fromCodePoint: pureAndGlobal$1("string/from-code-point", ["es6.string.from-code-point"]),
  82248. raw: pureAndGlobal$1("string/raw", ["es6.string.raw"])
  82249. },
  82250. Symbol: {
  82251. asyncIterator: globalOnly$1(["es6.symbol", "es7.symbol.async-iterator"]),
  82252. "for": pureOnly$1("symbol/for", "es6.symbol"),
  82253. hasInstance: pureOnly$1("symbol/has-instance", "es6.symbol"),
  82254. isConcatSpreadable: pureOnly$1("symbol/is-concat-spreadable", "es6.symbol"),
  82255. iterator: define$3("es6.symbol", "symbol/iterator", CommonIterators$3),
  82256. keyFor: pureOnly$1("symbol/key-for", "es6.symbol"),
  82257. match: pureAndGlobal$1("symbol/match", ["es6.regexp.match"]),
  82258. replace: pureOnly$1("symbol/replace", "es6.symbol"),
  82259. search: pureOnly$1("symbol/search", "es6.symbol"),
  82260. species: pureOnly$1("symbol/species", "es6.symbol"),
  82261. split: pureOnly$1("symbol/split", "es6.symbol"),
  82262. toPrimitive: pureOnly$1("symbol/to-primitive", "es6.symbol"),
  82263. toStringTag: pureOnly$1("symbol/to-string-tag", "es6.symbol"),
  82264. unscopables: pureOnly$1("symbol/unscopables", "es6.symbol")
  82265. }
  82266. };
  82267. var webPolyfills$1 = {
  82268. "web.timers": {},
  82269. "web.immediate": {},
  82270. "web.dom.iterable": {}
  82271. };
  82272. var purePolyfills$1 = {
  82273. "es6.parse-float": {},
  82274. "es6.parse-int": {},
  82275. "es7.string.at": {}
  82276. };
  82277. function addPlatformSpecificPolyfills$1(targets, method, polyfills) {
  82278. var targetNames = Object.keys(targets);
  82279. var isAnyTarget = !targetNames.length;
  82280. var isWebTarget = targetNames.some(function (name) {
  82281. return name !== "node";
  82282. });
  82283. return Object.assign(Object.assign(Object.assign({}, polyfills), method === "usage-pure" ? purePolyfills$1 : null), isAnyTarget || isWebTarget ? webPolyfills$1 : null);
  82284. }
  82285. function hasMinVersion$1(minVersion, runtimeVersion) {
  82286. if (!runtimeVersion || !minVersion) return true;
  82287. if (semver$3.valid(runtimeVersion)) runtimeVersion = "^" + runtimeVersion;
  82288. return !semver$3.intersects("<" + minVersion, runtimeVersion) && !semver$3.intersects(">=8.0.0", runtimeVersion);
  82289. }
  82290. var _ref$4 = undefined || babel,
  82291. t$8 = _ref$4.types;
  82292. var presetEnvCompat$1 = "#__secret_key__@babel/preset-env__compatibility";
  82293. var runtimeCompat$5 = "#__secret_key__@babel/runtime__compatibility";
  82294. var has$5 = Function.call.bind(Object.hasOwnProperty);
  82295. var index$5 = definePolyfillProvider$1(function (api, _ref2) {
  82296. var _ref2$presetEnvCompat = _ref2[presetEnvCompat$1];
  82297. _ref2$presetEnvCompat = _ref2$presetEnvCompat === void 0 ? {} : _ref2$presetEnvCompat;
  82298. var entryInjectRegenerator = _ref2$presetEnvCompat.entryInjectRegenerator,
  82299. _ref2$runtimeCompat = _ref2[runtimeCompat$5];
  82300. _ref2$runtimeCompat = _ref2$runtimeCompat === void 0 ? {} : _ref2$runtimeCompat;
  82301. var useBabelRuntime = _ref2$runtimeCompat.useBabelRuntime,
  82302. runtimeVersion = _ref2$runtimeCompat.runtimeVersion,
  82303. _ref2$runtimeCompat$e = _ref2$runtimeCompat.ext,
  82304. ext = _ref2$runtimeCompat$e === void 0 ? ".js" : _ref2$runtimeCompat$e;
  82305. var resolve = api.createMetaResolver({
  82306. global: BuiltIns$3,
  82307. "static": StaticProperties$3,
  82308. instance: InstanceProperties$3
  82309. });
  82310. var debug = api.debug,
  82311. shouldInjectPolyfill = api.shouldInjectPolyfill,
  82312. method = api.method;
  82313. var polyfills = addPlatformSpecificPolyfills$1(api.targets, method, corejs2BuiltIns);
  82314. var coreJSBase = useBabelRuntime ? useBabelRuntime + "/core-js" : method === "usage-pure" ? "core-js/library/fn" : "core-js/modules";
  82315. function inject(name, utils) {
  82316. if (typeof name === "string") {
  82317. if (has$5(polyfills, name) && shouldInjectPolyfill(name)) {
  82318. debug(name);
  82319. utils.injectGlobalImport(coreJSBase + "/" + name + ".js");
  82320. }
  82321. return;
  82322. }
  82323. name.forEach(function (name) {
  82324. return inject(name, utils);
  82325. });
  82326. }
  82327. function maybeInjectPure(desc, hint, utils) {
  82328. var pure = desc.pure,
  82329. meta = desc.meta,
  82330. name = desc.name;
  82331. if (!pure || !shouldInjectPolyfill(name)) return;
  82332. if (runtimeVersion && meta && meta.minRuntimeVersion && !hasMinVersion$1(meta && meta.minRuntimeVersion, runtimeVersion)) {
  82333. return;
  82334. }
  82335. return utils.injectDefaultImport(coreJSBase + "/" + pure + ext, hint);
  82336. }
  82337. return {
  82338. name: "corejs2",
  82339. polyfills: polyfills,
  82340. entryGlobal: function entryGlobal(meta, utils, path) {
  82341. if (meta.kind === "import" && meta.source === "core-js") {
  82342. debug(null);
  82343. inject(Object.keys(polyfills), utils);
  82344. if (entryInjectRegenerator) {
  82345. utils.injectGlobalImport("regenerator-runtime/runtime.js");
  82346. }
  82347. path.remove();
  82348. }
  82349. },
  82350. usageGlobal: function usageGlobal(meta, utils) {
  82351. var resolved = resolve(meta);
  82352. if (!resolved) return;
  82353. var deps = resolved.desc.global;
  82354. if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
  82355. var low = meta.object.toLowerCase();
  82356. deps = deps.filter(function (m) {
  82357. return m.includes(low);
  82358. });
  82359. }
  82360. inject(deps, utils);
  82361. },
  82362. usagePure: function usagePure(meta, utils, path) {
  82363. if (meta.kind === "in") {
  82364. if (meta.key === "Symbol.iterator") {
  82365. path.replaceWith(t$8.callExpression(utils.injectDefaultImport(coreJSBase + "/is-iterable" + ext, "isIterable"), [path.node.right]));
  82366. }
  82367. return;
  82368. }
  82369. if (path.parentPath.isUnaryExpression({
  82370. operator: "delete"
  82371. })) return;
  82372. if (meta.kind === "property") {
  82373. if (!path.isMemberExpression()) return;
  82374. if (!path.isReferenced()) return;
  82375. if (meta.key === "Symbol.iterator" && shouldInjectPolyfill("es6.symbol") && path.parentPath.isCallExpression({
  82376. callee: path.node
  82377. }) && path.parent.arguments.length === 0) {
  82378. path.parentPath.replaceWith(t$8.callExpression(utils.injectDefaultImport(coreJSBase + "/get-iterator" + ext, "getIterator"), [path.node.object]));
  82379. path.skip();
  82380. return;
  82381. }
  82382. }
  82383. var resolved = resolve(meta);
  82384. if (!resolved) return;
  82385. var id = maybeInjectPure(resolved.desc, resolved.name, utils);
  82386. if (id) path.replaceWith(id);
  82387. },
  82388. visitor: method === "usage-global" && {
  82389. YieldExpression: function YieldExpression(path) {
  82390. if (path.node.delegate) {
  82391. inject("web.dom.iterable", api.getUtils(path));
  82392. }
  82393. },
  82394. "ForOfStatement|ArrayPattern": function ForOfStatementArrayPattern(path) {
  82395. CommonIterators$3.forEach(function (name) {
  82396. return inject(name, api.getUtils(path));
  82397. });
  82398. }
  82399. }
  82400. };
  82401. });
  82402. var require$$0$3 = {
  82403. "es.symbol": {
  82404. android: "49",
  82405. chrome: "49",
  82406. edge: "15",
  82407. electron: "0.37",
  82408. firefox: "51",
  82409. ios: "10.0",
  82410. node: "6.0",
  82411. opera: "36",
  82412. opera_mobile: "36",
  82413. safari: "10.0",
  82414. samsung: "5.0"
  82415. },
  82416. "es.symbol.description": {
  82417. android: "70",
  82418. chrome: "70",
  82419. edge: "74",
  82420. electron: "5.0",
  82421. firefox: "63",
  82422. ios: "12.2",
  82423. node: "11.0",
  82424. opera: "57",
  82425. opera_mobile: "49",
  82426. safari: "12.1",
  82427. samsung: "10.0"
  82428. },
  82429. "es.symbol.async-iterator": {
  82430. android: "63",
  82431. chrome: "63",
  82432. edge: "74",
  82433. electron: "3.0",
  82434. firefox: "55",
  82435. ios: "12.0",
  82436. node: "10.0",
  82437. opera: "50",
  82438. opera_mobile: "46",
  82439. safari: "12.0",
  82440. samsung: "8.0"
  82441. },
  82442. "es.symbol.has-instance": {
  82443. android: "50",
  82444. chrome: "50",
  82445. edge: "15",
  82446. electron: "1.1",
  82447. firefox: "49",
  82448. ios: "10.0",
  82449. node: "6.0",
  82450. opera: "37",
  82451. opera_mobile: "37",
  82452. rhino: "1.7.13",
  82453. safari: "10.0",
  82454. samsung: "5.0"
  82455. },
  82456. "es.symbol.is-concat-spreadable": {
  82457. android: "48",
  82458. chrome: "48",
  82459. edge: "15",
  82460. electron: "0.37",
  82461. firefox: "48",
  82462. ios: "10.0",
  82463. node: "6.0",
  82464. opera: "35",
  82465. opera_mobile: "35",
  82466. rhino: "1.7.13",
  82467. safari: "10.0",
  82468. samsung: "5.0"
  82469. },
  82470. "es.symbol.iterator": {
  82471. android: "41",
  82472. chrome: "41",
  82473. edge: "13",
  82474. electron: "0.21",
  82475. firefox: "36",
  82476. ios: "9.0",
  82477. node: "1.0",
  82478. opera: "28",
  82479. opera_mobile: "28",
  82480. rhino: "1.7.13",
  82481. safari: "9.0",
  82482. samsung: "3.4"
  82483. },
  82484. "es.symbol.match": {
  82485. android: "50",
  82486. chrome: "50",
  82487. edge: "74",
  82488. electron: "1.1",
  82489. firefox: "40",
  82490. ios: "10.0",
  82491. node: "6.0",
  82492. opera: "37",
  82493. opera_mobile: "37",
  82494. rhino: "1.7.13",
  82495. safari: "10.0",
  82496. samsung: "5.0"
  82497. },
  82498. "es.symbol.match-all": {
  82499. android: "73",
  82500. chrome: "73",
  82501. edge: "74",
  82502. electron: "5.0",
  82503. firefox: "67",
  82504. ios: "13.0",
  82505. node: "12.0",
  82506. opera: "60",
  82507. opera_mobile: "52",
  82508. safari: "13",
  82509. samsung: "11.0"
  82510. },
  82511. "es.symbol.replace": {
  82512. android: "50",
  82513. chrome: "50",
  82514. edge: "74",
  82515. electron: "1.1",
  82516. firefox: "49",
  82517. ios: "10.0",
  82518. node: "6.0",
  82519. opera: "37",
  82520. opera_mobile: "37",
  82521. rhino: "1.7.13",
  82522. safari: "10.0",
  82523. samsung: "5.0"
  82524. },
  82525. "es.symbol.search": {
  82526. android: "50",
  82527. chrome: "50",
  82528. edge: "74",
  82529. electron: "1.1",
  82530. firefox: "49",
  82531. ios: "10.0",
  82532. node: "6.0",
  82533. opera: "37",
  82534. opera_mobile: "37",
  82535. rhino: "1.7.13",
  82536. safari: "10.0",
  82537. samsung: "5.0"
  82538. },
  82539. "es.symbol.species": {
  82540. android: "51",
  82541. chrome: "51",
  82542. edge: "13",
  82543. electron: "1.2",
  82544. firefox: "41",
  82545. ios: "10.0",
  82546. node: "6.5",
  82547. opera: "38",
  82548. opera_mobile: "38",
  82549. rhino: "1.7.13",
  82550. safari: "10.0",
  82551. samsung: "5.0"
  82552. },
  82553. "es.symbol.split": {
  82554. android: "50",
  82555. chrome: "50",
  82556. edge: "74",
  82557. electron: "1.1",
  82558. firefox: "49",
  82559. ios: "10.0",
  82560. node: "6.0",
  82561. opera: "37",
  82562. opera_mobile: "37",
  82563. rhino: "1.7.13",
  82564. safari: "10.0",
  82565. samsung: "5.0"
  82566. },
  82567. "es.symbol.to-primitive": {
  82568. android: "47",
  82569. chrome: "47",
  82570. edge: "15",
  82571. electron: "0.36",
  82572. firefox: "44",
  82573. ios: "10.0",
  82574. node: "6.0",
  82575. opera: "34",
  82576. opera_mobile: "34",
  82577. rhino: "1.7.13",
  82578. safari: "10.0",
  82579. samsung: "5.0"
  82580. },
  82581. "es.symbol.to-string-tag": {
  82582. android: "49",
  82583. chrome: "49",
  82584. edge: "15",
  82585. electron: "0.37",
  82586. firefox: "51",
  82587. ios: "10.0",
  82588. node: "6.0",
  82589. opera: "36",
  82590. opera_mobile: "36",
  82591. rhino: "1.7.13",
  82592. safari: "10.0",
  82593. samsung: "5.0"
  82594. },
  82595. "es.symbol.unscopables": {
  82596. android: "41",
  82597. chrome: "41",
  82598. edge: "13",
  82599. electron: "0.21",
  82600. firefox: "48",
  82601. ios: "9.0",
  82602. node: "1.0",
  82603. opera: "28",
  82604. opera_mobile: "28",
  82605. rhino: "1.7.13",
  82606. safari: "9.0",
  82607. samsung: "3.4"
  82608. },
  82609. "es.aggregate-error": {
  82610. android: "85",
  82611. chrome: "85",
  82612. edge: "85",
  82613. electron: "10.0",
  82614. firefox: "79",
  82615. ios: "14.0",
  82616. node: "15.0",
  82617. opera: "71",
  82618. opera_mobile: "60",
  82619. safari: "14.0",
  82620. samsung: "14.0"
  82621. },
  82622. "es.array.concat": {
  82623. android: "51",
  82624. chrome: "51",
  82625. edge: "15",
  82626. electron: "1.2",
  82627. firefox: "48",
  82628. ios: "10.0",
  82629. node: "6.5",
  82630. opera: "38",
  82631. opera_mobile: "38",
  82632. safari: "10.0",
  82633. samsung: "5.0"
  82634. },
  82635. "es.array.copy-within": {
  82636. android: "45",
  82637. chrome: "45",
  82638. edge: "12",
  82639. electron: "0.31",
  82640. firefox: "48",
  82641. ios: "9.0",
  82642. node: "4.0",
  82643. opera: "32",
  82644. opera_mobile: "32",
  82645. safari: "9.0",
  82646. samsung: "5.0"
  82647. },
  82648. "es.array.every": {
  82649. android: "4.4",
  82650. chrome: "26",
  82651. edge: "12",
  82652. electron: "0.20",
  82653. firefox: "4",
  82654. ie: "9",
  82655. ios: "9.0",
  82656. node: "0.11.0",
  82657. opera: "16",
  82658. opera_mobile: "16",
  82659. rhino: "1.7.13",
  82660. safari: "8.0",
  82661. samsung: "1.5"
  82662. },
  82663. "es.array.fill": {
  82664. android: "45",
  82665. chrome: "45",
  82666. edge: "12",
  82667. electron: "0.31",
  82668. firefox: "48",
  82669. ios: "9.0",
  82670. node: "4.0",
  82671. opera: "32",
  82672. opera_mobile: "32",
  82673. safari: "9.0",
  82674. samsung: "5.0"
  82675. },
  82676. "es.array.filter": {
  82677. android: "51",
  82678. chrome: "51",
  82679. edge: "15",
  82680. electron: "1.2",
  82681. firefox: "48",
  82682. ios: "10.0",
  82683. node: "6.5",
  82684. opera: "38",
  82685. opera_mobile: "38",
  82686. safari: "10.0",
  82687. samsung: "5.0"
  82688. },
  82689. "es.array.find": {
  82690. android: "45",
  82691. chrome: "45",
  82692. edge: "13",
  82693. electron: "0.31",
  82694. firefox: "48",
  82695. ios: "9.0",
  82696. node: "4.0",
  82697. opera: "32",
  82698. opera_mobile: "32",
  82699. safari: "9.0",
  82700. samsung: "5.0"
  82701. },
  82702. "es.array.find-index": {
  82703. android: "45",
  82704. chrome: "45",
  82705. edge: "13",
  82706. electron: "0.31",
  82707. firefox: "48",
  82708. ios: "9.0",
  82709. node: "4.0",
  82710. opera: "32",
  82711. opera_mobile: "32",
  82712. safari: "9.0",
  82713. samsung: "5.0"
  82714. },
  82715. "es.array.flat": {
  82716. android: "69",
  82717. chrome: "69",
  82718. edge: "74",
  82719. electron: "4.0",
  82720. firefox: "62",
  82721. ios: "12.0",
  82722. node: "11.0",
  82723. opera: "56",
  82724. opera_mobile: "48",
  82725. safari: "12.0",
  82726. samsung: "10.0"
  82727. },
  82728. "es.array.flat-map": {
  82729. android: "69",
  82730. chrome: "69",
  82731. edge: "74",
  82732. electron: "4.0",
  82733. firefox: "62",
  82734. ios: "12.0",
  82735. node: "11.0",
  82736. opera: "56",
  82737. opera_mobile: "48",
  82738. safari: "12.0",
  82739. samsung: "10.0"
  82740. },
  82741. "es.array.for-each": {
  82742. android: "4.4",
  82743. chrome: "26",
  82744. edge: "12",
  82745. electron: "0.20",
  82746. firefox: "4",
  82747. ie: "9",
  82748. ios: "9.0",
  82749. node: "0.11.0",
  82750. opera: "16",
  82751. opera_mobile: "16",
  82752. rhino: "1.7.13",
  82753. safari: "8.0",
  82754. samsung: "1.5"
  82755. },
  82756. "es.array.from": {
  82757. android: "51",
  82758. chrome: "51",
  82759. edge: "15",
  82760. electron: "1.2",
  82761. firefox: "53",
  82762. ios: "9.0",
  82763. node: "6.5",
  82764. opera: "38",
  82765. opera_mobile: "38",
  82766. rhino: "1.7.13",
  82767. safari: "9.0",
  82768. samsung: "5.0"
  82769. },
  82770. "es.array.includes": {
  82771. android: "53",
  82772. chrome: "53",
  82773. edge: "14",
  82774. electron: "1.4",
  82775. firefox: "48",
  82776. ios: "10.0",
  82777. node: "7.0",
  82778. opera: "40",
  82779. opera_mobile: "40",
  82780. safari: "10.0",
  82781. samsung: "6.0"
  82782. },
  82783. "es.array.index-of": {
  82784. android: "51",
  82785. chrome: "51",
  82786. edge: "12",
  82787. electron: "1.2",
  82788. firefox: "4",
  82789. ie: "9",
  82790. ios: "9.0",
  82791. node: "6.5",
  82792. opera: "38",
  82793. opera_mobile: "38",
  82794. rhino: "1.7.13",
  82795. safari: "8.0",
  82796. samsung: "5.0"
  82797. },
  82798. "es.array.is-array": {
  82799. android: "3.0",
  82800. chrome: "5",
  82801. edge: "12",
  82802. electron: "0.20",
  82803. firefox: "4",
  82804. ie: "9",
  82805. ios: "3.2",
  82806. node: "0.1.27",
  82807. opera: "10.50",
  82808. opera_mobile: "10.50",
  82809. phantom: "1.9",
  82810. rhino: "1.7.13",
  82811. safari: "4.0",
  82812. samsung: "1.0"
  82813. },
  82814. "es.array.iterator": {
  82815. android: "66",
  82816. chrome: "66",
  82817. edge: "15",
  82818. electron: "3.0",
  82819. firefox: "60",
  82820. ios: "10.0",
  82821. node: "10.0",
  82822. opera: "53",
  82823. opera_mobile: "47",
  82824. safari: "10.0",
  82825. samsung: "9.0"
  82826. },
  82827. "es.array.join": {
  82828. android: "4.4",
  82829. chrome: "26",
  82830. edge: "13",
  82831. electron: "0.20",
  82832. firefox: "4",
  82833. ios: "8.0",
  82834. node: "0.11.0",
  82835. opera: "16",
  82836. opera_mobile: "16",
  82837. rhino: "1.7.13",
  82838. safari: "7.1",
  82839. samsung: "1.5"
  82840. },
  82841. "es.array.last-index-of": {
  82842. android: "51",
  82843. chrome: "51",
  82844. edge: "12",
  82845. electron: "1.2",
  82846. firefox: "4",
  82847. ie: "9",
  82848. ios: "9.0",
  82849. node: "6.5",
  82850. opera: "38",
  82851. opera_mobile: "38",
  82852. rhino: "1.7.13",
  82853. safari: "8.0",
  82854. samsung: "5.0"
  82855. },
  82856. "es.array.map": {
  82857. android: "51",
  82858. chrome: "51",
  82859. edge: "13",
  82860. electron: "1.2",
  82861. firefox: "50",
  82862. ios: "10.0",
  82863. node: "6.5",
  82864. opera: "38",
  82865. opera_mobile: "38",
  82866. safari: "10.0",
  82867. samsung: "5.0"
  82868. },
  82869. "es.array.of": {
  82870. android: "45",
  82871. chrome: "45",
  82872. edge: "13",
  82873. electron: "0.31",
  82874. firefox: "25",
  82875. ios: "9.0",
  82876. node: "4.0",
  82877. opera: "32",
  82878. opera_mobile: "32",
  82879. rhino: "1.7.13",
  82880. safari: "9.0",
  82881. samsung: "5.0"
  82882. },
  82883. "es.array.reduce": {
  82884. android: "83",
  82885. chrome: "83",
  82886. edge: "12",
  82887. electron: "9.0",
  82888. firefox: "4",
  82889. ie: "9",
  82890. ios: "9.0",
  82891. node: "6.0",
  82892. opera: "69",
  82893. opera_mobile: "59",
  82894. rhino: "1.7.13",
  82895. safari: "8.0",
  82896. samsung: "13.0"
  82897. },
  82898. "es.array.reduce-right": {
  82899. android: "83",
  82900. chrome: "83",
  82901. edge: "12",
  82902. electron: "9.0",
  82903. firefox: "4",
  82904. ie: "9",
  82905. ios: "9.0",
  82906. node: "6.0",
  82907. opera: "69",
  82908. opera_mobile: "59",
  82909. rhino: "1.7.13",
  82910. safari: "8.0",
  82911. samsung: "13.0"
  82912. },
  82913. "es.array.reverse": {
  82914. android: "3.0",
  82915. chrome: "1",
  82916. edge: "12",
  82917. electron: "0.20",
  82918. firefox: "1",
  82919. ie: "5.5",
  82920. ios: "12.2",
  82921. node: "0.0.3",
  82922. opera: "10.50",
  82923. opera_mobile: "10.50",
  82924. rhino: "1.7.13",
  82925. safari: "12.0.2",
  82926. samsung: "1.0"
  82927. },
  82928. "es.array.slice": {
  82929. android: "51",
  82930. chrome: "51",
  82931. edge: "13",
  82932. electron: "1.2",
  82933. firefox: "48",
  82934. ios: "10.0",
  82935. node: "6.5",
  82936. opera: "38",
  82937. opera_mobile: "38",
  82938. safari: "10.0",
  82939. samsung: "5.0"
  82940. },
  82941. "es.array.some": {
  82942. android: "4.4",
  82943. chrome: "26",
  82944. edge: "12",
  82945. electron: "0.20",
  82946. firefox: "4",
  82947. ie: "9",
  82948. ios: "9.0",
  82949. node: "0.11.0",
  82950. opera: "16",
  82951. opera_mobile: "16",
  82952. rhino: "1.7.13",
  82953. safari: "8.0",
  82954. samsung: "1.5"
  82955. },
  82956. "es.array.sort": {
  82957. android: "70",
  82958. chrome: "70",
  82959. edge: "74",
  82960. electron: "5.0",
  82961. firefox: "4",
  82962. ios: "12.0",
  82963. node: "11.0",
  82964. opera: "57",
  82965. opera_mobile: "49",
  82966. safari: "12.0",
  82967. samsung: "10.0"
  82968. },
  82969. "es.array.species": {
  82970. android: "51",
  82971. chrome: "51",
  82972. edge: "13",
  82973. electron: "1.2",
  82974. firefox: "48",
  82975. ios: "10.0",
  82976. node: "6.5",
  82977. opera: "38",
  82978. opera_mobile: "38",
  82979. safari: "10.0",
  82980. samsung: "5.0"
  82981. },
  82982. "es.array.splice": {
  82983. android: "51",
  82984. chrome: "51",
  82985. edge: "13",
  82986. electron: "1.2",
  82987. firefox: "49",
  82988. ios: "10.0",
  82989. node: "6.5",
  82990. opera: "38",
  82991. opera_mobile: "38",
  82992. safari: "10.0",
  82993. samsung: "5.0"
  82994. },
  82995. "es.array.unscopables.flat": {
  82996. android: "73",
  82997. chrome: "73",
  82998. edge: "74",
  82999. electron: "5.0",
  83000. firefox: "67",
  83001. ios: "13.0",
  83002. node: "12.0",
  83003. opera: "60",
  83004. opera_mobile: "52",
  83005. safari: "13",
  83006. samsung: "11.0"
  83007. },
  83008. "es.array.unscopables.flat-map": {
  83009. android: "73",
  83010. chrome: "73",
  83011. edge: "74",
  83012. electron: "5.0",
  83013. firefox: "67",
  83014. ios: "13.0",
  83015. node: "12.0",
  83016. opera: "60",
  83017. opera_mobile: "52",
  83018. safari: "13",
  83019. samsung: "11.0"
  83020. },
  83021. "es.array-buffer.constructor": {
  83022. android: "4.4",
  83023. chrome: "26",
  83024. edge: "14",
  83025. electron: "0.20",
  83026. firefox: "44",
  83027. ios: "12.0",
  83028. node: "0.11.0",
  83029. opera: "16",
  83030. opera_mobile: "16",
  83031. safari: "12.0",
  83032. samsung: "1.5"
  83033. },
  83034. "es.array-buffer.is-view": {
  83035. android: "4.4.3",
  83036. chrome: "32",
  83037. edge: "12",
  83038. electron: "0.20",
  83039. firefox: "29",
  83040. ie: "11",
  83041. ios: "8.0",
  83042. node: "0.11.9",
  83043. opera: "19",
  83044. opera_mobile: "19",
  83045. safari: "7.1",
  83046. samsung: "2.0"
  83047. },
  83048. "es.array-buffer.slice": {
  83049. android: "4.4.3",
  83050. chrome: "31",
  83051. edge: "12",
  83052. electron: "0.20",
  83053. firefox: "46",
  83054. ie: "11",
  83055. ios: "12.2",
  83056. node: "0.11.8",
  83057. opera: "18",
  83058. opera_mobile: "18",
  83059. rhino: "1.7.13",
  83060. safari: "12.1",
  83061. samsung: "2.0"
  83062. },
  83063. "es.data-view": {
  83064. android: "4.4",
  83065. chrome: "26",
  83066. edge: "12",
  83067. electron: "0.20",
  83068. firefox: "15",
  83069. ie: "10",
  83070. ios: "8.0",
  83071. node: "0.11.0",
  83072. opera: "16",
  83073. opera_mobile: "16",
  83074. rhino: "1.7.13",
  83075. safari: "7.1",
  83076. samsung: "1.5"
  83077. },
  83078. "es.date.get-year": {
  83079. android: "3.0",
  83080. chrome: "1",
  83081. edge: "12",
  83082. electron: "0.20",
  83083. firefox: "1",
  83084. ie: "3",
  83085. ios: "1.0",
  83086. node: "0.0.3",
  83087. opera: "3",
  83088. opera_mobile: "3",
  83089. phantom: "1.9",
  83090. rhino: "1.7.13",
  83091. safari: "1",
  83092. samsung: "1.0"
  83093. },
  83094. "es.date.now": {
  83095. android: "3.0",
  83096. chrome: "5",
  83097. edge: "12",
  83098. electron: "0.20",
  83099. firefox: "2",
  83100. ie: "9",
  83101. ios: "3.2",
  83102. node: "0.1.27",
  83103. opera: "10.50",
  83104. opera_mobile: "10.50",
  83105. phantom: "1.9",
  83106. rhino: "1.7.13",
  83107. safari: "4.0",
  83108. samsung: "1.0"
  83109. },
  83110. "es.date.set-year": {
  83111. android: "3.0",
  83112. chrome: "1",
  83113. edge: "12",
  83114. electron: "0.20",
  83115. firefox: "1",
  83116. ie: "3",
  83117. ios: "1.0",
  83118. node: "0.0.3",
  83119. opera: "3",
  83120. opera_mobile: "3",
  83121. phantom: "1.9",
  83122. rhino: "1.7.13",
  83123. safari: "1",
  83124. samsung: "1.0"
  83125. },
  83126. "es.date.to-gmt-string": {
  83127. android: "3.0",
  83128. chrome: "1",
  83129. edge: "12",
  83130. electron: "0.20",
  83131. firefox: "1",
  83132. ie: "3",
  83133. ios: "1.0",
  83134. node: "0.0.3",
  83135. opera: "3",
  83136. opera_mobile: "3",
  83137. phantom: "1.9",
  83138. rhino: "1.7.13",
  83139. safari: "1",
  83140. samsung: "1.0"
  83141. },
  83142. "es.date.to-iso-string": {
  83143. android: "4.4",
  83144. chrome: "26",
  83145. edge: "12",
  83146. electron: "0.20",
  83147. firefox: "7",
  83148. ie: "9",
  83149. ios: "8.0",
  83150. node: "0.11.0",
  83151. opera: "16",
  83152. opera_mobile: "16",
  83153. rhino: "1.7.13",
  83154. safari: "7.1",
  83155. samsung: "1.5"
  83156. },
  83157. "es.date.to-json": {
  83158. android: "4.4",
  83159. chrome: "26",
  83160. edge: "12",
  83161. electron: "0.20",
  83162. firefox: "4",
  83163. ie: "9",
  83164. ios: "10.0",
  83165. node: "0.11.0",
  83166. opera: "16",
  83167. opera_mobile: "16",
  83168. rhino: "1.7.13",
  83169. safari: "10.0",
  83170. samsung: "1.5"
  83171. },
  83172. "es.date.to-primitive": {
  83173. android: "47",
  83174. chrome: "47",
  83175. edge: "15",
  83176. electron: "0.36",
  83177. firefox: "44",
  83178. ios: "10.0",
  83179. node: "6.0",
  83180. opera: "34",
  83181. opera_mobile: "34",
  83182. safari: "10.0",
  83183. samsung: "5.0"
  83184. },
  83185. "es.date.to-string": {
  83186. android: "3.0",
  83187. chrome: "5",
  83188. edge: "12",
  83189. electron: "0.20",
  83190. firefox: "2",
  83191. ie: "9",
  83192. ios: "2.0",
  83193. node: "0.1.27",
  83194. opera: "10.50",
  83195. opera_mobile: "10.50",
  83196. phantom: "1.9",
  83197. rhino: "1.7.13",
  83198. safari: "3.1",
  83199. samsung: "1.0"
  83200. },
  83201. "es.escape": {
  83202. android: "3.0",
  83203. chrome: "1",
  83204. edge: "12",
  83205. electron: "0.20",
  83206. firefox: "1",
  83207. ie: "3",
  83208. ios: "1.0",
  83209. node: "0.0.3",
  83210. opera: "3",
  83211. opera_mobile: "3",
  83212. phantom: "1.9",
  83213. rhino: "1.7.13",
  83214. safari: "1",
  83215. samsung: "1.0"
  83216. },
  83217. "es.function.bind": {
  83218. android: "3.0",
  83219. chrome: "7",
  83220. edge: "12",
  83221. electron: "0.20",
  83222. firefox: "4",
  83223. ie: "9",
  83224. ios: "5.1",
  83225. node: "0.1.101",
  83226. opera: "12",
  83227. opera_mobile: "12",
  83228. phantom: "2.0",
  83229. rhino: "1.7.13",
  83230. safari: "5.1",
  83231. samsung: "1.0"
  83232. },
  83233. "es.function.has-instance": {
  83234. android: "51",
  83235. chrome: "51",
  83236. edge: "15",
  83237. electron: "1.2",
  83238. firefox: "50",
  83239. ios: "10.0",
  83240. node: "6.5",
  83241. opera: "38",
  83242. opera_mobile: "38",
  83243. safari: "10.0",
  83244. samsung: "5.0"
  83245. },
  83246. "es.function.name": {
  83247. android: "3.0",
  83248. chrome: "5",
  83249. edge: "12",
  83250. electron: "0.20",
  83251. firefox: "2",
  83252. ios: "3.2",
  83253. node: "0.1.27",
  83254. opera: "10.50",
  83255. opera_mobile: "10.50",
  83256. phantom: "1.9",
  83257. rhino: "1.7.13",
  83258. safari: "4.0",
  83259. samsung: "1.0"
  83260. },
  83261. "es.global-this": {
  83262. android: "71",
  83263. chrome: "71",
  83264. edge: "74",
  83265. electron: "5.0",
  83266. firefox: "65",
  83267. ios: "12.2",
  83268. node: "12.0",
  83269. opera: "58",
  83270. opera_mobile: "50",
  83271. safari: "12.1",
  83272. samsung: "10.0"
  83273. },
  83274. "es.json.stringify": {
  83275. android: "72",
  83276. chrome: "72",
  83277. edge: "74",
  83278. electron: "5.0",
  83279. firefox: "64",
  83280. ios: "12.2",
  83281. node: "12.0",
  83282. opera: "59",
  83283. opera_mobile: "51",
  83284. safari: "12.1",
  83285. samsung: "11.0"
  83286. },
  83287. "es.json.to-string-tag": {
  83288. android: "50",
  83289. chrome: "50",
  83290. edge: "15",
  83291. electron: "1.1",
  83292. firefox: "51",
  83293. ios: "10.0",
  83294. node: "6.0",
  83295. opera: "37",
  83296. opera_mobile: "37",
  83297. safari: "10.0",
  83298. samsung: "5.0"
  83299. },
  83300. "es.map": {
  83301. android: "51",
  83302. chrome: "51",
  83303. edge: "15",
  83304. electron: "1.2",
  83305. firefox: "53",
  83306. ios: "10.0",
  83307. node: "6.5",
  83308. opera: "38",
  83309. opera_mobile: "38",
  83310. rhino: "1.7.13",
  83311. safari: "10.0",
  83312. samsung: "5.0"
  83313. },
  83314. "es.math.acosh": {
  83315. android: "54",
  83316. chrome: "54",
  83317. edge: "13",
  83318. electron: "1.4",
  83319. firefox: "25",
  83320. ios: "8.0",
  83321. node: "7.0",
  83322. opera: "41",
  83323. opera_mobile: "41",
  83324. safari: "7.1",
  83325. samsung: "6.0"
  83326. },
  83327. "es.math.asinh": {
  83328. android: "38",
  83329. chrome: "38",
  83330. edge: "13",
  83331. electron: "0.20",
  83332. firefox: "25",
  83333. ios: "8.0",
  83334. node: "0.11.15",
  83335. opera: "25",
  83336. opera_mobile: "25",
  83337. rhino: "1.7.13",
  83338. safari: "7.1",
  83339. samsung: "3.0"
  83340. },
  83341. "es.math.atanh": {
  83342. android: "38",
  83343. chrome: "38",
  83344. edge: "13",
  83345. electron: "0.20",
  83346. firefox: "25",
  83347. ios: "8.0",
  83348. node: "0.11.15",
  83349. opera: "25",
  83350. opera_mobile: "25",
  83351. rhino: "1.7.13",
  83352. safari: "7.1",
  83353. samsung: "3.0"
  83354. },
  83355. "es.math.cbrt": {
  83356. android: "38",
  83357. chrome: "38",
  83358. edge: "12",
  83359. electron: "0.20",
  83360. firefox: "25",
  83361. ios: "8.0",
  83362. node: "0.11.15",
  83363. opera: "25",
  83364. opera_mobile: "25",
  83365. rhino: "1.7.13",
  83366. safari: "7.1",
  83367. samsung: "3.0"
  83368. },
  83369. "es.math.clz32": {
  83370. android: "38",
  83371. chrome: "38",
  83372. edge: "12",
  83373. electron: "0.20",
  83374. firefox: "31",
  83375. ios: "9.0",
  83376. node: "0.11.15",
  83377. opera: "25",
  83378. opera_mobile: "25",
  83379. rhino: "1.7.13",
  83380. safari: "9.0",
  83381. samsung: "3.0"
  83382. },
  83383. "es.math.cosh": {
  83384. android: "39",
  83385. chrome: "39",
  83386. edge: "13",
  83387. electron: "0.20",
  83388. firefox: "25",
  83389. ios: "8.0",
  83390. node: "1.0",
  83391. opera: "26",
  83392. opera_mobile: "26",
  83393. rhino: "1.7.13",
  83394. safari: "7.1",
  83395. samsung: "3.4"
  83396. },
  83397. "es.math.expm1": {
  83398. android: "39",
  83399. chrome: "39",
  83400. edge: "13",
  83401. electron: "0.20",
  83402. firefox: "46",
  83403. ios: "8.0",
  83404. node: "1.0",
  83405. opera: "26",
  83406. opera_mobile: "26",
  83407. rhino: "1.7.13",
  83408. safari: "7.1",
  83409. samsung: "3.4"
  83410. },
  83411. "es.math.fround": {
  83412. android: "38",
  83413. chrome: "38",
  83414. edge: "12",
  83415. electron: "0.20",
  83416. firefox: "26",
  83417. ios: "8.0",
  83418. node: "0.11.15",
  83419. opera: "25",
  83420. opera_mobile: "25",
  83421. rhino: "1.7.13",
  83422. safari: "7.1",
  83423. samsung: "3.0"
  83424. },
  83425. "es.math.hypot": {
  83426. android: "78",
  83427. chrome: "78",
  83428. edge: "12",
  83429. electron: "7.0",
  83430. firefox: "27",
  83431. ios: "8.0",
  83432. node: "13.0",
  83433. opera: "65",
  83434. opera_mobile: "56",
  83435. rhino: "1.7.13",
  83436. safari: "7.1",
  83437. samsung: "12.0"
  83438. },
  83439. "es.math.imul": {
  83440. android: "4.4",
  83441. chrome: "28",
  83442. edge: "13",
  83443. electron: "0.20",
  83444. firefox: "20",
  83445. ios: "9.0",
  83446. node: "0.11.1",
  83447. opera: "16",
  83448. opera_mobile: "16",
  83449. rhino: "1.7.13",
  83450. safari: "9.0",
  83451. samsung: "1.5"
  83452. },
  83453. "es.math.log10": {
  83454. android: "38",
  83455. chrome: "38",
  83456. edge: "12",
  83457. electron: "0.20",
  83458. firefox: "25",
  83459. ios: "8.0",
  83460. node: "0.11.15",
  83461. opera: "25",
  83462. opera_mobile: "25",
  83463. rhino: "1.7.13",
  83464. safari: "7.1",
  83465. samsung: "3.0"
  83466. },
  83467. "es.math.log1p": {
  83468. android: "38",
  83469. chrome: "38",
  83470. edge: "12",
  83471. electron: "0.20",
  83472. firefox: "25",
  83473. ios: "8.0",
  83474. node: "0.11.15",
  83475. opera: "25",
  83476. opera_mobile: "25",
  83477. rhino: "1.7.13",
  83478. safari: "7.1",
  83479. samsung: "3.0"
  83480. },
  83481. "es.math.log2": {
  83482. android: "38",
  83483. chrome: "38",
  83484. edge: "12",
  83485. electron: "0.20",
  83486. firefox: "25",
  83487. ios: "8.0",
  83488. node: "0.11.15",
  83489. opera: "25",
  83490. opera_mobile: "25",
  83491. rhino: "1.7.13",
  83492. safari: "7.1",
  83493. samsung: "3.0"
  83494. },
  83495. "es.math.sign": {
  83496. android: "38",
  83497. chrome: "38",
  83498. edge: "12",
  83499. electron: "0.20",
  83500. firefox: "25",
  83501. ios: "9.0",
  83502. node: "0.11.15",
  83503. opera: "25",
  83504. opera_mobile: "25",
  83505. rhino: "1.7.13",
  83506. safari: "9.0",
  83507. samsung: "3.0"
  83508. },
  83509. "es.math.sinh": {
  83510. android: "39",
  83511. chrome: "39",
  83512. edge: "13",
  83513. electron: "0.20",
  83514. firefox: "25",
  83515. ios: "8.0",
  83516. node: "1.0",
  83517. opera: "26",
  83518. opera_mobile: "26",
  83519. rhino: "1.7.13",
  83520. safari: "7.1",
  83521. samsung: "3.4"
  83522. },
  83523. "es.math.tanh": {
  83524. android: "38",
  83525. chrome: "38",
  83526. edge: "12",
  83527. electron: "0.20",
  83528. firefox: "25",
  83529. ios: "8.0",
  83530. node: "0.11.15",
  83531. opera: "25",
  83532. opera_mobile: "25",
  83533. rhino: "1.7.13",
  83534. safari: "7.1",
  83535. samsung: "3.0"
  83536. },
  83537. "es.math.to-string-tag": {
  83538. android: "50",
  83539. chrome: "50",
  83540. edge: "15",
  83541. electron: "1.1",
  83542. firefox: "51",
  83543. ios: "10.0",
  83544. node: "6.0",
  83545. opera: "37",
  83546. opera_mobile: "37",
  83547. safari: "10.0",
  83548. samsung: "5.0"
  83549. },
  83550. "es.math.trunc": {
  83551. android: "38",
  83552. chrome: "38",
  83553. edge: "12",
  83554. electron: "0.20",
  83555. firefox: "25",
  83556. ios: "8.0",
  83557. node: "0.11.15",
  83558. opera: "25",
  83559. opera_mobile: "25",
  83560. rhino: "1.7.13",
  83561. safari: "7.1",
  83562. samsung: "3.0"
  83563. },
  83564. "es.number.constructor": {
  83565. android: "41",
  83566. chrome: "41",
  83567. edge: "13",
  83568. electron: "0.21",
  83569. firefox: "46",
  83570. ios: "9.0",
  83571. node: "1.0",
  83572. opera: "28",
  83573. opera_mobile: "28",
  83574. rhino: "1.7.13",
  83575. safari: "9.0",
  83576. samsung: "3.4"
  83577. },
  83578. "es.number.epsilon": {
  83579. android: "37",
  83580. chrome: "34",
  83581. edge: "12",
  83582. electron: "0.20",
  83583. firefox: "25",
  83584. ios: "9.0",
  83585. node: "0.11.13",
  83586. opera: "21",
  83587. opera_mobile: "21",
  83588. safari: "9.0",
  83589. samsung: "2.0"
  83590. },
  83591. "es.number.is-finite": {
  83592. android: "4.1",
  83593. chrome: "19",
  83594. edge: "12",
  83595. electron: "0.20",
  83596. firefox: "16",
  83597. ios: "9.0",
  83598. node: "0.7.3",
  83599. opera: "15",
  83600. opera_mobile: "15",
  83601. rhino: "1.7.13",
  83602. safari: "9.0",
  83603. samsung: "1.5"
  83604. },
  83605. "es.number.is-integer": {
  83606. android: "37",
  83607. chrome: "34",
  83608. edge: "12",
  83609. electron: "0.20",
  83610. firefox: "16",
  83611. ios: "9.0",
  83612. node: "0.11.13",
  83613. opera: "21",
  83614. opera_mobile: "21",
  83615. rhino: "1.7.13",
  83616. safari: "9.0",
  83617. samsung: "2.0"
  83618. },
  83619. "es.number.is-nan": {
  83620. android: "4.1",
  83621. chrome: "19",
  83622. edge: "12",
  83623. electron: "0.20",
  83624. firefox: "15",
  83625. ios: "9.0",
  83626. node: "0.7.3",
  83627. opera: "15",
  83628. opera_mobile: "15",
  83629. rhino: "1.7.13",
  83630. safari: "9.0",
  83631. samsung: "1.5"
  83632. },
  83633. "es.number.is-safe-integer": {
  83634. android: "37",
  83635. chrome: "34",
  83636. edge: "12",
  83637. electron: "0.20",
  83638. firefox: "32",
  83639. ios: "9.0",
  83640. node: "0.11.13",
  83641. opera: "21",
  83642. opera_mobile: "21",
  83643. rhino: "1.7.13",
  83644. safari: "9.0",
  83645. samsung: "2.0"
  83646. },
  83647. "es.number.max-safe-integer": {
  83648. android: "37",
  83649. chrome: "34",
  83650. edge: "12",
  83651. electron: "0.20",
  83652. firefox: "31",
  83653. ios: "9.0",
  83654. node: "0.11.13",
  83655. opera: "21",
  83656. opera_mobile: "21",
  83657. rhino: "1.7.13",
  83658. safari: "9.0",
  83659. samsung: "2.0"
  83660. },
  83661. "es.number.min-safe-integer": {
  83662. android: "37",
  83663. chrome: "34",
  83664. edge: "12",
  83665. electron: "0.20",
  83666. firefox: "31",
  83667. ios: "9.0",
  83668. node: "0.11.13",
  83669. opera: "21",
  83670. opera_mobile: "21",
  83671. rhino: "1.7.13",
  83672. safari: "9.0",
  83673. samsung: "2.0"
  83674. },
  83675. "es.number.parse-float": {
  83676. android: "37",
  83677. chrome: "35",
  83678. edge: "13",
  83679. electron: "0.20",
  83680. firefox: "39",
  83681. ios: "11.0",
  83682. node: "0.11.13",
  83683. opera: "22",
  83684. opera_mobile: "22",
  83685. safari: "11.0",
  83686. samsung: "3.0"
  83687. },
  83688. "es.number.parse-int": {
  83689. android: "37",
  83690. chrome: "35",
  83691. edge: "13",
  83692. electron: "0.20",
  83693. firefox: "39",
  83694. ios: "9.0",
  83695. node: "0.11.13",
  83696. opera: "22",
  83697. opera_mobile: "22",
  83698. safari: "9.0",
  83699. samsung: "3.0"
  83700. },
  83701. "es.number.to-fixed": {
  83702. android: "4.4",
  83703. chrome: "26",
  83704. edge: "74",
  83705. electron: "0.20",
  83706. firefox: "4",
  83707. ios: "8.0",
  83708. node: "0.11.0",
  83709. opera: "16",
  83710. opera_mobile: "16",
  83711. rhino: "1.7.13",
  83712. safari: "7.1",
  83713. samsung: "1.5"
  83714. },
  83715. "es.number.to-precision": {
  83716. android: "4.4",
  83717. chrome: "26",
  83718. edge: "12",
  83719. electron: "0.20",
  83720. firefox: "4",
  83721. ie: "8",
  83722. ios: "8.0",
  83723. node: "0.11.0",
  83724. opera: "16",
  83725. opera_mobile: "16",
  83726. rhino: "1.7.13",
  83727. safari: "7.1",
  83728. samsung: "1.5"
  83729. },
  83730. "es.object.assign": {
  83731. android: "49",
  83732. chrome: "49",
  83733. edge: "74",
  83734. electron: "0.37",
  83735. firefox: "36",
  83736. ios: "9.0",
  83737. node: "6.0",
  83738. opera: "36",
  83739. opera_mobile: "36",
  83740. safari: "9.0",
  83741. samsung: "5.0"
  83742. },
  83743. "es.object.create": {
  83744. android: "3.0",
  83745. chrome: "5",
  83746. edge: "12",
  83747. electron: "0.20",
  83748. firefox: "4",
  83749. ie: "9",
  83750. ios: "3.2",
  83751. node: "0.1.27",
  83752. opera: "12",
  83753. opera_mobile: "12",
  83754. phantom: "1.9",
  83755. rhino: "1.7.13",
  83756. safari: "4.0",
  83757. samsung: "1.0"
  83758. },
  83759. "es.object.define-getter": {
  83760. android: "62",
  83761. chrome: "62",
  83762. edge: "16",
  83763. electron: "3.0",
  83764. firefox: "48",
  83765. ios: "8.0",
  83766. node: "8.10",
  83767. opera: "49",
  83768. opera_mobile: "46",
  83769. rhino: "1.7.13",
  83770. safari: "7.1",
  83771. samsung: "8.0"
  83772. },
  83773. "es.object.define-properties": {
  83774. android: "3.0",
  83775. chrome: "5",
  83776. edge: "12",
  83777. electron: "0.20",
  83778. firefox: "4",
  83779. ie: "9",
  83780. ios: "5.1",
  83781. node: "0.1.27",
  83782. opera: "12",
  83783. opera_mobile: "12",
  83784. phantom: "2.0",
  83785. rhino: "1.7.13",
  83786. safari: "5.1",
  83787. samsung: "1.0"
  83788. },
  83789. "es.object.define-property": {
  83790. android: "3.0",
  83791. chrome: "5",
  83792. edge: "12",
  83793. electron: "0.20",
  83794. firefox: "4",
  83795. ie: "9",
  83796. ios: "5.1",
  83797. node: "0.1.27",
  83798. opera: "12",
  83799. opera_mobile: "12",
  83800. phantom: "2.0",
  83801. rhino: "1.7.13",
  83802. safari: "5.1",
  83803. samsung: "1.0"
  83804. },
  83805. "es.object.define-setter": {
  83806. android: "62",
  83807. chrome: "62",
  83808. edge: "16",
  83809. electron: "3.0",
  83810. firefox: "48",
  83811. ios: "8.0",
  83812. node: "8.10",
  83813. opera: "49",
  83814. opera_mobile: "46",
  83815. rhino: "1.7.13",
  83816. safari: "7.1",
  83817. samsung: "8.0"
  83818. },
  83819. "es.object.entries": {
  83820. android: "54",
  83821. chrome: "54",
  83822. edge: "14",
  83823. electron: "1.4",
  83824. firefox: "47",
  83825. ios: "10.3",
  83826. node: "7.0",
  83827. opera: "41",
  83828. opera_mobile: "41",
  83829. safari: "10.1",
  83830. samsung: "6.0"
  83831. },
  83832. "es.object.freeze": {
  83833. android: "44",
  83834. chrome: "44",
  83835. edge: "13",
  83836. electron: "0.30",
  83837. firefox: "35",
  83838. ios: "9.0",
  83839. node: "3.0",
  83840. opera: "31",
  83841. opera_mobile: "31",
  83842. rhino: "1.7.13",
  83843. safari: "9.0",
  83844. samsung: "4.0"
  83845. },
  83846. "es.object.from-entries": {
  83847. android: "73",
  83848. chrome: "73",
  83849. edge: "74",
  83850. electron: "5.0",
  83851. firefox: "63",
  83852. ios: "12.2",
  83853. node: "12.0",
  83854. opera: "60",
  83855. opera_mobile: "52",
  83856. safari: "12.1",
  83857. samsung: "11.0"
  83858. },
  83859. "es.object.get-own-property-descriptor": {
  83860. android: "44",
  83861. chrome: "44",
  83862. edge: "13",
  83863. electron: "0.30",
  83864. firefox: "35",
  83865. ios: "9.0",
  83866. node: "3.0",
  83867. opera: "31",
  83868. opera_mobile: "31",
  83869. rhino: "1.7.13",
  83870. safari: "9.0",
  83871. samsung: "4.0"
  83872. },
  83873. "es.object.get-own-property-descriptors": {
  83874. android: "54",
  83875. chrome: "54",
  83876. edge: "15",
  83877. electron: "1.4",
  83878. firefox: "50",
  83879. ios: "10.0",
  83880. node: "7.0",
  83881. opera: "41",
  83882. opera_mobile: "41",
  83883. safari: "10.0",
  83884. samsung: "6.0"
  83885. },
  83886. "es.object.get-own-property-names": {
  83887. android: "40",
  83888. chrome: "40",
  83889. edge: "13",
  83890. electron: "0.21",
  83891. firefox: "34",
  83892. ios: "9.0",
  83893. node: "1.0",
  83894. opera: "27",
  83895. opera_mobile: "27",
  83896. rhino: "1.7.13",
  83897. safari: "9.0",
  83898. samsung: "3.4"
  83899. },
  83900. "es.object.get-prototype-of": {
  83901. android: "44",
  83902. chrome: "44",
  83903. edge: "13",
  83904. electron: "0.30",
  83905. firefox: "35",
  83906. ios: "9.0",
  83907. node: "3.0",
  83908. opera: "31",
  83909. opera_mobile: "31",
  83910. rhino: "1.7.13",
  83911. safari: "9.0",
  83912. samsung: "4.0"
  83913. },
  83914. "es.object.is": {
  83915. android: "4.1",
  83916. chrome: "19",
  83917. edge: "12",
  83918. electron: "0.20",
  83919. firefox: "22",
  83920. ios: "9.0",
  83921. node: "0.7.3",
  83922. opera: "15",
  83923. opera_mobile: "15",
  83924. rhino: "1.7.13",
  83925. safari: "9.0",
  83926. samsung: "1.5"
  83927. },
  83928. "es.object.is-extensible": {
  83929. android: "44",
  83930. chrome: "44",
  83931. edge: "13",
  83932. electron: "0.30",
  83933. firefox: "35",
  83934. ios: "9.0",
  83935. node: "3.0",
  83936. opera: "31",
  83937. opera_mobile: "31",
  83938. rhino: "1.7.13",
  83939. safari: "9.0",
  83940. samsung: "4.0"
  83941. },
  83942. "es.object.is-frozen": {
  83943. android: "44",
  83944. chrome: "44",
  83945. edge: "13",
  83946. electron: "0.30",
  83947. firefox: "35",
  83948. ios: "9.0",
  83949. node: "3.0",
  83950. opera: "31",
  83951. opera_mobile: "31",
  83952. rhino: "1.7.13",
  83953. safari: "9.0",
  83954. samsung: "4.0"
  83955. },
  83956. "es.object.is-sealed": {
  83957. android: "44",
  83958. chrome: "44",
  83959. edge: "13",
  83960. electron: "0.30",
  83961. firefox: "35",
  83962. ios: "9.0",
  83963. node: "3.0",
  83964. opera: "31",
  83965. opera_mobile: "31",
  83966. rhino: "1.7.13",
  83967. safari: "9.0",
  83968. samsung: "4.0"
  83969. },
  83970. "es.object.keys": {
  83971. android: "40",
  83972. chrome: "40",
  83973. edge: "13",
  83974. electron: "0.21",
  83975. firefox: "35",
  83976. ios: "9.0",
  83977. node: "1.0",
  83978. opera: "27",
  83979. opera_mobile: "27",
  83980. rhino: "1.7.13",
  83981. safari: "9.0",
  83982. samsung: "3.4"
  83983. },
  83984. "es.object.lookup-getter": {
  83985. android: "62",
  83986. chrome: "62",
  83987. edge: "16",
  83988. electron: "3.0",
  83989. firefox: "48",
  83990. ios: "8.0",
  83991. node: "8.10",
  83992. opera: "49",
  83993. opera_mobile: "46",
  83994. rhino: "1.7.13",
  83995. safari: "7.1",
  83996. samsung: "8.0"
  83997. },
  83998. "es.object.lookup-setter": {
  83999. android: "62",
  84000. chrome: "62",
  84001. edge: "16",
  84002. electron: "3.0",
  84003. firefox: "48",
  84004. ios: "8.0",
  84005. node: "8.10",
  84006. opera: "49",
  84007. opera_mobile: "46",
  84008. rhino: "1.7.13",
  84009. safari: "7.1",
  84010. samsung: "8.0"
  84011. },
  84012. "es.object.prevent-extensions": {
  84013. android: "44",
  84014. chrome: "44",
  84015. edge: "13",
  84016. electron: "0.30",
  84017. firefox: "35",
  84018. ios: "9.0",
  84019. node: "3.0",
  84020. opera: "31",
  84021. opera_mobile: "31",
  84022. rhino: "1.7.13",
  84023. safari: "9.0",
  84024. samsung: "4.0"
  84025. },
  84026. "es.object.seal": {
  84027. android: "44",
  84028. chrome: "44",
  84029. edge: "13",
  84030. electron: "0.30",
  84031. firefox: "35",
  84032. ios: "9.0",
  84033. node: "3.0",
  84034. opera: "31",
  84035. opera_mobile: "31",
  84036. rhino: "1.7.13",
  84037. safari: "9.0",
  84038. samsung: "4.0"
  84039. },
  84040. "es.object.set-prototype-of": {
  84041. android: "37",
  84042. chrome: "34",
  84043. edge: "12",
  84044. electron: "0.20",
  84045. firefox: "31",
  84046. ie: "11",
  84047. ios: "9.0",
  84048. node: "0.11.13",
  84049. opera: "21",
  84050. opera_mobile: "21",
  84051. rhino: "1.7.13",
  84052. safari: "9.0",
  84053. samsung: "2.0"
  84054. },
  84055. "es.object.to-string": {
  84056. android: "49",
  84057. chrome: "49",
  84058. edge: "15",
  84059. electron: "0.37",
  84060. firefox: "51",
  84061. ios: "10.0",
  84062. node: "6.0",
  84063. opera: "36",
  84064. opera_mobile: "36",
  84065. safari: "10.0",
  84066. samsung: "5.0"
  84067. },
  84068. "es.object.values": {
  84069. android: "54",
  84070. chrome: "54",
  84071. edge: "14",
  84072. electron: "1.4",
  84073. firefox: "47",
  84074. ios: "10.3",
  84075. node: "7.0",
  84076. opera: "41",
  84077. opera_mobile: "41",
  84078. safari: "10.1",
  84079. samsung: "6.0"
  84080. },
  84081. "es.parse-float": {
  84082. android: "37",
  84083. chrome: "35",
  84084. edge: "12",
  84085. electron: "0.20",
  84086. firefox: "8",
  84087. ie: "8",
  84088. ios: "8.0",
  84089. node: "0.11.13",
  84090. opera: "22",
  84091. opera_mobile: "22",
  84092. rhino: "1.7.13",
  84093. safari: "7.1",
  84094. samsung: "3.0"
  84095. },
  84096. "es.parse-int": {
  84097. android: "37",
  84098. chrome: "35",
  84099. edge: "12",
  84100. electron: "0.20",
  84101. firefox: "21",
  84102. ie: "9",
  84103. ios: "8.0",
  84104. node: "0.11.13",
  84105. opera: "22",
  84106. opera_mobile: "22",
  84107. rhino: "1.7.13",
  84108. safari: "7.1",
  84109. samsung: "3.0"
  84110. },
  84111. "es.promise": {
  84112. android: "67",
  84113. chrome: "67",
  84114. edge: "74",
  84115. electron: "4.0",
  84116. firefox: "69",
  84117. ios: "11.0",
  84118. node: "10.4",
  84119. opera: "54",
  84120. opera_mobile: "48",
  84121. safari: "11.0",
  84122. samsung: "9.0"
  84123. },
  84124. "es.promise.all-settled": {
  84125. android: "76",
  84126. chrome: "76",
  84127. edge: "76",
  84128. electron: "6.0",
  84129. firefox: "71",
  84130. ios: "13.0",
  84131. node: "12.9",
  84132. opera: "63",
  84133. opera_mobile: "54",
  84134. safari: "13",
  84135. samsung: "12.0"
  84136. },
  84137. "es.promise.any": {
  84138. android: "85",
  84139. chrome: "85",
  84140. edge: "85",
  84141. electron: "10.0",
  84142. firefox: "79",
  84143. ios: "14.0",
  84144. node: "15.0",
  84145. opera: "71",
  84146. opera_mobile: "60",
  84147. safari: "14.0",
  84148. samsung: "14.0"
  84149. },
  84150. "es.promise.finally": {
  84151. android: "67",
  84152. chrome: "67",
  84153. edge: "74",
  84154. electron: "4.0",
  84155. firefox: "69",
  84156. ios: "13.2.3",
  84157. node: "10.4",
  84158. opera: "54",
  84159. opera_mobile: "48",
  84160. safari: "13.0.3",
  84161. samsung: "9.0"
  84162. },
  84163. "es.reflect.apply": {
  84164. android: "49",
  84165. chrome: "49",
  84166. edge: "15",
  84167. electron: "0.37",
  84168. firefox: "42",
  84169. ios: "10.0",
  84170. node: "6.0",
  84171. opera: "36",
  84172. opera_mobile: "36",
  84173. safari: "10.0",
  84174. samsung: "5.0"
  84175. },
  84176. "es.reflect.construct": {
  84177. android: "49",
  84178. chrome: "49",
  84179. edge: "15",
  84180. electron: "0.37",
  84181. firefox: "44",
  84182. ios: "10.0",
  84183. node: "6.0",
  84184. opera: "36",
  84185. opera_mobile: "36",
  84186. safari: "10.0",
  84187. samsung: "5.0"
  84188. },
  84189. "es.reflect.define-property": {
  84190. android: "49",
  84191. chrome: "49",
  84192. edge: "13",
  84193. electron: "0.37",
  84194. firefox: "42",
  84195. ios: "10.0",
  84196. node: "6.0",
  84197. opera: "36",
  84198. opera_mobile: "36",
  84199. safari: "10.0",
  84200. samsung: "5.0"
  84201. },
  84202. "es.reflect.delete-property": {
  84203. android: "49",
  84204. chrome: "49",
  84205. edge: "12",
  84206. electron: "0.37",
  84207. firefox: "42",
  84208. ios: "10.0",
  84209. node: "6.0",
  84210. opera: "36",
  84211. opera_mobile: "36",
  84212. safari: "10.0",
  84213. samsung: "5.0"
  84214. },
  84215. "es.reflect.get": {
  84216. android: "49",
  84217. chrome: "49",
  84218. edge: "12",
  84219. electron: "0.37",
  84220. firefox: "42",
  84221. ios: "10.0",
  84222. node: "6.0",
  84223. opera: "36",
  84224. opera_mobile: "36",
  84225. safari: "10.0",
  84226. samsung: "5.0"
  84227. },
  84228. "es.reflect.get-own-property-descriptor": {
  84229. android: "49",
  84230. chrome: "49",
  84231. edge: "12",
  84232. electron: "0.37",
  84233. firefox: "42",
  84234. ios: "10.0",
  84235. node: "6.0",
  84236. opera: "36",
  84237. opera_mobile: "36",
  84238. safari: "10.0",
  84239. samsung: "5.0"
  84240. },
  84241. "es.reflect.get-prototype-of": {
  84242. android: "49",
  84243. chrome: "49",
  84244. edge: "12",
  84245. electron: "0.37",
  84246. firefox: "42",
  84247. ios: "10.0",
  84248. node: "6.0",
  84249. opera: "36",
  84250. opera_mobile: "36",
  84251. safari: "10.0",
  84252. samsung: "5.0"
  84253. },
  84254. "es.reflect.has": {
  84255. android: "49",
  84256. chrome: "49",
  84257. edge: "12",
  84258. electron: "0.37",
  84259. firefox: "42",
  84260. ios: "10.0",
  84261. node: "6.0",
  84262. opera: "36",
  84263. opera_mobile: "36",
  84264. safari: "10.0",
  84265. samsung: "5.0"
  84266. },
  84267. "es.reflect.is-extensible": {
  84268. android: "49",
  84269. chrome: "49",
  84270. edge: "12",
  84271. electron: "0.37",
  84272. firefox: "42",
  84273. ios: "10.0",
  84274. node: "6.0",
  84275. opera: "36",
  84276. opera_mobile: "36",
  84277. safari: "10.0",
  84278. samsung: "5.0"
  84279. },
  84280. "es.reflect.own-keys": {
  84281. android: "49",
  84282. chrome: "49",
  84283. edge: "12",
  84284. electron: "0.37",
  84285. firefox: "42",
  84286. ios: "10.0",
  84287. node: "6.0",
  84288. opera: "36",
  84289. opera_mobile: "36",
  84290. safari: "10.0",
  84291. samsung: "5.0"
  84292. },
  84293. "es.reflect.prevent-extensions": {
  84294. android: "49",
  84295. chrome: "49",
  84296. edge: "12",
  84297. electron: "0.37",
  84298. firefox: "42",
  84299. ios: "10.0",
  84300. node: "6.0",
  84301. opera: "36",
  84302. opera_mobile: "36",
  84303. safari: "10.0",
  84304. samsung: "5.0"
  84305. },
  84306. "es.reflect.set": {
  84307. android: "49",
  84308. chrome: "49",
  84309. edge: "74",
  84310. electron: "0.37",
  84311. firefox: "42",
  84312. ios: "10.0",
  84313. node: "6.0",
  84314. opera: "36",
  84315. opera_mobile: "36",
  84316. safari: "10.0",
  84317. samsung: "5.0"
  84318. },
  84319. "es.reflect.set-prototype-of": {
  84320. android: "49",
  84321. chrome: "49",
  84322. edge: "12",
  84323. electron: "0.37",
  84324. firefox: "42",
  84325. ios: "10.0",
  84326. node: "6.0",
  84327. opera: "36",
  84328. opera_mobile: "36",
  84329. safari: "10.0",
  84330. samsung: "5.0"
  84331. },
  84332. "es.reflect.to-string-tag": {
  84333. android: "86",
  84334. chrome: "86",
  84335. edge: "86",
  84336. electron: "11.0",
  84337. firefox: "82",
  84338. ios: "14.0",
  84339. node: "15.0",
  84340. opera: "72",
  84341. opera_mobile: "61",
  84342. safari: "14.0",
  84343. samsung: "14.0"
  84344. },
  84345. "es.regexp.constructor": {
  84346. android: "64",
  84347. chrome: "64",
  84348. edge: "74",
  84349. electron: "3.0",
  84350. firefox: "78",
  84351. ios: "11.3",
  84352. node: "10.0",
  84353. opera: "51",
  84354. opera_mobile: "47",
  84355. safari: "11.1",
  84356. samsung: "9.0"
  84357. },
  84358. "es.regexp.dot-all": {
  84359. android: "62",
  84360. chrome: "62",
  84361. edge: "74",
  84362. electron: "3.0",
  84363. firefox: "78",
  84364. ios: "11.3",
  84365. node: "8.10",
  84366. opera: "49",
  84367. opera_mobile: "46",
  84368. safari: "11.1",
  84369. samsung: "8.0"
  84370. },
  84371. "es.regexp.exec": {
  84372. android: "64",
  84373. chrome: "64",
  84374. edge: "74",
  84375. electron: "3.0",
  84376. firefox: "78",
  84377. ios: "11.3",
  84378. node: "10.0",
  84379. opera: "51",
  84380. opera_mobile: "47",
  84381. safari: "11.1",
  84382. samsung: "9.0"
  84383. },
  84384. "es.regexp.flags": {
  84385. android: "62",
  84386. chrome: "62",
  84387. edge: "74",
  84388. electron: "3.0",
  84389. firefox: "78",
  84390. ios: "11.3",
  84391. node: "8.10",
  84392. opera: "49",
  84393. opera_mobile: "46",
  84394. safari: "11.1",
  84395. samsung: "8.0"
  84396. },
  84397. "es.regexp.sticky": {
  84398. android: "49",
  84399. chrome: "49",
  84400. edge: "13",
  84401. electron: "0.37",
  84402. firefox: "3",
  84403. ios: "10.0",
  84404. node: "6.0",
  84405. opera: "36",
  84406. opera_mobile: "36",
  84407. safari: "10.0",
  84408. samsung: "5.0"
  84409. },
  84410. "es.regexp.test": {
  84411. android: "51",
  84412. chrome: "51",
  84413. edge: "74",
  84414. electron: "1.2",
  84415. firefox: "46",
  84416. ios: "10.0",
  84417. node: "6.5",
  84418. opera: "38",
  84419. opera_mobile: "38",
  84420. safari: "10.0",
  84421. samsung: "5.0"
  84422. },
  84423. "es.regexp.to-string": {
  84424. android: "50",
  84425. chrome: "50",
  84426. edge: "74",
  84427. electron: "1.1",
  84428. firefox: "46",
  84429. ios: "10.0",
  84430. node: "6.0",
  84431. opera: "37",
  84432. opera_mobile: "37",
  84433. safari: "10.0",
  84434. samsung: "5.0"
  84435. },
  84436. "es.set": {
  84437. android: "51",
  84438. chrome: "51",
  84439. edge: "15",
  84440. electron: "1.2",
  84441. firefox: "53",
  84442. ios: "10.0",
  84443. node: "6.5",
  84444. opera: "38",
  84445. opera_mobile: "38",
  84446. rhino: "1.7.13",
  84447. safari: "10.0",
  84448. samsung: "5.0"
  84449. },
  84450. "es.string.code-point-at": {
  84451. android: "41",
  84452. chrome: "41",
  84453. edge: "13",
  84454. electron: "0.21",
  84455. firefox: "29",
  84456. ios: "9.0",
  84457. node: "1.0",
  84458. opera: "28",
  84459. opera_mobile: "28",
  84460. rhino: "1.7.13",
  84461. safari: "9.0",
  84462. samsung: "3.4"
  84463. },
  84464. "es.string.ends-with": {
  84465. android: "51",
  84466. chrome: "51",
  84467. edge: "74",
  84468. electron: "1.2",
  84469. firefox: "40",
  84470. ios: "10.0",
  84471. node: "6.5",
  84472. opera: "38",
  84473. opera_mobile: "38",
  84474. safari: "10.0",
  84475. samsung: "5.0"
  84476. },
  84477. "es.string.from-code-point": {
  84478. android: "41",
  84479. chrome: "41",
  84480. edge: "13",
  84481. electron: "0.21",
  84482. firefox: "29",
  84483. ios: "9.0",
  84484. node: "1.0",
  84485. opera: "28",
  84486. opera_mobile: "28",
  84487. rhino: "1.7.13",
  84488. safari: "9.0",
  84489. samsung: "3.4"
  84490. },
  84491. "es.string.includes": {
  84492. android: "51",
  84493. chrome: "51",
  84494. edge: "74",
  84495. electron: "1.2",
  84496. firefox: "40",
  84497. ios: "10.0",
  84498. node: "6.5",
  84499. opera: "38",
  84500. opera_mobile: "38",
  84501. safari: "10.0",
  84502. samsung: "5.0"
  84503. },
  84504. "es.string.iterator": {
  84505. android: "41",
  84506. chrome: "41",
  84507. edge: "13",
  84508. electron: "0.21",
  84509. firefox: "36",
  84510. ios: "9.0",
  84511. node: "1.0",
  84512. opera: "28",
  84513. opera_mobile: "28",
  84514. rhino: "1.7.13",
  84515. safari: "9.0",
  84516. samsung: "3.4"
  84517. },
  84518. "es.string.match": {
  84519. android: "51",
  84520. chrome: "51",
  84521. edge: "74",
  84522. electron: "1.2",
  84523. firefox: "49",
  84524. ios: "10.0",
  84525. node: "6.5",
  84526. opera: "38",
  84527. opera_mobile: "38",
  84528. safari: "10.0",
  84529. samsung: "5.0"
  84530. },
  84531. "es.string.match-all": {
  84532. android: "80",
  84533. chrome: "80",
  84534. edge: "80",
  84535. electron: "8.0",
  84536. firefox: "73",
  84537. ios: "13.4",
  84538. node: "14.0",
  84539. opera: "67",
  84540. opera_mobile: "57",
  84541. safari: "13.1",
  84542. samsung: "13.0"
  84543. },
  84544. "es.string.pad-end": {
  84545. android: "57",
  84546. chrome: "57",
  84547. edge: "15",
  84548. electron: "1.7",
  84549. firefox: "48",
  84550. ios: "11.0",
  84551. node: "8.0",
  84552. opera: "44",
  84553. opera_mobile: "43",
  84554. rhino: "1.7.13",
  84555. safari: "11.0",
  84556. samsung: "7.0"
  84557. },
  84558. "es.string.pad-start": {
  84559. android: "57",
  84560. chrome: "57",
  84561. edge: "15",
  84562. electron: "1.7",
  84563. firefox: "48",
  84564. ios: "11.0",
  84565. node: "8.0",
  84566. opera: "44",
  84567. opera_mobile: "43",
  84568. rhino: "1.7.13",
  84569. safari: "11.0",
  84570. samsung: "7.0"
  84571. },
  84572. "es.string.raw": {
  84573. android: "41",
  84574. chrome: "41",
  84575. edge: "13",
  84576. electron: "0.21",
  84577. firefox: "34",
  84578. ios: "9.0",
  84579. node: "1.0",
  84580. opera: "28",
  84581. opera_mobile: "28",
  84582. safari: "9.0",
  84583. samsung: "3.4"
  84584. },
  84585. "es.string.repeat": {
  84586. android: "41",
  84587. chrome: "41",
  84588. edge: "13",
  84589. electron: "0.21",
  84590. firefox: "24",
  84591. ios: "9.0",
  84592. node: "1.0",
  84593. opera: "28",
  84594. opera_mobile: "28",
  84595. rhino: "1.7.13",
  84596. safari: "9.0",
  84597. samsung: "3.4"
  84598. },
  84599. "es.string.replace": {
  84600. android: "64",
  84601. chrome: "64",
  84602. edge: "74",
  84603. electron: "3.0",
  84604. firefox: "78",
  84605. ios: "14.0",
  84606. node: "10.0",
  84607. opera: "51",
  84608. opera_mobile: "47",
  84609. safari: "14.0",
  84610. samsung: "9.0"
  84611. },
  84612. "es.string.replace-all": {
  84613. android: "85",
  84614. chrome: "85",
  84615. edge: "85",
  84616. electron: "10.0",
  84617. firefox: "77",
  84618. ios: "13.4",
  84619. node: "15.0",
  84620. opera: "71",
  84621. opera_mobile: "60",
  84622. safari: "13.1",
  84623. samsung: "14.0"
  84624. },
  84625. "es.string.search": {
  84626. android: "51",
  84627. chrome: "51",
  84628. edge: "74",
  84629. electron: "1.2",
  84630. firefox: "49",
  84631. ios: "10.0",
  84632. node: "6.5",
  84633. opera: "38",
  84634. opera_mobile: "38",
  84635. safari: "10.0",
  84636. samsung: "5.0"
  84637. },
  84638. "es.string.split": {
  84639. android: "54",
  84640. chrome: "54",
  84641. edge: "74",
  84642. electron: "1.4",
  84643. firefox: "49",
  84644. ios: "10.0",
  84645. node: "7.0",
  84646. opera: "41",
  84647. opera_mobile: "41",
  84648. safari: "10.0",
  84649. samsung: "6.0"
  84650. },
  84651. "es.string.starts-with": {
  84652. android: "51",
  84653. chrome: "51",
  84654. edge: "74",
  84655. electron: "1.2",
  84656. firefox: "40",
  84657. ios: "10.0",
  84658. node: "6.5",
  84659. opera: "38",
  84660. opera_mobile: "38",
  84661. safari: "10.0",
  84662. samsung: "5.0"
  84663. },
  84664. "es.string.substr": {
  84665. android: "3.0",
  84666. chrome: "1",
  84667. edge: "12",
  84668. electron: "0.20",
  84669. firefox: "1",
  84670. ie: "4",
  84671. ios: "1.0",
  84672. node: "0.0.3",
  84673. opera: "4",
  84674. opera_mobile: "4",
  84675. phantom: "1.9",
  84676. rhino: "1.7.13",
  84677. safari: "1",
  84678. samsung: "1.0"
  84679. },
  84680. "es.string.trim": {
  84681. android: "59",
  84682. chrome: "59",
  84683. edge: "15",
  84684. electron: "1.8",
  84685. firefox: "52",
  84686. ios: "12.2",
  84687. node: "8.3",
  84688. opera: "46",
  84689. opera_mobile: "43",
  84690. rhino: "1.7.13",
  84691. safari: "12.1",
  84692. samsung: "7.0"
  84693. },
  84694. "es.string.trim-end": {
  84695. android: "66",
  84696. chrome: "66",
  84697. edge: "74",
  84698. electron: "3.0",
  84699. firefox: "61",
  84700. ios: "12.2",
  84701. node: "10.0",
  84702. opera: "53",
  84703. opera_mobile: "47",
  84704. safari: "12.1",
  84705. samsung: "9.0"
  84706. },
  84707. "es.string.trim-start": {
  84708. android: "66",
  84709. chrome: "66",
  84710. edge: "74",
  84711. electron: "3.0",
  84712. firefox: "61",
  84713. ios: "12.0",
  84714. node: "10.0",
  84715. opera: "53",
  84716. opera_mobile: "47",
  84717. safari: "12.0",
  84718. samsung: "9.0"
  84719. },
  84720. "es.string.anchor": {
  84721. android: "3.0",
  84722. chrome: "5",
  84723. edge: "12",
  84724. electron: "0.20",
  84725. firefox: "17",
  84726. ios: "6.0",
  84727. node: "0.1.27",
  84728. opera: "15",
  84729. opera_mobile: "15",
  84730. phantom: "2.0",
  84731. safari: "6.0",
  84732. samsung: "1.0"
  84733. },
  84734. "es.string.big": {
  84735. android: "3.0",
  84736. chrome: "5",
  84737. edge: "12",
  84738. electron: "0.20",
  84739. firefox: "2",
  84740. ios: "2.0",
  84741. node: "0.1.27",
  84742. opera: "10.50",
  84743. opera_mobile: "10.50",
  84744. phantom: "1.9",
  84745. rhino: "1.7.13",
  84746. safari: "3.1",
  84747. samsung: "1.0"
  84748. },
  84749. "es.string.blink": {
  84750. android: "3.0",
  84751. chrome: "5",
  84752. edge: "12",
  84753. electron: "0.20",
  84754. firefox: "2",
  84755. ios: "2.0",
  84756. node: "0.1.27",
  84757. opera: "10.50",
  84758. opera_mobile: "10.50",
  84759. phantom: "1.9",
  84760. rhino: "1.7.13",
  84761. safari: "3.1",
  84762. samsung: "1.0"
  84763. },
  84764. "es.string.bold": {
  84765. android: "3.0",
  84766. chrome: "5",
  84767. edge: "12",
  84768. electron: "0.20",
  84769. firefox: "2",
  84770. ios: "2.0",
  84771. node: "0.1.27",
  84772. opera: "10.50",
  84773. opera_mobile: "10.50",
  84774. phantom: "1.9",
  84775. rhino: "1.7.13",
  84776. safari: "3.1",
  84777. samsung: "1.0"
  84778. },
  84779. "es.string.fixed": {
  84780. android: "3.0",
  84781. chrome: "5",
  84782. edge: "12",
  84783. electron: "0.20",
  84784. firefox: "2",
  84785. ios: "2.0",
  84786. node: "0.1.27",
  84787. opera: "10.50",
  84788. opera_mobile: "10.50",
  84789. phantom: "1.9",
  84790. rhino: "1.7.13",
  84791. safari: "3.1",
  84792. samsung: "1.0"
  84793. },
  84794. "es.string.fontcolor": {
  84795. android: "3.0",
  84796. chrome: "5",
  84797. edge: "12",
  84798. electron: "0.20",
  84799. firefox: "17",
  84800. ios: "6.0",
  84801. node: "0.1.27",
  84802. opera: "15",
  84803. opera_mobile: "15",
  84804. phantom: "2.0",
  84805. safari: "6.0",
  84806. samsung: "1.0"
  84807. },
  84808. "es.string.fontsize": {
  84809. android: "3.0",
  84810. chrome: "5",
  84811. edge: "12",
  84812. electron: "0.20",
  84813. firefox: "17",
  84814. ios: "6.0",
  84815. node: "0.1.27",
  84816. opera: "15",
  84817. opera_mobile: "15",
  84818. phantom: "2.0",
  84819. safari: "6.0",
  84820. samsung: "1.0"
  84821. },
  84822. "es.string.italics": {
  84823. android: "3.0",
  84824. chrome: "5",
  84825. edge: "12",
  84826. electron: "0.20",
  84827. firefox: "2",
  84828. ios: "2.0",
  84829. node: "0.1.27",
  84830. opera: "10.50",
  84831. opera_mobile: "10.50",
  84832. phantom: "1.9",
  84833. rhino: "1.7.13",
  84834. safari: "3.1",
  84835. samsung: "1.0"
  84836. },
  84837. "es.string.link": {
  84838. android: "3.0",
  84839. chrome: "5",
  84840. edge: "12",
  84841. electron: "0.20",
  84842. firefox: "17",
  84843. ios: "6.0",
  84844. node: "0.1.27",
  84845. opera: "15",
  84846. opera_mobile: "15",
  84847. phantom: "2.0",
  84848. safari: "6.0",
  84849. samsung: "1.0"
  84850. },
  84851. "es.string.small": {
  84852. android: "3.0",
  84853. chrome: "5",
  84854. edge: "12",
  84855. electron: "0.20",
  84856. firefox: "2",
  84857. ios: "2.0",
  84858. node: "0.1.27",
  84859. opera: "10.50",
  84860. opera_mobile: "10.50",
  84861. phantom: "1.9",
  84862. rhino: "1.7.13",
  84863. safari: "3.1",
  84864. samsung: "1.0"
  84865. },
  84866. "es.string.strike": {
  84867. android: "3.0",
  84868. chrome: "5",
  84869. edge: "12",
  84870. electron: "0.20",
  84871. firefox: "2",
  84872. ios: "2.0",
  84873. node: "0.1.27",
  84874. opera: "10.50",
  84875. opera_mobile: "10.50",
  84876. phantom: "1.9",
  84877. rhino: "1.7.13",
  84878. safari: "3.1",
  84879. samsung: "1.0"
  84880. },
  84881. "es.string.sub": {
  84882. android: "3.0",
  84883. chrome: "5",
  84884. edge: "12",
  84885. electron: "0.20",
  84886. firefox: "2",
  84887. ios: "2.0",
  84888. node: "0.1.27",
  84889. opera: "10.50",
  84890. opera_mobile: "10.50",
  84891. phantom: "1.9",
  84892. rhino: "1.7.13",
  84893. safari: "3.1",
  84894. samsung: "1.0"
  84895. },
  84896. "es.string.sup": {
  84897. android: "3.0",
  84898. chrome: "5",
  84899. edge: "12",
  84900. electron: "0.20",
  84901. firefox: "2",
  84902. ios: "2.0",
  84903. node: "0.1.27",
  84904. opera: "10.50",
  84905. opera_mobile: "10.50",
  84906. phantom: "1.9",
  84907. rhino: "1.7.13",
  84908. safari: "3.1",
  84909. samsung: "1.0"
  84910. },
  84911. "es.typed-array.float32-array": {
  84912. android: "54",
  84913. chrome: "54",
  84914. edge: "15",
  84915. electron: "1.4",
  84916. firefox: "55",
  84917. ios: "14.0",
  84918. node: "7.0",
  84919. opera: "41",
  84920. opera_mobile: "41",
  84921. safari: "14.0",
  84922. samsung: "6.0"
  84923. },
  84924. "es.typed-array.float64-array": {
  84925. android: "54",
  84926. chrome: "54",
  84927. edge: "15",
  84928. electron: "1.4",
  84929. firefox: "55",
  84930. ios: "14.0",
  84931. node: "7.0",
  84932. opera: "41",
  84933. opera_mobile: "41",
  84934. safari: "14.0",
  84935. samsung: "6.0"
  84936. },
  84937. "es.typed-array.int8-array": {
  84938. android: "54",
  84939. chrome: "54",
  84940. edge: "15",
  84941. electron: "1.4",
  84942. firefox: "55",
  84943. ios: "14.0",
  84944. node: "7.0",
  84945. opera: "41",
  84946. opera_mobile: "41",
  84947. safari: "14.0",
  84948. samsung: "6.0"
  84949. },
  84950. "es.typed-array.int16-array": {
  84951. android: "54",
  84952. chrome: "54",
  84953. edge: "15",
  84954. electron: "1.4",
  84955. firefox: "55",
  84956. ios: "14.0",
  84957. node: "7.0",
  84958. opera: "41",
  84959. opera_mobile: "41",
  84960. safari: "14.0",
  84961. samsung: "6.0"
  84962. },
  84963. "es.typed-array.int32-array": {
  84964. android: "54",
  84965. chrome: "54",
  84966. edge: "15",
  84967. electron: "1.4",
  84968. firefox: "55",
  84969. ios: "14.0",
  84970. node: "7.0",
  84971. opera: "41",
  84972. opera_mobile: "41",
  84973. safari: "14.0",
  84974. samsung: "6.0"
  84975. },
  84976. "es.typed-array.uint8-array": {
  84977. android: "54",
  84978. chrome: "54",
  84979. edge: "15",
  84980. electron: "1.4",
  84981. firefox: "55",
  84982. ios: "14.0",
  84983. node: "7.0",
  84984. opera: "41",
  84985. opera_mobile: "41",
  84986. safari: "14.0",
  84987. samsung: "6.0"
  84988. },
  84989. "es.typed-array.uint8-clamped-array": {
  84990. android: "54",
  84991. chrome: "54",
  84992. edge: "15",
  84993. electron: "1.4",
  84994. firefox: "55",
  84995. ios: "14.0",
  84996. node: "7.0",
  84997. opera: "41",
  84998. opera_mobile: "41",
  84999. safari: "14.0",
  85000. samsung: "6.0"
  85001. },
  85002. "es.typed-array.uint16-array": {
  85003. android: "54",
  85004. chrome: "54",
  85005. edge: "15",
  85006. electron: "1.4",
  85007. firefox: "55",
  85008. ios: "14.0",
  85009. node: "7.0",
  85010. opera: "41",
  85011. opera_mobile: "41",
  85012. safari: "14.0",
  85013. samsung: "6.0"
  85014. },
  85015. "es.typed-array.uint32-array": {
  85016. android: "54",
  85017. chrome: "54",
  85018. edge: "15",
  85019. electron: "1.4",
  85020. firefox: "55",
  85021. ios: "14.0",
  85022. node: "7.0",
  85023. opera: "41",
  85024. opera_mobile: "41",
  85025. safari: "14.0",
  85026. samsung: "6.0"
  85027. },
  85028. "es.typed-array.copy-within": {
  85029. android: "45",
  85030. chrome: "45",
  85031. edge: "13",
  85032. electron: "0.31",
  85033. firefox: "34",
  85034. ios: "10.0",
  85035. node: "4.0",
  85036. opera: "32",
  85037. opera_mobile: "32",
  85038. safari: "10.0",
  85039. samsung: "5.0"
  85040. },
  85041. "es.typed-array.every": {
  85042. android: "45",
  85043. chrome: "45",
  85044. edge: "13",
  85045. electron: "0.31",
  85046. firefox: "37",
  85047. ios: "10.0",
  85048. node: "4.0",
  85049. opera: "32",
  85050. opera_mobile: "32",
  85051. safari: "10.0",
  85052. samsung: "5.0"
  85053. },
  85054. "es.typed-array.fill": {
  85055. android: "45",
  85056. chrome: "45",
  85057. edge: "13",
  85058. electron: "0.31",
  85059. firefox: "37",
  85060. ios: "10.0",
  85061. node: "4.0",
  85062. opera: "32",
  85063. opera_mobile: "32",
  85064. safari: "10.0",
  85065. samsung: "5.0"
  85066. },
  85067. "es.typed-array.filter": {
  85068. android: "45",
  85069. chrome: "45",
  85070. edge: "13",
  85071. electron: "0.31",
  85072. firefox: "38",
  85073. ios: "10.0",
  85074. node: "4.0",
  85075. opera: "32",
  85076. opera_mobile: "32",
  85077. safari: "10.0",
  85078. samsung: "5.0"
  85079. },
  85080. "es.typed-array.find": {
  85081. android: "45",
  85082. chrome: "45",
  85083. edge: "13",
  85084. electron: "0.31",
  85085. firefox: "37",
  85086. ios: "10.0",
  85087. node: "4.0",
  85088. opera: "32",
  85089. opera_mobile: "32",
  85090. safari: "10.0",
  85091. samsung: "5.0"
  85092. },
  85093. "es.typed-array.find-index": {
  85094. android: "45",
  85095. chrome: "45",
  85096. edge: "13",
  85097. electron: "0.31",
  85098. firefox: "37",
  85099. ios: "10.0",
  85100. node: "4.0",
  85101. opera: "32",
  85102. opera_mobile: "32",
  85103. safari: "10.0",
  85104. samsung: "5.0"
  85105. },
  85106. "es.typed-array.for-each": {
  85107. android: "45",
  85108. chrome: "45",
  85109. edge: "13",
  85110. electron: "0.31",
  85111. firefox: "38",
  85112. ios: "10.0",
  85113. node: "4.0",
  85114. opera: "32",
  85115. opera_mobile: "32",
  85116. safari: "10.0",
  85117. samsung: "5.0"
  85118. },
  85119. "es.typed-array.from": {
  85120. android: "54",
  85121. chrome: "54",
  85122. edge: "15",
  85123. electron: "1.4",
  85124. firefox: "55",
  85125. ios: "14.0",
  85126. node: "7.0",
  85127. opera: "41",
  85128. opera_mobile: "41",
  85129. safari: "14.0",
  85130. samsung: "6.0"
  85131. },
  85132. "es.typed-array.includes": {
  85133. android: "49",
  85134. chrome: "49",
  85135. edge: "14",
  85136. electron: "0.37",
  85137. firefox: "43",
  85138. ios: "10.0",
  85139. node: "6.0",
  85140. opera: "36",
  85141. opera_mobile: "36",
  85142. safari: "10.0",
  85143. samsung: "5.0"
  85144. },
  85145. "es.typed-array.index-of": {
  85146. android: "45",
  85147. chrome: "45",
  85148. edge: "13",
  85149. electron: "0.31",
  85150. firefox: "37",
  85151. ios: "10.0",
  85152. node: "4.0",
  85153. opera: "32",
  85154. opera_mobile: "32",
  85155. safari: "10.0",
  85156. samsung: "5.0"
  85157. },
  85158. "es.typed-array.iterator": {
  85159. android: "47",
  85160. chrome: "47",
  85161. edge: "13",
  85162. electron: "0.36",
  85163. firefox: "37",
  85164. ios: "10.0",
  85165. node: "6.0",
  85166. opera: "34",
  85167. opera_mobile: "34",
  85168. safari: "10.0",
  85169. samsung: "5.0"
  85170. },
  85171. "es.typed-array.join": {
  85172. android: "45",
  85173. chrome: "45",
  85174. edge: "13",
  85175. electron: "0.31",
  85176. firefox: "37",
  85177. ios: "10.0",
  85178. node: "4.0",
  85179. opera: "32",
  85180. opera_mobile: "32",
  85181. safari: "10.0",
  85182. samsung: "5.0"
  85183. },
  85184. "es.typed-array.last-index-of": {
  85185. android: "45",
  85186. chrome: "45",
  85187. edge: "13",
  85188. electron: "0.31",
  85189. firefox: "37",
  85190. ios: "10.0",
  85191. node: "4.0",
  85192. opera: "32",
  85193. opera_mobile: "32",
  85194. safari: "10.0",
  85195. samsung: "5.0"
  85196. },
  85197. "es.typed-array.map": {
  85198. android: "45",
  85199. chrome: "45",
  85200. edge: "13",
  85201. electron: "0.31",
  85202. firefox: "38",
  85203. ios: "10.0",
  85204. node: "4.0",
  85205. opera: "32",
  85206. opera_mobile: "32",
  85207. safari: "10.0",
  85208. samsung: "5.0"
  85209. },
  85210. "es.typed-array.of": {
  85211. android: "54",
  85212. chrome: "54",
  85213. edge: "15",
  85214. electron: "1.4",
  85215. firefox: "55",
  85216. ios: "14.0",
  85217. node: "7.0",
  85218. opera: "41",
  85219. opera_mobile: "41",
  85220. safari: "14.0",
  85221. samsung: "6.0"
  85222. },
  85223. "es.typed-array.reduce": {
  85224. android: "45",
  85225. chrome: "45",
  85226. edge: "13",
  85227. electron: "0.31",
  85228. firefox: "37",
  85229. ios: "10.0",
  85230. node: "4.0",
  85231. opera: "32",
  85232. opera_mobile: "32",
  85233. safari: "10.0",
  85234. samsung: "5.0"
  85235. },
  85236. "es.typed-array.reduce-right": {
  85237. android: "45",
  85238. chrome: "45",
  85239. edge: "13",
  85240. electron: "0.31",
  85241. firefox: "37",
  85242. ios: "10.0",
  85243. node: "4.0",
  85244. opera: "32",
  85245. opera_mobile: "32",
  85246. safari: "10.0",
  85247. samsung: "5.0"
  85248. },
  85249. "es.typed-array.reverse": {
  85250. android: "45",
  85251. chrome: "45",
  85252. edge: "13",
  85253. electron: "0.31",
  85254. firefox: "37",
  85255. ios: "10.0",
  85256. node: "4.0",
  85257. opera: "32",
  85258. opera_mobile: "32",
  85259. safari: "10.0",
  85260. samsung: "5.0"
  85261. },
  85262. "es.typed-array.set": {
  85263. android: "4.4",
  85264. chrome: "26",
  85265. edge: "13",
  85266. electron: "0.20",
  85267. firefox: "15",
  85268. ios: "8.0",
  85269. node: "0.11.0",
  85270. opera: "16",
  85271. opera_mobile: "16",
  85272. safari: "7.1",
  85273. samsung: "1.5"
  85274. },
  85275. "es.typed-array.slice": {
  85276. android: "45",
  85277. chrome: "45",
  85278. edge: "13",
  85279. electron: "0.31",
  85280. firefox: "38",
  85281. ios: "10.0",
  85282. node: "4.0",
  85283. opera: "32",
  85284. opera_mobile: "32",
  85285. safari: "10.0",
  85286. samsung: "5.0"
  85287. },
  85288. "es.typed-array.some": {
  85289. android: "45",
  85290. chrome: "45",
  85291. edge: "13",
  85292. electron: "0.31",
  85293. firefox: "37",
  85294. ios: "10.0",
  85295. node: "4.0",
  85296. opera: "32",
  85297. opera_mobile: "32",
  85298. safari: "10.0",
  85299. samsung: "5.0"
  85300. },
  85301. "es.typed-array.sort": {
  85302. android: "74",
  85303. chrome: "74",
  85304. edge: "74",
  85305. electron: "6.0",
  85306. firefox: "67",
  85307. ios: "14.5",
  85308. node: "12.0",
  85309. opera: "61",
  85310. opera_mobile: "53",
  85311. safari: "14.1",
  85312. samsung: "11.0"
  85313. },
  85314. "es.typed-array.subarray": {
  85315. android: "4.4",
  85316. chrome: "26",
  85317. edge: "13",
  85318. electron: "0.20",
  85319. firefox: "15",
  85320. ios: "8.0",
  85321. node: "0.11.0",
  85322. opera: "16",
  85323. opera_mobile: "16",
  85324. safari: "7.1",
  85325. samsung: "1.5"
  85326. },
  85327. "es.typed-array.to-locale-string": {
  85328. android: "45",
  85329. chrome: "45",
  85330. edge: "74",
  85331. electron: "0.31",
  85332. firefox: "51",
  85333. ios: "10.0",
  85334. node: "4.0",
  85335. opera: "32",
  85336. opera_mobile: "32",
  85337. safari: "10.0",
  85338. samsung: "5.0"
  85339. },
  85340. "es.typed-array.to-string": {
  85341. android: "51",
  85342. chrome: "51",
  85343. edge: "13",
  85344. electron: "1.2",
  85345. firefox: "51",
  85346. ios: "10.0",
  85347. node: "6.5",
  85348. opera: "38",
  85349. opera_mobile: "38",
  85350. safari: "10.0",
  85351. samsung: "5.0"
  85352. },
  85353. "es.unescape": {
  85354. android: "3.0",
  85355. chrome: "1",
  85356. edge: "12",
  85357. electron: "0.20",
  85358. firefox: "1",
  85359. ie: "3",
  85360. ios: "1.0",
  85361. node: "0.0.3",
  85362. opera: "3",
  85363. opera_mobile: "3",
  85364. phantom: "1.9",
  85365. rhino: "1.7.13",
  85366. safari: "1",
  85367. samsung: "1.0"
  85368. },
  85369. "es.weak-map": {
  85370. android: "51",
  85371. chrome: "51",
  85372. edge: "15",
  85373. electron: "1.2",
  85374. firefox: "53",
  85375. ios: "10.0",
  85376. node: "6.5",
  85377. opera: "38",
  85378. opera_mobile: "38",
  85379. rhino: "1.7.13",
  85380. safari: "10.0",
  85381. samsung: "5.0"
  85382. },
  85383. "es.weak-set": {
  85384. android: "51",
  85385. chrome: "51",
  85386. edge: "15",
  85387. electron: "1.2",
  85388. firefox: "53",
  85389. ios: "10.0",
  85390. node: "6.5",
  85391. opera: "38",
  85392. opera_mobile: "38",
  85393. rhino: "1.7.13",
  85394. safari: "10.0",
  85395. samsung: "5.0"
  85396. },
  85397. "esnext.aggregate-error": {
  85398. android: "85",
  85399. chrome: "85",
  85400. edge: "85",
  85401. electron: "10.0",
  85402. firefox: "79",
  85403. ios: "14.0",
  85404. node: "15.0",
  85405. opera: "71",
  85406. opera_mobile: "60",
  85407. safari: "14.0",
  85408. samsung: "14.0"
  85409. },
  85410. "esnext.array.at": {
  85411. android: "92",
  85412. chrome: "92",
  85413. edge: "92",
  85414. electron: "14.0",
  85415. firefox: "90",
  85416. opera: "78"
  85417. },
  85418. "esnext.array.filter-out": {
  85419. },
  85420. "esnext.array.find-last": {
  85421. },
  85422. "esnext.array.find-last-index": {
  85423. },
  85424. "esnext.array.is-template-object": {
  85425. },
  85426. "esnext.array.last-index": {
  85427. },
  85428. "esnext.array.last-item": {
  85429. },
  85430. "esnext.array.unique-by": {
  85431. },
  85432. "esnext.async-iterator.constructor": {
  85433. },
  85434. "esnext.async-iterator.as-indexed-pairs": {
  85435. },
  85436. "esnext.async-iterator.drop": {
  85437. },
  85438. "esnext.async-iterator.every": {
  85439. },
  85440. "esnext.async-iterator.filter": {
  85441. },
  85442. "esnext.async-iterator.find": {
  85443. },
  85444. "esnext.async-iterator.flat-map": {
  85445. },
  85446. "esnext.async-iterator.for-each": {
  85447. },
  85448. "esnext.async-iterator.from": {
  85449. },
  85450. "esnext.async-iterator.map": {
  85451. },
  85452. "esnext.async-iterator.reduce": {
  85453. },
  85454. "esnext.async-iterator.some": {
  85455. },
  85456. "esnext.async-iterator.take": {
  85457. },
  85458. "esnext.async-iterator.to-array": {
  85459. },
  85460. "esnext.bigint.range": {
  85461. },
  85462. "esnext.composite-key": {
  85463. },
  85464. "esnext.composite-symbol": {
  85465. },
  85466. "esnext.global-this": {
  85467. android: "71",
  85468. chrome: "71",
  85469. edge: "74",
  85470. electron: "5.0",
  85471. firefox: "65",
  85472. ios: "12.2",
  85473. node: "12.0",
  85474. opera: "58",
  85475. opera_mobile: "50",
  85476. safari: "12.1",
  85477. samsung: "10.0"
  85478. },
  85479. "esnext.iterator.constructor": {
  85480. },
  85481. "esnext.iterator.as-indexed-pairs": {
  85482. },
  85483. "esnext.iterator.drop": {
  85484. },
  85485. "esnext.iterator.every": {
  85486. },
  85487. "esnext.iterator.filter": {
  85488. },
  85489. "esnext.iterator.find": {
  85490. },
  85491. "esnext.iterator.flat-map": {
  85492. },
  85493. "esnext.iterator.for-each": {
  85494. },
  85495. "esnext.iterator.from": {
  85496. },
  85497. "esnext.iterator.map": {
  85498. },
  85499. "esnext.iterator.reduce": {
  85500. },
  85501. "esnext.iterator.some": {
  85502. },
  85503. "esnext.iterator.take": {
  85504. },
  85505. "esnext.iterator.to-array": {
  85506. },
  85507. "esnext.map.delete-all": {
  85508. },
  85509. "esnext.map.emplace": {
  85510. },
  85511. "esnext.map.every": {
  85512. },
  85513. "esnext.map.filter": {
  85514. },
  85515. "esnext.map.find": {
  85516. },
  85517. "esnext.map.find-key": {
  85518. },
  85519. "esnext.map.from": {
  85520. },
  85521. "esnext.map.group-by": {
  85522. },
  85523. "esnext.map.includes": {
  85524. },
  85525. "esnext.map.key-by": {
  85526. },
  85527. "esnext.map.key-of": {
  85528. },
  85529. "esnext.map.map-keys": {
  85530. },
  85531. "esnext.map.map-values": {
  85532. },
  85533. "esnext.map.merge": {
  85534. },
  85535. "esnext.map.of": {
  85536. },
  85537. "esnext.map.reduce": {
  85538. },
  85539. "esnext.map.some": {
  85540. },
  85541. "esnext.map.update": {
  85542. },
  85543. "esnext.map.update-or-insert": {
  85544. },
  85545. "esnext.map.upsert": {
  85546. },
  85547. "esnext.math.clamp": {
  85548. },
  85549. "esnext.math.deg-per-rad": {
  85550. },
  85551. "esnext.math.degrees": {
  85552. },
  85553. "esnext.math.fscale": {
  85554. },
  85555. "esnext.math.iaddh": {
  85556. },
  85557. "esnext.math.imulh": {
  85558. },
  85559. "esnext.math.isubh": {
  85560. },
  85561. "esnext.math.rad-per-deg": {
  85562. },
  85563. "esnext.math.radians": {
  85564. },
  85565. "esnext.math.scale": {
  85566. },
  85567. "esnext.math.seeded-prng": {
  85568. },
  85569. "esnext.math.signbit": {
  85570. },
  85571. "esnext.math.umulh": {
  85572. },
  85573. "esnext.number.from-string": {
  85574. },
  85575. "esnext.number.range": {
  85576. },
  85577. "esnext.object.has-own": {
  85578. },
  85579. "esnext.object.iterate-entries": {
  85580. },
  85581. "esnext.object.iterate-keys": {
  85582. },
  85583. "esnext.object.iterate-values": {
  85584. },
  85585. "esnext.observable": {
  85586. },
  85587. "esnext.promise.all-settled": {
  85588. android: "76",
  85589. chrome: "76",
  85590. edge: "76",
  85591. electron: "6.0",
  85592. firefox: "71",
  85593. ios: "13.0",
  85594. node: "12.9",
  85595. opera: "63",
  85596. opera_mobile: "54",
  85597. safari: "13",
  85598. samsung: "12.0"
  85599. },
  85600. "esnext.promise.any": {
  85601. android: "85",
  85602. chrome: "85",
  85603. edge: "85",
  85604. electron: "10.0",
  85605. firefox: "79",
  85606. ios: "14.0",
  85607. node: "15.0",
  85608. opera: "71",
  85609. opera_mobile: "60",
  85610. safari: "14.0",
  85611. samsung: "14.0"
  85612. },
  85613. "esnext.promise.try": {
  85614. },
  85615. "esnext.reflect.define-metadata": {
  85616. },
  85617. "esnext.reflect.delete-metadata": {
  85618. },
  85619. "esnext.reflect.get-metadata": {
  85620. },
  85621. "esnext.reflect.get-metadata-keys": {
  85622. },
  85623. "esnext.reflect.get-own-metadata": {
  85624. },
  85625. "esnext.reflect.get-own-metadata-keys": {
  85626. },
  85627. "esnext.reflect.has-metadata": {
  85628. },
  85629. "esnext.reflect.has-own-metadata": {
  85630. },
  85631. "esnext.reflect.metadata": {
  85632. },
  85633. "esnext.set.add-all": {
  85634. },
  85635. "esnext.set.delete-all": {
  85636. },
  85637. "esnext.set.difference": {
  85638. },
  85639. "esnext.set.every": {
  85640. },
  85641. "esnext.set.filter": {
  85642. },
  85643. "esnext.set.find": {
  85644. },
  85645. "esnext.set.from": {
  85646. },
  85647. "esnext.set.intersection": {
  85648. },
  85649. "esnext.set.is-disjoint-from": {
  85650. },
  85651. "esnext.set.is-subset-of": {
  85652. },
  85653. "esnext.set.is-superset-of": {
  85654. },
  85655. "esnext.set.join": {
  85656. },
  85657. "esnext.set.map": {
  85658. },
  85659. "esnext.set.of": {
  85660. },
  85661. "esnext.set.reduce": {
  85662. },
  85663. "esnext.set.some": {
  85664. },
  85665. "esnext.set.symmetric-difference": {
  85666. },
  85667. "esnext.set.union": {
  85668. },
  85669. "esnext.string.at": {
  85670. },
  85671. "esnext.string.code-points": {
  85672. },
  85673. "esnext.string.match-all": {
  85674. android: "80",
  85675. chrome: "80",
  85676. edge: "80",
  85677. electron: "8.0",
  85678. firefox: "73",
  85679. ios: "13.4",
  85680. node: "14.0",
  85681. opera: "67",
  85682. opera_mobile: "57",
  85683. safari: "13.1",
  85684. samsung: "13.0"
  85685. },
  85686. "esnext.string.replace-all": {
  85687. android: "85",
  85688. chrome: "85",
  85689. edge: "85",
  85690. electron: "10.0",
  85691. firefox: "77",
  85692. ios: "13.4",
  85693. node: "15.0",
  85694. opera: "71",
  85695. opera_mobile: "60",
  85696. safari: "13.1",
  85697. samsung: "14.0"
  85698. },
  85699. "esnext.symbol.async-dispose": {
  85700. },
  85701. "esnext.symbol.dispose": {
  85702. },
  85703. "esnext.symbol.matcher": {
  85704. },
  85705. "esnext.symbol.metadata": {
  85706. },
  85707. "esnext.symbol.observable": {
  85708. },
  85709. "esnext.symbol.pattern-match": {
  85710. },
  85711. "esnext.symbol.replace-all": {
  85712. },
  85713. "esnext.typed-array.at": {
  85714. android: "92",
  85715. chrome: "92",
  85716. edge: "92",
  85717. electron: "14.0",
  85718. firefox: "90",
  85719. opera: "78"
  85720. },
  85721. "esnext.typed-array.filter-out": {
  85722. },
  85723. "esnext.typed-array.find-last": {
  85724. },
  85725. "esnext.typed-array.find-last-index": {
  85726. },
  85727. "esnext.typed-array.unique-by": {
  85728. },
  85729. "esnext.weak-map.delete-all": {
  85730. },
  85731. "esnext.weak-map.from": {
  85732. },
  85733. "esnext.weak-map.of": {
  85734. },
  85735. "esnext.weak-map.emplace": {
  85736. },
  85737. "esnext.weak-map.upsert": {
  85738. },
  85739. "esnext.weak-set.add-all": {
  85740. },
  85741. "esnext.weak-set.delete-all": {
  85742. },
  85743. "esnext.weak-set.from": {
  85744. },
  85745. "esnext.weak-set.of": {
  85746. },
  85747. "web.dom-collections.for-each": {
  85748. android: "58",
  85749. chrome: "58",
  85750. edge: "16",
  85751. electron: "1.7",
  85752. firefox: "50",
  85753. ios: "10.0",
  85754. node: "0.0.1",
  85755. opera: "45",
  85756. opera_mobile: "43",
  85757. rhino: "1.7.13",
  85758. safari: "10.0",
  85759. samsung: "7.0"
  85760. },
  85761. "web.dom-collections.iterator": {
  85762. android: "66",
  85763. chrome: "66",
  85764. edge: "74",
  85765. electron: "3.0",
  85766. firefox: "60",
  85767. ios: "13.4",
  85768. node: "0.0.1",
  85769. opera: "53",
  85770. opera_mobile: "47",
  85771. rhino: "1.7.13",
  85772. safari: "13.1",
  85773. samsung: "9.0"
  85774. },
  85775. "web.immediate": {
  85776. ie: "10",
  85777. node: "0.9.1"
  85778. },
  85779. "web.queue-microtask": {
  85780. android: "71",
  85781. chrome: "71",
  85782. edge: "74",
  85783. electron: "5.0",
  85784. firefox: "69",
  85785. ios: "12.2",
  85786. node: "12.0",
  85787. opera: "58",
  85788. opera_mobile: "50",
  85789. safari: "12.1",
  85790. samsung: "10.0"
  85791. },
  85792. "web.timers": {
  85793. android: "1.5",
  85794. chrome: "1",
  85795. edge: "12",
  85796. electron: "0.20",
  85797. firefox: "1",
  85798. ie: "10",
  85799. ios: "1.0",
  85800. node: "0.0.1",
  85801. opera: "7",
  85802. opera_mobile: "7",
  85803. phantom: "1.9",
  85804. rhino: "1.7.13",
  85805. safari: "1.0",
  85806. samsung: "1.0"
  85807. },
  85808. "web.url": {
  85809. android: "67",
  85810. chrome: "67",
  85811. edge: "74",
  85812. electron: "4.0",
  85813. firefox: "57",
  85814. ios: "14.0",
  85815. node: "10.0",
  85816. opera: "54",
  85817. opera_mobile: "48",
  85818. safari: "14.0",
  85819. samsung: "9.0"
  85820. },
  85821. "web.url.to-json": {
  85822. android: "71",
  85823. chrome: "71",
  85824. edge: "74",
  85825. electron: "5.0",
  85826. firefox: "57",
  85827. ios: "14.0",
  85828. node: "10.0",
  85829. opera: "58",
  85830. opera_mobile: "50",
  85831. safari: "14.0",
  85832. samsung: "10.0"
  85833. },
  85834. "web.url-search-params": {
  85835. android: "67",
  85836. chrome: "67",
  85837. edge: "74",
  85838. electron: "4.0",
  85839. firefox: "57",
  85840. ios: "14.0",
  85841. node: "10.0",
  85842. opera: "54",
  85843. opera_mobile: "48",
  85844. safari: "14.0",
  85845. samsung: "9.0"
  85846. }
  85847. };
  85848. var data$1 = require$$0$3;
  85849. var debug = typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG) ? function () {
  85850. var _console;
  85851. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  85852. args[_key] = arguments[_key];
  85853. }
  85854. return (_console = console).error.apply(_console, ['SEMVER'].concat(args));
  85855. } : function () {};
  85856. var debug_1 = debug;
  85857. var SEMVER_SPEC_VERSION = '2.0.0';
  85858. var MAX_LENGTH$2 = 256;
  85859. var MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
  85860. var MAX_SAFE_COMPONENT_LENGTH = 16;
  85861. var constants = {
  85862. SEMVER_SPEC_VERSION: SEMVER_SPEC_VERSION,
  85863. MAX_LENGTH: MAX_LENGTH$2,
  85864. MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
  85865. MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH
  85866. };
  85867. var re_1 = createCommonjsModule(function (module, exports) {
  85868. var MAX_SAFE_COMPONENT_LENGTH = constants.MAX_SAFE_COMPONENT_LENGTH;
  85869. exports = module.exports = {};
  85870. var re = exports.re = [];
  85871. var src = exports.src = [];
  85872. var t = exports.t = {};
  85873. var R = 0;
  85874. var createToken = function createToken(name, value, isGlobal) {
  85875. var index = R++;
  85876. debug_1(index, value);
  85877. t[name] = index;
  85878. src[index] = value;
  85879. re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
  85880. };
  85881. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
  85882. createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
  85883. createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
  85884. createToken('MAINVERSION', "(" + src[t.NUMERICIDENTIFIER] + ")\\." + ("(" + src[t.NUMERICIDENTIFIER] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIER] + ")"));
  85885. createToken('MAINVERSIONLOOSE', "(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\." + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")\\.") + ("(" + src[t.NUMERICIDENTIFIERLOOSE] + ")"));
  85886. createToken('PRERELEASEIDENTIFIER', "(?:" + src[t.NUMERICIDENTIFIER] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  85887. createToken('PRERELEASEIDENTIFIERLOOSE', "(?:" + src[t.NUMERICIDENTIFIERLOOSE] + "|" + src[t.NONNUMERICIDENTIFIER] + ")");
  85888. createToken('PRERELEASE', "(?:-(" + src[t.PRERELEASEIDENTIFIER] + "(?:\\." + src[t.PRERELEASEIDENTIFIER] + ")*))");
  85889. createToken('PRERELEASELOOSE', "(?:-?(" + src[t.PRERELEASEIDENTIFIERLOOSE] + "(?:\\." + src[t.PRERELEASEIDENTIFIERLOOSE] + ")*))");
  85890. createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
  85891. createToken('BUILD', "(?:\\+(" + src[t.BUILDIDENTIFIER] + "(?:\\." + src[t.BUILDIDENTIFIER] + ")*))");
  85892. createToken('FULLPLAIN', "v?" + src[t.MAINVERSION] + src[t.PRERELEASE] + "?" + src[t.BUILD] + "?");
  85893. createToken('FULL', "^" + src[t.FULLPLAIN] + "$");
  85894. createToken('LOOSEPLAIN', "[v=\\s]*" + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + "?" + src[t.BUILD] + "?");
  85895. createToken('LOOSE', "^" + src[t.LOOSEPLAIN] + "$");
  85896. createToken('GTLT', '((?:<|>)?=?)');
  85897. createToken('XRANGEIDENTIFIERLOOSE', src[t.NUMERICIDENTIFIERLOOSE] + "|x|X|\\*");
  85898. createToken('XRANGEIDENTIFIER', src[t.NUMERICIDENTIFIER] + "|x|X|\\*");
  85899. createToken('XRANGEPLAIN', "[v=\\s]*(" + src[t.XRANGEIDENTIFIER] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIER] + ")") + ("(?:" + src[t.PRERELEASE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  85900. createToken('XRANGEPLAINLOOSE', "[v=\\s]*(" + src[t.XRANGEIDENTIFIERLOOSE] + ")" + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:\\.(" + src[t.XRANGEIDENTIFIERLOOSE] + ")") + ("(?:" + src[t.PRERELEASELOOSE] + ")?" + src[t.BUILD] + "?") + ")?)?");
  85901. createToken('XRANGE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAIN] + "$");
  85902. createToken('XRANGELOOSE', "^" + src[t.GTLT] + "\\s*" + src[t.XRANGEPLAINLOOSE] + "$");
  85903. createToken('COERCE', "" + ('(^|[^\\d])' + '(\\d{1,') + MAX_SAFE_COMPONENT_LENGTH + "})" + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + ("(?:\\.(\\d{1," + MAX_SAFE_COMPONENT_LENGTH + "}))?") + "(?:$|[^\\d])");
  85904. createToken('COERCERTL', src[t.COERCE], true);
  85905. createToken('LONETILDE', '(?:~>?)');
  85906. createToken('TILDETRIM', "(\\s*)" + src[t.LONETILDE] + "\\s+", true);
  85907. exports.tildeTrimReplace = '$1~';
  85908. createToken('TILDE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAIN] + "$");
  85909. createToken('TILDELOOSE', "^" + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + "$");
  85910. createToken('LONECARET', '(?:\\^)');
  85911. createToken('CARETTRIM', "(\\s*)" + src[t.LONECARET] + "\\s+", true);
  85912. exports.caretTrimReplace = '$1^';
  85913. createToken('CARET', "^" + src[t.LONECARET] + src[t.XRANGEPLAIN] + "$");
  85914. createToken('CARETLOOSE', "^" + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + "$");
  85915. createToken('COMPARATORLOOSE', "^" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + ")$|^$");
  85916. createToken('COMPARATOR', "^" + src[t.GTLT] + "\\s*(" + src[t.FULLPLAIN] + ")$|^$");
  85917. createToken('COMPARATORTRIM', "(\\s*)" + src[t.GTLT] + "\\s*(" + src[t.LOOSEPLAIN] + "|" + src[t.XRANGEPLAIN] + ")", true);
  85918. exports.comparatorTrimReplace = '$1$2$3';
  85919. createToken('HYPHENRANGE', "^\\s*(" + src[t.XRANGEPLAIN] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAIN] + ")") + "\\s*$");
  85920. createToken('HYPHENRANGELOOSE', "^\\s*(" + src[t.XRANGEPLAINLOOSE] + ")" + "\\s+-\\s+" + ("(" + src[t.XRANGEPLAINLOOSE] + ")") + "\\s*$");
  85921. createToken('STAR', '(<|>)?=?\\s*\\*');
  85922. }, "/$$rollup_base$$/node_modules/core-js-compat/node_modules/semver/internal");
  85923. var numeric = /^[0-9]+$/;
  85924. var compareIdentifiers$1 = function compareIdentifiers(a, b) {
  85925. var anum = numeric.test(a);
  85926. var bnum = numeric.test(b);
  85927. if (anum && bnum) {
  85928. a = +a;
  85929. b = +b;
  85930. }
  85931. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  85932. };
  85933. var rcompareIdentifiers = function rcompareIdentifiers(a, b) {
  85934. return compareIdentifiers$1(b, a);
  85935. };
  85936. var identifiers = {
  85937. compareIdentifiers: compareIdentifiers$1,
  85938. rcompareIdentifiers: rcompareIdentifiers
  85939. };
  85940. var MAX_LENGTH$1 = constants.MAX_LENGTH,
  85941. MAX_SAFE_INTEGER = constants.MAX_SAFE_INTEGER;
  85942. var re$2 = re_1.re,
  85943. t$7 = re_1.t;
  85944. var compareIdentifiers = identifiers.compareIdentifiers;
  85945. var SemVer = function () {
  85946. function SemVer(version, options) {
  85947. if (!options || typeof options !== 'object') {
  85948. options = {
  85949. loose: !!options,
  85950. includePrerelease: false
  85951. };
  85952. }
  85953. if (version instanceof SemVer) {
  85954. if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
  85955. return version;
  85956. } else {
  85957. version = version.version;
  85958. }
  85959. } else if (typeof version !== 'string') {
  85960. throw new TypeError("Invalid Version: " + version);
  85961. }
  85962. if (version.length > MAX_LENGTH$1) {
  85963. throw new TypeError("version is longer than " + MAX_LENGTH$1 + " characters");
  85964. }
  85965. debug_1('SemVer', version, options);
  85966. this.options = options;
  85967. this.loose = !!options.loose;
  85968. this.includePrerelease = !!options.includePrerelease;
  85969. var m = version.trim().match(options.loose ? re$2[t$7.LOOSE] : re$2[t$7.FULL]);
  85970. if (!m) {
  85971. throw new TypeError("Invalid Version: " + version);
  85972. }
  85973. this.raw = version;
  85974. this.major = +m[1];
  85975. this.minor = +m[2];
  85976. this.patch = +m[3];
  85977. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  85978. throw new TypeError('Invalid major version');
  85979. }
  85980. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  85981. throw new TypeError('Invalid minor version');
  85982. }
  85983. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  85984. throw new TypeError('Invalid patch version');
  85985. }
  85986. if (!m[4]) {
  85987. this.prerelease = [];
  85988. } else {
  85989. this.prerelease = m[4].split('.').map(function (id) {
  85990. if (/^[0-9]+$/.test(id)) {
  85991. var num = +id;
  85992. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  85993. return num;
  85994. }
  85995. }
  85996. return id;
  85997. });
  85998. }
  85999. this.build = m[5] ? m[5].split('.') : [];
  86000. this.format();
  86001. }
  86002. var _proto = SemVer.prototype;
  86003. _proto.format = function format() {
  86004. this.version = this.major + "." + this.minor + "." + this.patch;
  86005. if (this.prerelease.length) {
  86006. this.version += "-" + this.prerelease.join('.');
  86007. }
  86008. return this.version;
  86009. };
  86010. _proto.toString = function toString() {
  86011. return this.version;
  86012. };
  86013. _proto.compare = function compare(other) {
  86014. debug_1('SemVer.compare', this.version, this.options, other);
  86015. if (!(other instanceof SemVer)) {
  86016. if (typeof other === 'string' && other === this.version) {
  86017. return 0;
  86018. }
  86019. other = new SemVer(other, this.options);
  86020. }
  86021. if (other.version === this.version) {
  86022. return 0;
  86023. }
  86024. return this.compareMain(other) || this.comparePre(other);
  86025. };
  86026. _proto.compareMain = function compareMain(other) {
  86027. if (!(other instanceof SemVer)) {
  86028. other = new SemVer(other, this.options);
  86029. }
  86030. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  86031. };
  86032. _proto.comparePre = function comparePre(other) {
  86033. if (!(other instanceof SemVer)) {
  86034. other = new SemVer(other, this.options);
  86035. }
  86036. if (this.prerelease.length && !other.prerelease.length) {
  86037. return -1;
  86038. } else if (!this.prerelease.length && other.prerelease.length) {
  86039. return 1;
  86040. } else if (!this.prerelease.length && !other.prerelease.length) {
  86041. return 0;
  86042. }
  86043. var i = 0;
  86044. do {
  86045. var a = this.prerelease[i];
  86046. var b = other.prerelease[i];
  86047. debug_1('prerelease compare', i, a, b);
  86048. if (a === undefined && b === undefined) {
  86049. return 0;
  86050. } else if (b === undefined) {
  86051. return 1;
  86052. } else if (a === undefined) {
  86053. return -1;
  86054. } else if (a === b) {
  86055. continue;
  86056. } else {
  86057. return compareIdentifiers(a, b);
  86058. }
  86059. } while (++i);
  86060. };
  86061. _proto.compareBuild = function compareBuild(other) {
  86062. if (!(other instanceof SemVer)) {
  86063. other = new SemVer(other, this.options);
  86064. }
  86065. var i = 0;
  86066. do {
  86067. var a = this.build[i];
  86068. var b = other.build[i];
  86069. debug_1('prerelease compare', i, a, b);
  86070. if (a === undefined && b === undefined) {
  86071. return 0;
  86072. } else if (b === undefined) {
  86073. return 1;
  86074. } else if (a === undefined) {
  86075. return -1;
  86076. } else if (a === b) {
  86077. continue;
  86078. } else {
  86079. return compareIdentifiers(a, b);
  86080. }
  86081. } while (++i);
  86082. };
  86083. _proto.inc = function inc(release, identifier) {
  86084. switch (release) {
  86085. case 'premajor':
  86086. this.prerelease.length = 0;
  86087. this.patch = 0;
  86088. this.minor = 0;
  86089. this.major++;
  86090. this.inc('pre', identifier);
  86091. break;
  86092. case 'preminor':
  86093. this.prerelease.length = 0;
  86094. this.patch = 0;
  86095. this.minor++;
  86096. this.inc('pre', identifier);
  86097. break;
  86098. case 'prepatch':
  86099. this.prerelease.length = 0;
  86100. this.inc('patch', identifier);
  86101. this.inc('pre', identifier);
  86102. break;
  86103. case 'prerelease':
  86104. if (this.prerelease.length === 0) {
  86105. this.inc('patch', identifier);
  86106. }
  86107. this.inc('pre', identifier);
  86108. break;
  86109. case 'major':
  86110. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  86111. this.major++;
  86112. }
  86113. this.minor = 0;
  86114. this.patch = 0;
  86115. this.prerelease = [];
  86116. break;
  86117. case 'minor':
  86118. if (this.patch !== 0 || this.prerelease.length === 0) {
  86119. this.minor++;
  86120. }
  86121. this.patch = 0;
  86122. this.prerelease = [];
  86123. break;
  86124. case 'patch':
  86125. if (this.prerelease.length === 0) {
  86126. this.patch++;
  86127. }
  86128. this.prerelease = [];
  86129. break;
  86130. case 'pre':
  86131. if (this.prerelease.length === 0) {
  86132. this.prerelease = [0];
  86133. } else {
  86134. var i = this.prerelease.length;
  86135. while (--i >= 0) {
  86136. if (typeof this.prerelease[i] === 'number') {
  86137. this.prerelease[i]++;
  86138. i = -2;
  86139. }
  86140. }
  86141. if (i === -1) {
  86142. this.prerelease.push(0);
  86143. }
  86144. }
  86145. if (identifier) {
  86146. if (this.prerelease[0] === identifier) {
  86147. if (isNaN(this.prerelease[1])) {
  86148. this.prerelease = [identifier, 0];
  86149. }
  86150. } else {
  86151. this.prerelease = [identifier, 0];
  86152. }
  86153. }
  86154. break;
  86155. default:
  86156. throw new Error("invalid increment argument: " + release);
  86157. }
  86158. this.format();
  86159. this.raw = this.version;
  86160. return this;
  86161. };
  86162. return SemVer;
  86163. }();
  86164. var semver$2 = SemVer;
  86165. var compare$2 = function compare(a, b, loose) {
  86166. return new semver$2(a, loose).compare(new semver$2(b, loose));
  86167. };
  86168. var compare_1 = compare$2;
  86169. var eq = function eq(a, b, loose) {
  86170. return compare_1(a, b, loose) === 0;
  86171. };
  86172. var eq_1 = eq;
  86173. var neq = function neq(a, b, loose) {
  86174. return compare_1(a, b, loose) !== 0;
  86175. };
  86176. var neq_1 = neq;
  86177. var gt = function gt(a, b, loose) {
  86178. return compare_1(a, b, loose) > 0;
  86179. };
  86180. var gt_1 = gt;
  86181. var gte = function gte(a, b, loose) {
  86182. return compare_1(a, b, loose) >= 0;
  86183. };
  86184. var gte_1 = gte;
  86185. var lt = function lt(a, b, loose) {
  86186. return compare_1(a, b, loose) < 0;
  86187. };
  86188. var lt_1 = lt;
  86189. var lte = function lte(a, b, loose) {
  86190. return compare_1(a, b, loose) <= 0;
  86191. };
  86192. var lte_1 = lte;
  86193. var cmp = function cmp(a, op, b, loose) {
  86194. switch (op) {
  86195. case '===':
  86196. if (typeof a === 'object') a = a.version;
  86197. if (typeof b === 'object') b = b.version;
  86198. return a === b;
  86199. case '!==':
  86200. if (typeof a === 'object') a = a.version;
  86201. if (typeof b === 'object') b = b.version;
  86202. return a !== b;
  86203. case '':
  86204. case '=':
  86205. case '==':
  86206. return eq_1(a, b, loose);
  86207. case '!=':
  86208. return neq_1(a, b, loose);
  86209. case '>':
  86210. return gt_1(a, b, loose);
  86211. case '>=':
  86212. return gte_1(a, b, loose);
  86213. case '<':
  86214. return lt_1(a, b, loose);
  86215. case '<=':
  86216. return lte_1(a, b, loose);
  86217. default:
  86218. throw new TypeError("Invalid operator: " + op);
  86219. }
  86220. };
  86221. var cmp_1 = cmp;
  86222. var MAX_LENGTH = constants.MAX_LENGTH;
  86223. var re$1 = re_1.re,
  86224. t$6 = re_1.t;
  86225. var parse = function parse(version, options) {
  86226. if (!options || typeof options !== 'object') {
  86227. options = {
  86228. loose: !!options,
  86229. includePrerelease: false
  86230. };
  86231. }
  86232. if (version instanceof semver$2) {
  86233. return version;
  86234. }
  86235. if (typeof version !== 'string') {
  86236. return null;
  86237. }
  86238. if (version.length > MAX_LENGTH) {
  86239. return null;
  86240. }
  86241. var r = options.loose ? re$1[t$6.LOOSE] : re$1[t$6.FULL];
  86242. if (!r.test(version)) {
  86243. return null;
  86244. }
  86245. try {
  86246. return new semver$2(version, options);
  86247. } catch (er) {
  86248. return null;
  86249. }
  86250. };
  86251. var parse_1 = parse;
  86252. var re = re_1.re,
  86253. t$5 = re_1.t;
  86254. var coerce = function coerce(version, options) {
  86255. if (version instanceof semver$2) {
  86256. return version;
  86257. }
  86258. if (typeof version === 'number') {
  86259. version = String(version);
  86260. }
  86261. if (typeof version !== 'string') {
  86262. return null;
  86263. }
  86264. options = options || {};
  86265. var match = null;
  86266. if (!options.rtl) {
  86267. match = version.match(re[t$5.COERCE]);
  86268. } else {
  86269. var next;
  86270. while ((next = re[t$5.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  86271. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  86272. match = next;
  86273. }
  86274. re[t$5.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  86275. }
  86276. re[t$5.COERCERTL].lastIndex = -1;
  86277. }
  86278. if (match === null) return null;
  86279. return parse_1(match[2] + "." + (match[3] || '0') + "." + (match[4] || '0'), options);
  86280. };
  86281. var coerce_1 = coerce;
  86282. var has$4 = Function.call.bind({}.hasOwnProperty);
  86283. function compare$1(a, operator, b) {
  86284. return cmp_1(coerce_1(a), operator, coerce_1(b));
  86285. }
  86286. function intersection$2(list, order) {
  86287. var set = list instanceof Set ? list : new Set(list);
  86288. return order.filter(function (name) {
  86289. return set.has(name);
  86290. });
  86291. }
  86292. function sortObjectByKey(object, fn) {
  86293. return Object.keys(object).sort(fn).reduce(function (memo, key) {
  86294. memo[key] = object[key];
  86295. return memo;
  86296. }, {});
  86297. }
  86298. var helpers = {
  86299. compare: compare$1,
  86300. has: has$4,
  86301. intersection: intersection$2,
  86302. semver: coerce_1,
  86303. sortObjectByKey: sortObjectByKey
  86304. };
  86305. var modulesByVersions = {
  86306. "3.0": [
  86307. "es.symbol",
  86308. "es.symbol.description",
  86309. "es.symbol.async-iterator",
  86310. "es.symbol.has-instance",
  86311. "es.symbol.is-concat-spreadable",
  86312. "es.symbol.iterator",
  86313. "es.symbol.match",
  86314. "es.symbol.replace",
  86315. "es.symbol.search",
  86316. "es.symbol.species",
  86317. "es.symbol.split",
  86318. "es.symbol.to-primitive",
  86319. "es.symbol.to-string-tag",
  86320. "es.symbol.unscopables",
  86321. "es.array.concat",
  86322. "es.array.copy-within",
  86323. "es.array.every",
  86324. "es.array.fill",
  86325. "es.array.filter",
  86326. "es.array.find",
  86327. "es.array.find-index",
  86328. "es.array.flat",
  86329. "es.array.flat-map",
  86330. "es.array.for-each",
  86331. "es.array.from",
  86332. "es.array.includes",
  86333. "es.array.index-of",
  86334. "es.array.is-array",
  86335. "es.array.iterator",
  86336. "es.array.join",
  86337. "es.array.last-index-of",
  86338. "es.array.map",
  86339. "es.array.of",
  86340. "es.array.reduce",
  86341. "es.array.reduce-right",
  86342. "es.array.reverse",
  86343. "es.array.slice",
  86344. "es.array.some",
  86345. "es.array.sort",
  86346. "es.array.species",
  86347. "es.array.splice",
  86348. "es.array.unscopables.flat",
  86349. "es.array.unscopables.flat-map",
  86350. "es.array-buffer.constructor",
  86351. "es.array-buffer.is-view",
  86352. "es.array-buffer.slice",
  86353. "es.data-view",
  86354. "es.date.now",
  86355. "es.date.to-iso-string",
  86356. "es.date.to-json",
  86357. "es.date.to-primitive",
  86358. "es.date.to-string",
  86359. "es.function.bind",
  86360. "es.function.has-instance",
  86361. "es.function.name",
  86362. "es.json.to-string-tag",
  86363. "es.map",
  86364. "es.math.acosh",
  86365. "es.math.asinh",
  86366. "es.math.atanh",
  86367. "es.math.cbrt",
  86368. "es.math.clz32",
  86369. "es.math.cosh",
  86370. "es.math.expm1",
  86371. "es.math.fround",
  86372. "es.math.hypot",
  86373. "es.math.imul",
  86374. "es.math.log10",
  86375. "es.math.log1p",
  86376. "es.math.log2",
  86377. "es.math.sign",
  86378. "es.math.sinh",
  86379. "es.math.tanh",
  86380. "es.math.to-string-tag",
  86381. "es.math.trunc",
  86382. "es.number.constructor",
  86383. "es.number.epsilon",
  86384. "es.number.is-finite",
  86385. "es.number.is-integer",
  86386. "es.number.is-nan",
  86387. "es.number.is-safe-integer",
  86388. "es.number.max-safe-integer",
  86389. "es.number.min-safe-integer",
  86390. "es.number.parse-float",
  86391. "es.number.parse-int",
  86392. "es.number.to-fixed",
  86393. "es.number.to-precision",
  86394. "es.object.assign",
  86395. "es.object.create",
  86396. "es.object.define-getter",
  86397. "es.object.define-properties",
  86398. "es.object.define-property",
  86399. "es.object.define-setter",
  86400. "es.object.entries",
  86401. "es.object.freeze",
  86402. "es.object.from-entries",
  86403. "es.object.get-own-property-descriptor",
  86404. "es.object.get-own-property-descriptors",
  86405. "es.object.get-own-property-names",
  86406. "es.object.get-prototype-of",
  86407. "es.object.is",
  86408. "es.object.is-extensible",
  86409. "es.object.is-frozen",
  86410. "es.object.is-sealed",
  86411. "es.object.keys",
  86412. "es.object.lookup-getter",
  86413. "es.object.lookup-setter",
  86414. "es.object.prevent-extensions",
  86415. "es.object.seal",
  86416. "es.object.set-prototype-of",
  86417. "es.object.to-string",
  86418. "es.object.values",
  86419. "es.parse-float",
  86420. "es.parse-int",
  86421. "es.promise",
  86422. "es.promise.finally",
  86423. "es.reflect.apply",
  86424. "es.reflect.construct",
  86425. "es.reflect.define-property",
  86426. "es.reflect.delete-property",
  86427. "es.reflect.get",
  86428. "es.reflect.get-own-property-descriptor",
  86429. "es.reflect.get-prototype-of",
  86430. "es.reflect.has",
  86431. "es.reflect.is-extensible",
  86432. "es.reflect.own-keys",
  86433. "es.reflect.prevent-extensions",
  86434. "es.reflect.set",
  86435. "es.reflect.set-prototype-of",
  86436. "es.regexp.constructor",
  86437. "es.regexp.exec",
  86438. "es.regexp.flags",
  86439. "es.regexp.to-string",
  86440. "es.set",
  86441. "es.string.code-point-at",
  86442. "es.string.ends-with",
  86443. "es.string.from-code-point",
  86444. "es.string.includes",
  86445. "es.string.iterator",
  86446. "es.string.match",
  86447. "es.string.pad-end",
  86448. "es.string.pad-start",
  86449. "es.string.raw",
  86450. "es.string.repeat",
  86451. "es.string.replace",
  86452. "es.string.search",
  86453. "es.string.split",
  86454. "es.string.starts-with",
  86455. "es.string.trim",
  86456. "es.string.trim-end",
  86457. "es.string.trim-start",
  86458. "es.string.anchor",
  86459. "es.string.big",
  86460. "es.string.blink",
  86461. "es.string.bold",
  86462. "es.string.fixed",
  86463. "es.string.fontcolor",
  86464. "es.string.fontsize",
  86465. "es.string.italics",
  86466. "es.string.link",
  86467. "es.string.small",
  86468. "es.string.strike",
  86469. "es.string.sub",
  86470. "es.string.sup",
  86471. "es.typed-array.float32-array",
  86472. "es.typed-array.float64-array",
  86473. "es.typed-array.int8-array",
  86474. "es.typed-array.int16-array",
  86475. "es.typed-array.int32-array",
  86476. "es.typed-array.uint8-array",
  86477. "es.typed-array.uint8-clamped-array",
  86478. "es.typed-array.uint16-array",
  86479. "es.typed-array.uint32-array",
  86480. "es.typed-array.copy-within",
  86481. "es.typed-array.every",
  86482. "es.typed-array.fill",
  86483. "es.typed-array.filter",
  86484. "es.typed-array.find",
  86485. "es.typed-array.find-index",
  86486. "es.typed-array.for-each",
  86487. "es.typed-array.from",
  86488. "es.typed-array.includes",
  86489. "es.typed-array.index-of",
  86490. "es.typed-array.iterator",
  86491. "es.typed-array.join",
  86492. "es.typed-array.last-index-of",
  86493. "es.typed-array.map",
  86494. "es.typed-array.of",
  86495. "es.typed-array.reduce",
  86496. "es.typed-array.reduce-right",
  86497. "es.typed-array.reverse",
  86498. "es.typed-array.set",
  86499. "es.typed-array.slice",
  86500. "es.typed-array.some",
  86501. "es.typed-array.sort",
  86502. "es.typed-array.subarray",
  86503. "es.typed-array.to-locale-string",
  86504. "es.typed-array.to-string",
  86505. "es.weak-map",
  86506. "es.weak-set",
  86507. "esnext.aggregate-error",
  86508. "esnext.array.last-index",
  86509. "esnext.array.last-item",
  86510. "esnext.composite-key",
  86511. "esnext.composite-symbol",
  86512. "esnext.global-this",
  86513. "esnext.map.delete-all",
  86514. "esnext.map.every",
  86515. "esnext.map.filter",
  86516. "esnext.map.find",
  86517. "esnext.map.find-key",
  86518. "esnext.map.from",
  86519. "esnext.map.group-by",
  86520. "esnext.map.includes",
  86521. "esnext.map.key-by",
  86522. "esnext.map.key-of",
  86523. "esnext.map.map-keys",
  86524. "esnext.map.map-values",
  86525. "esnext.map.merge",
  86526. "esnext.map.of",
  86527. "esnext.map.reduce",
  86528. "esnext.map.some",
  86529. "esnext.map.update",
  86530. "esnext.math.clamp",
  86531. "esnext.math.deg-per-rad",
  86532. "esnext.math.degrees",
  86533. "esnext.math.fscale",
  86534. "esnext.math.iaddh",
  86535. "esnext.math.imulh",
  86536. "esnext.math.isubh",
  86537. "esnext.math.rad-per-deg",
  86538. "esnext.math.radians",
  86539. "esnext.math.scale",
  86540. "esnext.math.seeded-prng",
  86541. "esnext.math.signbit",
  86542. "esnext.math.umulh",
  86543. "esnext.number.from-string",
  86544. "esnext.observable",
  86545. "esnext.promise.all-settled",
  86546. "esnext.promise.any",
  86547. "esnext.promise.try",
  86548. "esnext.reflect.define-metadata",
  86549. "esnext.reflect.delete-metadata",
  86550. "esnext.reflect.get-metadata",
  86551. "esnext.reflect.get-metadata-keys",
  86552. "esnext.reflect.get-own-metadata",
  86553. "esnext.reflect.get-own-metadata-keys",
  86554. "esnext.reflect.has-metadata",
  86555. "esnext.reflect.has-own-metadata",
  86556. "esnext.reflect.metadata",
  86557. "esnext.set.add-all",
  86558. "esnext.set.delete-all",
  86559. "esnext.set.difference",
  86560. "esnext.set.every",
  86561. "esnext.set.filter",
  86562. "esnext.set.find",
  86563. "esnext.set.from",
  86564. "esnext.set.intersection",
  86565. "esnext.set.is-disjoint-from",
  86566. "esnext.set.is-subset-of",
  86567. "esnext.set.is-superset-of",
  86568. "esnext.set.join",
  86569. "esnext.set.map",
  86570. "esnext.set.of",
  86571. "esnext.set.reduce",
  86572. "esnext.set.some",
  86573. "esnext.set.symmetric-difference",
  86574. "esnext.set.union",
  86575. "esnext.string.at",
  86576. "esnext.string.code-points",
  86577. "esnext.string.match-all",
  86578. "esnext.string.replace-all",
  86579. "esnext.symbol.dispose",
  86580. "esnext.symbol.observable",
  86581. "esnext.symbol.pattern-match",
  86582. "esnext.weak-map.delete-all",
  86583. "esnext.weak-map.from",
  86584. "esnext.weak-map.of",
  86585. "esnext.weak-set.add-all",
  86586. "esnext.weak-set.delete-all",
  86587. "esnext.weak-set.from",
  86588. "esnext.weak-set.of",
  86589. "web.dom-collections.for-each",
  86590. "web.dom-collections.iterator",
  86591. "web.immediate",
  86592. "web.queue-microtask",
  86593. "web.timers",
  86594. "web.url",
  86595. "web.url.to-json",
  86596. "web.url-search-params"
  86597. ],
  86598. "3.1": [
  86599. "es.string.match-all",
  86600. "es.symbol.match-all",
  86601. "esnext.symbol.replace-all"
  86602. ],
  86603. "3.2": [
  86604. "es.promise.all-settled",
  86605. "esnext.array.is-template-object",
  86606. "esnext.map.update-or-insert",
  86607. "esnext.symbol.async-dispose"
  86608. ],
  86609. "3.3": [
  86610. "es.global-this",
  86611. "esnext.async-iterator.constructor",
  86612. "esnext.async-iterator.as-indexed-pairs",
  86613. "esnext.async-iterator.drop",
  86614. "esnext.async-iterator.every",
  86615. "esnext.async-iterator.filter",
  86616. "esnext.async-iterator.find",
  86617. "esnext.async-iterator.flat-map",
  86618. "esnext.async-iterator.for-each",
  86619. "esnext.async-iterator.from",
  86620. "esnext.async-iterator.map",
  86621. "esnext.async-iterator.reduce",
  86622. "esnext.async-iterator.some",
  86623. "esnext.async-iterator.take",
  86624. "esnext.async-iterator.to-array",
  86625. "esnext.iterator.constructor",
  86626. "esnext.iterator.as-indexed-pairs",
  86627. "esnext.iterator.drop",
  86628. "esnext.iterator.every",
  86629. "esnext.iterator.filter",
  86630. "esnext.iterator.find",
  86631. "esnext.iterator.flat-map",
  86632. "esnext.iterator.for-each",
  86633. "esnext.iterator.from",
  86634. "esnext.iterator.map",
  86635. "esnext.iterator.reduce",
  86636. "esnext.iterator.some",
  86637. "esnext.iterator.take",
  86638. "esnext.iterator.to-array",
  86639. "esnext.map.upsert",
  86640. "esnext.weak-map.upsert"
  86641. ],
  86642. "3.4": [
  86643. "es.json.stringify"
  86644. ],
  86645. "3.5": [
  86646. "esnext.object.iterate-entries",
  86647. "esnext.object.iterate-keys",
  86648. "esnext.object.iterate-values"
  86649. ],
  86650. "3.6": [
  86651. "es.regexp.sticky",
  86652. "es.regexp.test"
  86653. ],
  86654. "3.7": [
  86655. "es.aggregate-error",
  86656. "es.promise.any",
  86657. "es.reflect.to-string-tag",
  86658. "es.string.replace-all",
  86659. "esnext.map.emplace",
  86660. "esnext.weak-map.emplace"
  86661. ],
  86662. "3.8": [
  86663. "esnext.array.at",
  86664. "esnext.array.filter-out",
  86665. "esnext.array.unique-by",
  86666. "esnext.bigint.range",
  86667. "esnext.number.range",
  86668. "esnext.typed-array.at",
  86669. "esnext.typed-array.filter-out"
  86670. ],
  86671. "3.9": [
  86672. "esnext.array.find-last",
  86673. "esnext.array.find-last-index",
  86674. "esnext.typed-array.find-last",
  86675. "esnext.typed-array.find-last-index",
  86676. "esnext.typed-array.unique-by"
  86677. ],
  86678. "3.11": [
  86679. "esnext.object.has-own"
  86680. ],
  86681. "3.12": [
  86682. "esnext.symbol.matcher",
  86683. "esnext.symbol.metadata"
  86684. ],
  86685. "3.15": [
  86686. "es.date.get-year",
  86687. "es.date.set-year",
  86688. "es.date.to-gmt-string",
  86689. "es.escape",
  86690. "es.regexp.dot-all",
  86691. "es.string.substr",
  86692. "es.unescape"
  86693. ]
  86694. };
  86695. var modules = [
  86696. "es.symbol",
  86697. "es.symbol.description",
  86698. "es.symbol.async-iterator",
  86699. "es.symbol.has-instance",
  86700. "es.symbol.is-concat-spreadable",
  86701. "es.symbol.iterator",
  86702. "es.symbol.match",
  86703. "es.symbol.match-all",
  86704. "es.symbol.replace",
  86705. "es.symbol.search",
  86706. "es.symbol.species",
  86707. "es.symbol.split",
  86708. "es.symbol.to-primitive",
  86709. "es.symbol.to-string-tag",
  86710. "es.symbol.unscopables",
  86711. "es.aggregate-error",
  86712. "es.array.concat",
  86713. "es.array.copy-within",
  86714. "es.array.every",
  86715. "es.array.fill",
  86716. "es.array.filter",
  86717. "es.array.find",
  86718. "es.array.find-index",
  86719. "es.array.flat",
  86720. "es.array.flat-map",
  86721. "es.array.for-each",
  86722. "es.array.from",
  86723. "es.array.includes",
  86724. "es.array.index-of",
  86725. "es.array.is-array",
  86726. "es.array.iterator",
  86727. "es.array.join",
  86728. "es.array.last-index-of",
  86729. "es.array.map",
  86730. "es.array.of",
  86731. "es.array.reduce",
  86732. "es.array.reduce-right",
  86733. "es.array.reverse",
  86734. "es.array.slice",
  86735. "es.array.some",
  86736. "es.array.sort",
  86737. "es.array.species",
  86738. "es.array.splice",
  86739. "es.array.unscopables.flat",
  86740. "es.array.unscopables.flat-map",
  86741. "es.array-buffer.constructor",
  86742. "es.array-buffer.is-view",
  86743. "es.array-buffer.slice",
  86744. "es.data-view",
  86745. "es.date.get-year",
  86746. "es.date.now",
  86747. "es.date.set-year",
  86748. "es.date.to-gmt-string",
  86749. "es.date.to-iso-string",
  86750. "es.date.to-json",
  86751. "es.date.to-primitive",
  86752. "es.date.to-string",
  86753. "es.escape",
  86754. "es.function.bind",
  86755. "es.function.has-instance",
  86756. "es.function.name",
  86757. "es.global-this",
  86758. "es.json.stringify",
  86759. "es.json.to-string-tag",
  86760. "es.map",
  86761. "es.math.acosh",
  86762. "es.math.asinh",
  86763. "es.math.atanh",
  86764. "es.math.cbrt",
  86765. "es.math.clz32",
  86766. "es.math.cosh",
  86767. "es.math.expm1",
  86768. "es.math.fround",
  86769. "es.math.hypot",
  86770. "es.math.imul",
  86771. "es.math.log10",
  86772. "es.math.log1p",
  86773. "es.math.log2",
  86774. "es.math.sign",
  86775. "es.math.sinh",
  86776. "es.math.tanh",
  86777. "es.math.to-string-tag",
  86778. "es.math.trunc",
  86779. "es.number.constructor",
  86780. "es.number.epsilon",
  86781. "es.number.is-finite",
  86782. "es.number.is-integer",
  86783. "es.number.is-nan",
  86784. "es.number.is-safe-integer",
  86785. "es.number.max-safe-integer",
  86786. "es.number.min-safe-integer",
  86787. "es.number.parse-float",
  86788. "es.number.parse-int",
  86789. "es.number.to-fixed",
  86790. "es.number.to-precision",
  86791. "es.object.assign",
  86792. "es.object.create",
  86793. "es.object.define-getter",
  86794. "es.object.define-properties",
  86795. "es.object.define-property",
  86796. "es.object.define-setter",
  86797. "es.object.entries",
  86798. "es.object.freeze",
  86799. "es.object.from-entries",
  86800. "es.object.get-own-property-descriptor",
  86801. "es.object.get-own-property-descriptors",
  86802. "es.object.get-own-property-names",
  86803. "es.object.get-prototype-of",
  86804. "es.object.is",
  86805. "es.object.is-extensible",
  86806. "es.object.is-frozen",
  86807. "es.object.is-sealed",
  86808. "es.object.keys",
  86809. "es.object.lookup-getter",
  86810. "es.object.lookup-setter",
  86811. "es.object.prevent-extensions",
  86812. "es.object.seal",
  86813. "es.object.set-prototype-of",
  86814. "es.object.to-string",
  86815. "es.object.values",
  86816. "es.parse-float",
  86817. "es.parse-int",
  86818. "es.promise",
  86819. "es.promise.all-settled",
  86820. "es.promise.any",
  86821. "es.promise.finally",
  86822. "es.reflect.apply",
  86823. "es.reflect.construct",
  86824. "es.reflect.define-property",
  86825. "es.reflect.delete-property",
  86826. "es.reflect.get",
  86827. "es.reflect.get-own-property-descriptor",
  86828. "es.reflect.get-prototype-of",
  86829. "es.reflect.has",
  86830. "es.reflect.is-extensible",
  86831. "es.reflect.own-keys",
  86832. "es.reflect.prevent-extensions",
  86833. "es.reflect.set",
  86834. "es.reflect.set-prototype-of",
  86835. "es.reflect.to-string-tag",
  86836. "es.regexp.constructor",
  86837. "es.regexp.dot-all",
  86838. "es.regexp.exec",
  86839. "es.regexp.flags",
  86840. "es.regexp.sticky",
  86841. "es.regexp.test",
  86842. "es.regexp.to-string",
  86843. "es.set",
  86844. "es.string.code-point-at",
  86845. "es.string.ends-with",
  86846. "es.string.from-code-point",
  86847. "es.string.includes",
  86848. "es.string.iterator",
  86849. "es.string.match",
  86850. "es.string.match-all",
  86851. "es.string.pad-end",
  86852. "es.string.pad-start",
  86853. "es.string.raw",
  86854. "es.string.repeat",
  86855. "es.string.replace",
  86856. "es.string.replace-all",
  86857. "es.string.search",
  86858. "es.string.split",
  86859. "es.string.starts-with",
  86860. "es.string.substr",
  86861. "es.string.trim",
  86862. "es.string.trim-end",
  86863. "es.string.trim-start",
  86864. "es.string.anchor",
  86865. "es.string.big",
  86866. "es.string.blink",
  86867. "es.string.bold",
  86868. "es.string.fixed",
  86869. "es.string.fontcolor",
  86870. "es.string.fontsize",
  86871. "es.string.italics",
  86872. "es.string.link",
  86873. "es.string.small",
  86874. "es.string.strike",
  86875. "es.string.sub",
  86876. "es.string.sup",
  86877. "es.typed-array.float32-array",
  86878. "es.typed-array.float64-array",
  86879. "es.typed-array.int8-array",
  86880. "es.typed-array.int16-array",
  86881. "es.typed-array.int32-array",
  86882. "es.typed-array.uint8-array",
  86883. "es.typed-array.uint8-clamped-array",
  86884. "es.typed-array.uint16-array",
  86885. "es.typed-array.uint32-array",
  86886. "es.typed-array.copy-within",
  86887. "es.typed-array.every",
  86888. "es.typed-array.fill",
  86889. "es.typed-array.filter",
  86890. "es.typed-array.find",
  86891. "es.typed-array.find-index",
  86892. "es.typed-array.for-each",
  86893. "es.typed-array.from",
  86894. "es.typed-array.includes",
  86895. "es.typed-array.index-of",
  86896. "es.typed-array.iterator",
  86897. "es.typed-array.join",
  86898. "es.typed-array.last-index-of",
  86899. "es.typed-array.map",
  86900. "es.typed-array.of",
  86901. "es.typed-array.reduce",
  86902. "es.typed-array.reduce-right",
  86903. "es.typed-array.reverse",
  86904. "es.typed-array.set",
  86905. "es.typed-array.slice",
  86906. "es.typed-array.some",
  86907. "es.typed-array.sort",
  86908. "es.typed-array.subarray",
  86909. "es.typed-array.to-locale-string",
  86910. "es.typed-array.to-string",
  86911. "es.unescape",
  86912. "es.weak-map",
  86913. "es.weak-set",
  86914. "esnext.aggregate-error",
  86915. "esnext.array.at",
  86916. "esnext.array.filter-out",
  86917. "esnext.array.find-last",
  86918. "esnext.array.find-last-index",
  86919. "esnext.array.is-template-object",
  86920. "esnext.array.last-index",
  86921. "esnext.array.last-item",
  86922. "esnext.array.unique-by",
  86923. "esnext.async-iterator.constructor",
  86924. "esnext.async-iterator.as-indexed-pairs",
  86925. "esnext.async-iterator.drop",
  86926. "esnext.async-iterator.every",
  86927. "esnext.async-iterator.filter",
  86928. "esnext.async-iterator.find",
  86929. "esnext.async-iterator.flat-map",
  86930. "esnext.async-iterator.for-each",
  86931. "esnext.async-iterator.from",
  86932. "esnext.async-iterator.map",
  86933. "esnext.async-iterator.reduce",
  86934. "esnext.async-iterator.some",
  86935. "esnext.async-iterator.take",
  86936. "esnext.async-iterator.to-array",
  86937. "esnext.bigint.range",
  86938. "esnext.composite-key",
  86939. "esnext.composite-symbol",
  86940. "esnext.global-this",
  86941. "esnext.iterator.constructor",
  86942. "esnext.iterator.as-indexed-pairs",
  86943. "esnext.iterator.drop",
  86944. "esnext.iterator.every",
  86945. "esnext.iterator.filter",
  86946. "esnext.iterator.find",
  86947. "esnext.iterator.flat-map",
  86948. "esnext.iterator.for-each",
  86949. "esnext.iterator.from",
  86950. "esnext.iterator.map",
  86951. "esnext.iterator.reduce",
  86952. "esnext.iterator.some",
  86953. "esnext.iterator.take",
  86954. "esnext.iterator.to-array",
  86955. "esnext.map.delete-all",
  86956. "esnext.map.emplace",
  86957. "esnext.map.every",
  86958. "esnext.map.filter",
  86959. "esnext.map.find",
  86960. "esnext.map.find-key",
  86961. "esnext.map.from",
  86962. "esnext.map.group-by",
  86963. "esnext.map.includes",
  86964. "esnext.map.key-by",
  86965. "esnext.map.key-of",
  86966. "esnext.map.map-keys",
  86967. "esnext.map.map-values",
  86968. "esnext.map.merge",
  86969. "esnext.map.of",
  86970. "esnext.map.reduce",
  86971. "esnext.map.some",
  86972. "esnext.map.update",
  86973. "esnext.map.update-or-insert",
  86974. "esnext.map.upsert",
  86975. "esnext.math.clamp",
  86976. "esnext.math.deg-per-rad",
  86977. "esnext.math.degrees",
  86978. "esnext.math.fscale",
  86979. "esnext.math.iaddh",
  86980. "esnext.math.imulh",
  86981. "esnext.math.isubh",
  86982. "esnext.math.rad-per-deg",
  86983. "esnext.math.radians",
  86984. "esnext.math.scale",
  86985. "esnext.math.seeded-prng",
  86986. "esnext.math.signbit",
  86987. "esnext.math.umulh",
  86988. "esnext.number.from-string",
  86989. "esnext.number.range",
  86990. "esnext.object.has-own",
  86991. "esnext.object.iterate-entries",
  86992. "esnext.object.iterate-keys",
  86993. "esnext.object.iterate-values",
  86994. "esnext.observable",
  86995. "esnext.promise.all-settled",
  86996. "esnext.promise.any",
  86997. "esnext.promise.try",
  86998. "esnext.reflect.define-metadata",
  86999. "esnext.reflect.delete-metadata",
  87000. "esnext.reflect.get-metadata",
  87001. "esnext.reflect.get-metadata-keys",
  87002. "esnext.reflect.get-own-metadata",
  87003. "esnext.reflect.get-own-metadata-keys",
  87004. "esnext.reflect.has-metadata",
  87005. "esnext.reflect.has-own-metadata",
  87006. "esnext.reflect.metadata",
  87007. "esnext.set.add-all",
  87008. "esnext.set.delete-all",
  87009. "esnext.set.difference",
  87010. "esnext.set.every",
  87011. "esnext.set.filter",
  87012. "esnext.set.find",
  87013. "esnext.set.from",
  87014. "esnext.set.intersection",
  87015. "esnext.set.is-disjoint-from",
  87016. "esnext.set.is-subset-of",
  87017. "esnext.set.is-superset-of",
  87018. "esnext.set.join",
  87019. "esnext.set.map",
  87020. "esnext.set.of",
  87021. "esnext.set.reduce",
  87022. "esnext.set.some",
  87023. "esnext.set.symmetric-difference",
  87024. "esnext.set.union",
  87025. "esnext.string.at",
  87026. "esnext.string.code-points",
  87027. "esnext.string.match-all",
  87028. "esnext.string.replace-all",
  87029. "esnext.symbol.async-dispose",
  87030. "esnext.symbol.dispose",
  87031. "esnext.symbol.matcher",
  87032. "esnext.symbol.metadata",
  87033. "esnext.symbol.observable",
  87034. "esnext.symbol.pattern-match",
  87035. "esnext.symbol.replace-all",
  87036. "esnext.typed-array.at",
  87037. "esnext.typed-array.filter-out",
  87038. "esnext.typed-array.find-last",
  87039. "esnext.typed-array.find-last-index",
  87040. "esnext.typed-array.unique-by",
  87041. "esnext.weak-map.delete-all",
  87042. "esnext.weak-map.from",
  87043. "esnext.weak-map.of",
  87044. "esnext.weak-map.emplace",
  87045. "esnext.weak-map.upsert",
  87046. "esnext.weak-set.add-all",
  87047. "esnext.weak-set.delete-all",
  87048. "esnext.weak-set.from",
  87049. "esnext.weak-set.of",
  87050. "web.dom-collections.for-each",
  87051. "web.dom-collections.iterator",
  87052. "web.immediate",
  87053. "web.queue-microtask",
  87054. "web.timers",
  87055. "web.url",
  87056. "web.url.to-json",
  87057. "web.url-search-params"
  87058. ];
  87059. var compare = helpers.compare,
  87060. intersection$1 = helpers.intersection,
  87061. semver$1 = helpers.semver;
  87062. var getModulesListForTargetVersion$2 = function getModulesListForTargetVersion(raw) {
  87063. var corejs = semver$1(raw);
  87064. if (corejs.major !== 3) {
  87065. throw RangeError('This version of `core-js-compat` works only with `core-js@3`.');
  87066. }
  87067. var result = [];
  87068. for (var _i = 0, _Object$keys = Object.keys(modulesByVersions); _i < _Object$keys.length; _i++) {
  87069. var version = _Object$keys[_i];
  87070. if (compare(version, '<=', corejs)) {
  87071. result.push.apply(result, _toConsumableArray(modulesByVersions[version]));
  87072. }
  87073. }
  87074. return intersection$1(result, modules);
  87075. };
  87076. var getModulesListForTargetVersion$1 = getModulesListForTargetVersion$2;
  87077. var require$$0$2 = {
  87078. "core-js": [
  87079. "es.symbol",
  87080. "es.symbol.description",
  87081. "es.symbol.async-iterator",
  87082. "es.symbol.has-instance",
  87083. "es.symbol.is-concat-spreadable",
  87084. "es.symbol.iterator",
  87085. "es.symbol.match",
  87086. "es.symbol.match-all",
  87087. "es.symbol.replace",
  87088. "es.symbol.search",
  87089. "es.symbol.species",
  87090. "es.symbol.split",
  87091. "es.symbol.to-primitive",
  87092. "es.symbol.to-string-tag",
  87093. "es.symbol.unscopables",
  87094. "es.aggregate-error",
  87095. "es.array.concat",
  87096. "es.array.copy-within",
  87097. "es.array.every",
  87098. "es.array.fill",
  87099. "es.array.filter",
  87100. "es.array.find",
  87101. "es.array.find-index",
  87102. "es.array.flat",
  87103. "es.array.flat-map",
  87104. "es.array.for-each",
  87105. "es.array.from",
  87106. "es.array.includes",
  87107. "es.array.index-of",
  87108. "es.array.is-array",
  87109. "es.array.iterator",
  87110. "es.array.join",
  87111. "es.array.last-index-of",
  87112. "es.array.map",
  87113. "es.array.of",
  87114. "es.array.reduce",
  87115. "es.array.reduce-right",
  87116. "es.array.reverse",
  87117. "es.array.slice",
  87118. "es.array.some",
  87119. "es.array.sort",
  87120. "es.array.species",
  87121. "es.array.splice",
  87122. "es.array.unscopables.flat",
  87123. "es.array.unscopables.flat-map",
  87124. "es.array-buffer.constructor",
  87125. "es.array-buffer.is-view",
  87126. "es.array-buffer.slice",
  87127. "es.data-view",
  87128. "es.date.get-year",
  87129. "es.date.now",
  87130. "es.date.set-year",
  87131. "es.date.to-gmt-string",
  87132. "es.date.to-iso-string",
  87133. "es.date.to-json",
  87134. "es.date.to-primitive",
  87135. "es.date.to-string",
  87136. "es.escape",
  87137. "es.function.bind",
  87138. "es.function.has-instance",
  87139. "es.function.name",
  87140. "es.global-this",
  87141. "es.json.stringify",
  87142. "es.json.to-string-tag",
  87143. "es.map",
  87144. "es.math.acosh",
  87145. "es.math.asinh",
  87146. "es.math.atanh",
  87147. "es.math.cbrt",
  87148. "es.math.clz32",
  87149. "es.math.cosh",
  87150. "es.math.expm1",
  87151. "es.math.fround",
  87152. "es.math.hypot",
  87153. "es.math.imul",
  87154. "es.math.log10",
  87155. "es.math.log1p",
  87156. "es.math.log2",
  87157. "es.math.sign",
  87158. "es.math.sinh",
  87159. "es.math.tanh",
  87160. "es.math.to-string-tag",
  87161. "es.math.trunc",
  87162. "es.number.constructor",
  87163. "es.number.epsilon",
  87164. "es.number.is-finite",
  87165. "es.number.is-integer",
  87166. "es.number.is-nan",
  87167. "es.number.is-safe-integer",
  87168. "es.number.max-safe-integer",
  87169. "es.number.min-safe-integer",
  87170. "es.number.parse-float",
  87171. "es.number.parse-int",
  87172. "es.number.to-fixed",
  87173. "es.number.to-precision",
  87174. "es.object.assign",
  87175. "es.object.create",
  87176. "es.object.define-getter",
  87177. "es.object.define-properties",
  87178. "es.object.define-property",
  87179. "es.object.define-setter",
  87180. "es.object.entries",
  87181. "es.object.freeze",
  87182. "es.object.from-entries",
  87183. "es.object.get-own-property-descriptor",
  87184. "es.object.get-own-property-descriptors",
  87185. "es.object.get-own-property-names",
  87186. "es.object.get-prototype-of",
  87187. "es.object.is",
  87188. "es.object.is-extensible",
  87189. "es.object.is-frozen",
  87190. "es.object.is-sealed",
  87191. "es.object.keys",
  87192. "es.object.lookup-getter",
  87193. "es.object.lookup-setter",
  87194. "es.object.prevent-extensions",
  87195. "es.object.seal",
  87196. "es.object.set-prototype-of",
  87197. "es.object.to-string",
  87198. "es.object.values",
  87199. "es.parse-float",
  87200. "es.parse-int",
  87201. "es.promise",
  87202. "es.promise.all-settled",
  87203. "es.promise.any",
  87204. "es.promise.finally",
  87205. "es.reflect.apply",
  87206. "es.reflect.construct",
  87207. "es.reflect.define-property",
  87208. "es.reflect.delete-property",
  87209. "es.reflect.get",
  87210. "es.reflect.get-own-property-descriptor",
  87211. "es.reflect.get-prototype-of",
  87212. "es.reflect.has",
  87213. "es.reflect.is-extensible",
  87214. "es.reflect.own-keys",
  87215. "es.reflect.prevent-extensions",
  87216. "es.reflect.set",
  87217. "es.reflect.set-prototype-of",
  87218. "es.reflect.to-string-tag",
  87219. "es.regexp.constructor",
  87220. "es.regexp.dot-all",
  87221. "es.regexp.exec",
  87222. "es.regexp.flags",
  87223. "es.regexp.sticky",
  87224. "es.regexp.test",
  87225. "es.regexp.to-string",
  87226. "es.set",
  87227. "es.string.code-point-at",
  87228. "es.string.ends-with",
  87229. "es.string.from-code-point",
  87230. "es.string.includes",
  87231. "es.string.iterator",
  87232. "es.string.match",
  87233. "es.string.match-all",
  87234. "es.string.pad-end",
  87235. "es.string.pad-start",
  87236. "es.string.raw",
  87237. "es.string.repeat",
  87238. "es.string.replace",
  87239. "es.string.replace-all",
  87240. "es.string.search",
  87241. "es.string.split",
  87242. "es.string.starts-with",
  87243. "es.string.substr",
  87244. "es.string.trim",
  87245. "es.string.trim-end",
  87246. "es.string.trim-start",
  87247. "es.string.anchor",
  87248. "es.string.big",
  87249. "es.string.blink",
  87250. "es.string.bold",
  87251. "es.string.fixed",
  87252. "es.string.fontcolor",
  87253. "es.string.fontsize",
  87254. "es.string.italics",
  87255. "es.string.link",
  87256. "es.string.small",
  87257. "es.string.strike",
  87258. "es.string.sub",
  87259. "es.string.sup",
  87260. "es.typed-array.float32-array",
  87261. "es.typed-array.float64-array",
  87262. "es.typed-array.int8-array",
  87263. "es.typed-array.int16-array",
  87264. "es.typed-array.int32-array",
  87265. "es.typed-array.uint8-array",
  87266. "es.typed-array.uint8-clamped-array",
  87267. "es.typed-array.uint16-array",
  87268. "es.typed-array.uint32-array",
  87269. "es.typed-array.copy-within",
  87270. "es.typed-array.every",
  87271. "es.typed-array.fill",
  87272. "es.typed-array.filter",
  87273. "es.typed-array.find",
  87274. "es.typed-array.find-index",
  87275. "es.typed-array.for-each",
  87276. "es.typed-array.from",
  87277. "es.typed-array.includes",
  87278. "es.typed-array.index-of",
  87279. "es.typed-array.iterator",
  87280. "es.typed-array.join",
  87281. "es.typed-array.last-index-of",
  87282. "es.typed-array.map",
  87283. "es.typed-array.of",
  87284. "es.typed-array.reduce",
  87285. "es.typed-array.reduce-right",
  87286. "es.typed-array.reverse",
  87287. "es.typed-array.set",
  87288. "es.typed-array.slice",
  87289. "es.typed-array.some",
  87290. "es.typed-array.sort",
  87291. "es.typed-array.subarray",
  87292. "es.typed-array.to-locale-string",
  87293. "es.typed-array.to-string",
  87294. "es.unescape",
  87295. "es.weak-map",
  87296. "es.weak-set",
  87297. "esnext.aggregate-error",
  87298. "esnext.array.at",
  87299. "esnext.array.filter-out",
  87300. "esnext.array.find-last",
  87301. "esnext.array.find-last-index",
  87302. "esnext.array.is-template-object",
  87303. "esnext.array.last-index",
  87304. "esnext.array.last-item",
  87305. "esnext.array.unique-by",
  87306. "esnext.async-iterator.constructor",
  87307. "esnext.async-iterator.as-indexed-pairs",
  87308. "esnext.async-iterator.drop",
  87309. "esnext.async-iterator.every",
  87310. "esnext.async-iterator.filter",
  87311. "esnext.async-iterator.find",
  87312. "esnext.async-iterator.flat-map",
  87313. "esnext.async-iterator.for-each",
  87314. "esnext.async-iterator.from",
  87315. "esnext.async-iterator.map",
  87316. "esnext.async-iterator.reduce",
  87317. "esnext.async-iterator.some",
  87318. "esnext.async-iterator.take",
  87319. "esnext.async-iterator.to-array",
  87320. "esnext.bigint.range",
  87321. "esnext.composite-key",
  87322. "esnext.composite-symbol",
  87323. "esnext.global-this",
  87324. "esnext.iterator.constructor",
  87325. "esnext.iterator.as-indexed-pairs",
  87326. "esnext.iterator.drop",
  87327. "esnext.iterator.every",
  87328. "esnext.iterator.filter",
  87329. "esnext.iterator.find",
  87330. "esnext.iterator.flat-map",
  87331. "esnext.iterator.for-each",
  87332. "esnext.iterator.from",
  87333. "esnext.iterator.map",
  87334. "esnext.iterator.reduce",
  87335. "esnext.iterator.some",
  87336. "esnext.iterator.take",
  87337. "esnext.iterator.to-array",
  87338. "esnext.map.delete-all",
  87339. "esnext.map.emplace",
  87340. "esnext.map.every",
  87341. "esnext.map.filter",
  87342. "esnext.map.find",
  87343. "esnext.map.find-key",
  87344. "esnext.map.from",
  87345. "esnext.map.group-by",
  87346. "esnext.map.includes",
  87347. "esnext.map.key-by",
  87348. "esnext.map.key-of",
  87349. "esnext.map.map-keys",
  87350. "esnext.map.map-values",
  87351. "esnext.map.merge",
  87352. "esnext.map.of",
  87353. "esnext.map.reduce",
  87354. "esnext.map.some",
  87355. "esnext.map.update",
  87356. "esnext.map.update-or-insert",
  87357. "esnext.map.upsert",
  87358. "esnext.math.clamp",
  87359. "esnext.math.deg-per-rad",
  87360. "esnext.math.degrees",
  87361. "esnext.math.fscale",
  87362. "esnext.math.iaddh",
  87363. "esnext.math.imulh",
  87364. "esnext.math.isubh",
  87365. "esnext.math.rad-per-deg",
  87366. "esnext.math.radians",
  87367. "esnext.math.scale",
  87368. "esnext.math.seeded-prng",
  87369. "esnext.math.signbit",
  87370. "esnext.math.umulh",
  87371. "esnext.number.from-string",
  87372. "esnext.number.range",
  87373. "esnext.object.has-own",
  87374. "esnext.object.iterate-entries",
  87375. "esnext.object.iterate-keys",
  87376. "esnext.object.iterate-values",
  87377. "esnext.observable",
  87378. "esnext.promise.all-settled",
  87379. "esnext.promise.any",
  87380. "esnext.promise.try",
  87381. "esnext.reflect.define-metadata",
  87382. "esnext.reflect.delete-metadata",
  87383. "esnext.reflect.get-metadata",
  87384. "esnext.reflect.get-metadata-keys",
  87385. "esnext.reflect.get-own-metadata",
  87386. "esnext.reflect.get-own-metadata-keys",
  87387. "esnext.reflect.has-metadata",
  87388. "esnext.reflect.has-own-metadata",
  87389. "esnext.reflect.metadata",
  87390. "esnext.set.add-all",
  87391. "esnext.set.delete-all",
  87392. "esnext.set.difference",
  87393. "esnext.set.every",
  87394. "esnext.set.filter",
  87395. "esnext.set.find",
  87396. "esnext.set.from",
  87397. "esnext.set.intersection",
  87398. "esnext.set.is-disjoint-from",
  87399. "esnext.set.is-subset-of",
  87400. "esnext.set.is-superset-of",
  87401. "esnext.set.join",
  87402. "esnext.set.map",
  87403. "esnext.set.of",
  87404. "esnext.set.reduce",
  87405. "esnext.set.some",
  87406. "esnext.set.symmetric-difference",
  87407. "esnext.set.union",
  87408. "esnext.string.at",
  87409. "esnext.string.code-points",
  87410. "esnext.string.match-all",
  87411. "esnext.string.replace-all",
  87412. "esnext.symbol.async-dispose",
  87413. "esnext.symbol.dispose",
  87414. "esnext.symbol.matcher",
  87415. "esnext.symbol.metadata",
  87416. "esnext.symbol.observable",
  87417. "esnext.symbol.pattern-match",
  87418. "esnext.symbol.replace-all",
  87419. "esnext.typed-array.at",
  87420. "esnext.typed-array.filter-out",
  87421. "esnext.typed-array.find-last",
  87422. "esnext.typed-array.find-last-index",
  87423. "esnext.typed-array.unique-by",
  87424. "esnext.weak-map.delete-all",
  87425. "esnext.weak-map.from",
  87426. "esnext.weak-map.of",
  87427. "esnext.weak-map.emplace",
  87428. "esnext.weak-map.upsert",
  87429. "esnext.weak-set.add-all",
  87430. "esnext.weak-set.delete-all",
  87431. "esnext.weak-set.from",
  87432. "esnext.weak-set.of",
  87433. "web.dom-collections.for-each",
  87434. "web.dom-collections.iterator",
  87435. "web.immediate",
  87436. "web.queue-microtask",
  87437. "web.timers",
  87438. "web.url",
  87439. "web.url.to-json",
  87440. "web.url-search-params"
  87441. ],
  87442. "core-js/es": [
  87443. "es.symbol",
  87444. "es.symbol.description",
  87445. "es.symbol.async-iterator",
  87446. "es.symbol.has-instance",
  87447. "es.symbol.is-concat-spreadable",
  87448. "es.symbol.iterator",
  87449. "es.symbol.match",
  87450. "es.symbol.match-all",
  87451. "es.symbol.replace",
  87452. "es.symbol.search",
  87453. "es.symbol.species",
  87454. "es.symbol.split",
  87455. "es.symbol.to-primitive",
  87456. "es.symbol.to-string-tag",
  87457. "es.symbol.unscopables",
  87458. "es.aggregate-error",
  87459. "es.array.concat",
  87460. "es.array.copy-within",
  87461. "es.array.every",
  87462. "es.array.fill",
  87463. "es.array.filter",
  87464. "es.array.find",
  87465. "es.array.find-index",
  87466. "es.array.flat",
  87467. "es.array.flat-map",
  87468. "es.array.for-each",
  87469. "es.array.from",
  87470. "es.array.includes",
  87471. "es.array.index-of",
  87472. "es.array.is-array",
  87473. "es.array.iterator",
  87474. "es.array.join",
  87475. "es.array.last-index-of",
  87476. "es.array.map",
  87477. "es.array.of",
  87478. "es.array.reduce",
  87479. "es.array.reduce-right",
  87480. "es.array.reverse",
  87481. "es.array.slice",
  87482. "es.array.some",
  87483. "es.array.sort",
  87484. "es.array.species",
  87485. "es.array.splice",
  87486. "es.array.unscopables.flat",
  87487. "es.array.unscopables.flat-map",
  87488. "es.array-buffer.constructor",
  87489. "es.array-buffer.is-view",
  87490. "es.array-buffer.slice",
  87491. "es.data-view",
  87492. "es.date.get-year",
  87493. "es.date.now",
  87494. "es.date.set-year",
  87495. "es.date.to-gmt-string",
  87496. "es.date.to-iso-string",
  87497. "es.date.to-json",
  87498. "es.date.to-primitive",
  87499. "es.date.to-string",
  87500. "es.escape",
  87501. "es.function.bind",
  87502. "es.function.has-instance",
  87503. "es.function.name",
  87504. "es.global-this",
  87505. "es.json.stringify",
  87506. "es.json.to-string-tag",
  87507. "es.map",
  87508. "es.math.acosh",
  87509. "es.math.asinh",
  87510. "es.math.atanh",
  87511. "es.math.cbrt",
  87512. "es.math.clz32",
  87513. "es.math.cosh",
  87514. "es.math.expm1",
  87515. "es.math.fround",
  87516. "es.math.hypot",
  87517. "es.math.imul",
  87518. "es.math.log10",
  87519. "es.math.log1p",
  87520. "es.math.log2",
  87521. "es.math.sign",
  87522. "es.math.sinh",
  87523. "es.math.tanh",
  87524. "es.math.to-string-tag",
  87525. "es.math.trunc",
  87526. "es.number.constructor",
  87527. "es.number.epsilon",
  87528. "es.number.is-finite",
  87529. "es.number.is-integer",
  87530. "es.number.is-nan",
  87531. "es.number.is-safe-integer",
  87532. "es.number.max-safe-integer",
  87533. "es.number.min-safe-integer",
  87534. "es.number.parse-float",
  87535. "es.number.parse-int",
  87536. "es.number.to-fixed",
  87537. "es.number.to-precision",
  87538. "es.object.assign",
  87539. "es.object.create",
  87540. "es.object.define-getter",
  87541. "es.object.define-properties",
  87542. "es.object.define-property",
  87543. "es.object.define-setter",
  87544. "es.object.entries",
  87545. "es.object.freeze",
  87546. "es.object.from-entries",
  87547. "es.object.get-own-property-descriptor",
  87548. "es.object.get-own-property-descriptors",
  87549. "es.object.get-own-property-names",
  87550. "es.object.get-prototype-of",
  87551. "es.object.is",
  87552. "es.object.is-extensible",
  87553. "es.object.is-frozen",
  87554. "es.object.is-sealed",
  87555. "es.object.keys",
  87556. "es.object.lookup-getter",
  87557. "es.object.lookup-setter",
  87558. "es.object.prevent-extensions",
  87559. "es.object.seal",
  87560. "es.object.set-prototype-of",
  87561. "es.object.to-string",
  87562. "es.object.values",
  87563. "es.parse-float",
  87564. "es.parse-int",
  87565. "es.promise",
  87566. "es.promise.all-settled",
  87567. "es.promise.any",
  87568. "es.promise.finally",
  87569. "es.reflect.apply",
  87570. "es.reflect.construct",
  87571. "es.reflect.define-property",
  87572. "es.reflect.delete-property",
  87573. "es.reflect.get",
  87574. "es.reflect.get-own-property-descriptor",
  87575. "es.reflect.get-prototype-of",
  87576. "es.reflect.has",
  87577. "es.reflect.is-extensible",
  87578. "es.reflect.own-keys",
  87579. "es.reflect.prevent-extensions",
  87580. "es.reflect.set",
  87581. "es.reflect.set-prototype-of",
  87582. "es.reflect.to-string-tag",
  87583. "es.regexp.constructor",
  87584. "es.regexp.dot-all",
  87585. "es.regexp.exec",
  87586. "es.regexp.flags",
  87587. "es.regexp.sticky",
  87588. "es.regexp.test",
  87589. "es.regexp.to-string",
  87590. "es.set",
  87591. "es.string.code-point-at",
  87592. "es.string.ends-with",
  87593. "es.string.from-code-point",
  87594. "es.string.includes",
  87595. "es.string.iterator",
  87596. "es.string.match",
  87597. "es.string.match-all",
  87598. "es.string.pad-end",
  87599. "es.string.pad-start",
  87600. "es.string.raw",
  87601. "es.string.repeat",
  87602. "es.string.replace",
  87603. "es.string.replace-all",
  87604. "es.string.search",
  87605. "es.string.split",
  87606. "es.string.starts-with",
  87607. "es.string.substr",
  87608. "es.string.trim",
  87609. "es.string.trim-end",
  87610. "es.string.trim-start",
  87611. "es.string.anchor",
  87612. "es.string.big",
  87613. "es.string.blink",
  87614. "es.string.bold",
  87615. "es.string.fixed",
  87616. "es.string.fontcolor",
  87617. "es.string.fontsize",
  87618. "es.string.italics",
  87619. "es.string.link",
  87620. "es.string.small",
  87621. "es.string.strike",
  87622. "es.string.sub",
  87623. "es.string.sup",
  87624. "es.typed-array.float32-array",
  87625. "es.typed-array.float64-array",
  87626. "es.typed-array.int8-array",
  87627. "es.typed-array.int16-array",
  87628. "es.typed-array.int32-array",
  87629. "es.typed-array.uint8-array",
  87630. "es.typed-array.uint8-clamped-array",
  87631. "es.typed-array.uint16-array",
  87632. "es.typed-array.uint32-array",
  87633. "es.typed-array.copy-within",
  87634. "es.typed-array.every",
  87635. "es.typed-array.fill",
  87636. "es.typed-array.filter",
  87637. "es.typed-array.find",
  87638. "es.typed-array.find-index",
  87639. "es.typed-array.for-each",
  87640. "es.typed-array.from",
  87641. "es.typed-array.includes",
  87642. "es.typed-array.index-of",
  87643. "es.typed-array.iterator",
  87644. "es.typed-array.join",
  87645. "es.typed-array.last-index-of",
  87646. "es.typed-array.map",
  87647. "es.typed-array.of",
  87648. "es.typed-array.reduce",
  87649. "es.typed-array.reduce-right",
  87650. "es.typed-array.reverse",
  87651. "es.typed-array.set",
  87652. "es.typed-array.slice",
  87653. "es.typed-array.some",
  87654. "es.typed-array.sort",
  87655. "es.typed-array.subarray",
  87656. "es.typed-array.to-locale-string",
  87657. "es.typed-array.to-string",
  87658. "es.unescape",
  87659. "es.weak-map",
  87660. "es.weak-set"
  87661. ],
  87662. "core-js/es/aggregate-error": [
  87663. "es.aggregate-error",
  87664. "es.string.iterator",
  87665. "web.dom-collections.iterator"
  87666. ],
  87667. "core-js/es/array": [
  87668. "es.array.concat",
  87669. "es.array.copy-within",
  87670. "es.array.every",
  87671. "es.array.fill",
  87672. "es.array.filter",
  87673. "es.array.find",
  87674. "es.array.find-index",
  87675. "es.array.flat",
  87676. "es.array.flat-map",
  87677. "es.array.for-each",
  87678. "es.array.from",
  87679. "es.array.includes",
  87680. "es.array.index-of",
  87681. "es.array.is-array",
  87682. "es.array.iterator",
  87683. "es.array.join",
  87684. "es.array.last-index-of",
  87685. "es.array.map",
  87686. "es.array.of",
  87687. "es.array.reduce",
  87688. "es.array.reduce-right",
  87689. "es.array.reverse",
  87690. "es.array.slice",
  87691. "es.array.some",
  87692. "es.array.sort",
  87693. "es.array.species",
  87694. "es.array.splice",
  87695. "es.array.unscopables.flat",
  87696. "es.array.unscopables.flat-map",
  87697. "es.string.iterator"
  87698. ],
  87699. "core-js/es/array-buffer": [
  87700. "es.array-buffer.constructor",
  87701. "es.array-buffer.is-view",
  87702. "es.array-buffer.slice",
  87703. "es.object.to-string"
  87704. ],
  87705. "core-js/es/array-buffer/constructor": [
  87706. "es.array-buffer.constructor",
  87707. "es.object.to-string"
  87708. ],
  87709. "core-js/es/array-buffer/is-view": [
  87710. "es.array-buffer.is-view"
  87711. ],
  87712. "core-js/es/array-buffer/slice": [
  87713. "es.array-buffer.slice"
  87714. ],
  87715. "core-js/es/array/concat": [
  87716. "es.array.concat"
  87717. ],
  87718. "core-js/es/array/copy-within": [
  87719. "es.array.copy-within"
  87720. ],
  87721. "core-js/es/array/entries": [
  87722. "es.array.iterator"
  87723. ],
  87724. "core-js/es/array/every": [
  87725. "es.array.every"
  87726. ],
  87727. "core-js/es/array/fill": [
  87728. "es.array.fill"
  87729. ],
  87730. "core-js/es/array/filter": [
  87731. "es.array.filter"
  87732. ],
  87733. "core-js/es/array/find": [
  87734. "es.array.find"
  87735. ],
  87736. "core-js/es/array/find-index": [
  87737. "es.array.find-index"
  87738. ],
  87739. "core-js/es/array/flat": [
  87740. "es.array.flat",
  87741. "es.array.unscopables.flat"
  87742. ],
  87743. "core-js/es/array/flat-map": [
  87744. "es.array.flat-map",
  87745. "es.array.unscopables.flat-map"
  87746. ],
  87747. "core-js/es/array/for-each": [
  87748. "es.array.for-each"
  87749. ],
  87750. "core-js/es/array/from": [
  87751. "es.array.from",
  87752. "es.string.iterator"
  87753. ],
  87754. "core-js/es/array/includes": [
  87755. "es.array.includes"
  87756. ],
  87757. "core-js/es/array/index-of": [
  87758. "es.array.index-of"
  87759. ],
  87760. "core-js/es/array/is-array": [
  87761. "es.array.is-array"
  87762. ],
  87763. "core-js/es/array/iterator": [
  87764. "es.array.iterator"
  87765. ],
  87766. "core-js/es/array/join": [
  87767. "es.array.join"
  87768. ],
  87769. "core-js/es/array/keys": [
  87770. "es.array.iterator"
  87771. ],
  87772. "core-js/es/array/last-index-of": [
  87773. "es.array.last-index-of"
  87774. ],
  87775. "core-js/es/array/map": [
  87776. "es.array.map"
  87777. ],
  87778. "core-js/es/array/of": [
  87779. "es.array.of"
  87780. ],
  87781. "core-js/es/array/reduce": [
  87782. "es.array.reduce"
  87783. ],
  87784. "core-js/es/array/reduce-right": [
  87785. "es.array.reduce-right"
  87786. ],
  87787. "core-js/es/array/reverse": [
  87788. "es.array.reverse"
  87789. ],
  87790. "core-js/es/array/slice": [
  87791. "es.array.slice"
  87792. ],
  87793. "core-js/es/array/some": [
  87794. "es.array.some"
  87795. ],
  87796. "core-js/es/array/sort": [
  87797. "es.array.sort"
  87798. ],
  87799. "core-js/es/array/splice": [
  87800. "es.array.splice"
  87801. ],
  87802. "core-js/es/array/values": [
  87803. "es.array.iterator"
  87804. ],
  87805. "core-js/es/array/virtual": [
  87806. "es.array.concat",
  87807. "es.array.copy-within",
  87808. "es.array.every",
  87809. "es.array.fill",
  87810. "es.array.filter",
  87811. "es.array.find",
  87812. "es.array.find-index",
  87813. "es.array.flat",
  87814. "es.array.flat-map",
  87815. "es.array.for-each",
  87816. "es.array.includes",
  87817. "es.array.index-of",
  87818. "es.array.iterator",
  87819. "es.array.join",
  87820. "es.array.last-index-of",
  87821. "es.array.map",
  87822. "es.array.reduce",
  87823. "es.array.reduce-right",
  87824. "es.array.reverse",
  87825. "es.array.slice",
  87826. "es.array.some",
  87827. "es.array.sort",
  87828. "es.array.species",
  87829. "es.array.splice",
  87830. "es.array.unscopables.flat",
  87831. "es.array.unscopables.flat-map"
  87832. ],
  87833. "core-js/es/array/virtual/concat": [
  87834. "es.array.concat"
  87835. ],
  87836. "core-js/es/array/virtual/copy-within": [
  87837. "es.array.copy-within"
  87838. ],
  87839. "core-js/es/array/virtual/entries": [
  87840. "es.array.iterator"
  87841. ],
  87842. "core-js/es/array/virtual/every": [
  87843. "es.array.every"
  87844. ],
  87845. "core-js/es/array/virtual/fill": [
  87846. "es.array.fill"
  87847. ],
  87848. "core-js/es/array/virtual/filter": [
  87849. "es.array.filter"
  87850. ],
  87851. "core-js/es/array/virtual/filter-out": [
  87852. "esnext.array.filter-out"
  87853. ],
  87854. "core-js/es/array/virtual/find": [
  87855. "es.array.find"
  87856. ],
  87857. "core-js/es/array/virtual/find-index": [
  87858. "es.array.find-index"
  87859. ],
  87860. "core-js/es/array/virtual/flat": [
  87861. "es.array.flat",
  87862. "es.array.unscopables.flat"
  87863. ],
  87864. "core-js/es/array/virtual/flat-map": [
  87865. "es.array.flat-map",
  87866. "es.array.unscopables.flat-map"
  87867. ],
  87868. "core-js/es/array/virtual/for-each": [
  87869. "es.array.for-each"
  87870. ],
  87871. "core-js/es/array/virtual/includes": [
  87872. "es.array.includes"
  87873. ],
  87874. "core-js/es/array/virtual/index-of": [
  87875. "es.array.index-of"
  87876. ],
  87877. "core-js/es/array/virtual/iterator": [
  87878. "es.array.iterator"
  87879. ],
  87880. "core-js/es/array/virtual/join": [
  87881. "es.array.join"
  87882. ],
  87883. "core-js/es/array/virtual/keys": [
  87884. "es.array.iterator"
  87885. ],
  87886. "core-js/es/array/virtual/last-index-of": [
  87887. "es.array.last-index-of"
  87888. ],
  87889. "core-js/es/array/virtual/map": [
  87890. "es.array.map"
  87891. ],
  87892. "core-js/es/array/virtual/reduce": [
  87893. "es.array.reduce"
  87894. ],
  87895. "core-js/es/array/virtual/reduce-right": [
  87896. "es.array.reduce-right"
  87897. ],
  87898. "core-js/es/array/virtual/reverse": [
  87899. "es.array.reverse"
  87900. ],
  87901. "core-js/es/array/virtual/slice": [
  87902. "es.array.slice"
  87903. ],
  87904. "core-js/es/array/virtual/some": [
  87905. "es.array.some"
  87906. ],
  87907. "core-js/es/array/virtual/sort": [
  87908. "es.array.sort"
  87909. ],
  87910. "core-js/es/array/virtual/splice": [
  87911. "es.array.splice"
  87912. ],
  87913. "core-js/es/array/virtual/values": [
  87914. "es.array.iterator"
  87915. ],
  87916. "core-js/es/data-view": [
  87917. "es.data-view",
  87918. "es.object.to-string"
  87919. ],
  87920. "core-js/es/date": [
  87921. "es.date.get-year",
  87922. "es.date.now",
  87923. "es.date.set-year",
  87924. "es.date.to-gmt-string",
  87925. "es.date.to-iso-string",
  87926. "es.date.to-json",
  87927. "es.date.to-primitive",
  87928. "es.date.to-string"
  87929. ],
  87930. "core-js/es/date/get-year": [
  87931. "es.date.get-year"
  87932. ],
  87933. "core-js/es/date/now": [
  87934. "es.date.now"
  87935. ],
  87936. "core-js/es/date/set-year": [
  87937. "es.date.set-year"
  87938. ],
  87939. "core-js/es/date/to-gmt-string": [
  87940. "es.date.to-gmt-string"
  87941. ],
  87942. "core-js/es/date/to-iso-string": [
  87943. "es.date.to-iso-string",
  87944. "es.date.to-json"
  87945. ],
  87946. "core-js/es/date/to-json": [
  87947. "es.date.to-json"
  87948. ],
  87949. "core-js/es/date/to-primitive": [
  87950. "es.date.to-primitive"
  87951. ],
  87952. "core-js/es/date/to-string": [
  87953. "es.date.to-string"
  87954. ],
  87955. "core-js/es/escape": [
  87956. "es.escape"
  87957. ],
  87958. "core-js/es/function": [
  87959. "es.function.bind",
  87960. "es.function.has-instance",
  87961. "es.function.name"
  87962. ],
  87963. "core-js/es/function/bind": [
  87964. "es.function.bind"
  87965. ],
  87966. "core-js/es/function/has-instance": [
  87967. "es.function.has-instance"
  87968. ],
  87969. "core-js/es/function/name": [
  87970. "es.function.name"
  87971. ],
  87972. "core-js/es/function/virtual": [
  87973. "es.function.bind"
  87974. ],
  87975. "core-js/es/function/virtual/bind": [
  87976. "es.function.bind"
  87977. ],
  87978. "core-js/es/global-this": [
  87979. "es.global-this"
  87980. ],
  87981. "core-js/es/instance/bind": [
  87982. "es.function.bind"
  87983. ],
  87984. "core-js/es/instance/code-point-at": [
  87985. "es.string.code-point-at"
  87986. ],
  87987. "core-js/es/instance/concat": [
  87988. "es.array.concat"
  87989. ],
  87990. "core-js/es/instance/copy-within": [
  87991. "es.array.copy-within"
  87992. ],
  87993. "core-js/es/instance/ends-with": [
  87994. "es.string.ends-with"
  87995. ],
  87996. "core-js/es/instance/entries": [
  87997. "es.array.iterator"
  87998. ],
  87999. "core-js/es/instance/every": [
  88000. "es.array.every"
  88001. ],
  88002. "core-js/es/instance/fill": [
  88003. "es.array.fill"
  88004. ],
  88005. "core-js/es/instance/filter": [
  88006. "es.array.filter"
  88007. ],
  88008. "core-js/es/instance/find": [
  88009. "es.array.find"
  88010. ],
  88011. "core-js/es/instance/find-index": [
  88012. "es.array.find-index"
  88013. ],
  88014. "core-js/es/instance/flags": [
  88015. "es.regexp.flags"
  88016. ],
  88017. "core-js/es/instance/flat": [
  88018. "es.array.flat",
  88019. "es.array.unscopables.flat"
  88020. ],
  88021. "core-js/es/instance/flat-map": [
  88022. "es.array.flat-map",
  88023. "es.array.unscopables.flat-map"
  88024. ],
  88025. "core-js/es/instance/for-each": [
  88026. "es.array.for-each"
  88027. ],
  88028. "core-js/es/instance/includes": [
  88029. "es.array.includes",
  88030. "es.string.includes"
  88031. ],
  88032. "core-js/es/instance/index-of": [
  88033. "es.array.index-of"
  88034. ],
  88035. "core-js/es/instance/keys": [
  88036. "es.array.iterator"
  88037. ],
  88038. "core-js/es/instance/last-index-of": [
  88039. "es.array.last-index-of"
  88040. ],
  88041. "core-js/es/instance/map": [
  88042. "es.array.map"
  88043. ],
  88044. "core-js/es/instance/match-all": [
  88045. "es.string.match-all"
  88046. ],
  88047. "core-js/es/instance/pad-end": [
  88048. "es.string.pad-end"
  88049. ],
  88050. "core-js/es/instance/pad-start": [
  88051. "es.string.pad-start"
  88052. ],
  88053. "core-js/es/instance/reduce": [
  88054. "es.array.reduce"
  88055. ],
  88056. "core-js/es/instance/reduce-right": [
  88057. "es.array.reduce-right"
  88058. ],
  88059. "core-js/es/instance/repeat": [
  88060. "es.string.repeat"
  88061. ],
  88062. "core-js/es/instance/replace-all": [
  88063. "es.string.replace-all"
  88064. ],
  88065. "core-js/es/instance/reverse": [
  88066. "es.array.reverse"
  88067. ],
  88068. "core-js/es/instance/slice": [
  88069. "es.array.slice"
  88070. ],
  88071. "core-js/es/instance/some": [
  88072. "es.array.some"
  88073. ],
  88074. "core-js/es/instance/sort": [
  88075. "es.array.sort"
  88076. ],
  88077. "core-js/es/instance/splice": [
  88078. "es.array.splice"
  88079. ],
  88080. "core-js/es/instance/starts-with": [
  88081. "es.string.starts-with"
  88082. ],
  88083. "core-js/es/instance/trim": [
  88084. "es.string.trim"
  88085. ],
  88086. "core-js/es/instance/trim-end": [
  88087. "es.string.trim-end"
  88088. ],
  88089. "core-js/es/instance/trim-left": [
  88090. "es.string.trim-start"
  88091. ],
  88092. "core-js/es/instance/trim-right": [
  88093. "es.string.trim-end"
  88094. ],
  88095. "core-js/es/instance/trim-start": [
  88096. "es.string.trim-start"
  88097. ],
  88098. "core-js/es/instance/values": [
  88099. "es.array.iterator"
  88100. ],
  88101. "core-js/es/json": [
  88102. "es.json.stringify",
  88103. "es.json.to-string-tag"
  88104. ],
  88105. "core-js/es/json/stringify": [
  88106. "es.json.stringify"
  88107. ],
  88108. "core-js/es/json/to-string-tag": [
  88109. "es.json.to-string-tag"
  88110. ],
  88111. "core-js/es/map": [
  88112. "es.map",
  88113. "es.object.to-string",
  88114. "es.string.iterator",
  88115. "web.dom-collections.iterator"
  88116. ],
  88117. "core-js/es/math": [
  88118. "es.math.acosh",
  88119. "es.math.asinh",
  88120. "es.math.atanh",
  88121. "es.math.cbrt",
  88122. "es.math.clz32",
  88123. "es.math.cosh",
  88124. "es.math.expm1",
  88125. "es.math.fround",
  88126. "es.math.hypot",
  88127. "es.math.imul",
  88128. "es.math.log10",
  88129. "es.math.log1p",
  88130. "es.math.log2",
  88131. "es.math.sign",
  88132. "es.math.sinh",
  88133. "es.math.tanh",
  88134. "es.math.to-string-tag",
  88135. "es.math.trunc"
  88136. ],
  88137. "core-js/es/math/acosh": [
  88138. "es.math.acosh"
  88139. ],
  88140. "core-js/es/math/asinh": [
  88141. "es.math.asinh"
  88142. ],
  88143. "core-js/es/math/atanh": [
  88144. "es.math.atanh"
  88145. ],
  88146. "core-js/es/math/cbrt": [
  88147. "es.math.cbrt"
  88148. ],
  88149. "core-js/es/math/clz32": [
  88150. "es.math.clz32"
  88151. ],
  88152. "core-js/es/math/cosh": [
  88153. "es.math.cosh"
  88154. ],
  88155. "core-js/es/math/expm1": [
  88156. "es.math.expm1"
  88157. ],
  88158. "core-js/es/math/fround": [
  88159. "es.math.fround"
  88160. ],
  88161. "core-js/es/math/hypot": [
  88162. "es.math.hypot"
  88163. ],
  88164. "core-js/es/math/imul": [
  88165. "es.math.imul"
  88166. ],
  88167. "core-js/es/math/log10": [
  88168. "es.math.log10"
  88169. ],
  88170. "core-js/es/math/log1p": [
  88171. "es.math.log1p"
  88172. ],
  88173. "core-js/es/math/log2": [
  88174. "es.math.log2"
  88175. ],
  88176. "core-js/es/math/sign": [
  88177. "es.math.sign"
  88178. ],
  88179. "core-js/es/math/sinh": [
  88180. "es.math.sinh"
  88181. ],
  88182. "core-js/es/math/tanh": [
  88183. "es.math.tanh"
  88184. ],
  88185. "core-js/es/math/to-string-tag": [
  88186. "es.math.to-string-tag"
  88187. ],
  88188. "core-js/es/math/trunc": [
  88189. "es.math.trunc"
  88190. ],
  88191. "core-js/es/number": [
  88192. "es.number.constructor",
  88193. "es.number.epsilon",
  88194. "es.number.is-finite",
  88195. "es.number.is-integer",
  88196. "es.number.is-nan",
  88197. "es.number.is-safe-integer",
  88198. "es.number.max-safe-integer",
  88199. "es.number.min-safe-integer",
  88200. "es.number.parse-float",
  88201. "es.number.parse-int",
  88202. "es.number.to-fixed",
  88203. "es.number.to-precision"
  88204. ],
  88205. "core-js/es/number/constructor": [
  88206. "es.number.constructor"
  88207. ],
  88208. "core-js/es/number/epsilon": [
  88209. "es.number.epsilon"
  88210. ],
  88211. "core-js/es/number/is-finite": [
  88212. "es.number.is-finite"
  88213. ],
  88214. "core-js/es/number/is-integer": [
  88215. "es.number.is-integer"
  88216. ],
  88217. "core-js/es/number/is-nan": [
  88218. "es.number.is-nan"
  88219. ],
  88220. "core-js/es/number/is-safe-integer": [
  88221. "es.number.is-safe-integer"
  88222. ],
  88223. "core-js/es/number/max-safe-integer": [
  88224. "es.number.max-safe-integer"
  88225. ],
  88226. "core-js/es/number/min-safe-integer": [
  88227. "es.number.min-safe-integer"
  88228. ],
  88229. "core-js/es/number/parse-float": [
  88230. "es.number.parse-float"
  88231. ],
  88232. "core-js/es/number/parse-int": [
  88233. "es.number.parse-int"
  88234. ],
  88235. "core-js/es/number/to-fixed": [
  88236. "es.number.to-fixed"
  88237. ],
  88238. "core-js/es/number/to-precision": [
  88239. "es.number.to-precision"
  88240. ],
  88241. "core-js/es/number/virtual": [
  88242. "es.number.to-fixed",
  88243. "es.number.to-precision"
  88244. ],
  88245. "core-js/es/number/virtual/to-fixed": [
  88246. "es.number.to-fixed"
  88247. ],
  88248. "core-js/es/number/virtual/to-precision": [
  88249. "es.number.to-precision"
  88250. ],
  88251. "core-js/es/object": [
  88252. "es.symbol",
  88253. "es.json.to-string-tag",
  88254. "es.math.to-string-tag",
  88255. "es.object.assign",
  88256. "es.object.create",
  88257. "es.object.define-getter",
  88258. "es.object.define-properties",
  88259. "es.object.define-property",
  88260. "es.object.define-setter",
  88261. "es.object.entries",
  88262. "es.object.freeze",
  88263. "es.object.from-entries",
  88264. "es.object.get-own-property-descriptor",
  88265. "es.object.get-own-property-descriptors",
  88266. "es.object.get-own-property-names",
  88267. "es.object.get-prototype-of",
  88268. "es.object.is",
  88269. "es.object.is-extensible",
  88270. "es.object.is-frozen",
  88271. "es.object.is-sealed",
  88272. "es.object.keys",
  88273. "es.object.lookup-getter",
  88274. "es.object.lookup-setter",
  88275. "es.object.prevent-extensions",
  88276. "es.object.seal",
  88277. "es.object.set-prototype-of",
  88278. "es.object.to-string",
  88279. "es.object.values",
  88280. "es.reflect.to-string-tag"
  88281. ],
  88282. "core-js/es/object/assign": [
  88283. "es.object.assign"
  88284. ],
  88285. "core-js/es/object/create": [
  88286. "es.object.create"
  88287. ],
  88288. "core-js/es/object/define-getter": [
  88289. "es.object.define-getter"
  88290. ],
  88291. "core-js/es/object/define-properties": [
  88292. "es.object.define-properties"
  88293. ],
  88294. "core-js/es/object/define-property": [
  88295. "es.object.define-property"
  88296. ],
  88297. "core-js/es/object/define-setter": [
  88298. "es.object.define-setter"
  88299. ],
  88300. "core-js/es/object/entries": [
  88301. "es.object.entries"
  88302. ],
  88303. "core-js/es/object/freeze": [
  88304. "es.object.freeze"
  88305. ],
  88306. "core-js/es/object/from-entries": [
  88307. "es.array.iterator",
  88308. "es.object.from-entries"
  88309. ],
  88310. "core-js/es/object/get-own-property-descriptor": [
  88311. "es.object.get-own-property-descriptor"
  88312. ],
  88313. "core-js/es/object/get-own-property-descriptors": [
  88314. "es.object.get-own-property-descriptors"
  88315. ],
  88316. "core-js/es/object/get-own-property-names": [
  88317. "es.object.get-own-property-names"
  88318. ],
  88319. "core-js/es/object/get-own-property-symbols": [
  88320. "es.symbol"
  88321. ],
  88322. "core-js/es/object/get-prototype-of": [
  88323. "es.object.get-prototype-of"
  88324. ],
  88325. "core-js/es/object/is": [
  88326. "es.object.is"
  88327. ],
  88328. "core-js/es/object/is-extensible": [
  88329. "es.object.is-extensible"
  88330. ],
  88331. "core-js/es/object/is-frozen": [
  88332. "es.object.is-frozen"
  88333. ],
  88334. "core-js/es/object/is-sealed": [
  88335. "es.object.is-sealed"
  88336. ],
  88337. "core-js/es/object/keys": [
  88338. "es.object.keys"
  88339. ],
  88340. "core-js/es/object/lookup-getter": [
  88341. "es.object.lookup-setter"
  88342. ],
  88343. "core-js/es/object/lookup-setter": [
  88344. "es.object.lookup-setter"
  88345. ],
  88346. "core-js/es/object/prevent-extensions": [
  88347. "es.object.prevent-extensions"
  88348. ],
  88349. "core-js/es/object/seal": [
  88350. "es.object.seal"
  88351. ],
  88352. "core-js/es/object/set-prototype-of": [
  88353. "es.object.set-prototype-of"
  88354. ],
  88355. "core-js/es/object/to-string": [
  88356. "es.json.to-string-tag",
  88357. "es.math.to-string-tag",
  88358. "es.object.to-string",
  88359. "es.reflect.to-string-tag"
  88360. ],
  88361. "core-js/es/object/values": [
  88362. "es.object.values"
  88363. ],
  88364. "core-js/es/parse-float": [
  88365. "es.parse-float"
  88366. ],
  88367. "core-js/es/parse-int": [
  88368. "es.parse-int"
  88369. ],
  88370. "core-js/es/promise": [
  88371. "es.aggregate-error",
  88372. "es.object.to-string",
  88373. "es.promise",
  88374. "es.promise.all-settled",
  88375. "es.promise.any",
  88376. "es.promise.finally",
  88377. "es.string.iterator",
  88378. "web.dom-collections.iterator"
  88379. ],
  88380. "core-js/es/promise/all-settled": [
  88381. "es.promise",
  88382. "es.promise.all-settled",
  88383. "es.string.iterator",
  88384. "web.dom-collections.iterator"
  88385. ],
  88386. "core-js/es/promise/any": [
  88387. "es.aggregate-error",
  88388. "es.promise",
  88389. "es.promise.any",
  88390. "es.string.iterator",
  88391. "web.dom-collections.iterator"
  88392. ],
  88393. "core-js/es/promise/finally": [
  88394. "es.promise",
  88395. "es.promise.finally"
  88396. ],
  88397. "core-js/es/reflect": [
  88398. "es.reflect.apply",
  88399. "es.reflect.construct",
  88400. "es.reflect.define-property",
  88401. "es.reflect.delete-property",
  88402. "es.reflect.get",
  88403. "es.reflect.get-own-property-descriptor",
  88404. "es.reflect.get-prototype-of",
  88405. "es.reflect.has",
  88406. "es.reflect.is-extensible",
  88407. "es.reflect.own-keys",
  88408. "es.reflect.prevent-extensions",
  88409. "es.reflect.set",
  88410. "es.reflect.set-prototype-of",
  88411. "es.reflect.to-string-tag"
  88412. ],
  88413. "core-js/es/reflect/apply": [
  88414. "es.reflect.apply"
  88415. ],
  88416. "core-js/es/reflect/construct": [
  88417. "es.reflect.construct"
  88418. ],
  88419. "core-js/es/reflect/define-property": [
  88420. "es.reflect.define-property"
  88421. ],
  88422. "core-js/es/reflect/delete-property": [
  88423. "es.reflect.delete-property"
  88424. ],
  88425. "core-js/es/reflect/get": [
  88426. "es.reflect.get"
  88427. ],
  88428. "core-js/es/reflect/get-own-property-descriptor": [
  88429. "es.reflect.get-own-property-descriptor"
  88430. ],
  88431. "core-js/es/reflect/get-prototype-of": [
  88432. "es.reflect.get-prototype-of"
  88433. ],
  88434. "core-js/es/reflect/has": [
  88435. "es.reflect.has"
  88436. ],
  88437. "core-js/es/reflect/is-extensible": [
  88438. "es.reflect.is-extensible"
  88439. ],
  88440. "core-js/es/reflect/own-keys": [
  88441. "es.reflect.own-keys"
  88442. ],
  88443. "core-js/es/reflect/prevent-extensions": [
  88444. "es.reflect.prevent-extensions"
  88445. ],
  88446. "core-js/es/reflect/set": [
  88447. "es.reflect.set"
  88448. ],
  88449. "core-js/es/reflect/set-prototype-of": [
  88450. "es.reflect.set-prototype-of"
  88451. ],
  88452. "core-js/es/reflect/to-string-tag": [
  88453. "es.reflect.to-string-tag"
  88454. ],
  88455. "core-js/es/regexp": [
  88456. "es.regexp.constructor",
  88457. "es.regexp.dot-all",
  88458. "es.regexp.exec",
  88459. "es.regexp.flags",
  88460. "es.regexp.sticky",
  88461. "es.regexp.test",
  88462. "es.regexp.to-string",
  88463. "es.string.match",
  88464. "es.string.replace",
  88465. "es.string.search",
  88466. "es.string.split"
  88467. ],
  88468. "core-js/es/regexp/constructor": [
  88469. "es.regexp.constructor"
  88470. ],
  88471. "core-js/es/regexp/dot-all": [
  88472. "es.regexp.constructor",
  88473. "es.regexp.dot-all",
  88474. "es.regexp.exec"
  88475. ],
  88476. "core-js/es/regexp/flags": [
  88477. "es.regexp.flags"
  88478. ],
  88479. "core-js/es/regexp/match": [
  88480. "es.string.match"
  88481. ],
  88482. "core-js/es/regexp/replace": [
  88483. "es.string.replace"
  88484. ],
  88485. "core-js/es/regexp/search": [
  88486. "es.string.search"
  88487. ],
  88488. "core-js/es/regexp/split": [
  88489. "es.string.split"
  88490. ],
  88491. "core-js/es/regexp/sticky": [
  88492. "es.regexp.constructor",
  88493. "es.regexp.exec",
  88494. "es.regexp.sticky"
  88495. ],
  88496. "core-js/es/regexp/test": [
  88497. "es.regexp.exec",
  88498. "es.regexp.test"
  88499. ],
  88500. "core-js/es/regexp/to-string": [
  88501. "es.regexp.to-string"
  88502. ],
  88503. "core-js/es/set": [
  88504. "es.object.to-string",
  88505. "es.set",
  88506. "es.string.iterator",
  88507. "web.dom-collections.iterator"
  88508. ],
  88509. "core-js/es/string": [
  88510. "es.regexp.exec",
  88511. "es.string.code-point-at",
  88512. "es.string.ends-with",
  88513. "es.string.from-code-point",
  88514. "es.string.includes",
  88515. "es.string.iterator",
  88516. "es.string.match",
  88517. "es.string.match-all",
  88518. "es.string.pad-end",
  88519. "es.string.pad-start",
  88520. "es.string.raw",
  88521. "es.string.repeat",
  88522. "es.string.replace",
  88523. "es.string.replace-all",
  88524. "es.string.search",
  88525. "es.string.split",
  88526. "es.string.starts-with",
  88527. "es.string.substr",
  88528. "es.string.trim",
  88529. "es.string.trim-end",
  88530. "es.string.trim-start",
  88531. "es.string.anchor",
  88532. "es.string.big",
  88533. "es.string.blink",
  88534. "es.string.bold",
  88535. "es.string.fixed",
  88536. "es.string.fontcolor",
  88537. "es.string.fontsize",
  88538. "es.string.italics",
  88539. "es.string.link",
  88540. "es.string.small",
  88541. "es.string.strike",
  88542. "es.string.sub",
  88543. "es.string.sup"
  88544. ],
  88545. "core-js/es/string/anchor": [
  88546. "es.string.anchor"
  88547. ],
  88548. "core-js/es/string/big": [
  88549. "es.string.big"
  88550. ],
  88551. "core-js/es/string/blink": [
  88552. "es.string.blink"
  88553. ],
  88554. "core-js/es/string/bold": [
  88555. "es.string.bold"
  88556. ],
  88557. "core-js/es/string/code-point-at": [
  88558. "es.string.code-point-at"
  88559. ],
  88560. "core-js/es/string/ends-with": [
  88561. "es.string.ends-with"
  88562. ],
  88563. "core-js/es/string/fixed": [
  88564. "es.string.fixed"
  88565. ],
  88566. "core-js/es/string/fontcolor": [
  88567. "es.string.fontcolor"
  88568. ],
  88569. "core-js/es/string/fontsize": [
  88570. "es.string.fontsize"
  88571. ],
  88572. "core-js/es/string/from-code-point": [
  88573. "es.string.from-code-point"
  88574. ],
  88575. "core-js/es/string/includes": [
  88576. "es.string.includes"
  88577. ],
  88578. "core-js/es/string/italics": [
  88579. "es.string.italics"
  88580. ],
  88581. "core-js/es/string/iterator": [
  88582. "es.string.iterator"
  88583. ],
  88584. "core-js/es/string/link": [
  88585. "es.string.link"
  88586. ],
  88587. "core-js/es/string/match": [
  88588. "es.regexp.exec",
  88589. "es.string.match"
  88590. ],
  88591. "core-js/es/string/match-all": [
  88592. "es.string.match-all"
  88593. ],
  88594. "core-js/es/string/pad-end": [
  88595. "es.string.pad-end"
  88596. ],
  88597. "core-js/es/string/pad-start": [
  88598. "es.string.pad-start"
  88599. ],
  88600. "core-js/es/string/raw": [
  88601. "es.string.raw"
  88602. ],
  88603. "core-js/es/string/repeat": [
  88604. "es.string.repeat"
  88605. ],
  88606. "core-js/es/string/replace": [
  88607. "es.regexp.exec",
  88608. "es.string.replace"
  88609. ],
  88610. "core-js/es/string/replace-all": [
  88611. "es.string.replace-all"
  88612. ],
  88613. "core-js/es/string/search": [
  88614. "es.regexp.exec",
  88615. "es.string.search"
  88616. ],
  88617. "core-js/es/string/small": [
  88618. "es.string.small"
  88619. ],
  88620. "core-js/es/string/split": [
  88621. "es.regexp.exec",
  88622. "es.string.split"
  88623. ],
  88624. "core-js/es/string/starts-with": [
  88625. "es.string.starts-with"
  88626. ],
  88627. "core-js/es/string/strike": [
  88628. "es.string.strike"
  88629. ],
  88630. "core-js/es/string/sub": [
  88631. "es.string.sub"
  88632. ],
  88633. "core-js/es/string/substr": [
  88634. "es.string.substr"
  88635. ],
  88636. "core-js/es/string/sup": [
  88637. "es.string.sup"
  88638. ],
  88639. "core-js/es/string/trim": [
  88640. "es.string.trim"
  88641. ],
  88642. "core-js/es/string/trim-end": [
  88643. "es.string.trim-end"
  88644. ],
  88645. "core-js/es/string/trim-left": [
  88646. "es.string.trim-start"
  88647. ],
  88648. "core-js/es/string/trim-right": [
  88649. "es.string.trim-end"
  88650. ],
  88651. "core-js/es/string/trim-start": [
  88652. "es.string.trim-start"
  88653. ],
  88654. "core-js/es/string/virtual": [
  88655. "es.string.code-point-at",
  88656. "es.string.ends-with",
  88657. "es.string.includes",
  88658. "es.string.iterator",
  88659. "es.string.match",
  88660. "es.string.match-all",
  88661. "es.string.pad-end",
  88662. "es.string.pad-start",
  88663. "es.string.repeat",
  88664. "es.string.replace",
  88665. "es.string.replace-all",
  88666. "es.string.search",
  88667. "es.string.split",
  88668. "es.string.starts-with",
  88669. "es.string.substr",
  88670. "es.string.trim",
  88671. "es.string.trim-end",
  88672. "es.string.trim-start",
  88673. "es.string.anchor",
  88674. "es.string.big",
  88675. "es.string.blink",
  88676. "es.string.bold",
  88677. "es.string.fixed",
  88678. "es.string.fontcolor",
  88679. "es.string.fontsize",
  88680. "es.string.italics",
  88681. "es.string.link",
  88682. "es.string.small",
  88683. "es.string.strike",
  88684. "es.string.sub",
  88685. "es.string.sup"
  88686. ],
  88687. "core-js/es/string/virtual/anchor": [
  88688. "es.string.anchor"
  88689. ],
  88690. "core-js/es/string/virtual/big": [
  88691. "es.string.big"
  88692. ],
  88693. "core-js/es/string/virtual/blink": [
  88694. "es.string.blink"
  88695. ],
  88696. "core-js/es/string/virtual/bold": [
  88697. "es.string.bold"
  88698. ],
  88699. "core-js/es/string/virtual/code-point-at": [
  88700. "es.string.code-point-at"
  88701. ],
  88702. "core-js/es/string/virtual/ends-with": [
  88703. "es.string.ends-with"
  88704. ],
  88705. "core-js/es/string/virtual/fixed": [
  88706. "es.string.fixed"
  88707. ],
  88708. "core-js/es/string/virtual/fontcolor": [
  88709. "es.string.fontcolor"
  88710. ],
  88711. "core-js/es/string/virtual/fontsize": [
  88712. "es.string.fontsize"
  88713. ],
  88714. "core-js/es/string/virtual/includes": [
  88715. "es.string.includes"
  88716. ],
  88717. "core-js/es/string/virtual/italics": [
  88718. "es.string.italics"
  88719. ],
  88720. "core-js/es/string/virtual/iterator": [
  88721. "es.string.iterator"
  88722. ],
  88723. "core-js/es/string/virtual/link": [
  88724. "es.string.link"
  88725. ],
  88726. "core-js/es/string/virtual/match-all": [
  88727. "es.string.match-all"
  88728. ],
  88729. "core-js/es/string/virtual/pad-end": [
  88730. "es.string.pad-end"
  88731. ],
  88732. "core-js/es/string/virtual/pad-start": [
  88733. "es.string.pad-start"
  88734. ],
  88735. "core-js/es/string/virtual/repeat": [
  88736. "es.string.repeat"
  88737. ],
  88738. "core-js/es/string/virtual/replace-all": [
  88739. "es.string.replace-all"
  88740. ],
  88741. "core-js/es/string/virtual/small": [
  88742. "es.string.small"
  88743. ],
  88744. "core-js/es/string/virtual/starts-with": [
  88745. "es.string.starts-with"
  88746. ],
  88747. "core-js/es/string/virtual/strike": [
  88748. "es.string.strike"
  88749. ],
  88750. "core-js/es/string/virtual/sub": [
  88751. "es.string.sub"
  88752. ],
  88753. "core-js/es/string/virtual/substr": [
  88754. "es.string.substr"
  88755. ],
  88756. "core-js/es/string/virtual/sup": [
  88757. "es.string.sup"
  88758. ],
  88759. "core-js/es/string/virtual/trim": [
  88760. "es.string.trim"
  88761. ],
  88762. "core-js/es/string/virtual/trim-end": [
  88763. "es.string.trim-end"
  88764. ],
  88765. "core-js/es/string/virtual/trim-left": [
  88766. "es.string.trim-start"
  88767. ],
  88768. "core-js/es/string/virtual/trim-right": [
  88769. "es.string.trim-end"
  88770. ],
  88771. "core-js/es/string/virtual/trim-start": [
  88772. "es.string.trim-start"
  88773. ],
  88774. "core-js/es/symbol": [
  88775. "es.symbol",
  88776. "es.symbol.description",
  88777. "es.symbol.async-iterator",
  88778. "es.symbol.has-instance",
  88779. "es.symbol.is-concat-spreadable",
  88780. "es.symbol.iterator",
  88781. "es.symbol.match",
  88782. "es.symbol.match-all",
  88783. "es.symbol.replace",
  88784. "es.symbol.search",
  88785. "es.symbol.species",
  88786. "es.symbol.split",
  88787. "es.symbol.to-primitive",
  88788. "es.symbol.to-string-tag",
  88789. "es.symbol.unscopables",
  88790. "es.array.concat",
  88791. "es.json.to-string-tag",
  88792. "es.math.to-string-tag",
  88793. "es.object.to-string",
  88794. "es.reflect.to-string-tag"
  88795. ],
  88796. "core-js/es/symbol/async-iterator": [
  88797. "es.symbol.async-iterator"
  88798. ],
  88799. "core-js/es/symbol/description": [
  88800. "es.symbol.description"
  88801. ],
  88802. "core-js/es/symbol/for": [
  88803. "es.symbol"
  88804. ],
  88805. "core-js/es/symbol/has-instance": [
  88806. "es.symbol.has-instance",
  88807. "es.function.has-instance"
  88808. ],
  88809. "core-js/es/symbol/is-concat-spreadable": [
  88810. "es.symbol.is-concat-spreadable",
  88811. "es.array.concat"
  88812. ],
  88813. "core-js/es/symbol/iterator": [
  88814. "es.symbol.iterator",
  88815. "es.string.iterator",
  88816. "web.dom-collections.iterator"
  88817. ],
  88818. "core-js/es/symbol/key-for": [
  88819. "es.symbol"
  88820. ],
  88821. "core-js/es/symbol/match": [
  88822. "es.symbol.match",
  88823. "es.string.match"
  88824. ],
  88825. "core-js/es/symbol/match-all": [
  88826. "es.symbol.match-all",
  88827. "es.string.match-all"
  88828. ],
  88829. "core-js/es/symbol/replace": [
  88830. "es.symbol.replace",
  88831. "es.string.replace"
  88832. ],
  88833. "core-js/es/symbol/search": [
  88834. "es.symbol.search",
  88835. "es.string.search"
  88836. ],
  88837. "core-js/es/symbol/species": [
  88838. "es.symbol.species"
  88839. ],
  88840. "core-js/es/symbol/split": [
  88841. "es.symbol.split",
  88842. "es.string.split"
  88843. ],
  88844. "core-js/es/symbol/to-primitive": [
  88845. "es.symbol.to-primitive"
  88846. ],
  88847. "core-js/es/symbol/to-string-tag": [
  88848. "es.symbol.to-string-tag",
  88849. "es.json.to-string-tag",
  88850. "es.math.to-string-tag",
  88851. "es.object.to-string",
  88852. "es.reflect.to-string-tag"
  88853. ],
  88854. "core-js/es/symbol/unscopables": [
  88855. "es.symbol.unscopables"
  88856. ],
  88857. "core-js/es/typed-array": [
  88858. "es.object.to-string",
  88859. "es.typed-array.float32-array",
  88860. "es.typed-array.float64-array",
  88861. "es.typed-array.int8-array",
  88862. "es.typed-array.int16-array",
  88863. "es.typed-array.int32-array",
  88864. "es.typed-array.uint8-array",
  88865. "es.typed-array.uint8-clamped-array",
  88866. "es.typed-array.uint16-array",
  88867. "es.typed-array.uint32-array",
  88868. "es.typed-array.copy-within",
  88869. "es.typed-array.every",
  88870. "es.typed-array.fill",
  88871. "es.typed-array.filter",
  88872. "es.typed-array.find",
  88873. "es.typed-array.find-index",
  88874. "es.typed-array.for-each",
  88875. "es.typed-array.from",
  88876. "es.typed-array.includes",
  88877. "es.typed-array.index-of",
  88878. "es.typed-array.iterator",
  88879. "es.typed-array.join",
  88880. "es.typed-array.last-index-of",
  88881. "es.typed-array.map",
  88882. "es.typed-array.of",
  88883. "es.typed-array.reduce",
  88884. "es.typed-array.reduce-right",
  88885. "es.typed-array.reverse",
  88886. "es.typed-array.set",
  88887. "es.typed-array.slice",
  88888. "es.typed-array.some",
  88889. "es.typed-array.sort",
  88890. "es.typed-array.subarray",
  88891. "es.typed-array.to-locale-string",
  88892. "es.typed-array.to-string"
  88893. ],
  88894. "core-js/es/typed-array/copy-within": [
  88895. "es.typed-array.copy-within"
  88896. ],
  88897. "core-js/es/typed-array/entries": [
  88898. "es.typed-array.iterator"
  88899. ],
  88900. "core-js/es/typed-array/every": [
  88901. "es.typed-array.every"
  88902. ],
  88903. "core-js/es/typed-array/fill": [
  88904. "es.typed-array.fill"
  88905. ],
  88906. "core-js/es/typed-array/filter": [
  88907. "es.typed-array.filter"
  88908. ],
  88909. "core-js/es/typed-array/find": [
  88910. "es.typed-array.find"
  88911. ],
  88912. "core-js/es/typed-array/find-index": [
  88913. "es.typed-array.find-index"
  88914. ],
  88915. "core-js/es/typed-array/float32-array": [
  88916. "es.object.to-string",
  88917. "es.typed-array.float32-array",
  88918. "es.typed-array.copy-within",
  88919. "es.typed-array.every",
  88920. "es.typed-array.fill",
  88921. "es.typed-array.filter",
  88922. "es.typed-array.find",
  88923. "es.typed-array.find-index",
  88924. "es.typed-array.for-each",
  88925. "es.typed-array.from",
  88926. "es.typed-array.includes",
  88927. "es.typed-array.index-of",
  88928. "es.typed-array.iterator",
  88929. "es.typed-array.join",
  88930. "es.typed-array.last-index-of",
  88931. "es.typed-array.map",
  88932. "es.typed-array.of",
  88933. "es.typed-array.reduce",
  88934. "es.typed-array.reduce-right",
  88935. "es.typed-array.reverse",
  88936. "es.typed-array.set",
  88937. "es.typed-array.slice",
  88938. "es.typed-array.some",
  88939. "es.typed-array.sort",
  88940. "es.typed-array.subarray",
  88941. "es.typed-array.to-locale-string",
  88942. "es.typed-array.to-string"
  88943. ],
  88944. "core-js/es/typed-array/float64-array": [
  88945. "es.object.to-string",
  88946. "es.typed-array.float64-array",
  88947. "es.typed-array.copy-within",
  88948. "es.typed-array.every",
  88949. "es.typed-array.fill",
  88950. "es.typed-array.filter",
  88951. "es.typed-array.find",
  88952. "es.typed-array.find-index",
  88953. "es.typed-array.for-each",
  88954. "es.typed-array.from",
  88955. "es.typed-array.includes",
  88956. "es.typed-array.index-of",
  88957. "es.typed-array.iterator",
  88958. "es.typed-array.join",
  88959. "es.typed-array.last-index-of",
  88960. "es.typed-array.map",
  88961. "es.typed-array.of",
  88962. "es.typed-array.reduce",
  88963. "es.typed-array.reduce-right",
  88964. "es.typed-array.reverse",
  88965. "es.typed-array.set",
  88966. "es.typed-array.slice",
  88967. "es.typed-array.some",
  88968. "es.typed-array.sort",
  88969. "es.typed-array.subarray",
  88970. "es.typed-array.to-locale-string",
  88971. "es.typed-array.to-string"
  88972. ],
  88973. "core-js/es/typed-array/for-each": [
  88974. "es.typed-array.for-each"
  88975. ],
  88976. "core-js/es/typed-array/from": [
  88977. "es.typed-array.from"
  88978. ],
  88979. "core-js/es/typed-array/includes": [
  88980. "es.typed-array.includes"
  88981. ],
  88982. "core-js/es/typed-array/index-of": [
  88983. "es.typed-array.index-of"
  88984. ],
  88985. "core-js/es/typed-array/int16-array": [
  88986. "es.object.to-string",
  88987. "es.typed-array.int16-array",
  88988. "es.typed-array.copy-within",
  88989. "es.typed-array.every",
  88990. "es.typed-array.fill",
  88991. "es.typed-array.filter",
  88992. "es.typed-array.find",
  88993. "es.typed-array.find-index",
  88994. "es.typed-array.for-each",
  88995. "es.typed-array.from",
  88996. "es.typed-array.includes",
  88997. "es.typed-array.index-of",
  88998. "es.typed-array.iterator",
  88999. "es.typed-array.join",
  89000. "es.typed-array.last-index-of",
  89001. "es.typed-array.map",
  89002. "es.typed-array.of",
  89003. "es.typed-array.reduce",
  89004. "es.typed-array.reduce-right",
  89005. "es.typed-array.reverse",
  89006. "es.typed-array.set",
  89007. "es.typed-array.slice",
  89008. "es.typed-array.some",
  89009. "es.typed-array.sort",
  89010. "es.typed-array.subarray",
  89011. "es.typed-array.to-locale-string",
  89012. "es.typed-array.to-string"
  89013. ],
  89014. "core-js/es/typed-array/int32-array": [
  89015. "es.object.to-string",
  89016. "es.typed-array.int32-array",
  89017. "es.typed-array.copy-within",
  89018. "es.typed-array.every",
  89019. "es.typed-array.fill",
  89020. "es.typed-array.filter",
  89021. "es.typed-array.find",
  89022. "es.typed-array.find-index",
  89023. "es.typed-array.for-each",
  89024. "es.typed-array.from",
  89025. "es.typed-array.includes",
  89026. "es.typed-array.index-of",
  89027. "es.typed-array.iterator",
  89028. "es.typed-array.join",
  89029. "es.typed-array.last-index-of",
  89030. "es.typed-array.map",
  89031. "es.typed-array.of",
  89032. "es.typed-array.reduce",
  89033. "es.typed-array.reduce-right",
  89034. "es.typed-array.reverse",
  89035. "es.typed-array.set",
  89036. "es.typed-array.slice",
  89037. "es.typed-array.some",
  89038. "es.typed-array.sort",
  89039. "es.typed-array.subarray",
  89040. "es.typed-array.to-locale-string",
  89041. "es.typed-array.to-string"
  89042. ],
  89043. "core-js/es/typed-array/int8-array": [
  89044. "es.object.to-string",
  89045. "es.typed-array.int8-array",
  89046. "es.typed-array.copy-within",
  89047. "es.typed-array.every",
  89048. "es.typed-array.fill",
  89049. "es.typed-array.filter",
  89050. "es.typed-array.find",
  89051. "es.typed-array.find-index",
  89052. "es.typed-array.for-each",
  89053. "es.typed-array.from",
  89054. "es.typed-array.includes",
  89055. "es.typed-array.index-of",
  89056. "es.typed-array.iterator",
  89057. "es.typed-array.join",
  89058. "es.typed-array.last-index-of",
  89059. "es.typed-array.map",
  89060. "es.typed-array.of",
  89061. "es.typed-array.reduce",
  89062. "es.typed-array.reduce-right",
  89063. "es.typed-array.reverse",
  89064. "es.typed-array.set",
  89065. "es.typed-array.slice",
  89066. "es.typed-array.some",
  89067. "es.typed-array.sort",
  89068. "es.typed-array.subarray",
  89069. "es.typed-array.to-locale-string",
  89070. "es.typed-array.to-string"
  89071. ],
  89072. "core-js/es/typed-array/iterator": [
  89073. "es.typed-array.iterator"
  89074. ],
  89075. "core-js/es/typed-array/join": [
  89076. "es.typed-array.join"
  89077. ],
  89078. "core-js/es/typed-array/keys": [
  89079. "es.typed-array.iterator"
  89080. ],
  89081. "core-js/es/typed-array/last-index-of": [
  89082. "es.typed-array.last-index-of"
  89083. ],
  89084. "core-js/es/typed-array/map": [
  89085. "es.typed-array.map"
  89086. ],
  89087. "core-js/es/typed-array/methods": [
  89088. "es.object.to-string",
  89089. "es.typed-array.copy-within",
  89090. "es.typed-array.every",
  89091. "es.typed-array.fill",
  89092. "es.typed-array.filter",
  89093. "es.typed-array.find",
  89094. "es.typed-array.find-index",
  89095. "es.typed-array.for-each",
  89096. "es.typed-array.from",
  89097. "es.typed-array.includes",
  89098. "es.typed-array.index-of",
  89099. "es.typed-array.iterator",
  89100. "es.typed-array.join",
  89101. "es.typed-array.last-index-of",
  89102. "es.typed-array.map",
  89103. "es.typed-array.of",
  89104. "es.typed-array.reduce",
  89105. "es.typed-array.reduce-right",
  89106. "es.typed-array.reverse",
  89107. "es.typed-array.set",
  89108. "es.typed-array.slice",
  89109. "es.typed-array.some",
  89110. "es.typed-array.sort",
  89111. "es.typed-array.subarray",
  89112. "es.typed-array.to-locale-string",
  89113. "es.typed-array.to-string"
  89114. ],
  89115. "core-js/es/typed-array/of": [
  89116. "es.typed-array.of"
  89117. ],
  89118. "core-js/es/typed-array/reduce": [
  89119. "es.typed-array.reduce"
  89120. ],
  89121. "core-js/es/typed-array/reduce-right": [
  89122. "es.typed-array.reduce-right"
  89123. ],
  89124. "core-js/es/typed-array/reverse": [
  89125. "es.typed-array.reverse"
  89126. ],
  89127. "core-js/es/typed-array/set": [
  89128. "es.typed-array.set"
  89129. ],
  89130. "core-js/es/typed-array/slice": [
  89131. "es.typed-array.slice"
  89132. ],
  89133. "core-js/es/typed-array/some": [
  89134. "es.typed-array.some"
  89135. ],
  89136. "core-js/es/typed-array/sort": [
  89137. "es.typed-array.sort"
  89138. ],
  89139. "core-js/es/typed-array/subarray": [
  89140. "es.typed-array.subarray"
  89141. ],
  89142. "core-js/es/typed-array/to-locale-string": [
  89143. "es.typed-array.to-locale-string"
  89144. ],
  89145. "core-js/es/typed-array/to-string": [
  89146. "es.typed-array.to-string"
  89147. ],
  89148. "core-js/es/typed-array/uint16-array": [
  89149. "es.object.to-string",
  89150. "es.typed-array.uint16-array",
  89151. "es.typed-array.copy-within",
  89152. "es.typed-array.every",
  89153. "es.typed-array.fill",
  89154. "es.typed-array.filter",
  89155. "es.typed-array.find",
  89156. "es.typed-array.find-index",
  89157. "es.typed-array.for-each",
  89158. "es.typed-array.from",
  89159. "es.typed-array.includes",
  89160. "es.typed-array.index-of",
  89161. "es.typed-array.iterator",
  89162. "es.typed-array.join",
  89163. "es.typed-array.last-index-of",
  89164. "es.typed-array.map",
  89165. "es.typed-array.of",
  89166. "es.typed-array.reduce",
  89167. "es.typed-array.reduce-right",
  89168. "es.typed-array.reverse",
  89169. "es.typed-array.set",
  89170. "es.typed-array.slice",
  89171. "es.typed-array.some",
  89172. "es.typed-array.sort",
  89173. "es.typed-array.subarray",
  89174. "es.typed-array.to-locale-string",
  89175. "es.typed-array.to-string"
  89176. ],
  89177. "core-js/es/typed-array/uint32-array": [
  89178. "es.object.to-string",
  89179. "es.typed-array.uint32-array",
  89180. "es.typed-array.copy-within",
  89181. "es.typed-array.every",
  89182. "es.typed-array.fill",
  89183. "es.typed-array.filter",
  89184. "es.typed-array.find",
  89185. "es.typed-array.find-index",
  89186. "es.typed-array.for-each",
  89187. "es.typed-array.from",
  89188. "es.typed-array.includes",
  89189. "es.typed-array.index-of",
  89190. "es.typed-array.iterator",
  89191. "es.typed-array.join",
  89192. "es.typed-array.last-index-of",
  89193. "es.typed-array.map",
  89194. "es.typed-array.of",
  89195. "es.typed-array.reduce",
  89196. "es.typed-array.reduce-right",
  89197. "es.typed-array.reverse",
  89198. "es.typed-array.set",
  89199. "es.typed-array.slice",
  89200. "es.typed-array.some",
  89201. "es.typed-array.sort",
  89202. "es.typed-array.subarray",
  89203. "es.typed-array.to-locale-string",
  89204. "es.typed-array.to-string"
  89205. ],
  89206. "core-js/es/typed-array/uint8-array": [
  89207. "es.object.to-string",
  89208. "es.typed-array.uint8-array",
  89209. "es.typed-array.copy-within",
  89210. "es.typed-array.every",
  89211. "es.typed-array.fill",
  89212. "es.typed-array.filter",
  89213. "es.typed-array.find",
  89214. "es.typed-array.find-index",
  89215. "es.typed-array.for-each",
  89216. "es.typed-array.from",
  89217. "es.typed-array.includes",
  89218. "es.typed-array.index-of",
  89219. "es.typed-array.iterator",
  89220. "es.typed-array.join",
  89221. "es.typed-array.last-index-of",
  89222. "es.typed-array.map",
  89223. "es.typed-array.of",
  89224. "es.typed-array.reduce",
  89225. "es.typed-array.reduce-right",
  89226. "es.typed-array.reverse",
  89227. "es.typed-array.set",
  89228. "es.typed-array.slice",
  89229. "es.typed-array.some",
  89230. "es.typed-array.sort",
  89231. "es.typed-array.subarray",
  89232. "es.typed-array.to-locale-string",
  89233. "es.typed-array.to-string"
  89234. ],
  89235. "core-js/es/typed-array/uint8-clamped-array": [
  89236. "es.object.to-string",
  89237. "es.typed-array.uint8-clamped-array",
  89238. "es.typed-array.copy-within",
  89239. "es.typed-array.every",
  89240. "es.typed-array.fill",
  89241. "es.typed-array.filter",
  89242. "es.typed-array.find",
  89243. "es.typed-array.find-index",
  89244. "es.typed-array.for-each",
  89245. "es.typed-array.from",
  89246. "es.typed-array.includes",
  89247. "es.typed-array.index-of",
  89248. "es.typed-array.iterator",
  89249. "es.typed-array.join",
  89250. "es.typed-array.last-index-of",
  89251. "es.typed-array.map",
  89252. "es.typed-array.of",
  89253. "es.typed-array.reduce",
  89254. "es.typed-array.reduce-right",
  89255. "es.typed-array.reverse",
  89256. "es.typed-array.set",
  89257. "es.typed-array.slice",
  89258. "es.typed-array.some",
  89259. "es.typed-array.sort",
  89260. "es.typed-array.subarray",
  89261. "es.typed-array.to-locale-string",
  89262. "es.typed-array.to-string"
  89263. ],
  89264. "core-js/es/typed-array/values": [
  89265. "es.typed-array.iterator"
  89266. ],
  89267. "core-js/es/unescape": [
  89268. "es.unescape"
  89269. ],
  89270. "core-js/es/weak-map": [
  89271. "es.object.to-string",
  89272. "es.weak-map",
  89273. "web.dom-collections.iterator"
  89274. ],
  89275. "core-js/es/weak-set": [
  89276. "es.object.to-string",
  89277. "es.weak-set",
  89278. "web.dom-collections.iterator"
  89279. ],
  89280. "core-js/features": [
  89281. "es.symbol",
  89282. "es.symbol.description",
  89283. "es.symbol.async-iterator",
  89284. "es.symbol.has-instance",
  89285. "es.symbol.is-concat-spreadable",
  89286. "es.symbol.iterator",
  89287. "es.symbol.match",
  89288. "es.symbol.match-all",
  89289. "es.symbol.replace",
  89290. "es.symbol.search",
  89291. "es.symbol.species",
  89292. "es.symbol.split",
  89293. "es.symbol.to-primitive",
  89294. "es.symbol.to-string-tag",
  89295. "es.symbol.unscopables",
  89296. "es.aggregate-error",
  89297. "es.array.concat",
  89298. "es.array.copy-within",
  89299. "es.array.every",
  89300. "es.array.fill",
  89301. "es.array.filter",
  89302. "es.array.find",
  89303. "es.array.find-index",
  89304. "es.array.flat",
  89305. "es.array.flat-map",
  89306. "es.array.for-each",
  89307. "es.array.from",
  89308. "es.array.includes",
  89309. "es.array.index-of",
  89310. "es.array.is-array",
  89311. "es.array.iterator",
  89312. "es.array.join",
  89313. "es.array.last-index-of",
  89314. "es.array.map",
  89315. "es.array.of",
  89316. "es.array.reduce",
  89317. "es.array.reduce-right",
  89318. "es.array.reverse",
  89319. "es.array.slice",
  89320. "es.array.some",
  89321. "es.array.sort",
  89322. "es.array.species",
  89323. "es.array.splice",
  89324. "es.array.unscopables.flat",
  89325. "es.array.unscopables.flat-map",
  89326. "es.array-buffer.constructor",
  89327. "es.array-buffer.is-view",
  89328. "es.array-buffer.slice",
  89329. "es.data-view",
  89330. "es.date.get-year",
  89331. "es.date.now",
  89332. "es.date.set-year",
  89333. "es.date.to-gmt-string",
  89334. "es.date.to-iso-string",
  89335. "es.date.to-json",
  89336. "es.date.to-primitive",
  89337. "es.date.to-string",
  89338. "es.escape",
  89339. "es.function.bind",
  89340. "es.function.has-instance",
  89341. "es.function.name",
  89342. "es.global-this",
  89343. "es.json.stringify",
  89344. "es.json.to-string-tag",
  89345. "es.map",
  89346. "es.math.acosh",
  89347. "es.math.asinh",
  89348. "es.math.atanh",
  89349. "es.math.cbrt",
  89350. "es.math.clz32",
  89351. "es.math.cosh",
  89352. "es.math.expm1",
  89353. "es.math.fround",
  89354. "es.math.hypot",
  89355. "es.math.imul",
  89356. "es.math.log10",
  89357. "es.math.log1p",
  89358. "es.math.log2",
  89359. "es.math.sign",
  89360. "es.math.sinh",
  89361. "es.math.tanh",
  89362. "es.math.to-string-tag",
  89363. "es.math.trunc",
  89364. "es.number.constructor",
  89365. "es.number.epsilon",
  89366. "es.number.is-finite",
  89367. "es.number.is-integer",
  89368. "es.number.is-nan",
  89369. "es.number.is-safe-integer",
  89370. "es.number.max-safe-integer",
  89371. "es.number.min-safe-integer",
  89372. "es.number.parse-float",
  89373. "es.number.parse-int",
  89374. "es.number.to-fixed",
  89375. "es.number.to-precision",
  89376. "es.object.assign",
  89377. "es.object.create",
  89378. "es.object.define-getter",
  89379. "es.object.define-properties",
  89380. "es.object.define-property",
  89381. "es.object.define-setter",
  89382. "es.object.entries",
  89383. "es.object.freeze",
  89384. "es.object.from-entries",
  89385. "es.object.get-own-property-descriptor",
  89386. "es.object.get-own-property-descriptors",
  89387. "es.object.get-own-property-names",
  89388. "es.object.get-prototype-of",
  89389. "es.object.is",
  89390. "es.object.is-extensible",
  89391. "es.object.is-frozen",
  89392. "es.object.is-sealed",
  89393. "es.object.keys",
  89394. "es.object.lookup-getter",
  89395. "es.object.lookup-setter",
  89396. "es.object.prevent-extensions",
  89397. "es.object.seal",
  89398. "es.object.set-prototype-of",
  89399. "es.object.to-string",
  89400. "es.object.values",
  89401. "es.parse-float",
  89402. "es.parse-int",
  89403. "es.promise",
  89404. "es.promise.all-settled",
  89405. "es.promise.any",
  89406. "es.promise.finally",
  89407. "es.reflect.apply",
  89408. "es.reflect.construct",
  89409. "es.reflect.define-property",
  89410. "es.reflect.delete-property",
  89411. "es.reflect.get",
  89412. "es.reflect.get-own-property-descriptor",
  89413. "es.reflect.get-prototype-of",
  89414. "es.reflect.has",
  89415. "es.reflect.is-extensible",
  89416. "es.reflect.own-keys",
  89417. "es.reflect.prevent-extensions",
  89418. "es.reflect.set",
  89419. "es.reflect.set-prototype-of",
  89420. "es.reflect.to-string-tag",
  89421. "es.regexp.constructor",
  89422. "es.regexp.dot-all",
  89423. "es.regexp.exec",
  89424. "es.regexp.flags",
  89425. "es.regexp.sticky",
  89426. "es.regexp.test",
  89427. "es.regexp.to-string",
  89428. "es.set",
  89429. "es.string.code-point-at",
  89430. "es.string.ends-with",
  89431. "es.string.from-code-point",
  89432. "es.string.includes",
  89433. "es.string.iterator",
  89434. "es.string.match",
  89435. "es.string.match-all",
  89436. "es.string.pad-end",
  89437. "es.string.pad-start",
  89438. "es.string.raw",
  89439. "es.string.repeat",
  89440. "es.string.replace",
  89441. "es.string.replace-all",
  89442. "es.string.search",
  89443. "es.string.split",
  89444. "es.string.starts-with",
  89445. "es.string.substr",
  89446. "es.string.trim",
  89447. "es.string.trim-end",
  89448. "es.string.trim-start",
  89449. "es.string.anchor",
  89450. "es.string.big",
  89451. "es.string.blink",
  89452. "es.string.bold",
  89453. "es.string.fixed",
  89454. "es.string.fontcolor",
  89455. "es.string.fontsize",
  89456. "es.string.italics",
  89457. "es.string.link",
  89458. "es.string.small",
  89459. "es.string.strike",
  89460. "es.string.sub",
  89461. "es.string.sup",
  89462. "es.typed-array.float32-array",
  89463. "es.typed-array.float64-array",
  89464. "es.typed-array.int8-array",
  89465. "es.typed-array.int16-array",
  89466. "es.typed-array.int32-array",
  89467. "es.typed-array.uint8-array",
  89468. "es.typed-array.uint8-clamped-array",
  89469. "es.typed-array.uint16-array",
  89470. "es.typed-array.uint32-array",
  89471. "es.typed-array.copy-within",
  89472. "es.typed-array.every",
  89473. "es.typed-array.fill",
  89474. "es.typed-array.filter",
  89475. "es.typed-array.find",
  89476. "es.typed-array.find-index",
  89477. "es.typed-array.for-each",
  89478. "es.typed-array.from",
  89479. "es.typed-array.includes",
  89480. "es.typed-array.index-of",
  89481. "es.typed-array.iterator",
  89482. "es.typed-array.join",
  89483. "es.typed-array.last-index-of",
  89484. "es.typed-array.map",
  89485. "es.typed-array.of",
  89486. "es.typed-array.reduce",
  89487. "es.typed-array.reduce-right",
  89488. "es.typed-array.reverse",
  89489. "es.typed-array.set",
  89490. "es.typed-array.slice",
  89491. "es.typed-array.some",
  89492. "es.typed-array.sort",
  89493. "es.typed-array.subarray",
  89494. "es.typed-array.to-locale-string",
  89495. "es.typed-array.to-string",
  89496. "es.unescape",
  89497. "es.weak-map",
  89498. "es.weak-set",
  89499. "esnext.aggregate-error",
  89500. "esnext.array.at",
  89501. "esnext.array.filter-out",
  89502. "esnext.array.find-last",
  89503. "esnext.array.find-last-index",
  89504. "esnext.array.is-template-object",
  89505. "esnext.array.last-index",
  89506. "esnext.array.last-item",
  89507. "esnext.array.unique-by",
  89508. "esnext.async-iterator.constructor",
  89509. "esnext.async-iterator.as-indexed-pairs",
  89510. "esnext.async-iterator.drop",
  89511. "esnext.async-iterator.every",
  89512. "esnext.async-iterator.filter",
  89513. "esnext.async-iterator.find",
  89514. "esnext.async-iterator.flat-map",
  89515. "esnext.async-iterator.for-each",
  89516. "esnext.async-iterator.from",
  89517. "esnext.async-iterator.map",
  89518. "esnext.async-iterator.reduce",
  89519. "esnext.async-iterator.some",
  89520. "esnext.async-iterator.take",
  89521. "esnext.async-iterator.to-array",
  89522. "esnext.bigint.range",
  89523. "esnext.composite-key",
  89524. "esnext.composite-symbol",
  89525. "esnext.global-this",
  89526. "esnext.iterator.constructor",
  89527. "esnext.iterator.as-indexed-pairs",
  89528. "esnext.iterator.drop",
  89529. "esnext.iterator.every",
  89530. "esnext.iterator.filter",
  89531. "esnext.iterator.find",
  89532. "esnext.iterator.flat-map",
  89533. "esnext.iterator.for-each",
  89534. "esnext.iterator.from",
  89535. "esnext.iterator.map",
  89536. "esnext.iterator.reduce",
  89537. "esnext.iterator.some",
  89538. "esnext.iterator.take",
  89539. "esnext.iterator.to-array",
  89540. "esnext.map.delete-all",
  89541. "esnext.map.emplace",
  89542. "esnext.map.every",
  89543. "esnext.map.filter",
  89544. "esnext.map.find",
  89545. "esnext.map.find-key",
  89546. "esnext.map.from",
  89547. "esnext.map.group-by",
  89548. "esnext.map.includes",
  89549. "esnext.map.key-by",
  89550. "esnext.map.key-of",
  89551. "esnext.map.map-keys",
  89552. "esnext.map.map-values",
  89553. "esnext.map.merge",
  89554. "esnext.map.of",
  89555. "esnext.map.reduce",
  89556. "esnext.map.some",
  89557. "esnext.map.update",
  89558. "esnext.map.update-or-insert",
  89559. "esnext.map.upsert",
  89560. "esnext.math.clamp",
  89561. "esnext.math.deg-per-rad",
  89562. "esnext.math.degrees",
  89563. "esnext.math.fscale",
  89564. "esnext.math.iaddh",
  89565. "esnext.math.imulh",
  89566. "esnext.math.isubh",
  89567. "esnext.math.rad-per-deg",
  89568. "esnext.math.radians",
  89569. "esnext.math.scale",
  89570. "esnext.math.seeded-prng",
  89571. "esnext.math.signbit",
  89572. "esnext.math.umulh",
  89573. "esnext.number.from-string",
  89574. "esnext.number.range",
  89575. "esnext.object.has-own",
  89576. "esnext.object.iterate-entries",
  89577. "esnext.object.iterate-keys",
  89578. "esnext.object.iterate-values",
  89579. "esnext.observable",
  89580. "esnext.promise.all-settled",
  89581. "esnext.promise.any",
  89582. "esnext.promise.try",
  89583. "esnext.reflect.define-metadata",
  89584. "esnext.reflect.delete-metadata",
  89585. "esnext.reflect.get-metadata",
  89586. "esnext.reflect.get-metadata-keys",
  89587. "esnext.reflect.get-own-metadata",
  89588. "esnext.reflect.get-own-metadata-keys",
  89589. "esnext.reflect.has-metadata",
  89590. "esnext.reflect.has-own-metadata",
  89591. "esnext.reflect.metadata",
  89592. "esnext.set.add-all",
  89593. "esnext.set.delete-all",
  89594. "esnext.set.difference",
  89595. "esnext.set.every",
  89596. "esnext.set.filter",
  89597. "esnext.set.find",
  89598. "esnext.set.from",
  89599. "esnext.set.intersection",
  89600. "esnext.set.is-disjoint-from",
  89601. "esnext.set.is-subset-of",
  89602. "esnext.set.is-superset-of",
  89603. "esnext.set.join",
  89604. "esnext.set.map",
  89605. "esnext.set.of",
  89606. "esnext.set.reduce",
  89607. "esnext.set.some",
  89608. "esnext.set.symmetric-difference",
  89609. "esnext.set.union",
  89610. "esnext.string.at",
  89611. "esnext.string.code-points",
  89612. "esnext.string.match-all",
  89613. "esnext.string.replace-all",
  89614. "esnext.symbol.async-dispose",
  89615. "esnext.symbol.dispose",
  89616. "esnext.symbol.matcher",
  89617. "esnext.symbol.metadata",
  89618. "esnext.symbol.observable",
  89619. "esnext.symbol.pattern-match",
  89620. "esnext.symbol.replace-all",
  89621. "esnext.typed-array.at",
  89622. "esnext.typed-array.filter-out",
  89623. "esnext.typed-array.find-last",
  89624. "esnext.typed-array.find-last-index",
  89625. "esnext.typed-array.unique-by",
  89626. "esnext.weak-map.delete-all",
  89627. "esnext.weak-map.from",
  89628. "esnext.weak-map.of",
  89629. "esnext.weak-map.emplace",
  89630. "esnext.weak-map.upsert",
  89631. "esnext.weak-set.add-all",
  89632. "esnext.weak-set.delete-all",
  89633. "esnext.weak-set.from",
  89634. "esnext.weak-set.of",
  89635. "web.dom-collections.for-each",
  89636. "web.dom-collections.iterator",
  89637. "web.immediate",
  89638. "web.queue-microtask",
  89639. "web.timers",
  89640. "web.url",
  89641. "web.url.to-json",
  89642. "web.url-search-params"
  89643. ],
  89644. "core-js/features/aggregate-error": [
  89645. "es.aggregate-error",
  89646. "es.string.iterator",
  89647. "esnext.aggregate-error",
  89648. "web.dom-collections.iterator"
  89649. ],
  89650. "core-js/features/array": [
  89651. "es.array.concat",
  89652. "es.array.copy-within",
  89653. "es.array.every",
  89654. "es.array.fill",
  89655. "es.array.filter",
  89656. "es.array.find",
  89657. "es.array.find-index",
  89658. "es.array.flat",
  89659. "es.array.flat-map",
  89660. "es.array.for-each",
  89661. "es.array.from",
  89662. "es.array.includes",
  89663. "es.array.index-of",
  89664. "es.array.is-array",
  89665. "es.array.iterator",
  89666. "es.array.join",
  89667. "es.array.last-index-of",
  89668. "es.array.map",
  89669. "es.array.of",
  89670. "es.array.reduce",
  89671. "es.array.reduce-right",
  89672. "es.array.reverse",
  89673. "es.array.slice",
  89674. "es.array.some",
  89675. "es.array.sort",
  89676. "es.array.species",
  89677. "es.array.splice",
  89678. "es.array.unscopables.flat",
  89679. "es.array.unscopables.flat-map",
  89680. "es.map",
  89681. "es.string.iterator",
  89682. "esnext.array.at",
  89683. "esnext.array.filter-out",
  89684. "esnext.array.find-last",
  89685. "esnext.array.find-last-index",
  89686. "esnext.array.is-template-object",
  89687. "esnext.array.last-index",
  89688. "esnext.array.last-item",
  89689. "esnext.array.unique-by"
  89690. ],
  89691. "core-js/features/array-buffer": [
  89692. "es.array-buffer.constructor",
  89693. "es.array-buffer.is-view",
  89694. "es.array-buffer.slice",
  89695. "es.object.to-string"
  89696. ],
  89697. "core-js/features/array-buffer/constructor": [
  89698. "es.array-buffer.constructor",
  89699. "es.object.to-string"
  89700. ],
  89701. "core-js/features/array-buffer/is-view": [
  89702. "es.array-buffer.is-view"
  89703. ],
  89704. "core-js/features/array-buffer/slice": [
  89705. "es.array-buffer.slice"
  89706. ],
  89707. "core-js/features/array/at": [
  89708. "esnext.array.at"
  89709. ],
  89710. "core-js/features/array/concat": [
  89711. "es.array.concat"
  89712. ],
  89713. "core-js/features/array/copy-within": [
  89714. "es.array.copy-within"
  89715. ],
  89716. "core-js/features/array/entries": [
  89717. "es.array.iterator"
  89718. ],
  89719. "core-js/features/array/every": [
  89720. "es.array.every"
  89721. ],
  89722. "core-js/features/array/fill": [
  89723. "es.array.fill"
  89724. ],
  89725. "core-js/features/array/filter": [
  89726. "es.array.filter"
  89727. ],
  89728. "core-js/features/array/filter-out": [
  89729. "esnext.array.filter-out"
  89730. ],
  89731. "core-js/features/array/find": [
  89732. "es.array.find"
  89733. ],
  89734. "core-js/features/array/find-index": [
  89735. "es.array.find-index"
  89736. ],
  89737. "core-js/features/array/find-last": [
  89738. "esnext.array.find-last"
  89739. ],
  89740. "core-js/features/array/find-last-index": [
  89741. "esnext.array.find-last-index"
  89742. ],
  89743. "core-js/features/array/flat": [
  89744. "es.array.flat",
  89745. "es.array.unscopables.flat"
  89746. ],
  89747. "core-js/features/array/flat-map": [
  89748. "es.array.flat-map",
  89749. "es.array.unscopables.flat-map"
  89750. ],
  89751. "core-js/features/array/for-each": [
  89752. "es.array.for-each"
  89753. ],
  89754. "core-js/features/array/from": [
  89755. "es.array.from",
  89756. "es.string.iterator"
  89757. ],
  89758. "core-js/features/array/includes": [
  89759. "es.array.includes"
  89760. ],
  89761. "core-js/features/array/index-of": [
  89762. "es.array.index-of"
  89763. ],
  89764. "core-js/features/array/is-array": [
  89765. "es.array.is-array"
  89766. ],
  89767. "core-js/features/array/is-template-object": [
  89768. "esnext.array.is-template-object"
  89769. ],
  89770. "core-js/features/array/iterator": [
  89771. "es.array.iterator"
  89772. ],
  89773. "core-js/features/array/join": [
  89774. "es.array.join"
  89775. ],
  89776. "core-js/features/array/keys": [
  89777. "es.array.iterator"
  89778. ],
  89779. "core-js/features/array/last-index": [
  89780. "esnext.array.last-index"
  89781. ],
  89782. "core-js/features/array/last-index-of": [
  89783. "es.array.last-index-of"
  89784. ],
  89785. "core-js/features/array/last-item": [
  89786. "esnext.array.last-item"
  89787. ],
  89788. "core-js/features/array/map": [
  89789. "es.array.map"
  89790. ],
  89791. "core-js/features/array/of": [
  89792. "es.array.of"
  89793. ],
  89794. "core-js/features/array/reduce": [
  89795. "es.array.reduce"
  89796. ],
  89797. "core-js/features/array/reduce-right": [
  89798. "es.array.reduce-right"
  89799. ],
  89800. "core-js/features/array/reverse": [
  89801. "es.array.reverse"
  89802. ],
  89803. "core-js/features/array/slice": [
  89804. "es.array.slice"
  89805. ],
  89806. "core-js/features/array/some": [
  89807. "es.array.some"
  89808. ],
  89809. "core-js/features/array/sort": [
  89810. "es.array.sort"
  89811. ],
  89812. "core-js/features/array/splice": [
  89813. "es.array.splice"
  89814. ],
  89815. "core-js/features/array/unique-by": [
  89816. "es.map",
  89817. "esnext.array.unique-by"
  89818. ],
  89819. "core-js/features/array/values": [
  89820. "es.array.iterator"
  89821. ],
  89822. "core-js/features/array/virtual": [
  89823. "es.array.concat",
  89824. "es.array.copy-within",
  89825. "es.array.every",
  89826. "es.array.fill",
  89827. "es.array.filter",
  89828. "es.array.find",
  89829. "es.array.find-index",
  89830. "es.array.flat",
  89831. "es.array.flat-map",
  89832. "es.array.for-each",
  89833. "es.array.includes",
  89834. "es.array.index-of",
  89835. "es.array.iterator",
  89836. "es.array.join",
  89837. "es.array.last-index-of",
  89838. "es.array.map",
  89839. "es.array.reduce",
  89840. "es.array.reduce-right",
  89841. "es.array.reverse",
  89842. "es.array.slice",
  89843. "es.array.some",
  89844. "es.array.sort",
  89845. "es.array.species",
  89846. "es.array.splice",
  89847. "es.array.unscopables.flat",
  89848. "es.array.unscopables.flat-map",
  89849. "es.map",
  89850. "esnext.array.at",
  89851. "esnext.array.filter-out",
  89852. "esnext.array.find-last",
  89853. "esnext.array.find-last-index",
  89854. "esnext.array.unique-by"
  89855. ],
  89856. "core-js/features/array/virtual/at": [
  89857. "esnext.array.at"
  89858. ],
  89859. "core-js/features/array/virtual/concat": [
  89860. "es.array.concat"
  89861. ],
  89862. "core-js/features/array/virtual/copy-within": [
  89863. "es.array.copy-within"
  89864. ],
  89865. "core-js/features/array/virtual/entries": [
  89866. "es.array.iterator"
  89867. ],
  89868. "core-js/features/array/virtual/every": [
  89869. "es.array.every"
  89870. ],
  89871. "core-js/features/array/virtual/fill": [
  89872. "es.array.fill"
  89873. ],
  89874. "core-js/features/array/virtual/filter": [
  89875. "es.array.filter"
  89876. ],
  89877. "core-js/features/array/virtual/filter-out": [
  89878. "esnext.array.filter-out"
  89879. ],
  89880. "core-js/features/array/virtual/find": [
  89881. "es.array.find"
  89882. ],
  89883. "core-js/features/array/virtual/find-index": [
  89884. "es.array.find-index"
  89885. ],
  89886. "core-js/features/array/virtual/find-last": [
  89887. "esnext.array.find-last"
  89888. ],
  89889. "core-js/features/array/virtual/find-last-index": [
  89890. "esnext.array.find-last-index"
  89891. ],
  89892. "core-js/features/array/virtual/flat": [
  89893. "es.array.flat",
  89894. "es.array.unscopables.flat"
  89895. ],
  89896. "core-js/features/array/virtual/flat-map": [
  89897. "es.array.flat-map",
  89898. "es.array.unscopables.flat-map"
  89899. ],
  89900. "core-js/features/array/virtual/for-each": [
  89901. "es.array.for-each"
  89902. ],
  89903. "core-js/features/array/virtual/includes": [
  89904. "es.array.includes"
  89905. ],
  89906. "core-js/features/array/virtual/index-of": [
  89907. "es.array.index-of"
  89908. ],
  89909. "core-js/features/array/virtual/iterator": [
  89910. "es.array.iterator"
  89911. ],
  89912. "core-js/features/array/virtual/join": [
  89913. "es.array.join"
  89914. ],
  89915. "core-js/features/array/virtual/keys": [
  89916. "es.array.iterator"
  89917. ],
  89918. "core-js/features/array/virtual/last-index-of": [
  89919. "es.array.last-index-of"
  89920. ],
  89921. "core-js/features/array/virtual/map": [
  89922. "es.array.map"
  89923. ],
  89924. "core-js/features/array/virtual/reduce": [
  89925. "es.array.reduce"
  89926. ],
  89927. "core-js/features/array/virtual/reduce-right": [
  89928. "es.array.reduce-right"
  89929. ],
  89930. "core-js/features/array/virtual/reverse": [
  89931. "es.array.reverse"
  89932. ],
  89933. "core-js/features/array/virtual/slice": [
  89934. "es.array.slice"
  89935. ],
  89936. "core-js/features/array/virtual/some": [
  89937. "es.array.some"
  89938. ],
  89939. "core-js/features/array/virtual/sort": [
  89940. "es.array.sort"
  89941. ],
  89942. "core-js/features/array/virtual/splice": [
  89943. "es.array.splice"
  89944. ],
  89945. "core-js/features/array/virtual/unique-by": [
  89946. "es.map",
  89947. "esnext.array.unique-by"
  89948. ],
  89949. "core-js/features/array/virtual/values": [
  89950. "es.array.iterator"
  89951. ],
  89952. "core-js/features/async-iterator": [
  89953. "es.object.to-string",
  89954. "es.promise",
  89955. "es.string.iterator",
  89956. "esnext.async-iterator.constructor",
  89957. "esnext.async-iterator.as-indexed-pairs",
  89958. "esnext.async-iterator.drop",
  89959. "esnext.async-iterator.every",
  89960. "esnext.async-iterator.filter",
  89961. "esnext.async-iterator.find",
  89962. "esnext.async-iterator.flat-map",
  89963. "esnext.async-iterator.for-each",
  89964. "esnext.async-iterator.from",
  89965. "esnext.async-iterator.map",
  89966. "esnext.async-iterator.reduce",
  89967. "esnext.async-iterator.some",
  89968. "esnext.async-iterator.take",
  89969. "esnext.async-iterator.to-array",
  89970. "web.dom-collections.iterator"
  89971. ],
  89972. "core-js/features/async-iterator/as-indexed-pairs": [
  89973. "es.object.to-string",
  89974. "es.promise",
  89975. "es.string.iterator",
  89976. "esnext.async-iterator.constructor",
  89977. "esnext.async-iterator.as-indexed-pairs",
  89978. "web.dom-collections.iterator"
  89979. ],
  89980. "core-js/features/async-iterator/drop": [
  89981. "es.object.to-string",
  89982. "es.promise",
  89983. "es.string.iterator",
  89984. "esnext.async-iterator.constructor",
  89985. "esnext.async-iterator.drop",
  89986. "web.dom-collections.iterator"
  89987. ],
  89988. "core-js/features/async-iterator/every": [
  89989. "es.object.to-string",
  89990. "es.promise",
  89991. "es.string.iterator",
  89992. "esnext.async-iterator.constructor",
  89993. "esnext.async-iterator.every",
  89994. "web.dom-collections.iterator"
  89995. ],
  89996. "core-js/features/async-iterator/filter": [
  89997. "es.object.to-string",
  89998. "es.promise",
  89999. "es.string.iterator",
  90000. "esnext.async-iterator.constructor",
  90001. "esnext.async-iterator.filter",
  90002. "web.dom-collections.iterator"
  90003. ],
  90004. "core-js/features/async-iterator/find": [
  90005. "es.object.to-string",
  90006. "es.promise",
  90007. "es.string.iterator",
  90008. "esnext.async-iterator.constructor",
  90009. "esnext.async-iterator.find",
  90010. "web.dom-collections.iterator"
  90011. ],
  90012. "core-js/features/async-iterator/flat-map": [
  90013. "es.object.to-string",
  90014. "es.promise",
  90015. "es.string.iterator",
  90016. "esnext.async-iterator.constructor",
  90017. "esnext.async-iterator.flat-map",
  90018. "web.dom-collections.iterator"
  90019. ],
  90020. "core-js/features/async-iterator/for-each": [
  90021. "es.object.to-string",
  90022. "es.promise",
  90023. "es.string.iterator",
  90024. "esnext.async-iterator.constructor",
  90025. "esnext.async-iterator.for-each",
  90026. "web.dom-collections.iterator"
  90027. ],
  90028. "core-js/features/async-iterator/from": [
  90029. "es.object.to-string",
  90030. "es.promise",
  90031. "es.string.iterator",
  90032. "esnext.async-iterator.constructor",
  90033. "esnext.async-iterator.from",
  90034. "web.dom-collections.iterator"
  90035. ],
  90036. "core-js/features/async-iterator/map": [
  90037. "es.object.to-string",
  90038. "es.promise",
  90039. "es.string.iterator",
  90040. "esnext.async-iterator.constructor",
  90041. "esnext.async-iterator.map",
  90042. "web.dom-collections.iterator"
  90043. ],
  90044. "core-js/features/async-iterator/reduce": [
  90045. "es.object.to-string",
  90046. "es.promise",
  90047. "es.string.iterator",
  90048. "esnext.async-iterator.constructor",
  90049. "esnext.async-iterator.reduce",
  90050. "web.dom-collections.iterator"
  90051. ],
  90052. "core-js/features/async-iterator/some": [
  90053. "es.object.to-string",
  90054. "es.promise",
  90055. "es.string.iterator",
  90056. "esnext.async-iterator.constructor",
  90057. "esnext.async-iterator.some",
  90058. "web.dom-collections.iterator"
  90059. ],
  90060. "core-js/features/async-iterator/take": [
  90061. "es.object.to-string",
  90062. "es.promise",
  90063. "es.string.iterator",
  90064. "esnext.async-iterator.constructor",
  90065. "esnext.async-iterator.take",
  90066. "web.dom-collections.iterator"
  90067. ],
  90068. "core-js/features/async-iterator/to-array": [
  90069. "es.object.to-string",
  90070. "es.promise",
  90071. "es.string.iterator",
  90072. "esnext.async-iterator.constructor",
  90073. "esnext.async-iterator.to-array",
  90074. "web.dom-collections.iterator"
  90075. ],
  90076. "core-js/features/bigint": [
  90077. "esnext.bigint.range"
  90078. ],
  90079. "core-js/features/bigint/range": [
  90080. "esnext.bigint.range"
  90081. ],
  90082. "core-js/features/clear-immediate": [
  90083. "web.immediate"
  90084. ],
  90085. "core-js/features/composite-key": [
  90086. "esnext.composite-key"
  90087. ],
  90088. "core-js/features/composite-symbol": [
  90089. "es.symbol",
  90090. "esnext.composite-symbol"
  90091. ],
  90092. "core-js/features/data-view": [
  90093. "es.data-view",
  90094. "es.object.to-string"
  90095. ],
  90096. "core-js/features/date": [
  90097. "es.date.get-year",
  90098. "es.date.now",
  90099. "es.date.set-year",
  90100. "es.date.to-gmt-string",
  90101. "es.date.to-iso-string",
  90102. "es.date.to-json",
  90103. "es.date.to-primitive",
  90104. "es.date.to-string"
  90105. ],
  90106. "core-js/features/date/get-year": [
  90107. "es.date.get-year"
  90108. ],
  90109. "core-js/features/date/now": [
  90110. "es.date.now"
  90111. ],
  90112. "core-js/features/date/set-year": [
  90113. "es.date.set-year"
  90114. ],
  90115. "core-js/features/date/to-gmt-string": [
  90116. "es.date.to-gmt-string"
  90117. ],
  90118. "core-js/features/date/to-iso-string": [
  90119. "es.date.to-iso-string",
  90120. "es.date.to-json"
  90121. ],
  90122. "core-js/features/date/to-json": [
  90123. "es.date.to-json"
  90124. ],
  90125. "core-js/features/date/to-primitive": [
  90126. "es.date.to-primitive"
  90127. ],
  90128. "core-js/features/date/to-string": [
  90129. "es.date.to-string"
  90130. ],
  90131. "core-js/features/dom-collections": [
  90132. "es.array.iterator",
  90133. "web.dom-collections.for-each",
  90134. "web.dom-collections.iterator"
  90135. ],
  90136. "core-js/features/dom-collections/for-each": [
  90137. "web.dom-collections.for-each"
  90138. ],
  90139. "core-js/features/dom-collections/iterator": [
  90140. "web.dom-collections.iterator"
  90141. ],
  90142. "core-js/features/escape": [
  90143. "es.escape"
  90144. ],
  90145. "core-js/features/function": [
  90146. "es.function.bind",
  90147. "es.function.has-instance",
  90148. "es.function.name"
  90149. ],
  90150. "core-js/features/function/bind": [
  90151. "es.function.bind"
  90152. ],
  90153. "core-js/features/function/has-instance": [
  90154. "es.function.has-instance"
  90155. ],
  90156. "core-js/features/function/name": [
  90157. "es.function.name"
  90158. ],
  90159. "core-js/features/function/virtual": [
  90160. "es.function.bind"
  90161. ],
  90162. "core-js/features/function/virtual/bind": [
  90163. "es.function.bind"
  90164. ],
  90165. "core-js/features/get-iterator": [
  90166. "es.string.iterator",
  90167. "web.dom-collections.iterator"
  90168. ],
  90169. "core-js/features/get-iterator-method": [
  90170. "es.string.iterator",
  90171. "web.dom-collections.iterator"
  90172. ],
  90173. "core-js/features/global-this": [
  90174. "es.global-this",
  90175. "esnext.global-this"
  90176. ],
  90177. "core-js/features/instance/at": [
  90178. "esnext.array.at",
  90179. "esnext.string.at"
  90180. ],
  90181. "core-js/features/instance/bind": [
  90182. "es.function.bind"
  90183. ],
  90184. "core-js/features/instance/code-point-at": [
  90185. "es.string.code-point-at"
  90186. ],
  90187. "core-js/features/instance/code-points": [
  90188. "esnext.string.code-points"
  90189. ],
  90190. "core-js/features/instance/concat": [
  90191. "es.array.concat"
  90192. ],
  90193. "core-js/features/instance/copy-within": [
  90194. "es.array.copy-within"
  90195. ],
  90196. "core-js/features/instance/ends-with": [
  90197. "es.string.ends-with"
  90198. ],
  90199. "core-js/features/instance/entries": [
  90200. "es.array.iterator",
  90201. "web.dom-collections.iterator"
  90202. ],
  90203. "core-js/features/instance/every": [
  90204. "es.array.every"
  90205. ],
  90206. "core-js/features/instance/fill": [
  90207. "es.array.fill"
  90208. ],
  90209. "core-js/features/instance/filter": [
  90210. "es.array.filter"
  90211. ],
  90212. "core-js/features/instance/filter-out": [
  90213. "esnext.array.filter-out"
  90214. ],
  90215. "core-js/features/instance/find": [
  90216. "es.array.find"
  90217. ],
  90218. "core-js/features/instance/find-index": [
  90219. "es.array.find-index"
  90220. ],
  90221. "core-js/features/instance/find-last": [
  90222. "esnext.array.find-last"
  90223. ],
  90224. "core-js/features/instance/find-last-index": [
  90225. "esnext.array.find-last-index"
  90226. ],
  90227. "core-js/features/instance/flags": [
  90228. "es.regexp.flags"
  90229. ],
  90230. "core-js/features/instance/flat": [
  90231. "es.array.flat",
  90232. "es.array.unscopables.flat"
  90233. ],
  90234. "core-js/features/instance/flat-map": [
  90235. "es.array.flat-map",
  90236. "es.array.unscopables.flat-map"
  90237. ],
  90238. "core-js/features/instance/for-each": [
  90239. "es.array.for-each",
  90240. "web.dom-collections.iterator"
  90241. ],
  90242. "core-js/features/instance/includes": [
  90243. "es.array.includes",
  90244. "es.string.includes"
  90245. ],
  90246. "core-js/features/instance/index-of": [
  90247. "es.array.index-of"
  90248. ],
  90249. "core-js/features/instance/keys": [
  90250. "es.array.iterator",
  90251. "web.dom-collections.iterator"
  90252. ],
  90253. "core-js/features/instance/last-index-of": [
  90254. "es.array.last-index-of"
  90255. ],
  90256. "core-js/features/instance/map": [
  90257. "es.array.map"
  90258. ],
  90259. "core-js/features/instance/match-all": [
  90260. "es.string.match-all",
  90261. "esnext.string.match-all"
  90262. ],
  90263. "core-js/features/instance/pad-end": [
  90264. "es.string.pad-end"
  90265. ],
  90266. "core-js/features/instance/pad-start": [
  90267. "es.string.pad-start"
  90268. ],
  90269. "core-js/features/instance/reduce": [
  90270. "es.array.reduce"
  90271. ],
  90272. "core-js/features/instance/reduce-right": [
  90273. "es.array.reduce-right"
  90274. ],
  90275. "core-js/features/instance/repeat": [
  90276. "es.string.repeat"
  90277. ],
  90278. "core-js/features/instance/replace-all": [
  90279. "es.string.replace-all"
  90280. ],
  90281. "core-js/features/instance/reverse": [
  90282. "es.array.reverse"
  90283. ],
  90284. "core-js/features/instance/slice": [
  90285. "es.array.slice"
  90286. ],
  90287. "core-js/features/instance/some": [
  90288. "es.array.some"
  90289. ],
  90290. "core-js/features/instance/sort": [
  90291. "es.array.sort"
  90292. ],
  90293. "core-js/features/instance/splice": [
  90294. "es.array.splice"
  90295. ],
  90296. "core-js/features/instance/starts-with": [
  90297. "es.string.starts-with"
  90298. ],
  90299. "core-js/features/instance/trim": [
  90300. "es.string.trim"
  90301. ],
  90302. "core-js/features/instance/trim-end": [
  90303. "es.string.trim-end"
  90304. ],
  90305. "core-js/features/instance/trim-left": [
  90306. "es.string.trim-start"
  90307. ],
  90308. "core-js/features/instance/trim-right": [
  90309. "es.string.trim-end"
  90310. ],
  90311. "core-js/features/instance/trim-start": [
  90312. "es.string.trim-start"
  90313. ],
  90314. "core-js/features/instance/unique-by": [
  90315. "es.map",
  90316. "esnext.array.unique-by"
  90317. ],
  90318. "core-js/features/instance/values": [
  90319. "es.array.iterator",
  90320. "web.dom-collections.iterator"
  90321. ],
  90322. "core-js/features/is-iterable": [
  90323. "es.string.iterator",
  90324. "web.dom-collections.iterator"
  90325. ],
  90326. "core-js/features/iterator": [
  90327. "es.object.to-string",
  90328. "es.string.iterator",
  90329. "esnext.iterator.constructor",
  90330. "esnext.iterator.as-indexed-pairs",
  90331. "esnext.iterator.drop",
  90332. "esnext.iterator.every",
  90333. "esnext.iterator.filter",
  90334. "esnext.iterator.find",
  90335. "esnext.iterator.flat-map",
  90336. "esnext.iterator.for-each",
  90337. "esnext.iterator.from",
  90338. "esnext.iterator.map",
  90339. "esnext.iterator.reduce",
  90340. "esnext.iterator.some",
  90341. "esnext.iterator.take",
  90342. "esnext.iterator.to-array",
  90343. "web.dom-collections.iterator"
  90344. ],
  90345. "core-js/features/iterator/as-indexed-pairs": [
  90346. "es.object.to-string",
  90347. "es.string.iterator",
  90348. "esnext.iterator.constructor",
  90349. "esnext.iterator.as-indexed-pairs",
  90350. "web.dom-collections.iterator"
  90351. ],
  90352. "core-js/features/iterator/drop": [
  90353. "es.object.to-string",
  90354. "es.string.iterator",
  90355. "esnext.iterator.constructor",
  90356. "esnext.iterator.drop",
  90357. "web.dom-collections.iterator"
  90358. ],
  90359. "core-js/features/iterator/every": [
  90360. "es.object.to-string",
  90361. "es.string.iterator",
  90362. "esnext.iterator.constructor",
  90363. "esnext.iterator.every",
  90364. "web.dom-collections.iterator"
  90365. ],
  90366. "core-js/features/iterator/filter": [
  90367. "es.object.to-string",
  90368. "es.string.iterator",
  90369. "esnext.iterator.constructor",
  90370. "esnext.iterator.filter",
  90371. "web.dom-collections.iterator"
  90372. ],
  90373. "core-js/features/iterator/find": [
  90374. "es.object.to-string",
  90375. "es.string.iterator",
  90376. "esnext.iterator.constructor",
  90377. "esnext.iterator.find",
  90378. "web.dom-collections.iterator"
  90379. ],
  90380. "core-js/features/iterator/flat-map": [
  90381. "es.object.to-string",
  90382. "es.string.iterator",
  90383. "esnext.iterator.constructor",
  90384. "esnext.iterator.flat-map",
  90385. "web.dom-collections.iterator"
  90386. ],
  90387. "core-js/features/iterator/for-each": [
  90388. "es.object.to-string",
  90389. "es.string.iterator",
  90390. "esnext.iterator.constructor",
  90391. "esnext.iterator.for-each",
  90392. "web.dom-collections.iterator"
  90393. ],
  90394. "core-js/features/iterator/from": [
  90395. "es.object.to-string",
  90396. "es.string.iterator",
  90397. "esnext.iterator.constructor",
  90398. "esnext.iterator.from",
  90399. "web.dom-collections.iterator"
  90400. ],
  90401. "core-js/features/iterator/map": [
  90402. "es.object.to-string",
  90403. "es.string.iterator",
  90404. "esnext.iterator.constructor",
  90405. "esnext.iterator.map",
  90406. "web.dom-collections.iterator"
  90407. ],
  90408. "core-js/features/iterator/reduce": [
  90409. "es.object.to-string",
  90410. "es.string.iterator",
  90411. "esnext.iterator.constructor",
  90412. "esnext.iterator.reduce",
  90413. "web.dom-collections.iterator"
  90414. ],
  90415. "core-js/features/iterator/some": [
  90416. "es.object.to-string",
  90417. "es.string.iterator",
  90418. "esnext.iterator.constructor",
  90419. "esnext.iterator.some",
  90420. "web.dom-collections.iterator"
  90421. ],
  90422. "core-js/features/iterator/take": [
  90423. "es.object.to-string",
  90424. "es.string.iterator",
  90425. "esnext.iterator.constructor",
  90426. "esnext.iterator.take",
  90427. "web.dom-collections.iterator"
  90428. ],
  90429. "core-js/features/iterator/to-array": [
  90430. "es.object.to-string",
  90431. "es.string.iterator",
  90432. "esnext.iterator.constructor",
  90433. "esnext.iterator.to-array",
  90434. "web.dom-collections.iterator"
  90435. ],
  90436. "core-js/features/json": [
  90437. "es.json.stringify",
  90438. "es.json.to-string-tag"
  90439. ],
  90440. "core-js/features/json/stringify": [
  90441. "es.json.stringify"
  90442. ],
  90443. "core-js/features/json/to-string-tag": [
  90444. "es.json.to-string-tag"
  90445. ],
  90446. "core-js/features/map": [
  90447. "es.map",
  90448. "es.object.to-string",
  90449. "es.string.iterator",
  90450. "esnext.map.delete-all",
  90451. "esnext.map.emplace",
  90452. "esnext.map.every",
  90453. "esnext.map.filter",
  90454. "esnext.map.find",
  90455. "esnext.map.find-key",
  90456. "esnext.map.from",
  90457. "esnext.map.group-by",
  90458. "esnext.map.includes",
  90459. "esnext.map.key-by",
  90460. "esnext.map.key-of",
  90461. "esnext.map.map-keys",
  90462. "esnext.map.map-values",
  90463. "esnext.map.merge",
  90464. "esnext.map.of",
  90465. "esnext.map.reduce",
  90466. "esnext.map.some",
  90467. "esnext.map.update",
  90468. "esnext.map.update-or-insert",
  90469. "esnext.map.upsert",
  90470. "web.dom-collections.iterator"
  90471. ],
  90472. "core-js/features/map/delete-all": [
  90473. "es.map",
  90474. "esnext.map.delete-all"
  90475. ],
  90476. "core-js/features/map/emplace": [
  90477. "es.map",
  90478. "esnext.map.emplace"
  90479. ],
  90480. "core-js/features/map/every": [
  90481. "es.map",
  90482. "esnext.map.every"
  90483. ],
  90484. "core-js/features/map/filter": [
  90485. "es.map",
  90486. "esnext.map.filter"
  90487. ],
  90488. "core-js/features/map/find": [
  90489. "es.map",
  90490. "esnext.map.find"
  90491. ],
  90492. "core-js/features/map/find-key": [
  90493. "es.map",
  90494. "esnext.map.find-key"
  90495. ],
  90496. "core-js/features/map/from": [
  90497. "es.map",
  90498. "es.string.iterator",
  90499. "esnext.map.from",
  90500. "web.dom-collections.iterator"
  90501. ],
  90502. "core-js/features/map/group-by": [
  90503. "es.map",
  90504. "esnext.map.group-by"
  90505. ],
  90506. "core-js/features/map/includes": [
  90507. "es.map",
  90508. "esnext.map.includes"
  90509. ],
  90510. "core-js/features/map/key-by": [
  90511. "es.map",
  90512. "esnext.map.key-by"
  90513. ],
  90514. "core-js/features/map/key-of": [
  90515. "es.map",
  90516. "esnext.map.key-of"
  90517. ],
  90518. "core-js/features/map/map-keys": [
  90519. "es.map",
  90520. "esnext.map.map-keys"
  90521. ],
  90522. "core-js/features/map/map-values": [
  90523. "es.map",
  90524. "esnext.map.map-values"
  90525. ],
  90526. "core-js/features/map/merge": [
  90527. "es.map",
  90528. "esnext.map.merge"
  90529. ],
  90530. "core-js/features/map/of": [
  90531. "es.map",
  90532. "es.string.iterator",
  90533. "esnext.map.of",
  90534. "web.dom-collections.iterator"
  90535. ],
  90536. "core-js/features/map/reduce": [
  90537. "es.map",
  90538. "esnext.map.reduce"
  90539. ],
  90540. "core-js/features/map/some": [
  90541. "es.map",
  90542. "esnext.map.some"
  90543. ],
  90544. "core-js/features/map/update": [
  90545. "es.map",
  90546. "esnext.map.update"
  90547. ],
  90548. "core-js/features/map/update-or-insert": [
  90549. "es.map",
  90550. "esnext.map.update-or-insert"
  90551. ],
  90552. "core-js/features/map/upsert": [
  90553. "es.map",
  90554. "esnext.map.upsert"
  90555. ],
  90556. "core-js/features/math": [
  90557. "es.math.acosh",
  90558. "es.math.asinh",
  90559. "es.math.atanh",
  90560. "es.math.cbrt",
  90561. "es.math.clz32",
  90562. "es.math.cosh",
  90563. "es.math.expm1",
  90564. "es.math.fround",
  90565. "es.math.hypot",
  90566. "es.math.imul",
  90567. "es.math.log10",
  90568. "es.math.log1p",
  90569. "es.math.log2",
  90570. "es.math.sign",
  90571. "es.math.sinh",
  90572. "es.math.tanh",
  90573. "es.math.to-string-tag",
  90574. "es.math.trunc",
  90575. "esnext.math.clamp",
  90576. "esnext.math.deg-per-rad",
  90577. "esnext.math.degrees",
  90578. "esnext.math.fscale",
  90579. "esnext.math.iaddh",
  90580. "esnext.math.imulh",
  90581. "esnext.math.isubh",
  90582. "esnext.math.rad-per-deg",
  90583. "esnext.math.radians",
  90584. "esnext.math.scale",
  90585. "esnext.math.seeded-prng",
  90586. "esnext.math.signbit",
  90587. "esnext.math.umulh"
  90588. ],
  90589. "core-js/features/math/acosh": [
  90590. "es.math.acosh"
  90591. ],
  90592. "core-js/features/math/asinh": [
  90593. "es.math.asinh"
  90594. ],
  90595. "core-js/features/math/atanh": [
  90596. "es.math.atanh"
  90597. ],
  90598. "core-js/features/math/cbrt": [
  90599. "es.math.cbrt"
  90600. ],
  90601. "core-js/features/math/clamp": [
  90602. "esnext.math.clamp"
  90603. ],
  90604. "core-js/features/math/clz32": [
  90605. "es.math.clz32"
  90606. ],
  90607. "core-js/features/math/cosh": [
  90608. "es.math.cosh"
  90609. ],
  90610. "core-js/features/math/deg-per-rad": [
  90611. "esnext.math.deg-per-rad"
  90612. ],
  90613. "core-js/features/math/degrees": [
  90614. "esnext.math.degrees"
  90615. ],
  90616. "core-js/features/math/expm1": [
  90617. "es.math.expm1"
  90618. ],
  90619. "core-js/features/math/fround": [
  90620. "es.math.fround"
  90621. ],
  90622. "core-js/features/math/fscale": [
  90623. "esnext.math.fscale"
  90624. ],
  90625. "core-js/features/math/hypot": [
  90626. "es.math.hypot"
  90627. ],
  90628. "core-js/features/math/iaddh": [
  90629. "esnext.math.iaddh"
  90630. ],
  90631. "core-js/features/math/imul": [
  90632. "es.math.imul"
  90633. ],
  90634. "core-js/features/math/imulh": [
  90635. "esnext.math.imulh"
  90636. ],
  90637. "core-js/features/math/isubh": [
  90638. "esnext.math.isubh"
  90639. ],
  90640. "core-js/features/math/log10": [
  90641. "es.math.log10"
  90642. ],
  90643. "core-js/features/math/log1p": [
  90644. "es.math.log1p"
  90645. ],
  90646. "core-js/features/math/log2": [
  90647. "es.math.log2"
  90648. ],
  90649. "core-js/features/math/rad-per-deg": [
  90650. "esnext.math.rad-per-deg"
  90651. ],
  90652. "core-js/features/math/radians": [
  90653. "esnext.math.radians"
  90654. ],
  90655. "core-js/features/math/scale": [
  90656. "esnext.math.scale"
  90657. ],
  90658. "core-js/features/math/seeded-prng": [
  90659. "esnext.math.seeded-prng"
  90660. ],
  90661. "core-js/features/math/sign": [
  90662. "es.math.sign"
  90663. ],
  90664. "core-js/features/math/signbit": [
  90665. "esnext.math.signbit"
  90666. ],
  90667. "core-js/features/math/sinh": [
  90668. "es.math.sinh"
  90669. ],
  90670. "core-js/features/math/tanh": [
  90671. "es.math.tanh"
  90672. ],
  90673. "core-js/features/math/to-string-tag": [
  90674. "es.math.to-string-tag"
  90675. ],
  90676. "core-js/features/math/trunc": [
  90677. "es.math.trunc"
  90678. ],
  90679. "core-js/features/math/umulh": [
  90680. "esnext.math.umulh"
  90681. ],
  90682. "core-js/features/number": [
  90683. "es.number.constructor",
  90684. "es.number.epsilon",
  90685. "es.number.is-finite",
  90686. "es.number.is-integer",
  90687. "es.number.is-nan",
  90688. "es.number.is-safe-integer",
  90689. "es.number.max-safe-integer",
  90690. "es.number.min-safe-integer",
  90691. "es.number.parse-float",
  90692. "es.number.parse-int",
  90693. "es.number.to-fixed",
  90694. "es.number.to-precision",
  90695. "esnext.number.from-string",
  90696. "esnext.number.range"
  90697. ],
  90698. "core-js/features/number/constructor": [
  90699. "es.number.constructor"
  90700. ],
  90701. "core-js/features/number/epsilon": [
  90702. "es.number.epsilon"
  90703. ],
  90704. "core-js/features/number/from-string": [
  90705. "esnext.number.from-string"
  90706. ],
  90707. "core-js/features/number/is-finite": [
  90708. "es.number.is-finite"
  90709. ],
  90710. "core-js/features/number/is-integer": [
  90711. "es.number.is-integer"
  90712. ],
  90713. "core-js/features/number/is-nan": [
  90714. "es.number.is-nan"
  90715. ],
  90716. "core-js/features/number/is-safe-integer": [
  90717. "es.number.is-safe-integer"
  90718. ],
  90719. "core-js/features/number/max-safe-integer": [
  90720. "es.number.max-safe-integer"
  90721. ],
  90722. "core-js/features/number/min-safe-integer": [
  90723. "es.number.min-safe-integer"
  90724. ],
  90725. "core-js/features/number/parse-float": [
  90726. "es.number.parse-float"
  90727. ],
  90728. "core-js/features/number/parse-int": [
  90729. "es.number.parse-int"
  90730. ],
  90731. "core-js/features/number/range": [
  90732. "esnext.number.range"
  90733. ],
  90734. "core-js/features/number/to-fixed": [
  90735. "es.number.to-fixed"
  90736. ],
  90737. "core-js/features/number/to-precision": [
  90738. "es.number.to-precision"
  90739. ],
  90740. "core-js/features/number/virtual": [
  90741. "es.number.to-fixed",
  90742. "es.number.to-precision"
  90743. ],
  90744. "core-js/features/number/virtual/to-fixed": [
  90745. "es.number.to-fixed"
  90746. ],
  90747. "core-js/features/number/virtual/to-precision": [
  90748. "es.number.to-precision"
  90749. ],
  90750. "core-js/features/object": [
  90751. "es.symbol",
  90752. "es.json.to-string-tag",
  90753. "es.math.to-string-tag",
  90754. "es.object.assign",
  90755. "es.object.create",
  90756. "es.object.define-getter",
  90757. "es.object.define-properties",
  90758. "es.object.define-property",
  90759. "es.object.define-setter",
  90760. "es.object.entries",
  90761. "es.object.freeze",
  90762. "es.object.from-entries",
  90763. "es.object.get-own-property-descriptor",
  90764. "es.object.get-own-property-descriptors",
  90765. "es.object.get-own-property-names",
  90766. "es.object.get-prototype-of",
  90767. "es.object.is",
  90768. "es.object.is-extensible",
  90769. "es.object.is-frozen",
  90770. "es.object.is-sealed",
  90771. "es.object.keys",
  90772. "es.object.lookup-getter",
  90773. "es.object.lookup-setter",
  90774. "es.object.prevent-extensions",
  90775. "es.object.seal",
  90776. "es.object.set-prototype-of",
  90777. "es.object.to-string",
  90778. "es.object.values",
  90779. "es.reflect.to-string-tag",
  90780. "esnext.object.has-own",
  90781. "esnext.object.iterate-entries",
  90782. "esnext.object.iterate-keys",
  90783. "esnext.object.iterate-values"
  90784. ],
  90785. "core-js/features/object/assign": [
  90786. "es.object.assign"
  90787. ],
  90788. "core-js/features/object/create": [
  90789. "es.object.create"
  90790. ],
  90791. "core-js/features/object/define-getter": [
  90792. "es.object.define-getter"
  90793. ],
  90794. "core-js/features/object/define-properties": [
  90795. "es.object.define-properties"
  90796. ],
  90797. "core-js/features/object/define-property": [
  90798. "es.object.define-property"
  90799. ],
  90800. "core-js/features/object/define-setter": [
  90801. "es.object.define-setter"
  90802. ],
  90803. "core-js/features/object/entries": [
  90804. "es.object.entries"
  90805. ],
  90806. "core-js/features/object/freeze": [
  90807. "es.object.freeze"
  90808. ],
  90809. "core-js/features/object/from-entries": [
  90810. "es.array.iterator",
  90811. "es.object.from-entries"
  90812. ],
  90813. "core-js/features/object/get-own-property-descriptor": [
  90814. "es.object.get-own-property-descriptor"
  90815. ],
  90816. "core-js/features/object/get-own-property-descriptors": [
  90817. "es.object.get-own-property-descriptors"
  90818. ],
  90819. "core-js/features/object/get-own-property-names": [
  90820. "es.object.get-own-property-names"
  90821. ],
  90822. "core-js/features/object/get-own-property-symbols": [
  90823. "es.symbol"
  90824. ],
  90825. "core-js/features/object/get-prototype-of": [
  90826. "es.object.get-prototype-of"
  90827. ],
  90828. "core-js/features/object/has-own": [
  90829. "esnext.object.has-own"
  90830. ],
  90831. "core-js/features/object/is": [
  90832. "es.object.is"
  90833. ],
  90834. "core-js/features/object/is-extensible": [
  90835. "es.object.is-extensible"
  90836. ],
  90837. "core-js/features/object/is-frozen": [
  90838. "es.object.is-frozen"
  90839. ],
  90840. "core-js/features/object/is-sealed": [
  90841. "es.object.is-sealed"
  90842. ],
  90843. "core-js/features/object/iterate-entries": [
  90844. "esnext.object.iterate-entries"
  90845. ],
  90846. "core-js/features/object/iterate-keys": [
  90847. "esnext.object.iterate-keys"
  90848. ],
  90849. "core-js/features/object/iterate-values": [
  90850. "esnext.object.iterate-values"
  90851. ],
  90852. "core-js/features/object/keys": [
  90853. "es.object.keys"
  90854. ],
  90855. "core-js/features/object/lookup-getter": [
  90856. "es.object.lookup-setter"
  90857. ],
  90858. "core-js/features/object/lookup-setter": [
  90859. "es.object.lookup-setter"
  90860. ],
  90861. "core-js/features/object/prevent-extensions": [
  90862. "es.object.prevent-extensions"
  90863. ],
  90864. "core-js/features/object/seal": [
  90865. "es.object.seal"
  90866. ],
  90867. "core-js/features/object/set-prototype-of": [
  90868. "es.object.set-prototype-of"
  90869. ],
  90870. "core-js/features/object/to-string": [
  90871. "es.json.to-string-tag",
  90872. "es.math.to-string-tag",
  90873. "es.object.to-string",
  90874. "es.reflect.to-string-tag"
  90875. ],
  90876. "core-js/features/object/values": [
  90877. "es.object.values"
  90878. ],
  90879. "core-js/features/observable": [
  90880. "es.object.to-string",
  90881. "es.string.iterator",
  90882. "esnext.observable",
  90883. "esnext.symbol.observable",
  90884. "web.dom-collections.iterator"
  90885. ],
  90886. "core-js/features/parse-float": [
  90887. "es.parse-float"
  90888. ],
  90889. "core-js/features/parse-int": [
  90890. "es.parse-int"
  90891. ],
  90892. "core-js/features/promise": [
  90893. "es.aggregate-error",
  90894. "es.object.to-string",
  90895. "es.promise",
  90896. "es.promise.all-settled",
  90897. "es.promise.any",
  90898. "es.promise.finally",
  90899. "es.string.iterator",
  90900. "esnext.aggregate-error",
  90901. "esnext.promise.all-settled",
  90902. "esnext.promise.any",
  90903. "esnext.promise.try",
  90904. "web.dom-collections.iterator"
  90905. ],
  90906. "core-js/features/promise/all-settled": [
  90907. "es.promise",
  90908. "es.promise.all-settled",
  90909. "es.string.iterator",
  90910. "esnext.promise.all-settled",
  90911. "web.dom-collections.iterator"
  90912. ],
  90913. "core-js/features/promise/any": [
  90914. "es.aggregate-error",
  90915. "es.promise",
  90916. "es.promise.any",
  90917. "es.string.iterator",
  90918. "esnext.aggregate-error",
  90919. "esnext.promise.any",
  90920. "web.dom-collections.iterator"
  90921. ],
  90922. "core-js/features/promise/finally": [
  90923. "es.promise",
  90924. "es.promise.finally"
  90925. ],
  90926. "core-js/features/promise/try": [
  90927. "es.promise",
  90928. "esnext.promise.try"
  90929. ],
  90930. "core-js/features/queue-microtask": [
  90931. "web.queue-microtask"
  90932. ],
  90933. "core-js/features/reflect": [
  90934. "es.reflect.apply",
  90935. "es.reflect.construct",
  90936. "es.reflect.define-property",
  90937. "es.reflect.delete-property",
  90938. "es.reflect.get",
  90939. "es.reflect.get-own-property-descriptor",
  90940. "es.reflect.get-prototype-of",
  90941. "es.reflect.has",
  90942. "es.reflect.is-extensible",
  90943. "es.reflect.own-keys",
  90944. "es.reflect.prevent-extensions",
  90945. "es.reflect.set",
  90946. "es.reflect.set-prototype-of",
  90947. "es.reflect.to-string-tag",
  90948. "esnext.reflect.define-metadata",
  90949. "esnext.reflect.delete-metadata",
  90950. "esnext.reflect.get-metadata",
  90951. "esnext.reflect.get-metadata-keys",
  90952. "esnext.reflect.get-own-metadata",
  90953. "esnext.reflect.get-own-metadata-keys",
  90954. "esnext.reflect.has-metadata",
  90955. "esnext.reflect.has-own-metadata",
  90956. "esnext.reflect.metadata"
  90957. ],
  90958. "core-js/features/reflect/apply": [
  90959. "es.reflect.apply"
  90960. ],
  90961. "core-js/features/reflect/construct": [
  90962. "es.reflect.construct"
  90963. ],
  90964. "core-js/features/reflect/define-metadata": [
  90965. "esnext.reflect.define-metadata"
  90966. ],
  90967. "core-js/features/reflect/define-property": [
  90968. "es.reflect.define-property"
  90969. ],
  90970. "core-js/features/reflect/delete-metadata": [
  90971. "esnext.reflect.delete-metadata"
  90972. ],
  90973. "core-js/features/reflect/delete-property": [
  90974. "es.reflect.delete-property"
  90975. ],
  90976. "core-js/features/reflect/get": [
  90977. "es.reflect.get"
  90978. ],
  90979. "core-js/features/reflect/get-metadata": [
  90980. "esnext.reflect.get-metadata"
  90981. ],
  90982. "core-js/features/reflect/get-metadata-keys": [
  90983. "esnext.reflect.get-metadata-keys"
  90984. ],
  90985. "core-js/features/reflect/get-own-metadata": [
  90986. "esnext.reflect.get-own-metadata"
  90987. ],
  90988. "core-js/features/reflect/get-own-metadata-keys": [
  90989. "esnext.reflect.get-own-metadata-keys"
  90990. ],
  90991. "core-js/features/reflect/get-own-property-descriptor": [
  90992. "es.reflect.get-own-property-descriptor"
  90993. ],
  90994. "core-js/features/reflect/get-prototype-of": [
  90995. "es.reflect.get-prototype-of"
  90996. ],
  90997. "core-js/features/reflect/has": [
  90998. "es.reflect.has"
  90999. ],
  91000. "core-js/features/reflect/has-metadata": [
  91001. "esnext.reflect.has-metadata"
  91002. ],
  91003. "core-js/features/reflect/has-own-metadata": [
  91004. "esnext.reflect.has-own-metadata"
  91005. ],
  91006. "core-js/features/reflect/is-extensible": [
  91007. "es.reflect.is-extensible"
  91008. ],
  91009. "core-js/features/reflect/metadata": [
  91010. "esnext.reflect.metadata"
  91011. ],
  91012. "core-js/features/reflect/own-keys": [
  91013. "es.reflect.own-keys"
  91014. ],
  91015. "core-js/features/reflect/prevent-extensions": [
  91016. "es.reflect.prevent-extensions"
  91017. ],
  91018. "core-js/features/reflect/set": [
  91019. "es.reflect.set"
  91020. ],
  91021. "core-js/features/reflect/set-prototype-of": [
  91022. "es.reflect.set-prototype-of"
  91023. ],
  91024. "core-js/features/reflect/to-string-tag": [
  91025. "es.reflect.to-string-tag"
  91026. ],
  91027. "core-js/features/regexp": [
  91028. "es.regexp.constructor",
  91029. "es.regexp.dot-all",
  91030. "es.regexp.exec",
  91031. "es.regexp.flags",
  91032. "es.regexp.sticky",
  91033. "es.regexp.test",
  91034. "es.regexp.to-string",
  91035. "es.string.match",
  91036. "es.string.replace",
  91037. "es.string.search",
  91038. "es.string.split"
  91039. ],
  91040. "core-js/features/regexp/constructor": [
  91041. "es.regexp.constructor"
  91042. ],
  91043. "core-js/features/regexp/dot-all": [
  91044. "es.regexp.constructor",
  91045. "es.regexp.dot-all",
  91046. "es.regexp.exec"
  91047. ],
  91048. "core-js/features/regexp/flags": [
  91049. "es.regexp.flags"
  91050. ],
  91051. "core-js/features/regexp/match": [
  91052. "es.string.match"
  91053. ],
  91054. "core-js/features/regexp/replace": [
  91055. "es.string.replace"
  91056. ],
  91057. "core-js/features/regexp/search": [
  91058. "es.string.search"
  91059. ],
  91060. "core-js/features/regexp/split": [
  91061. "es.string.split"
  91062. ],
  91063. "core-js/features/regexp/sticky": [
  91064. "es.regexp.constructor",
  91065. "es.regexp.exec",
  91066. "es.regexp.sticky"
  91067. ],
  91068. "core-js/features/regexp/test": [
  91069. "es.regexp.exec",
  91070. "es.regexp.test"
  91071. ],
  91072. "core-js/features/regexp/to-string": [
  91073. "es.regexp.to-string"
  91074. ],
  91075. "core-js/features/set": [
  91076. "es.object.to-string",
  91077. "es.set",
  91078. "es.string.iterator",
  91079. "esnext.set.add-all",
  91080. "esnext.set.delete-all",
  91081. "esnext.set.difference",
  91082. "esnext.set.every",
  91083. "esnext.set.filter",
  91084. "esnext.set.find",
  91085. "esnext.set.from",
  91086. "esnext.set.intersection",
  91087. "esnext.set.is-disjoint-from",
  91088. "esnext.set.is-subset-of",
  91089. "esnext.set.is-superset-of",
  91090. "esnext.set.join",
  91091. "esnext.set.map",
  91092. "esnext.set.of",
  91093. "esnext.set.reduce",
  91094. "esnext.set.some",
  91095. "esnext.set.symmetric-difference",
  91096. "esnext.set.union",
  91097. "web.dom-collections.iterator"
  91098. ],
  91099. "core-js/features/set-immediate": [
  91100. "web.immediate"
  91101. ],
  91102. "core-js/features/set-interval": [
  91103. "web.timers"
  91104. ],
  91105. "core-js/features/set-timeout": [
  91106. "web.timers"
  91107. ],
  91108. "core-js/features/set/add-all": [
  91109. "es.set",
  91110. "esnext.set.add-all"
  91111. ],
  91112. "core-js/features/set/delete-all": [
  91113. "es.set",
  91114. "esnext.set.delete-all"
  91115. ],
  91116. "core-js/features/set/difference": [
  91117. "es.set",
  91118. "es.string.iterator",
  91119. "esnext.set.difference",
  91120. "web.dom-collections.iterator"
  91121. ],
  91122. "core-js/features/set/every": [
  91123. "es.set",
  91124. "esnext.set.every"
  91125. ],
  91126. "core-js/features/set/filter": [
  91127. "es.set",
  91128. "esnext.set.filter"
  91129. ],
  91130. "core-js/features/set/find": [
  91131. "es.set",
  91132. "esnext.set.find"
  91133. ],
  91134. "core-js/features/set/from": [
  91135. "es.set",
  91136. "es.string.iterator",
  91137. "esnext.set.from",
  91138. "web.dom-collections.iterator"
  91139. ],
  91140. "core-js/features/set/intersection": [
  91141. "es.set",
  91142. "esnext.set.intersection"
  91143. ],
  91144. "core-js/features/set/is-disjoint-from": [
  91145. "es.set",
  91146. "esnext.set.is-disjoint-from"
  91147. ],
  91148. "core-js/features/set/is-subset-of": [
  91149. "es.set",
  91150. "es.string.iterator",
  91151. "esnext.set.is-subset-of",
  91152. "web.dom-collections.iterator"
  91153. ],
  91154. "core-js/features/set/is-superset-of": [
  91155. "es.set",
  91156. "esnext.set.is-superset-of"
  91157. ],
  91158. "core-js/features/set/join": [
  91159. "es.set",
  91160. "esnext.set.join"
  91161. ],
  91162. "core-js/features/set/map": [
  91163. "es.set",
  91164. "esnext.set.map"
  91165. ],
  91166. "core-js/features/set/of": [
  91167. "es.set",
  91168. "es.string.iterator",
  91169. "esnext.set.of",
  91170. "web.dom-collections.iterator"
  91171. ],
  91172. "core-js/features/set/reduce": [
  91173. "es.set",
  91174. "esnext.set.reduce"
  91175. ],
  91176. "core-js/features/set/some": [
  91177. "es.set",
  91178. "esnext.set.some"
  91179. ],
  91180. "core-js/features/set/symmetric-difference": [
  91181. "es.set",
  91182. "es.string.iterator",
  91183. "esnext.set.symmetric-difference",
  91184. "web.dom-collections.iterator"
  91185. ],
  91186. "core-js/features/set/union": [
  91187. "es.set",
  91188. "es.string.iterator",
  91189. "esnext.set.union",
  91190. "web.dom-collections.iterator"
  91191. ],
  91192. "core-js/features/string": [
  91193. "es.regexp.exec",
  91194. "es.string.code-point-at",
  91195. "es.string.ends-with",
  91196. "es.string.from-code-point",
  91197. "es.string.includes",
  91198. "es.string.iterator",
  91199. "es.string.match",
  91200. "es.string.match-all",
  91201. "es.string.pad-end",
  91202. "es.string.pad-start",
  91203. "es.string.raw",
  91204. "es.string.repeat",
  91205. "es.string.replace",
  91206. "es.string.replace-all",
  91207. "es.string.search",
  91208. "es.string.split",
  91209. "es.string.starts-with",
  91210. "es.string.substr",
  91211. "es.string.trim",
  91212. "es.string.trim-end",
  91213. "es.string.trim-start",
  91214. "es.string.anchor",
  91215. "es.string.big",
  91216. "es.string.blink",
  91217. "es.string.bold",
  91218. "es.string.fixed",
  91219. "es.string.fontcolor",
  91220. "es.string.fontsize",
  91221. "es.string.italics",
  91222. "es.string.link",
  91223. "es.string.small",
  91224. "es.string.strike",
  91225. "es.string.sub",
  91226. "es.string.sup",
  91227. "esnext.string.at",
  91228. "esnext.string.code-points",
  91229. "esnext.string.match-all",
  91230. "esnext.string.replace-all"
  91231. ],
  91232. "core-js/features/string/anchor": [
  91233. "es.string.anchor"
  91234. ],
  91235. "core-js/features/string/at": [
  91236. "esnext.string.at"
  91237. ],
  91238. "core-js/features/string/big": [
  91239. "es.string.big"
  91240. ],
  91241. "core-js/features/string/blink": [
  91242. "es.string.blink"
  91243. ],
  91244. "core-js/features/string/bold": [
  91245. "es.string.bold"
  91246. ],
  91247. "core-js/features/string/code-point-at": [
  91248. "es.string.code-point-at"
  91249. ],
  91250. "core-js/features/string/code-points": [
  91251. "esnext.string.code-points"
  91252. ],
  91253. "core-js/features/string/ends-with": [
  91254. "es.string.ends-with"
  91255. ],
  91256. "core-js/features/string/fixed": [
  91257. "es.string.fixed"
  91258. ],
  91259. "core-js/features/string/fontcolor": [
  91260. "es.string.fontcolor"
  91261. ],
  91262. "core-js/features/string/fontsize": [
  91263. "es.string.fontsize"
  91264. ],
  91265. "core-js/features/string/from-code-point": [
  91266. "es.string.from-code-point"
  91267. ],
  91268. "core-js/features/string/includes": [
  91269. "es.string.includes"
  91270. ],
  91271. "core-js/features/string/italics": [
  91272. "es.string.italics"
  91273. ],
  91274. "core-js/features/string/iterator": [
  91275. "es.string.iterator"
  91276. ],
  91277. "core-js/features/string/link": [
  91278. "es.string.link"
  91279. ],
  91280. "core-js/features/string/match": [
  91281. "es.regexp.exec",
  91282. "es.string.match"
  91283. ],
  91284. "core-js/features/string/match-all": [
  91285. "es.string.match-all",
  91286. "esnext.string.match-all"
  91287. ],
  91288. "core-js/features/string/pad-end": [
  91289. "es.string.pad-end"
  91290. ],
  91291. "core-js/features/string/pad-start": [
  91292. "es.string.pad-start"
  91293. ],
  91294. "core-js/features/string/raw": [
  91295. "es.string.raw"
  91296. ],
  91297. "core-js/features/string/repeat": [
  91298. "es.string.repeat"
  91299. ],
  91300. "core-js/features/string/replace": [
  91301. "es.regexp.exec",
  91302. "es.string.replace"
  91303. ],
  91304. "core-js/features/string/replace-all": [
  91305. "es.string.replace-all",
  91306. "esnext.string.replace-all"
  91307. ],
  91308. "core-js/features/string/search": [
  91309. "es.regexp.exec",
  91310. "es.string.search"
  91311. ],
  91312. "core-js/features/string/small": [
  91313. "es.string.small"
  91314. ],
  91315. "core-js/features/string/split": [
  91316. "es.regexp.exec",
  91317. "es.string.split"
  91318. ],
  91319. "core-js/features/string/starts-with": [
  91320. "es.string.starts-with"
  91321. ],
  91322. "core-js/features/string/strike": [
  91323. "es.string.strike"
  91324. ],
  91325. "core-js/features/string/sub": [
  91326. "es.string.sub"
  91327. ],
  91328. "core-js/features/string/substr": [
  91329. "es.string.substr"
  91330. ],
  91331. "core-js/features/string/sup": [
  91332. "es.string.sup"
  91333. ],
  91334. "core-js/features/string/trim": [
  91335. "es.string.trim"
  91336. ],
  91337. "core-js/features/string/trim-end": [
  91338. "es.string.trim-end"
  91339. ],
  91340. "core-js/features/string/trim-left": [
  91341. "es.string.trim-start"
  91342. ],
  91343. "core-js/features/string/trim-right": [
  91344. "es.string.trim-end"
  91345. ],
  91346. "core-js/features/string/trim-start": [
  91347. "es.string.trim-start"
  91348. ],
  91349. "core-js/features/string/virtual": [
  91350. "es.string.code-point-at",
  91351. "es.string.ends-with",
  91352. "es.string.includes",
  91353. "es.string.iterator",
  91354. "es.string.match",
  91355. "es.string.match-all",
  91356. "es.string.pad-end",
  91357. "es.string.pad-start",
  91358. "es.string.repeat",
  91359. "es.string.replace",
  91360. "es.string.replace-all",
  91361. "es.string.search",
  91362. "es.string.split",
  91363. "es.string.starts-with",
  91364. "es.string.substr",
  91365. "es.string.trim",
  91366. "es.string.trim-end",
  91367. "es.string.trim-start",
  91368. "es.string.anchor",
  91369. "es.string.big",
  91370. "es.string.blink",
  91371. "es.string.bold",
  91372. "es.string.fixed",
  91373. "es.string.fontcolor",
  91374. "es.string.fontsize",
  91375. "es.string.italics",
  91376. "es.string.link",
  91377. "es.string.small",
  91378. "es.string.strike",
  91379. "es.string.sub",
  91380. "es.string.sup",
  91381. "esnext.string.at",
  91382. "esnext.string.code-points",
  91383. "esnext.string.match-all",
  91384. "esnext.string.replace-all"
  91385. ],
  91386. "core-js/features/string/virtual/anchor": [
  91387. "es.string.anchor"
  91388. ],
  91389. "core-js/features/string/virtual/at": [
  91390. "esnext.string.at"
  91391. ],
  91392. "core-js/features/string/virtual/big": [
  91393. "es.string.big"
  91394. ],
  91395. "core-js/features/string/virtual/blink": [
  91396. "es.string.blink"
  91397. ],
  91398. "core-js/features/string/virtual/bold": [
  91399. "es.string.bold"
  91400. ],
  91401. "core-js/features/string/virtual/code-point-at": [
  91402. "es.string.code-point-at"
  91403. ],
  91404. "core-js/features/string/virtual/code-points": [
  91405. "esnext.string.code-points"
  91406. ],
  91407. "core-js/features/string/virtual/ends-with": [
  91408. "es.string.ends-with"
  91409. ],
  91410. "core-js/features/string/virtual/fixed": [
  91411. "es.string.fixed"
  91412. ],
  91413. "core-js/features/string/virtual/fontcolor": [
  91414. "es.string.fontcolor"
  91415. ],
  91416. "core-js/features/string/virtual/fontsize": [
  91417. "es.string.fontsize"
  91418. ],
  91419. "core-js/features/string/virtual/includes": [
  91420. "es.string.includes"
  91421. ],
  91422. "core-js/features/string/virtual/italics": [
  91423. "es.string.italics"
  91424. ],
  91425. "core-js/features/string/virtual/iterator": [
  91426. "es.string.iterator"
  91427. ],
  91428. "core-js/features/string/virtual/link": [
  91429. "es.string.link"
  91430. ],
  91431. "core-js/features/string/virtual/match-all": [
  91432. "es.string.match-all",
  91433. "esnext.string.match-all"
  91434. ],
  91435. "core-js/features/string/virtual/pad-end": [
  91436. "es.string.pad-end"
  91437. ],
  91438. "core-js/features/string/virtual/pad-start": [
  91439. "es.string.pad-start"
  91440. ],
  91441. "core-js/features/string/virtual/repeat": [
  91442. "es.string.repeat"
  91443. ],
  91444. "core-js/features/string/virtual/replace-all": [
  91445. "es.string.replace-all",
  91446. "esnext.string.replace-all"
  91447. ],
  91448. "core-js/features/string/virtual/small": [
  91449. "es.string.small"
  91450. ],
  91451. "core-js/features/string/virtual/starts-with": [
  91452. "es.string.starts-with"
  91453. ],
  91454. "core-js/features/string/virtual/strike": [
  91455. "es.string.strike"
  91456. ],
  91457. "core-js/features/string/virtual/sub": [
  91458. "es.string.sub"
  91459. ],
  91460. "core-js/features/string/virtual/substr": [
  91461. "es.string.substr"
  91462. ],
  91463. "core-js/features/string/virtual/sup": [
  91464. "es.string.sup"
  91465. ],
  91466. "core-js/features/string/virtual/trim": [
  91467. "es.string.trim"
  91468. ],
  91469. "core-js/features/string/virtual/trim-end": [
  91470. "es.string.trim-end"
  91471. ],
  91472. "core-js/features/string/virtual/trim-left": [
  91473. "es.string.trim-start"
  91474. ],
  91475. "core-js/features/string/virtual/trim-right": [
  91476. "es.string.trim-end"
  91477. ],
  91478. "core-js/features/string/virtual/trim-start": [
  91479. "es.string.trim-start"
  91480. ],
  91481. "core-js/features/symbol": [
  91482. "es.symbol",
  91483. "es.symbol.description",
  91484. "es.symbol.async-iterator",
  91485. "es.symbol.has-instance",
  91486. "es.symbol.is-concat-spreadable",
  91487. "es.symbol.iterator",
  91488. "es.symbol.match",
  91489. "es.symbol.match-all",
  91490. "es.symbol.replace",
  91491. "es.symbol.search",
  91492. "es.symbol.species",
  91493. "es.symbol.split",
  91494. "es.symbol.to-primitive",
  91495. "es.symbol.to-string-tag",
  91496. "es.symbol.unscopables",
  91497. "es.array.concat",
  91498. "es.json.to-string-tag",
  91499. "es.math.to-string-tag",
  91500. "es.object.to-string",
  91501. "es.reflect.to-string-tag",
  91502. "esnext.symbol.async-dispose",
  91503. "esnext.symbol.dispose",
  91504. "esnext.symbol.matcher",
  91505. "esnext.symbol.metadata",
  91506. "esnext.symbol.observable",
  91507. "esnext.symbol.pattern-match",
  91508. "esnext.symbol.replace-all"
  91509. ],
  91510. "core-js/features/symbol/async-dispose": [
  91511. "esnext.symbol.async-dispose"
  91512. ],
  91513. "core-js/features/symbol/async-iterator": [
  91514. "es.symbol.async-iterator"
  91515. ],
  91516. "core-js/features/symbol/description": [
  91517. "es.symbol.description"
  91518. ],
  91519. "core-js/features/symbol/dispose": [
  91520. "esnext.symbol.dispose"
  91521. ],
  91522. "core-js/features/symbol/for": [
  91523. "es.symbol"
  91524. ],
  91525. "core-js/features/symbol/has-instance": [
  91526. "es.symbol.has-instance",
  91527. "es.function.has-instance"
  91528. ],
  91529. "core-js/features/symbol/is-concat-spreadable": [
  91530. "es.symbol.is-concat-spreadable",
  91531. "es.array.concat"
  91532. ],
  91533. "core-js/features/symbol/iterator": [
  91534. "es.symbol.iterator",
  91535. "es.string.iterator",
  91536. "web.dom-collections.iterator"
  91537. ],
  91538. "core-js/features/symbol/key-for": [
  91539. "es.symbol"
  91540. ],
  91541. "core-js/features/symbol/match": [
  91542. "es.symbol.match",
  91543. "es.string.match"
  91544. ],
  91545. "core-js/features/symbol/match-all": [
  91546. "es.symbol.match-all",
  91547. "es.string.match-all"
  91548. ],
  91549. "core-js/features/symbol/matcher": [
  91550. "esnext.symbol.matcher"
  91551. ],
  91552. "core-js/features/symbol/metadata": [
  91553. "esnext.symbol.metadata"
  91554. ],
  91555. "core-js/features/symbol/observable": [
  91556. "esnext.symbol.observable"
  91557. ],
  91558. "core-js/features/symbol/pattern-match": [
  91559. "esnext.symbol.pattern-match"
  91560. ],
  91561. "core-js/features/symbol/replace": [
  91562. "es.symbol.replace",
  91563. "es.string.replace"
  91564. ],
  91565. "core-js/features/symbol/replace-all": [
  91566. "esnext.symbol.replace-all"
  91567. ],
  91568. "core-js/features/symbol/search": [
  91569. "es.symbol.search",
  91570. "es.string.search"
  91571. ],
  91572. "core-js/features/symbol/species": [
  91573. "es.symbol.species"
  91574. ],
  91575. "core-js/features/symbol/split": [
  91576. "es.symbol.split",
  91577. "es.string.split"
  91578. ],
  91579. "core-js/features/symbol/to-primitive": [
  91580. "es.symbol.to-primitive"
  91581. ],
  91582. "core-js/features/symbol/to-string-tag": [
  91583. "es.symbol.to-string-tag",
  91584. "es.json.to-string-tag",
  91585. "es.math.to-string-tag",
  91586. "es.object.to-string",
  91587. "es.reflect.to-string-tag"
  91588. ],
  91589. "core-js/features/symbol/unscopables": [
  91590. "es.symbol.unscopables"
  91591. ],
  91592. "core-js/features/typed-array": [
  91593. "es.map",
  91594. "es.object.to-string",
  91595. "es.typed-array.float32-array",
  91596. "es.typed-array.float64-array",
  91597. "es.typed-array.int8-array",
  91598. "es.typed-array.int16-array",
  91599. "es.typed-array.int32-array",
  91600. "es.typed-array.uint8-array",
  91601. "es.typed-array.uint8-clamped-array",
  91602. "es.typed-array.uint16-array",
  91603. "es.typed-array.uint32-array",
  91604. "es.typed-array.copy-within",
  91605. "es.typed-array.every",
  91606. "es.typed-array.fill",
  91607. "es.typed-array.filter",
  91608. "es.typed-array.find",
  91609. "es.typed-array.find-index",
  91610. "es.typed-array.for-each",
  91611. "es.typed-array.from",
  91612. "es.typed-array.includes",
  91613. "es.typed-array.index-of",
  91614. "es.typed-array.iterator",
  91615. "es.typed-array.join",
  91616. "es.typed-array.last-index-of",
  91617. "es.typed-array.map",
  91618. "es.typed-array.of",
  91619. "es.typed-array.reduce",
  91620. "es.typed-array.reduce-right",
  91621. "es.typed-array.reverse",
  91622. "es.typed-array.set",
  91623. "es.typed-array.slice",
  91624. "es.typed-array.some",
  91625. "es.typed-array.sort",
  91626. "es.typed-array.subarray",
  91627. "es.typed-array.to-locale-string",
  91628. "es.typed-array.to-string",
  91629. "esnext.typed-array.at",
  91630. "esnext.typed-array.filter-out",
  91631. "esnext.typed-array.find-last",
  91632. "esnext.typed-array.find-last-index",
  91633. "esnext.typed-array.unique-by"
  91634. ],
  91635. "core-js/features/typed-array/at": [
  91636. "esnext.typed-array.at"
  91637. ],
  91638. "core-js/features/typed-array/copy-within": [
  91639. "es.typed-array.copy-within"
  91640. ],
  91641. "core-js/features/typed-array/entries": [
  91642. "es.typed-array.iterator"
  91643. ],
  91644. "core-js/features/typed-array/every": [
  91645. "es.typed-array.every"
  91646. ],
  91647. "core-js/features/typed-array/fill": [
  91648. "es.typed-array.fill"
  91649. ],
  91650. "core-js/features/typed-array/filter": [
  91651. "es.typed-array.filter"
  91652. ],
  91653. "core-js/features/typed-array/filter-out": [
  91654. "esnext.typed-array.filter-out"
  91655. ],
  91656. "core-js/features/typed-array/find": [
  91657. "es.typed-array.find"
  91658. ],
  91659. "core-js/features/typed-array/find-index": [
  91660. "es.typed-array.find-index"
  91661. ],
  91662. "core-js/features/typed-array/find-last": [
  91663. "esnext.typed-array.find-last"
  91664. ],
  91665. "core-js/features/typed-array/find-last-index": [
  91666. "esnext.typed-array.find-last-index"
  91667. ],
  91668. "core-js/features/typed-array/float32-array": [
  91669. "es.object.to-string",
  91670. "es.typed-array.float32-array",
  91671. "es.typed-array.copy-within",
  91672. "es.typed-array.every",
  91673. "es.typed-array.fill",
  91674. "es.typed-array.filter",
  91675. "es.typed-array.find",
  91676. "es.typed-array.find-index",
  91677. "es.typed-array.for-each",
  91678. "es.typed-array.from",
  91679. "es.typed-array.includes",
  91680. "es.typed-array.index-of",
  91681. "es.typed-array.iterator",
  91682. "es.typed-array.join",
  91683. "es.typed-array.last-index-of",
  91684. "es.typed-array.map",
  91685. "es.typed-array.of",
  91686. "es.typed-array.reduce",
  91687. "es.typed-array.reduce-right",
  91688. "es.typed-array.reverse",
  91689. "es.typed-array.set",
  91690. "es.typed-array.slice",
  91691. "es.typed-array.some",
  91692. "es.typed-array.sort",
  91693. "es.typed-array.subarray",
  91694. "es.typed-array.to-locale-string",
  91695. "es.typed-array.to-string"
  91696. ],
  91697. "core-js/features/typed-array/float64-array": [
  91698. "es.object.to-string",
  91699. "es.typed-array.float64-array",
  91700. "es.typed-array.copy-within",
  91701. "es.typed-array.every",
  91702. "es.typed-array.fill",
  91703. "es.typed-array.filter",
  91704. "es.typed-array.find",
  91705. "es.typed-array.find-index",
  91706. "es.typed-array.for-each",
  91707. "es.typed-array.from",
  91708. "es.typed-array.includes",
  91709. "es.typed-array.index-of",
  91710. "es.typed-array.iterator",
  91711. "es.typed-array.join",
  91712. "es.typed-array.last-index-of",
  91713. "es.typed-array.map",
  91714. "es.typed-array.of",
  91715. "es.typed-array.reduce",
  91716. "es.typed-array.reduce-right",
  91717. "es.typed-array.reverse",
  91718. "es.typed-array.set",
  91719. "es.typed-array.slice",
  91720. "es.typed-array.some",
  91721. "es.typed-array.sort",
  91722. "es.typed-array.subarray",
  91723. "es.typed-array.to-locale-string",
  91724. "es.typed-array.to-string"
  91725. ],
  91726. "core-js/features/typed-array/for-each": [
  91727. "es.typed-array.for-each"
  91728. ],
  91729. "core-js/features/typed-array/from": [
  91730. "es.typed-array.from"
  91731. ],
  91732. "core-js/features/typed-array/includes": [
  91733. "es.typed-array.includes"
  91734. ],
  91735. "core-js/features/typed-array/index-of": [
  91736. "es.typed-array.index-of"
  91737. ],
  91738. "core-js/features/typed-array/int16-array": [
  91739. "es.object.to-string",
  91740. "es.typed-array.int16-array",
  91741. "es.typed-array.copy-within",
  91742. "es.typed-array.every",
  91743. "es.typed-array.fill",
  91744. "es.typed-array.filter",
  91745. "es.typed-array.find",
  91746. "es.typed-array.find-index",
  91747. "es.typed-array.for-each",
  91748. "es.typed-array.from",
  91749. "es.typed-array.includes",
  91750. "es.typed-array.index-of",
  91751. "es.typed-array.iterator",
  91752. "es.typed-array.join",
  91753. "es.typed-array.last-index-of",
  91754. "es.typed-array.map",
  91755. "es.typed-array.of",
  91756. "es.typed-array.reduce",
  91757. "es.typed-array.reduce-right",
  91758. "es.typed-array.reverse",
  91759. "es.typed-array.set",
  91760. "es.typed-array.slice",
  91761. "es.typed-array.some",
  91762. "es.typed-array.sort",
  91763. "es.typed-array.subarray",
  91764. "es.typed-array.to-locale-string",
  91765. "es.typed-array.to-string"
  91766. ],
  91767. "core-js/features/typed-array/int32-array": [
  91768. "es.object.to-string",
  91769. "es.typed-array.int32-array",
  91770. "es.typed-array.copy-within",
  91771. "es.typed-array.every",
  91772. "es.typed-array.fill",
  91773. "es.typed-array.filter",
  91774. "es.typed-array.find",
  91775. "es.typed-array.find-index",
  91776. "es.typed-array.for-each",
  91777. "es.typed-array.from",
  91778. "es.typed-array.includes",
  91779. "es.typed-array.index-of",
  91780. "es.typed-array.iterator",
  91781. "es.typed-array.join",
  91782. "es.typed-array.last-index-of",
  91783. "es.typed-array.map",
  91784. "es.typed-array.of",
  91785. "es.typed-array.reduce",
  91786. "es.typed-array.reduce-right",
  91787. "es.typed-array.reverse",
  91788. "es.typed-array.set",
  91789. "es.typed-array.slice",
  91790. "es.typed-array.some",
  91791. "es.typed-array.sort",
  91792. "es.typed-array.subarray",
  91793. "es.typed-array.to-locale-string",
  91794. "es.typed-array.to-string"
  91795. ],
  91796. "core-js/features/typed-array/int8-array": [
  91797. "es.object.to-string",
  91798. "es.typed-array.int8-array",
  91799. "es.typed-array.copy-within",
  91800. "es.typed-array.every",
  91801. "es.typed-array.fill",
  91802. "es.typed-array.filter",
  91803. "es.typed-array.find",
  91804. "es.typed-array.find-index",
  91805. "es.typed-array.for-each",
  91806. "es.typed-array.from",
  91807. "es.typed-array.includes",
  91808. "es.typed-array.index-of",
  91809. "es.typed-array.iterator",
  91810. "es.typed-array.join",
  91811. "es.typed-array.last-index-of",
  91812. "es.typed-array.map",
  91813. "es.typed-array.of",
  91814. "es.typed-array.reduce",
  91815. "es.typed-array.reduce-right",
  91816. "es.typed-array.reverse",
  91817. "es.typed-array.set",
  91818. "es.typed-array.slice",
  91819. "es.typed-array.some",
  91820. "es.typed-array.sort",
  91821. "es.typed-array.subarray",
  91822. "es.typed-array.to-locale-string",
  91823. "es.typed-array.to-string"
  91824. ],
  91825. "core-js/features/typed-array/iterator": [
  91826. "es.typed-array.iterator"
  91827. ],
  91828. "core-js/features/typed-array/join": [
  91829. "es.typed-array.join"
  91830. ],
  91831. "core-js/features/typed-array/keys": [
  91832. "es.typed-array.iterator"
  91833. ],
  91834. "core-js/features/typed-array/last-index-of": [
  91835. "es.typed-array.last-index-of"
  91836. ],
  91837. "core-js/features/typed-array/map": [
  91838. "es.typed-array.map"
  91839. ],
  91840. "core-js/features/typed-array/of": [
  91841. "es.typed-array.of"
  91842. ],
  91843. "core-js/features/typed-array/reduce": [
  91844. "es.typed-array.reduce"
  91845. ],
  91846. "core-js/features/typed-array/reduce-right": [
  91847. "es.typed-array.reduce-right"
  91848. ],
  91849. "core-js/features/typed-array/reverse": [
  91850. "es.typed-array.reverse"
  91851. ],
  91852. "core-js/features/typed-array/set": [
  91853. "es.typed-array.set"
  91854. ],
  91855. "core-js/features/typed-array/slice": [
  91856. "es.typed-array.slice"
  91857. ],
  91858. "core-js/features/typed-array/some": [
  91859. "es.typed-array.some"
  91860. ],
  91861. "core-js/features/typed-array/sort": [
  91862. "es.typed-array.sort"
  91863. ],
  91864. "core-js/features/typed-array/subarray": [
  91865. "es.typed-array.subarray"
  91866. ],
  91867. "core-js/features/typed-array/to-locale-string": [
  91868. "es.typed-array.to-locale-string"
  91869. ],
  91870. "core-js/features/typed-array/to-string": [
  91871. "es.typed-array.to-string"
  91872. ],
  91873. "core-js/features/typed-array/uint16-array": [
  91874. "es.object.to-string",
  91875. "es.typed-array.uint16-array",
  91876. "es.typed-array.copy-within",
  91877. "es.typed-array.every",
  91878. "es.typed-array.fill",
  91879. "es.typed-array.filter",
  91880. "es.typed-array.find",
  91881. "es.typed-array.find-index",
  91882. "es.typed-array.for-each",
  91883. "es.typed-array.from",
  91884. "es.typed-array.includes",
  91885. "es.typed-array.index-of",
  91886. "es.typed-array.iterator",
  91887. "es.typed-array.join",
  91888. "es.typed-array.last-index-of",
  91889. "es.typed-array.map",
  91890. "es.typed-array.of",
  91891. "es.typed-array.reduce",
  91892. "es.typed-array.reduce-right",
  91893. "es.typed-array.reverse",
  91894. "es.typed-array.set",
  91895. "es.typed-array.slice",
  91896. "es.typed-array.some",
  91897. "es.typed-array.sort",
  91898. "es.typed-array.subarray",
  91899. "es.typed-array.to-locale-string",
  91900. "es.typed-array.to-string"
  91901. ],
  91902. "core-js/features/typed-array/uint32-array": [
  91903. "es.object.to-string",
  91904. "es.typed-array.uint32-array",
  91905. "es.typed-array.copy-within",
  91906. "es.typed-array.every",
  91907. "es.typed-array.fill",
  91908. "es.typed-array.filter",
  91909. "es.typed-array.find",
  91910. "es.typed-array.find-index",
  91911. "es.typed-array.for-each",
  91912. "es.typed-array.from",
  91913. "es.typed-array.includes",
  91914. "es.typed-array.index-of",
  91915. "es.typed-array.iterator",
  91916. "es.typed-array.join",
  91917. "es.typed-array.last-index-of",
  91918. "es.typed-array.map",
  91919. "es.typed-array.of",
  91920. "es.typed-array.reduce",
  91921. "es.typed-array.reduce-right",
  91922. "es.typed-array.reverse",
  91923. "es.typed-array.set",
  91924. "es.typed-array.slice",
  91925. "es.typed-array.some",
  91926. "es.typed-array.sort",
  91927. "es.typed-array.subarray",
  91928. "es.typed-array.to-locale-string",
  91929. "es.typed-array.to-string"
  91930. ],
  91931. "core-js/features/typed-array/uint8-array": [
  91932. "es.object.to-string",
  91933. "es.typed-array.uint8-array",
  91934. "es.typed-array.copy-within",
  91935. "es.typed-array.every",
  91936. "es.typed-array.fill",
  91937. "es.typed-array.filter",
  91938. "es.typed-array.find",
  91939. "es.typed-array.find-index",
  91940. "es.typed-array.for-each",
  91941. "es.typed-array.from",
  91942. "es.typed-array.includes",
  91943. "es.typed-array.index-of",
  91944. "es.typed-array.iterator",
  91945. "es.typed-array.join",
  91946. "es.typed-array.last-index-of",
  91947. "es.typed-array.map",
  91948. "es.typed-array.of",
  91949. "es.typed-array.reduce",
  91950. "es.typed-array.reduce-right",
  91951. "es.typed-array.reverse",
  91952. "es.typed-array.set",
  91953. "es.typed-array.slice",
  91954. "es.typed-array.some",
  91955. "es.typed-array.sort",
  91956. "es.typed-array.subarray",
  91957. "es.typed-array.to-locale-string",
  91958. "es.typed-array.to-string"
  91959. ],
  91960. "core-js/features/typed-array/uint8-clamped-array": [
  91961. "es.object.to-string",
  91962. "es.typed-array.uint8-clamped-array",
  91963. "es.typed-array.copy-within",
  91964. "es.typed-array.every",
  91965. "es.typed-array.fill",
  91966. "es.typed-array.filter",
  91967. "es.typed-array.find",
  91968. "es.typed-array.find-index",
  91969. "es.typed-array.for-each",
  91970. "es.typed-array.from",
  91971. "es.typed-array.includes",
  91972. "es.typed-array.index-of",
  91973. "es.typed-array.iterator",
  91974. "es.typed-array.join",
  91975. "es.typed-array.last-index-of",
  91976. "es.typed-array.map",
  91977. "es.typed-array.of",
  91978. "es.typed-array.reduce",
  91979. "es.typed-array.reduce-right",
  91980. "es.typed-array.reverse",
  91981. "es.typed-array.set",
  91982. "es.typed-array.slice",
  91983. "es.typed-array.some",
  91984. "es.typed-array.sort",
  91985. "es.typed-array.subarray",
  91986. "es.typed-array.to-locale-string",
  91987. "es.typed-array.to-string"
  91988. ],
  91989. "core-js/features/typed-array/unique-by": [
  91990. "es.map",
  91991. "esnext.typed-array.unique-by"
  91992. ],
  91993. "core-js/features/typed-array/values": [
  91994. "es.typed-array.iterator"
  91995. ],
  91996. "core-js/features/unescape": [
  91997. "es.unescape"
  91998. ],
  91999. "core-js/features/url": [
  92000. "web.url",
  92001. "web.url.to-json",
  92002. "web.url-search-params"
  92003. ],
  92004. "core-js/features/url-search-params": [
  92005. "web.url-search-params"
  92006. ],
  92007. "core-js/features/url/to-json": [
  92008. "web.url.to-json"
  92009. ],
  92010. "core-js/features/weak-map": [
  92011. "es.object.to-string",
  92012. "es.weak-map",
  92013. "esnext.weak-map.delete-all",
  92014. "esnext.weak-map.from",
  92015. "esnext.weak-map.of",
  92016. "esnext.weak-map.emplace",
  92017. "esnext.weak-map.upsert",
  92018. "web.dom-collections.iterator"
  92019. ],
  92020. "core-js/features/weak-map/delete-all": [
  92021. "es.weak-map",
  92022. "esnext.weak-map.delete-all"
  92023. ],
  92024. "core-js/features/weak-map/emplace": [
  92025. "es.weak-map",
  92026. "esnext.weak-map.emplace"
  92027. ],
  92028. "core-js/features/weak-map/from": [
  92029. "es.string.iterator",
  92030. "es.weak-map",
  92031. "esnext.weak-map.from",
  92032. "web.dom-collections.iterator"
  92033. ],
  92034. "core-js/features/weak-map/of": [
  92035. "es.string.iterator",
  92036. "es.weak-map",
  92037. "esnext.weak-map.of",
  92038. "web.dom-collections.iterator"
  92039. ],
  92040. "core-js/features/weak-map/upsert": [
  92041. "es.weak-map",
  92042. "esnext.weak-map.upsert"
  92043. ],
  92044. "core-js/features/weak-set": [
  92045. "es.object.to-string",
  92046. "es.weak-set",
  92047. "esnext.weak-set.add-all",
  92048. "esnext.weak-set.delete-all",
  92049. "esnext.weak-set.from",
  92050. "esnext.weak-set.of",
  92051. "web.dom-collections.iterator"
  92052. ],
  92053. "core-js/features/weak-set/add-all": [
  92054. "es.weak-set",
  92055. "esnext.weak-set.add-all"
  92056. ],
  92057. "core-js/features/weak-set/delete-all": [
  92058. "es.weak-set",
  92059. "esnext.weak-set.delete-all"
  92060. ],
  92061. "core-js/features/weak-set/from": [
  92062. "es.string.iterator",
  92063. "es.weak-set",
  92064. "esnext.weak-set.from",
  92065. "web.dom-collections.iterator"
  92066. ],
  92067. "core-js/features/weak-set/of": [
  92068. "es.string.iterator",
  92069. "es.weak-set",
  92070. "esnext.weak-set.of",
  92071. "web.dom-collections.iterator"
  92072. ],
  92073. "core-js/modules/es.aggregate-error": [
  92074. "es.aggregate-error"
  92075. ],
  92076. "core-js/modules/es.array-buffer.constructor": [
  92077. "es.array-buffer.constructor"
  92078. ],
  92079. "core-js/modules/es.array-buffer.is-view": [
  92080. "es.array-buffer.is-view"
  92081. ],
  92082. "core-js/modules/es.array-buffer.slice": [
  92083. "es.array-buffer.slice"
  92084. ],
  92085. "core-js/modules/es.array.concat": [
  92086. "es.array.concat"
  92087. ],
  92088. "core-js/modules/es.array.copy-within": [
  92089. "es.array.copy-within"
  92090. ],
  92091. "core-js/modules/es.array.every": [
  92092. "es.array.every"
  92093. ],
  92094. "core-js/modules/es.array.fill": [
  92095. "es.array.fill"
  92096. ],
  92097. "core-js/modules/es.array.filter": [
  92098. "es.array.filter"
  92099. ],
  92100. "core-js/modules/es.array.find": [
  92101. "es.array.find"
  92102. ],
  92103. "core-js/modules/es.array.find-index": [
  92104. "es.array.find-index"
  92105. ],
  92106. "core-js/modules/es.array.flat": [
  92107. "es.array.flat"
  92108. ],
  92109. "core-js/modules/es.array.flat-map": [
  92110. "es.array.flat-map"
  92111. ],
  92112. "core-js/modules/es.array.for-each": [
  92113. "es.array.for-each"
  92114. ],
  92115. "core-js/modules/es.array.from": [
  92116. "es.array.from"
  92117. ],
  92118. "core-js/modules/es.array.includes": [
  92119. "es.array.includes"
  92120. ],
  92121. "core-js/modules/es.array.index-of": [
  92122. "es.array.index-of"
  92123. ],
  92124. "core-js/modules/es.array.is-array": [
  92125. "es.array.is-array"
  92126. ],
  92127. "core-js/modules/es.array.iterator": [
  92128. "es.array.iterator"
  92129. ],
  92130. "core-js/modules/es.array.join": [
  92131. "es.array.join"
  92132. ],
  92133. "core-js/modules/es.array.last-index-of": [
  92134. "es.array.last-index-of"
  92135. ],
  92136. "core-js/modules/es.array.map": [
  92137. "es.array.map"
  92138. ],
  92139. "core-js/modules/es.array.of": [
  92140. "es.array.of"
  92141. ],
  92142. "core-js/modules/es.array.reduce": [
  92143. "es.array.reduce"
  92144. ],
  92145. "core-js/modules/es.array.reduce-right": [
  92146. "es.array.reduce-right"
  92147. ],
  92148. "core-js/modules/es.array.reverse": [
  92149. "es.array.reverse"
  92150. ],
  92151. "core-js/modules/es.array.slice": [
  92152. "es.array.slice"
  92153. ],
  92154. "core-js/modules/es.array.some": [
  92155. "es.array.some"
  92156. ],
  92157. "core-js/modules/es.array.sort": [
  92158. "es.array.sort"
  92159. ],
  92160. "core-js/modules/es.array.species": [
  92161. "es.array.species"
  92162. ],
  92163. "core-js/modules/es.array.splice": [
  92164. "es.array.splice"
  92165. ],
  92166. "core-js/modules/es.array.unscopables.flat": [
  92167. "es.array.unscopables.flat"
  92168. ],
  92169. "core-js/modules/es.array.unscopables.flat-map": [
  92170. "es.array.unscopables.flat-map"
  92171. ],
  92172. "core-js/modules/es.data-view": [
  92173. "es.data-view"
  92174. ],
  92175. "core-js/modules/es.date.get-year": [
  92176. "es.date.get-year"
  92177. ],
  92178. "core-js/modules/es.date.now": [
  92179. "es.date.now"
  92180. ],
  92181. "core-js/modules/es.date.set-year": [
  92182. "es.date.set-year"
  92183. ],
  92184. "core-js/modules/es.date.to-gmt-string": [
  92185. "es.date.to-gmt-string"
  92186. ],
  92187. "core-js/modules/es.date.to-iso-string": [
  92188. "es.date.to-iso-string"
  92189. ],
  92190. "core-js/modules/es.date.to-json": [
  92191. "es.date.to-json"
  92192. ],
  92193. "core-js/modules/es.date.to-primitive": [
  92194. "es.date.to-primitive"
  92195. ],
  92196. "core-js/modules/es.date.to-string": [
  92197. "es.date.to-string"
  92198. ],
  92199. "core-js/modules/es.escape": [
  92200. "es.escape"
  92201. ],
  92202. "core-js/modules/es.function.bind": [
  92203. "es.function.bind"
  92204. ],
  92205. "core-js/modules/es.function.has-instance": [
  92206. "es.function.has-instance"
  92207. ],
  92208. "core-js/modules/es.function.name": [
  92209. "es.function.name"
  92210. ],
  92211. "core-js/modules/es.global-this": [
  92212. "es.global-this"
  92213. ],
  92214. "core-js/modules/es.json.stringify": [
  92215. "es.json.stringify"
  92216. ],
  92217. "core-js/modules/es.json.to-string-tag": [
  92218. "es.json.to-string-tag"
  92219. ],
  92220. "core-js/modules/es.map": [
  92221. "es.map"
  92222. ],
  92223. "core-js/modules/es.math.acosh": [
  92224. "es.math.acosh"
  92225. ],
  92226. "core-js/modules/es.math.asinh": [
  92227. "es.math.asinh"
  92228. ],
  92229. "core-js/modules/es.math.atanh": [
  92230. "es.math.atanh"
  92231. ],
  92232. "core-js/modules/es.math.cbrt": [
  92233. "es.math.cbrt"
  92234. ],
  92235. "core-js/modules/es.math.clz32": [
  92236. "es.math.clz32"
  92237. ],
  92238. "core-js/modules/es.math.cosh": [
  92239. "es.math.cosh"
  92240. ],
  92241. "core-js/modules/es.math.expm1": [
  92242. "es.math.expm1"
  92243. ],
  92244. "core-js/modules/es.math.fround": [
  92245. "es.math.fround"
  92246. ],
  92247. "core-js/modules/es.math.hypot": [
  92248. "es.math.hypot"
  92249. ],
  92250. "core-js/modules/es.math.imul": [
  92251. "es.math.imul"
  92252. ],
  92253. "core-js/modules/es.math.log10": [
  92254. "es.math.log10"
  92255. ],
  92256. "core-js/modules/es.math.log1p": [
  92257. "es.math.log1p"
  92258. ],
  92259. "core-js/modules/es.math.log2": [
  92260. "es.math.log2"
  92261. ],
  92262. "core-js/modules/es.math.sign": [
  92263. "es.math.sign"
  92264. ],
  92265. "core-js/modules/es.math.sinh": [
  92266. "es.math.sinh"
  92267. ],
  92268. "core-js/modules/es.math.tanh": [
  92269. "es.math.tanh"
  92270. ],
  92271. "core-js/modules/es.math.to-string-tag": [
  92272. "es.math.to-string-tag"
  92273. ],
  92274. "core-js/modules/es.math.trunc": [
  92275. "es.math.trunc"
  92276. ],
  92277. "core-js/modules/es.number.constructor": [
  92278. "es.number.constructor"
  92279. ],
  92280. "core-js/modules/es.number.epsilon": [
  92281. "es.number.epsilon"
  92282. ],
  92283. "core-js/modules/es.number.is-finite": [
  92284. "es.number.is-finite"
  92285. ],
  92286. "core-js/modules/es.number.is-integer": [
  92287. "es.number.is-integer"
  92288. ],
  92289. "core-js/modules/es.number.is-nan": [
  92290. "es.number.is-nan"
  92291. ],
  92292. "core-js/modules/es.number.is-safe-integer": [
  92293. "es.number.is-safe-integer"
  92294. ],
  92295. "core-js/modules/es.number.max-safe-integer": [
  92296. "es.number.max-safe-integer"
  92297. ],
  92298. "core-js/modules/es.number.min-safe-integer": [
  92299. "es.number.min-safe-integer"
  92300. ],
  92301. "core-js/modules/es.number.parse-float": [
  92302. "es.number.parse-float"
  92303. ],
  92304. "core-js/modules/es.number.parse-int": [
  92305. "es.number.parse-int"
  92306. ],
  92307. "core-js/modules/es.number.to-fixed": [
  92308. "es.number.to-fixed"
  92309. ],
  92310. "core-js/modules/es.number.to-precision": [
  92311. "es.number.to-precision"
  92312. ],
  92313. "core-js/modules/es.object.assign": [
  92314. "es.object.assign"
  92315. ],
  92316. "core-js/modules/es.object.create": [
  92317. "es.object.create"
  92318. ],
  92319. "core-js/modules/es.object.define-getter": [
  92320. "es.object.define-getter"
  92321. ],
  92322. "core-js/modules/es.object.define-properties": [
  92323. "es.object.define-properties"
  92324. ],
  92325. "core-js/modules/es.object.define-property": [
  92326. "es.object.define-property"
  92327. ],
  92328. "core-js/modules/es.object.define-setter": [
  92329. "es.object.define-setter"
  92330. ],
  92331. "core-js/modules/es.object.entries": [
  92332. "es.object.entries"
  92333. ],
  92334. "core-js/modules/es.object.freeze": [
  92335. "es.object.freeze"
  92336. ],
  92337. "core-js/modules/es.object.from-entries": [
  92338. "es.object.from-entries"
  92339. ],
  92340. "core-js/modules/es.object.get-own-property-descriptor": [
  92341. "es.object.get-own-property-descriptor"
  92342. ],
  92343. "core-js/modules/es.object.get-own-property-descriptors": [
  92344. "es.object.get-own-property-descriptors"
  92345. ],
  92346. "core-js/modules/es.object.get-own-property-names": [
  92347. "es.object.get-own-property-names"
  92348. ],
  92349. "core-js/modules/es.object.get-prototype-of": [
  92350. "es.object.get-prototype-of"
  92351. ],
  92352. "core-js/modules/es.object.is": [
  92353. "es.object.is"
  92354. ],
  92355. "core-js/modules/es.object.is-extensible": [
  92356. "es.object.is-extensible"
  92357. ],
  92358. "core-js/modules/es.object.is-frozen": [
  92359. "es.object.is-frozen"
  92360. ],
  92361. "core-js/modules/es.object.is-sealed": [
  92362. "es.object.is-sealed"
  92363. ],
  92364. "core-js/modules/es.object.keys": [
  92365. "es.object.keys"
  92366. ],
  92367. "core-js/modules/es.object.lookup-getter": [
  92368. "es.object.lookup-getter"
  92369. ],
  92370. "core-js/modules/es.object.lookup-setter": [
  92371. "es.object.lookup-setter"
  92372. ],
  92373. "core-js/modules/es.object.prevent-extensions": [
  92374. "es.object.prevent-extensions"
  92375. ],
  92376. "core-js/modules/es.object.seal": [
  92377. "es.object.seal"
  92378. ],
  92379. "core-js/modules/es.object.set-prototype-of": [
  92380. "es.object.set-prototype-of"
  92381. ],
  92382. "core-js/modules/es.object.to-string": [
  92383. "es.object.to-string"
  92384. ],
  92385. "core-js/modules/es.object.values": [
  92386. "es.object.values"
  92387. ],
  92388. "core-js/modules/es.parse-float": [
  92389. "es.parse-float"
  92390. ],
  92391. "core-js/modules/es.parse-int": [
  92392. "es.parse-int"
  92393. ],
  92394. "core-js/modules/es.promise": [
  92395. "es.promise"
  92396. ],
  92397. "core-js/modules/es.promise.all-settled": [
  92398. "es.promise.all-settled"
  92399. ],
  92400. "core-js/modules/es.promise.any": [
  92401. "es.promise.any"
  92402. ],
  92403. "core-js/modules/es.promise.finally": [
  92404. "es.promise.finally"
  92405. ],
  92406. "core-js/modules/es.reflect.apply": [
  92407. "es.reflect.apply"
  92408. ],
  92409. "core-js/modules/es.reflect.construct": [
  92410. "es.reflect.construct"
  92411. ],
  92412. "core-js/modules/es.reflect.define-property": [
  92413. "es.reflect.define-property"
  92414. ],
  92415. "core-js/modules/es.reflect.delete-property": [
  92416. "es.reflect.delete-property"
  92417. ],
  92418. "core-js/modules/es.reflect.get": [
  92419. "es.reflect.get"
  92420. ],
  92421. "core-js/modules/es.reflect.get-own-property-descriptor": [
  92422. "es.reflect.get-own-property-descriptor"
  92423. ],
  92424. "core-js/modules/es.reflect.get-prototype-of": [
  92425. "es.reflect.get-prototype-of"
  92426. ],
  92427. "core-js/modules/es.reflect.has": [
  92428. "es.reflect.has"
  92429. ],
  92430. "core-js/modules/es.reflect.is-extensible": [
  92431. "es.reflect.is-extensible"
  92432. ],
  92433. "core-js/modules/es.reflect.own-keys": [
  92434. "es.reflect.own-keys"
  92435. ],
  92436. "core-js/modules/es.reflect.prevent-extensions": [
  92437. "es.reflect.prevent-extensions"
  92438. ],
  92439. "core-js/modules/es.reflect.set": [
  92440. "es.reflect.set"
  92441. ],
  92442. "core-js/modules/es.reflect.set-prototype-of": [
  92443. "es.reflect.set-prototype-of"
  92444. ],
  92445. "core-js/modules/es.reflect.to-string-tag": [
  92446. "es.reflect.to-string-tag"
  92447. ],
  92448. "core-js/modules/es.regexp.constructor": [
  92449. "es.regexp.constructor"
  92450. ],
  92451. "core-js/modules/es.regexp.dot-all": [
  92452. "es.regexp.dot-all"
  92453. ],
  92454. "core-js/modules/es.regexp.exec": [
  92455. "es.regexp.exec"
  92456. ],
  92457. "core-js/modules/es.regexp.flags": [
  92458. "es.regexp.flags"
  92459. ],
  92460. "core-js/modules/es.regexp.sticky": [
  92461. "es.regexp.sticky"
  92462. ],
  92463. "core-js/modules/es.regexp.test": [
  92464. "es.regexp.test"
  92465. ],
  92466. "core-js/modules/es.regexp.to-string": [
  92467. "es.regexp.to-string"
  92468. ],
  92469. "core-js/modules/es.set": [
  92470. "es.set"
  92471. ],
  92472. "core-js/modules/es.string.anchor": [
  92473. "es.string.anchor"
  92474. ],
  92475. "core-js/modules/es.string.big": [
  92476. "es.string.big"
  92477. ],
  92478. "core-js/modules/es.string.blink": [
  92479. "es.string.blink"
  92480. ],
  92481. "core-js/modules/es.string.bold": [
  92482. "es.string.bold"
  92483. ],
  92484. "core-js/modules/es.string.code-point-at": [
  92485. "es.string.code-point-at"
  92486. ],
  92487. "core-js/modules/es.string.ends-with": [
  92488. "es.string.ends-with"
  92489. ],
  92490. "core-js/modules/es.string.fixed": [
  92491. "es.string.fixed"
  92492. ],
  92493. "core-js/modules/es.string.fontcolor": [
  92494. "es.string.fontcolor"
  92495. ],
  92496. "core-js/modules/es.string.fontsize": [
  92497. "es.string.fontsize"
  92498. ],
  92499. "core-js/modules/es.string.from-code-point": [
  92500. "es.string.from-code-point"
  92501. ],
  92502. "core-js/modules/es.string.includes": [
  92503. "es.string.includes"
  92504. ],
  92505. "core-js/modules/es.string.italics": [
  92506. "es.string.italics"
  92507. ],
  92508. "core-js/modules/es.string.iterator": [
  92509. "es.string.iterator"
  92510. ],
  92511. "core-js/modules/es.string.link": [
  92512. "es.string.link"
  92513. ],
  92514. "core-js/modules/es.string.match": [
  92515. "es.string.match"
  92516. ],
  92517. "core-js/modules/es.string.match-all": [
  92518. "es.string.match-all"
  92519. ],
  92520. "core-js/modules/es.string.pad-end": [
  92521. "es.string.pad-end"
  92522. ],
  92523. "core-js/modules/es.string.pad-start": [
  92524. "es.string.pad-start"
  92525. ],
  92526. "core-js/modules/es.string.raw": [
  92527. "es.string.raw"
  92528. ],
  92529. "core-js/modules/es.string.repeat": [
  92530. "es.string.repeat"
  92531. ],
  92532. "core-js/modules/es.string.replace": [
  92533. "es.string.replace"
  92534. ],
  92535. "core-js/modules/es.string.replace-all": [
  92536. "es.string.replace-all"
  92537. ],
  92538. "core-js/modules/es.string.search": [
  92539. "es.string.search"
  92540. ],
  92541. "core-js/modules/es.string.small": [
  92542. "es.string.small"
  92543. ],
  92544. "core-js/modules/es.string.split": [
  92545. "es.string.split"
  92546. ],
  92547. "core-js/modules/es.string.starts-with": [
  92548. "es.string.starts-with"
  92549. ],
  92550. "core-js/modules/es.string.strike": [
  92551. "es.string.strike"
  92552. ],
  92553. "core-js/modules/es.string.sub": [
  92554. "es.string.sub"
  92555. ],
  92556. "core-js/modules/es.string.substr": [
  92557. "es.string.substr"
  92558. ],
  92559. "core-js/modules/es.string.sup": [
  92560. "es.string.sup"
  92561. ],
  92562. "core-js/modules/es.string.trim": [
  92563. "es.string.trim"
  92564. ],
  92565. "core-js/modules/es.string.trim-end": [
  92566. "es.string.trim-end"
  92567. ],
  92568. "core-js/modules/es.string.trim-start": [
  92569. "es.string.trim-start"
  92570. ],
  92571. "core-js/modules/es.symbol": [
  92572. "es.symbol"
  92573. ],
  92574. "core-js/modules/es.symbol.async-iterator": [
  92575. "es.symbol.async-iterator"
  92576. ],
  92577. "core-js/modules/es.symbol.description": [
  92578. "es.symbol.description"
  92579. ],
  92580. "core-js/modules/es.symbol.has-instance": [
  92581. "es.symbol.has-instance"
  92582. ],
  92583. "core-js/modules/es.symbol.is-concat-spreadable": [
  92584. "es.symbol.is-concat-spreadable"
  92585. ],
  92586. "core-js/modules/es.symbol.iterator": [
  92587. "es.symbol.iterator"
  92588. ],
  92589. "core-js/modules/es.symbol.match": [
  92590. "es.symbol.match"
  92591. ],
  92592. "core-js/modules/es.symbol.match-all": [
  92593. "es.symbol.match-all"
  92594. ],
  92595. "core-js/modules/es.symbol.replace": [
  92596. "es.symbol.replace"
  92597. ],
  92598. "core-js/modules/es.symbol.search": [
  92599. "es.symbol.search"
  92600. ],
  92601. "core-js/modules/es.symbol.species": [
  92602. "es.symbol.species"
  92603. ],
  92604. "core-js/modules/es.symbol.split": [
  92605. "es.symbol.split"
  92606. ],
  92607. "core-js/modules/es.symbol.to-primitive": [
  92608. "es.symbol.to-primitive"
  92609. ],
  92610. "core-js/modules/es.symbol.to-string-tag": [
  92611. "es.symbol.to-string-tag"
  92612. ],
  92613. "core-js/modules/es.symbol.unscopables": [
  92614. "es.symbol.unscopables"
  92615. ],
  92616. "core-js/modules/es.typed-array.copy-within": [
  92617. "es.typed-array.copy-within"
  92618. ],
  92619. "core-js/modules/es.typed-array.every": [
  92620. "es.typed-array.every"
  92621. ],
  92622. "core-js/modules/es.typed-array.fill": [
  92623. "es.typed-array.fill"
  92624. ],
  92625. "core-js/modules/es.typed-array.filter": [
  92626. "es.typed-array.filter"
  92627. ],
  92628. "core-js/modules/es.typed-array.find": [
  92629. "es.typed-array.find"
  92630. ],
  92631. "core-js/modules/es.typed-array.find-index": [
  92632. "es.typed-array.find-index"
  92633. ],
  92634. "core-js/modules/es.typed-array.float32-array": [
  92635. "es.typed-array.float32-array"
  92636. ],
  92637. "core-js/modules/es.typed-array.float64-array": [
  92638. "es.typed-array.float64-array"
  92639. ],
  92640. "core-js/modules/es.typed-array.for-each": [
  92641. "es.typed-array.for-each"
  92642. ],
  92643. "core-js/modules/es.typed-array.from": [
  92644. "es.typed-array.from"
  92645. ],
  92646. "core-js/modules/es.typed-array.includes": [
  92647. "es.typed-array.includes"
  92648. ],
  92649. "core-js/modules/es.typed-array.index-of": [
  92650. "es.typed-array.index-of"
  92651. ],
  92652. "core-js/modules/es.typed-array.int16-array": [
  92653. "es.typed-array.int16-array"
  92654. ],
  92655. "core-js/modules/es.typed-array.int32-array": [
  92656. "es.typed-array.int32-array"
  92657. ],
  92658. "core-js/modules/es.typed-array.int8-array": [
  92659. "es.typed-array.int8-array"
  92660. ],
  92661. "core-js/modules/es.typed-array.iterator": [
  92662. "es.typed-array.iterator"
  92663. ],
  92664. "core-js/modules/es.typed-array.join": [
  92665. "es.typed-array.join"
  92666. ],
  92667. "core-js/modules/es.typed-array.last-index-of": [
  92668. "es.typed-array.last-index-of"
  92669. ],
  92670. "core-js/modules/es.typed-array.map": [
  92671. "es.typed-array.map"
  92672. ],
  92673. "core-js/modules/es.typed-array.of": [
  92674. "es.typed-array.of"
  92675. ],
  92676. "core-js/modules/es.typed-array.reduce": [
  92677. "es.typed-array.reduce"
  92678. ],
  92679. "core-js/modules/es.typed-array.reduce-right": [
  92680. "es.typed-array.reduce-right"
  92681. ],
  92682. "core-js/modules/es.typed-array.reverse": [
  92683. "es.typed-array.reverse"
  92684. ],
  92685. "core-js/modules/es.typed-array.set": [
  92686. "es.typed-array.set"
  92687. ],
  92688. "core-js/modules/es.typed-array.slice": [
  92689. "es.typed-array.slice"
  92690. ],
  92691. "core-js/modules/es.typed-array.some": [
  92692. "es.typed-array.some"
  92693. ],
  92694. "core-js/modules/es.typed-array.sort": [
  92695. "es.typed-array.sort"
  92696. ],
  92697. "core-js/modules/es.typed-array.subarray": [
  92698. "es.typed-array.subarray"
  92699. ],
  92700. "core-js/modules/es.typed-array.to-locale-string": [
  92701. "es.typed-array.to-locale-string"
  92702. ],
  92703. "core-js/modules/es.typed-array.to-string": [
  92704. "es.typed-array.to-string"
  92705. ],
  92706. "core-js/modules/es.typed-array.uint16-array": [
  92707. "es.typed-array.uint16-array"
  92708. ],
  92709. "core-js/modules/es.typed-array.uint32-array": [
  92710. "es.typed-array.uint32-array"
  92711. ],
  92712. "core-js/modules/es.typed-array.uint8-array": [
  92713. "es.typed-array.uint8-array"
  92714. ],
  92715. "core-js/modules/es.typed-array.uint8-clamped-array": [
  92716. "es.typed-array.uint8-clamped-array"
  92717. ],
  92718. "core-js/modules/es.unescape": [
  92719. "es.unescape"
  92720. ],
  92721. "core-js/modules/es.weak-map": [
  92722. "es.weak-map"
  92723. ],
  92724. "core-js/modules/es.weak-set": [
  92725. "es.weak-set"
  92726. ],
  92727. "core-js/modules/esnext.aggregate-error": [
  92728. "esnext.aggregate-error"
  92729. ],
  92730. "core-js/modules/esnext.array.at": [
  92731. "esnext.array.at"
  92732. ],
  92733. "core-js/modules/esnext.array.filter-out": [
  92734. "esnext.array.filter-out"
  92735. ],
  92736. "core-js/modules/esnext.array.find-last": [
  92737. "esnext.array.find-last"
  92738. ],
  92739. "core-js/modules/esnext.array.find-last-index": [
  92740. "esnext.array.find-last-index"
  92741. ],
  92742. "core-js/modules/esnext.array.is-template-object": [
  92743. "esnext.array.is-template-object"
  92744. ],
  92745. "core-js/modules/esnext.array.last-index": [
  92746. "esnext.array.last-index"
  92747. ],
  92748. "core-js/modules/esnext.array.last-item": [
  92749. "esnext.array.last-item"
  92750. ],
  92751. "core-js/modules/esnext.array.unique-by": [
  92752. "esnext.array.unique-by"
  92753. ],
  92754. "core-js/modules/esnext.async-iterator.as-indexed-pairs": [
  92755. "esnext.async-iterator.as-indexed-pairs"
  92756. ],
  92757. "core-js/modules/esnext.async-iterator.constructor": [
  92758. "esnext.async-iterator.constructor"
  92759. ],
  92760. "core-js/modules/esnext.async-iterator.drop": [
  92761. "esnext.async-iterator.drop"
  92762. ],
  92763. "core-js/modules/esnext.async-iterator.every": [
  92764. "esnext.async-iterator.every"
  92765. ],
  92766. "core-js/modules/esnext.async-iterator.filter": [
  92767. "esnext.async-iterator.filter"
  92768. ],
  92769. "core-js/modules/esnext.async-iterator.find": [
  92770. "esnext.async-iterator.find"
  92771. ],
  92772. "core-js/modules/esnext.async-iterator.flat-map": [
  92773. "esnext.async-iterator.flat-map"
  92774. ],
  92775. "core-js/modules/esnext.async-iterator.for-each": [
  92776. "esnext.async-iterator.for-each"
  92777. ],
  92778. "core-js/modules/esnext.async-iterator.from": [
  92779. "esnext.async-iterator.from"
  92780. ],
  92781. "core-js/modules/esnext.async-iterator.map": [
  92782. "esnext.async-iterator.map"
  92783. ],
  92784. "core-js/modules/esnext.async-iterator.reduce": [
  92785. "esnext.async-iterator.reduce"
  92786. ],
  92787. "core-js/modules/esnext.async-iterator.some": [
  92788. "esnext.async-iterator.some"
  92789. ],
  92790. "core-js/modules/esnext.async-iterator.take": [
  92791. "esnext.async-iterator.take"
  92792. ],
  92793. "core-js/modules/esnext.async-iterator.to-array": [
  92794. "esnext.async-iterator.to-array"
  92795. ],
  92796. "core-js/modules/esnext.bigint.range": [
  92797. "esnext.bigint.range"
  92798. ],
  92799. "core-js/modules/esnext.composite-key": [
  92800. "esnext.composite-key"
  92801. ],
  92802. "core-js/modules/esnext.composite-symbol": [
  92803. "esnext.composite-symbol"
  92804. ],
  92805. "core-js/modules/esnext.global-this": [
  92806. "esnext.global-this"
  92807. ],
  92808. "core-js/modules/esnext.iterator.as-indexed-pairs": [
  92809. "esnext.iterator.as-indexed-pairs"
  92810. ],
  92811. "core-js/modules/esnext.iterator.constructor": [
  92812. "esnext.iterator.constructor"
  92813. ],
  92814. "core-js/modules/esnext.iterator.drop": [
  92815. "esnext.iterator.drop"
  92816. ],
  92817. "core-js/modules/esnext.iterator.every": [
  92818. "esnext.iterator.every"
  92819. ],
  92820. "core-js/modules/esnext.iterator.filter": [
  92821. "esnext.iterator.filter"
  92822. ],
  92823. "core-js/modules/esnext.iterator.find": [
  92824. "esnext.iterator.find"
  92825. ],
  92826. "core-js/modules/esnext.iterator.flat-map": [
  92827. "esnext.iterator.flat-map"
  92828. ],
  92829. "core-js/modules/esnext.iterator.for-each": [
  92830. "esnext.iterator.for-each"
  92831. ],
  92832. "core-js/modules/esnext.iterator.from": [
  92833. "esnext.iterator.from"
  92834. ],
  92835. "core-js/modules/esnext.iterator.map": [
  92836. "esnext.iterator.map"
  92837. ],
  92838. "core-js/modules/esnext.iterator.reduce": [
  92839. "esnext.iterator.reduce"
  92840. ],
  92841. "core-js/modules/esnext.iterator.some": [
  92842. "esnext.iterator.some"
  92843. ],
  92844. "core-js/modules/esnext.iterator.take": [
  92845. "esnext.iterator.take"
  92846. ],
  92847. "core-js/modules/esnext.iterator.to-array": [
  92848. "esnext.iterator.to-array"
  92849. ],
  92850. "core-js/modules/esnext.map.delete-all": [
  92851. "esnext.map.delete-all"
  92852. ],
  92853. "core-js/modules/esnext.map.emplace": [
  92854. "esnext.map.emplace"
  92855. ],
  92856. "core-js/modules/esnext.map.every": [
  92857. "esnext.map.every"
  92858. ],
  92859. "core-js/modules/esnext.map.filter": [
  92860. "esnext.map.filter"
  92861. ],
  92862. "core-js/modules/esnext.map.find": [
  92863. "esnext.map.find"
  92864. ],
  92865. "core-js/modules/esnext.map.find-key": [
  92866. "esnext.map.find-key"
  92867. ],
  92868. "core-js/modules/esnext.map.from": [
  92869. "esnext.map.from"
  92870. ],
  92871. "core-js/modules/esnext.map.group-by": [
  92872. "esnext.map.group-by"
  92873. ],
  92874. "core-js/modules/esnext.map.includes": [
  92875. "esnext.map.includes"
  92876. ],
  92877. "core-js/modules/esnext.map.key-by": [
  92878. "esnext.map.key-by"
  92879. ],
  92880. "core-js/modules/esnext.map.key-of": [
  92881. "esnext.map.key-of"
  92882. ],
  92883. "core-js/modules/esnext.map.map-keys": [
  92884. "esnext.map.map-keys"
  92885. ],
  92886. "core-js/modules/esnext.map.map-values": [
  92887. "esnext.map.map-values"
  92888. ],
  92889. "core-js/modules/esnext.map.merge": [
  92890. "esnext.map.merge"
  92891. ],
  92892. "core-js/modules/esnext.map.of": [
  92893. "esnext.map.of"
  92894. ],
  92895. "core-js/modules/esnext.map.reduce": [
  92896. "esnext.map.reduce"
  92897. ],
  92898. "core-js/modules/esnext.map.some": [
  92899. "esnext.map.some"
  92900. ],
  92901. "core-js/modules/esnext.map.update": [
  92902. "esnext.map.update"
  92903. ],
  92904. "core-js/modules/esnext.map.update-or-insert": [
  92905. "esnext.map.update-or-insert"
  92906. ],
  92907. "core-js/modules/esnext.map.upsert": [
  92908. "esnext.map.upsert"
  92909. ],
  92910. "core-js/modules/esnext.math.clamp": [
  92911. "esnext.math.clamp"
  92912. ],
  92913. "core-js/modules/esnext.math.deg-per-rad": [
  92914. "esnext.math.deg-per-rad"
  92915. ],
  92916. "core-js/modules/esnext.math.degrees": [
  92917. "esnext.math.degrees"
  92918. ],
  92919. "core-js/modules/esnext.math.fscale": [
  92920. "esnext.math.fscale"
  92921. ],
  92922. "core-js/modules/esnext.math.iaddh": [
  92923. "esnext.math.iaddh"
  92924. ],
  92925. "core-js/modules/esnext.math.imulh": [
  92926. "esnext.math.imulh"
  92927. ],
  92928. "core-js/modules/esnext.math.isubh": [
  92929. "esnext.math.isubh"
  92930. ],
  92931. "core-js/modules/esnext.math.rad-per-deg": [
  92932. "esnext.math.rad-per-deg"
  92933. ],
  92934. "core-js/modules/esnext.math.radians": [
  92935. "esnext.math.radians"
  92936. ],
  92937. "core-js/modules/esnext.math.scale": [
  92938. "esnext.math.scale"
  92939. ],
  92940. "core-js/modules/esnext.math.seeded-prng": [
  92941. "esnext.math.seeded-prng"
  92942. ],
  92943. "core-js/modules/esnext.math.signbit": [
  92944. "esnext.math.signbit"
  92945. ],
  92946. "core-js/modules/esnext.math.umulh": [
  92947. "esnext.math.umulh"
  92948. ],
  92949. "core-js/modules/esnext.number.from-string": [
  92950. "esnext.number.from-string"
  92951. ],
  92952. "core-js/modules/esnext.number.range": [
  92953. "esnext.number.range"
  92954. ],
  92955. "core-js/modules/esnext.object.has-own": [
  92956. "esnext.object.has-own"
  92957. ],
  92958. "core-js/modules/esnext.object.iterate-entries": [
  92959. "esnext.object.iterate-entries"
  92960. ],
  92961. "core-js/modules/esnext.object.iterate-keys": [
  92962. "esnext.object.iterate-keys"
  92963. ],
  92964. "core-js/modules/esnext.object.iterate-values": [
  92965. "esnext.object.iterate-values"
  92966. ],
  92967. "core-js/modules/esnext.observable": [
  92968. "esnext.observable"
  92969. ],
  92970. "core-js/modules/esnext.promise.all-settled": [
  92971. "esnext.promise.all-settled"
  92972. ],
  92973. "core-js/modules/esnext.promise.any": [
  92974. "esnext.promise.any"
  92975. ],
  92976. "core-js/modules/esnext.promise.try": [
  92977. "esnext.promise.try"
  92978. ],
  92979. "core-js/modules/esnext.reflect.define-metadata": [
  92980. "esnext.reflect.define-metadata"
  92981. ],
  92982. "core-js/modules/esnext.reflect.delete-metadata": [
  92983. "esnext.reflect.delete-metadata"
  92984. ],
  92985. "core-js/modules/esnext.reflect.get-metadata": [
  92986. "esnext.reflect.get-metadata"
  92987. ],
  92988. "core-js/modules/esnext.reflect.get-metadata-keys": [
  92989. "esnext.reflect.get-metadata-keys"
  92990. ],
  92991. "core-js/modules/esnext.reflect.get-own-metadata": [
  92992. "esnext.reflect.get-own-metadata"
  92993. ],
  92994. "core-js/modules/esnext.reflect.get-own-metadata-keys": [
  92995. "esnext.reflect.get-own-metadata-keys"
  92996. ],
  92997. "core-js/modules/esnext.reflect.has-metadata": [
  92998. "esnext.reflect.has-metadata"
  92999. ],
  93000. "core-js/modules/esnext.reflect.has-own-metadata": [
  93001. "esnext.reflect.has-own-metadata"
  93002. ],
  93003. "core-js/modules/esnext.reflect.metadata": [
  93004. "esnext.reflect.metadata"
  93005. ],
  93006. "core-js/modules/esnext.set.add-all": [
  93007. "esnext.set.add-all"
  93008. ],
  93009. "core-js/modules/esnext.set.delete-all": [
  93010. "esnext.set.delete-all"
  93011. ],
  93012. "core-js/modules/esnext.set.difference": [
  93013. "esnext.set.difference"
  93014. ],
  93015. "core-js/modules/esnext.set.every": [
  93016. "esnext.set.every"
  93017. ],
  93018. "core-js/modules/esnext.set.filter": [
  93019. "esnext.set.filter"
  93020. ],
  93021. "core-js/modules/esnext.set.find": [
  93022. "esnext.set.find"
  93023. ],
  93024. "core-js/modules/esnext.set.from": [
  93025. "esnext.set.from"
  93026. ],
  93027. "core-js/modules/esnext.set.intersection": [
  93028. "esnext.set.intersection"
  93029. ],
  93030. "core-js/modules/esnext.set.is-disjoint-from": [
  93031. "esnext.set.is-disjoint-from"
  93032. ],
  93033. "core-js/modules/esnext.set.is-subset-of": [
  93034. "esnext.set.is-subset-of"
  93035. ],
  93036. "core-js/modules/esnext.set.is-superset-of": [
  93037. "esnext.set.is-superset-of"
  93038. ],
  93039. "core-js/modules/esnext.set.join": [
  93040. "esnext.set.join"
  93041. ],
  93042. "core-js/modules/esnext.set.map": [
  93043. "esnext.set.map"
  93044. ],
  93045. "core-js/modules/esnext.set.of": [
  93046. "esnext.set.of"
  93047. ],
  93048. "core-js/modules/esnext.set.reduce": [
  93049. "esnext.set.reduce"
  93050. ],
  93051. "core-js/modules/esnext.set.some": [
  93052. "esnext.set.some"
  93053. ],
  93054. "core-js/modules/esnext.set.symmetric-difference": [
  93055. "esnext.set.symmetric-difference"
  93056. ],
  93057. "core-js/modules/esnext.set.union": [
  93058. "esnext.set.union"
  93059. ],
  93060. "core-js/modules/esnext.string.at": [
  93061. "esnext.string.at"
  93062. ],
  93063. "core-js/modules/esnext.string.at-alternative": [
  93064. "esnext.string.at-alternative"
  93065. ],
  93066. "core-js/modules/esnext.string.code-points": [
  93067. "esnext.string.code-points"
  93068. ],
  93069. "core-js/modules/esnext.string.match-all": [
  93070. "esnext.string.match-all"
  93071. ],
  93072. "core-js/modules/esnext.string.replace-all": [
  93073. "esnext.string.replace-all"
  93074. ],
  93075. "core-js/modules/esnext.symbol.async-dispose": [
  93076. "esnext.symbol.async-dispose"
  93077. ],
  93078. "core-js/modules/esnext.symbol.dispose": [
  93079. "esnext.symbol.dispose"
  93080. ],
  93081. "core-js/modules/esnext.symbol.matcher": [
  93082. "esnext.symbol.matcher"
  93083. ],
  93084. "core-js/modules/esnext.symbol.metadata": [
  93085. "esnext.symbol.metadata"
  93086. ],
  93087. "core-js/modules/esnext.symbol.observable": [
  93088. "esnext.symbol.observable"
  93089. ],
  93090. "core-js/modules/esnext.symbol.pattern-match": [
  93091. "esnext.symbol.pattern-match"
  93092. ],
  93093. "core-js/modules/esnext.symbol.replace-all": [
  93094. "esnext.symbol.replace-all"
  93095. ],
  93096. "core-js/modules/esnext.typed-array.at": [
  93097. "esnext.typed-array.at"
  93098. ],
  93099. "core-js/modules/esnext.typed-array.filter-out": [
  93100. "esnext.typed-array.filter-out"
  93101. ],
  93102. "core-js/modules/esnext.typed-array.find-last": [
  93103. "esnext.typed-array.find-last"
  93104. ],
  93105. "core-js/modules/esnext.typed-array.find-last-index": [
  93106. "esnext.typed-array.find-last-index"
  93107. ],
  93108. "core-js/modules/esnext.typed-array.unique-by": [
  93109. "esnext.typed-array.unique-by"
  93110. ],
  93111. "core-js/modules/esnext.weak-map.delete-all": [
  93112. "esnext.weak-map.delete-all"
  93113. ],
  93114. "core-js/modules/esnext.weak-map.emplace": [
  93115. "esnext.weak-map.emplace"
  93116. ],
  93117. "core-js/modules/esnext.weak-map.from": [
  93118. "esnext.weak-map.from"
  93119. ],
  93120. "core-js/modules/esnext.weak-map.of": [
  93121. "esnext.weak-map.of"
  93122. ],
  93123. "core-js/modules/esnext.weak-map.upsert": [
  93124. "esnext.weak-map.upsert"
  93125. ],
  93126. "core-js/modules/esnext.weak-set.add-all": [
  93127. "esnext.weak-set.add-all"
  93128. ],
  93129. "core-js/modules/esnext.weak-set.delete-all": [
  93130. "esnext.weak-set.delete-all"
  93131. ],
  93132. "core-js/modules/esnext.weak-set.from": [
  93133. "esnext.weak-set.from"
  93134. ],
  93135. "core-js/modules/esnext.weak-set.of": [
  93136. "esnext.weak-set.of"
  93137. ],
  93138. "core-js/modules/web.dom-collections.for-each": [
  93139. "web.dom-collections.for-each"
  93140. ],
  93141. "core-js/modules/web.dom-collections.iterator": [
  93142. "web.dom-collections.iterator"
  93143. ],
  93144. "core-js/modules/web.immediate": [
  93145. "web.immediate"
  93146. ],
  93147. "core-js/modules/web.queue-microtask": [
  93148. "web.queue-microtask"
  93149. ],
  93150. "core-js/modules/web.timers": [
  93151. "web.timers"
  93152. ],
  93153. "core-js/modules/web.url": [
  93154. "web.url"
  93155. ],
  93156. "core-js/modules/web.url-search-params": [
  93157. "web.url-search-params"
  93158. ],
  93159. "core-js/modules/web.url.to-json": [
  93160. "web.url.to-json"
  93161. ],
  93162. "core-js/proposals": [
  93163. "es.map",
  93164. "esnext.aggregate-error",
  93165. "esnext.array.at",
  93166. "esnext.array.filter-out",
  93167. "esnext.array.find-last",
  93168. "esnext.array.find-last-index",
  93169. "esnext.array.is-template-object",
  93170. "esnext.array.last-index",
  93171. "esnext.array.last-item",
  93172. "esnext.array.unique-by",
  93173. "esnext.async-iterator.constructor",
  93174. "esnext.async-iterator.as-indexed-pairs",
  93175. "esnext.async-iterator.drop",
  93176. "esnext.async-iterator.every",
  93177. "esnext.async-iterator.filter",
  93178. "esnext.async-iterator.find",
  93179. "esnext.async-iterator.flat-map",
  93180. "esnext.async-iterator.for-each",
  93181. "esnext.async-iterator.from",
  93182. "esnext.async-iterator.map",
  93183. "esnext.async-iterator.reduce",
  93184. "esnext.async-iterator.some",
  93185. "esnext.async-iterator.take",
  93186. "esnext.async-iterator.to-array",
  93187. "esnext.bigint.range",
  93188. "esnext.composite-key",
  93189. "esnext.composite-symbol",
  93190. "esnext.global-this",
  93191. "esnext.iterator.constructor",
  93192. "esnext.iterator.as-indexed-pairs",
  93193. "esnext.iterator.drop",
  93194. "esnext.iterator.every",
  93195. "esnext.iterator.filter",
  93196. "esnext.iterator.find",
  93197. "esnext.iterator.flat-map",
  93198. "esnext.iterator.for-each",
  93199. "esnext.iterator.from",
  93200. "esnext.iterator.map",
  93201. "esnext.iterator.reduce",
  93202. "esnext.iterator.some",
  93203. "esnext.iterator.take",
  93204. "esnext.iterator.to-array",
  93205. "esnext.map.delete-all",
  93206. "esnext.map.emplace",
  93207. "esnext.map.every",
  93208. "esnext.map.filter",
  93209. "esnext.map.find",
  93210. "esnext.map.find-key",
  93211. "esnext.map.from",
  93212. "esnext.map.group-by",
  93213. "esnext.map.includes",
  93214. "esnext.map.key-by",
  93215. "esnext.map.key-of",
  93216. "esnext.map.map-keys",
  93217. "esnext.map.map-values",
  93218. "esnext.map.merge",
  93219. "esnext.map.of",
  93220. "esnext.map.reduce",
  93221. "esnext.map.some",
  93222. "esnext.map.update",
  93223. "esnext.map.update-or-insert",
  93224. "esnext.map.upsert",
  93225. "esnext.math.clamp",
  93226. "esnext.math.deg-per-rad",
  93227. "esnext.math.degrees",
  93228. "esnext.math.fscale",
  93229. "esnext.math.iaddh",
  93230. "esnext.math.imulh",
  93231. "esnext.math.isubh",
  93232. "esnext.math.rad-per-deg",
  93233. "esnext.math.radians",
  93234. "esnext.math.scale",
  93235. "esnext.math.seeded-prng",
  93236. "esnext.math.signbit",
  93237. "esnext.math.umulh",
  93238. "esnext.number.from-string",
  93239. "esnext.number.range",
  93240. "esnext.object.has-own",
  93241. "esnext.object.iterate-entries",
  93242. "esnext.object.iterate-keys",
  93243. "esnext.object.iterate-values",
  93244. "esnext.observable",
  93245. "esnext.promise.all-settled",
  93246. "esnext.promise.any",
  93247. "esnext.promise.try",
  93248. "esnext.reflect.define-metadata",
  93249. "esnext.reflect.delete-metadata",
  93250. "esnext.reflect.get-metadata",
  93251. "esnext.reflect.get-metadata-keys",
  93252. "esnext.reflect.get-own-metadata",
  93253. "esnext.reflect.get-own-metadata-keys",
  93254. "esnext.reflect.has-metadata",
  93255. "esnext.reflect.has-own-metadata",
  93256. "esnext.reflect.metadata",
  93257. "esnext.set.add-all",
  93258. "esnext.set.delete-all",
  93259. "esnext.set.difference",
  93260. "esnext.set.every",
  93261. "esnext.set.filter",
  93262. "esnext.set.find",
  93263. "esnext.set.from",
  93264. "esnext.set.intersection",
  93265. "esnext.set.is-disjoint-from",
  93266. "esnext.set.is-subset-of",
  93267. "esnext.set.is-superset-of",
  93268. "esnext.set.join",
  93269. "esnext.set.map",
  93270. "esnext.set.of",
  93271. "esnext.set.reduce",
  93272. "esnext.set.some",
  93273. "esnext.set.symmetric-difference",
  93274. "esnext.set.union",
  93275. "esnext.string.at",
  93276. "esnext.string.code-points",
  93277. "esnext.string.match-all",
  93278. "esnext.string.replace-all",
  93279. "esnext.symbol.async-dispose",
  93280. "esnext.symbol.dispose",
  93281. "esnext.symbol.matcher",
  93282. "esnext.symbol.metadata",
  93283. "esnext.symbol.observable",
  93284. "esnext.symbol.pattern-match",
  93285. "esnext.symbol.replace-all",
  93286. "esnext.typed-array.at",
  93287. "esnext.typed-array.filter-out",
  93288. "esnext.typed-array.find-last",
  93289. "esnext.typed-array.find-last-index",
  93290. "esnext.typed-array.unique-by",
  93291. "esnext.weak-map.delete-all",
  93292. "esnext.weak-map.from",
  93293. "esnext.weak-map.of",
  93294. "esnext.weak-map.emplace",
  93295. "esnext.weak-map.upsert",
  93296. "esnext.weak-set.add-all",
  93297. "esnext.weak-set.delete-all",
  93298. "esnext.weak-set.from",
  93299. "esnext.weak-set.of",
  93300. "web.url",
  93301. "web.url.to-json",
  93302. "web.url-search-params"
  93303. ],
  93304. "core-js/proposals/accessible-object-hasownproperty": [
  93305. "esnext.object.has-own"
  93306. ],
  93307. "core-js/proposals/array-filtering": [
  93308. "esnext.array.filter-out",
  93309. "esnext.typed-array.filter-out"
  93310. ],
  93311. "core-js/proposals/array-find-from-last": [
  93312. "esnext.array.find-last",
  93313. "esnext.array.find-last-index",
  93314. "esnext.typed-array.find-last",
  93315. "esnext.typed-array.find-last-index"
  93316. ],
  93317. "core-js/proposals/array-is-template-object": [
  93318. "esnext.array.is-template-object"
  93319. ],
  93320. "core-js/proposals/array-last": [
  93321. "esnext.array.last-index",
  93322. "esnext.array.last-item"
  93323. ],
  93324. "core-js/proposals/array-unique": [
  93325. "es.map",
  93326. "esnext.array.unique-by",
  93327. "esnext.typed-array.unique-by"
  93328. ],
  93329. "core-js/proposals/collection-methods": [
  93330. "esnext.map.delete-all",
  93331. "esnext.map.every",
  93332. "esnext.map.filter",
  93333. "esnext.map.find",
  93334. "esnext.map.find-key",
  93335. "esnext.map.group-by",
  93336. "esnext.map.includes",
  93337. "esnext.map.key-by",
  93338. "esnext.map.key-of",
  93339. "esnext.map.map-keys",
  93340. "esnext.map.map-values",
  93341. "esnext.map.merge",
  93342. "esnext.map.reduce",
  93343. "esnext.map.some",
  93344. "esnext.map.update",
  93345. "esnext.set.add-all",
  93346. "esnext.set.delete-all",
  93347. "esnext.set.every",
  93348. "esnext.set.filter",
  93349. "esnext.set.find",
  93350. "esnext.set.join",
  93351. "esnext.set.map",
  93352. "esnext.set.reduce",
  93353. "esnext.set.some",
  93354. "esnext.weak-map.delete-all",
  93355. "esnext.weak-set.add-all",
  93356. "esnext.weak-set.delete-all"
  93357. ],
  93358. "core-js/proposals/collection-of-from": [
  93359. "esnext.map.from",
  93360. "esnext.map.of",
  93361. "esnext.set.from",
  93362. "esnext.set.of",
  93363. "esnext.weak-map.from",
  93364. "esnext.weak-map.of",
  93365. "esnext.weak-set.from",
  93366. "esnext.weak-set.of"
  93367. ],
  93368. "core-js/proposals/decorators": [
  93369. "esnext.symbol.metadata"
  93370. ],
  93371. "core-js/proposals/efficient-64-bit-arithmetic": [
  93372. "esnext.math.iaddh",
  93373. "esnext.math.imulh",
  93374. "esnext.math.isubh",
  93375. "esnext.math.umulh"
  93376. ],
  93377. "core-js/proposals/global-this": [
  93378. "esnext.global-this"
  93379. ],
  93380. "core-js/proposals/iterator-helpers": [
  93381. "esnext.async-iterator.constructor",
  93382. "esnext.async-iterator.as-indexed-pairs",
  93383. "esnext.async-iterator.drop",
  93384. "esnext.async-iterator.every",
  93385. "esnext.async-iterator.filter",
  93386. "esnext.async-iterator.find",
  93387. "esnext.async-iterator.flat-map",
  93388. "esnext.async-iterator.for-each",
  93389. "esnext.async-iterator.from",
  93390. "esnext.async-iterator.map",
  93391. "esnext.async-iterator.reduce",
  93392. "esnext.async-iterator.some",
  93393. "esnext.async-iterator.take",
  93394. "esnext.async-iterator.to-array",
  93395. "esnext.iterator.constructor",
  93396. "esnext.iterator.as-indexed-pairs",
  93397. "esnext.iterator.drop",
  93398. "esnext.iterator.every",
  93399. "esnext.iterator.filter",
  93400. "esnext.iterator.find",
  93401. "esnext.iterator.flat-map",
  93402. "esnext.iterator.for-each",
  93403. "esnext.iterator.from",
  93404. "esnext.iterator.map",
  93405. "esnext.iterator.reduce",
  93406. "esnext.iterator.some",
  93407. "esnext.iterator.take",
  93408. "esnext.iterator.to-array"
  93409. ],
  93410. "core-js/proposals/keys-composition": [
  93411. "esnext.composite-key",
  93412. "esnext.composite-symbol"
  93413. ],
  93414. "core-js/proposals/map-update-or-insert": [
  93415. "esnext.map.emplace",
  93416. "esnext.map.update-or-insert",
  93417. "esnext.map.upsert",
  93418. "esnext.weak-map.emplace",
  93419. "esnext.weak-map.upsert"
  93420. ],
  93421. "core-js/proposals/map-upsert": [
  93422. "esnext.map.emplace",
  93423. "esnext.map.update-or-insert",
  93424. "esnext.map.upsert",
  93425. "esnext.weak-map.emplace",
  93426. "esnext.weak-map.upsert"
  93427. ],
  93428. "core-js/proposals/math-extensions": [
  93429. "esnext.math.clamp",
  93430. "esnext.math.deg-per-rad",
  93431. "esnext.math.degrees",
  93432. "esnext.math.fscale",
  93433. "esnext.math.rad-per-deg",
  93434. "esnext.math.radians",
  93435. "esnext.math.scale"
  93436. ],
  93437. "core-js/proposals/math-signbit": [
  93438. "esnext.math.signbit"
  93439. ],
  93440. "core-js/proposals/number-from-string": [
  93441. "esnext.number.from-string"
  93442. ],
  93443. "core-js/proposals/number-range": [
  93444. "esnext.bigint.range",
  93445. "esnext.number.range"
  93446. ],
  93447. "core-js/proposals/object-iteration": [
  93448. "esnext.object.iterate-entries",
  93449. "esnext.object.iterate-keys",
  93450. "esnext.object.iterate-values"
  93451. ],
  93452. "core-js/proposals/observable": [
  93453. "esnext.observable",
  93454. "esnext.symbol.observable"
  93455. ],
  93456. "core-js/proposals/pattern-matching": [
  93457. "esnext.symbol.matcher",
  93458. "esnext.symbol.pattern-match"
  93459. ],
  93460. "core-js/proposals/promise-all-settled": [
  93461. "esnext.promise.all-settled"
  93462. ],
  93463. "core-js/proposals/promise-any": [
  93464. "esnext.aggregate-error",
  93465. "esnext.promise.any"
  93466. ],
  93467. "core-js/proposals/promise-try": [
  93468. "esnext.promise.try"
  93469. ],
  93470. "core-js/proposals/reflect-metadata": [
  93471. "esnext.reflect.define-metadata",
  93472. "esnext.reflect.delete-metadata",
  93473. "esnext.reflect.get-metadata",
  93474. "esnext.reflect.get-metadata-keys",
  93475. "esnext.reflect.get-own-metadata",
  93476. "esnext.reflect.get-own-metadata-keys",
  93477. "esnext.reflect.has-metadata",
  93478. "esnext.reflect.has-own-metadata",
  93479. "esnext.reflect.metadata"
  93480. ],
  93481. "core-js/proposals/relative-indexing-method": [
  93482. "esnext.array.at",
  93483. "esnext.typed-array.at"
  93484. ],
  93485. "core-js/proposals/seeded-random": [
  93486. "esnext.math.seeded-prng"
  93487. ],
  93488. "core-js/proposals/set-methods": [
  93489. "esnext.set.difference",
  93490. "esnext.set.intersection",
  93491. "esnext.set.is-disjoint-from",
  93492. "esnext.set.is-subset-of",
  93493. "esnext.set.is-superset-of",
  93494. "esnext.set.symmetric-difference",
  93495. "esnext.set.union"
  93496. ],
  93497. "core-js/proposals/string-at": [
  93498. "esnext.string.at"
  93499. ],
  93500. "core-js/proposals/string-code-points": [
  93501. "esnext.string.code-points"
  93502. ],
  93503. "core-js/proposals/string-match-all": [
  93504. "esnext.string.match-all"
  93505. ],
  93506. "core-js/proposals/string-replace-all": [
  93507. "esnext.string.replace-all",
  93508. "esnext.symbol.replace-all"
  93509. ],
  93510. "core-js/proposals/url": [
  93511. "web.url",
  93512. "web.url.to-json",
  93513. "web.url-search-params"
  93514. ],
  93515. "core-js/proposals/using-statement": [
  93516. "esnext.symbol.async-dispose",
  93517. "esnext.symbol.dispose"
  93518. ],
  93519. "core-js/stable": [
  93520. "es.symbol",
  93521. "es.symbol.description",
  93522. "es.symbol.async-iterator",
  93523. "es.symbol.has-instance",
  93524. "es.symbol.is-concat-spreadable",
  93525. "es.symbol.iterator",
  93526. "es.symbol.match",
  93527. "es.symbol.match-all",
  93528. "es.symbol.replace",
  93529. "es.symbol.search",
  93530. "es.symbol.species",
  93531. "es.symbol.split",
  93532. "es.symbol.to-primitive",
  93533. "es.symbol.to-string-tag",
  93534. "es.symbol.unscopables",
  93535. "es.aggregate-error",
  93536. "es.array.concat",
  93537. "es.array.copy-within",
  93538. "es.array.every",
  93539. "es.array.fill",
  93540. "es.array.filter",
  93541. "es.array.find",
  93542. "es.array.find-index",
  93543. "es.array.flat",
  93544. "es.array.flat-map",
  93545. "es.array.for-each",
  93546. "es.array.from",
  93547. "es.array.includes",
  93548. "es.array.index-of",
  93549. "es.array.is-array",
  93550. "es.array.iterator",
  93551. "es.array.join",
  93552. "es.array.last-index-of",
  93553. "es.array.map",
  93554. "es.array.of",
  93555. "es.array.reduce",
  93556. "es.array.reduce-right",
  93557. "es.array.reverse",
  93558. "es.array.slice",
  93559. "es.array.some",
  93560. "es.array.sort",
  93561. "es.array.species",
  93562. "es.array.splice",
  93563. "es.array.unscopables.flat",
  93564. "es.array.unscopables.flat-map",
  93565. "es.array-buffer.constructor",
  93566. "es.array-buffer.is-view",
  93567. "es.array-buffer.slice",
  93568. "es.data-view",
  93569. "es.date.get-year",
  93570. "es.date.now",
  93571. "es.date.set-year",
  93572. "es.date.to-gmt-string",
  93573. "es.date.to-iso-string",
  93574. "es.date.to-json",
  93575. "es.date.to-primitive",
  93576. "es.date.to-string",
  93577. "es.escape",
  93578. "es.function.bind",
  93579. "es.function.has-instance",
  93580. "es.function.name",
  93581. "es.global-this",
  93582. "es.json.stringify",
  93583. "es.json.to-string-tag",
  93584. "es.map",
  93585. "es.math.acosh",
  93586. "es.math.asinh",
  93587. "es.math.atanh",
  93588. "es.math.cbrt",
  93589. "es.math.clz32",
  93590. "es.math.cosh",
  93591. "es.math.expm1",
  93592. "es.math.fround",
  93593. "es.math.hypot",
  93594. "es.math.imul",
  93595. "es.math.log10",
  93596. "es.math.log1p",
  93597. "es.math.log2",
  93598. "es.math.sign",
  93599. "es.math.sinh",
  93600. "es.math.tanh",
  93601. "es.math.to-string-tag",
  93602. "es.math.trunc",
  93603. "es.number.constructor",
  93604. "es.number.epsilon",
  93605. "es.number.is-finite",
  93606. "es.number.is-integer",
  93607. "es.number.is-nan",
  93608. "es.number.is-safe-integer",
  93609. "es.number.max-safe-integer",
  93610. "es.number.min-safe-integer",
  93611. "es.number.parse-float",
  93612. "es.number.parse-int",
  93613. "es.number.to-fixed",
  93614. "es.number.to-precision",
  93615. "es.object.assign",
  93616. "es.object.create",
  93617. "es.object.define-getter",
  93618. "es.object.define-properties",
  93619. "es.object.define-property",
  93620. "es.object.define-setter",
  93621. "es.object.entries",
  93622. "es.object.freeze",
  93623. "es.object.from-entries",
  93624. "es.object.get-own-property-descriptor",
  93625. "es.object.get-own-property-descriptors",
  93626. "es.object.get-own-property-names",
  93627. "es.object.get-prototype-of",
  93628. "es.object.is",
  93629. "es.object.is-extensible",
  93630. "es.object.is-frozen",
  93631. "es.object.is-sealed",
  93632. "es.object.keys",
  93633. "es.object.lookup-getter",
  93634. "es.object.lookup-setter",
  93635. "es.object.prevent-extensions",
  93636. "es.object.seal",
  93637. "es.object.set-prototype-of",
  93638. "es.object.to-string",
  93639. "es.object.values",
  93640. "es.parse-float",
  93641. "es.parse-int",
  93642. "es.promise",
  93643. "es.promise.all-settled",
  93644. "es.promise.any",
  93645. "es.promise.finally",
  93646. "es.reflect.apply",
  93647. "es.reflect.construct",
  93648. "es.reflect.define-property",
  93649. "es.reflect.delete-property",
  93650. "es.reflect.get",
  93651. "es.reflect.get-own-property-descriptor",
  93652. "es.reflect.get-prototype-of",
  93653. "es.reflect.has",
  93654. "es.reflect.is-extensible",
  93655. "es.reflect.own-keys",
  93656. "es.reflect.prevent-extensions",
  93657. "es.reflect.set",
  93658. "es.reflect.set-prototype-of",
  93659. "es.reflect.to-string-tag",
  93660. "es.regexp.constructor",
  93661. "es.regexp.dot-all",
  93662. "es.regexp.exec",
  93663. "es.regexp.flags",
  93664. "es.regexp.sticky",
  93665. "es.regexp.test",
  93666. "es.regexp.to-string",
  93667. "es.set",
  93668. "es.string.code-point-at",
  93669. "es.string.ends-with",
  93670. "es.string.from-code-point",
  93671. "es.string.includes",
  93672. "es.string.iterator",
  93673. "es.string.match",
  93674. "es.string.match-all",
  93675. "es.string.pad-end",
  93676. "es.string.pad-start",
  93677. "es.string.raw",
  93678. "es.string.repeat",
  93679. "es.string.replace",
  93680. "es.string.replace-all",
  93681. "es.string.search",
  93682. "es.string.split",
  93683. "es.string.starts-with",
  93684. "es.string.substr",
  93685. "es.string.trim",
  93686. "es.string.trim-end",
  93687. "es.string.trim-start",
  93688. "es.string.anchor",
  93689. "es.string.big",
  93690. "es.string.blink",
  93691. "es.string.bold",
  93692. "es.string.fixed",
  93693. "es.string.fontcolor",
  93694. "es.string.fontsize",
  93695. "es.string.italics",
  93696. "es.string.link",
  93697. "es.string.small",
  93698. "es.string.strike",
  93699. "es.string.sub",
  93700. "es.string.sup",
  93701. "es.typed-array.float32-array",
  93702. "es.typed-array.float64-array",
  93703. "es.typed-array.int8-array",
  93704. "es.typed-array.int16-array",
  93705. "es.typed-array.int32-array",
  93706. "es.typed-array.uint8-array",
  93707. "es.typed-array.uint8-clamped-array",
  93708. "es.typed-array.uint16-array",
  93709. "es.typed-array.uint32-array",
  93710. "es.typed-array.copy-within",
  93711. "es.typed-array.every",
  93712. "es.typed-array.fill",
  93713. "es.typed-array.filter",
  93714. "es.typed-array.find",
  93715. "es.typed-array.find-index",
  93716. "es.typed-array.for-each",
  93717. "es.typed-array.from",
  93718. "es.typed-array.includes",
  93719. "es.typed-array.index-of",
  93720. "es.typed-array.iterator",
  93721. "es.typed-array.join",
  93722. "es.typed-array.last-index-of",
  93723. "es.typed-array.map",
  93724. "es.typed-array.of",
  93725. "es.typed-array.reduce",
  93726. "es.typed-array.reduce-right",
  93727. "es.typed-array.reverse",
  93728. "es.typed-array.set",
  93729. "es.typed-array.slice",
  93730. "es.typed-array.some",
  93731. "es.typed-array.sort",
  93732. "es.typed-array.subarray",
  93733. "es.typed-array.to-locale-string",
  93734. "es.typed-array.to-string",
  93735. "es.unescape",
  93736. "es.weak-map",
  93737. "es.weak-set",
  93738. "web.dom-collections.for-each",
  93739. "web.dom-collections.iterator",
  93740. "web.immediate",
  93741. "web.queue-microtask",
  93742. "web.timers",
  93743. "web.url",
  93744. "web.url.to-json",
  93745. "web.url-search-params"
  93746. ],
  93747. "core-js/stable/aggregate-error": [
  93748. "es.aggregate-error",
  93749. "es.string.iterator",
  93750. "esnext.aggregate-error",
  93751. "web.dom-collections.iterator"
  93752. ],
  93753. "core-js/stable/array": [
  93754. "es.array.concat",
  93755. "es.array.copy-within",
  93756. "es.array.every",
  93757. "es.array.fill",
  93758. "es.array.filter",
  93759. "es.array.find",
  93760. "es.array.find-index",
  93761. "es.array.flat",
  93762. "es.array.flat-map",
  93763. "es.array.for-each",
  93764. "es.array.from",
  93765. "es.array.includes",
  93766. "es.array.index-of",
  93767. "es.array.is-array",
  93768. "es.array.iterator",
  93769. "es.array.join",
  93770. "es.array.last-index-of",
  93771. "es.array.map",
  93772. "es.array.of",
  93773. "es.array.reduce",
  93774. "es.array.reduce-right",
  93775. "es.array.reverse",
  93776. "es.array.slice",
  93777. "es.array.some",
  93778. "es.array.sort",
  93779. "es.array.species",
  93780. "es.array.splice",
  93781. "es.array.unscopables.flat",
  93782. "es.array.unscopables.flat-map",
  93783. "es.string.iterator"
  93784. ],
  93785. "core-js/stable/array-buffer": [
  93786. "es.array-buffer.constructor",
  93787. "es.array-buffer.is-view",
  93788. "es.array-buffer.slice",
  93789. "es.object.to-string"
  93790. ],
  93791. "core-js/stable/array-buffer/constructor": [
  93792. "es.array-buffer.constructor",
  93793. "es.object.to-string"
  93794. ],
  93795. "core-js/stable/array-buffer/is-view": [
  93796. "es.array-buffer.is-view"
  93797. ],
  93798. "core-js/stable/array-buffer/slice": [
  93799. "es.array-buffer.slice"
  93800. ],
  93801. "core-js/stable/array/concat": [
  93802. "es.array.concat"
  93803. ],
  93804. "core-js/stable/array/copy-within": [
  93805. "es.array.copy-within"
  93806. ],
  93807. "core-js/stable/array/entries": [
  93808. "es.array.iterator"
  93809. ],
  93810. "core-js/stable/array/every": [
  93811. "es.array.every"
  93812. ],
  93813. "core-js/stable/array/fill": [
  93814. "es.array.fill"
  93815. ],
  93816. "core-js/stable/array/filter": [
  93817. "es.array.filter"
  93818. ],
  93819. "core-js/stable/array/find": [
  93820. "es.array.find"
  93821. ],
  93822. "core-js/stable/array/find-index": [
  93823. "es.array.find-index"
  93824. ],
  93825. "core-js/stable/array/flat": [
  93826. "es.array.flat",
  93827. "es.array.unscopables.flat"
  93828. ],
  93829. "core-js/stable/array/flat-map": [
  93830. "es.array.flat-map",
  93831. "es.array.unscopables.flat-map"
  93832. ],
  93833. "core-js/stable/array/for-each": [
  93834. "es.array.for-each"
  93835. ],
  93836. "core-js/stable/array/from": [
  93837. "es.array.from",
  93838. "es.string.iterator"
  93839. ],
  93840. "core-js/stable/array/includes": [
  93841. "es.array.includes"
  93842. ],
  93843. "core-js/stable/array/index-of": [
  93844. "es.array.index-of"
  93845. ],
  93846. "core-js/stable/array/is-array": [
  93847. "es.array.is-array"
  93848. ],
  93849. "core-js/stable/array/iterator": [
  93850. "es.array.iterator"
  93851. ],
  93852. "core-js/stable/array/join": [
  93853. "es.array.join"
  93854. ],
  93855. "core-js/stable/array/keys": [
  93856. "es.array.iterator"
  93857. ],
  93858. "core-js/stable/array/last-index-of": [
  93859. "es.array.last-index-of"
  93860. ],
  93861. "core-js/stable/array/map": [
  93862. "es.array.map"
  93863. ],
  93864. "core-js/stable/array/of": [
  93865. "es.array.of"
  93866. ],
  93867. "core-js/stable/array/reduce": [
  93868. "es.array.reduce"
  93869. ],
  93870. "core-js/stable/array/reduce-right": [
  93871. "es.array.reduce-right"
  93872. ],
  93873. "core-js/stable/array/reverse": [
  93874. "es.array.reverse"
  93875. ],
  93876. "core-js/stable/array/slice": [
  93877. "es.array.slice"
  93878. ],
  93879. "core-js/stable/array/some": [
  93880. "es.array.some"
  93881. ],
  93882. "core-js/stable/array/sort": [
  93883. "es.array.sort"
  93884. ],
  93885. "core-js/stable/array/splice": [
  93886. "es.array.splice"
  93887. ],
  93888. "core-js/stable/array/values": [
  93889. "es.array.iterator"
  93890. ],
  93891. "core-js/stable/array/virtual": [
  93892. "es.array.concat",
  93893. "es.array.copy-within",
  93894. "es.array.every",
  93895. "es.array.fill",
  93896. "es.array.filter",
  93897. "es.array.find",
  93898. "es.array.find-index",
  93899. "es.array.flat",
  93900. "es.array.flat-map",
  93901. "es.array.for-each",
  93902. "es.array.includes",
  93903. "es.array.index-of",
  93904. "es.array.iterator",
  93905. "es.array.join",
  93906. "es.array.last-index-of",
  93907. "es.array.map",
  93908. "es.array.reduce",
  93909. "es.array.reduce-right",
  93910. "es.array.reverse",
  93911. "es.array.slice",
  93912. "es.array.some",
  93913. "es.array.sort",
  93914. "es.array.species",
  93915. "es.array.splice",
  93916. "es.array.unscopables.flat",
  93917. "es.array.unscopables.flat-map"
  93918. ],
  93919. "core-js/stable/array/virtual/concat": [
  93920. "es.array.concat"
  93921. ],
  93922. "core-js/stable/array/virtual/copy-within": [
  93923. "es.array.copy-within"
  93924. ],
  93925. "core-js/stable/array/virtual/entries": [
  93926. "es.array.iterator"
  93927. ],
  93928. "core-js/stable/array/virtual/every": [
  93929. "es.array.every"
  93930. ],
  93931. "core-js/stable/array/virtual/fill": [
  93932. "es.array.fill"
  93933. ],
  93934. "core-js/stable/array/virtual/filter": [
  93935. "es.array.filter"
  93936. ],
  93937. "core-js/stable/array/virtual/find": [
  93938. "es.array.find"
  93939. ],
  93940. "core-js/stable/array/virtual/find-index": [
  93941. "es.array.find-index"
  93942. ],
  93943. "core-js/stable/array/virtual/flat": [
  93944. "es.array.flat",
  93945. "es.array.unscopables.flat"
  93946. ],
  93947. "core-js/stable/array/virtual/flat-map": [
  93948. "es.array.flat-map",
  93949. "es.array.unscopables.flat-map"
  93950. ],
  93951. "core-js/stable/array/virtual/for-each": [
  93952. "es.array.for-each"
  93953. ],
  93954. "core-js/stable/array/virtual/includes": [
  93955. "es.array.includes"
  93956. ],
  93957. "core-js/stable/array/virtual/index-of": [
  93958. "es.array.index-of"
  93959. ],
  93960. "core-js/stable/array/virtual/iterator": [
  93961. "es.array.iterator"
  93962. ],
  93963. "core-js/stable/array/virtual/join": [
  93964. "es.array.join"
  93965. ],
  93966. "core-js/stable/array/virtual/keys": [
  93967. "es.array.iterator"
  93968. ],
  93969. "core-js/stable/array/virtual/last-index-of": [
  93970. "es.array.last-index-of"
  93971. ],
  93972. "core-js/stable/array/virtual/map": [
  93973. "es.array.map"
  93974. ],
  93975. "core-js/stable/array/virtual/reduce": [
  93976. "es.array.reduce"
  93977. ],
  93978. "core-js/stable/array/virtual/reduce-right": [
  93979. "es.array.reduce-right"
  93980. ],
  93981. "core-js/stable/array/virtual/reverse": [
  93982. "es.array.reverse"
  93983. ],
  93984. "core-js/stable/array/virtual/slice": [
  93985. "es.array.slice"
  93986. ],
  93987. "core-js/stable/array/virtual/some": [
  93988. "es.array.some"
  93989. ],
  93990. "core-js/stable/array/virtual/sort": [
  93991. "es.array.sort"
  93992. ],
  93993. "core-js/stable/array/virtual/splice": [
  93994. "es.array.splice"
  93995. ],
  93996. "core-js/stable/array/virtual/values": [
  93997. "es.array.iterator"
  93998. ],
  93999. "core-js/stable/clear-immediate": [
  94000. "web.immediate"
  94001. ],
  94002. "core-js/stable/data-view": [
  94003. "es.data-view",
  94004. "es.object.to-string"
  94005. ],
  94006. "core-js/stable/date": [
  94007. "es.date.get-year",
  94008. "es.date.now",
  94009. "es.date.set-year",
  94010. "es.date.to-gmt-string",
  94011. "es.date.to-iso-string",
  94012. "es.date.to-json",
  94013. "es.date.to-primitive",
  94014. "es.date.to-string"
  94015. ],
  94016. "core-js/stable/date/get-year": [
  94017. "es.date.get-year"
  94018. ],
  94019. "core-js/stable/date/now": [
  94020. "es.date.now"
  94021. ],
  94022. "core-js/stable/date/set-year": [
  94023. "es.date.set-year"
  94024. ],
  94025. "core-js/stable/date/to-gmt-string": [
  94026. "es.date.to-gmt-string"
  94027. ],
  94028. "core-js/stable/date/to-iso-string": [
  94029. "es.date.to-iso-string",
  94030. "es.date.to-json"
  94031. ],
  94032. "core-js/stable/date/to-json": [
  94033. "es.date.to-json"
  94034. ],
  94035. "core-js/stable/date/to-primitive": [
  94036. "es.date.to-primitive"
  94037. ],
  94038. "core-js/stable/date/to-string": [
  94039. "es.date.to-string"
  94040. ],
  94041. "core-js/stable/dom-collections": [
  94042. "es.array.iterator",
  94043. "web.dom-collections.for-each",
  94044. "web.dom-collections.iterator"
  94045. ],
  94046. "core-js/stable/dom-collections/for-each": [
  94047. "web.dom-collections.for-each"
  94048. ],
  94049. "core-js/stable/dom-collections/iterator": [
  94050. "web.dom-collections.iterator"
  94051. ],
  94052. "core-js/stable/escape": [
  94053. "es.escape"
  94054. ],
  94055. "core-js/stable/function": [
  94056. "es.function.bind",
  94057. "es.function.has-instance",
  94058. "es.function.name"
  94059. ],
  94060. "core-js/stable/function/bind": [
  94061. "es.function.bind"
  94062. ],
  94063. "core-js/stable/function/has-instance": [
  94064. "es.function.has-instance"
  94065. ],
  94066. "core-js/stable/function/name": [
  94067. "es.function.name"
  94068. ],
  94069. "core-js/stable/function/virtual": [
  94070. "es.function.bind"
  94071. ],
  94072. "core-js/stable/function/virtual/bind": [
  94073. "es.function.bind"
  94074. ],
  94075. "core-js/stable/global-this": [
  94076. "es.global-this"
  94077. ],
  94078. "core-js/stable/instance/bind": [
  94079. "es.function.bind"
  94080. ],
  94081. "core-js/stable/instance/code-point-at": [
  94082. "es.string.code-point-at"
  94083. ],
  94084. "core-js/stable/instance/concat": [
  94085. "es.array.concat"
  94086. ],
  94087. "core-js/stable/instance/copy-within": [
  94088. "es.array.copy-within"
  94089. ],
  94090. "core-js/stable/instance/ends-with": [
  94091. "es.string.ends-with"
  94092. ],
  94093. "core-js/stable/instance/entries": [
  94094. "es.array.iterator",
  94095. "web.dom-collections.iterator"
  94096. ],
  94097. "core-js/stable/instance/every": [
  94098. "es.array.every"
  94099. ],
  94100. "core-js/stable/instance/fill": [
  94101. "es.array.fill"
  94102. ],
  94103. "core-js/stable/instance/filter": [
  94104. "es.array.filter"
  94105. ],
  94106. "core-js/stable/instance/find": [
  94107. "es.array.find"
  94108. ],
  94109. "core-js/stable/instance/find-index": [
  94110. "es.array.find-index"
  94111. ],
  94112. "core-js/stable/instance/flags": [
  94113. "es.regexp.flags"
  94114. ],
  94115. "core-js/stable/instance/flat": [
  94116. "es.array.flat",
  94117. "es.array.unscopables.flat"
  94118. ],
  94119. "core-js/stable/instance/flat-map": [
  94120. "es.array.flat-map",
  94121. "es.array.unscopables.flat-map"
  94122. ],
  94123. "core-js/stable/instance/for-each": [
  94124. "es.array.for-each",
  94125. "web.dom-collections.iterator"
  94126. ],
  94127. "core-js/stable/instance/includes": [
  94128. "es.array.includes",
  94129. "es.string.includes"
  94130. ],
  94131. "core-js/stable/instance/index-of": [
  94132. "es.array.index-of"
  94133. ],
  94134. "core-js/stable/instance/keys": [
  94135. "es.array.iterator",
  94136. "web.dom-collections.iterator"
  94137. ],
  94138. "core-js/stable/instance/last-index-of": [
  94139. "es.array.last-index-of"
  94140. ],
  94141. "core-js/stable/instance/map": [
  94142. "es.array.map"
  94143. ],
  94144. "core-js/stable/instance/match-all": [
  94145. "es.string.match-all"
  94146. ],
  94147. "core-js/stable/instance/pad-end": [
  94148. "es.string.pad-end"
  94149. ],
  94150. "core-js/stable/instance/pad-start": [
  94151. "es.string.pad-start"
  94152. ],
  94153. "core-js/stable/instance/reduce": [
  94154. "es.array.reduce"
  94155. ],
  94156. "core-js/stable/instance/reduce-right": [
  94157. "es.array.reduce-right"
  94158. ],
  94159. "core-js/stable/instance/repeat": [
  94160. "es.string.repeat"
  94161. ],
  94162. "core-js/stable/instance/replace-all": [
  94163. "es.string.replace-all"
  94164. ],
  94165. "core-js/stable/instance/reverse": [
  94166. "es.array.reverse"
  94167. ],
  94168. "core-js/stable/instance/slice": [
  94169. "es.array.slice"
  94170. ],
  94171. "core-js/stable/instance/some": [
  94172. "es.array.some"
  94173. ],
  94174. "core-js/stable/instance/sort": [
  94175. "es.array.sort"
  94176. ],
  94177. "core-js/stable/instance/splice": [
  94178. "es.array.splice"
  94179. ],
  94180. "core-js/stable/instance/starts-with": [
  94181. "es.string.starts-with"
  94182. ],
  94183. "core-js/stable/instance/trim": [
  94184. "es.string.trim"
  94185. ],
  94186. "core-js/stable/instance/trim-end": [
  94187. "es.string.trim-end"
  94188. ],
  94189. "core-js/stable/instance/trim-left": [
  94190. "es.string.trim-start"
  94191. ],
  94192. "core-js/stable/instance/trim-right": [
  94193. "es.string.trim-end"
  94194. ],
  94195. "core-js/stable/instance/trim-start": [
  94196. "es.string.trim-start"
  94197. ],
  94198. "core-js/stable/instance/values": [
  94199. "es.array.iterator",
  94200. "web.dom-collections.iterator"
  94201. ],
  94202. "core-js/stable/json": [
  94203. "es.json.stringify",
  94204. "es.json.to-string-tag"
  94205. ],
  94206. "core-js/stable/json/stringify": [
  94207. "es.json.stringify"
  94208. ],
  94209. "core-js/stable/json/to-string-tag": [
  94210. "es.json.to-string-tag"
  94211. ],
  94212. "core-js/stable/map": [
  94213. "es.map",
  94214. "es.object.to-string",
  94215. "es.string.iterator",
  94216. "web.dom-collections.iterator"
  94217. ],
  94218. "core-js/stable/math": [
  94219. "es.math.acosh",
  94220. "es.math.asinh",
  94221. "es.math.atanh",
  94222. "es.math.cbrt",
  94223. "es.math.clz32",
  94224. "es.math.cosh",
  94225. "es.math.expm1",
  94226. "es.math.fround",
  94227. "es.math.hypot",
  94228. "es.math.imul",
  94229. "es.math.log10",
  94230. "es.math.log1p",
  94231. "es.math.log2",
  94232. "es.math.sign",
  94233. "es.math.sinh",
  94234. "es.math.tanh",
  94235. "es.math.to-string-tag",
  94236. "es.math.trunc"
  94237. ],
  94238. "core-js/stable/math/acosh": [
  94239. "es.math.acosh"
  94240. ],
  94241. "core-js/stable/math/asinh": [
  94242. "es.math.asinh"
  94243. ],
  94244. "core-js/stable/math/atanh": [
  94245. "es.math.atanh"
  94246. ],
  94247. "core-js/stable/math/cbrt": [
  94248. "es.math.cbrt"
  94249. ],
  94250. "core-js/stable/math/clz32": [
  94251. "es.math.clz32"
  94252. ],
  94253. "core-js/stable/math/cosh": [
  94254. "es.math.cosh"
  94255. ],
  94256. "core-js/stable/math/expm1": [
  94257. "es.math.expm1"
  94258. ],
  94259. "core-js/stable/math/fround": [
  94260. "es.math.fround"
  94261. ],
  94262. "core-js/stable/math/hypot": [
  94263. "es.math.hypot"
  94264. ],
  94265. "core-js/stable/math/imul": [
  94266. "es.math.imul"
  94267. ],
  94268. "core-js/stable/math/log10": [
  94269. "es.math.log10"
  94270. ],
  94271. "core-js/stable/math/log1p": [
  94272. "es.math.log1p"
  94273. ],
  94274. "core-js/stable/math/log2": [
  94275. "es.math.log2"
  94276. ],
  94277. "core-js/stable/math/sign": [
  94278. "es.math.sign"
  94279. ],
  94280. "core-js/stable/math/sinh": [
  94281. "es.math.sinh"
  94282. ],
  94283. "core-js/stable/math/tanh": [
  94284. "es.math.tanh"
  94285. ],
  94286. "core-js/stable/math/to-string-tag": [
  94287. "es.math.to-string-tag"
  94288. ],
  94289. "core-js/stable/math/trunc": [
  94290. "es.math.trunc"
  94291. ],
  94292. "core-js/stable/number": [
  94293. "es.number.constructor",
  94294. "es.number.epsilon",
  94295. "es.number.is-finite",
  94296. "es.number.is-integer",
  94297. "es.number.is-nan",
  94298. "es.number.is-safe-integer",
  94299. "es.number.max-safe-integer",
  94300. "es.number.min-safe-integer",
  94301. "es.number.parse-float",
  94302. "es.number.parse-int",
  94303. "es.number.to-fixed",
  94304. "es.number.to-precision"
  94305. ],
  94306. "core-js/stable/number/constructor": [
  94307. "es.number.constructor"
  94308. ],
  94309. "core-js/stable/number/epsilon": [
  94310. "es.number.epsilon"
  94311. ],
  94312. "core-js/stable/number/is-finite": [
  94313. "es.number.is-finite"
  94314. ],
  94315. "core-js/stable/number/is-integer": [
  94316. "es.number.is-integer"
  94317. ],
  94318. "core-js/stable/number/is-nan": [
  94319. "es.number.is-nan"
  94320. ],
  94321. "core-js/stable/number/is-safe-integer": [
  94322. "es.number.is-safe-integer"
  94323. ],
  94324. "core-js/stable/number/max-safe-integer": [
  94325. "es.number.max-safe-integer"
  94326. ],
  94327. "core-js/stable/number/min-safe-integer": [
  94328. "es.number.min-safe-integer"
  94329. ],
  94330. "core-js/stable/number/parse-float": [
  94331. "es.number.parse-float"
  94332. ],
  94333. "core-js/stable/number/parse-int": [
  94334. "es.number.parse-int"
  94335. ],
  94336. "core-js/stable/number/to-fixed": [
  94337. "es.number.to-fixed"
  94338. ],
  94339. "core-js/stable/number/to-precision": [
  94340. "es.number.to-precision"
  94341. ],
  94342. "core-js/stable/number/virtual": [
  94343. "es.number.to-fixed",
  94344. "es.number.to-precision"
  94345. ],
  94346. "core-js/stable/number/virtual/to-fixed": [
  94347. "es.number.to-fixed"
  94348. ],
  94349. "core-js/stable/number/virtual/to-precision": [
  94350. "es.number.to-precision"
  94351. ],
  94352. "core-js/stable/object": [
  94353. "es.symbol",
  94354. "es.json.to-string-tag",
  94355. "es.math.to-string-tag",
  94356. "es.object.assign",
  94357. "es.object.create",
  94358. "es.object.define-getter",
  94359. "es.object.define-properties",
  94360. "es.object.define-property",
  94361. "es.object.define-setter",
  94362. "es.object.entries",
  94363. "es.object.freeze",
  94364. "es.object.from-entries",
  94365. "es.object.get-own-property-descriptor",
  94366. "es.object.get-own-property-descriptors",
  94367. "es.object.get-own-property-names",
  94368. "es.object.get-prototype-of",
  94369. "es.object.is",
  94370. "es.object.is-extensible",
  94371. "es.object.is-frozen",
  94372. "es.object.is-sealed",
  94373. "es.object.keys",
  94374. "es.object.lookup-getter",
  94375. "es.object.lookup-setter",
  94376. "es.object.prevent-extensions",
  94377. "es.object.seal",
  94378. "es.object.set-prototype-of",
  94379. "es.object.to-string",
  94380. "es.object.values",
  94381. "es.reflect.to-string-tag"
  94382. ],
  94383. "core-js/stable/object/assign": [
  94384. "es.object.assign"
  94385. ],
  94386. "core-js/stable/object/create": [
  94387. "es.object.create"
  94388. ],
  94389. "core-js/stable/object/define-getter": [
  94390. "es.object.define-getter"
  94391. ],
  94392. "core-js/stable/object/define-properties": [
  94393. "es.object.define-properties"
  94394. ],
  94395. "core-js/stable/object/define-property": [
  94396. "es.object.define-property"
  94397. ],
  94398. "core-js/stable/object/define-setter": [
  94399. "es.object.define-setter"
  94400. ],
  94401. "core-js/stable/object/entries": [
  94402. "es.object.entries"
  94403. ],
  94404. "core-js/stable/object/freeze": [
  94405. "es.object.freeze"
  94406. ],
  94407. "core-js/stable/object/from-entries": [
  94408. "es.array.iterator",
  94409. "es.object.from-entries"
  94410. ],
  94411. "core-js/stable/object/get-own-property-descriptor": [
  94412. "es.object.get-own-property-descriptor"
  94413. ],
  94414. "core-js/stable/object/get-own-property-descriptors": [
  94415. "es.object.get-own-property-descriptors"
  94416. ],
  94417. "core-js/stable/object/get-own-property-names": [
  94418. "es.object.get-own-property-names"
  94419. ],
  94420. "core-js/stable/object/get-own-property-symbols": [
  94421. "es.symbol"
  94422. ],
  94423. "core-js/stable/object/get-prototype-of": [
  94424. "es.object.get-prototype-of"
  94425. ],
  94426. "core-js/stable/object/is": [
  94427. "es.object.is"
  94428. ],
  94429. "core-js/stable/object/is-extensible": [
  94430. "es.object.is-extensible"
  94431. ],
  94432. "core-js/stable/object/is-frozen": [
  94433. "es.object.is-frozen"
  94434. ],
  94435. "core-js/stable/object/is-sealed": [
  94436. "es.object.is-sealed"
  94437. ],
  94438. "core-js/stable/object/keys": [
  94439. "es.object.keys"
  94440. ],
  94441. "core-js/stable/object/lookup-getter": [
  94442. "es.object.lookup-setter"
  94443. ],
  94444. "core-js/stable/object/lookup-setter": [
  94445. "es.object.lookup-setter"
  94446. ],
  94447. "core-js/stable/object/prevent-extensions": [
  94448. "es.object.prevent-extensions"
  94449. ],
  94450. "core-js/stable/object/seal": [
  94451. "es.object.seal"
  94452. ],
  94453. "core-js/stable/object/set-prototype-of": [
  94454. "es.object.set-prototype-of"
  94455. ],
  94456. "core-js/stable/object/to-string": [
  94457. "es.json.to-string-tag",
  94458. "es.math.to-string-tag",
  94459. "es.object.to-string",
  94460. "es.reflect.to-string-tag"
  94461. ],
  94462. "core-js/stable/object/values": [
  94463. "es.object.values"
  94464. ],
  94465. "core-js/stable/parse-float": [
  94466. "es.parse-float"
  94467. ],
  94468. "core-js/stable/parse-int": [
  94469. "es.parse-int"
  94470. ],
  94471. "core-js/stable/promise": [
  94472. "es.aggregate-error",
  94473. "es.object.to-string",
  94474. "es.promise",
  94475. "es.promise.all-settled",
  94476. "es.promise.any",
  94477. "es.promise.finally",
  94478. "es.string.iterator",
  94479. "web.dom-collections.iterator"
  94480. ],
  94481. "core-js/stable/promise/all-settled": [
  94482. "es.promise",
  94483. "es.promise.all-settled",
  94484. "es.string.iterator",
  94485. "web.dom-collections.iterator"
  94486. ],
  94487. "core-js/stable/promise/any": [
  94488. "es.aggregate-error",
  94489. "es.promise",
  94490. "es.promise.any",
  94491. "es.string.iterator",
  94492. "web.dom-collections.iterator"
  94493. ],
  94494. "core-js/stable/promise/finally": [
  94495. "es.promise",
  94496. "es.promise.finally"
  94497. ],
  94498. "core-js/stable/queue-microtask": [
  94499. "web.queue-microtask"
  94500. ],
  94501. "core-js/stable/reflect": [
  94502. "es.reflect.apply",
  94503. "es.reflect.construct",
  94504. "es.reflect.define-property",
  94505. "es.reflect.delete-property",
  94506. "es.reflect.get",
  94507. "es.reflect.get-own-property-descriptor",
  94508. "es.reflect.get-prototype-of",
  94509. "es.reflect.has",
  94510. "es.reflect.is-extensible",
  94511. "es.reflect.own-keys",
  94512. "es.reflect.prevent-extensions",
  94513. "es.reflect.set",
  94514. "es.reflect.set-prototype-of",
  94515. "es.reflect.to-string-tag"
  94516. ],
  94517. "core-js/stable/reflect/apply": [
  94518. "es.reflect.apply"
  94519. ],
  94520. "core-js/stable/reflect/construct": [
  94521. "es.reflect.construct"
  94522. ],
  94523. "core-js/stable/reflect/define-property": [
  94524. "es.reflect.define-property"
  94525. ],
  94526. "core-js/stable/reflect/delete-property": [
  94527. "es.reflect.delete-property"
  94528. ],
  94529. "core-js/stable/reflect/get": [
  94530. "es.reflect.get"
  94531. ],
  94532. "core-js/stable/reflect/get-own-property-descriptor": [
  94533. "es.reflect.get-own-property-descriptor"
  94534. ],
  94535. "core-js/stable/reflect/get-prototype-of": [
  94536. "es.reflect.get-prototype-of"
  94537. ],
  94538. "core-js/stable/reflect/has": [
  94539. "es.reflect.has"
  94540. ],
  94541. "core-js/stable/reflect/is-extensible": [
  94542. "es.reflect.is-extensible"
  94543. ],
  94544. "core-js/stable/reflect/own-keys": [
  94545. "es.reflect.own-keys"
  94546. ],
  94547. "core-js/stable/reflect/prevent-extensions": [
  94548. "es.reflect.prevent-extensions"
  94549. ],
  94550. "core-js/stable/reflect/set": [
  94551. "es.reflect.set"
  94552. ],
  94553. "core-js/stable/reflect/set-prototype-of": [
  94554. "es.reflect.set-prototype-of"
  94555. ],
  94556. "core-js/stable/reflect/to-string-tag": [
  94557. "es.reflect.to-string-tag"
  94558. ],
  94559. "core-js/stable/regexp": [
  94560. "es.regexp.constructor",
  94561. "es.regexp.dot-all",
  94562. "es.regexp.exec",
  94563. "es.regexp.flags",
  94564. "es.regexp.sticky",
  94565. "es.regexp.test",
  94566. "es.regexp.to-string",
  94567. "es.string.match",
  94568. "es.string.replace",
  94569. "es.string.search",
  94570. "es.string.split"
  94571. ],
  94572. "core-js/stable/regexp/constructor": [
  94573. "es.regexp.constructor"
  94574. ],
  94575. "core-js/stable/regexp/dot-all": [
  94576. "es.regexp.constructor",
  94577. "es.regexp.dot-all",
  94578. "es.regexp.exec"
  94579. ],
  94580. "core-js/stable/regexp/flags": [
  94581. "es.regexp.flags"
  94582. ],
  94583. "core-js/stable/regexp/match": [
  94584. "es.string.match"
  94585. ],
  94586. "core-js/stable/regexp/replace": [
  94587. "es.string.replace"
  94588. ],
  94589. "core-js/stable/regexp/search": [
  94590. "es.string.search"
  94591. ],
  94592. "core-js/stable/regexp/split": [
  94593. "es.string.split"
  94594. ],
  94595. "core-js/stable/regexp/sticky": [
  94596. "es.regexp.constructor",
  94597. "es.regexp.exec",
  94598. "es.regexp.sticky"
  94599. ],
  94600. "core-js/stable/regexp/test": [
  94601. "es.regexp.exec",
  94602. "es.regexp.test"
  94603. ],
  94604. "core-js/stable/regexp/to-string": [
  94605. "es.regexp.to-string"
  94606. ],
  94607. "core-js/stable/set": [
  94608. "es.object.to-string",
  94609. "es.set",
  94610. "es.string.iterator",
  94611. "web.dom-collections.iterator"
  94612. ],
  94613. "core-js/stable/set-immediate": [
  94614. "web.immediate"
  94615. ],
  94616. "core-js/stable/set-interval": [
  94617. "web.timers"
  94618. ],
  94619. "core-js/stable/set-timeout": [
  94620. "web.timers"
  94621. ],
  94622. "core-js/stable/string": [
  94623. "es.regexp.exec",
  94624. "es.string.code-point-at",
  94625. "es.string.ends-with",
  94626. "es.string.from-code-point",
  94627. "es.string.includes",
  94628. "es.string.iterator",
  94629. "es.string.match",
  94630. "es.string.match-all",
  94631. "es.string.pad-end",
  94632. "es.string.pad-start",
  94633. "es.string.raw",
  94634. "es.string.repeat",
  94635. "es.string.replace",
  94636. "es.string.replace-all",
  94637. "es.string.search",
  94638. "es.string.split",
  94639. "es.string.starts-with",
  94640. "es.string.substr",
  94641. "es.string.trim",
  94642. "es.string.trim-end",
  94643. "es.string.trim-start",
  94644. "es.string.anchor",
  94645. "es.string.big",
  94646. "es.string.blink",
  94647. "es.string.bold",
  94648. "es.string.fixed",
  94649. "es.string.fontcolor",
  94650. "es.string.fontsize",
  94651. "es.string.italics",
  94652. "es.string.link",
  94653. "es.string.small",
  94654. "es.string.strike",
  94655. "es.string.sub",
  94656. "es.string.sup"
  94657. ],
  94658. "core-js/stable/string/anchor": [
  94659. "es.string.anchor"
  94660. ],
  94661. "core-js/stable/string/big": [
  94662. "es.string.big"
  94663. ],
  94664. "core-js/stable/string/blink": [
  94665. "es.string.blink"
  94666. ],
  94667. "core-js/stable/string/bold": [
  94668. "es.string.bold"
  94669. ],
  94670. "core-js/stable/string/code-point-at": [
  94671. "es.string.code-point-at"
  94672. ],
  94673. "core-js/stable/string/ends-with": [
  94674. "es.string.ends-with"
  94675. ],
  94676. "core-js/stable/string/fixed": [
  94677. "es.string.fixed"
  94678. ],
  94679. "core-js/stable/string/fontcolor": [
  94680. "es.string.fontcolor"
  94681. ],
  94682. "core-js/stable/string/fontsize": [
  94683. "es.string.fontsize"
  94684. ],
  94685. "core-js/stable/string/from-code-point": [
  94686. "es.string.from-code-point"
  94687. ],
  94688. "core-js/stable/string/includes": [
  94689. "es.string.includes"
  94690. ],
  94691. "core-js/stable/string/italics": [
  94692. "es.string.italics"
  94693. ],
  94694. "core-js/stable/string/iterator": [
  94695. "es.string.iterator"
  94696. ],
  94697. "core-js/stable/string/link": [
  94698. "es.string.link"
  94699. ],
  94700. "core-js/stable/string/match": [
  94701. "es.regexp.exec",
  94702. "es.string.match"
  94703. ],
  94704. "core-js/stable/string/match-all": [
  94705. "es.string.match-all"
  94706. ],
  94707. "core-js/stable/string/pad-end": [
  94708. "es.string.pad-end"
  94709. ],
  94710. "core-js/stable/string/pad-start": [
  94711. "es.string.pad-start"
  94712. ],
  94713. "core-js/stable/string/raw": [
  94714. "es.string.raw"
  94715. ],
  94716. "core-js/stable/string/repeat": [
  94717. "es.string.repeat"
  94718. ],
  94719. "core-js/stable/string/replace": [
  94720. "es.regexp.exec",
  94721. "es.string.replace"
  94722. ],
  94723. "core-js/stable/string/replace-all": [
  94724. "es.string.replace-all"
  94725. ],
  94726. "core-js/stable/string/search": [
  94727. "es.regexp.exec",
  94728. "es.string.search"
  94729. ],
  94730. "core-js/stable/string/small": [
  94731. "es.string.small"
  94732. ],
  94733. "core-js/stable/string/split": [
  94734. "es.regexp.exec",
  94735. "es.string.split"
  94736. ],
  94737. "core-js/stable/string/starts-with": [
  94738. "es.string.starts-with"
  94739. ],
  94740. "core-js/stable/string/strike": [
  94741. "es.string.strike"
  94742. ],
  94743. "core-js/stable/string/sub": [
  94744. "es.string.sub"
  94745. ],
  94746. "core-js/stable/string/substr": [
  94747. "es.string.substr"
  94748. ],
  94749. "core-js/stable/string/sup": [
  94750. "es.string.sup"
  94751. ],
  94752. "core-js/stable/string/trim": [
  94753. "es.string.trim"
  94754. ],
  94755. "core-js/stable/string/trim-end": [
  94756. "es.string.trim-end"
  94757. ],
  94758. "core-js/stable/string/trim-left": [
  94759. "es.string.trim-start"
  94760. ],
  94761. "core-js/stable/string/trim-right": [
  94762. "es.string.trim-end"
  94763. ],
  94764. "core-js/stable/string/trim-start": [
  94765. "es.string.trim-start"
  94766. ],
  94767. "core-js/stable/string/virtual": [
  94768. "es.string.code-point-at",
  94769. "es.string.ends-with",
  94770. "es.string.includes",
  94771. "es.string.iterator",
  94772. "es.string.match",
  94773. "es.string.match-all",
  94774. "es.string.pad-end",
  94775. "es.string.pad-start",
  94776. "es.string.repeat",
  94777. "es.string.replace",
  94778. "es.string.replace-all",
  94779. "es.string.search",
  94780. "es.string.split",
  94781. "es.string.starts-with",
  94782. "es.string.substr",
  94783. "es.string.trim",
  94784. "es.string.trim-end",
  94785. "es.string.trim-start",
  94786. "es.string.anchor",
  94787. "es.string.big",
  94788. "es.string.blink",
  94789. "es.string.bold",
  94790. "es.string.fixed",
  94791. "es.string.fontcolor",
  94792. "es.string.fontsize",
  94793. "es.string.italics",
  94794. "es.string.link",
  94795. "es.string.small",
  94796. "es.string.strike",
  94797. "es.string.sub",
  94798. "es.string.sup"
  94799. ],
  94800. "core-js/stable/string/virtual/anchor": [
  94801. "es.string.anchor"
  94802. ],
  94803. "core-js/stable/string/virtual/big": [
  94804. "es.string.big"
  94805. ],
  94806. "core-js/stable/string/virtual/blink": [
  94807. "es.string.blink"
  94808. ],
  94809. "core-js/stable/string/virtual/bold": [
  94810. "es.string.bold"
  94811. ],
  94812. "core-js/stable/string/virtual/code-point-at": [
  94813. "es.string.code-point-at"
  94814. ],
  94815. "core-js/stable/string/virtual/ends-with": [
  94816. "es.string.ends-with"
  94817. ],
  94818. "core-js/stable/string/virtual/fixed": [
  94819. "es.string.fixed"
  94820. ],
  94821. "core-js/stable/string/virtual/fontcolor": [
  94822. "es.string.fontcolor"
  94823. ],
  94824. "core-js/stable/string/virtual/fontsize": [
  94825. "es.string.fontsize"
  94826. ],
  94827. "core-js/stable/string/virtual/includes": [
  94828. "es.string.includes"
  94829. ],
  94830. "core-js/stable/string/virtual/italics": [
  94831. "es.string.italics"
  94832. ],
  94833. "core-js/stable/string/virtual/iterator": [
  94834. "es.string.iterator"
  94835. ],
  94836. "core-js/stable/string/virtual/link": [
  94837. "es.string.link"
  94838. ],
  94839. "core-js/stable/string/virtual/match-all": [
  94840. "es.string.match-all"
  94841. ],
  94842. "core-js/stable/string/virtual/pad-end": [
  94843. "es.string.pad-end"
  94844. ],
  94845. "core-js/stable/string/virtual/pad-start": [
  94846. "es.string.pad-start"
  94847. ],
  94848. "core-js/stable/string/virtual/repeat": [
  94849. "es.string.repeat"
  94850. ],
  94851. "core-js/stable/string/virtual/replace-all": [
  94852. "es.string.replace-all"
  94853. ],
  94854. "core-js/stable/string/virtual/small": [
  94855. "es.string.small"
  94856. ],
  94857. "core-js/stable/string/virtual/starts-with": [
  94858. "es.string.starts-with"
  94859. ],
  94860. "core-js/stable/string/virtual/strike": [
  94861. "es.string.strike"
  94862. ],
  94863. "core-js/stable/string/virtual/sub": [
  94864. "es.string.sub"
  94865. ],
  94866. "core-js/stable/string/virtual/substr": [
  94867. "es.string.substr"
  94868. ],
  94869. "core-js/stable/string/virtual/sup": [
  94870. "es.string.sup"
  94871. ],
  94872. "core-js/stable/string/virtual/trim": [
  94873. "es.string.trim"
  94874. ],
  94875. "core-js/stable/string/virtual/trim-end": [
  94876. "es.string.trim-end"
  94877. ],
  94878. "core-js/stable/string/virtual/trim-left": [
  94879. "es.string.trim-start"
  94880. ],
  94881. "core-js/stable/string/virtual/trim-right": [
  94882. "es.string.trim-end"
  94883. ],
  94884. "core-js/stable/string/virtual/trim-start": [
  94885. "es.string.trim-start"
  94886. ],
  94887. "core-js/stable/symbol": [
  94888. "es.symbol",
  94889. "es.symbol.description",
  94890. "es.symbol.async-iterator",
  94891. "es.symbol.has-instance",
  94892. "es.symbol.is-concat-spreadable",
  94893. "es.symbol.iterator",
  94894. "es.symbol.match",
  94895. "es.symbol.match-all",
  94896. "es.symbol.replace",
  94897. "es.symbol.search",
  94898. "es.symbol.species",
  94899. "es.symbol.split",
  94900. "es.symbol.to-primitive",
  94901. "es.symbol.to-string-tag",
  94902. "es.symbol.unscopables",
  94903. "es.array.concat",
  94904. "es.json.to-string-tag",
  94905. "es.math.to-string-tag",
  94906. "es.object.to-string",
  94907. "es.reflect.to-string-tag"
  94908. ],
  94909. "core-js/stable/symbol/async-iterator": [
  94910. "es.symbol.async-iterator"
  94911. ],
  94912. "core-js/stable/symbol/description": [
  94913. "es.symbol.description"
  94914. ],
  94915. "core-js/stable/symbol/for": [
  94916. "es.symbol"
  94917. ],
  94918. "core-js/stable/symbol/has-instance": [
  94919. "es.symbol.has-instance",
  94920. "es.function.has-instance"
  94921. ],
  94922. "core-js/stable/symbol/is-concat-spreadable": [
  94923. "es.symbol.is-concat-spreadable",
  94924. "es.array.concat"
  94925. ],
  94926. "core-js/stable/symbol/iterator": [
  94927. "es.symbol.iterator",
  94928. "es.string.iterator",
  94929. "web.dom-collections.iterator"
  94930. ],
  94931. "core-js/stable/symbol/key-for": [
  94932. "es.symbol"
  94933. ],
  94934. "core-js/stable/symbol/match": [
  94935. "es.symbol.match",
  94936. "es.string.match"
  94937. ],
  94938. "core-js/stable/symbol/match-all": [
  94939. "es.symbol.match-all",
  94940. "es.string.match-all"
  94941. ],
  94942. "core-js/stable/symbol/replace": [
  94943. "es.symbol.replace",
  94944. "es.string.replace"
  94945. ],
  94946. "core-js/stable/symbol/search": [
  94947. "es.symbol.search",
  94948. "es.string.search"
  94949. ],
  94950. "core-js/stable/symbol/species": [
  94951. "es.symbol.species"
  94952. ],
  94953. "core-js/stable/symbol/split": [
  94954. "es.symbol.split",
  94955. "es.string.split"
  94956. ],
  94957. "core-js/stable/symbol/to-primitive": [
  94958. "es.symbol.to-primitive"
  94959. ],
  94960. "core-js/stable/symbol/to-string-tag": [
  94961. "es.symbol.to-string-tag",
  94962. "es.json.to-string-tag",
  94963. "es.math.to-string-tag",
  94964. "es.object.to-string",
  94965. "es.reflect.to-string-tag"
  94966. ],
  94967. "core-js/stable/symbol/unscopables": [
  94968. "es.symbol.unscopables"
  94969. ],
  94970. "core-js/stable/typed-array": [
  94971. "es.object.to-string",
  94972. "es.typed-array.float32-array",
  94973. "es.typed-array.float64-array",
  94974. "es.typed-array.int8-array",
  94975. "es.typed-array.int16-array",
  94976. "es.typed-array.int32-array",
  94977. "es.typed-array.uint8-array",
  94978. "es.typed-array.uint8-clamped-array",
  94979. "es.typed-array.uint16-array",
  94980. "es.typed-array.uint32-array",
  94981. "es.typed-array.copy-within",
  94982. "es.typed-array.every",
  94983. "es.typed-array.fill",
  94984. "es.typed-array.filter",
  94985. "es.typed-array.find",
  94986. "es.typed-array.find-index",
  94987. "es.typed-array.for-each",
  94988. "es.typed-array.from",
  94989. "es.typed-array.includes",
  94990. "es.typed-array.index-of",
  94991. "es.typed-array.iterator",
  94992. "es.typed-array.join",
  94993. "es.typed-array.last-index-of",
  94994. "es.typed-array.map",
  94995. "es.typed-array.of",
  94996. "es.typed-array.reduce",
  94997. "es.typed-array.reduce-right",
  94998. "es.typed-array.reverse",
  94999. "es.typed-array.set",
  95000. "es.typed-array.slice",
  95001. "es.typed-array.some",
  95002. "es.typed-array.sort",
  95003. "es.typed-array.subarray",
  95004. "es.typed-array.to-locale-string",
  95005. "es.typed-array.to-string"
  95006. ],
  95007. "core-js/stable/typed-array/copy-within": [
  95008. "es.typed-array.copy-within"
  95009. ],
  95010. "core-js/stable/typed-array/entries": [
  95011. "es.typed-array.iterator"
  95012. ],
  95013. "core-js/stable/typed-array/every": [
  95014. "es.typed-array.every"
  95015. ],
  95016. "core-js/stable/typed-array/fill": [
  95017. "es.typed-array.fill"
  95018. ],
  95019. "core-js/stable/typed-array/filter": [
  95020. "es.typed-array.filter"
  95021. ],
  95022. "core-js/stable/typed-array/find": [
  95023. "es.typed-array.find"
  95024. ],
  95025. "core-js/stable/typed-array/find-index": [
  95026. "es.typed-array.find-index"
  95027. ],
  95028. "core-js/stable/typed-array/float32-array": [
  95029. "es.object.to-string",
  95030. "es.typed-array.float32-array",
  95031. "es.typed-array.copy-within",
  95032. "es.typed-array.every",
  95033. "es.typed-array.fill",
  95034. "es.typed-array.filter",
  95035. "es.typed-array.find",
  95036. "es.typed-array.find-index",
  95037. "es.typed-array.for-each",
  95038. "es.typed-array.from",
  95039. "es.typed-array.includes",
  95040. "es.typed-array.index-of",
  95041. "es.typed-array.iterator",
  95042. "es.typed-array.join",
  95043. "es.typed-array.last-index-of",
  95044. "es.typed-array.map",
  95045. "es.typed-array.of",
  95046. "es.typed-array.reduce",
  95047. "es.typed-array.reduce-right",
  95048. "es.typed-array.reverse",
  95049. "es.typed-array.set",
  95050. "es.typed-array.slice",
  95051. "es.typed-array.some",
  95052. "es.typed-array.sort",
  95053. "es.typed-array.subarray",
  95054. "es.typed-array.to-locale-string",
  95055. "es.typed-array.to-string"
  95056. ],
  95057. "core-js/stable/typed-array/float64-array": [
  95058. "es.object.to-string",
  95059. "es.typed-array.float64-array",
  95060. "es.typed-array.copy-within",
  95061. "es.typed-array.every",
  95062. "es.typed-array.fill",
  95063. "es.typed-array.filter",
  95064. "es.typed-array.find",
  95065. "es.typed-array.find-index",
  95066. "es.typed-array.for-each",
  95067. "es.typed-array.from",
  95068. "es.typed-array.includes",
  95069. "es.typed-array.index-of",
  95070. "es.typed-array.iterator",
  95071. "es.typed-array.join",
  95072. "es.typed-array.last-index-of",
  95073. "es.typed-array.map",
  95074. "es.typed-array.of",
  95075. "es.typed-array.reduce",
  95076. "es.typed-array.reduce-right",
  95077. "es.typed-array.reverse",
  95078. "es.typed-array.set",
  95079. "es.typed-array.slice",
  95080. "es.typed-array.some",
  95081. "es.typed-array.sort",
  95082. "es.typed-array.subarray",
  95083. "es.typed-array.to-locale-string",
  95084. "es.typed-array.to-string"
  95085. ],
  95086. "core-js/stable/typed-array/for-each": [
  95087. "es.typed-array.for-each"
  95088. ],
  95089. "core-js/stable/typed-array/from": [
  95090. "es.typed-array.from"
  95091. ],
  95092. "core-js/stable/typed-array/includes": [
  95093. "es.typed-array.includes"
  95094. ],
  95095. "core-js/stable/typed-array/index-of": [
  95096. "es.typed-array.index-of"
  95097. ],
  95098. "core-js/stable/typed-array/int16-array": [
  95099. "es.object.to-string",
  95100. "es.typed-array.int16-array",
  95101. "es.typed-array.copy-within",
  95102. "es.typed-array.every",
  95103. "es.typed-array.fill",
  95104. "es.typed-array.filter",
  95105. "es.typed-array.find",
  95106. "es.typed-array.find-index",
  95107. "es.typed-array.for-each",
  95108. "es.typed-array.from",
  95109. "es.typed-array.includes",
  95110. "es.typed-array.index-of",
  95111. "es.typed-array.iterator",
  95112. "es.typed-array.join",
  95113. "es.typed-array.last-index-of",
  95114. "es.typed-array.map",
  95115. "es.typed-array.of",
  95116. "es.typed-array.reduce",
  95117. "es.typed-array.reduce-right",
  95118. "es.typed-array.reverse",
  95119. "es.typed-array.set",
  95120. "es.typed-array.slice",
  95121. "es.typed-array.some",
  95122. "es.typed-array.sort",
  95123. "es.typed-array.subarray",
  95124. "es.typed-array.to-locale-string",
  95125. "es.typed-array.to-string"
  95126. ],
  95127. "core-js/stable/typed-array/int32-array": [
  95128. "es.object.to-string",
  95129. "es.typed-array.int32-array",
  95130. "es.typed-array.copy-within",
  95131. "es.typed-array.every",
  95132. "es.typed-array.fill",
  95133. "es.typed-array.filter",
  95134. "es.typed-array.find",
  95135. "es.typed-array.find-index",
  95136. "es.typed-array.for-each",
  95137. "es.typed-array.from",
  95138. "es.typed-array.includes",
  95139. "es.typed-array.index-of",
  95140. "es.typed-array.iterator",
  95141. "es.typed-array.join",
  95142. "es.typed-array.last-index-of",
  95143. "es.typed-array.map",
  95144. "es.typed-array.of",
  95145. "es.typed-array.reduce",
  95146. "es.typed-array.reduce-right",
  95147. "es.typed-array.reverse",
  95148. "es.typed-array.set",
  95149. "es.typed-array.slice",
  95150. "es.typed-array.some",
  95151. "es.typed-array.sort",
  95152. "es.typed-array.subarray",
  95153. "es.typed-array.to-locale-string",
  95154. "es.typed-array.to-string"
  95155. ],
  95156. "core-js/stable/typed-array/int8-array": [
  95157. "es.object.to-string",
  95158. "es.typed-array.int8-array",
  95159. "es.typed-array.copy-within",
  95160. "es.typed-array.every",
  95161. "es.typed-array.fill",
  95162. "es.typed-array.filter",
  95163. "es.typed-array.find",
  95164. "es.typed-array.find-index",
  95165. "es.typed-array.for-each",
  95166. "es.typed-array.from",
  95167. "es.typed-array.includes",
  95168. "es.typed-array.index-of",
  95169. "es.typed-array.iterator",
  95170. "es.typed-array.join",
  95171. "es.typed-array.last-index-of",
  95172. "es.typed-array.map",
  95173. "es.typed-array.of",
  95174. "es.typed-array.reduce",
  95175. "es.typed-array.reduce-right",
  95176. "es.typed-array.reverse",
  95177. "es.typed-array.set",
  95178. "es.typed-array.slice",
  95179. "es.typed-array.some",
  95180. "es.typed-array.sort",
  95181. "es.typed-array.subarray",
  95182. "es.typed-array.to-locale-string",
  95183. "es.typed-array.to-string"
  95184. ],
  95185. "core-js/stable/typed-array/iterator": [
  95186. "es.typed-array.iterator"
  95187. ],
  95188. "core-js/stable/typed-array/join": [
  95189. "es.typed-array.join"
  95190. ],
  95191. "core-js/stable/typed-array/keys": [
  95192. "es.typed-array.iterator"
  95193. ],
  95194. "core-js/stable/typed-array/last-index-of": [
  95195. "es.typed-array.last-index-of"
  95196. ],
  95197. "core-js/stable/typed-array/map": [
  95198. "es.typed-array.map"
  95199. ],
  95200. "core-js/stable/typed-array/of": [
  95201. "es.typed-array.of"
  95202. ],
  95203. "core-js/stable/typed-array/reduce": [
  95204. "es.typed-array.reduce"
  95205. ],
  95206. "core-js/stable/typed-array/reduce-right": [
  95207. "es.typed-array.reduce-right"
  95208. ],
  95209. "core-js/stable/typed-array/reverse": [
  95210. "es.typed-array.reverse"
  95211. ],
  95212. "core-js/stable/typed-array/set": [
  95213. "es.typed-array.set"
  95214. ],
  95215. "core-js/stable/typed-array/slice": [
  95216. "es.typed-array.slice"
  95217. ],
  95218. "core-js/stable/typed-array/some": [
  95219. "es.typed-array.some"
  95220. ],
  95221. "core-js/stable/typed-array/sort": [
  95222. "es.typed-array.sort"
  95223. ],
  95224. "core-js/stable/typed-array/subarray": [
  95225. "es.typed-array.subarray"
  95226. ],
  95227. "core-js/stable/typed-array/to-locale-string": [
  95228. "es.typed-array.to-locale-string"
  95229. ],
  95230. "core-js/stable/typed-array/to-string": [
  95231. "es.typed-array.to-string"
  95232. ],
  95233. "core-js/stable/typed-array/uint16-array": [
  95234. "es.object.to-string",
  95235. "es.typed-array.uint16-array",
  95236. "es.typed-array.copy-within",
  95237. "es.typed-array.every",
  95238. "es.typed-array.fill",
  95239. "es.typed-array.filter",
  95240. "es.typed-array.find",
  95241. "es.typed-array.find-index",
  95242. "es.typed-array.for-each",
  95243. "es.typed-array.from",
  95244. "es.typed-array.includes",
  95245. "es.typed-array.index-of",
  95246. "es.typed-array.iterator",
  95247. "es.typed-array.join",
  95248. "es.typed-array.last-index-of",
  95249. "es.typed-array.map",
  95250. "es.typed-array.of",
  95251. "es.typed-array.reduce",
  95252. "es.typed-array.reduce-right",
  95253. "es.typed-array.reverse",
  95254. "es.typed-array.set",
  95255. "es.typed-array.slice",
  95256. "es.typed-array.some",
  95257. "es.typed-array.sort",
  95258. "es.typed-array.subarray",
  95259. "es.typed-array.to-locale-string",
  95260. "es.typed-array.to-string"
  95261. ],
  95262. "core-js/stable/typed-array/uint32-array": [
  95263. "es.object.to-string",
  95264. "es.typed-array.uint32-array",
  95265. "es.typed-array.copy-within",
  95266. "es.typed-array.every",
  95267. "es.typed-array.fill",
  95268. "es.typed-array.filter",
  95269. "es.typed-array.find",
  95270. "es.typed-array.find-index",
  95271. "es.typed-array.for-each",
  95272. "es.typed-array.from",
  95273. "es.typed-array.includes",
  95274. "es.typed-array.index-of",
  95275. "es.typed-array.iterator",
  95276. "es.typed-array.join",
  95277. "es.typed-array.last-index-of",
  95278. "es.typed-array.map",
  95279. "es.typed-array.of",
  95280. "es.typed-array.reduce",
  95281. "es.typed-array.reduce-right",
  95282. "es.typed-array.reverse",
  95283. "es.typed-array.set",
  95284. "es.typed-array.slice",
  95285. "es.typed-array.some",
  95286. "es.typed-array.sort",
  95287. "es.typed-array.subarray",
  95288. "es.typed-array.to-locale-string",
  95289. "es.typed-array.to-string"
  95290. ],
  95291. "core-js/stable/typed-array/uint8-array": [
  95292. "es.object.to-string",
  95293. "es.typed-array.uint8-array",
  95294. "es.typed-array.copy-within",
  95295. "es.typed-array.every",
  95296. "es.typed-array.fill",
  95297. "es.typed-array.filter",
  95298. "es.typed-array.find",
  95299. "es.typed-array.find-index",
  95300. "es.typed-array.for-each",
  95301. "es.typed-array.from",
  95302. "es.typed-array.includes",
  95303. "es.typed-array.index-of",
  95304. "es.typed-array.iterator",
  95305. "es.typed-array.join",
  95306. "es.typed-array.last-index-of",
  95307. "es.typed-array.map",
  95308. "es.typed-array.of",
  95309. "es.typed-array.reduce",
  95310. "es.typed-array.reduce-right",
  95311. "es.typed-array.reverse",
  95312. "es.typed-array.set",
  95313. "es.typed-array.slice",
  95314. "es.typed-array.some",
  95315. "es.typed-array.sort",
  95316. "es.typed-array.subarray",
  95317. "es.typed-array.to-locale-string",
  95318. "es.typed-array.to-string"
  95319. ],
  95320. "core-js/stable/typed-array/uint8-clamped-array": [
  95321. "es.object.to-string",
  95322. "es.typed-array.uint8-clamped-array",
  95323. "es.typed-array.copy-within",
  95324. "es.typed-array.every",
  95325. "es.typed-array.fill",
  95326. "es.typed-array.filter",
  95327. "es.typed-array.find",
  95328. "es.typed-array.find-index",
  95329. "es.typed-array.for-each",
  95330. "es.typed-array.from",
  95331. "es.typed-array.includes",
  95332. "es.typed-array.index-of",
  95333. "es.typed-array.iterator",
  95334. "es.typed-array.join",
  95335. "es.typed-array.last-index-of",
  95336. "es.typed-array.map",
  95337. "es.typed-array.of",
  95338. "es.typed-array.reduce",
  95339. "es.typed-array.reduce-right",
  95340. "es.typed-array.reverse",
  95341. "es.typed-array.set",
  95342. "es.typed-array.slice",
  95343. "es.typed-array.some",
  95344. "es.typed-array.sort",
  95345. "es.typed-array.subarray",
  95346. "es.typed-array.to-locale-string",
  95347. "es.typed-array.to-string"
  95348. ],
  95349. "core-js/stable/typed-array/values": [
  95350. "es.typed-array.iterator"
  95351. ],
  95352. "core-js/stable/unescape": [
  95353. "es.unescape"
  95354. ],
  95355. "core-js/stable/url": [
  95356. "web.url",
  95357. "web.url.to-json",
  95358. "web.url-search-params"
  95359. ],
  95360. "core-js/stable/url-search-params": [
  95361. "web.url-search-params"
  95362. ],
  95363. "core-js/stable/url/to-json": [
  95364. "web.url.to-json"
  95365. ],
  95366. "core-js/stable/weak-map": [
  95367. "es.object.to-string",
  95368. "es.weak-map",
  95369. "web.dom-collections.iterator"
  95370. ],
  95371. "core-js/stable/weak-set": [
  95372. "es.object.to-string",
  95373. "es.weak-set",
  95374. "web.dom-collections.iterator"
  95375. ],
  95376. "core-js/stage": [
  95377. "es.map",
  95378. "esnext.aggregate-error",
  95379. "esnext.array.at",
  95380. "esnext.array.filter-out",
  95381. "esnext.array.find-last",
  95382. "esnext.array.find-last-index",
  95383. "esnext.array.is-template-object",
  95384. "esnext.array.last-index",
  95385. "esnext.array.last-item",
  95386. "esnext.array.unique-by",
  95387. "esnext.async-iterator.constructor",
  95388. "esnext.async-iterator.as-indexed-pairs",
  95389. "esnext.async-iterator.drop",
  95390. "esnext.async-iterator.every",
  95391. "esnext.async-iterator.filter",
  95392. "esnext.async-iterator.find",
  95393. "esnext.async-iterator.flat-map",
  95394. "esnext.async-iterator.for-each",
  95395. "esnext.async-iterator.from",
  95396. "esnext.async-iterator.map",
  95397. "esnext.async-iterator.reduce",
  95398. "esnext.async-iterator.some",
  95399. "esnext.async-iterator.take",
  95400. "esnext.async-iterator.to-array",
  95401. "esnext.bigint.range",
  95402. "esnext.composite-key",
  95403. "esnext.composite-symbol",
  95404. "esnext.global-this",
  95405. "esnext.iterator.constructor",
  95406. "esnext.iterator.as-indexed-pairs",
  95407. "esnext.iterator.drop",
  95408. "esnext.iterator.every",
  95409. "esnext.iterator.filter",
  95410. "esnext.iterator.find",
  95411. "esnext.iterator.flat-map",
  95412. "esnext.iterator.for-each",
  95413. "esnext.iterator.from",
  95414. "esnext.iterator.map",
  95415. "esnext.iterator.reduce",
  95416. "esnext.iterator.some",
  95417. "esnext.iterator.take",
  95418. "esnext.iterator.to-array",
  95419. "esnext.map.delete-all",
  95420. "esnext.map.emplace",
  95421. "esnext.map.every",
  95422. "esnext.map.filter",
  95423. "esnext.map.find",
  95424. "esnext.map.find-key",
  95425. "esnext.map.from",
  95426. "esnext.map.group-by",
  95427. "esnext.map.includes",
  95428. "esnext.map.key-by",
  95429. "esnext.map.key-of",
  95430. "esnext.map.map-keys",
  95431. "esnext.map.map-values",
  95432. "esnext.map.merge",
  95433. "esnext.map.of",
  95434. "esnext.map.reduce",
  95435. "esnext.map.some",
  95436. "esnext.map.update",
  95437. "esnext.map.update-or-insert",
  95438. "esnext.map.upsert",
  95439. "esnext.math.clamp",
  95440. "esnext.math.deg-per-rad",
  95441. "esnext.math.degrees",
  95442. "esnext.math.fscale",
  95443. "esnext.math.iaddh",
  95444. "esnext.math.imulh",
  95445. "esnext.math.isubh",
  95446. "esnext.math.rad-per-deg",
  95447. "esnext.math.radians",
  95448. "esnext.math.scale",
  95449. "esnext.math.seeded-prng",
  95450. "esnext.math.signbit",
  95451. "esnext.math.umulh",
  95452. "esnext.number.from-string",
  95453. "esnext.number.range",
  95454. "esnext.object.has-own",
  95455. "esnext.object.iterate-entries",
  95456. "esnext.object.iterate-keys",
  95457. "esnext.object.iterate-values",
  95458. "esnext.observable",
  95459. "esnext.promise.all-settled",
  95460. "esnext.promise.any",
  95461. "esnext.promise.try",
  95462. "esnext.reflect.define-metadata",
  95463. "esnext.reflect.delete-metadata",
  95464. "esnext.reflect.get-metadata",
  95465. "esnext.reflect.get-metadata-keys",
  95466. "esnext.reflect.get-own-metadata",
  95467. "esnext.reflect.get-own-metadata-keys",
  95468. "esnext.reflect.has-metadata",
  95469. "esnext.reflect.has-own-metadata",
  95470. "esnext.reflect.metadata",
  95471. "esnext.set.add-all",
  95472. "esnext.set.delete-all",
  95473. "esnext.set.difference",
  95474. "esnext.set.every",
  95475. "esnext.set.filter",
  95476. "esnext.set.find",
  95477. "esnext.set.from",
  95478. "esnext.set.intersection",
  95479. "esnext.set.is-disjoint-from",
  95480. "esnext.set.is-subset-of",
  95481. "esnext.set.is-superset-of",
  95482. "esnext.set.join",
  95483. "esnext.set.map",
  95484. "esnext.set.of",
  95485. "esnext.set.reduce",
  95486. "esnext.set.some",
  95487. "esnext.set.symmetric-difference",
  95488. "esnext.set.union",
  95489. "esnext.string.at",
  95490. "esnext.string.code-points",
  95491. "esnext.string.match-all",
  95492. "esnext.string.replace-all",
  95493. "esnext.symbol.async-dispose",
  95494. "esnext.symbol.dispose",
  95495. "esnext.symbol.matcher",
  95496. "esnext.symbol.metadata",
  95497. "esnext.symbol.observable",
  95498. "esnext.symbol.pattern-match",
  95499. "esnext.symbol.replace-all",
  95500. "esnext.typed-array.at",
  95501. "esnext.typed-array.filter-out",
  95502. "esnext.typed-array.find-last",
  95503. "esnext.typed-array.find-last-index",
  95504. "esnext.typed-array.unique-by",
  95505. "esnext.weak-map.delete-all",
  95506. "esnext.weak-map.from",
  95507. "esnext.weak-map.of",
  95508. "esnext.weak-map.emplace",
  95509. "esnext.weak-map.upsert",
  95510. "esnext.weak-set.add-all",
  95511. "esnext.weak-set.delete-all",
  95512. "esnext.weak-set.from",
  95513. "esnext.weak-set.of",
  95514. "web.url",
  95515. "web.url.to-json",
  95516. "web.url-search-params"
  95517. ],
  95518. "core-js/stage/0": [
  95519. "es.map",
  95520. "esnext.aggregate-error",
  95521. "esnext.array.at",
  95522. "esnext.array.filter-out",
  95523. "esnext.array.find-last",
  95524. "esnext.array.find-last-index",
  95525. "esnext.array.is-template-object",
  95526. "esnext.array.last-index",
  95527. "esnext.array.last-item",
  95528. "esnext.array.unique-by",
  95529. "esnext.async-iterator.constructor",
  95530. "esnext.async-iterator.as-indexed-pairs",
  95531. "esnext.async-iterator.drop",
  95532. "esnext.async-iterator.every",
  95533. "esnext.async-iterator.filter",
  95534. "esnext.async-iterator.find",
  95535. "esnext.async-iterator.flat-map",
  95536. "esnext.async-iterator.for-each",
  95537. "esnext.async-iterator.from",
  95538. "esnext.async-iterator.map",
  95539. "esnext.async-iterator.reduce",
  95540. "esnext.async-iterator.some",
  95541. "esnext.async-iterator.take",
  95542. "esnext.async-iterator.to-array",
  95543. "esnext.bigint.range",
  95544. "esnext.composite-key",
  95545. "esnext.composite-symbol",
  95546. "esnext.global-this",
  95547. "esnext.iterator.constructor",
  95548. "esnext.iterator.as-indexed-pairs",
  95549. "esnext.iterator.drop",
  95550. "esnext.iterator.every",
  95551. "esnext.iterator.filter",
  95552. "esnext.iterator.find",
  95553. "esnext.iterator.flat-map",
  95554. "esnext.iterator.for-each",
  95555. "esnext.iterator.from",
  95556. "esnext.iterator.map",
  95557. "esnext.iterator.reduce",
  95558. "esnext.iterator.some",
  95559. "esnext.iterator.take",
  95560. "esnext.iterator.to-array",
  95561. "esnext.map.delete-all",
  95562. "esnext.map.emplace",
  95563. "esnext.map.every",
  95564. "esnext.map.filter",
  95565. "esnext.map.find",
  95566. "esnext.map.find-key",
  95567. "esnext.map.from",
  95568. "esnext.map.group-by",
  95569. "esnext.map.includes",
  95570. "esnext.map.key-by",
  95571. "esnext.map.key-of",
  95572. "esnext.map.map-keys",
  95573. "esnext.map.map-values",
  95574. "esnext.map.merge",
  95575. "esnext.map.of",
  95576. "esnext.map.reduce",
  95577. "esnext.map.some",
  95578. "esnext.map.update",
  95579. "esnext.map.update-or-insert",
  95580. "esnext.map.upsert",
  95581. "esnext.math.clamp",
  95582. "esnext.math.deg-per-rad",
  95583. "esnext.math.degrees",
  95584. "esnext.math.fscale",
  95585. "esnext.math.iaddh",
  95586. "esnext.math.imulh",
  95587. "esnext.math.isubh",
  95588. "esnext.math.rad-per-deg",
  95589. "esnext.math.radians",
  95590. "esnext.math.scale",
  95591. "esnext.math.seeded-prng",
  95592. "esnext.math.signbit",
  95593. "esnext.math.umulh",
  95594. "esnext.number.from-string",
  95595. "esnext.number.range",
  95596. "esnext.object.has-own",
  95597. "esnext.object.iterate-entries",
  95598. "esnext.object.iterate-keys",
  95599. "esnext.object.iterate-values",
  95600. "esnext.observable",
  95601. "esnext.promise.all-settled",
  95602. "esnext.promise.any",
  95603. "esnext.promise.try",
  95604. "esnext.set.add-all",
  95605. "esnext.set.delete-all",
  95606. "esnext.set.difference",
  95607. "esnext.set.every",
  95608. "esnext.set.filter",
  95609. "esnext.set.find",
  95610. "esnext.set.from",
  95611. "esnext.set.intersection",
  95612. "esnext.set.is-disjoint-from",
  95613. "esnext.set.is-subset-of",
  95614. "esnext.set.is-superset-of",
  95615. "esnext.set.join",
  95616. "esnext.set.map",
  95617. "esnext.set.of",
  95618. "esnext.set.reduce",
  95619. "esnext.set.some",
  95620. "esnext.set.symmetric-difference",
  95621. "esnext.set.union",
  95622. "esnext.string.at",
  95623. "esnext.string.code-points",
  95624. "esnext.string.match-all",
  95625. "esnext.string.replace-all",
  95626. "esnext.symbol.async-dispose",
  95627. "esnext.symbol.dispose",
  95628. "esnext.symbol.matcher",
  95629. "esnext.symbol.metadata",
  95630. "esnext.symbol.observable",
  95631. "esnext.symbol.pattern-match",
  95632. "esnext.symbol.replace-all",
  95633. "esnext.typed-array.at",
  95634. "esnext.typed-array.filter-out",
  95635. "esnext.typed-array.find-last",
  95636. "esnext.typed-array.find-last-index",
  95637. "esnext.typed-array.unique-by",
  95638. "esnext.weak-map.delete-all",
  95639. "esnext.weak-map.from",
  95640. "esnext.weak-map.of",
  95641. "esnext.weak-map.emplace",
  95642. "esnext.weak-map.upsert",
  95643. "esnext.weak-set.add-all",
  95644. "esnext.weak-set.delete-all",
  95645. "esnext.weak-set.from",
  95646. "esnext.weak-set.of",
  95647. "web.url",
  95648. "web.url.to-json",
  95649. "web.url-search-params"
  95650. ],
  95651. "core-js/stage/1": [
  95652. "es.map",
  95653. "esnext.aggregate-error",
  95654. "esnext.array.at",
  95655. "esnext.array.filter-out",
  95656. "esnext.array.find-last",
  95657. "esnext.array.find-last-index",
  95658. "esnext.array.is-template-object",
  95659. "esnext.array.last-index",
  95660. "esnext.array.last-item",
  95661. "esnext.array.unique-by",
  95662. "esnext.async-iterator.constructor",
  95663. "esnext.async-iterator.as-indexed-pairs",
  95664. "esnext.async-iterator.drop",
  95665. "esnext.async-iterator.every",
  95666. "esnext.async-iterator.filter",
  95667. "esnext.async-iterator.find",
  95668. "esnext.async-iterator.flat-map",
  95669. "esnext.async-iterator.for-each",
  95670. "esnext.async-iterator.from",
  95671. "esnext.async-iterator.map",
  95672. "esnext.async-iterator.reduce",
  95673. "esnext.async-iterator.some",
  95674. "esnext.async-iterator.take",
  95675. "esnext.async-iterator.to-array",
  95676. "esnext.bigint.range",
  95677. "esnext.composite-key",
  95678. "esnext.composite-symbol",
  95679. "esnext.global-this",
  95680. "esnext.iterator.constructor",
  95681. "esnext.iterator.as-indexed-pairs",
  95682. "esnext.iterator.drop",
  95683. "esnext.iterator.every",
  95684. "esnext.iterator.filter",
  95685. "esnext.iterator.find",
  95686. "esnext.iterator.flat-map",
  95687. "esnext.iterator.for-each",
  95688. "esnext.iterator.from",
  95689. "esnext.iterator.map",
  95690. "esnext.iterator.reduce",
  95691. "esnext.iterator.some",
  95692. "esnext.iterator.take",
  95693. "esnext.iterator.to-array",
  95694. "esnext.map.delete-all",
  95695. "esnext.map.emplace",
  95696. "esnext.map.every",
  95697. "esnext.map.filter",
  95698. "esnext.map.find",
  95699. "esnext.map.find-key",
  95700. "esnext.map.from",
  95701. "esnext.map.group-by",
  95702. "esnext.map.includes",
  95703. "esnext.map.key-by",
  95704. "esnext.map.key-of",
  95705. "esnext.map.map-keys",
  95706. "esnext.map.map-values",
  95707. "esnext.map.merge",
  95708. "esnext.map.of",
  95709. "esnext.map.reduce",
  95710. "esnext.map.some",
  95711. "esnext.map.update",
  95712. "esnext.map.update-or-insert",
  95713. "esnext.map.upsert",
  95714. "esnext.math.clamp",
  95715. "esnext.math.deg-per-rad",
  95716. "esnext.math.degrees",
  95717. "esnext.math.fscale",
  95718. "esnext.math.rad-per-deg",
  95719. "esnext.math.radians",
  95720. "esnext.math.scale",
  95721. "esnext.math.seeded-prng",
  95722. "esnext.math.signbit",
  95723. "esnext.number.from-string",
  95724. "esnext.number.range",
  95725. "esnext.object.has-own",
  95726. "esnext.object.iterate-entries",
  95727. "esnext.object.iterate-keys",
  95728. "esnext.object.iterate-values",
  95729. "esnext.observable",
  95730. "esnext.promise.all-settled",
  95731. "esnext.promise.any",
  95732. "esnext.promise.try",
  95733. "esnext.set.add-all",
  95734. "esnext.set.delete-all",
  95735. "esnext.set.difference",
  95736. "esnext.set.every",
  95737. "esnext.set.filter",
  95738. "esnext.set.find",
  95739. "esnext.set.from",
  95740. "esnext.set.intersection",
  95741. "esnext.set.is-disjoint-from",
  95742. "esnext.set.is-subset-of",
  95743. "esnext.set.is-superset-of",
  95744. "esnext.set.join",
  95745. "esnext.set.map",
  95746. "esnext.set.of",
  95747. "esnext.set.reduce",
  95748. "esnext.set.some",
  95749. "esnext.set.symmetric-difference",
  95750. "esnext.set.union",
  95751. "esnext.string.code-points",
  95752. "esnext.string.match-all",
  95753. "esnext.string.replace-all",
  95754. "esnext.symbol.async-dispose",
  95755. "esnext.symbol.dispose",
  95756. "esnext.symbol.matcher",
  95757. "esnext.symbol.metadata",
  95758. "esnext.symbol.observable",
  95759. "esnext.symbol.pattern-match",
  95760. "esnext.symbol.replace-all",
  95761. "esnext.typed-array.at",
  95762. "esnext.typed-array.filter-out",
  95763. "esnext.typed-array.find-last",
  95764. "esnext.typed-array.find-last-index",
  95765. "esnext.typed-array.unique-by",
  95766. "esnext.weak-map.delete-all",
  95767. "esnext.weak-map.from",
  95768. "esnext.weak-map.of",
  95769. "esnext.weak-map.emplace",
  95770. "esnext.weak-map.upsert",
  95771. "esnext.weak-set.add-all",
  95772. "esnext.weak-set.delete-all",
  95773. "esnext.weak-set.from",
  95774. "esnext.weak-set.of"
  95775. ],
  95776. "core-js/stage/2": [
  95777. "esnext.aggregate-error",
  95778. "esnext.array.at",
  95779. "esnext.array.find-last",
  95780. "esnext.array.find-last-index",
  95781. "esnext.array.is-template-object",
  95782. "esnext.async-iterator.constructor",
  95783. "esnext.async-iterator.as-indexed-pairs",
  95784. "esnext.async-iterator.drop",
  95785. "esnext.async-iterator.every",
  95786. "esnext.async-iterator.filter",
  95787. "esnext.async-iterator.find",
  95788. "esnext.async-iterator.flat-map",
  95789. "esnext.async-iterator.for-each",
  95790. "esnext.async-iterator.from",
  95791. "esnext.async-iterator.map",
  95792. "esnext.async-iterator.reduce",
  95793. "esnext.async-iterator.some",
  95794. "esnext.async-iterator.take",
  95795. "esnext.async-iterator.to-array",
  95796. "esnext.global-this",
  95797. "esnext.iterator.constructor",
  95798. "esnext.iterator.as-indexed-pairs",
  95799. "esnext.iterator.drop",
  95800. "esnext.iterator.every",
  95801. "esnext.iterator.filter",
  95802. "esnext.iterator.find",
  95803. "esnext.iterator.flat-map",
  95804. "esnext.iterator.for-each",
  95805. "esnext.iterator.from",
  95806. "esnext.iterator.map",
  95807. "esnext.iterator.reduce",
  95808. "esnext.iterator.some",
  95809. "esnext.iterator.take",
  95810. "esnext.iterator.to-array",
  95811. "esnext.map.emplace",
  95812. "esnext.map.update-or-insert",
  95813. "esnext.map.upsert",
  95814. "esnext.object.has-own",
  95815. "esnext.promise.all-settled",
  95816. "esnext.promise.any",
  95817. "esnext.set.difference",
  95818. "esnext.set.intersection",
  95819. "esnext.set.is-disjoint-from",
  95820. "esnext.set.is-subset-of",
  95821. "esnext.set.is-superset-of",
  95822. "esnext.set.symmetric-difference",
  95823. "esnext.set.union",
  95824. "esnext.string.match-all",
  95825. "esnext.string.replace-all",
  95826. "esnext.symbol.async-dispose",
  95827. "esnext.symbol.dispose",
  95828. "esnext.symbol.metadata",
  95829. "esnext.symbol.replace-all",
  95830. "esnext.typed-array.at",
  95831. "esnext.typed-array.find-last",
  95832. "esnext.typed-array.find-last-index",
  95833. "esnext.weak-map.emplace",
  95834. "esnext.weak-map.upsert"
  95835. ],
  95836. "core-js/stage/3": [
  95837. "esnext.aggregate-error",
  95838. "esnext.array.at",
  95839. "esnext.global-this",
  95840. "esnext.object.has-own",
  95841. "esnext.promise.all-settled",
  95842. "esnext.promise.any",
  95843. "esnext.string.match-all",
  95844. "esnext.string.replace-all",
  95845. "esnext.symbol.replace-all",
  95846. "esnext.typed-array.at"
  95847. ],
  95848. "core-js/stage/4": [
  95849. "esnext.aggregate-error",
  95850. "esnext.global-this",
  95851. "esnext.promise.all-settled",
  95852. "esnext.promise.any",
  95853. "esnext.string.match-all",
  95854. "esnext.string.replace-all",
  95855. "esnext.symbol.replace-all"
  95856. ],
  95857. "core-js/stage/pre": [
  95858. "es.map",
  95859. "esnext.aggregate-error",
  95860. "esnext.array.at",
  95861. "esnext.array.filter-out",
  95862. "esnext.array.find-last",
  95863. "esnext.array.find-last-index",
  95864. "esnext.array.is-template-object",
  95865. "esnext.array.last-index",
  95866. "esnext.array.last-item",
  95867. "esnext.array.unique-by",
  95868. "esnext.async-iterator.constructor",
  95869. "esnext.async-iterator.as-indexed-pairs",
  95870. "esnext.async-iterator.drop",
  95871. "esnext.async-iterator.every",
  95872. "esnext.async-iterator.filter",
  95873. "esnext.async-iterator.find",
  95874. "esnext.async-iterator.flat-map",
  95875. "esnext.async-iterator.for-each",
  95876. "esnext.async-iterator.from",
  95877. "esnext.async-iterator.map",
  95878. "esnext.async-iterator.reduce",
  95879. "esnext.async-iterator.some",
  95880. "esnext.async-iterator.take",
  95881. "esnext.async-iterator.to-array",
  95882. "esnext.bigint.range",
  95883. "esnext.composite-key",
  95884. "esnext.composite-symbol",
  95885. "esnext.global-this",
  95886. "esnext.iterator.constructor",
  95887. "esnext.iterator.as-indexed-pairs",
  95888. "esnext.iterator.drop",
  95889. "esnext.iterator.every",
  95890. "esnext.iterator.filter",
  95891. "esnext.iterator.find",
  95892. "esnext.iterator.flat-map",
  95893. "esnext.iterator.for-each",
  95894. "esnext.iterator.from",
  95895. "esnext.iterator.map",
  95896. "esnext.iterator.reduce",
  95897. "esnext.iterator.some",
  95898. "esnext.iterator.take",
  95899. "esnext.iterator.to-array",
  95900. "esnext.map.delete-all",
  95901. "esnext.map.emplace",
  95902. "esnext.map.every",
  95903. "esnext.map.filter",
  95904. "esnext.map.find",
  95905. "esnext.map.find-key",
  95906. "esnext.map.from",
  95907. "esnext.map.group-by",
  95908. "esnext.map.includes",
  95909. "esnext.map.key-by",
  95910. "esnext.map.key-of",
  95911. "esnext.map.map-keys",
  95912. "esnext.map.map-values",
  95913. "esnext.map.merge",
  95914. "esnext.map.of",
  95915. "esnext.map.reduce",
  95916. "esnext.map.some",
  95917. "esnext.map.update",
  95918. "esnext.map.update-or-insert",
  95919. "esnext.map.upsert",
  95920. "esnext.math.clamp",
  95921. "esnext.math.deg-per-rad",
  95922. "esnext.math.degrees",
  95923. "esnext.math.fscale",
  95924. "esnext.math.iaddh",
  95925. "esnext.math.imulh",
  95926. "esnext.math.isubh",
  95927. "esnext.math.rad-per-deg",
  95928. "esnext.math.radians",
  95929. "esnext.math.scale",
  95930. "esnext.math.seeded-prng",
  95931. "esnext.math.signbit",
  95932. "esnext.math.umulh",
  95933. "esnext.number.from-string",
  95934. "esnext.number.range",
  95935. "esnext.object.has-own",
  95936. "esnext.object.iterate-entries",
  95937. "esnext.object.iterate-keys",
  95938. "esnext.object.iterate-values",
  95939. "esnext.observable",
  95940. "esnext.promise.all-settled",
  95941. "esnext.promise.any",
  95942. "esnext.promise.try",
  95943. "esnext.reflect.define-metadata",
  95944. "esnext.reflect.delete-metadata",
  95945. "esnext.reflect.get-metadata",
  95946. "esnext.reflect.get-metadata-keys",
  95947. "esnext.reflect.get-own-metadata",
  95948. "esnext.reflect.get-own-metadata-keys",
  95949. "esnext.reflect.has-metadata",
  95950. "esnext.reflect.has-own-metadata",
  95951. "esnext.reflect.metadata",
  95952. "esnext.set.add-all",
  95953. "esnext.set.delete-all",
  95954. "esnext.set.difference",
  95955. "esnext.set.every",
  95956. "esnext.set.filter",
  95957. "esnext.set.find",
  95958. "esnext.set.from",
  95959. "esnext.set.intersection",
  95960. "esnext.set.is-disjoint-from",
  95961. "esnext.set.is-subset-of",
  95962. "esnext.set.is-superset-of",
  95963. "esnext.set.join",
  95964. "esnext.set.map",
  95965. "esnext.set.of",
  95966. "esnext.set.reduce",
  95967. "esnext.set.some",
  95968. "esnext.set.symmetric-difference",
  95969. "esnext.set.union",
  95970. "esnext.string.at",
  95971. "esnext.string.code-points",
  95972. "esnext.string.match-all",
  95973. "esnext.string.replace-all",
  95974. "esnext.symbol.async-dispose",
  95975. "esnext.symbol.dispose",
  95976. "esnext.symbol.matcher",
  95977. "esnext.symbol.metadata",
  95978. "esnext.symbol.observable",
  95979. "esnext.symbol.pattern-match",
  95980. "esnext.symbol.replace-all",
  95981. "esnext.typed-array.at",
  95982. "esnext.typed-array.filter-out",
  95983. "esnext.typed-array.find-last",
  95984. "esnext.typed-array.find-last-index",
  95985. "esnext.typed-array.unique-by",
  95986. "esnext.weak-map.delete-all",
  95987. "esnext.weak-map.from",
  95988. "esnext.weak-map.of",
  95989. "esnext.weak-map.emplace",
  95990. "esnext.weak-map.upsert",
  95991. "esnext.weak-set.add-all",
  95992. "esnext.weak-set.delete-all",
  95993. "esnext.weak-set.from",
  95994. "esnext.weak-set.of",
  95995. "web.url",
  95996. "web.url.to-json",
  95997. "web.url-search-params"
  95998. ],
  95999. "core-js/web": [
  96000. "web.dom-collections.for-each",
  96001. "web.dom-collections.iterator",
  96002. "web.immediate",
  96003. "web.queue-microtask",
  96004. "web.timers",
  96005. "web.url",
  96006. "web.url.to-json",
  96007. "web.url-search-params"
  96008. ],
  96009. "core-js/web/dom-collections": [
  96010. "web.dom-collections.for-each",
  96011. "web.dom-collections.iterator"
  96012. ],
  96013. "core-js/web/immediate": [
  96014. "web.immediate"
  96015. ],
  96016. "core-js/web/queue-microtask": [
  96017. "web.queue-microtask"
  96018. ],
  96019. "core-js/web/timers": [
  96020. "web.timers"
  96021. ],
  96022. "core-js/web/url": [
  96023. "web.url",
  96024. "web.url.to-json",
  96025. "web.url-search-params"
  96026. ],
  96027. "core-js/web/url-search-params": [
  96028. "web.url-search-params"
  96029. ]
  96030. };
  96031. var entries$1 = require$$0$2;
  96032. var corejs3ShippedProposalsList$1 = new Set(["esnext.global-this", "esnext.string.match-all"]);
  96033. var polyfillsOrder$1 = {};
  96034. Object.keys(data$1).forEach(function (name, index) {
  96035. polyfillsOrder$1[name] = index;
  96036. });
  96037. var define$2 = function define(pure, global, name, exclude) {
  96038. if (name === void 0) {
  96039. name = global[0];
  96040. }
  96041. return {
  96042. name: name,
  96043. pure: pure,
  96044. global: global.sort(function (a, b) {
  96045. return polyfillsOrder$1[a] - polyfillsOrder$1[b];
  96046. }),
  96047. exclude: exclude
  96048. };
  96049. };
  96050. var typed$1 = function typed(name) {
  96051. return define$2(null, [name].concat(TypedArrayDependencies$1));
  96052. };
  96053. var ArrayNatureIterators$2 = ["es.array.iterator", "web.dom-collections.iterator"];
  96054. var CommonIterators$2 = ["es.string.iterator"].concat(ArrayNatureIterators$2);
  96055. var ArrayNatureIteratorsWithTag$1 = ["es.object.to-string"].concat(ArrayNatureIterators$2);
  96056. var CommonIteratorsWithTag$1 = ["es.object.to-string"].concat(_toConsumableArray(CommonIterators$2));
  96057. var TypedArrayDependencies$1 = ["es.typed-array.copy-within", "es.typed-array.every", "es.typed-array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-of", "es.typed-array.map", "es.typed-array.reduce", "es.typed-array.reduce-right", "es.typed-array.reverse", "es.typed-array.set", "es.typed-array.slice", "es.typed-array.some", "es.typed-array.sort", "es.typed-array.subarray", "es.typed-array.to-locale-string", "es.typed-array.to-string", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice"];
  96058. var TypedArrayStaticMethods$1 = {
  96059. from: define$2(null, ["es.typed-array.from"]),
  96060. of: define$2(null, ["es.typed-array.of"])
  96061. };
  96062. var PromiseDependencies$2 = ["es.promise", "es.object.to-string"];
  96063. var PromiseDependenciesWithIterators$1 = [].concat(PromiseDependencies$2, _toConsumableArray(CommonIterators$2));
  96064. var SymbolDependencies$1 = ["es.symbol", "es.symbol.description", "es.object.to-string"];
  96065. var MapDependencies$1 = ["es.map", "esnext.map.delete-all", "esnext.map.every", "esnext.map.filter", "esnext.map.find", "esnext.map.find-key", "esnext.map.includes", "esnext.map.key-of", "esnext.map.map-keys", "esnext.map.map-values", "esnext.map.merge", "esnext.map.reduce", "esnext.map.some", "esnext.map.update"].concat(_toConsumableArray(CommonIteratorsWithTag$1));
  96066. var SetDependencies$1 = ["es.set", "esnext.set.add-all", "esnext.set.delete-all", "esnext.set.difference", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", "esnext.set.is-disjoint-from", "esnext.set.is-subset-of", "esnext.set.is-superset-of", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", "esnext.set.union"].concat(_toConsumableArray(CommonIteratorsWithTag$1));
  96067. var WeakMapDependencies$1 = ["es.weak-map", "esnext.weak-map.delete-all"].concat(_toConsumableArray(CommonIteratorsWithTag$1));
  96068. var WeakSetDependencies$1 = ["es.weak-set", "esnext.weak-set.add-all", "esnext.weak-set.delete-all"].concat(_toConsumableArray(CommonIteratorsWithTag$1));
  96069. var URLSearchParamsDependencies$1 = ["web.url"].concat(_toConsumableArray(CommonIteratorsWithTag$1));
  96070. var BuiltIns$2 = {
  96071. AggregateError: define$2("aggregate-error", ["esnext.aggregate-error"].concat(_toConsumableArray(CommonIterators$2))),
  96072. ArrayBuffer: define$2(null, ["es.array-buffer.constructor", "es.array-buffer.slice", "es.object.to-string"]),
  96073. DataView: define$2(null, ["es.data-view", "es.array-buffer.slice", "es.object.to-string"]),
  96074. Date: define$2(null, ["es.date.to-string"]),
  96075. Float32Array: typed$1("es.typed-array.float32-array"),
  96076. Float64Array: typed$1("es.typed-array.float64-array"),
  96077. Int8Array: typed$1("es.typed-array.int8-array"),
  96078. Int16Array: typed$1("es.typed-array.int16-array"),
  96079. Int32Array: typed$1("es.typed-array.int32-array"),
  96080. Uint8Array: typed$1("es.typed-array.uint8-array"),
  96081. Uint8ClampedArray: typed$1("es.typed-array.uint8-clamped-array"),
  96082. Uint16Array: typed$1("es.typed-array.uint16-array"),
  96083. Uint32Array: typed$1("es.typed-array.uint32-array"),
  96084. Map: define$2("map/index", MapDependencies$1),
  96085. Number: define$2(null, ["es.number.constructor"]),
  96086. Observable: define$2("observable/index", ["esnext.observable", "esnext.symbol.observable", "es.object.to-string"].concat(_toConsumableArray(CommonIteratorsWithTag$1))),
  96087. Promise: define$2("promise/index", PromiseDependencies$2),
  96088. RegExp: define$2(null, ["es.regexp.constructor", "es.regexp.exec", "es.regexp.to-string"]),
  96089. Set: define$2("set/index", SetDependencies$1),
  96090. Symbol: define$2("symbol/index", SymbolDependencies$1),
  96091. URL: define$2("url/index", ["web.url"].concat(_toConsumableArray(URLSearchParamsDependencies$1))),
  96092. URLSearchParams: define$2("url-search-params/index", URLSearchParamsDependencies$1),
  96093. WeakMap: define$2("weak-map/index", WeakMapDependencies$1),
  96094. WeakSet: define$2("weak-set/index", WeakSetDependencies$1),
  96095. clearImmediate: define$2("clear-immediate", ["web.immediate"]),
  96096. compositeKey: define$2("composite-key", ["esnext.composite-key"]),
  96097. compositeSymbol: define$2("composite-symbol", ["esnext.composite-symbol"]),
  96098. fetch: define$2(null, PromiseDependencies$2),
  96099. globalThis: define$2("global-this", ["es.global-this"]),
  96100. parseFloat: define$2("parse-float", ["es.parse-float"]),
  96101. parseInt: define$2("parse-int", ["es.parse-int"]),
  96102. queueMicrotask: define$2("queue-microtask", ["web.queue-microtask"]),
  96103. setImmediate: define$2("set-immediate", ["web.immediate"]),
  96104. setInterval: define$2("set-interval", ["web.timers"]),
  96105. setTimeout: define$2("set-timeout", ["web.timers"])
  96106. };
  96107. var StaticProperties$2 = {
  96108. Array: {
  96109. from: define$2("array/from", ["es.array.from", "es.string.iterator"]),
  96110. isArray: define$2("array/is-array", ["es.array.is-array"]),
  96111. of: define$2("array/of", ["es.array.of"])
  96112. },
  96113. ArrayBuffer: {
  96114. isView: define$2(null, ["es.array-buffer.is-view"])
  96115. },
  96116. Date: {
  96117. now: define$2("date/now", ["es.date.now"])
  96118. },
  96119. JSON: {
  96120. stringify: define$2("json/stringify", [], "es.symbol")
  96121. },
  96122. Math: {
  96123. DEG_PER_RAD: define$2("math/deg-per-rad", ["esnext.math.deg-per-rad"]),
  96124. RAD_PER_DEG: define$2("math/rad-per-deg", ["esnext.math.rad-per-deg"]),
  96125. acosh: define$2("math/acosh", ["es.math.acosh"]),
  96126. asinh: define$2("math/asinh", ["es.math.asinh"]),
  96127. atanh: define$2("math/atanh", ["es.math.atanh"]),
  96128. cbrt: define$2("math/cbrt", ["es.math.cbrt"]),
  96129. clamp: define$2("math/clamp", ["esnext.math.clamp"]),
  96130. clz32: define$2("math/clz32", ["es.math.clz32"]),
  96131. cosh: define$2("math/cosh", ["es.math.cosh"]),
  96132. degrees: define$2("math/degrees", ["esnext.math.degrees"]),
  96133. expm1: define$2("math/expm1", ["es.math.expm1"]),
  96134. fround: define$2("math/fround", ["es.math.fround"]),
  96135. fscale: define$2("math/fscale", ["esnext.math.fscale"]),
  96136. hypot: define$2("math/hypot", ["es.math.hypot"]),
  96137. iaddh: define$2("math/iaddh", ["esnext.math.iaddh"]),
  96138. imul: define$2("math/imul", ["es.math.imul"]),
  96139. imulh: define$2("math/imulh", ["esnext.math.imulh"]),
  96140. isubh: define$2("math/isubh", ["esnext.math.isubh"]),
  96141. log10: define$2("math/log10", ["es.math.log10"]),
  96142. log1p: define$2("math/log1p", ["es.math.log1p"]),
  96143. log2: define$2("math/log2", ["es.math.log2"]),
  96144. radians: define$2("math/radians", ["esnext.math.radians"]),
  96145. scale: define$2("math/scale", ["esnext.math.scale"]),
  96146. seededPRNG: define$2("math/seeded-prng", ["esnext.math.seeded-prng"]),
  96147. sign: define$2("math/sign", ["es.math.sign"]),
  96148. signbit: define$2("math/signbit", ["esnext.math.signbit"]),
  96149. sinh: define$2("math/sinh", ["es.math.sinh"]),
  96150. tanh: define$2("math/tanh", ["es.math.tanh"]),
  96151. trunc: define$2("math/trunc", ["es.math.trunc"]),
  96152. umulh: define$2("math/umulh", ["esnext.math.umulh"])
  96153. },
  96154. Map: {
  96155. from: define$2(null, ["esnext.map.from"].concat(_toConsumableArray(MapDependencies$1))),
  96156. groupBy: define$2(null, ["esnext.map.group-by"].concat(_toConsumableArray(MapDependencies$1))),
  96157. keyBy: define$2(null, ["esnext.map.key-by"].concat(_toConsumableArray(MapDependencies$1))),
  96158. of: define$2(null, ["esnext.map.of"].concat(_toConsumableArray(MapDependencies$1)))
  96159. },
  96160. Number: {
  96161. EPSILON: define$2("number/epsilon", ["es.number.epsilon"]),
  96162. MAX_SAFE_INTEGER: define$2("number/max-safe-integer", ["es.number.max-safe-integer"]),
  96163. MIN_SAFE_INTEGER: define$2("number/min-safe-integer", ["es.number.min-safe-integer"]),
  96164. fromString: define$2("number/from-string", ["esnext.number.from-string"]),
  96165. isFinite: define$2("number/is-finite", ["es.number.is-finite"]),
  96166. isInteger: define$2("number/is-integer", ["es.number.is-integer"]),
  96167. isNaN: define$2("number/is-nan", ["es.number.is-nan"]),
  96168. isSafeInteger: define$2("number/is-safe-integer", ["es.number.is-safe-integer"]),
  96169. parseFloat: define$2("number/parse-float", ["es.number.parse-float"]),
  96170. parseInt: define$2("number/parse-int", ["es.number.parse-int"])
  96171. },
  96172. Object: {
  96173. assign: define$2("object/assign", ["es.object.assign"]),
  96174. create: define$2("object/create", ["es.object.create"]),
  96175. defineProperties: define$2("object/define-properties", ["es.object.define-properties"]),
  96176. defineProperty: define$2("object/define-property", ["es.object.define-property"]),
  96177. entries: define$2("object/entries", ["es.object.entries"]),
  96178. freeze: define$2("object/freeze", ["es.object.freeze"]),
  96179. fromEntries: define$2("object/from-entries", ["es.object.from-entries", "es.array.iterator"]),
  96180. getOwnPropertyDescriptor: define$2("object/get-own-property-descriptor", ["es.object.get-own-property-descriptor"]),
  96181. getOwnPropertyDescriptors: define$2("object/get-own-property-descriptors", ["es.object.get-own-property-descriptors"]),
  96182. getOwnPropertyNames: define$2("object/get-own-property-names", ["es.object.get-own-property-names"]),
  96183. getOwnPropertySymbols: define$2("object/get-own-property-symbols", ["es.symbol"]),
  96184. getPrototypeOf: define$2("object/get-prototype-of", ["es.object.get-prototype-of"]),
  96185. is: define$2("object/is", ["es.object.is"]),
  96186. isExtensible: define$2("object/is-extensible", ["es.object.is-extensible"]),
  96187. isFrozen: define$2("object/is-frozen", ["es.object.is-frozen"]),
  96188. isSealed: define$2("object/is-sealed", ["es.object.is-sealed"]),
  96189. keys: define$2("object/keys", ["es.object.keys"]),
  96190. preventExtensions: define$2("object/prevent-extensions", ["es.object.prevent-extensions"]),
  96191. seal: define$2("object/seal", ["es.object.seal"]),
  96192. setPrototypeOf: define$2("object/set-prototype-of", ["es.object.set-prototype-of"]),
  96193. values: define$2("object/values", ["es.object.values"])
  96194. },
  96195. Promise: {
  96196. all: define$2(null, PromiseDependenciesWithIterators$1),
  96197. allSettled: define$2(null, ["es.promise.all-settled"].concat(_toConsumableArray(PromiseDependenciesWithIterators$1))),
  96198. any: define$2(null, ["esnext.promise.any"].concat(_toConsumableArray(PromiseDependenciesWithIterators$1))),
  96199. race: define$2(null, PromiseDependenciesWithIterators$1),
  96200. "try": define$2(null, ["esnext.promise.try"].concat(_toConsumableArray(PromiseDependenciesWithIterators$1)))
  96201. },
  96202. Reflect: {
  96203. apply: define$2("reflect/apply", ["es.reflect.apply"]),
  96204. construct: define$2("reflect/construct", ["es.reflect.construct"]),
  96205. defineMetadata: define$2("reflect/define-metadata", ["esnext.reflect.define-metadata"]),
  96206. defineProperty: define$2("reflect/define-property", ["es.reflect.define-property"]),
  96207. deleteMetadata: define$2("reflect/delete-metadata", ["esnext.reflect.delete-metadata"]),
  96208. deleteProperty: define$2("reflect/delete-property", ["es.reflect.delete-property"]),
  96209. get: define$2("reflect/get", ["es.reflect.get"]),
  96210. getMetadata: define$2("reflect/get-metadata", ["esnext.reflect.get-metadata"]),
  96211. getMetadataKeys: define$2("reflect/get-metadata-keys", ["esnext.reflect.get-metadata-keys"]),
  96212. getOwnMetadata: define$2("reflect/get-own-metadata", ["esnext.reflect.get-own-metadata"]),
  96213. getOwnMetadataKeys: define$2("reflect/get-own-metadata-keys", ["esnext.reflect.get-own-metadata-keys"]),
  96214. getOwnPropertyDescriptor: define$2("reflect/get-own-property-descriptor", ["es.reflect.get-own-property-descriptor"]),
  96215. getPrototypeOf: define$2("reflect/get-prototype-of", ["es.reflect.get-prototype-of"]),
  96216. has: define$2("reflect/has", ["es.reflect.has"]),
  96217. hasMetadata: define$2("reflect/has-metadata", ["esnext.reflect.has-metadata"]),
  96218. hasOwnMetadata: define$2("reflect/has-own-metadata", ["esnext.reflect.has-own-metadata"]),
  96219. isExtensible: define$2("reflect/is-extensible", ["es.reflect.is-extensible"]),
  96220. metadata: define$2("reflect/metadata", ["esnext.reflect.metadata"]),
  96221. ownKeys: define$2("reflect/own-keys", ["es.reflect.own-keys"]),
  96222. preventExtensions: define$2("reflect/prevent-extensions", ["es.reflect.prevent-extensions"]),
  96223. set: define$2("reflect/set", ["es.reflect.set"]),
  96224. setPrototypeOf: define$2("reflect/set-prototype-of", ["es.reflect.set-prototype-of"])
  96225. },
  96226. Set: {
  96227. from: define$2(null, ["esnext.set.from"].concat(_toConsumableArray(SetDependencies$1))),
  96228. of: define$2(null, ["esnext.set.of"].concat(_toConsumableArray(SetDependencies$1)))
  96229. },
  96230. String: {
  96231. fromCodePoint: define$2("string/from-code-point", ["es.string.from-code-point"]),
  96232. raw: define$2("string/raw", ["es.string.raw"])
  96233. },
  96234. Symbol: {
  96235. asyncIterator: define$2("symbol/async-iterator", ["es.symbol.async-iterator"]),
  96236. dispose: define$2("symbol/dispose", ["esnext.symbol.dispose"]),
  96237. "for": define$2("symbol/for", [], "es.symbol"),
  96238. hasInstance: define$2("symbol/has-instance", ["es.symbol.has-instance", "es.function.has-instance"]),
  96239. isConcatSpreadable: define$2("symbol/is-concat-spreadable", ["es.symbol.is-concat-spreadable", "es.array.concat"]),
  96240. iterator: define$2("symbol/iterator", ["es.symbol.iterator"].concat(_toConsumableArray(CommonIteratorsWithTag$1))),
  96241. keyFor: define$2("symbol/key-for", [], "es.symbol"),
  96242. match: define$2("symbol/match", ["es.symbol.match", "es.string.match"]),
  96243. observable: define$2("symbol/observable", ["esnext.symbol.observable"]),
  96244. patternMatch: define$2("symbol/pattern-match", ["esnext.symbol.pattern-match"]),
  96245. replace: define$2("symbol/replace", ["es.symbol.replace", "es.string.replace"]),
  96246. search: define$2("symbol/search", ["es.symbol.search", "es.string.search"]),
  96247. species: define$2("symbol/species", ["es.symbol.species", "es.array.species"]),
  96248. split: define$2("symbol/split", ["es.symbol.split", "es.string.split"]),
  96249. toPrimitive: define$2("symbol/to-primitive", ["es.symbol.to-primitive", "es.date.to-primitive"]),
  96250. toStringTag: define$2("symbol/to-string-tag", ["es.symbol.to-string-tag", "es.object.to-string", "es.math.to-string-tag", "es.json.to-string-tag"]),
  96251. unscopables: define$2("symbol/unscopables", ["es.symbol.unscopables"])
  96252. },
  96253. WeakMap: {
  96254. from: define$2(null, ["esnext.weak-map.from"].concat(_toConsumableArray(WeakMapDependencies$1))),
  96255. of: define$2(null, ["esnext.weak-map.of"].concat(_toConsumableArray(WeakMapDependencies$1)))
  96256. },
  96257. WeakSet: {
  96258. from: define$2(null, ["esnext.weak-set.from"].concat(_toConsumableArray(WeakSetDependencies$1))),
  96259. of: define$2(null, ["esnext.weak-set.of"].concat(_toConsumableArray(WeakSetDependencies$1)))
  96260. },
  96261. Int8Array: TypedArrayStaticMethods$1,
  96262. Uint8Array: TypedArrayStaticMethods$1,
  96263. Uint8ClampedArray: TypedArrayStaticMethods$1,
  96264. Int16Array: TypedArrayStaticMethods$1,
  96265. Uint16Array: TypedArrayStaticMethods$1,
  96266. Int32Array: TypedArrayStaticMethods$1,
  96267. Uint32Array: TypedArrayStaticMethods$1,
  96268. Float32Array: TypedArrayStaticMethods$1,
  96269. Float64Array: TypedArrayStaticMethods$1
  96270. };
  96271. var InstanceProperties$2 = {
  96272. at: define$2("instance/at", ["esnext.string.at"]),
  96273. anchor: define$2(null, ["es.string.anchor"]),
  96274. big: define$2(null, ["es.string.big"]),
  96275. bind: define$2("instance/bind", ["es.function.bind"]),
  96276. blink: define$2(null, ["es.string.blink"]),
  96277. bold: define$2(null, ["es.string.bold"]),
  96278. codePointAt: define$2("instance/code-point-at", ["es.string.code-point-at"]),
  96279. codePoints: define$2("instance/code-points", ["esnext.string.code-points"]),
  96280. concat: define$2("instance/concat", ["es.array.concat"], undefined, ["String"]),
  96281. copyWithin: define$2("instance/copy-within", ["es.array.copy-within"]),
  96282. description: define$2(null, ["es.symbol", "es.symbol.description"]),
  96283. endsWith: define$2("instance/ends-with", ["es.string.ends-with"]),
  96284. entries: define$2("instance/entries", ArrayNatureIteratorsWithTag$1),
  96285. every: define$2("instance/every", ["es.array.every"]),
  96286. exec: define$2(null, ["es.regexp.exec"]),
  96287. fill: define$2("instance/fill", ["es.array.fill"]),
  96288. filter: define$2("instance/filter", ["es.array.filter"]),
  96289. "finally": define$2(null, ["es.promise.finally"].concat(PromiseDependencies$2)),
  96290. find: define$2("instance/find", ["es.array.find"]),
  96291. findIndex: define$2("instance/find-index", ["es.array.find-index"]),
  96292. fixed: define$2(null, ["es.string.fixed"]),
  96293. flags: define$2("instance/flags", ["es.regexp.flags"]),
  96294. flatMap: define$2("instance/flat-map", ["es.array.flat-map", "es.array.unscopables.flat-map"]),
  96295. flat: define$2("instance/flat", ["es.array.flat"]),
  96296. fontcolor: define$2(null, ["es.string.fontcolor"]),
  96297. fontsize: define$2(null, ["es.string.fontsize"]),
  96298. forEach: define$2("instance/for-each", ["es.array.for-each", "web.dom-collections.for-each"]),
  96299. includes: define$2("instance/includes", ["es.array.includes", "es.string.includes"]),
  96300. indexOf: define$2("instance/index-of", ["es.array.index-of"]),
  96301. italic: define$2(null, ["es.string.italics"]),
  96302. join: define$2(null, ["es.array.join"]),
  96303. keys: define$2("instance/keys", ArrayNatureIteratorsWithTag$1),
  96304. lastIndex: define$2(null, ["esnext.array.last-index"]),
  96305. lastIndexOf: define$2("instance/last-index-of", ["es.array.last-index-of"]),
  96306. lastItem: define$2(null, ["esnext.array.last-item"]),
  96307. link: define$2(null, ["es.string.link"]),
  96308. map: define$2("instance/map", ["es.array.map"]),
  96309. match: define$2(null, ["es.string.match", "es.regexp.exec"]),
  96310. matchAll: define$2("instance/match-all", ["es.string.match-all"]),
  96311. name: define$2(null, ["es.function.name"]),
  96312. padEnd: define$2("instance/pad-end", ["es.string.pad-end"]),
  96313. padStart: define$2("instance/pad-start", ["es.string.pad-start"]),
  96314. reduce: define$2("instance/reduce", ["es.array.reduce"]),
  96315. reduceRight: define$2("instance/reduce-right", ["es.array.reduce-right"]),
  96316. repeat: define$2("instance/repeat", ["es.string.repeat"]),
  96317. replace: define$2(null, ["es.string.replace", "es.regexp.exec"]),
  96318. replaceAll: define$2("instance/replace-all", ["esnext.string.replace-all"]),
  96319. reverse: define$2("instance/reverse", ["es.array.reverse"]),
  96320. search: define$2(null, ["es.string.search", "es.regexp.exec"]),
  96321. slice: define$2("instance/slice", ["es.array.slice"]),
  96322. small: define$2(null, ["es.string.small"]),
  96323. some: define$2("instance/some", ["es.array.some"]),
  96324. sort: define$2("instance/sort", ["es.array.sort"]),
  96325. splice: define$2("instance/splice", ["es.array.splice"]),
  96326. split: define$2(null, ["es.string.split", "es.regexp.exec"]),
  96327. startsWith: define$2("instance/starts-with", ["es.string.starts-with"]),
  96328. strike: define$2(null, ["es.string.strike"]),
  96329. sub: define$2(null, ["es.string.sub"]),
  96330. sup: define$2(null, ["es.string.sup"]),
  96331. toFixed: define$2(null, ["es.number.to-fixed"]),
  96332. toISOString: define$2(null, ["es.date.to-iso-string"]),
  96333. toJSON: define$2(null, ["es.date.to-json", "web.url.to-json"]),
  96334. toPrecision: define$2(null, ["es.number.to-precision"]),
  96335. toString: define$2(null, ["es.object.to-string", "es.regexp.to-string", "es.date.to-string"]),
  96336. trim: define$2("instance/trim", ["es.string.trim"]),
  96337. trimEnd: define$2("instance/trim-end", ["es.string.trim-end"]),
  96338. trimLeft: define$2("instance/trim-left", ["es.string.trim-start"]),
  96339. trimRight: define$2("instance/trim-right", ["es.string.trim-end"]),
  96340. trimStart: define$2("instance/trim-start", ["es.string.trim-start"]),
  96341. values: define$2("instance/values", ArrayNatureIteratorsWithTag$1),
  96342. __defineGetter__: define$2(null, ["es.object.define-getter"]),
  96343. __defineSetter__: define$2(null, ["es.object.define-setter"]),
  96344. __lookupGetter__: define$2(null, ["es.object.lookup-getter"]),
  96345. __lookupSetter__: define$2(null, ["es.object.lookup-setter"])
  96346. };
  96347. var CommonInstanceDependencies$1 = new Set(["es.object.to-string", "es.object.define-getter", "es.object.define-setter", "es.object.lookup-getter", "es.object.lookup-setter", "es.regexp.exec"]);
  96348. var _ref$3 = undefined || babel,
  96349. t$1$2 = _ref$3.types;
  96350. function callMethod$1(path, id) {
  96351. var object = path.node.object;
  96352. var context1, context2;
  96353. if (t$1$2.isIdentifier(object)) {
  96354. context1 = object;
  96355. context2 = t$1$2.cloneNode(object);
  96356. } else {
  96357. context1 = path.scope.generateDeclaredUidIdentifier("context");
  96358. context2 = t$1$2.assignmentExpression("=", t$1$2.cloneNode(context1), object);
  96359. }
  96360. path.replaceWith(t$1$2.memberExpression(t$1$2.callExpression(id, [context2]), t$1$2.identifier("call")));
  96361. path.parentPath.unshiftContainer("arguments", context1);
  96362. }
  96363. function isCoreJSSource$1(source) {
  96364. if (typeof source === "string") {
  96365. source = source.replace(/\\/g, "/").replace(/(\/(index)?)?(\.js)?$/i, "").toLowerCase();
  96366. }
  96367. return hasOwnProperty.call(entries$1, source) && entries$1[source];
  96368. }
  96369. function coreJSModule$1(name) {
  96370. return "core-js/modules/" + name + ".js";
  96371. }
  96372. function coreJSPureHelper$1(name, useBabelRuntime, ext) {
  96373. return useBabelRuntime ? useBabelRuntime + "/core-js/" + name + ext : "core-js-pure/features/" + name + ".js";
  96374. }
  96375. var _ref2$1 = undefined || babel,
  96376. t$4 = _ref2$1.types;
  96377. var runtimeCompat$4 = "#__secret_key__@babel/runtime__compatibility";
  96378. var esnextFallback$1 = function esnextFallback(name, cb) {
  96379. if (cb(name)) return true;
  96380. if (!name.startsWith("es.")) return false;
  96381. var fallback = "esnext." + name.slice(3);
  96382. if (!data$1[fallback]) return false;
  96383. return cb(fallback);
  96384. };
  96385. var index$4 = definePolyfillProvider$1(function (_ref3, _ref4) {
  96386. var getUtils = _ref3.getUtils,
  96387. method = _ref3.method,
  96388. shouldInjectPolyfill = _ref3.shouldInjectPolyfill,
  96389. createMetaResolver = _ref3.createMetaResolver,
  96390. debug = _ref3.debug,
  96391. babel = _ref3.babel;
  96392. var _ref4$version = _ref4.version,
  96393. version = _ref4$version === void 0 ? 3 : _ref4$version,
  96394. proposals = _ref4.proposals,
  96395. shippedProposals = _ref4.shippedProposals,
  96396. _ref4$runtimeCompat = _ref4[runtimeCompat$4];
  96397. _ref4$runtimeCompat = _ref4$runtimeCompat === void 0 ? {} : _ref4$runtimeCompat;
  96398. var useBabelRuntime = _ref4$runtimeCompat.useBabelRuntime,
  96399. _ref4$runtimeCompat$e = _ref4$runtimeCompat.ext,
  96400. ext = _ref4$runtimeCompat$e === void 0 ? ".js" : _ref4$runtimeCompat$e;
  96401. var isWebpack = babel.caller(function (caller) {
  96402. return (caller == null ? void 0 : caller.name) === "babel-loader";
  96403. });
  96404. var resolve = createMetaResolver({
  96405. global: BuiltIns$2,
  96406. "static": StaticProperties$2,
  96407. instance: InstanceProperties$2
  96408. });
  96409. var available = new Set(getModulesListForTargetVersion$1(version));
  96410. var coreJSPureBase = useBabelRuntime ? proposals ? useBabelRuntime + "/core-js" : useBabelRuntime + "/core-js-stable" : proposals ? "core-js-pure/features" : "core-js-pure/stable";
  96411. function maybeInjectGlobalImpl(name, utils) {
  96412. if (shouldInjectPolyfill(name)) {
  96413. debug(name);
  96414. utils.injectGlobalImport(coreJSModule$1(name));
  96415. return true;
  96416. }
  96417. return false;
  96418. }
  96419. function maybeInjectGlobal(names, utils, fallback) {
  96420. if (fallback === void 0) {
  96421. fallback = true;
  96422. }
  96423. for (var _iterator = _createForOfIteratorHelperLoose(names), _step; !(_step = _iterator()).done;) {
  96424. var name = _step.value;
  96425. if (fallback) {
  96426. esnextFallback$1(name, function (name) {
  96427. return maybeInjectGlobalImpl(name, utils);
  96428. });
  96429. } else {
  96430. maybeInjectGlobalImpl(name, utils);
  96431. }
  96432. }
  96433. }
  96434. function maybeInjectPure(desc, hint, utils, object) {
  96435. if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback$1(desc.name, shouldInjectPolyfill)) {
  96436. return utils.injectDefaultImport(coreJSPureBase + "/" + desc.pure + ext, hint);
  96437. }
  96438. }
  96439. return {
  96440. name: "corejs3",
  96441. polyfills: data$1,
  96442. filterPolyfills: function filterPolyfills(name) {
  96443. if (!available.has(name)) return false;
  96444. if (proposals || method === "entry-global") return true;
  96445. if (shippedProposals && corejs3ShippedProposalsList$1.has(name)) {
  96446. return true;
  96447. }
  96448. return !name.startsWith("esnext.");
  96449. },
  96450. entryGlobal: function entryGlobal(meta, utils, path) {
  96451. if (meta.kind !== "import") return;
  96452. var modules = isCoreJSSource$1(meta.source);
  96453. if (!modules) return;
  96454. if (modules.length === 1 && meta.source === coreJSModule$1(modules[0]) && shouldInjectPolyfill(modules[0])) {
  96455. debug(null);
  96456. return;
  96457. }
  96458. maybeInjectGlobal(modules, utils, false);
  96459. path.remove();
  96460. },
  96461. usageGlobal: function usageGlobal(meta, utils) {
  96462. var resolved = resolve(meta);
  96463. if (!resolved) return;
  96464. var deps = resolved.desc.global;
  96465. if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
  96466. var low = meta.object.toLowerCase();
  96467. deps = deps.filter(function (m) {
  96468. return m.includes(low) || CommonInstanceDependencies$1.has(m);
  96469. });
  96470. }
  96471. maybeInjectGlobal(deps, utils);
  96472. },
  96473. usagePure: function usagePure(meta, utils, path) {
  96474. if (meta.kind === "in") {
  96475. if (meta.key === "Symbol.iterator") {
  96476. path.replaceWith(t$4.callExpression(utils.injectDefaultImport(coreJSPureHelper$1("is-iterable", useBabelRuntime, ext), "isIterable"), [path.node.right]));
  96477. }
  96478. return;
  96479. }
  96480. if (path.parentPath.isUnaryExpression({
  96481. operator: "delete"
  96482. })) return;
  96483. var isCall;
  96484. if (meta.kind === "property") {
  96485. if (!path.isMemberExpression()) return;
  96486. if (!path.isReferenced()) return;
  96487. isCall = path.parentPath.isCallExpression({
  96488. callee: path.node
  96489. });
  96490. if (meta.key === "Symbol.iterator") {
  96491. if (!shouldInjectPolyfill("es.symbol.iterator")) return;
  96492. if (isCall) {
  96493. if (path.parent.arguments.length === 0) {
  96494. path.parentPath.replaceWith(t$4.callExpression(utils.injectDefaultImport(coreJSPureHelper$1("get-iterator", useBabelRuntime, ext), "getIterator"), [path.node.object]));
  96495. path.skip();
  96496. } else {
  96497. callMethod$1(path, utils.injectDefaultImport(coreJSPureHelper$1("get-iterator-method", useBabelRuntime, ext), "getIteratorMethod"));
  96498. }
  96499. } else {
  96500. path.replaceWith(t$4.callExpression(utils.injectDefaultImport(coreJSPureHelper$1("get-iterator-method", useBabelRuntime, ext), "getIteratorMethod"), [path.node.object]));
  96501. }
  96502. return;
  96503. }
  96504. }
  96505. var resolved = resolve(meta);
  96506. if (!resolved) return;
  96507. if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === "/index") {
  96508. resolved = Object.assign(Object.assign({}, resolved), {}, {
  96509. desc: Object.assign(Object.assign({}, resolved.desc), {}, {
  96510. pure: resolved.desc.pure.slice(0, -6)
  96511. })
  96512. });
  96513. }
  96514. if (resolved.kind === "global") {
  96515. var id = maybeInjectPure(resolved.desc, resolved.name, utils);
  96516. if (id) path.replaceWith(id);
  96517. } else if (resolved.kind === "static") {
  96518. var _id = maybeInjectPure(resolved.desc, resolved.name, utils, meta.object);
  96519. if (_id) path.replaceWith(_id);
  96520. } else if (resolved.kind === "instance") {
  96521. var _id2 = maybeInjectPure(resolved.desc, resolved.name + "InstanceProperty", utils, meta.object);
  96522. if (!_id2) return;
  96523. if (isCall) {
  96524. callMethod$1(path, _id2);
  96525. } else {
  96526. path.replaceWith(t$4.callExpression(_id2, [path.node.object]));
  96527. }
  96528. }
  96529. },
  96530. visitor: method === "usage-global" && {
  96531. CallExpression: function CallExpression(path) {
  96532. if (path.get("callee").isImport()) {
  96533. var utils = getUtils(path);
  96534. if (isWebpack) {
  96535. maybeInjectGlobal(PromiseDependenciesWithIterators$1, utils);
  96536. } else {
  96537. maybeInjectGlobal(PromiseDependencies$2, utils);
  96538. }
  96539. }
  96540. },
  96541. Function: function Function(path) {
  96542. if (path.node.async) {
  96543. maybeInjectGlobal(PromiseDependencies$2, getUtils(path));
  96544. }
  96545. },
  96546. "ForOfStatement|ArrayPattern": function ForOfStatementArrayPattern(path) {
  96547. maybeInjectGlobal(CommonIterators$2, getUtils(path));
  96548. },
  96549. SpreadElement: function SpreadElement(path) {
  96550. if (!path.parentPath.isObjectExpression()) {
  96551. maybeInjectGlobal(CommonIterators$2, getUtils(path));
  96552. }
  96553. },
  96554. YieldExpression: function YieldExpression(path) {
  96555. if (path.node.delegate) {
  96556. maybeInjectGlobal(CommonIterators$2, getUtils(path));
  96557. }
  96558. }
  96559. }
  96560. };
  96561. });
  96562. var runtimeCompat$3 = "#__secret_key__@babel/runtime__compatibility";
  96563. var index$3 = definePolyfillProvider$1(function (_ref, options) {
  96564. var debug = _ref.debug;
  96565. var _options$runtimeCompa = options[runtimeCompat$3];
  96566. _options$runtimeCompa = _options$runtimeCompa === void 0 ? {} : _options$runtimeCompa;
  96567. var useBabelRuntime = _options$runtimeCompa.useBabelRuntime;
  96568. var pureName = useBabelRuntime ? useBabelRuntime + "/regenerator" : "regenerator-runtime";
  96569. return {
  96570. name: "regenerator",
  96571. polyfills: ["regenerator-runtime"],
  96572. usageGlobal: function usageGlobal(meta, utils) {
  96573. if (isRegenerator$1(meta)) {
  96574. debug("regenerator-runtime");
  96575. utils.injectGlobalImport("regenerator-runtime/runtime.js");
  96576. }
  96577. },
  96578. usagePure: function usagePure(meta, utils, path) {
  96579. if (isRegenerator$1(meta)) {
  96580. path.replaceWith(utils.injectDefaultImport(pureName, "regenerator-runtime"));
  96581. }
  96582. }
  96583. };
  96584. });
  96585. var isRegenerator$1 = function isRegenerator(meta) {
  96586. return meta.kind === "global" && meta.name === "regeneratorRuntime";
  96587. };
  96588. var pluginCorejs2 = index$5["default"] || index$5;
  96589. var pluginCorejs3 = index$4["default"] || index$4;
  96590. var pluginRegenerator$1 = index$3["default"] || index$3;
  96591. var pluginsCompat = "#__secret_key__@babel/runtime__compatibility";
  96592. function supportsStaticESM$1(caller) {
  96593. return !!(caller != null && caller.supportsStaticESM);
  96594. }
  96595. var transformRuntime = declare(function (api, options, dirname) {
  96596. var _createCorejsPlgin, _createRegeneratorPlu, _createCorejsPlgin2, _createRegeneratorPlu2, _createRegeneratorPlu3;
  96597. api.assertVersion(7);
  96598. var corejs = options.corejs,
  96599. _options$helpers = options.helpers,
  96600. useRuntimeHelpers = _options$helpers === void 0 ? true : _options$helpers,
  96601. _options$regenerator = options.regenerator,
  96602. useRuntimeRegenerator = _options$regenerator === void 0 ? true : _options$regenerator,
  96603. _options$useESModules = options.useESModules,
  96604. useESModules = _options$useESModules === void 0 ? false : _options$useESModules,
  96605. _options$version = options.version,
  96606. runtimeVersion = _options$version === void 0 ? "7.0.0-beta.0" : _options$version,
  96607. _options$absoluteRunt = options.absoluteRuntime,
  96608. absoluteRuntime = _options$absoluteRunt === void 0 ? false : _options$absoluteRunt;
  96609. var proposals = false;
  96610. var rawVersion;
  96611. if (typeof corejs === "object" && corejs !== null) {
  96612. rawVersion = corejs.version;
  96613. proposals = Boolean(corejs.proposals);
  96614. } else {
  96615. rawVersion = corejs;
  96616. }
  96617. var corejsVersion = rawVersion ? Number(rawVersion) : false;
  96618. if (![false, 2, 3].includes(corejsVersion)) {
  96619. throw new Error("The `core-js` version must be false, 2 or 3, but got " + JSON.stringify(rawVersion) + ".");
  96620. }
  96621. if (proposals && (!corejsVersion || corejsVersion < 3)) {
  96622. throw new Error("The 'proposals' option is only supported when using 'corejs: 3'");
  96623. }
  96624. if (typeof useRuntimeRegenerator !== "boolean") {
  96625. throw new Error("The 'regenerator' option must be undefined, or a boolean.");
  96626. }
  96627. if (typeof useRuntimeHelpers !== "boolean") {
  96628. throw new Error("The 'helpers' option must be undefined, or a boolean.");
  96629. }
  96630. if (typeof useESModules !== "boolean" && useESModules !== "auto") {
  96631. throw new Error("The 'useESModules' option must be undefined, or a boolean, or 'auto'.");
  96632. }
  96633. if (typeof absoluteRuntime !== "boolean" && typeof absoluteRuntime !== "string") {
  96634. throw new Error("The 'absoluteRuntime' option must be undefined, a boolean, or a string.");
  96635. }
  96636. if (typeof runtimeVersion !== "string") {
  96637. throw new Error("The 'version' option must be a version string.");
  96638. }
  96639. var DUAL_MODE_RUNTIME = "7.13.0";
  96640. var supportsCJSDefault = hasMinVersion$2(DUAL_MODE_RUNTIME, runtimeVersion);
  96641. function has(obj, key) {
  96642. return Object.prototype.hasOwnProperty.call(obj, key);
  96643. }
  96644. if (has(options, "useBuiltIns")) {
  96645. if (options.useBuiltIns) {
  96646. throw new Error("The 'useBuiltIns' option has been removed. The @babel/runtime " + "module now uses builtins by default.");
  96647. } else {
  96648. throw new Error("The 'useBuiltIns' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
  96649. }
  96650. }
  96651. if (has(options, "polyfill")) {
  96652. if (options.polyfill === false) {
  96653. throw new Error("The 'polyfill' option has been removed. The @babel/runtime " + "module now skips polyfilling by default.");
  96654. } else {
  96655. throw new Error("The 'polyfill' option has been removed. Use the 'corejs'" + "option to polyfill with `core-js` via @babel/runtime.");
  96656. }
  96657. }
  96658. if (has(options, "moduleName")) {
  96659. throw new Error("The 'moduleName' option has been removed. @babel/transform-runtime " + "no longer supports arbitrary runtimes. If you were using this to " + "set an absolute path for Babel's standard runtimes, please use the " + "'absoluteRuntime' option.");
  96660. }
  96661. var esModules = useESModules === "auto" ? api.caller(supportsStaticESM$1) : useESModules;
  96662. var injectCoreJS2 = corejsVersion === 2;
  96663. var injectCoreJS3 = corejsVersion === 3;
  96664. var moduleName = injectCoreJS3 ? "@babel/runtime-corejs3" : injectCoreJS2 ? "@babel/runtime-corejs2" : "@babel/runtime";
  96665. var HEADER_HELPERS = ["interopRequireWildcard", "interopRequireDefault"];
  96666. var modulePath = getRuntimePath(moduleName, dirname, absoluteRuntime);
  96667. function createCorejsPlgin(plugin, options, regeneratorPlugin) {
  96668. return function (api, _, filename) {
  96669. return Object.assign({}, plugin(api, options, filename), {
  96670. inherits: regeneratorPlugin
  96671. });
  96672. };
  96673. }
  96674. function createRegeneratorPlugin(options) {
  96675. if (!useRuntimeRegenerator) return undefined;
  96676. return function (api, _, filename) {
  96677. return pluginRegenerator$1(api, options, filename);
  96678. };
  96679. }
  96680. var corejsExt = absoluteRuntime ? ".js" : "";
  96681. return {
  96682. name: "transform-runtime",
  96683. inherits: injectCoreJS2 ? createCorejsPlgin(pluginCorejs2, (_createCorejsPlgin = {
  96684. method: "usage-pure"
  96685. }, _createCorejsPlgin[pluginsCompat] = {
  96686. runtimeVersion: runtimeVersion,
  96687. useBabelRuntime: modulePath,
  96688. ext: corejsExt
  96689. }, _createCorejsPlgin), createRegeneratorPlugin((_createRegeneratorPlu = {
  96690. method: "usage-pure"
  96691. }, _createRegeneratorPlu[pluginsCompat] = {
  96692. useBabelRuntime: modulePath
  96693. }, _createRegeneratorPlu))) : injectCoreJS3 ? createCorejsPlgin(pluginCorejs3, (_createCorejsPlgin2 = {
  96694. method: "usage-pure",
  96695. version: 3,
  96696. proposals: proposals
  96697. }, _createCorejsPlgin2[pluginsCompat] = {
  96698. useBabelRuntime: modulePath,
  96699. ext: corejsExt
  96700. }, _createCorejsPlgin2), createRegeneratorPlugin((_createRegeneratorPlu2 = {
  96701. method: "usage-pure"
  96702. }, _createRegeneratorPlu2[pluginsCompat] = {
  96703. useBabelRuntime: modulePath
  96704. }, _createRegeneratorPlu2))) : createRegeneratorPlugin((_createRegeneratorPlu3 = {
  96705. method: "usage-pure"
  96706. }, _createRegeneratorPlu3[pluginsCompat] = {
  96707. useBabelRuntime: modulePath
  96708. }, _createRegeneratorPlu3)),
  96709. pre: function pre(file) {
  96710. if (!useRuntimeHelpers) return;
  96711. file.set("helperGenerator", function (name) {
  96712. if (file.availableHelper && !file.availableHelper(name, runtimeVersion)) {
  96713. return;
  96714. }
  96715. var isInteropHelper = HEADER_HELPERS.indexOf(name) !== -1;
  96716. var blockHoist = isInteropHelper && !isModule(file.path) ? 4 : undefined;
  96717. var helpersDir = esModules && file.path.node.sourceType === "module" ? "helpers/esm" : "helpers";
  96718. return addDefaultImport(modulePath + "/" + helpersDir + "/" + name, name, blockHoist, true);
  96719. });
  96720. var cache = new Map();
  96721. function addDefaultImport(source, nameHint, blockHoist, isHelper) {
  96722. if (isHelper === void 0) {
  96723. isHelper = false;
  96724. }
  96725. var cacheKey = isModule(file.path);
  96726. var key = source + ":" + nameHint + ":" + (cacheKey || "");
  96727. var cached = cache.get(key);
  96728. if (cached) {
  96729. cached = cloneNode(cached);
  96730. } else {
  96731. cached = addDefault(file.path, source, {
  96732. importedInterop: isHelper && supportsCJSDefault ? "compiled" : "uncompiled",
  96733. nameHint: nameHint,
  96734. blockHoist: blockHoist
  96735. });
  96736. cache.set(key, cached);
  96737. }
  96738. return cached;
  96739. }
  96740. }
  96741. };
  96742. });
  96743. var _transformShorthandProperties = declare(function (api) {
  96744. api.assertVersion(7);
  96745. return {
  96746. name: "transform-shorthand-properties",
  96747. visitor: {
  96748. ObjectMethod: function ObjectMethod(path) {
  96749. var node = path.node;
  96750. if (node.kind === "method") {
  96751. var func = functionExpression(null, node.params, node.body, node.generator, node.async);
  96752. func.returnType = node.returnType;
  96753. var computedKey = toComputedKey$1(node);
  96754. if (isStringLiteral(computedKey, {
  96755. value: "__proto__"
  96756. })) {
  96757. path.replaceWith(objectProperty(computedKey, func, true));
  96758. } else {
  96759. path.replaceWith(objectProperty(node.key, func, node.computed));
  96760. }
  96761. }
  96762. },
  96763. ObjectProperty: function ObjectProperty(path) {
  96764. var node = path.node;
  96765. if (node.shorthand) {
  96766. var computedKey = toComputedKey$1(node);
  96767. if (isStringLiteral(computedKey, {
  96768. value: "__proto__"
  96769. })) {
  96770. path.replaceWith(objectProperty(computedKey, node.value, true));
  96771. } else {
  96772. node.shorthand = false;
  96773. }
  96774. }
  96775. }
  96776. }
  96777. };
  96778. });
  96779. var _transformSpread = declare(function (api, options) {
  96780. var _api$assumption, _options$allowArrayLi;
  96781. api.assertVersion(7);
  96782. var iterableIsArray = (_api$assumption = api.assumption("iterableIsArray")) != null ? _api$assumption : options.loose;
  96783. var arrayLikeIsIterable = (_options$allowArrayLi = options.allowArrayLike) != null ? _options$allowArrayLi : api.assumption("arrayLikeIsIterable");
  96784. function getSpreadLiteral(spread, scope) {
  96785. if (iterableIsArray && !isIdentifier(spread.argument, {
  96786. name: "arguments"
  96787. })) {
  96788. return spread.argument;
  96789. } else {
  96790. return scope.toArray(spread.argument, true, arrayLikeIsIterable);
  96791. }
  96792. }
  96793. function hasHole(spread) {
  96794. return spread.elements.some(function (el) {
  96795. return el === null;
  96796. });
  96797. }
  96798. function hasSpread(nodes) {
  96799. for (var i = 0; i < nodes.length; i++) {
  96800. if (isSpreadElement(nodes[i])) {
  96801. return true;
  96802. }
  96803. }
  96804. return false;
  96805. }
  96806. function push(_props, nodes) {
  96807. if (!_props.length) return _props;
  96808. nodes.push(arrayExpression(_props));
  96809. return [];
  96810. }
  96811. function build(props, scope, file) {
  96812. var nodes = [];
  96813. var _props = [];
  96814. for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done;) {
  96815. var prop = _step.value;
  96816. if (isSpreadElement(prop)) {
  96817. _props = push(_props, nodes);
  96818. var spreadLiteral = getSpreadLiteral(prop, scope);
  96819. if (isArrayExpression(spreadLiteral) && hasHole(spreadLiteral)) {
  96820. spreadLiteral = callExpression(file.addHelper("arrayWithoutHoles"), [spreadLiteral]);
  96821. }
  96822. nodes.push(spreadLiteral);
  96823. } else {
  96824. _props.push(prop);
  96825. }
  96826. }
  96827. push(_props, nodes);
  96828. return nodes;
  96829. }
  96830. return {
  96831. name: "transform-spread",
  96832. visitor: {
  96833. ArrayExpression: function ArrayExpression(path) {
  96834. var node = path.node,
  96835. scope = path.scope;
  96836. var elements = node.elements;
  96837. if (!hasSpread(elements)) return;
  96838. var nodes = build(elements, scope, this);
  96839. var first = nodes[0];
  96840. if (nodes.length === 1 && first !== elements[0].argument) {
  96841. path.replaceWith(first);
  96842. return;
  96843. }
  96844. if (!isArrayExpression(first)) {
  96845. first = arrayExpression([]);
  96846. } else {
  96847. nodes.shift();
  96848. }
  96849. path.replaceWith(callExpression(memberExpression(first, identifier("concat")), nodes));
  96850. },
  96851. CallExpression: function CallExpression(path) {
  96852. var node = path.node,
  96853. scope = path.scope;
  96854. var args = node.arguments;
  96855. if (!hasSpread(args)) return;
  96856. var calleePath = skipTransparentExprWrappers(path.get("callee"));
  96857. if (calleePath.isSuper()) {
  96858. throw path.buildCodeFrameError("It's not possible to compile spread arguments in `super()` without compiling classes.\n" + "Please add '@babel/plugin-transform-classes' to your Babel configuration.");
  96859. }
  96860. var contextLiteral = scope.buildUndefinedNode();
  96861. node.arguments = [];
  96862. var nodes;
  96863. if (args.length === 1 && args[0].argument.name === "arguments") {
  96864. nodes = [args[0].argument];
  96865. } else {
  96866. nodes = build(args, scope, this);
  96867. }
  96868. var first = nodes.shift();
  96869. if (nodes.length) {
  96870. node.arguments.push(callExpression(memberExpression(first, identifier("concat")), nodes));
  96871. } else {
  96872. node.arguments.push(first);
  96873. }
  96874. var callee = calleePath.node;
  96875. if (calleePath.isMemberExpression()) {
  96876. var temp = scope.maybeGenerateMemoised(callee.object);
  96877. if (temp) {
  96878. callee.object = assignmentExpression("=", temp, callee.object);
  96879. contextLiteral = temp;
  96880. } else {
  96881. contextLiteral = cloneNode(callee.object);
  96882. }
  96883. }
  96884. node.callee = memberExpression(node.callee, identifier("apply"));
  96885. if (isSuper(contextLiteral)) {
  96886. contextLiteral = thisExpression();
  96887. }
  96888. node.arguments.unshift(cloneNode(contextLiteral));
  96889. },
  96890. NewExpression: function NewExpression(path) {
  96891. var node = path.node,
  96892. scope = path.scope;
  96893. var args = node.arguments;
  96894. if (!hasSpread(args)) return;
  96895. var nodes = build(args, scope, this);
  96896. var first = nodes.shift();
  96897. if (nodes.length) {
  96898. args = callExpression(memberExpression(first, identifier("concat")), nodes);
  96899. } else {
  96900. args = first;
  96901. }
  96902. path.replaceWith(callExpression(path.hub.addHelper("construct"), [node.callee, args]));
  96903. }
  96904. }
  96905. };
  96906. });
  96907. var _transformStickyRegex = declare(function (api) {
  96908. api.assertVersion(7);
  96909. return {
  96910. name: "transform-sticky-regex",
  96911. visitor: {
  96912. RegExpLiteral: function RegExpLiteral(path) {
  96913. var node = path.node;
  96914. if (!node.flags.includes("y")) return;
  96915. path.replaceWith(newExpression(identifier("RegExp"), [stringLiteral(node.pattern), stringLiteral(node.flags)]));
  96916. }
  96917. }
  96918. };
  96919. });
  96920. var transformStrictMode = declare(function (api) {
  96921. api.assertVersion(7);
  96922. return {
  96923. name: "transform-strict-mode",
  96924. visitor: {
  96925. Program: function Program(path) {
  96926. var node = path.node;
  96927. for (var _i = 0, _arr = node.directives; _i < _arr.length; _i++) {
  96928. var directive$1 = _arr[_i];
  96929. if (directive$1.value.value === "use strict") return;
  96930. }
  96931. path.unshiftContainer("directives", directive(directiveLiteral("use strict")));
  96932. }
  96933. }
  96934. };
  96935. });
  96936. var _templateObject$4;
  96937. var _transformTemplateLiterals = declare(function (api, options) {
  96938. var _api$assumption, _api$assumption2;
  96939. api.assertVersion(7);
  96940. var ignoreToPrimitiveHint = (_api$assumption = api.assumption("ignoreToPrimitiveHint")) != null ? _api$assumption : options.loose;
  96941. var mutableTemplateObject = (_api$assumption2 = api.assumption("mutableTemplateObject")) != null ? _api$assumption2 : options.loose;
  96942. var helperName = "taggedTemplateLiteral";
  96943. if (mutableTemplateObject) helperName += "Loose";
  96944. function buildConcatCallExpressions(items) {
  96945. var avail = true;
  96946. return items.reduce(function (left, right) {
  96947. var canBeInserted = isLiteral(right);
  96948. if (!canBeInserted && avail) {
  96949. canBeInserted = true;
  96950. avail = false;
  96951. }
  96952. if (canBeInserted && isCallExpression(left)) {
  96953. left.arguments.push(right);
  96954. return left;
  96955. }
  96956. return callExpression(memberExpression(left, identifier("concat")), [right]);
  96957. });
  96958. }
  96959. return {
  96960. name: "transform-template-literals",
  96961. visitor: {
  96962. TaggedTemplateExpression: function TaggedTemplateExpression(path) {
  96963. var node = path.node;
  96964. var quasi = node.quasi;
  96965. var strings = [];
  96966. var raws = [];
  96967. var isStringsRawEqual = true;
  96968. for (var _i = 0, _arr = quasi.quasis; _i < _arr.length; _i++) {
  96969. var elem = _arr[_i];
  96970. var _elem$value = elem.value,
  96971. raw = _elem$value.raw,
  96972. cooked = _elem$value.cooked;
  96973. var value = cooked == null ? path.scope.buildUndefinedNode() : stringLiteral(cooked);
  96974. strings.push(value);
  96975. raws.push(stringLiteral(raw));
  96976. if (raw !== cooked) {
  96977. isStringsRawEqual = false;
  96978. }
  96979. }
  96980. var helperArgs = [arrayExpression(strings)];
  96981. if (!isStringsRawEqual) {
  96982. helperArgs.push(arrayExpression(raws));
  96983. }
  96984. var tmp = path.scope.generateUidIdentifier("templateObject");
  96985. path.scope.getProgramParent().push({
  96986. id: cloneNode(tmp)
  96987. });
  96988. path.replaceWith(callExpression(node.tag, [template$2.expression.ast(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n ", " || (\n ", " = ", "(", ")\n )\n "])), cloneNode(tmp), tmp, this.addHelper(helperName), helperArgs)].concat(_toConsumableArray(quasi.expressions))));
  96989. },
  96990. TemplateLiteral: function TemplateLiteral(path) {
  96991. var nodes = [];
  96992. var expressions = path.get("expressions");
  96993. var index = 0;
  96994. for (var _i2 = 0, _arr2 = path.node.quasis; _i2 < _arr2.length; _i2++) {
  96995. var elem = _arr2[_i2];
  96996. if (elem.value.cooked) {
  96997. nodes.push(stringLiteral(elem.value.cooked));
  96998. }
  96999. if (index < expressions.length) {
  97000. var expr = expressions[index++];
  97001. var node = expr.node;
  97002. if (!isStringLiteral(node, {
  97003. value: ""
  97004. })) {
  97005. nodes.push(node);
  97006. }
  97007. }
  97008. }
  97009. if (!isStringLiteral(nodes[0]) && !(ignoreToPrimitiveHint && isStringLiteral(nodes[1]))) {
  97010. nodes.unshift(stringLiteral(""));
  97011. }
  97012. var root = nodes[0];
  97013. if (ignoreToPrimitiveHint) {
  97014. for (var i = 1; i < nodes.length; i++) {
  97015. root = binaryExpression("+", root, nodes[i]);
  97016. }
  97017. } else if (nodes.length > 1) {
  97018. root = buildConcatCallExpressions(nodes);
  97019. }
  97020. path.replaceWith(root);
  97021. }
  97022. }
  97023. };
  97024. });
  97025. var _transformTypeofSymbol = declare(function (api) {
  97026. api.assertVersion(7);
  97027. return {
  97028. name: "transform-typeof-symbol",
  97029. visitor: {
  97030. Scope: function Scope(_ref) {
  97031. var scope = _ref.scope;
  97032. if (!scope.getBinding("Symbol")) {
  97033. return;
  97034. }
  97035. scope.rename("Symbol");
  97036. },
  97037. UnaryExpression: function UnaryExpression(path) {
  97038. var node = path.node,
  97039. parent = path.parent;
  97040. if (node.operator !== "typeof") return;
  97041. if (path.parentPath.isBinaryExpression() && EQUALITY_BINARY_OPERATORS.indexOf(parent.operator) >= 0) {
  97042. var opposite = path.getOpposite();
  97043. if (opposite.isLiteral() && opposite.node.value !== "symbol" && opposite.node.value !== "object") {
  97044. return;
  97045. }
  97046. }
  97047. var isUnderHelper = path.findParent(function (path) {
  97048. if (path.isFunction()) {
  97049. var _path$get;
  97050. return ((_path$get = path.get("body.directives.0")) == null ? void 0 : _path$get.node.value.value) === "@babel/helpers - typeof";
  97051. }
  97052. });
  97053. if (isUnderHelper) return;
  97054. var helper = this.addHelper("typeof");
  97055. isUnderHelper = path.findParent(function (path) {
  97056. return path.isVariableDeclarator() && path.node.id === helper || path.isFunctionDeclaration() && path.node.id && path.node.id.name === helper.name;
  97057. });
  97058. if (isUnderHelper) {
  97059. return;
  97060. }
  97061. var call = callExpression(helper, [node.argument]);
  97062. var arg = path.get("argument");
  97063. if (arg.isIdentifier() && !path.scope.hasBinding(arg.node.name, true)) {
  97064. var unary = unaryExpression("typeof", cloneNode(node.argument));
  97065. path.replaceWith(conditionalExpression(binaryExpression("===", unary, stringLiteral("undefined")), stringLiteral("undefined"), call));
  97066. } else {
  97067. path.replaceWith(call);
  97068. }
  97069. }
  97070. }
  97071. };
  97072. });
  97073. function transpileEnum(path, t) {
  97074. var node = path.node;
  97075. if (node["const"]) {
  97076. throw path.buildCodeFrameError("'const' enums are not supported.");
  97077. }
  97078. if (node.declare) {
  97079. path.remove();
  97080. return;
  97081. }
  97082. var name = node.id.name;
  97083. var fill = enumFill(path, t, node.id);
  97084. switch (path.parent.type) {
  97085. case "BlockStatement":
  97086. case "ExportNamedDeclaration":
  97087. case "Program":
  97088. {
  97089. path.insertAfter(fill);
  97090. if (seen(path.parentPath)) {
  97091. path.remove();
  97092. } else {
  97093. var isGlobal = t.isProgram(path.parent);
  97094. path.scope.registerDeclaration(path.replaceWith(makeVar(node.id, t, isGlobal ? "var" : "let"))[0]);
  97095. }
  97096. break;
  97097. }
  97098. default:
  97099. throw new Error("Unexpected enum parent '" + path.parent.type);
  97100. }
  97101. function seen(parentPath) {
  97102. if (parentPath.isExportDeclaration()) {
  97103. return seen(parentPath.parentPath);
  97104. }
  97105. if (parentPath.getData(name)) {
  97106. return true;
  97107. } else {
  97108. parentPath.setData(name, true);
  97109. return false;
  97110. }
  97111. }
  97112. }
  97113. function makeVar(id, t, kind) {
  97114. return t.variableDeclaration(kind, [t.variableDeclarator(id)]);
  97115. }
  97116. var buildEnumWrapper = template$2("\n (function (ID) {\n ASSIGNMENTS;\n })(ID || (ID = {}));\n");
  97117. var buildStringAssignment = template$2("\n ENUM[\"NAME\"] = VALUE;\n");
  97118. var buildNumericAssignment = template$2("\n ENUM[ENUM[\"NAME\"] = VALUE] = \"NAME\";\n");
  97119. var buildEnumMember = function buildEnumMember(isString, options) {
  97120. return (isString ? buildStringAssignment : buildNumericAssignment)(options);
  97121. };
  97122. function enumFill(path, t, id) {
  97123. var x = translateEnumValues(path, t);
  97124. var assignments = x.map(function (_ref) {
  97125. var _ref2 = _slicedToArray$2(_ref, 2),
  97126. memberName = _ref2[0],
  97127. memberValue = _ref2[1];
  97128. return buildEnumMember(t.isStringLiteral(memberValue), {
  97129. ENUM: t.cloneNode(id),
  97130. NAME: memberName,
  97131. VALUE: memberValue
  97132. });
  97133. });
  97134. return buildEnumWrapper({
  97135. ID: t.cloneNode(id),
  97136. ASSIGNMENTS: assignments
  97137. });
  97138. }
  97139. function translateEnumValues(path, t) {
  97140. var seen = Object.create(null);
  97141. var prev = -1;
  97142. return path.node.members.map(function (member) {
  97143. var name = t.isIdentifier(member.id) ? member.id.name : member.id.value;
  97144. var initializer = member.initializer;
  97145. var value;
  97146. if (initializer) {
  97147. var constValue = evaluate(initializer, seen);
  97148. if (constValue !== undefined) {
  97149. seen[name] = constValue;
  97150. if (typeof constValue === "number") {
  97151. value = t.numericLiteral(constValue);
  97152. prev = constValue;
  97153. } else {
  97154. assert_1(typeof constValue === "string");
  97155. value = t.stringLiteral(constValue);
  97156. prev = undefined;
  97157. }
  97158. } else {
  97159. value = initializer;
  97160. prev = undefined;
  97161. }
  97162. } else {
  97163. if (prev !== undefined) {
  97164. prev++;
  97165. value = t.numericLiteral(prev);
  97166. seen[name] = prev;
  97167. } else {
  97168. throw path.buildCodeFrameError("Enum member must have initializer.");
  97169. }
  97170. }
  97171. return [name, value];
  97172. });
  97173. }
  97174. function evaluate(expr, seen) {
  97175. return evalConstant(expr);
  97176. function evalConstant(expr) {
  97177. switch (expr.type) {
  97178. case "StringLiteral":
  97179. return expr.value;
  97180. case "UnaryExpression":
  97181. return evalUnaryExpression(expr);
  97182. case "BinaryExpression":
  97183. return evalBinaryExpression(expr);
  97184. case "NumericLiteral":
  97185. return expr.value;
  97186. case "ParenthesizedExpression":
  97187. return evalConstant(expr.expression);
  97188. case "Identifier":
  97189. return seen[expr.name];
  97190. case "TemplateLiteral":
  97191. if (expr.quasis.length === 1) {
  97192. return expr.quasis[0].value.cooked;
  97193. }
  97194. default:
  97195. return undefined;
  97196. }
  97197. }
  97198. function evalUnaryExpression(_ref3) {
  97199. var argument = _ref3.argument,
  97200. operator = _ref3.operator;
  97201. var value = evalConstant(argument);
  97202. if (value === undefined) {
  97203. return undefined;
  97204. }
  97205. switch (operator) {
  97206. case "+":
  97207. return value;
  97208. case "-":
  97209. return -value;
  97210. case "~":
  97211. return ~value;
  97212. default:
  97213. return undefined;
  97214. }
  97215. }
  97216. function evalBinaryExpression(expr) {
  97217. var left = evalConstant(expr.left);
  97218. if (left === undefined) {
  97219. return undefined;
  97220. }
  97221. var right = evalConstant(expr.right);
  97222. if (right === undefined) {
  97223. return undefined;
  97224. }
  97225. switch (expr.operator) {
  97226. case "|":
  97227. return left | right;
  97228. case "&":
  97229. return left & right;
  97230. case ">>":
  97231. return left >> right;
  97232. case ">>>":
  97233. return left >>> right;
  97234. case "<<":
  97235. return left << right;
  97236. case "^":
  97237. return left ^ right;
  97238. case "*":
  97239. return left * right;
  97240. case "/":
  97241. return left / right;
  97242. case "+":
  97243. return left + right;
  97244. case "-":
  97245. return left - right;
  97246. case "%":
  97247. return left % right;
  97248. default:
  97249. return undefined;
  97250. }
  97251. }
  97252. }
  97253. var _templateObject$3, _templateObject2$2;
  97254. function transpileNamespace(path, t, allowNamespaces) {
  97255. if (path.node.declare || path.node.id.type === "StringLiteral") {
  97256. path.remove();
  97257. return;
  97258. }
  97259. if (!allowNamespaces) {
  97260. throw path.hub.file.buildCodeFrameError(path.node.id, "Namespace not marked type-only declare." + " Non-declarative namespaces are only supported experimentally in Babel." + " To enable and review caveats see:" + " https://babeljs.io/docs/en/babel-plugin-transform-typescript");
  97261. }
  97262. var name = path.node.id.name;
  97263. var value = handleNested(path, t, t.cloneDeep(path.node));
  97264. var bound = path.scope.hasOwnBinding(name);
  97265. if (path.parent.type === "ExportNamedDeclaration") {
  97266. if (!bound) {
  97267. path.parentPath.insertAfter(value);
  97268. path.replaceWith(getDeclaration(t, name));
  97269. path.scope.registerDeclaration(path.parentPath);
  97270. } else {
  97271. path.parentPath.replaceWith(value);
  97272. }
  97273. } else if (bound) {
  97274. path.replaceWith(value);
  97275. } else {
  97276. path.scope.registerDeclaration(path.replaceWithMultiple([getDeclaration(t, name), value])[0]);
  97277. }
  97278. }
  97279. function getDeclaration(t, name) {
  97280. return t.variableDeclaration("let", [t.variableDeclarator(t.identifier(name))]);
  97281. }
  97282. function getMemberExpression(t, name, itemName) {
  97283. return t.memberExpression(t.identifier(name), t.identifier(itemName));
  97284. }
  97285. function handleVariableDeclaration(node, name, hub) {
  97286. if (node.kind !== "const") {
  97287. throw hub.file.buildCodeFrameError(node, "Namespaces exporting non-const are not supported by Babel." + " Change to const or see:" + " https://babeljs.io/docs/en/babel-plugin-transform-typescript");
  97288. }
  97289. var declarations = node.declarations;
  97290. if (declarations.every(function (declarator) {
  97291. return isIdentifier(declarator.id);
  97292. })) {
  97293. for (var _iterator = _createForOfIteratorHelperLoose(declarations), _step; !(_step = _iterator()).done;) {
  97294. var declarator = _step.value;
  97295. declarator.init = assignmentExpression("=", getMemberExpression(t$p, name, declarator.id.name), declarator.init);
  97296. }
  97297. return [node];
  97298. }
  97299. var bindingIdentifiers = getBindingIdentifiers$1(node);
  97300. var assignments = [];
  97301. for (var idName in bindingIdentifiers) {
  97302. assignments.push(assignmentExpression("=", getMemberExpression(t$p, name, idName), cloneNode(bindingIdentifiers[idName])));
  97303. }
  97304. return [node, expressionStatement(sequenceExpression(assignments))];
  97305. }
  97306. function handleNested(path, t, node, parentExport) {
  97307. var names = new Set();
  97308. var realName = node.id;
  97309. var name = path.scope.generateUid(realName.name);
  97310. var namespaceTopLevel = node.body.body;
  97311. for (var i = 0; i < namespaceTopLevel.length; i++) {
  97312. var subNode = namespaceTopLevel[i];
  97313. switch (subNode.type) {
  97314. case "TSModuleDeclaration":
  97315. {
  97316. var transformed = handleNested(path, t, subNode);
  97317. var moduleName = subNode.id.name;
  97318. if (names.has(moduleName)) {
  97319. namespaceTopLevel[i] = transformed;
  97320. } else {
  97321. names.add(moduleName);
  97322. namespaceTopLevel.splice(i++, 1, getDeclaration(t, moduleName), transformed);
  97323. }
  97324. continue;
  97325. }
  97326. case "TSEnumDeclaration":
  97327. case "FunctionDeclaration":
  97328. case "ClassDeclaration":
  97329. names.add(subNode.id.name);
  97330. continue;
  97331. case "VariableDeclaration":
  97332. {
  97333. for (var _name in t.getBindingIdentifiers(subNode)) {
  97334. names.add(_name);
  97335. }
  97336. continue;
  97337. }
  97338. default:
  97339. continue;
  97340. case "ExportNamedDeclaration":
  97341. }
  97342. switch (subNode.declaration.type) {
  97343. case "TSEnumDeclaration":
  97344. case "FunctionDeclaration":
  97345. case "ClassDeclaration":
  97346. {
  97347. var itemName = subNode.declaration.id.name;
  97348. names.add(itemName);
  97349. namespaceTopLevel.splice(i++, 1, subNode.declaration, t.expressionStatement(t.assignmentExpression("=", getMemberExpression(t, name, itemName), t.identifier(itemName))));
  97350. break;
  97351. }
  97352. case "VariableDeclaration":
  97353. {
  97354. var nodes = handleVariableDeclaration(subNode.declaration, name, path.hub);
  97355. namespaceTopLevel.splice.apply(namespaceTopLevel, [i, nodes.length].concat(_toConsumableArray(nodes)));
  97356. i += nodes.length - 1;
  97357. break;
  97358. }
  97359. case "TSModuleDeclaration":
  97360. {
  97361. var _transformed = handleNested(path, t, subNode.declaration, t.identifier(name));
  97362. var _moduleName = subNode.declaration.id.name;
  97363. if (names.has(_moduleName)) {
  97364. namespaceTopLevel[i] = _transformed;
  97365. } else {
  97366. names.add(_moduleName);
  97367. namespaceTopLevel.splice(i++, 1, getDeclaration(t, _moduleName), _transformed);
  97368. }
  97369. }
  97370. }
  97371. }
  97372. var fallthroughValue = t.objectExpression([]);
  97373. if (parentExport) {
  97374. var memberExpr = t.memberExpression(parentExport, realName);
  97375. fallthroughValue = template$2.expression.ast(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteralLoose(["\n ", " ||\n (", " = ", ")\n "])), t.cloneNode(memberExpr), t.cloneNode(memberExpr), fallthroughValue);
  97376. }
  97377. return template$2.statement.ast(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteralLoose(["\n (function (", ") {\n ", "\n })(", " || (", " = ", "));\n "])), t.identifier(name), namespaceTopLevel, realName, t.cloneNode(realName), fallthroughValue);
  97378. }
  97379. var _templateObject$2;
  97380. function isInType(path) {
  97381. switch (path.parent.type) {
  97382. case "TSTypeReference":
  97383. case "TSQualifiedName":
  97384. case "TSExpressionWithTypeArguments":
  97385. case "TSTypeQuery":
  97386. return true;
  97387. case "ExportSpecifier":
  97388. return path.parentPath.parent.exportKind === "type";
  97389. default:
  97390. return false;
  97391. }
  97392. }
  97393. var GLOBAL_TYPES = new WeakMap();
  97394. var NEEDS_EXPLICIT_ESM = new WeakMap();
  97395. var PARSED_PARAMS = new WeakSet();
  97396. function isGlobalType(path, name) {
  97397. var program = path.find(function (path) {
  97398. return path.isProgram();
  97399. }).node;
  97400. if (path.scope.hasOwnBinding(name)) return false;
  97401. if (GLOBAL_TYPES.get(program).has(name)) return true;
  97402. console.warn("The exported identifier \"" + name + "\" is not declared in Babel's scope tracker\n" + "as a JavaScript value binding, and \"@babel/plugin-transform-typescript\"\n" + "never encountered it as a TypeScript type declaration.\n" + "It will be treated as a JavaScript value.\n\n" + "This problem is likely caused by another plugin injecting\n" + ("\"" + name + "\" without registering it in the scope tracker. If you are the author\n") + " of that plugin, please use \"scope.registerDeclaration(declarationPath)\".");
  97403. return false;
  97404. }
  97405. function registerGlobalType(programScope, name) {
  97406. GLOBAL_TYPES.get(programScope.path.node).add(name);
  97407. }
  97408. var transformTypeScript = declare(function (api, opts) {
  97409. api.assertVersion(7);
  97410. var JSX_PRAGMA_REGEX = /\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/;
  97411. var _opts$allowNamespaces = opts.allowNamespaces,
  97412. allowNamespaces = _opts$allowNamespaces === void 0 ? true : _opts$allowNamespaces,
  97413. _opts$jsxPragma = opts.jsxPragma,
  97414. jsxPragma = _opts$jsxPragma === void 0 ? "React.createElement" : _opts$jsxPragma,
  97415. _opts$jsxPragmaFrag = opts.jsxPragmaFrag,
  97416. jsxPragmaFrag = _opts$jsxPragmaFrag === void 0 ? "React.Fragment" : _opts$jsxPragmaFrag,
  97417. _opts$onlyRemoveTypeI = opts.onlyRemoveTypeImports,
  97418. onlyRemoveTypeImports = _opts$onlyRemoveTypeI === void 0 ? false : _opts$onlyRemoveTypeI;
  97419. {
  97420. var _opts$allowDeclareFie = opts.allowDeclareFields,
  97421. allowDeclareFields = _opts$allowDeclareFie === void 0 ? false : _opts$allowDeclareFie;
  97422. }
  97423. var classMemberVisitors = {
  97424. field: function field(path) {
  97425. var node = path.node;
  97426. {
  97427. if (!allowDeclareFields && node.declare) {
  97428. throw path.buildCodeFrameError("The 'declare' modifier is only allowed when the 'allowDeclareFields' option of " + "@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.");
  97429. }
  97430. }
  97431. if (node.declare) {
  97432. if (node.value) {
  97433. throw path.buildCodeFrameError("Fields with the 'declare' modifier cannot be initialized here, but only in the constructor");
  97434. }
  97435. if (!node.decorators) {
  97436. path.remove();
  97437. }
  97438. } else if (node.definite) {
  97439. if (node.value) {
  97440. throw path.buildCodeFrameError("Definitely assigned fields cannot be initialized here, but only in the constructor");
  97441. }
  97442. {
  97443. if (!allowDeclareFields && !node.decorators) {
  97444. path.remove();
  97445. }
  97446. }
  97447. } else {
  97448. if (!allowDeclareFields && !node.value && !node.decorators && !isClassPrivateProperty(node)) {
  97449. path.remove();
  97450. }
  97451. }
  97452. if (node.accessibility) node.accessibility = null;
  97453. if (node["abstract"]) node["abstract"] = null;
  97454. if (node.readonly) node.readonly = null;
  97455. if (node.optional) node.optional = null;
  97456. if (node.typeAnnotation) node.typeAnnotation = null;
  97457. if (node.definite) node.definite = null;
  97458. if (node.declare) node.declare = null;
  97459. if (node.override) node.override = null;
  97460. },
  97461. method: function method(_ref) {
  97462. var node = _ref.node;
  97463. if (node.accessibility) node.accessibility = null;
  97464. if (node["abstract"]) node["abstract"] = null;
  97465. if (node.optional) node.optional = null;
  97466. if (node.override) node.override = null;
  97467. },
  97468. constructor: function constructor(path, classPath) {
  97469. if (path.node.accessibility) path.node.accessibility = null;
  97470. var parameterProperties = [];
  97471. for (var _iterator = _createForOfIteratorHelperLoose(path.node.params), _step; !(_step = _iterator()).done;) {
  97472. var param = _step.value;
  97473. if (param.type === "TSParameterProperty" && !PARSED_PARAMS.has(param.parameter)) {
  97474. PARSED_PARAMS.add(param.parameter);
  97475. parameterProperties.push(param.parameter);
  97476. }
  97477. }
  97478. if (parameterProperties.length) {
  97479. var assigns = parameterProperties.map(function (p) {
  97480. var id;
  97481. if (isIdentifier(p)) {
  97482. id = p;
  97483. } else if (isAssignmentPattern(p) && isIdentifier(p.left)) {
  97484. id = p.left;
  97485. } else {
  97486. throw path.buildCodeFrameError("Parameter properties can not be destructuring patterns.");
  97487. }
  97488. return template$2.statement.ast(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteralLoose(["\n this.", " = ", ""])), cloneNode(id), cloneNode(id));
  97489. });
  97490. injectInitialization(classPath, path, assigns);
  97491. }
  97492. }
  97493. };
  97494. return {
  97495. name: "transform-typescript",
  97496. inherits: syntaxTypescript,
  97497. visitor: {
  97498. Pattern: visitPattern,
  97499. Identifier: visitPattern,
  97500. RestElement: visitPattern,
  97501. Program: {
  97502. enter: function enter(path, state) {
  97503. var file = state.file;
  97504. var fileJsxPragma = null;
  97505. var fileJsxPragmaFrag = null;
  97506. if (!GLOBAL_TYPES.has(path.node)) {
  97507. GLOBAL_TYPES.set(path.node, new Set());
  97508. }
  97509. if (file.ast.comments) {
  97510. for (var _iterator2 = _createForOfIteratorHelperLoose(file.ast.comments), _step2; !(_step2 = _iterator2()).done;) {
  97511. var comment = _step2.value;
  97512. var jsxMatches = JSX_PRAGMA_REGEX.exec(comment.value);
  97513. if (jsxMatches) {
  97514. if (jsxMatches[1]) {
  97515. fileJsxPragmaFrag = jsxMatches[2];
  97516. } else {
  97517. fileJsxPragma = jsxMatches[2];
  97518. }
  97519. }
  97520. }
  97521. }
  97522. var pragmaImportName = fileJsxPragma || jsxPragma;
  97523. if (pragmaImportName) {
  97524. var _pragmaImportName$spl = pragmaImportName.split(".");
  97525. var _pragmaImportName$spl2 = _slicedToArray$2(_pragmaImportName$spl, 1);
  97526. pragmaImportName = _pragmaImportName$spl2[0];
  97527. }
  97528. var pragmaFragImportName = fileJsxPragmaFrag || jsxPragmaFrag;
  97529. if (pragmaFragImportName) {
  97530. var _pragmaFragImportName = pragmaFragImportName.split(".");
  97531. var _pragmaFragImportName2 = _slicedToArray$2(_pragmaFragImportName, 1);
  97532. pragmaFragImportName = _pragmaFragImportName2[0];
  97533. }
  97534. for (var _iterator3 = _createForOfIteratorHelperLoose(path.get("body")), _step3; !(_step3 = _iterator3()).done;) {
  97535. var stmt = _step3.value;
  97536. if (stmt.isImportDeclaration()) {
  97537. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  97538. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  97539. }
  97540. if (stmt.node.importKind === "type") {
  97541. stmt.remove();
  97542. continue;
  97543. }
  97544. if (onlyRemoveTypeImports) {
  97545. NEEDS_EXPLICIT_ESM.set(path.node, false);
  97546. } else {
  97547. if (stmt.node.specifiers.length === 0) {
  97548. NEEDS_EXPLICIT_ESM.set(path.node, false);
  97549. continue;
  97550. }
  97551. var allElided = true;
  97552. var importsToRemove = [];
  97553. for (var _iterator4 = _createForOfIteratorHelperLoose(stmt.node.specifiers), _step4; !(_step4 = _iterator4()).done;) {
  97554. var specifier = _step4.value;
  97555. var binding = stmt.scope.getBinding(specifier.local.name);
  97556. if (binding && isImportTypeOnly({
  97557. binding: binding,
  97558. programPath: path,
  97559. pragmaImportName: pragmaImportName,
  97560. pragmaFragImportName: pragmaFragImportName
  97561. })) {
  97562. importsToRemove.push(binding.path);
  97563. } else {
  97564. allElided = false;
  97565. NEEDS_EXPLICIT_ESM.set(path.node, false);
  97566. }
  97567. }
  97568. if (allElided) {
  97569. stmt.remove();
  97570. } else {
  97571. for (var _iterator5 = _createForOfIteratorHelperLoose(importsToRemove), _step5; !(_step5 = _iterator5()).done;) {
  97572. var importPath = _step5.value;
  97573. importPath.remove();
  97574. }
  97575. }
  97576. }
  97577. continue;
  97578. }
  97579. if (stmt.isExportDeclaration()) {
  97580. stmt = stmt.get("declaration");
  97581. }
  97582. if (stmt.isVariableDeclaration({
  97583. declare: true
  97584. })) {
  97585. for (var _i = 0, _Object$keys = Object.keys(stmt.getBindingIdentifiers()); _i < _Object$keys.length; _i++) {
  97586. var name = _Object$keys[_i];
  97587. registerGlobalType(path.scope, name);
  97588. }
  97589. } else if (stmt.isTSTypeAliasDeclaration() || stmt.isTSDeclareFunction() || stmt.isTSInterfaceDeclaration() || stmt.isClassDeclaration({
  97590. declare: true
  97591. }) || stmt.isTSEnumDeclaration({
  97592. declare: true
  97593. }) || stmt.isTSModuleDeclaration({
  97594. declare: true
  97595. }) && stmt.get("id").isIdentifier()) {
  97596. registerGlobalType(path.scope, stmt.node.id.name);
  97597. }
  97598. }
  97599. },
  97600. exit: function exit(path) {
  97601. if (path.node.sourceType === "module" && NEEDS_EXPLICIT_ESM.get(path.node)) {
  97602. path.pushContainer("body", exportNamedDeclaration());
  97603. }
  97604. }
  97605. },
  97606. ExportNamedDeclaration: function ExportNamedDeclaration(path, state) {
  97607. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  97608. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  97609. }
  97610. if (path.node.exportKind === "type") {
  97611. path.remove();
  97612. return;
  97613. }
  97614. if (!path.node.source && path.node.specifiers.length > 0 && path.node.specifiers.every(function (_ref2) {
  97615. var local = _ref2.local;
  97616. return isGlobalType(path, local.name);
  97617. })) {
  97618. path.remove();
  97619. return;
  97620. }
  97621. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);
  97622. },
  97623. ExportSpecifier: function ExportSpecifier(path) {
  97624. if (!path.parent.source && isGlobalType(path, path.node.local.name)) {
  97625. path.remove();
  97626. }
  97627. },
  97628. ExportDefaultDeclaration: function ExportDefaultDeclaration(path, state) {
  97629. if (!NEEDS_EXPLICIT_ESM.has(state.file.ast.program)) {
  97630. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, true);
  97631. }
  97632. if (isIdentifier(path.node.declaration) && isGlobalType(path, path.node.declaration.name)) {
  97633. path.remove();
  97634. return;
  97635. }
  97636. NEEDS_EXPLICIT_ESM.set(state.file.ast.program, false);
  97637. },
  97638. TSDeclareFunction: function TSDeclareFunction(path) {
  97639. path.remove();
  97640. },
  97641. TSDeclareMethod: function TSDeclareMethod(path) {
  97642. path.remove();
  97643. },
  97644. VariableDeclaration: function VariableDeclaration(path) {
  97645. if (path.node.declare) {
  97646. path.remove();
  97647. }
  97648. },
  97649. VariableDeclarator: function VariableDeclarator(_ref3) {
  97650. var node = _ref3.node;
  97651. if (node.definite) node.definite = null;
  97652. },
  97653. TSIndexSignature: function TSIndexSignature(path) {
  97654. path.remove();
  97655. },
  97656. ClassDeclaration: function ClassDeclaration(path) {
  97657. var node = path.node;
  97658. if (node.declare) {
  97659. path.remove();
  97660. return;
  97661. }
  97662. },
  97663. Class: function Class(path) {
  97664. var node = path.node;
  97665. if (node.typeParameters) node.typeParameters = null;
  97666. if (node.superTypeParameters) node.superTypeParameters = null;
  97667. if (node["implements"]) node["implements"] = null;
  97668. if (node["abstract"]) node["abstract"] = null;
  97669. path.get("body.body").forEach(function (child) {
  97670. if (child.isClassMethod() || child.isClassPrivateMethod()) {
  97671. if (child.node.kind === "constructor") {
  97672. classMemberVisitors.constructor(child, path);
  97673. } else {
  97674. classMemberVisitors.method(child);
  97675. }
  97676. } else if (child.isClassProperty() || child.isClassPrivateProperty()) {
  97677. classMemberVisitors.field(child);
  97678. }
  97679. });
  97680. },
  97681. Function: function Function(path) {
  97682. var node = path.node,
  97683. scope = path.scope;
  97684. if (node.typeParameters) node.typeParameters = null;
  97685. if (node.returnType) node.returnType = null;
  97686. var params = node.params;
  97687. if (params.length > 0 && isIdentifier(params[0], {
  97688. name: "this"
  97689. })) {
  97690. params.shift();
  97691. }
  97692. var paramsPath = path.get("params");
  97693. for (var _iterator6 = _createForOfIteratorHelperLoose(paramsPath), _step6; !(_step6 = _iterator6()).done;) {
  97694. var p = _step6.value;
  97695. if (p.type === "TSParameterProperty") {
  97696. p.replaceWith(p.get("parameter"));
  97697. scope.registerBinding("param", p);
  97698. }
  97699. }
  97700. },
  97701. TSModuleDeclaration: function TSModuleDeclaration(path) {
  97702. transpileNamespace(path, t$p, allowNamespaces);
  97703. },
  97704. TSInterfaceDeclaration: function TSInterfaceDeclaration(path) {
  97705. path.remove();
  97706. },
  97707. TSTypeAliasDeclaration: function TSTypeAliasDeclaration(path) {
  97708. path.remove();
  97709. },
  97710. TSEnumDeclaration: function TSEnumDeclaration(path) {
  97711. transpileEnum(path, t$p);
  97712. },
  97713. TSImportEqualsDeclaration: function TSImportEqualsDeclaration(path) {
  97714. throw path.buildCodeFrameError("`import =` is not supported by @babel/plugin-transform-typescript\n" + "Please consider using " + "`import <moduleName> from '<moduleName>';` alongside " + "Typescript's --allowSyntheticDefaultImports option.");
  97715. },
  97716. TSExportAssignment: function TSExportAssignment(path) {
  97717. throw path.buildCodeFrameError("`export =` is not supported by @babel/plugin-transform-typescript\n" + "Please consider using `export <value>;`.");
  97718. },
  97719. TSTypeAssertion: function TSTypeAssertion(path) {
  97720. path.replaceWith(path.node.expression);
  97721. },
  97722. TSAsExpression: function TSAsExpression(path) {
  97723. var node = path.node;
  97724. do {
  97725. node = node.expression;
  97726. } while (isTSAsExpression(node));
  97727. path.replaceWith(node);
  97728. },
  97729. TSNonNullExpression: function TSNonNullExpression(path) {
  97730. path.replaceWith(path.node.expression);
  97731. },
  97732. CallExpression: function CallExpression(path) {
  97733. path.node.typeParameters = null;
  97734. },
  97735. OptionalCallExpression: function OptionalCallExpression(path) {
  97736. path.node.typeParameters = null;
  97737. },
  97738. NewExpression: function NewExpression(path) {
  97739. path.node.typeParameters = null;
  97740. },
  97741. JSXOpeningElement: function JSXOpeningElement(path) {
  97742. path.node.typeParameters = null;
  97743. },
  97744. TaggedTemplateExpression: function TaggedTemplateExpression(path) {
  97745. path.node.typeParameters = null;
  97746. }
  97747. }
  97748. };
  97749. function visitPattern(_ref4) {
  97750. var node = _ref4.node;
  97751. if (node.typeAnnotation) node.typeAnnotation = null;
  97752. if (isIdentifier(node) && node.optional) node.optional = null;
  97753. }
  97754. function isImportTypeOnly(_ref5) {
  97755. var binding = _ref5.binding,
  97756. programPath = _ref5.programPath,
  97757. pragmaImportName = _ref5.pragmaImportName,
  97758. pragmaFragImportName = _ref5.pragmaFragImportName;
  97759. for (var _iterator7 = _createForOfIteratorHelperLoose(binding.referencePaths), _step7; !(_step7 = _iterator7()).done;) {
  97760. var path = _step7.value;
  97761. if (!isInType(path)) {
  97762. return false;
  97763. }
  97764. }
  97765. if (binding.identifier.name !== pragmaImportName && binding.identifier.name !== pragmaFragImportName) {
  97766. return true;
  97767. }
  97768. var sourceFileHasJsx = false;
  97769. programPath.traverse({
  97770. "JSXElement|JSXFragment": function JSXElementJSXFragment(path) {
  97771. sourceFileHasJsx = true;
  97772. path.stop();
  97773. }
  97774. });
  97775. return !sourceFileHasJsx;
  97776. }
  97777. });
  97778. var _transformUnicodeEscapes = declare(function (api) {
  97779. api.assertVersion(7);
  97780. var surrogate = /[\ud800-\udfff]/g;
  97781. var unicodeEscape = /(\\+)u\{([0-9a-fA-F]+)\}/g;
  97782. function escape(code) {
  97783. var str = code.toString(16);
  97784. while (str.length < 4) {
  97785. str = "0" + str;
  97786. }
  97787. return "\\u" + str;
  97788. }
  97789. function replacer(match, backslashes, code) {
  97790. if (backslashes.length % 2 === 0) {
  97791. return match;
  97792. }
  97793. var _char = String.fromCodePoint(parseInt(code, 16));
  97794. var escaped = backslashes.slice(0, -1) + escape(_char.charCodeAt(0));
  97795. return _char.length === 1 ? escaped : escaped + escape(_char.charCodeAt(1));
  97796. }
  97797. function replaceUnicodeEscapes(str) {
  97798. return str.replace(unicodeEscape, replacer);
  97799. }
  97800. function getUnicodeEscape(str) {
  97801. var match;
  97802. while (match = unicodeEscape.exec(str)) {
  97803. if (match[1].length % 2 === 0) continue;
  97804. unicodeEscape.lastIndex = 0;
  97805. return match[0];
  97806. }
  97807. return null;
  97808. }
  97809. return {
  97810. name: "transform-unicode-escapes",
  97811. manipulateOptions: function manipulateOptions(_ref) {
  97812. var _generatorOpts$jsescO, _generatorOpts$jsescO2;
  97813. var generatorOpts = _ref.generatorOpts;
  97814. if (!generatorOpts.jsescOption) {
  97815. generatorOpts.jsescOption = {};
  97816. }
  97817. (_generatorOpts$jsescO2 = (_generatorOpts$jsescO = generatorOpts.jsescOption).minimal) != null ? _generatorOpts$jsescO2 : _generatorOpts$jsescO.minimal = false;
  97818. },
  97819. visitor: {
  97820. Identifier: function Identifier(path) {
  97821. var node = path.node,
  97822. key = path.key;
  97823. var name = node.name;
  97824. var replaced = name.replace(surrogate, function (c) {
  97825. return "_u" + c.charCodeAt(0).toString(16);
  97826. });
  97827. if (name === replaced) return;
  97828. var str = inherits(stringLiteral(name), node);
  97829. if (key === "key") {
  97830. path.replaceWith(str);
  97831. return;
  97832. }
  97833. var parentPath = path.parentPath,
  97834. scope = path.scope;
  97835. if (parentPath.isMemberExpression({
  97836. property: node
  97837. }) || parentPath.isOptionalMemberExpression({
  97838. property: node
  97839. })) {
  97840. parentPath.node.computed = true;
  97841. path.replaceWith(str);
  97842. return;
  97843. }
  97844. var binding = scope.getBinding(name);
  97845. if (binding) {
  97846. scope.rename(name, scope.generateUid(replaced));
  97847. return;
  97848. }
  97849. throw path.buildCodeFrameError("Can't reference '" + name + "' as a bare identifier");
  97850. },
  97851. "StringLiteral|DirectiveLiteral": function StringLiteralDirectiveLiteral(path) {
  97852. var node = path.node;
  97853. var extra = node.extra;
  97854. if (extra != null && extra.raw) extra.raw = replaceUnicodeEscapes(extra.raw);
  97855. },
  97856. TemplateElement: function TemplateElement(path) {
  97857. var node = path.node,
  97858. parentPath = path.parentPath;
  97859. var value = node.value;
  97860. var firstEscape = getUnicodeEscape(value.raw);
  97861. if (!firstEscape) return;
  97862. var grandParent = parentPath.parentPath;
  97863. if (grandParent.isTaggedTemplateExpression()) {
  97864. throw path.buildCodeFrameError("Can't replace Unicode escape '" + firstEscape + "' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.");
  97865. }
  97866. value.raw = replaceUnicodeEscapes(value.raw);
  97867. }
  97868. }
  97869. };
  97870. });
  97871. var _transformUnicodeRegex = declare(function (api) {
  97872. api.assertVersion(7);
  97873. return createRegExpFeaturePlugin({
  97874. name: "transform-unicode-regex",
  97875. feature: "unicodeFlag"
  97876. });
  97877. });
  97878. var all = {
  97879. "external-helpers": externalHelpers,
  97880. "syntax-async-generators": lib$q,
  97881. "syntax-class-properties": lib$p,
  97882. "syntax-class-static-block": _syntaxClassStaticBlock,
  97883. "syntax-decimal": syntaxDecimal,
  97884. "syntax-decorators": syntaxDecorators,
  97885. "syntax-do-expressions": syntaxDoExpressions,
  97886. "syntax-export-default-from": syntaxExportDefaultFrom,
  97887. "syntax-flow": syntaxFlow,
  97888. "syntax-function-bind": syntaxFunctionBind,
  97889. "syntax-function-sent": syntaxFunctionSent,
  97890. "syntax-module-blocks": syntaxModuleBlocks,
  97891. "syntax-import-meta": lib$o,
  97892. "syntax-jsx": syntaxJsx,
  97893. "syntax-import-assertions": syntaxImportAssertions,
  97894. "syntax-object-rest-spread": lib$n,
  97895. "syntax-optional-catch-binding": lib$m,
  97896. "syntax-pipeline-operator": syntaxPipelineOperator,
  97897. "syntax-record-and-tuple": syntaxRecordAndTuple,
  97898. "syntax-top-level-await": _syntaxTopLevelAwait,
  97899. "syntax-typescript": syntaxTypescript,
  97900. "proposal-async-generator-functions": _proposalAsyncGeneratorFunctions,
  97901. "proposal-class-properties": _proposalClassProperties,
  97902. "proposal-class-static-block": _proposalClassStaticBlock,
  97903. "proposal-decorators": proposalDecorators,
  97904. "proposal-do-expressions": proposalDoExpressions,
  97905. "proposal-dynamic-import": _proposalDynamicImport,
  97906. "proposal-export-default-from": proposalExportDefaultFrom,
  97907. "proposal-export-namespace-from": _proposalExportNamespaceFrom,
  97908. "proposal-function-bind": proposalFunctionBind,
  97909. "proposal-function-sent": proposalFunctionSent,
  97910. "proposal-json-strings": _proposalJsonStrings,
  97911. "proposal-logical-assignment-operators": _proposalLogicalAssignmentOperators,
  97912. "proposal-nullish-coalescing-operator": _proposalNullishCoalescingOperator,
  97913. "proposal-numeric-separator": _proposalNumericSeparator,
  97914. "proposal-object-rest-spread": _proposalObjectRestSpread,
  97915. "proposal-optional-catch-binding": _proposalOptionalCatchBinding,
  97916. "proposal-optional-chaining": _proposalOptionalChaining,
  97917. "proposal-pipeline-operator": proposalPipelineOperator,
  97918. "proposal-private-methods": _proposalPrivateMethods,
  97919. "proposal-private-property-in-object": _proposalPrivatePropertyInObject,
  97920. "proposal-throw-expressions": proposalThrowExpressions,
  97921. "proposal-unicode-property-regex": _proposalUnicodePropertyRegex,
  97922. "transform-async-to-generator": _transformAsyncToGenerator,
  97923. "transform-arrow-functions": _transformArrowFunctions,
  97924. "transform-block-scoped-functions": _transformBlockScopedFunctions,
  97925. "transform-block-scoping": _transformBlockScoping,
  97926. "transform-classes": _transformClasses,
  97927. "transform-computed-properties": _transformComputedProperties,
  97928. "transform-destructuring": _transformDestructuring,
  97929. "transform-dotall-regex": _transformDotallRegex,
  97930. "transform-duplicate-keys": _transformDuplicateKeys,
  97931. "transform-exponentiation-operator": transformExponentialOperator,
  97932. "transform-flow-comments": transformFlowComments,
  97933. "transform-flow-strip-types": transformFlowStripTypes,
  97934. "transform-for-of": _transformForOf,
  97935. "transform-function-name": _transformFunctionName,
  97936. "transform-instanceof": transformInstanceof,
  97937. "transform-jscript": transformJscript,
  97938. "transform-literals": _transformLiterals,
  97939. "transform-member-expression-literals": _transformMemberExpressionLiterals,
  97940. "transform-modules-amd": _transformModulesAmd,
  97941. "transform-modules-commonjs": _transformModulesCommonjs,
  97942. "transform-modules-systemjs": _transformModulesSystemjs,
  97943. "transform-modules-umd": _transformModulesUmd,
  97944. "transform-named-capturing-groups-regex": _transformNamedCapturingGroupsRegex,
  97945. "transform-new-target": _transformNewTarget,
  97946. "transform-object-assign": transformObjectAssign,
  97947. "transform-object-super": _transformObjectSuper,
  97948. "transform-object-set-prototype-of-to-assign": transformObjectSetPrototypeOfToAssign,
  97949. "transform-parameters": _transformParameters,
  97950. "transform-property-literals": _transformPropertyLiterals,
  97951. "transform-property-mutators": transformPropertyMutators,
  97952. "transform-proto-to-assign": transformProtoToAssign,
  97953. "transform-react-constant-elements": transformReactConstantElements,
  97954. "transform-react-display-name": transformReactDisplayName,
  97955. "transform-react-inline-elements": transformReactInlineElements,
  97956. "transform-react-jsx": transformReactJSX,
  97957. "transform-react-jsx-compat": transformReactJsxCompat,
  97958. "transform-react-jsx-development": transformReactJSXDevelopment,
  97959. "transform-react-jsx-self": transformReactJsxSelf,
  97960. "transform-react-jsx-source": transformReactJsxSource,
  97961. "transform-regenerator": _transformRegenerator,
  97962. "transform-reserved-words": _transformReservedWords,
  97963. "transform-runtime": transformRuntime,
  97964. "transform-shorthand-properties": _transformShorthandProperties,
  97965. "transform-spread": _transformSpread,
  97966. "transform-sticky-regex": _transformStickyRegex,
  97967. "transform-strict-mode": transformStrictMode,
  97968. "transform-template-literals": _transformTemplateLiterals,
  97969. "transform-typeof-symbol": _transformTypeofSymbol,
  97970. "transform-typescript": transformTypeScript,
  97971. "transform-unicode-escapes": _transformUnicodeEscapes,
  97972. "transform-unicode-regex": _transformUnicodeRegex
  97973. };
  97974. var preset2015 = (function (_, opts) {
  97975. var loose = false;
  97976. var modules = "commonjs";
  97977. var spec = false;
  97978. if (opts !== undefined) {
  97979. if (opts.loose !== undefined) loose = opts.loose;
  97980. if (opts.modules !== undefined) modules = opts.modules;
  97981. if (opts.spec !== undefined) spec = opts.spec;
  97982. }
  97983. var optsLoose = {
  97984. loose: loose
  97985. };
  97986. return {
  97987. plugins: [[_transformTemplateLiterals, {
  97988. loose: loose,
  97989. spec: spec
  97990. }], _transformLiterals, _transformFunctionName, [_transformArrowFunctions, {
  97991. spec: spec
  97992. }], _transformBlockScopedFunctions, [_transformClasses, optsLoose], _transformObjectSuper, _transformShorthandProperties, _transformDuplicateKeys, [_transformComputedProperties, optsLoose], [_transformForOf, optsLoose], _transformStickyRegex, _transformUnicodeEscapes, _transformUnicodeRegex, [_transformSpread, optsLoose], [_transformParameters, optsLoose], [_transformDestructuring, optsLoose], _transformBlockScoping, _transformTypeofSymbol, transformInstanceof, (modules === "commonjs" || modules === "cjs") && [_transformModulesCommonjs, optsLoose], modules === "systemjs" && [_transformModulesSystemjs, optsLoose], modules === "amd" && [_transformModulesAmd, optsLoose], modules === "umd" && [_transformModulesUmd, optsLoose], [_transformRegenerator, {
  97993. async: false,
  97994. asyncGenerators: false
  97995. }]].filter(Boolean)
  97996. };
  97997. });
  97998. var presetStage3 = (function (_, opts) {
  97999. var loose = false;
  98000. if (opts !== undefined) {
  98001. if (opts.loose !== undefined) loose = opts.loose;
  98002. }
  98003. return {
  98004. plugins: [syntaxImportAssertions, lib$o, _syntaxTopLevelAwait, _proposalExportNamespaceFrom, _proposalLogicalAssignmentOperators, [_proposalOptionalChaining, {
  98005. loose: loose
  98006. }], [_proposalNullishCoalescingOperator, {
  98007. loose: loose
  98008. }], [_proposalClassProperties, {
  98009. loose: loose
  98010. }], _proposalJsonStrings, _proposalNumericSeparator, [_proposalPrivateMethods, {
  98011. loose: loose
  98012. }]]
  98013. };
  98014. });
  98015. var presetStage2 = (function (_, opts) {
  98016. if (opts === void 0) {
  98017. opts = {};
  98018. }
  98019. var _opts = opts,
  98020. _opts$loose = _opts.loose,
  98021. loose = _opts$loose === void 0 ? false : _opts$loose,
  98022. _opts$useBuiltIns = _opts.useBuiltIns,
  98023. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  98024. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  98025. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  98026. decoratorsBeforeExport = _opts.decoratorsBeforeExport;
  98027. return {
  98028. presets: [[presetStage3, {
  98029. loose: loose,
  98030. useBuiltIns: useBuiltIns
  98031. }]],
  98032. plugins: [_proposalClassStaticBlock, [proposalDecorators, {
  98033. legacy: decoratorsLegacy,
  98034. decoratorsBeforeExport: decoratorsBeforeExport
  98035. }], proposalFunctionSent, _proposalPrivatePropertyInObject, proposalThrowExpressions]
  98036. };
  98037. });
  98038. var presetStage1 = (function (_, opts) {
  98039. if (opts === void 0) {
  98040. opts = {};
  98041. }
  98042. var _opts = opts,
  98043. _opts$loose = _opts.loose,
  98044. loose = _opts$loose === void 0 ? false : _opts$loose,
  98045. _opts$useBuiltIns = _opts.useBuiltIns,
  98046. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  98047. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  98048. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  98049. decoratorsBeforeExport = _opts.decoratorsBeforeExport,
  98050. _opts$pipelineProposa = _opts.pipelineProposal,
  98051. pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa,
  98052. _opts$recordAndTupleS = _opts.recordAndTupleSyntax,
  98053. recordAndTupleSyntax = _opts$recordAndTupleS === void 0 ? "hash" : _opts$recordAndTupleS;
  98054. return {
  98055. presets: [[presetStage2, {
  98056. loose: loose,
  98057. useBuiltIns: useBuiltIns,
  98058. decoratorsLegacy: decoratorsLegacy,
  98059. decoratorsBeforeExport: decoratorsBeforeExport
  98060. }]],
  98061. plugins: [syntaxDecimal, [syntaxRecordAndTuple, {
  98062. syntaxType: recordAndTupleSyntax
  98063. }], syntaxModuleBlocks, proposalExportDefaultFrom, [proposalPipelineOperator, {
  98064. proposal: pipelineProposal
  98065. }], proposalDoExpressions]
  98066. };
  98067. });
  98068. var presetStage0 = (function (_, opts) {
  98069. if (opts === void 0) {
  98070. opts = {};
  98071. }
  98072. var _opts = opts,
  98073. _opts$loose = _opts.loose,
  98074. loose = _opts$loose === void 0 ? false : _opts$loose,
  98075. _opts$useBuiltIns = _opts.useBuiltIns,
  98076. useBuiltIns = _opts$useBuiltIns === void 0 ? false : _opts$useBuiltIns,
  98077. _opts$decoratorsLegac = _opts.decoratorsLegacy,
  98078. decoratorsLegacy = _opts$decoratorsLegac === void 0 ? false : _opts$decoratorsLegac,
  98079. decoratorsBeforeExport = _opts.decoratorsBeforeExport,
  98080. _opts$pipelineProposa = _opts.pipelineProposal,
  98081. pipelineProposal = _opts$pipelineProposa === void 0 ? "minimal" : _opts$pipelineProposa,
  98082. _opts$importAssertion = _opts.importAssertionsVersion,
  98083. importAssertionsVersion = _opts$importAssertion === void 0 ? "september-2020" : _opts$importAssertion;
  98084. return {
  98085. presets: [[presetStage1, {
  98086. loose: loose,
  98087. useBuiltIns: useBuiltIns,
  98088. decoratorsLegacy: decoratorsLegacy,
  98089. decoratorsBeforeExport: decoratorsBeforeExport,
  98090. pipelineProposal: pipelineProposal,
  98091. importAssertionsVersion: importAssertionsVersion
  98092. }]],
  98093. plugins: [proposalFunctionBind]
  98094. };
  98095. });
  98096. var logPlugin = function logPlugin(item, targetVersions, list) {
  98097. var filteredList = getInclusionReasons(item, targetVersions, list);
  98098. var support = list[item];
  98099. if (!support) {
  98100. console.log(" " + item);
  98101. return;
  98102. }
  98103. var formattedTargets = "{";
  98104. var first = true;
  98105. for (var _i = 0, _Object$keys = Object.keys(filteredList); _i < _Object$keys.length; _i++) {
  98106. var target = _Object$keys[_i];
  98107. if (!first) formattedTargets += ",";
  98108. first = false;
  98109. formattedTargets += " " + target;
  98110. if (support[target]) formattedTargets += " < " + support[target];
  98111. }
  98112. formattedTargets += " }";
  98113. console.log(" " + item + " " + formattedTargets);
  98114. };
  98115. var defaultExcludesForLooseMode = ["transform-typeof-symbol"];
  98116. function getOptionSpecificExcludesFor (_ref) {
  98117. var loose = _ref.loose;
  98118. return loose ? defaultExcludesForLooseMode : null;
  98119. }
  98120. var lib$a = createCommonjsModule(function (module, exports) {
  98121. Object.defineProperty(exports, "__esModule", {
  98122. value: true
  98123. });
  98124. exports["default"] = void 0;
  98125. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98126. api.assertVersion(7);
  98127. return {
  98128. name: "syntax-async-generators",
  98129. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98130. parserOpts.plugins.push("asyncGenerators");
  98131. }
  98132. };
  98133. });
  98134. exports["default"] = _default;
  98135. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-async-generators/lib");
  98136. var lib$9 = createCommonjsModule(function (module, exports) {
  98137. Object.defineProperty(exports, "__esModule", {
  98138. value: true
  98139. });
  98140. exports["default"] = void 0;
  98141. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98142. api.assertVersion(7);
  98143. return {
  98144. name: "syntax-class-properties",
  98145. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98146. parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods");
  98147. }
  98148. };
  98149. });
  98150. exports["default"] = _default;
  98151. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-class-properties/lib");
  98152. var lib$8 = createCommonjsModule(function (module, exports) {
  98153. Object.defineProperty(exports, "__esModule", {
  98154. value: true
  98155. });
  98156. exports["default"] = void 0;
  98157. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98158. api.assertVersion(7);
  98159. return {
  98160. name: "syntax-dynamic-import",
  98161. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98162. parserOpts.plugins.push("dynamicImport");
  98163. }
  98164. };
  98165. });
  98166. exports["default"] = _default;
  98167. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-dynamic-import/lib");
  98168. var lib$7 = createCommonjsModule(function (module, exports) {
  98169. Object.defineProperty(exports, "__esModule", {
  98170. value: true
  98171. });
  98172. exports["default"] = void 0;
  98173. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98174. api.assertVersion(7);
  98175. return {
  98176. name: "syntax-export-namespace-from",
  98177. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98178. parserOpts.plugins.push("exportNamespaceFrom");
  98179. }
  98180. };
  98181. });
  98182. exports["default"] = _default;
  98183. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-export-namespace-from/lib");
  98184. var lib$6 = createCommonjsModule(function (module, exports) {
  98185. Object.defineProperty(exports, "__esModule", {
  98186. value: true
  98187. });
  98188. exports["default"] = void 0;
  98189. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98190. api.assertVersion(7);
  98191. return {
  98192. name: "syntax-json-strings",
  98193. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98194. parserOpts.plugins.push("jsonStrings");
  98195. }
  98196. };
  98197. });
  98198. exports["default"] = _default;
  98199. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-json-strings/lib");
  98200. var lib$5 = createCommonjsModule(function (module, exports) {
  98201. Object.defineProperty(exports, "__esModule", {
  98202. value: true
  98203. });
  98204. exports["default"] = void 0;
  98205. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98206. api.assertVersion(7);
  98207. return {
  98208. name: "syntax-logical-assignment-operators",
  98209. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98210. parserOpts.plugins.push("logicalAssignment");
  98211. }
  98212. };
  98213. });
  98214. exports["default"] = _default;
  98215. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-logical-assignment-operators/lib");
  98216. var lib$4 = createCommonjsModule(function (module, exports) {
  98217. Object.defineProperty(exports, "__esModule", {
  98218. value: true
  98219. });
  98220. exports["default"] = void 0;
  98221. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98222. api.assertVersion(7);
  98223. return {
  98224. name: "syntax-nullish-coalescing-operator",
  98225. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98226. parserOpts.plugins.push("nullishCoalescingOperator");
  98227. }
  98228. };
  98229. });
  98230. exports["default"] = _default;
  98231. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib");
  98232. var lib$3 = createCommonjsModule(function (module, exports) {
  98233. Object.defineProperty(exports, "__esModule", {
  98234. value: true
  98235. });
  98236. exports["default"] = void 0;
  98237. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98238. api.assertVersion(7);
  98239. return {
  98240. name: "syntax-numeric-separator",
  98241. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98242. parserOpts.plugins.push("numericSeparator");
  98243. }
  98244. };
  98245. });
  98246. exports["default"] = _default;
  98247. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-numeric-separator/lib");
  98248. var lib$2 = createCommonjsModule(function (module, exports) {
  98249. Object.defineProperty(exports, "__esModule", {
  98250. value: true
  98251. });
  98252. exports["default"] = void 0;
  98253. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98254. api.assertVersion(7);
  98255. return {
  98256. name: "syntax-object-rest-spread",
  98257. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98258. parserOpts.plugins.push("objectRestSpread");
  98259. }
  98260. };
  98261. });
  98262. exports["default"] = _default;
  98263. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-object-rest-spread/lib");
  98264. var lib$1 = createCommonjsModule(function (module, exports) {
  98265. Object.defineProperty(exports, "__esModule", {
  98266. value: true
  98267. });
  98268. exports["default"] = void 0;
  98269. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98270. api.assertVersion(7);
  98271. return {
  98272. name: "syntax-optional-catch-binding",
  98273. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98274. parserOpts.plugins.push("optionalCatchBinding");
  98275. }
  98276. };
  98277. });
  98278. exports["default"] = _default;
  98279. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-optional-catch-binding/lib");
  98280. var lib = createCommonjsModule(function (module, exports) {
  98281. Object.defineProperty(exports, "__esModule", {
  98282. value: true
  98283. });
  98284. exports["default"] = void 0;
  98285. var _default = (0, _helperPluginUtils.declare)(function (api) {
  98286. api.assertVersion(7);
  98287. return {
  98288. name: "syntax-optional-chaining",
  98289. manipulateOptions: function manipulateOptions(opts, parserOpts) {
  98290. parserOpts.plugins.push("optionalChaining");
  98291. }
  98292. };
  98293. });
  98294. exports["default"] = _default;
  98295. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/plugin-syntax-optional-chaining/lib");
  98296. var transformAsyncArrowsInClass = createCommonjsModule(function (module, exports) {
  98297. exports.__esModule = true;
  98298. exports["default"] = void 0;
  98299. var OPTS = {
  98300. allowInsertArrow: false,
  98301. specCompliant: false
  98302. };
  98303. var _default = function _default(_ref) {
  98304. var t = _ref.types;
  98305. return {
  98306. name: "transform-async-arrows-in-class",
  98307. visitor: {
  98308. ArrowFunctionExpression: function ArrowFunctionExpression(path) {
  98309. if (path.node.async && path.findParent(t.isClassMethod)) {
  98310. path.arrowFunctionToExpression(OPTS);
  98311. }
  98312. }
  98313. }
  98314. };
  98315. };
  98316. exports["default"] = _default;
  98317. module.exports = exports["default"];
  98318. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
  98319. var transformEdgeDefaultParameters = createCommonjsModule(function (module, exports) {
  98320. exports.__esModule = true;
  98321. exports["default"] = void 0;
  98322. var _default = function _default(_ref) {
  98323. var t = _ref.types;
  98324. var isArrowParent = function isArrowParent(p) {
  98325. return p.parentKey === "params" && p.parentPath && t.isArrowFunctionExpression(p.parentPath);
  98326. };
  98327. return {
  98328. name: "transform-edge-default-parameters",
  98329. visitor: {
  98330. AssignmentPattern: function AssignmentPattern(path) {
  98331. var arrowArgParent = path.find(isArrowParent);
  98332. if (arrowArgParent && path.parent.shorthand) {
  98333. path.parent.shorthand = false;
  98334. (path.parent.extra || {}).shorthand = false;
  98335. path.scope.rename(path.parent.key.name);
  98336. }
  98337. }
  98338. }
  98339. };
  98340. };
  98341. exports["default"] = _default;
  98342. module.exports = exports["default"];
  98343. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
  98344. var transformEdgeFunctionName = createCommonjsModule(function (module, exports) {
  98345. exports.__esModule = true;
  98346. exports["default"] = void 0;
  98347. var _default = function _default(_ref) {
  98348. var t = _ref.types;
  98349. return {
  98350. name: "transform-edge-function-name",
  98351. visitor: {
  98352. FunctionExpression: {
  98353. exit: function exit(path) {
  98354. if (!path.node.id && t.isIdentifier(path.parent.id)) {
  98355. var id = t.cloneNode(path.parent.id);
  98356. var binding = path.scope.getBinding(id.name);
  98357. if (binding == null ? void 0 : binding.constantViolations.length) {
  98358. path.scope.rename(id.name);
  98359. }
  98360. path.node.id = id;
  98361. }
  98362. }
  98363. }
  98364. }
  98365. };
  98366. };
  98367. exports["default"] = _default;
  98368. module.exports = exports["default"];
  98369. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-edge-function-name");
  98370. var transformTaggedTemplateCaching = createCommonjsModule(function (module, exports) {
  98371. exports.__esModule = true;
  98372. exports["default"] = void 0;
  98373. var _default = function _default(_ref) {
  98374. var t = _ref.types;
  98375. return {
  98376. name: "transform-tagged-template-caching",
  98377. visitor: {
  98378. TaggedTemplateExpression: function TaggedTemplateExpression(path, state) {
  98379. var processed = state.get("processed");
  98380. if (!processed) {
  98381. processed = new Map();
  98382. state.set("processed", processed);
  98383. }
  98384. if (processed.has(path.node)) return path.skip();
  98385. var expressions = path.node.quasi.expressions;
  98386. var identity = state.get("identity");
  98387. if (!identity) {
  98388. identity = path.scope.getProgramParent().generateDeclaredUidIdentifier("_");
  98389. state.set("identity", identity);
  98390. var binding = path.scope.getBinding(identity.name);
  98391. binding.path.get("init").replaceWith(t.arrowFunctionExpression([t.identifier("t")], t.identifier("t")));
  98392. }
  98393. var template = t.taggedTemplateExpression(identity, t.templateLiteral(path.node.quasi.quasis, expressions.map(function () {
  98394. return t.numericLiteral(0);
  98395. })));
  98396. processed.set(template, true);
  98397. var ident = path.scope.getProgramParent().generateDeclaredUidIdentifier("t");
  98398. path.scope.getBinding(ident.name).path.parent.kind = "let";
  98399. var inlineCache = t.logicalExpression("||", ident, t.assignmentExpression("=", ident, template));
  98400. var node = t.callExpression(path.node.tag, [inlineCache].concat(_toConsumableArray(expressions)));
  98401. path.replaceWith(node);
  98402. }
  98403. }
  98404. };
  98405. };
  98406. exports["default"] = _default;
  98407. module.exports = exports["default"];
  98408. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
  98409. var transformSafariBlockShadowing = createCommonjsModule(function (module, exports) {
  98410. exports.__esModule = true;
  98411. exports["default"] = _default;
  98412. function _default(_ref) {
  98413. var t = _ref.types;
  98414. return {
  98415. name: "transform-safari-block-shadowing",
  98416. visitor: {
  98417. VariableDeclarator: function VariableDeclarator(path) {
  98418. var kind = path.parent.kind;
  98419. if (kind !== "let" && kind !== "const") return;
  98420. var block = path.scope.block;
  98421. if (t.isFunction(block) || t.isProgram(block)) return;
  98422. var bindings = t.getOuterBindingIdentifiers(path.node.id);
  98423. for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) {
  98424. var name = _Object$keys[_i];
  98425. var scope = path.scope;
  98426. if (!scope.hasOwnBinding(name)) continue;
  98427. while (scope = scope.parent) {
  98428. if (scope.hasOwnBinding(name)) {
  98429. path.scope.rename(name);
  98430. break;
  98431. }
  98432. if (t.isFunction(scope.block) || t.isProgram(scope.block)) {
  98433. break;
  98434. }
  98435. }
  98436. }
  98437. }
  98438. }
  98439. };
  98440. }
  98441. module.exports = exports["default"];
  98442. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
  98443. var transformSafariForShadowing = createCommonjsModule(function (module, exports) {
  98444. exports.__esModule = true;
  98445. exports["default"] = void 0;
  98446. function handle(declaration) {
  98447. if (!declaration.isVariableDeclaration()) return;
  98448. var fn = declaration.getFunctionParent();
  98449. var name = declaration.node.declarations[0].id.name;
  98450. if (fn && fn.scope.hasOwnBinding(name) && fn.scope.getOwnBinding(name).kind === "param") {
  98451. declaration.scope.rename(name);
  98452. }
  98453. }
  98454. var _default = function _default() {
  98455. return {
  98456. name: "transform-safari-for-shadowing",
  98457. visitor: {
  98458. ForXStatement: function ForXStatement(path) {
  98459. handle(path.get("left"));
  98460. },
  98461. ForStatement: function ForStatement(path) {
  98462. handle(path.get("init"));
  98463. }
  98464. }
  98465. };
  98466. };
  98467. exports["default"] = _default;
  98468. module.exports = exports["default"];
  98469. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
  98470. function matchAffectedArguments(argumentNodes) {
  98471. var spreadIndex = argumentNodes.findIndex(function (node) {
  98472. return isSpreadElement(node);
  98473. });
  98474. return spreadIndex >= 0 && spreadIndex !== argumentNodes.length - 1;
  98475. }
  98476. function shouldTransform(path) {
  98477. var optionalPath = path;
  98478. var chains = [];
  98479. while (optionalPath.isOptionalMemberExpression() || optionalPath.isOptionalCallExpression()) {
  98480. var _optionalPath = optionalPath,
  98481. node = _optionalPath.node;
  98482. chains.push(node);
  98483. if (optionalPath.isOptionalMemberExpression()) {
  98484. optionalPath = skipTransparentExprWrappers(optionalPath.get("object"));
  98485. } else if (optionalPath.isOptionalCallExpression()) {
  98486. optionalPath = skipTransparentExprWrappers(optionalPath.get("callee"));
  98487. }
  98488. }
  98489. for (var i = 0; i < chains.length; i++) {
  98490. var _node = chains[i];
  98491. if (isOptionalCallExpression(_node) && matchAffectedArguments(_node.arguments)) {
  98492. if (_node.optional) {
  98493. return true;
  98494. }
  98495. var callee = chains[i + 1];
  98496. if (isOptionalMemberExpression(callee, {
  98497. optional: true
  98498. })) {
  98499. return true;
  98500. }
  98501. }
  98502. }
  98503. return false;
  98504. }
  98505. var bugfixV8SpreadParametersInOptionalChaining = declare(function (api) {
  98506. api.assertVersion(7);
  98507. var noDocumentAll = api.assumption("noDocumentAll");
  98508. var pureGetters = api.assumption("pureGetters");
  98509. return {
  98510. name: "bugfix-v8-spread-parameters-in-optional-chaining",
  98511. visitor: {
  98512. "OptionalCallExpression|OptionalMemberExpression": function OptionalCallExpressionOptionalMemberExpression(path) {
  98513. if (shouldTransform(path)) {
  98514. transform$1(path, {
  98515. noDocumentAll: noDocumentAll,
  98516. pureGetters: pureGetters
  98517. });
  98518. }
  98519. }
  98520. }
  98521. };
  98522. });
  98523. var availablePlugins$1 = {
  98524. "bugfix/transform-async-arrows-in-class": function bugfixTransformAsyncArrowsInClass() {
  98525. return transformAsyncArrowsInClass;
  98526. },
  98527. "bugfix/transform-edge-default-parameters": function bugfixTransformEdgeDefaultParameters() {
  98528. return transformEdgeDefaultParameters;
  98529. },
  98530. "bugfix/transform-edge-function-name": function bugfixTransformEdgeFunctionName() {
  98531. return transformEdgeFunctionName;
  98532. },
  98533. "bugfix/transform-safari-block-shadowing": function bugfixTransformSafariBlockShadowing() {
  98534. return transformSafariBlockShadowing;
  98535. },
  98536. "bugfix/transform-safari-for-shadowing": function bugfixTransformSafariForShadowing() {
  98537. return transformSafariForShadowing;
  98538. },
  98539. "bugfix/transform-tagged-template-caching": function bugfixTransformTaggedTemplateCaching() {
  98540. return transformTaggedTemplateCaching;
  98541. },
  98542. "bugfix/transform-v8-spread-parameters-in-optional-chaining": function bugfixTransformV8SpreadParametersInOptionalChaining() {
  98543. return bugfixV8SpreadParametersInOptionalChaining;
  98544. },
  98545. "proposal-async-generator-functions": function proposalAsyncGeneratorFunctions() {
  98546. return _proposalAsyncGeneratorFunctions;
  98547. },
  98548. "proposal-class-properties": function proposalClassProperties() {
  98549. return _proposalClassProperties;
  98550. },
  98551. "proposal-class-static-block": function proposalClassStaticBlock() {
  98552. return _proposalClassStaticBlock;
  98553. },
  98554. "proposal-dynamic-import": function proposalDynamicImport() {
  98555. return _proposalDynamicImport;
  98556. },
  98557. "proposal-export-namespace-from": function proposalExportNamespaceFrom() {
  98558. return _proposalExportNamespaceFrom;
  98559. },
  98560. "proposal-json-strings": function proposalJsonStrings() {
  98561. return _proposalJsonStrings;
  98562. },
  98563. "proposal-logical-assignment-operators": function proposalLogicalAssignmentOperators() {
  98564. return _proposalLogicalAssignmentOperators;
  98565. },
  98566. "proposal-nullish-coalescing-operator": function proposalNullishCoalescingOperator() {
  98567. return _proposalNullishCoalescingOperator;
  98568. },
  98569. "proposal-numeric-separator": function proposalNumericSeparator() {
  98570. return _proposalNumericSeparator;
  98571. },
  98572. "proposal-object-rest-spread": function proposalObjectRestSpread() {
  98573. return _proposalObjectRestSpread;
  98574. },
  98575. "proposal-optional-catch-binding": function proposalOptionalCatchBinding() {
  98576. return _proposalOptionalCatchBinding;
  98577. },
  98578. "proposal-optional-chaining": function proposalOptionalChaining() {
  98579. return _proposalOptionalChaining;
  98580. },
  98581. "proposal-private-methods": function proposalPrivateMethods() {
  98582. return _proposalPrivateMethods;
  98583. },
  98584. "proposal-private-property-in-object": function proposalPrivatePropertyInObject() {
  98585. return _proposalPrivatePropertyInObject;
  98586. },
  98587. "proposal-unicode-property-regex": function proposalUnicodePropertyRegex() {
  98588. return _proposalUnicodePropertyRegex;
  98589. },
  98590. "syntax-async-generators": function syntaxAsyncGenerators() {
  98591. return lib$a;
  98592. },
  98593. "syntax-class-properties": function syntaxClassProperties() {
  98594. return lib$9;
  98595. },
  98596. "syntax-class-static-block": function syntaxClassStaticBlock() {
  98597. return _syntaxClassStaticBlock;
  98598. },
  98599. "syntax-dynamic-import": function syntaxDynamicImport() {
  98600. return lib$8;
  98601. },
  98602. "syntax-export-namespace-from": function syntaxExportNamespaceFrom() {
  98603. return lib$7;
  98604. },
  98605. "syntax-json-strings": function syntaxJsonStrings() {
  98606. return lib$6;
  98607. },
  98608. "syntax-logical-assignment-operators": function syntaxLogicalAssignmentOperators() {
  98609. return lib$5;
  98610. },
  98611. "syntax-nullish-coalescing-operator": function syntaxNullishCoalescingOperator() {
  98612. return lib$4;
  98613. },
  98614. "syntax-numeric-separator": function syntaxNumericSeparator() {
  98615. return lib$3;
  98616. },
  98617. "syntax-object-rest-spread": function syntaxObjectRestSpread() {
  98618. return lib$2;
  98619. },
  98620. "syntax-optional-catch-binding": function syntaxOptionalCatchBinding() {
  98621. return lib$1;
  98622. },
  98623. "syntax-optional-chaining": function syntaxOptionalChaining() {
  98624. return lib;
  98625. },
  98626. "syntax-private-property-in-object": function syntaxPrivatePropertyInObject() {
  98627. return _syntaxPrivatePropertyInObject;
  98628. },
  98629. "syntax-top-level-await": function syntaxTopLevelAwait() {
  98630. return _syntaxTopLevelAwait;
  98631. },
  98632. "transform-arrow-functions": function transformArrowFunctions() {
  98633. return _transformArrowFunctions;
  98634. },
  98635. "transform-async-to-generator": function transformAsyncToGenerator() {
  98636. return _transformAsyncToGenerator;
  98637. },
  98638. "transform-block-scoped-functions": function transformBlockScopedFunctions() {
  98639. return _transformBlockScopedFunctions;
  98640. },
  98641. "transform-block-scoping": function transformBlockScoping() {
  98642. return _transformBlockScoping;
  98643. },
  98644. "transform-classes": function transformClasses() {
  98645. return _transformClasses;
  98646. },
  98647. "transform-computed-properties": function transformComputedProperties() {
  98648. return _transformComputedProperties;
  98649. },
  98650. "transform-destructuring": function transformDestructuring() {
  98651. return _transformDestructuring;
  98652. },
  98653. "transform-dotall-regex": function transformDotallRegex() {
  98654. return _transformDotallRegex;
  98655. },
  98656. "transform-duplicate-keys": function transformDuplicateKeys() {
  98657. return _transformDuplicateKeys;
  98658. },
  98659. "transform-exponentiation-operator": function transformExponentiationOperator() {
  98660. return transformExponentialOperator;
  98661. },
  98662. "transform-for-of": function transformForOf() {
  98663. return _transformForOf;
  98664. },
  98665. "transform-function-name": function transformFunctionName() {
  98666. return _transformFunctionName;
  98667. },
  98668. "transform-literals": function transformLiterals() {
  98669. return _transformLiterals;
  98670. },
  98671. "transform-member-expression-literals": function transformMemberExpressionLiterals() {
  98672. return _transformMemberExpressionLiterals;
  98673. },
  98674. "transform-modules-amd": function transformModulesAmd() {
  98675. return _transformModulesAmd;
  98676. },
  98677. "transform-modules-commonjs": function transformModulesCommonjs() {
  98678. return _transformModulesCommonjs;
  98679. },
  98680. "transform-modules-systemjs": function transformModulesSystemjs() {
  98681. return _transformModulesSystemjs;
  98682. },
  98683. "transform-modules-umd": function transformModulesUmd() {
  98684. return _transformModulesUmd;
  98685. },
  98686. "transform-named-capturing-groups-regex": function transformNamedCapturingGroupsRegex() {
  98687. return _transformNamedCapturingGroupsRegex;
  98688. },
  98689. "transform-new-target": function transformNewTarget() {
  98690. return _transformNewTarget;
  98691. },
  98692. "transform-object-super": function transformObjectSuper() {
  98693. return _transformObjectSuper;
  98694. },
  98695. "transform-parameters": function transformParameters() {
  98696. return _transformParameters;
  98697. },
  98698. "transform-property-literals": function transformPropertyLiterals() {
  98699. return _transformPropertyLiterals;
  98700. },
  98701. "transform-regenerator": function transformRegenerator() {
  98702. return _transformRegenerator;
  98703. },
  98704. "transform-reserved-words": function transformReservedWords() {
  98705. return _transformReservedWords;
  98706. },
  98707. "transform-shorthand-properties": function transformShorthandProperties() {
  98708. return _transformShorthandProperties;
  98709. },
  98710. "transform-spread": function transformSpread() {
  98711. return _transformSpread;
  98712. },
  98713. "transform-sticky-regex": function transformStickyRegex() {
  98714. return _transformStickyRegex;
  98715. },
  98716. "transform-template-literals": function transformTemplateLiterals() {
  98717. return _transformTemplateLiterals;
  98718. },
  98719. "transform-typeof-symbol": function transformTypeofSymbol() {
  98720. return _transformTypeofSymbol;
  98721. },
  98722. "transform-unicode-escapes": function transformUnicodeEscapes() {
  98723. return _transformUnicodeEscapes;
  98724. },
  98725. "transform-unicode-regex": function transformUnicodeRegex() {
  98726. return _transformUnicodeRegex;
  98727. }
  98728. };
  98729. var minVersions = {
  98730. "proposal-class-static-block": "7.12.0",
  98731. "proposal-private-property-in-object": "7.10.0"
  98732. };
  98733. var has$3 = Function.call.bind(Object.hasOwnProperty);
  98734. function removeUnnecessaryItems(items, overlapping) {
  98735. items.forEach(function (item) {
  98736. var _overlapping$item;
  98737. (_overlapping$item = overlapping[item]) == null ? void 0 : _overlapping$item.forEach(function (name) {
  98738. return items["delete"](name);
  98739. });
  98740. });
  98741. }
  98742. function removeUnsupportedItems(items, babelVersion) {
  98743. items.forEach(function (item) {
  98744. if (has$3(minVersions, item) && semver$4.lt(babelVersion, minVersions[item])) {
  98745. items["delete"](item);
  98746. }
  98747. });
  98748. }
  98749. var moduleTransformations = {
  98750. auto: "transform-modules-commonjs",
  98751. amd: "transform-modules-amd",
  98752. commonjs: "transform-modules-commonjs",
  98753. cjs: "transform-modules-commonjs",
  98754. systemjs: "transform-modules-systemjs",
  98755. umd: "transform-modules-umd"
  98756. };
  98757. var require$$0$1 = {
  98758. "transform-async-to-generator": {
  98759. chrome: "55",
  98760. opera: "42",
  98761. edge: "15",
  98762. firefox: "52",
  98763. safari: "10.1",
  98764. node: "7.6",
  98765. ios: "10.3",
  98766. samsung: "6",
  98767. electron: "1.6"
  98768. },
  98769. "bugfix/transform-async-arrows-in-class": {
  98770. chrome: "55",
  98771. opera: "42",
  98772. edge: "15",
  98773. firefox: "52",
  98774. safari: "11",
  98775. node: "7.6",
  98776. ios: "11",
  98777. samsung: "6",
  98778. electron: "1.6"
  98779. },
  98780. "transform-parameters": {
  98781. chrome: "49",
  98782. opera: "36",
  98783. edge: "15",
  98784. firefox: "53",
  98785. safari: "10",
  98786. node: "6",
  98787. ios: "10",
  98788. samsung: "5",
  98789. electron: "0.37"
  98790. },
  98791. "bugfix/transform-edge-default-parameters": {
  98792. chrome: "49",
  98793. opera: "36",
  98794. edge: "18",
  98795. firefox: "52",
  98796. safari: "10",
  98797. node: "6",
  98798. ios: "10",
  98799. samsung: "5",
  98800. electron: "0.37"
  98801. },
  98802. "transform-function-name": {
  98803. chrome: "51",
  98804. opera: "38",
  98805. edge: "14",
  98806. firefox: "53",
  98807. safari: "10",
  98808. node: "6.5",
  98809. ios: "10",
  98810. samsung: "5",
  98811. electron: "1.2"
  98812. },
  98813. "bugfix/transform-edge-function-name": {
  98814. chrome: "51",
  98815. opera: "38",
  98816. edge: "79",
  98817. firefox: "53",
  98818. safari: "10",
  98819. node: "6.5",
  98820. ios: "10",
  98821. samsung: "5",
  98822. electron: "1.2"
  98823. },
  98824. "transform-block-scoping": {
  98825. chrome: "49",
  98826. opera: "36",
  98827. edge: "14",
  98828. firefox: "51",
  98829. safari: "10",
  98830. node: "6",
  98831. ios: "10",
  98832. samsung: "5",
  98833. electron: "0.37"
  98834. },
  98835. "bugfix/transform-safari-block-shadowing": {
  98836. chrome: "49",
  98837. opera: "36",
  98838. edge: "12",
  98839. firefox: "44",
  98840. safari: "11",
  98841. node: "6",
  98842. ie: "11",
  98843. ios: "11",
  98844. samsung: "5",
  98845. electron: "0.37"
  98846. },
  98847. "bugfix/transform-safari-for-shadowing": {
  98848. chrome: "49",
  98849. opera: "36",
  98850. edge: "12",
  98851. firefox: "4",
  98852. safari: "11",
  98853. node: "6",
  98854. ie: "11",
  98855. ios: "11",
  98856. samsung: "5",
  98857. electron: "0.37"
  98858. },
  98859. "transform-template-literals": {
  98860. chrome: "41",
  98861. opera: "28",
  98862. edge: "13",
  98863. firefox: "34",
  98864. safari: "9",
  98865. node: "4",
  98866. ios: "9",
  98867. samsung: "3.4",
  98868. electron: "0.21"
  98869. },
  98870. "bugfix/transform-tagged-template-caching": {
  98871. chrome: "41",
  98872. opera: "28",
  98873. edge: "12",
  98874. firefox: "34",
  98875. safari: "13",
  98876. node: "4",
  98877. ios: "13",
  98878. samsung: "3.4",
  98879. electron: "0.21"
  98880. },
  98881. "proposal-optional-chaining": {
  98882. chrome: "80",
  98883. opera: "67",
  98884. edge: "80",
  98885. firefox: "74",
  98886. safari: "13.1",
  98887. node: "14",
  98888. ios: "13.4",
  98889. samsung: "13",
  98890. electron: "8.0"
  98891. },
  98892. "bugfix/transform-v8-spread-parameters-in-optional-chaining": {
  98893. firefox: "74",
  98894. safari: "13.1",
  98895. ios: "13.4"
  98896. }
  98897. };
  98898. var pluginBugfixes = require$$0$1;
  98899. var pluginsFiltered = {};
  98900. var bugfixPluginsFiltered = {};
  98901. for (var _i = 0, _Object$keys = Object.keys(plugins); _i < _Object$keys.length; _i++) {
  98902. var plugin = _Object$keys[_i];
  98903. if (Object.hasOwnProperty.call(availablePlugins$1, plugin)) {
  98904. pluginsFiltered[plugin] = plugins[plugin];
  98905. }
  98906. }
  98907. for (var _i2 = 0, _Object$keys2 = Object.keys(pluginBugfixes); _i2 < _Object$keys2.length; _i2++) {
  98908. var _plugin = _Object$keys2[_i2];
  98909. if (Object.hasOwnProperty.call(availablePlugins$1, _plugin)) {
  98910. bugfixPluginsFiltered[_plugin] = pluginBugfixes[_plugin];
  98911. }
  98912. }
  98913. pluginsFiltered["proposal-class-properties"] = pluginsFiltered["proposal-private-methods"];
  98914. var TopLevelOptions = {
  98915. bugfixes: "bugfixes",
  98916. configPath: "configPath",
  98917. corejs: "corejs",
  98918. debug: "debug",
  98919. exclude: "exclude",
  98920. forceAllTransforms: "forceAllTransforms",
  98921. ignoreBrowserslistConfig: "ignoreBrowserslistConfig",
  98922. include: "include",
  98923. loose: "loose",
  98924. modules: "modules",
  98925. shippedProposals: "shippedProposals",
  98926. spec: "spec",
  98927. targets: "targets",
  98928. useBuiltIns: "useBuiltIns",
  98929. browserslistEnv: "browserslistEnv"
  98930. };
  98931. var ModulesOption = {
  98932. "false": false,
  98933. auto: "auto",
  98934. amd: "amd",
  98935. commonjs: "commonjs",
  98936. cjs: "cjs",
  98937. systemjs: "systemjs",
  98938. umd: "umd"
  98939. };
  98940. var UseBuiltInsOption = {
  98941. "false": false,
  98942. entry: "entry",
  98943. usage: "usage"
  98944. };
  98945. var corejs2DefaultWebIncludes = ["web.timers", "web.immediate", "web.dom.iterable"];
  98946. var v$1 = new OptionValidator("@babel/preset-env");
  98947. var allPluginsList = Object.keys(pluginsFiltered);
  98948. var modulePlugins = ["proposal-dynamic-import"].concat(_toConsumableArray(Object.keys(moduleTransformations).map(function (m) {
  98949. return moduleTransformations[m];
  98950. })));
  98951. var getValidIncludesAndExcludes = function getValidIncludesAndExcludes(type, corejs) {
  98952. return new Set([].concat(_toConsumableArray(allPluginsList), _toConsumableArray(type === "exclude" ? modulePlugins : []), _toConsumableArray(corejs ? corejs == 2 ? [].concat(_toConsumableArray(Object.keys(corejs2BuiltIns)), corejs2DefaultWebIncludes) : Object.keys(require$$0$3) : [])));
  98953. };
  98954. var pluginToRegExp = function pluginToRegExp(plugin) {
  98955. if (plugin instanceof RegExp) return plugin;
  98956. try {
  98957. return new RegExp("^" + normalizePluginName(plugin) + "$");
  98958. } catch (e) {
  98959. return null;
  98960. }
  98961. };
  98962. var selectPlugins = function selectPlugins(regexp, type, corejs) {
  98963. return Array.from(getValidIncludesAndExcludes(type, corejs)).filter(function (item) {
  98964. return regexp instanceof RegExp && regexp.test(item);
  98965. });
  98966. };
  98967. var flatten = function flatten(array) {
  98968. var _ref;
  98969. return (_ref = []).concat.apply(_ref, _toConsumableArray(array));
  98970. };
  98971. var expandIncludesAndExcludes = function expandIncludesAndExcludes(plugins, type, corejs) {
  98972. if (plugins === void 0) {
  98973. plugins = [];
  98974. }
  98975. if (plugins.length === 0) return [];
  98976. var selectedPlugins = plugins.map(function (plugin) {
  98977. return selectPlugins(pluginToRegExp(plugin), type, corejs);
  98978. });
  98979. var invalidRegExpList = plugins.filter(function (p, i) {
  98980. return selectedPlugins[i].length === 0;
  98981. });
  98982. v$1.invariant(invalidRegExpList.length === 0, "The plugins/built-ins '" + invalidRegExpList.join(", ") + "' passed to the '" + type + "' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env");
  98983. return flatten(selectedPlugins);
  98984. };
  98985. var normalizePluginName = function normalizePluginName(plugin) {
  98986. return plugin.replace(/^(@babel\/|babel-)(plugin-)?/, "");
  98987. };
  98988. var checkDuplicateIncludeExcludes = function checkDuplicateIncludeExcludes(include, exclude) {
  98989. if (include === void 0) {
  98990. include = [];
  98991. }
  98992. if (exclude === void 0) {
  98993. exclude = [];
  98994. }
  98995. var duplicates = include.filter(function (opt) {
  98996. return exclude.indexOf(opt) >= 0;
  98997. });
  98998. v$1.invariant(duplicates.length === 0, "The plugins/built-ins '" + duplicates.join(", ") + "' were found in both the \"include\" and\n \"exclude\" options.");
  98999. };
  99000. var normalizeTargets = function normalizeTargets(targets) {
  99001. if (typeof targets === "string" || Array.isArray(targets)) {
  99002. return {
  99003. browsers: targets
  99004. };
  99005. }
  99006. return Object.assign({}, targets);
  99007. };
  99008. var validateModulesOption = function validateModulesOption(modulesOpt) {
  99009. if (modulesOpt === void 0) {
  99010. modulesOpt = ModulesOption.auto;
  99011. }
  99012. v$1.invariant(ModulesOption[modulesOpt.toString()] || modulesOpt === ModulesOption["false"], "The 'modules' option must be one of \n" + " - 'false' to indicate no module processing\n" + " - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'" + " - 'auto' (default) which will automatically select 'false' if the current\n" + " process is known to support ES module syntax, or \"commonjs\" otherwise\n");
  99013. return modulesOpt;
  99014. };
  99015. var validateUseBuiltInsOption = function validateUseBuiltInsOption(builtInsOpt) {
  99016. if (builtInsOpt === void 0) {
  99017. builtInsOpt = false;
  99018. }
  99019. v$1.invariant(UseBuiltInsOption[builtInsOpt.toString()] || builtInsOpt === UseBuiltInsOption["false"], "The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '\"entry\"' to indicate replacing the entry polyfill, or\n '\"usage\"' to import only used polyfills per file");
  99020. return builtInsOpt;
  99021. };
  99022. function normalizeCoreJSOption(corejs, useBuiltIns) {
  99023. var proposals = false;
  99024. var rawVersion;
  99025. if (useBuiltIns && corejs === undefined) {
  99026. rawVersion = 2;
  99027. console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a " + "core-js version. Currently, we assume version 2.x when no version " + "is passed. Since this default version will likely change in future " + "versions of Babel, we recommend explicitly setting the core-js version " + "you are using via the `corejs` option.\n" + "\nYou should also be sure that the version you pass to the `corejs` " + "option matches the version specified in your `package.json`'s " + "`dependencies` section. If it doesn't, you need to run one of the " + "following commands:\n\n" + " npm install --save core-js@2 npm install --save core-js@3\n" + " yarn add core-js@2 yarn add core-js@3\n\n" + "More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n" + "More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs");
  99028. } else if (typeof corejs === "object" && corejs !== null) {
  99029. rawVersion = corejs.version;
  99030. proposals = Boolean(corejs.proposals);
  99031. } else {
  99032. rawVersion = corejs;
  99033. }
  99034. var version = rawVersion ? semver$4.coerce(String(rawVersion)) : false;
  99035. if (!useBuiltIns && version) {
  99036. console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n");
  99037. }
  99038. if (useBuiltIns && (!version || version.major < 2 || version.major > 3)) {
  99039. throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, " + "only core-js@2 and core-js@3 are supported.");
  99040. }
  99041. return {
  99042. version: version,
  99043. proposals: proposals
  99044. };
  99045. }
  99046. function normalizeOptions$3(opts) {
  99047. v$1.validateTopLevelOptions(opts, TopLevelOptions);
  99048. var useBuiltIns = validateUseBuiltInsOption(opts.useBuiltIns);
  99049. var corejs = normalizeCoreJSOption(opts.corejs, useBuiltIns);
  99050. var include = expandIncludesAndExcludes(opts.include, TopLevelOptions.include, !!corejs.version && corejs.version.major);
  99051. var exclude = expandIncludesAndExcludes(opts.exclude, TopLevelOptions.exclude, !!corejs.version && corejs.version.major);
  99052. checkDuplicateIncludeExcludes(include, exclude);
  99053. return {
  99054. bugfixes: v$1.validateBooleanOption(TopLevelOptions.bugfixes, opts.bugfixes, false),
  99055. configPath: v$1.validateStringOption(TopLevelOptions.configPath, opts.configPath, browser$6.cwd()),
  99056. corejs: corejs,
  99057. debug: v$1.validateBooleanOption(TopLevelOptions.debug, opts.debug, false),
  99058. include: include,
  99059. exclude: exclude,
  99060. forceAllTransforms: v$1.validateBooleanOption(TopLevelOptions.forceAllTransforms, opts.forceAllTransforms, false),
  99061. ignoreBrowserslistConfig: v$1.validateBooleanOption(TopLevelOptions.ignoreBrowserslistConfig, opts.ignoreBrowserslistConfig, false),
  99062. loose: v$1.validateBooleanOption(TopLevelOptions.loose, opts.loose),
  99063. modules: validateModulesOption(opts.modules),
  99064. shippedProposals: v$1.validateBooleanOption(TopLevelOptions.shippedProposals, opts.shippedProposals, false),
  99065. spec: v$1.validateBooleanOption(TopLevelOptions.spec, opts.spec, false),
  99066. targets: normalizeTargets(opts.targets),
  99067. useBuiltIns: useBuiltIns,
  99068. browserslistEnv: v$1.validateStringOption(TopLevelOptions.browserslistEnv, opts.browserslistEnv)
  99069. };
  99070. }
  99071. var proposalPlugins = new Set(["proposal-class-static-block", "proposal-private-property-in-object"]);
  99072. var pluginSyntaxObject = {
  99073. "proposal-async-generator-functions": "syntax-async-generators",
  99074. "proposal-class-properties": "syntax-class-properties",
  99075. "proposal-class-static-block": "syntax-class-static-block",
  99076. "proposal-json-strings": "syntax-json-strings",
  99077. "proposal-nullish-coalescing-operator": "syntax-nullish-coalescing-operator",
  99078. "proposal-numeric-separator": "syntax-numeric-separator",
  99079. "proposal-object-rest-spread": "syntax-object-rest-spread",
  99080. "proposal-optional-catch-binding": "syntax-optional-catch-binding",
  99081. "proposal-optional-chaining": "syntax-optional-chaining",
  99082. "proposal-private-methods": "syntax-class-properties",
  99083. "proposal-private-property-in-object": "syntax-private-property-in-object",
  99084. "proposal-unicode-property-regex": null
  99085. };
  99086. var pluginSyntaxEntries = Object.keys(pluginSyntaxObject).map(function (key) {
  99087. return [key, pluginSyntaxObject[key]];
  99088. });
  99089. var pluginSyntaxMap = new Map(pluginSyntaxEntries);
  99090. var shippedProposals = {
  99091. pluginSyntaxMap: pluginSyntaxMap,
  99092. proposalPlugins: proposalPlugins
  99093. };
  99094. var require$$0 = {
  99095. "transform-async-to-generator": [
  99096. "bugfix/transform-async-arrows-in-class"
  99097. ],
  99098. "transform-parameters": [
  99099. "bugfix/transform-edge-default-parameters"
  99100. ],
  99101. "transform-function-name": [
  99102. "bugfix/transform-edge-function-name"
  99103. ],
  99104. "transform-block-scoping": [
  99105. "bugfix/transform-safari-block-shadowing",
  99106. "bugfix/transform-safari-for-shadowing"
  99107. ],
  99108. "transform-template-literals": [
  99109. "bugfix/transform-tagged-template-caching"
  99110. ],
  99111. "proposal-optional-chaining": [
  99112. "bugfix/transform-v8-spread-parameters-in-optional-chaining"
  99113. ]
  99114. };
  99115. var overlappingPlugins = require$$0;
  99116. function getImportSource$1(_ref) {
  99117. var node = _ref.node;
  99118. if (node.specifiers.length === 0) return node.source.value;
  99119. }
  99120. function getRequireSource$1(_ref2) {
  99121. var node = _ref2.node;
  99122. if (!isExpressionStatement(node)) return;
  99123. var expression = node.expression;
  99124. var isRequire = isCallExpression(expression) && isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && isStringLiteral(expression.arguments[0]);
  99125. if (isRequire) return expression.arguments[0].value;
  99126. }
  99127. function isPolyfillSource(source) {
  99128. return source === "@babel/polyfill" || source === "core-js";
  99129. }
  99130. function isRegeneratorSource(source) {
  99131. return source === "regenerator-runtime/runtime" || source === "regenerator-runtime/runtime.js";
  99132. }
  99133. function removeRegeneratorEntryPlugin () {
  99134. var visitor = {
  99135. ImportDeclaration: function ImportDeclaration(path) {
  99136. if (isRegeneratorSource(getImportSource$1(path))) {
  99137. this.regeneratorImportExcluded = true;
  99138. path.remove();
  99139. }
  99140. },
  99141. Program: function Program(path) {
  99142. var _this = this;
  99143. path.get("body").forEach(function (bodyPath) {
  99144. if (isRegeneratorSource(getRequireSource$1(bodyPath))) {
  99145. _this.regeneratorImportExcluded = true;
  99146. bodyPath.remove();
  99147. }
  99148. });
  99149. }
  99150. };
  99151. return {
  99152. name: "preset-env/remove-regenerator",
  99153. visitor: visitor,
  99154. pre: function pre() {
  99155. this.regeneratorImportExcluded = false;
  99156. },
  99157. post: function post() {
  99158. if (this.opts.debug && this.regeneratorImportExcluded) {
  99159. var filename = this.file.opts.filename;
  99160. if (browser$6.env.BABEL_ENV === "test") {
  99161. filename = filename.replace(/\\/g, "/");
  99162. }
  99163. console.log("\n[" + filename + "] Based on your targets, regenerator-runtime import excluded.");
  99164. }
  99165. }
  99166. };
  99167. }
  99168. var _templateObject$1, _templateObject2$1, _templateObject3$1, _templateObject4;
  99169. var BABEL_POLYFILL_DEPRECATION = "\n `@babel/polyfill` is deprecated. Please, use required parts of `core-js`\n and `regenerator-runtime/runtime` separately";
  99170. var NO_DIRECT_POLYFILL_IMPORT = "\n When setting `useBuiltIns: 'usage'`, polyfills are automatically imported when needed.\n Please remove the direct import of `SPECIFIER` or use `useBuiltIns: 'entry'` instead.";
  99171. function legacyBabelPolyfillPlugin (_ref, _ref2) {
  99172. var template = _ref.template;
  99173. var regenerator = _ref2.regenerator,
  99174. deprecated = _ref2.deprecated,
  99175. usage = _ref2.usage;
  99176. return {
  99177. name: "preset-env/replace-babel-polyfill",
  99178. visitor: {
  99179. ImportDeclaration: function ImportDeclaration(path) {
  99180. var src = getImportSource$1(path);
  99181. if (usage && isPolyfillSource(src)) {
  99182. console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));
  99183. if (!deprecated) path.remove();
  99184. } else if (src === "@babel/polyfill") {
  99185. if (deprecated) {
  99186. console.warn(BABEL_POLYFILL_DEPRECATION);
  99187. } else if (regenerator) {
  99188. path.replaceWithMultiple(template.ast(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n import \"core-js\";\n import \"regenerator-runtime/runtime.js\";\n "]))));
  99189. } else {
  99190. path.replaceWith(template.ast(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n import \"core-js\";\n "]))));
  99191. }
  99192. }
  99193. },
  99194. Program: function Program(path) {
  99195. path.get("body").forEach(function (bodyPath) {
  99196. var src = getRequireSource$1(bodyPath);
  99197. if (usage && isPolyfillSource(src)) {
  99198. console.warn(NO_DIRECT_POLYFILL_IMPORT.replace("SPECIFIER", src));
  99199. if (!deprecated) bodyPath.remove();
  99200. } else if (src === "@babel/polyfill") {
  99201. if (deprecated) {
  99202. console.warn(BABEL_POLYFILL_DEPRECATION);
  99203. } else if (regenerator) {
  99204. bodyPath.replaceWithMultiple(template.ast(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["\n require(\"core-js\");\n require(\"regenerator-runtime/runtime.js\");\n "]))));
  99205. } else {
  99206. bodyPath.replaceWith(template.ast(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n require(\"core-js\");\n "]))));
  99207. }
  99208. }
  99209. });
  99210. }
  99211. }
  99212. };
  99213. }
  99214. var semver = createCommonjsModule(function (module, exports) {
  99215. exports = module.exports = SemVer;
  99216. var debug;
  99217. if (typeof browser$6 === 'object' && browser$6.env && browser$6.env.NODE_DEBUG && /\bsemver\b/i.test(browser$6.env.NODE_DEBUG)) {
  99218. debug = function debug() {
  99219. var args = Array.prototype.slice.call(arguments, 0);
  99220. args.unshift('SEMVER');
  99221. console.log.apply(console, args);
  99222. };
  99223. } else {
  99224. debug = function debug() {};
  99225. }
  99226. exports.SEMVER_SPEC_VERSION = '2.0.0';
  99227. var MAX_LENGTH = 256;
  99228. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
  99229. var MAX_SAFE_COMPONENT_LENGTH = 16;
  99230. var re = exports.re = [];
  99231. var src = exports.src = [];
  99232. var t = exports.tokens = {};
  99233. var R = 0;
  99234. function tok(n) {
  99235. t[n] = R++;
  99236. }
  99237. tok('NUMERICIDENTIFIER');
  99238. src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*';
  99239. tok('NUMERICIDENTIFIERLOOSE');
  99240. src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+';
  99241. tok('NONNUMERICIDENTIFIER');
  99242. src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
  99243. tok('MAINVERSION');
  99244. src[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')\\.' + '(' + src[t.NUMERICIDENTIFIER] + ')';
  99245. tok('MAINVERSIONLOOSE');
  99246. src[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\.' + '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')';
  99247. tok('PRERELEASEIDENTIFIER');
  99248. src[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  99249. tok('PRERELEASEIDENTIFIERLOOSE');
  99250. src[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] + '|' + src[t.NONNUMERICIDENTIFIER] + ')';
  99251. tok('PRERELEASE');
  99252. src[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] + '(?:\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))';
  99253. tok('PRERELEASELOOSE');
  99254. src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + '(?:\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))';
  99255. tok('BUILDIDENTIFIER');
  99256. src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
  99257. tok('BUILD');
  99258. src[t.BUILD] = '(?:\\+(' + src[t.BUILDIDENTIFIER] + '(?:\\.' + src[t.BUILDIDENTIFIER] + ')*))';
  99259. tok('FULL');
  99260. tok('FULLPLAIN');
  99261. src[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] + src[t.PRERELEASE] + '?' + src[t.BUILD] + '?';
  99262. src[t.FULL] = '^' + src[t.FULLPLAIN] + '$';
  99263. tok('LOOSEPLAIN');
  99264. src[t.LOOSEPLAIN] = '[v=\\s]*' + src[t.MAINVERSIONLOOSE] + src[t.PRERELEASELOOSE] + '?' + src[t.BUILD] + '?';
  99265. tok('LOOSE');
  99266. src[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$';
  99267. tok('GTLT');
  99268. src[t.GTLT] = '((?:<|>)?=?)';
  99269. tok('XRANGEIDENTIFIERLOOSE');
  99270. src[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
  99271. tok('XRANGEIDENTIFIER');
  99272. src[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\*';
  99273. tok('XRANGEPLAIN');
  99274. src[t.XRANGEPLAIN] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIER] + ')' + '(?:' + src[t.PRERELEASE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  99275. tok('XRANGEPLAINLOOSE');
  99276. src[t.XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' + '(?:' + src[t.PRERELEASELOOSE] + ')?' + src[t.BUILD] + '?' + ')?)?';
  99277. tok('XRANGE');
  99278. src[t.XRANGE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAIN] + '$';
  99279. tok('XRANGELOOSE');
  99280. src[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\s*' + src[t.XRANGEPLAINLOOSE] + '$';
  99281. tok('COERCE');
  99282. src[t.COERCE] = '(^|[^\\d])' + '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + '(?:$|[^\\d])';
  99283. tok('COERCERTL');
  99284. re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g');
  99285. tok('LONETILDE');
  99286. src[t.LONETILDE] = '(?:~>?)';
  99287. tok('TILDETRIM');
  99288. src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+';
  99289. re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g');
  99290. var tildeTrimReplace = '$1~';
  99291. tok('TILDE');
  99292. src[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$';
  99293. tok('TILDELOOSE');
  99294. src[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$';
  99295. tok('LONECARET');
  99296. src[t.LONECARET] = '(?:\\^)';
  99297. tok('CARETTRIM');
  99298. src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+';
  99299. re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g');
  99300. var caretTrimReplace = '$1^';
  99301. tok('CARET');
  99302. src[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$';
  99303. tok('CARETLOOSE');
  99304. src[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$';
  99305. tok('COMPARATORLOOSE');
  99306. src[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + ')$|^$';
  99307. tok('COMPARATOR');
  99308. src[t.COMPARATOR] = '^' + src[t.GTLT] + '\\s*(' + src[t.FULLPLAIN] + ')$|^$';
  99309. tok('COMPARATORTRIM');
  99310. src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + '\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')';
  99311. re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g');
  99312. var comparatorTrimReplace = '$1$2$3';
  99313. tok('HYPHENRANGE');
  99314. src[t.HYPHENRANGE] = '^\\s*(' + src[t.XRANGEPLAIN] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAIN] + ')' + '\\s*$';
  99315. tok('HYPHENRANGELOOSE');
  99316. src[t.HYPHENRANGELOOSE] = '^\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s+-\\s+' + '(' + src[t.XRANGEPLAINLOOSE] + ')' + '\\s*$';
  99317. tok('STAR');
  99318. src[t.STAR] = '(<|>)?=?\\s*\\*';
  99319. for (var i = 0; i < R; i++) {
  99320. debug(i, src[i]);
  99321. if (!re[i]) {
  99322. re[i] = new RegExp(src[i]);
  99323. }
  99324. }
  99325. exports.parse = parse;
  99326. function parse(version, options) {
  99327. if (!options || typeof options !== 'object') {
  99328. options = {
  99329. loose: !!options,
  99330. includePrerelease: false
  99331. };
  99332. }
  99333. if (version instanceof SemVer) {
  99334. return version;
  99335. }
  99336. if (typeof version !== 'string') {
  99337. return null;
  99338. }
  99339. if (version.length > MAX_LENGTH) {
  99340. return null;
  99341. }
  99342. var r = options.loose ? re[t.LOOSE] : re[t.FULL];
  99343. if (!r.test(version)) {
  99344. return null;
  99345. }
  99346. try {
  99347. return new SemVer(version, options);
  99348. } catch (er) {
  99349. return null;
  99350. }
  99351. }
  99352. exports.valid = valid;
  99353. function valid(version, options) {
  99354. var v = parse(version, options);
  99355. return v ? v.version : null;
  99356. }
  99357. exports.clean = clean;
  99358. function clean(version, options) {
  99359. var s = parse(version.trim().replace(/^[=v]+/, ''), options);
  99360. return s ? s.version : null;
  99361. }
  99362. exports.SemVer = SemVer;
  99363. function SemVer(version, options) {
  99364. if (!options || typeof options !== 'object') {
  99365. options = {
  99366. loose: !!options,
  99367. includePrerelease: false
  99368. };
  99369. }
  99370. if (version instanceof SemVer) {
  99371. if (version.loose === options.loose) {
  99372. return version;
  99373. } else {
  99374. version = version.version;
  99375. }
  99376. } else if (typeof version !== 'string') {
  99377. throw new TypeError('Invalid Version: ' + version);
  99378. }
  99379. if (version.length > MAX_LENGTH) {
  99380. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters');
  99381. }
  99382. if (!(this instanceof SemVer)) {
  99383. return new SemVer(version, options);
  99384. }
  99385. debug('SemVer', version, options);
  99386. this.options = options;
  99387. this.loose = !!options.loose;
  99388. var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
  99389. if (!m) {
  99390. throw new TypeError('Invalid Version: ' + version);
  99391. }
  99392. this.raw = version;
  99393. this.major = +m[1];
  99394. this.minor = +m[2];
  99395. this.patch = +m[3];
  99396. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  99397. throw new TypeError('Invalid major version');
  99398. }
  99399. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  99400. throw new TypeError('Invalid minor version');
  99401. }
  99402. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  99403. throw new TypeError('Invalid patch version');
  99404. }
  99405. if (!m[4]) {
  99406. this.prerelease = [];
  99407. } else {
  99408. this.prerelease = m[4].split('.').map(function (id) {
  99409. if (/^[0-9]+$/.test(id)) {
  99410. var num = +id;
  99411. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  99412. return num;
  99413. }
  99414. }
  99415. return id;
  99416. });
  99417. }
  99418. this.build = m[5] ? m[5].split('.') : [];
  99419. this.format();
  99420. }
  99421. SemVer.prototype.format = function () {
  99422. this.version = this.major + '.' + this.minor + '.' + this.patch;
  99423. if (this.prerelease.length) {
  99424. this.version += '-' + this.prerelease.join('.');
  99425. }
  99426. return this.version;
  99427. };
  99428. SemVer.prototype.toString = function () {
  99429. return this.version;
  99430. };
  99431. SemVer.prototype.compare = function (other) {
  99432. debug('SemVer.compare', this.version, this.options, other);
  99433. if (!(other instanceof SemVer)) {
  99434. other = new SemVer(other, this.options);
  99435. }
  99436. return this.compareMain(other) || this.comparePre(other);
  99437. };
  99438. SemVer.prototype.compareMain = function (other) {
  99439. if (!(other instanceof SemVer)) {
  99440. other = new SemVer(other, this.options);
  99441. }
  99442. return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
  99443. };
  99444. SemVer.prototype.comparePre = function (other) {
  99445. if (!(other instanceof SemVer)) {
  99446. other = new SemVer(other, this.options);
  99447. }
  99448. if (this.prerelease.length && !other.prerelease.length) {
  99449. return -1;
  99450. } else if (!this.prerelease.length && other.prerelease.length) {
  99451. return 1;
  99452. } else if (!this.prerelease.length && !other.prerelease.length) {
  99453. return 0;
  99454. }
  99455. var i = 0;
  99456. do {
  99457. var a = this.prerelease[i];
  99458. var b = other.prerelease[i];
  99459. debug('prerelease compare', i, a, b);
  99460. if (a === undefined && b === undefined) {
  99461. return 0;
  99462. } else if (b === undefined) {
  99463. return 1;
  99464. } else if (a === undefined) {
  99465. return -1;
  99466. } else if (a === b) {
  99467. continue;
  99468. } else {
  99469. return compareIdentifiers(a, b);
  99470. }
  99471. } while (++i);
  99472. };
  99473. SemVer.prototype.compareBuild = function (other) {
  99474. if (!(other instanceof SemVer)) {
  99475. other = new SemVer(other, this.options);
  99476. }
  99477. var i = 0;
  99478. do {
  99479. var a = this.build[i];
  99480. var b = other.build[i];
  99481. debug('prerelease compare', i, a, b);
  99482. if (a === undefined && b === undefined) {
  99483. return 0;
  99484. } else if (b === undefined) {
  99485. return 1;
  99486. } else if (a === undefined) {
  99487. return -1;
  99488. } else if (a === b) {
  99489. continue;
  99490. } else {
  99491. return compareIdentifiers(a, b);
  99492. }
  99493. } while (++i);
  99494. };
  99495. SemVer.prototype.inc = function (release, identifier) {
  99496. switch (release) {
  99497. case 'premajor':
  99498. this.prerelease.length = 0;
  99499. this.patch = 0;
  99500. this.minor = 0;
  99501. this.major++;
  99502. this.inc('pre', identifier);
  99503. break;
  99504. case 'preminor':
  99505. this.prerelease.length = 0;
  99506. this.patch = 0;
  99507. this.minor++;
  99508. this.inc('pre', identifier);
  99509. break;
  99510. case 'prepatch':
  99511. this.prerelease.length = 0;
  99512. this.inc('patch', identifier);
  99513. this.inc('pre', identifier);
  99514. break;
  99515. case 'prerelease':
  99516. if (this.prerelease.length === 0) {
  99517. this.inc('patch', identifier);
  99518. }
  99519. this.inc('pre', identifier);
  99520. break;
  99521. case 'major':
  99522. if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
  99523. this.major++;
  99524. }
  99525. this.minor = 0;
  99526. this.patch = 0;
  99527. this.prerelease = [];
  99528. break;
  99529. case 'minor':
  99530. if (this.patch !== 0 || this.prerelease.length === 0) {
  99531. this.minor++;
  99532. }
  99533. this.patch = 0;
  99534. this.prerelease = [];
  99535. break;
  99536. case 'patch':
  99537. if (this.prerelease.length === 0) {
  99538. this.patch++;
  99539. }
  99540. this.prerelease = [];
  99541. break;
  99542. case 'pre':
  99543. if (this.prerelease.length === 0) {
  99544. this.prerelease = [0];
  99545. } else {
  99546. var i = this.prerelease.length;
  99547. while (--i >= 0) {
  99548. if (typeof this.prerelease[i] === 'number') {
  99549. this.prerelease[i]++;
  99550. i = -2;
  99551. }
  99552. }
  99553. if (i === -1) {
  99554. this.prerelease.push(0);
  99555. }
  99556. }
  99557. if (identifier) {
  99558. if (this.prerelease[0] === identifier) {
  99559. if (isNaN(this.prerelease[1])) {
  99560. this.prerelease = [identifier, 0];
  99561. }
  99562. } else {
  99563. this.prerelease = [identifier, 0];
  99564. }
  99565. }
  99566. break;
  99567. default:
  99568. throw new Error('invalid increment argument: ' + release);
  99569. }
  99570. this.format();
  99571. this.raw = this.version;
  99572. return this;
  99573. };
  99574. exports.inc = inc;
  99575. function inc(version, release, loose, identifier) {
  99576. if (typeof loose === 'string') {
  99577. identifier = loose;
  99578. loose = undefined;
  99579. }
  99580. try {
  99581. return new SemVer(version, loose).inc(release, identifier).version;
  99582. } catch (er) {
  99583. return null;
  99584. }
  99585. }
  99586. exports.diff = diff;
  99587. function diff(version1, version2) {
  99588. if (eq(version1, version2)) {
  99589. return null;
  99590. } else {
  99591. var v1 = parse(version1);
  99592. var v2 = parse(version2);
  99593. var prefix = '';
  99594. if (v1.prerelease.length || v2.prerelease.length) {
  99595. prefix = 'pre';
  99596. var defaultResult = 'prerelease';
  99597. }
  99598. for (var key in v1) {
  99599. if (key === 'major' || key === 'minor' || key === 'patch') {
  99600. if (v1[key] !== v2[key]) {
  99601. return prefix + key;
  99602. }
  99603. }
  99604. }
  99605. return defaultResult;
  99606. }
  99607. }
  99608. exports.compareIdentifiers = compareIdentifiers;
  99609. var numeric = /^[0-9]+$/;
  99610. function compareIdentifiers(a, b) {
  99611. var anum = numeric.test(a);
  99612. var bnum = numeric.test(b);
  99613. if (anum && bnum) {
  99614. a = +a;
  99615. b = +b;
  99616. }
  99617. return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
  99618. }
  99619. exports.rcompareIdentifiers = rcompareIdentifiers;
  99620. function rcompareIdentifiers(a, b) {
  99621. return compareIdentifiers(b, a);
  99622. }
  99623. exports.major = major;
  99624. function major(a, loose) {
  99625. return new SemVer(a, loose).major;
  99626. }
  99627. exports.minor = minor;
  99628. function minor(a, loose) {
  99629. return new SemVer(a, loose).minor;
  99630. }
  99631. exports.patch = patch;
  99632. function patch(a, loose) {
  99633. return new SemVer(a, loose).patch;
  99634. }
  99635. exports.compare = compare;
  99636. function compare(a, b, loose) {
  99637. return new SemVer(a, loose).compare(new SemVer(b, loose));
  99638. }
  99639. exports.compareLoose = compareLoose;
  99640. function compareLoose(a, b) {
  99641. return compare(a, b, true);
  99642. }
  99643. exports.compareBuild = compareBuild;
  99644. function compareBuild(a, b, loose) {
  99645. var versionA = new SemVer(a, loose);
  99646. var versionB = new SemVer(b, loose);
  99647. return versionA.compare(versionB) || versionA.compareBuild(versionB);
  99648. }
  99649. exports.rcompare = rcompare;
  99650. function rcompare(a, b, loose) {
  99651. return compare(b, a, loose);
  99652. }
  99653. exports.sort = sort;
  99654. function sort(list, loose) {
  99655. return list.sort(function (a, b) {
  99656. return exports.compareBuild(a, b, loose);
  99657. });
  99658. }
  99659. exports.rsort = rsort;
  99660. function rsort(list, loose) {
  99661. return list.sort(function (a, b) {
  99662. return exports.compareBuild(b, a, loose);
  99663. });
  99664. }
  99665. exports.gt = gt;
  99666. function gt(a, b, loose) {
  99667. return compare(a, b, loose) > 0;
  99668. }
  99669. exports.lt = lt;
  99670. function lt(a, b, loose) {
  99671. return compare(a, b, loose) < 0;
  99672. }
  99673. exports.eq = eq;
  99674. function eq(a, b, loose) {
  99675. return compare(a, b, loose) === 0;
  99676. }
  99677. exports.neq = neq;
  99678. function neq(a, b, loose) {
  99679. return compare(a, b, loose) !== 0;
  99680. }
  99681. exports.gte = gte;
  99682. function gte(a, b, loose) {
  99683. return compare(a, b, loose) >= 0;
  99684. }
  99685. exports.lte = lte;
  99686. function lte(a, b, loose) {
  99687. return compare(a, b, loose) <= 0;
  99688. }
  99689. exports.cmp = cmp;
  99690. function cmp(a, op, b, loose) {
  99691. switch (op) {
  99692. case '===':
  99693. if (typeof a === 'object') a = a.version;
  99694. if (typeof b === 'object') b = b.version;
  99695. return a === b;
  99696. case '!==':
  99697. if (typeof a === 'object') a = a.version;
  99698. if (typeof b === 'object') b = b.version;
  99699. return a !== b;
  99700. case '':
  99701. case '=':
  99702. case '==':
  99703. return eq(a, b, loose);
  99704. case '!=':
  99705. return neq(a, b, loose);
  99706. case '>':
  99707. return gt(a, b, loose);
  99708. case '>=':
  99709. return gte(a, b, loose);
  99710. case '<':
  99711. return lt(a, b, loose);
  99712. case '<=':
  99713. return lte(a, b, loose);
  99714. default:
  99715. throw new TypeError('Invalid operator: ' + op);
  99716. }
  99717. }
  99718. exports.Comparator = Comparator;
  99719. function Comparator(comp, options) {
  99720. if (!options || typeof options !== 'object') {
  99721. options = {
  99722. loose: !!options,
  99723. includePrerelease: false
  99724. };
  99725. }
  99726. if (comp instanceof Comparator) {
  99727. if (comp.loose === !!options.loose) {
  99728. return comp;
  99729. } else {
  99730. comp = comp.value;
  99731. }
  99732. }
  99733. if (!(this instanceof Comparator)) {
  99734. return new Comparator(comp, options);
  99735. }
  99736. debug('comparator', comp, options);
  99737. this.options = options;
  99738. this.loose = !!options.loose;
  99739. this.parse(comp);
  99740. if (this.semver === ANY) {
  99741. this.value = '';
  99742. } else {
  99743. this.value = this.operator + this.semver.version;
  99744. }
  99745. debug('comp', this);
  99746. }
  99747. var ANY = {};
  99748. Comparator.prototype.parse = function (comp) {
  99749. var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  99750. var m = comp.match(r);
  99751. if (!m) {
  99752. throw new TypeError('Invalid comparator: ' + comp);
  99753. }
  99754. this.operator = m[1] !== undefined ? m[1] : '';
  99755. if (this.operator === '=') {
  99756. this.operator = '';
  99757. }
  99758. if (!m[2]) {
  99759. this.semver = ANY;
  99760. } else {
  99761. this.semver = new SemVer(m[2], this.options.loose);
  99762. }
  99763. };
  99764. Comparator.prototype.toString = function () {
  99765. return this.value;
  99766. };
  99767. Comparator.prototype.test = function (version) {
  99768. debug('Comparator.test', version, this.options.loose);
  99769. if (this.semver === ANY || version === ANY) {
  99770. return true;
  99771. }
  99772. if (typeof version === 'string') {
  99773. try {
  99774. version = new SemVer(version, this.options);
  99775. } catch (er) {
  99776. return false;
  99777. }
  99778. }
  99779. return cmp(version, this.operator, this.semver, this.options);
  99780. };
  99781. Comparator.prototype.intersects = function (comp, options) {
  99782. if (!(comp instanceof Comparator)) {
  99783. throw new TypeError('a Comparator is required');
  99784. }
  99785. if (!options || typeof options !== 'object') {
  99786. options = {
  99787. loose: !!options,
  99788. includePrerelease: false
  99789. };
  99790. }
  99791. var rangeTmp;
  99792. if (this.operator === '') {
  99793. if (this.value === '') {
  99794. return true;
  99795. }
  99796. rangeTmp = new Range(comp.value, options);
  99797. return satisfies(this.value, rangeTmp, options);
  99798. } else if (comp.operator === '') {
  99799. if (comp.value === '') {
  99800. return true;
  99801. }
  99802. rangeTmp = new Range(this.value, options);
  99803. return satisfies(comp.semver, rangeTmp, options);
  99804. }
  99805. var sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
  99806. var sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
  99807. var sameSemVer = this.semver.version === comp.semver.version;
  99808. var differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
  99809. var oppositeDirectionsLessThan = cmp(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
  99810. var oppositeDirectionsGreaterThan = cmp(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
  99811. return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
  99812. };
  99813. exports.Range = Range;
  99814. function Range(range, options) {
  99815. if (!options || typeof options !== 'object') {
  99816. options = {
  99817. loose: !!options,
  99818. includePrerelease: false
  99819. };
  99820. }
  99821. if (range instanceof Range) {
  99822. if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
  99823. return range;
  99824. } else {
  99825. return new Range(range.raw, options);
  99826. }
  99827. }
  99828. if (range instanceof Comparator) {
  99829. return new Range(range.value, options);
  99830. }
  99831. if (!(this instanceof Range)) {
  99832. return new Range(range, options);
  99833. }
  99834. this.options = options;
  99835. this.loose = !!options.loose;
  99836. this.includePrerelease = !!options.includePrerelease;
  99837. this.raw = range;
  99838. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  99839. return this.parseRange(range.trim());
  99840. }, this).filter(function (c) {
  99841. return c.length;
  99842. });
  99843. if (!this.set.length) {
  99844. throw new TypeError('Invalid SemVer Range: ' + range);
  99845. }
  99846. this.format();
  99847. }
  99848. Range.prototype.format = function () {
  99849. this.range = this.set.map(function (comps) {
  99850. return comps.join(' ').trim();
  99851. }).join('||').trim();
  99852. return this.range;
  99853. };
  99854. Range.prototype.toString = function () {
  99855. return this.range;
  99856. };
  99857. Range.prototype.parseRange = function (range) {
  99858. var loose = this.options.loose;
  99859. range = range.trim();
  99860. var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
  99861. range = range.replace(hr, hyphenReplace);
  99862. debug('hyphen replace', range);
  99863. range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
  99864. debug('comparator trim', range, re[t.COMPARATORTRIM]);
  99865. range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
  99866. range = range.replace(re[t.CARETTRIM], caretTrimReplace);
  99867. range = range.split(/\s+/).join(' ');
  99868. var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
  99869. var set = range.split(' ').map(function (comp) {
  99870. return parseComparator(comp, this.options);
  99871. }, this).join(' ').split(/\s+/);
  99872. if (this.options.loose) {
  99873. set = set.filter(function (comp) {
  99874. return !!comp.match(compRe);
  99875. });
  99876. }
  99877. set = set.map(function (comp) {
  99878. return new Comparator(comp, this.options);
  99879. }, this);
  99880. return set;
  99881. };
  99882. Range.prototype.intersects = function (range, options) {
  99883. if (!(range instanceof Range)) {
  99884. throw new TypeError('a Range is required');
  99885. }
  99886. return this.set.some(function (thisComparators) {
  99887. return isSatisfiable(thisComparators, options) && range.set.some(function (rangeComparators) {
  99888. return isSatisfiable(rangeComparators, options) && thisComparators.every(function (thisComparator) {
  99889. return rangeComparators.every(function (rangeComparator) {
  99890. return thisComparator.intersects(rangeComparator, options);
  99891. });
  99892. });
  99893. });
  99894. });
  99895. };
  99896. function isSatisfiable(comparators, options) {
  99897. var result = true;
  99898. var remainingComparators = comparators.slice();
  99899. var testComparator = remainingComparators.pop();
  99900. while (result && remainingComparators.length) {
  99901. result = remainingComparators.every(function (otherComparator) {
  99902. return testComparator.intersects(otherComparator, options);
  99903. });
  99904. testComparator = remainingComparators.pop();
  99905. }
  99906. return result;
  99907. }
  99908. exports.toComparators = toComparators;
  99909. function toComparators(range, options) {
  99910. return new Range(range, options).set.map(function (comp) {
  99911. return comp.map(function (c) {
  99912. return c.value;
  99913. }).join(' ').trim().split(' ');
  99914. });
  99915. }
  99916. function parseComparator(comp, options) {
  99917. debug('comp', comp, options);
  99918. comp = replaceCarets(comp, options);
  99919. debug('caret', comp);
  99920. comp = replaceTildes(comp, options);
  99921. debug('tildes', comp);
  99922. comp = replaceXRanges(comp, options);
  99923. debug('xrange', comp);
  99924. comp = replaceStars(comp, options);
  99925. debug('stars', comp);
  99926. return comp;
  99927. }
  99928. function isX(id) {
  99929. return !id || id.toLowerCase() === 'x' || id === '*';
  99930. }
  99931. function replaceTildes(comp, options) {
  99932. return comp.trim().split(/\s+/).map(function (comp) {
  99933. return replaceTilde(comp, options);
  99934. }).join(' ');
  99935. }
  99936. function replaceTilde(comp, options) {
  99937. var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
  99938. return comp.replace(r, function (_, M, m, p, pr) {
  99939. debug('tilde', comp, _, M, m, p, pr);
  99940. var ret;
  99941. if (isX(M)) {
  99942. ret = '';
  99943. } else if (isX(m)) {
  99944. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  99945. } else if (isX(p)) {
  99946. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  99947. } else if (pr) {
  99948. debug('replaceTilde pr', pr);
  99949. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  99950. } else {
  99951. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  99952. }
  99953. debug('tilde return', ret);
  99954. return ret;
  99955. });
  99956. }
  99957. function replaceCarets(comp, options) {
  99958. return comp.trim().split(/\s+/).map(function (comp) {
  99959. return replaceCaret(comp, options);
  99960. }).join(' ');
  99961. }
  99962. function replaceCaret(comp, options) {
  99963. debug('caret', comp, options);
  99964. var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
  99965. return comp.replace(r, function (_, M, m, p, pr) {
  99966. debug('caret', comp, _, M, m, p, pr);
  99967. var ret;
  99968. if (isX(M)) {
  99969. ret = '';
  99970. } else if (isX(m)) {
  99971. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
  99972. } else if (isX(p)) {
  99973. if (M === '0') {
  99974. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
  99975. } else {
  99976. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
  99977. }
  99978. } else if (pr) {
  99979. debug('replaceCaret pr', pr);
  99980. if (M === '0') {
  99981. if (m === '0') {
  99982. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + m + '.' + (+p + 1);
  99983. } else {
  99984. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + M + '.' + (+m + 1) + '.0';
  99985. }
  99986. } else {
  99987. ret = '>=' + M + '.' + m + '.' + p + '-' + pr + ' <' + (+M + 1) + '.0.0';
  99988. }
  99989. } else {
  99990. debug('no pr');
  99991. if (M === '0') {
  99992. if (m === '0') {
  99993. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + m + '.' + (+p + 1);
  99994. } else {
  99995. ret = '>=' + M + '.' + m + '.' + p + ' <' + M + '.' + (+m + 1) + '.0';
  99996. }
  99997. } else {
  99998. ret = '>=' + M + '.' + m + '.' + p + ' <' + (+M + 1) + '.0.0';
  99999. }
  100000. }
  100001. debug('caret return', ret);
  100002. return ret;
  100003. });
  100004. }
  100005. function replaceXRanges(comp, options) {
  100006. debug('replaceXRanges', comp, options);
  100007. return comp.split(/\s+/).map(function (comp) {
  100008. return replaceXRange(comp, options);
  100009. }).join(' ');
  100010. }
  100011. function replaceXRange(comp, options) {
  100012. comp = comp.trim();
  100013. var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
  100014. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  100015. debug('xRange', comp, ret, gtlt, M, m, p, pr);
  100016. var xM = isX(M);
  100017. var xm = xM || isX(m);
  100018. var xp = xm || isX(p);
  100019. var anyX = xp;
  100020. if (gtlt === '=' && anyX) {
  100021. gtlt = '';
  100022. }
  100023. pr = options.includePrerelease ? '-0' : '';
  100024. if (xM) {
  100025. if (gtlt === '>' || gtlt === '<') {
  100026. ret = '<0.0.0-0';
  100027. } else {
  100028. ret = '*';
  100029. }
  100030. } else if (gtlt && anyX) {
  100031. if (xm) {
  100032. m = 0;
  100033. }
  100034. p = 0;
  100035. if (gtlt === '>') {
  100036. gtlt = '>=';
  100037. if (xm) {
  100038. M = +M + 1;
  100039. m = 0;
  100040. p = 0;
  100041. } else {
  100042. m = +m + 1;
  100043. p = 0;
  100044. }
  100045. } else if (gtlt === '<=') {
  100046. gtlt = '<';
  100047. if (xm) {
  100048. M = +M + 1;
  100049. } else {
  100050. m = +m + 1;
  100051. }
  100052. }
  100053. ret = gtlt + M + '.' + m + '.' + p + pr;
  100054. } else if (xm) {
  100055. ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr;
  100056. } else if (xp) {
  100057. ret = '>=' + M + '.' + m + '.0' + pr + ' <' + M + '.' + (+m + 1) + '.0' + pr;
  100058. }
  100059. debug('xRange return', ret);
  100060. return ret;
  100061. });
  100062. }
  100063. function replaceStars(comp, options) {
  100064. debug('replaceStars', comp, options);
  100065. return comp.trim().replace(re[t.STAR], '');
  100066. }
  100067. function hyphenReplace($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
  100068. if (isX(fM)) {
  100069. from = '';
  100070. } else if (isX(fm)) {
  100071. from = '>=' + fM + '.0.0';
  100072. } else if (isX(fp)) {
  100073. from = '>=' + fM + '.' + fm + '.0';
  100074. } else {
  100075. from = '>=' + from;
  100076. }
  100077. if (isX(tM)) {
  100078. to = '';
  100079. } else if (isX(tm)) {
  100080. to = '<' + (+tM + 1) + '.0.0';
  100081. } else if (isX(tp)) {
  100082. to = '<' + tM + '.' + (+tm + 1) + '.0';
  100083. } else if (tpr) {
  100084. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
  100085. } else {
  100086. to = '<=' + to;
  100087. }
  100088. return (from + ' ' + to).trim();
  100089. }
  100090. Range.prototype.test = function (version) {
  100091. if (!version) {
  100092. return false;
  100093. }
  100094. if (typeof version === 'string') {
  100095. try {
  100096. version = new SemVer(version, this.options);
  100097. } catch (er) {
  100098. return false;
  100099. }
  100100. }
  100101. for (var i = 0; i < this.set.length; i++) {
  100102. if (testSet(this.set[i], version, this.options)) {
  100103. return true;
  100104. }
  100105. }
  100106. return false;
  100107. };
  100108. function testSet(set, version, options) {
  100109. for (var i = 0; i < set.length; i++) {
  100110. if (!set[i].test(version)) {
  100111. return false;
  100112. }
  100113. }
  100114. if (version.prerelease.length && !options.includePrerelease) {
  100115. for (i = 0; i < set.length; i++) {
  100116. debug(set[i].semver);
  100117. if (set[i].semver === ANY) {
  100118. continue;
  100119. }
  100120. if (set[i].semver.prerelease.length > 0) {
  100121. var allowed = set[i].semver;
  100122. if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
  100123. return true;
  100124. }
  100125. }
  100126. }
  100127. return false;
  100128. }
  100129. return true;
  100130. }
  100131. exports.satisfies = satisfies;
  100132. function satisfies(version, range, options) {
  100133. try {
  100134. range = new Range(range, options);
  100135. } catch (er) {
  100136. return false;
  100137. }
  100138. return range.test(version);
  100139. }
  100140. exports.maxSatisfying = maxSatisfying;
  100141. function maxSatisfying(versions, range, options) {
  100142. var max = null;
  100143. var maxSV = null;
  100144. try {
  100145. var rangeObj = new Range(range, options);
  100146. } catch (er) {
  100147. return null;
  100148. }
  100149. versions.forEach(function (v) {
  100150. if (rangeObj.test(v)) {
  100151. if (!max || maxSV.compare(v) === -1) {
  100152. max = v;
  100153. maxSV = new SemVer(max, options);
  100154. }
  100155. }
  100156. });
  100157. return max;
  100158. }
  100159. exports.minSatisfying = minSatisfying;
  100160. function minSatisfying(versions, range, options) {
  100161. var min = null;
  100162. var minSV = null;
  100163. try {
  100164. var rangeObj = new Range(range, options);
  100165. } catch (er) {
  100166. return null;
  100167. }
  100168. versions.forEach(function (v) {
  100169. if (rangeObj.test(v)) {
  100170. if (!min || minSV.compare(v) === 1) {
  100171. min = v;
  100172. minSV = new SemVer(min, options);
  100173. }
  100174. }
  100175. });
  100176. return min;
  100177. }
  100178. exports.minVersion = minVersion;
  100179. function minVersion(range, loose) {
  100180. range = new Range(range, loose);
  100181. var minver = new SemVer('0.0.0');
  100182. if (range.test(minver)) {
  100183. return minver;
  100184. }
  100185. minver = new SemVer('0.0.0-0');
  100186. if (range.test(minver)) {
  100187. return minver;
  100188. }
  100189. minver = null;
  100190. for (var i = 0; i < range.set.length; ++i) {
  100191. var comparators = range.set[i];
  100192. comparators.forEach(function (comparator) {
  100193. var compver = new SemVer(comparator.semver.version);
  100194. switch (comparator.operator) {
  100195. case '>':
  100196. if (compver.prerelease.length === 0) {
  100197. compver.patch++;
  100198. } else {
  100199. compver.prerelease.push(0);
  100200. }
  100201. compver.raw = compver.format();
  100202. case '':
  100203. case '>=':
  100204. if (!minver || gt(minver, compver)) {
  100205. minver = compver;
  100206. }
  100207. break;
  100208. case '<':
  100209. case '<=':
  100210. break;
  100211. default:
  100212. throw new Error('Unexpected operation: ' + comparator.operator);
  100213. }
  100214. });
  100215. }
  100216. if (minver && range.test(minver)) {
  100217. return minver;
  100218. }
  100219. return null;
  100220. }
  100221. exports.validRange = validRange;
  100222. function validRange(range, options) {
  100223. try {
  100224. return new Range(range, options).range || '*';
  100225. } catch (er) {
  100226. return null;
  100227. }
  100228. }
  100229. exports.ltr = ltr;
  100230. function ltr(version, range, options) {
  100231. return outside(version, range, '<', options);
  100232. }
  100233. exports.gtr = gtr;
  100234. function gtr(version, range, options) {
  100235. return outside(version, range, '>', options);
  100236. }
  100237. exports.outside = outside;
  100238. function outside(version, range, hilo, options) {
  100239. version = new SemVer(version, options);
  100240. range = new Range(range, options);
  100241. var gtfn, ltefn, ltfn, comp, ecomp;
  100242. switch (hilo) {
  100243. case '>':
  100244. gtfn = gt;
  100245. ltefn = lte;
  100246. ltfn = lt;
  100247. comp = '>';
  100248. ecomp = '>=';
  100249. break;
  100250. case '<':
  100251. gtfn = lt;
  100252. ltefn = gte;
  100253. ltfn = gt;
  100254. comp = '<';
  100255. ecomp = '<=';
  100256. break;
  100257. default:
  100258. throw new TypeError('Must provide a hilo val of "<" or ">"');
  100259. }
  100260. if (satisfies(version, range, options)) {
  100261. return false;
  100262. }
  100263. for (var i = 0; i < range.set.length; ++i) {
  100264. var comparators = range.set[i];
  100265. var high = null;
  100266. var low = null;
  100267. comparators.forEach(function (comparator) {
  100268. if (comparator.semver === ANY) {
  100269. comparator = new Comparator('>=0.0.0');
  100270. }
  100271. high = high || comparator;
  100272. low = low || comparator;
  100273. if (gtfn(comparator.semver, high.semver, options)) {
  100274. high = comparator;
  100275. } else if (ltfn(comparator.semver, low.semver, options)) {
  100276. low = comparator;
  100277. }
  100278. });
  100279. if (high.operator === comp || high.operator === ecomp) {
  100280. return false;
  100281. }
  100282. if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
  100283. return false;
  100284. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  100285. return false;
  100286. }
  100287. }
  100288. return true;
  100289. }
  100290. exports.prerelease = prerelease;
  100291. function prerelease(version, options) {
  100292. var parsed = parse(version, options);
  100293. return parsed && parsed.prerelease.length ? parsed.prerelease : null;
  100294. }
  100295. exports.intersects = intersects;
  100296. function intersects(r1, r2, options) {
  100297. r1 = new Range(r1, options);
  100298. r2 = new Range(r2, options);
  100299. return r1.intersects(r2);
  100300. }
  100301. exports.coerce = coerce;
  100302. function coerce(version, options) {
  100303. if (version instanceof SemVer) {
  100304. return version;
  100305. }
  100306. if (typeof version === 'number') {
  100307. version = String(version);
  100308. }
  100309. if (typeof version !== 'string') {
  100310. return null;
  100311. }
  100312. options = options || {};
  100313. var match = null;
  100314. if (!options.rtl) {
  100315. match = version.match(re[t.COERCE]);
  100316. } else {
  100317. var next;
  100318. while ((next = re[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
  100319. if (!match || next.index + next[0].length !== match.index + match[0].length) {
  100320. match = next;
  100321. }
  100322. re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
  100323. }
  100324. re[t.COERCERTL].lastIndex = -1;
  100325. }
  100326. if (match === null) {
  100327. return null;
  100328. }
  100329. return parse(match[2] + '.' + (match[3] || '0') + '.' + (match[4] || '0'), options);
  100330. }
  100331. }, "/$$rollup_base$$/packages/babel-preset-env/node_modules/babel-plugin-polyfill-corejs2/node_modules/semver");
  100332. var _excluded = ["method", "targets", "ignoreBrowserslistConfig", "configPath", "debug", "shouldInjectPolyfill", "absoluteImports"];
  100333. var _templateObject, _templateObject2, _templateObject3;
  100334. var _ref$2 = undefined || babel,
  100335. t$1$1 = _ref$2.types,
  100336. template = _ref$2.template;
  100337. function intersection(a, b) {
  100338. var result = new Set();
  100339. a.forEach(function (v) {
  100340. return b.has(v) && result.add(v);
  100341. });
  100342. return result;
  100343. }
  100344. function has$1(object, key) {
  100345. return Object.prototype.hasOwnProperty.call(object, key);
  100346. }
  100347. function getType(target) {
  100348. return Object.prototype.toString.call(target).slice(8, -1);
  100349. }
  100350. function resolveId(path) {
  100351. if (path.isIdentifier() && !path.scope.hasBinding(path.node.name, true)) {
  100352. return path.node.name;
  100353. }
  100354. var _path$evaluate = path.evaluate(),
  100355. deopt = _path$evaluate.deopt;
  100356. if (deopt && deopt.isIdentifier()) {
  100357. return deopt.node.name;
  100358. }
  100359. }
  100360. function resolveKey(path, computed) {
  100361. if (computed === void 0) {
  100362. computed = false;
  100363. }
  100364. var node = path.node,
  100365. parent = path.parent,
  100366. scope = path.scope;
  100367. if (path.isStringLiteral()) return node.value;
  100368. var name = node.name;
  100369. var isIdentifier = path.isIdentifier();
  100370. if (isIdentifier && !(computed || parent.computed)) return name;
  100371. if (computed && path.isMemberExpression() && path.get("object").isIdentifier({
  100372. name: "Symbol"
  100373. }) && !scope.hasBinding("Symbol", true)) {
  100374. var sym = resolveKey(path.get("property"), path.node.computed);
  100375. if (sym) return "Symbol." + sym;
  100376. }
  100377. if (!isIdentifier || scope.hasBinding(name, true)) {
  100378. var _path$evaluate2 = path.evaluate(),
  100379. value = _path$evaluate2.value;
  100380. if (typeof value === "string") return value;
  100381. }
  100382. }
  100383. function resolveSource(obj) {
  100384. if (obj.isMemberExpression() && obj.get("property").isIdentifier({
  100385. name: "prototype"
  100386. })) {
  100387. var _id = resolveId(obj.get("object"));
  100388. if (_id) {
  100389. return {
  100390. id: _id,
  100391. placement: "prototype"
  100392. };
  100393. }
  100394. return {
  100395. id: null,
  100396. placement: null
  100397. };
  100398. }
  100399. var id = resolveId(obj);
  100400. if (id) {
  100401. return {
  100402. id: id,
  100403. placement: "static"
  100404. };
  100405. }
  100406. var _obj$evaluate = obj.evaluate(),
  100407. value = _obj$evaluate.value;
  100408. if (value !== undefined) {
  100409. return {
  100410. id: getType(value),
  100411. placement: "prototype"
  100412. };
  100413. } else if (obj.isRegExpLiteral()) {
  100414. return {
  100415. id: "RegExp",
  100416. placement: "prototype"
  100417. };
  100418. } else if (obj.isFunction()) {
  100419. return {
  100420. id: "Function",
  100421. placement: "prototype"
  100422. };
  100423. }
  100424. return {
  100425. id: null,
  100426. placement: null
  100427. };
  100428. }
  100429. function getImportSource(_ref2) {
  100430. var node = _ref2.node;
  100431. if (node.specifiers.length === 0) return node.source.value;
  100432. }
  100433. function getRequireSource(_ref3) {
  100434. var node = _ref3.node;
  100435. if (!t$1$1.isExpressionStatement(node)) return;
  100436. var expression = node.expression;
  100437. var isRequire = t$1$1.isCallExpression(expression) && t$1$1.isIdentifier(expression.callee) && expression.callee.name === "require" && expression.arguments.length === 1 && t$1$1.isStringLiteral(expression.arguments[0]);
  100438. if (isRequire) return expression.arguments[0].value;
  100439. }
  100440. function hoist(node) {
  100441. node._blockHoist = 3;
  100442. return node;
  100443. }
  100444. function createUtilsGetter(cache) {
  100445. return function (path) {
  100446. var prog = path.findParent(function (p) {
  100447. return p.isProgram();
  100448. });
  100449. return {
  100450. injectGlobalImport: function injectGlobalImport(url) {
  100451. cache.storeAnonymous(prog, url, function (isScript, source) {
  100452. return isScript ? template.statement.ast(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["require(", ")"])), source) : t$1$1.importDeclaration([], source);
  100453. });
  100454. },
  100455. injectNamedImport: function injectNamedImport(url, name, hint) {
  100456. if (hint === void 0) {
  100457. hint = name;
  100458. }
  100459. return cache.storeNamed(prog, url, name, function (isScript, source, name) {
  100460. var id = prog.scope.generateUidIdentifier(hint);
  100461. return {
  100462. node: isScript ? hoist(template.statement.ast(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n var ", " = require(", ").", "\n "])), id, source, name)) : t$1$1.importDeclaration([t$1$1.importSpecifier(id, name)], source),
  100463. name: id.name
  100464. };
  100465. });
  100466. },
  100467. injectDefaultImport: function injectDefaultImport(url, hint) {
  100468. if (hint === void 0) {
  100469. hint = url;
  100470. }
  100471. return cache.storeNamed(prog, url, "default", function (isScript, source) {
  100472. var id = prog.scope.generateUidIdentifier(hint);
  100473. return {
  100474. node: isScript ? hoist(template.statement.ast(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["var ", " = require(", ")"])), id, source)) : t$1$1.importDeclaration([t$1$1.importDefaultSpecifier(id)], source),
  100475. name: id.name
  100476. };
  100477. });
  100478. }
  100479. };
  100480. };
  100481. }
  100482. var _ref4 = undefined || babel,
  100483. t$3 = _ref4.types;
  100484. var ImportsCache = function () {
  100485. function ImportsCache(resolver) {
  100486. this._imports = new WeakMap();
  100487. this._anonymousImports = new WeakMap();
  100488. this._lastImports = new WeakMap();
  100489. this._resolver = resolver;
  100490. }
  100491. var _proto = ImportsCache.prototype;
  100492. _proto.storeAnonymous = function storeAnonymous(programPath, url, getVal) {
  100493. var key = this._normalizeKey(programPath, url);
  100494. var imports = this._ensure(this._anonymousImports, programPath, Set);
  100495. if (imports.has(key)) return;
  100496. var node = getVal(programPath.node.sourceType === "script", t$3.stringLiteral(this._resolver(url)));
  100497. imports.add(key);
  100498. this._injectImport(programPath, node);
  100499. };
  100500. _proto.storeNamed = function storeNamed(programPath, url, name, getVal) {
  100501. var key = this._normalizeKey(programPath, url, name);
  100502. var imports = this._ensure(this._imports, programPath, Map);
  100503. if (!imports.has(key)) {
  100504. var _getVal = getVal(programPath.node.sourceType === "script", t$3.stringLiteral(this._resolver(url)), t$3.identifier(name)),
  100505. node = _getVal.node,
  100506. id = _getVal.name;
  100507. imports.set(key, id);
  100508. this._injectImport(programPath, node);
  100509. }
  100510. return t$3.identifier(imports.get(key));
  100511. };
  100512. _proto._injectImport = function _injectImport(programPath, node) {
  100513. var lastImport = this._lastImports.get(programPath);
  100514. if (lastImport && lastImport.node && lastImport.parent === programPath.node && lastImport.container === programPath.node.body) {
  100515. lastImport = lastImport.insertAfter(node);
  100516. } else {
  100517. lastImport = programPath.unshiftContainer("body", node);
  100518. }
  100519. lastImport = lastImport[lastImport.length - 1];
  100520. this._lastImports.set(programPath, lastImport);
  100521. };
  100522. _proto._ensure = function _ensure(map, programPath, Collection) {
  100523. var collection = map.get(programPath);
  100524. if (!collection) {
  100525. collection = new Collection();
  100526. map.set(programPath, collection);
  100527. }
  100528. return collection;
  100529. };
  100530. _proto._normalizeKey = function _normalizeKey(programPath, url, name) {
  100531. if (name === void 0) {
  100532. name = "";
  100533. }
  100534. var sourceType = programPath.node.sourceType;
  100535. return (name && sourceType) + "::" + url + "::" + name;
  100536. };
  100537. return ImportsCache;
  100538. }();
  100539. var presetEnvSilentDebugHeader = "#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets";
  100540. function stringifyTargetsMultiline(targets) {
  100541. return JSON.stringify(prettifyTargets(targets), null, 2);
  100542. }
  100543. function patternToRegExp(pattern) {
  100544. if (pattern instanceof RegExp) return pattern;
  100545. try {
  100546. return new RegExp("^" + pattern + "$");
  100547. } catch (_unused) {
  100548. return null;
  100549. }
  100550. }
  100551. function buildUnusedError(label, unused) {
  100552. if (!unused.length) return "";
  100553. return " - The following \"" + label + "\" patterns didn't match any polyfill:\n" + unused.map(function (original) {
  100554. return " " + String(original) + "\n";
  100555. }).join("");
  100556. }
  100557. function buldDuplicatesError(duplicates) {
  100558. if (!duplicates.size) return "";
  100559. return " - The following polyfills were matched both by \"include\" and \"exclude\" patterns:\n" + Array.from(duplicates, function (name) {
  100560. return " " + name + "\n";
  100561. }).join("");
  100562. }
  100563. function validateIncludeExclude(provider, polyfills, includePatterns, excludePatterns) {
  100564. var current;
  100565. var filter = function filter(pattern) {
  100566. var regexp = patternToRegExp(pattern);
  100567. if (!regexp) return false;
  100568. var matched = false;
  100569. for (var _iterator = _createForOfIteratorHelperLoose(polyfills), _step; !(_step = _iterator()).done;) {
  100570. var polyfill = _step.value;
  100571. if (regexp.test(polyfill)) {
  100572. matched = true;
  100573. current.add(polyfill);
  100574. }
  100575. }
  100576. return !matched;
  100577. };
  100578. var include = current = new Set();
  100579. var unusedInclude = Array.from(includePatterns).filter(filter);
  100580. var exclude = current = new Set();
  100581. var unusedExclude = Array.from(excludePatterns).filter(filter);
  100582. var duplicates = intersection(include, exclude);
  100583. if (duplicates.size > 0 || unusedInclude.length > 0 || unusedExclude.length > 0) {
  100584. throw new Error("Error while validating the \"" + provider + "\" provider options:\n" + buildUnusedError("include", unusedInclude) + buildUnusedError("exclude", unusedExclude) + buldDuplicatesError(duplicates));
  100585. }
  100586. return {
  100587. include: include,
  100588. exclude: exclude
  100589. };
  100590. }
  100591. function applyMissingDependenciesDefaults(options, babelApi) {
  100592. var _options$missingDepen = options.missingDependencies,
  100593. missingDependencies = _options$missingDepen === void 0 ? {} : _options$missingDepen;
  100594. if (missingDependencies === false) return false;
  100595. var caller = babelApi.caller(function (caller) {
  100596. return caller == null ? void 0 : caller.name;
  100597. });
  100598. var _missingDependencies$ = missingDependencies.log,
  100599. log = _missingDependencies$ === void 0 ? "deferred" : _missingDependencies$,
  100600. _missingDependencies$2 = missingDependencies.inject,
  100601. inject = _missingDependencies$2 === void 0 ? caller === "rollup-plugin-babel" ? "throw" : "import" : _missingDependencies$2,
  100602. _missingDependencies$3 = missingDependencies.all,
  100603. all = _missingDependencies$3 === void 0 ? false : _missingDependencies$3;
  100604. return {
  100605. log: log,
  100606. inject: inject,
  100607. all: all
  100608. };
  100609. }
  100610. var usage = function usage(callProvider) {
  100611. function property(object, key, placement, path) {
  100612. return callProvider({
  100613. kind: "property",
  100614. object: object,
  100615. key: key,
  100616. placement: placement
  100617. }, path);
  100618. }
  100619. return {
  100620. ReferencedIdentifier: function ReferencedIdentifier(path) {
  100621. var name = path.node.name,
  100622. scope = path.scope;
  100623. if (scope.getBindingIdentifier(name)) return;
  100624. callProvider({
  100625. kind: "global",
  100626. name: name
  100627. }, path);
  100628. },
  100629. MemberExpression: function MemberExpression(path) {
  100630. var key = resolveKey(path.get("property"), path.node.computed);
  100631. if (!key || key === "prototype") return;
  100632. var object = path.get("object");
  100633. var binding = object.scope.getBinding(object.node.name);
  100634. if (binding && binding.path.isImportNamespaceSpecifier()) return;
  100635. var source = resolveSource(object);
  100636. return property(source.id, key, source.placement, path);
  100637. },
  100638. ObjectPattern: function ObjectPattern(path) {
  100639. var parentPath = path.parentPath,
  100640. parent = path.parent;
  100641. var obj;
  100642. if (parentPath.isVariableDeclarator()) {
  100643. obj = parentPath.get("init");
  100644. } else if (parentPath.isAssignmentExpression()) {
  100645. obj = parentPath.get("right");
  100646. } else if (parentPath.isFunction()) {
  100647. var grand = parentPath.parentPath;
  100648. if (grand.isCallExpression() || grand.isNewExpression()) {
  100649. if (grand.node.callee === parent) {
  100650. obj = grand.get("arguments")[path.key];
  100651. }
  100652. }
  100653. }
  100654. var id = null;
  100655. var placement = null;
  100656. if (obj) {
  100657. var _resolveSource = resolveSource(obj);
  100658. id = _resolveSource.id;
  100659. placement = _resolveSource.placement;
  100660. }
  100661. for (var _iterator2 = _createForOfIteratorHelperLoose(path.get("properties")), _step2; !(_step2 = _iterator2()).done;) {
  100662. var prop = _step2.value;
  100663. if (prop.isObjectProperty()) {
  100664. var key = resolveKey(prop.get("key"));
  100665. if (key) property(id, key, placement, prop);
  100666. }
  100667. }
  100668. },
  100669. BinaryExpression: function BinaryExpression(path) {
  100670. if (path.node.operator !== "in") return;
  100671. var source = resolveSource(path.get("right"));
  100672. var key = resolveKey(path.get("left"), true);
  100673. if (!key) return;
  100674. callProvider({
  100675. kind: "in",
  100676. object: source.id,
  100677. key: key,
  100678. placement: source.placement
  100679. }, path);
  100680. }
  100681. };
  100682. };
  100683. var entry = function entry(callProvider) {
  100684. return {
  100685. ImportDeclaration: function ImportDeclaration(path) {
  100686. var source = getImportSource(path);
  100687. if (!source) return;
  100688. callProvider({
  100689. kind: "import",
  100690. source: source
  100691. }, path);
  100692. },
  100693. Program: function Program(path) {
  100694. path.get("body").forEach(function (bodyPath) {
  100695. var source = getRequireSource(bodyPath);
  100696. if (!source) return;
  100697. callProvider({
  100698. kind: "import",
  100699. source: source
  100700. }, bodyPath);
  100701. });
  100702. }
  100703. };
  100704. };
  100705. function resolve(dirname, moduleName, absoluteImports) {
  100706. if (absoluteImports === false) return moduleName;
  100707. throw new Error("\"absoluteImports\" is not supported in bundles prepared for the browser.");
  100708. }
  100709. function has$2(basedir, name) {
  100710. return true;
  100711. }
  100712. function logMissing(missingDeps) {}
  100713. function laterLogMissing(missingDeps) {}
  100714. var PossibleGlobalObjects = new Set(["global", "globalThis", "self", "window"]);
  100715. function createMetaResolver(polyfills) {
  100716. var staticP = polyfills["static"],
  100717. instanceP = polyfills.instance,
  100718. globalP = polyfills.global;
  100719. return function (meta) {
  100720. if (meta.kind === "global" && globalP && has$1(globalP, meta.name)) {
  100721. return {
  100722. kind: "global",
  100723. desc: globalP[meta.name],
  100724. name: meta.name
  100725. };
  100726. }
  100727. if (meta.kind === "property" || meta.kind === "in") {
  100728. var placement = meta.placement,
  100729. object = meta.object,
  100730. key = meta.key;
  100731. if (object && placement === "static") {
  100732. if (globalP && PossibleGlobalObjects.has(object) && has$1(globalP, key)) {
  100733. return {
  100734. kind: "global",
  100735. desc: globalP[key],
  100736. name: key
  100737. };
  100738. }
  100739. if (staticP && has$1(staticP, object) && has$1(staticP[object], key)) {
  100740. return {
  100741. kind: "static",
  100742. desc: staticP[object][key],
  100743. name: object + "$" + key
  100744. };
  100745. }
  100746. }
  100747. if (instanceP && has$1(instanceP, key)) {
  100748. return {
  100749. kind: "instance",
  100750. desc: instanceP[key],
  100751. name: "" + key
  100752. };
  100753. }
  100754. }
  100755. };
  100756. }
  100757. var getTargets = getTargets$2["default"] || getTargets$2;
  100758. function resolveOptions(options, babelApi) {
  100759. var method = options.method,
  100760. targetsOption = options.targets,
  100761. ignoreBrowserslistConfig = options.ignoreBrowserslistConfig,
  100762. configPath = options.configPath,
  100763. debug = options.debug,
  100764. shouldInjectPolyfill = options.shouldInjectPolyfill,
  100765. absoluteImports = options.absoluteImports,
  100766. providerOptions = _objectWithoutProperties(options, _excluded);
  100767. var methodName;
  100768. if (method === "usage-global") methodName = "usageGlobal";else if (method === "entry-global") methodName = "entryGlobal";else if (method === "usage-pure") methodName = "usagePure";else if (typeof method !== "string") {
  100769. throw new Error(".method must be a string");
  100770. } else {
  100771. throw new Error(".method must be one of \"entry-global\", \"usage-global\"" + (" or \"usage-pure\" (received " + JSON.stringify(method) + ")"));
  100772. }
  100773. if (typeof shouldInjectPolyfill === "function") {
  100774. if (options.include || options.exclude) {
  100775. throw new Error(".include and .exclude are not supported when using the" + " .shouldInjectPolyfill function.");
  100776. }
  100777. } else if (shouldInjectPolyfill != null) {
  100778. throw new Error(".shouldInjectPolyfill must be a function, or undefined" + (" (received " + JSON.stringify(shouldInjectPolyfill) + ")"));
  100779. }
  100780. if (absoluteImports != null && typeof absoluteImports !== "boolean" && typeof absoluteImports !== "string") {
  100781. throw new Error(".absoluteImports must be a boolean, a string, or undefined" + (" (received " + JSON.stringify(absoluteImports) + ")"));
  100782. }
  100783. var targets;
  100784. if (targetsOption || configPath || ignoreBrowserslistConfig) {
  100785. var targetsObj = typeof targetsOption === "string" || Array.isArray(targetsOption) ? {
  100786. browsers: targetsOption
  100787. } : targetsOption;
  100788. targets = getTargets(targetsObj, {
  100789. ignoreBrowserslistConfig: ignoreBrowserslistConfig,
  100790. configPath: configPath
  100791. });
  100792. } else {
  100793. targets = babelApi.targets();
  100794. }
  100795. return {
  100796. method: method,
  100797. methodName: methodName,
  100798. targets: targets,
  100799. absoluteImports: absoluteImports != null ? absoluteImports : false,
  100800. shouldInjectPolyfill: shouldInjectPolyfill,
  100801. debug: !!debug,
  100802. providerOptions: providerOptions
  100803. };
  100804. }
  100805. function instantiateProvider(factory, options, missingDependencies, dirname, debugLog, babelApi) {
  100806. var _resolveOptions = resolveOptions(options, babelApi),
  100807. method = _resolveOptions.method,
  100808. methodName = _resolveOptions.methodName,
  100809. targets = _resolveOptions.targets,
  100810. _debug = _resolveOptions.debug,
  100811. _shouldInjectPolyfill = _resolveOptions.shouldInjectPolyfill,
  100812. providerOptions = _resolveOptions.providerOptions,
  100813. absoluteImports = _resolveOptions.absoluteImports;
  100814. var getUtils = createUtilsGetter(new ImportsCache(function (moduleName) {
  100815. return resolve(dirname, moduleName, absoluteImports);
  100816. }));
  100817. var include, exclude;
  100818. var polyfillsSupport;
  100819. var polyfillsNames;
  100820. var filterPolyfills;
  100821. var depsCache = new Map();
  100822. var api = {
  100823. babel: babelApi,
  100824. getUtils: getUtils,
  100825. method: options.method,
  100826. targets: targets,
  100827. createMetaResolver: createMetaResolver,
  100828. shouldInjectPolyfill: function shouldInjectPolyfill(name) {
  100829. if (polyfillsNames === undefined) {
  100830. throw new Error("Internal error in the " + factory.name + " provider: " + "shouldInjectPolyfill() can't be called during initialization.");
  100831. }
  100832. if (!polyfillsNames.has(name)) {
  100833. console.warn("Internal error in the " + provider.name + " provider: " + ("unknown polyfill \"" + name + "\"."));
  100834. }
  100835. if (filterPolyfills && !filterPolyfills(name)) return false;
  100836. var shouldInject = isRequired(name, targets, {
  100837. compatData: polyfillsSupport,
  100838. includes: include,
  100839. excludes: exclude
  100840. });
  100841. if (_shouldInjectPolyfill) {
  100842. shouldInject = _shouldInjectPolyfill(name, shouldInject);
  100843. if (typeof shouldInject !== "boolean") {
  100844. throw new Error(".shouldInjectPolyfill must return a boolean.");
  100845. }
  100846. }
  100847. return shouldInject;
  100848. },
  100849. debug: function debug(name) {
  100850. debugLog().found = true;
  100851. if (!_debug || !name) return;
  100852. if (debugLog().polyfills.has(provider.name)) return;
  100853. debugLog().polyfills.set(name, polyfillsSupport && name && polyfillsSupport[name]);
  100854. },
  100855. assertDependency: function assertDependency(name, version) {
  100856. if (version === void 0) {
  100857. version = "*";
  100858. }
  100859. if (missingDependencies === false) return;
  100860. if (absoluteImports) {
  100861. return;
  100862. }
  100863. var dep = version === "*" ? name : name + "@^" + version;
  100864. var found = missingDependencies.all ? false : mapGetOr(depsCache, name + " :: " + dirname, function () {
  100865. return has$2();
  100866. });
  100867. if (!found) {
  100868. debugLog().missingDeps.add(dep);
  100869. }
  100870. }
  100871. };
  100872. var provider = factory(api, providerOptions, dirname);
  100873. if (typeof provider[methodName] !== "function") {
  100874. throw new Error("The \"" + (provider.name || factory.name) + "\" provider doesn't " + ("support the \"" + method + "\" polyfilling method."));
  100875. }
  100876. if (Array.isArray(provider.polyfills)) {
  100877. polyfillsNames = new Set(provider.polyfills);
  100878. filterPolyfills = provider.filterPolyfills;
  100879. } else if (provider.polyfills) {
  100880. polyfillsNames = new Set(Object.keys(provider.polyfills));
  100881. polyfillsSupport = provider.polyfills;
  100882. filterPolyfills = provider.filterPolyfills;
  100883. } else {
  100884. polyfillsNames = new Set();
  100885. }
  100886. var _validateIncludeExclu = validateIncludeExclude(provider.name || factory.name, polyfillsNames, providerOptions.include || [], providerOptions.exclude || []);
  100887. include = _validateIncludeExclu.include;
  100888. exclude = _validateIncludeExclu.exclude;
  100889. return {
  100890. debug: _debug,
  100891. method: method,
  100892. targets: targets,
  100893. provider: provider,
  100894. callProvider: function callProvider(payload, path) {
  100895. var utils = getUtils(path);
  100896. provider[methodName](payload, utils, path);
  100897. }
  100898. };
  100899. }
  100900. function definePolyfillProvider(factory) {
  100901. return declare(function (babelApi, options, dirname) {
  100902. babelApi.assertVersion(7);
  100903. var traverse = babelApi.traverse;
  100904. var debugLog;
  100905. var missingDependencies = applyMissingDependenciesDefaults(options, babelApi);
  100906. var _instantiateProvider = instantiateProvider(factory, options, missingDependencies, dirname, function () {
  100907. return debugLog;
  100908. }, babelApi),
  100909. debug = _instantiateProvider.debug,
  100910. method = _instantiateProvider.method,
  100911. targets = _instantiateProvider.targets,
  100912. provider = _instantiateProvider.provider,
  100913. callProvider = _instantiateProvider.callProvider;
  100914. var createVisitor = method === "entry-global" ? entry : usage;
  100915. var visitor = provider.visitor ? traverse.visitors.merge([createVisitor(callProvider), provider.visitor]) : createVisitor(callProvider);
  100916. if (debug && debug !== presetEnvSilentDebugHeader) {
  100917. console.log(provider.name + ": `DEBUG` option");
  100918. console.log("\nUsing targets: " + stringifyTargetsMultiline(targets));
  100919. console.log("\nUsing polyfills with `" + method + "` method:");
  100920. }
  100921. return {
  100922. name: "inject-polyfills",
  100923. visitor: visitor,
  100924. pre: function pre() {
  100925. var _provider$pre;
  100926. debugLog = {
  100927. polyfills: new Map(),
  100928. found: false,
  100929. providers: new Set(),
  100930. missingDeps: new Set()
  100931. };
  100932. (_provider$pre = provider.pre) == null ? void 0 : _provider$pre.apply(this, arguments);
  100933. },
  100934. post: function post() {
  100935. var _provider$post;
  100936. (_provider$post = provider.post) == null ? void 0 : _provider$post.apply(this, arguments);
  100937. if (missingDependencies !== false) {
  100938. if (missingDependencies.log === "per-file") {
  100939. logMissing(debugLog.missingDeps);
  100940. } else {
  100941. laterLogMissing(debugLog.missingDeps);
  100942. }
  100943. }
  100944. if (!debug) return;
  100945. if (this.filename) console.log("\n[" + this.filename + "]");
  100946. if (debugLog.polyfills.size === 0) {
  100947. console.log(method === "entry-global" ? debugLog.found ? "Based on your targets, the " + provider.name + " polyfill did not add any polyfill." : "The entry point for the " + provider.name + " polyfill has not been found." : "Based on your code and targets, the " + provider.name + " polyfill did not add any polyfill.");
  100948. return;
  100949. }
  100950. if (method === "entry-global") {
  100951. console.log("The " + provider.name + " polyfill entry has been replaced with " + "the following polyfills:");
  100952. } else {
  100953. console.log("The " + provider.name + " polyfill added the following polyfills:");
  100954. }
  100955. for (var _iterator3 = _createForOfIteratorHelperLoose(debugLog.polyfills), _step3; !(_step3 = _iterator3()).done;) {
  100956. var _step3$value = _slicedToArray$2(_step3.value, 2),
  100957. name = _step3$value[0],
  100958. support = _step3$value[1];
  100959. if (support) {
  100960. var filteredTargets = getInclusionReasons(name, targets, support);
  100961. var formattedTargets = JSON.stringify(filteredTargets).replace(/,/g, ", ").replace(/^\{"/, '{ "').replace(/"\}$/, '" }');
  100962. console.log(" " + name + " " + formattedTargets);
  100963. } else {
  100964. console.log(" " + name);
  100965. }
  100966. }
  100967. }
  100968. };
  100969. });
  100970. }
  100971. function mapGetOr(map, key, getDefault) {
  100972. var val = map.get(key);
  100973. if (val === undefined) {
  100974. val = getDefault();
  100975. map.set(key, val);
  100976. }
  100977. return val;
  100978. }
  100979. var define$1 = function define(name, pure, global, meta) {
  100980. if (global === void 0) {
  100981. global = [];
  100982. }
  100983. return {
  100984. name: name,
  100985. pure: pure,
  100986. global: global,
  100987. meta: meta
  100988. };
  100989. };
  100990. var pureAndGlobal = function pureAndGlobal(pure, global, minRuntimeVersion) {
  100991. if (minRuntimeVersion === void 0) {
  100992. minRuntimeVersion = null;
  100993. }
  100994. return define$1(global[0], pure, global, {
  100995. minRuntimeVersion: minRuntimeVersion
  100996. });
  100997. };
  100998. var globalOnly = function globalOnly(global) {
  100999. return define$1(global[0], null, global);
  101000. };
  101001. var pureOnly = function pureOnly(pure, name) {
  101002. return define$1(name, pure, []);
  101003. };
  101004. var ArrayNatureIterators$1 = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
  101005. var CommonIterators$1 = ["es6.string.iterator"].concat(ArrayNatureIterators$1);
  101006. var PromiseDependencies$1 = ["es6.object.to-string", "es6.promise"];
  101007. var BuiltIns$1 = {
  101008. DataView: globalOnly(["es6.typed.data-view"]),
  101009. Float32Array: globalOnly(["es6.typed.float32-array"]),
  101010. Float64Array: globalOnly(["es6.typed.float64-array"]),
  101011. Int8Array: globalOnly(["es6.typed.int8-array"]),
  101012. Int16Array: globalOnly(["es6.typed.int16-array"]),
  101013. Int32Array: globalOnly(["es6.typed.int32-array"]),
  101014. Map: pureAndGlobal("map", ["es6.map"].concat(_toConsumableArray(CommonIterators$1))),
  101015. Number: globalOnly(["es6.number.constructor"]),
  101016. Promise: pureAndGlobal("promise", PromiseDependencies$1),
  101017. RegExp: globalOnly(["es6.regexp.constructor"]),
  101018. Set: pureAndGlobal("set", ["es6.set"].concat(_toConsumableArray(CommonIterators$1))),
  101019. Symbol: pureAndGlobal("symbol", ["es6.symbol"]),
  101020. Uint8Array: globalOnly(["es6.typed.uint8-array"]),
  101021. Uint8ClampedArray: globalOnly(["es6.typed.uint8-clamped-array"]),
  101022. Uint16Array: globalOnly(["es6.typed.uint16-array"]),
  101023. Uint32Array: globalOnly(["es6.typed.uint32-array"]),
  101024. WeakMap: pureAndGlobal("weak-map", ["es6.weak-map"].concat(_toConsumableArray(CommonIterators$1))),
  101025. WeakSet: pureAndGlobal("weak-set", ["es6.weak-set"].concat(_toConsumableArray(CommonIterators$1))),
  101026. setImmediate: pureOnly("set-immediate", "web.immediate"),
  101027. clearImmediate: pureOnly("clear-immediate", "web.immediate"),
  101028. parseFloat: pureOnly("parse-float", "es6.parse-float"),
  101029. parseInt: pureOnly("parse-int", "es6.parse-int")
  101030. };
  101031. var InstanceProperties$1 = {
  101032. __defineGetter__: globalOnly(["es7.object.define-getter"]),
  101033. __defineSetter__: globalOnly(["es7.object.define-setter"]),
  101034. __lookupGetter__: globalOnly(["es7.object.lookup-getter"]),
  101035. __lookupSetter__: globalOnly(["es7.object.lookup-setter"]),
  101036. anchor: globalOnly(["es6.string.anchor"]),
  101037. big: globalOnly(["es6.string.big"]),
  101038. bind: globalOnly(["es6.function.bind"]),
  101039. blink: globalOnly(["es6.string.blink"]),
  101040. bold: globalOnly(["es6.string.bold"]),
  101041. codePointAt: globalOnly(["es6.string.code-point-at"]),
  101042. copyWithin: globalOnly(["es6.array.copy-within"]),
  101043. endsWith: globalOnly(["es6.string.ends-with"]),
  101044. entries: globalOnly(ArrayNatureIterators$1),
  101045. every: globalOnly(["es6.array.every"]),
  101046. fill: globalOnly(["es6.array.fill"]),
  101047. filter: globalOnly(["es6.array.filter"]),
  101048. "finally": globalOnly(["es7.promise.finally"].concat(PromiseDependencies$1)),
  101049. find: globalOnly(["es6.array.find"]),
  101050. findIndex: globalOnly(["es6.array.find-index"]),
  101051. fixed: globalOnly(["es6.string.fixed"]),
  101052. flags: globalOnly(["es6.regexp.flags"]),
  101053. flatMap: globalOnly(["es7.array.flat-map"]),
  101054. fontcolor: globalOnly(["es6.string.fontcolor"]),
  101055. fontsize: globalOnly(["es6.string.fontsize"]),
  101056. forEach: globalOnly(["es6.array.for-each"]),
  101057. includes: globalOnly(["es6.string.includes", "es7.array.includes"]),
  101058. indexOf: globalOnly(["es6.array.index-of"]),
  101059. italics: globalOnly(["es6.string.italics"]),
  101060. keys: globalOnly(ArrayNatureIterators$1),
  101061. lastIndexOf: globalOnly(["es6.array.last-index-of"]),
  101062. link: globalOnly(["es6.string.link"]),
  101063. map: globalOnly(["es6.array.map"]),
  101064. match: globalOnly(["es6.regexp.match"]),
  101065. name: globalOnly(["es6.function.name"]),
  101066. padStart: globalOnly(["es7.string.pad-start"]),
  101067. padEnd: globalOnly(["es7.string.pad-end"]),
  101068. reduce: globalOnly(["es6.array.reduce"]),
  101069. reduceRight: globalOnly(["es6.array.reduce-right"]),
  101070. repeat: globalOnly(["es6.string.repeat"]),
  101071. replace: globalOnly(["es6.regexp.replace"]),
  101072. search: globalOnly(["es6.regexp.search"]),
  101073. small: globalOnly(["es6.string.small"]),
  101074. some: globalOnly(["es6.array.some"]),
  101075. sort: globalOnly(["es6.array.sort"]),
  101076. split: globalOnly(["es6.regexp.split"]),
  101077. startsWith: globalOnly(["es6.string.starts-with"]),
  101078. strike: globalOnly(["es6.string.strike"]),
  101079. sub: globalOnly(["es6.string.sub"]),
  101080. sup: globalOnly(["es6.string.sup"]),
  101081. toISOString: globalOnly(["es6.date.to-iso-string"]),
  101082. toJSON: globalOnly(["es6.date.to-json"]),
  101083. toString: globalOnly(["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"]),
  101084. trim: globalOnly(["es6.string.trim"]),
  101085. trimEnd: globalOnly(["es7.string.trim-right"]),
  101086. trimLeft: globalOnly(["es7.string.trim-left"]),
  101087. trimRight: globalOnly(["es7.string.trim-right"]),
  101088. trimStart: globalOnly(["es7.string.trim-left"]),
  101089. values: globalOnly(ArrayNatureIterators$1)
  101090. };
  101091. if ("es6.array.slice" in corejs2BuiltIns) {
  101092. InstanceProperties$1.slice = globalOnly(["es6.array.slice"]);
  101093. }
  101094. var StaticProperties$1 = {
  101095. Array: {
  101096. from: pureAndGlobal("array/from", ["es6.symbol", "es6.array.from"].concat(_toConsumableArray(CommonIterators$1))),
  101097. isArray: pureAndGlobal("array/is-array", ["es6.array.is-array"]),
  101098. of: pureAndGlobal("array/of", ["es6.array.of"])
  101099. },
  101100. Date: {
  101101. now: pureAndGlobal("date/now", ["es6.date.now"])
  101102. },
  101103. JSON: {
  101104. stringify: pureOnly("json/stringify", "es6.symbol")
  101105. },
  101106. Math: {
  101107. acosh: pureAndGlobal("math/acosh", ["es6.math.acosh"], "7.0.1"),
  101108. asinh: pureAndGlobal("math/asinh", ["es6.math.asinh"], "7.0.1"),
  101109. atanh: pureAndGlobal("math/atanh", ["es6.math.atanh"], "7.0.1"),
  101110. cbrt: pureAndGlobal("math/cbrt", ["es6.math.cbrt"], "7.0.1"),
  101111. clz32: pureAndGlobal("math/clz32", ["es6.math.clz32"], "7.0.1"),
  101112. cosh: pureAndGlobal("math/cosh", ["es6.math.cosh"], "7.0.1"),
  101113. expm1: pureAndGlobal("math/expm1", ["es6.math.expm1"], "7.0.1"),
  101114. fround: pureAndGlobal("math/fround", ["es6.math.fround"], "7.0.1"),
  101115. hypot: pureAndGlobal("math/hypot", ["es6.math.hypot"], "7.0.1"),
  101116. imul: pureAndGlobal("math/imul", ["es6.math.imul"], "7.0.1"),
  101117. log1p: pureAndGlobal("math/log1p", ["es6.math.log1p"], "7.0.1"),
  101118. log10: pureAndGlobal("math/log10", ["es6.math.log10"], "7.0.1"),
  101119. log2: pureAndGlobal("math/log2", ["es6.math.log2"], "7.0.1"),
  101120. sign: pureAndGlobal("math/sign", ["es6.math.sign"], "7.0.1"),
  101121. sinh: pureAndGlobal("math/sinh", ["es6.math.sinh"], "7.0.1"),
  101122. tanh: pureAndGlobal("math/tanh", ["es6.math.tanh"], "7.0.1"),
  101123. trunc: pureAndGlobal("math/trunc", ["es6.math.trunc"], "7.0.1")
  101124. },
  101125. Number: {
  101126. EPSILON: pureAndGlobal("number/epsilon", ["es6.number.epsilon"]),
  101127. MIN_SAFE_INTEGER: pureAndGlobal("number/min-safe-integer", ["es6.number.min-safe-integer"]),
  101128. MAX_SAFE_INTEGER: pureAndGlobal("number/max-safe-integer", ["es6.number.max-safe-integer"]),
  101129. isFinite: pureAndGlobal("number/is-finite", ["es6.number.is-finite"]),
  101130. isInteger: pureAndGlobal("number/is-integer", ["es6.number.is-integer"]),
  101131. isSafeInteger: pureAndGlobal("number/is-safe-integer", ["es6.number.is-safe-integer"]),
  101132. isNaN: pureAndGlobal("number/is-nan", ["es6.number.is-nan"]),
  101133. parseFloat: pureAndGlobal("number/parse-float", ["es6.number.parse-float"]),
  101134. parseInt: pureAndGlobal("number/parse-int", ["es6.number.parse-int"])
  101135. },
  101136. Object: {
  101137. assign: pureAndGlobal("object/assign", ["es6.object.assign"]),
  101138. create: pureAndGlobal("object/create", ["es6.object.create"]),
  101139. defineProperties: pureAndGlobal("object/define-properties", ["es6.object.define-properties"]),
  101140. defineProperty: pureAndGlobal("object/define-property", ["es6.object.define-property"]),
  101141. entries: pureAndGlobal("object/entries", ["es7.object.entries"]),
  101142. freeze: pureAndGlobal("object/freeze", ["es6.object.freeze"]),
  101143. getOwnPropertyDescriptor: pureAndGlobal("object/get-own-property-descriptor", ["es6.object.get-own-property-descriptor"]),
  101144. getOwnPropertyDescriptors: pureAndGlobal("object/get-own-property-descriptors", ["es7.object.get-own-property-descriptors"]),
  101145. getOwnPropertyNames: pureAndGlobal("object/get-own-property-names", ["es6.object.get-own-property-names"]),
  101146. getOwnPropertySymbols: pureAndGlobal("object/get-own-property-symbols", ["es6.symbol"]),
  101147. getPrototypeOf: pureAndGlobal("object/get-prototype-of", ["es6.object.get-prototype-of"]),
  101148. is: pureAndGlobal("object/is", ["es6.object.is"]),
  101149. isExtensible: pureAndGlobal("object/is-extensible", ["es6.object.is-extensible"]),
  101150. isFrozen: pureAndGlobal("object/is-frozen", ["es6.object.is-frozen"]),
  101151. isSealed: pureAndGlobal("object/is-sealed", ["es6.object.is-sealed"]),
  101152. keys: pureAndGlobal("object/keys", ["es6.object.keys"]),
  101153. preventExtensions: pureAndGlobal("object/prevent-extensions", ["es6.object.prevent-extensions"]),
  101154. seal: pureAndGlobal("object/seal", ["es6.object.seal"]),
  101155. setPrototypeOf: pureAndGlobal("object/set-prototype-of", ["es6.object.set-prototype-of"]),
  101156. values: pureAndGlobal("object/values", ["es7.object.values"])
  101157. },
  101158. Promise: {
  101159. all: globalOnly(CommonIterators$1),
  101160. race: globalOnly(CommonIterators$1)
  101161. },
  101162. Reflect: {
  101163. apply: pureAndGlobal("reflect/apply", ["es6.reflect.apply"]),
  101164. construct: pureAndGlobal("reflect/construct", ["es6.reflect.construct"]),
  101165. defineProperty: pureAndGlobal("reflect/define-property", ["es6.reflect.define-property"]),
  101166. deleteProperty: pureAndGlobal("reflect/delete-property", ["es6.reflect.delete-property"]),
  101167. get: pureAndGlobal("reflect/get", ["es6.reflect.get"]),
  101168. getOwnPropertyDescriptor: pureAndGlobal("reflect/get-own-property-descriptor", ["es6.reflect.get-own-property-descriptor"]),
  101169. getPrototypeOf: pureAndGlobal("reflect/get-prototype-of", ["es6.reflect.get-prototype-of"]),
  101170. has: pureAndGlobal("reflect/has", ["es6.reflect.has"]),
  101171. isExtensible: pureAndGlobal("reflect/is-extensible", ["es6.reflect.is-extensible"]),
  101172. ownKeys: pureAndGlobal("reflect/own-keys", ["es6.reflect.own-keys"]),
  101173. preventExtensions: pureAndGlobal("reflect/prevent-extensions", ["es6.reflect.prevent-extensions"]),
  101174. set: pureAndGlobal("reflect/set", ["es6.reflect.set"]),
  101175. setPrototypeOf: pureAndGlobal("reflect/set-prototype-of", ["es6.reflect.set-prototype-of"])
  101176. },
  101177. String: {
  101178. at: pureOnly("string/at", "es7.string.at"),
  101179. fromCodePoint: pureAndGlobal("string/from-code-point", ["es6.string.from-code-point"]),
  101180. raw: pureAndGlobal("string/raw", ["es6.string.raw"])
  101181. },
  101182. Symbol: {
  101183. asyncIterator: globalOnly(["es6.symbol", "es7.symbol.async-iterator"]),
  101184. "for": pureOnly("symbol/for", "es6.symbol"),
  101185. hasInstance: pureOnly("symbol/has-instance", "es6.symbol"),
  101186. isConcatSpreadable: pureOnly("symbol/is-concat-spreadable", "es6.symbol"),
  101187. iterator: define$1("es6.symbol", "symbol/iterator", CommonIterators$1),
  101188. keyFor: pureOnly("symbol/key-for", "es6.symbol"),
  101189. match: pureAndGlobal("symbol/match", ["es6.regexp.match"]),
  101190. replace: pureOnly("symbol/replace", "es6.symbol"),
  101191. search: pureOnly("symbol/search", "es6.symbol"),
  101192. species: pureOnly("symbol/species", "es6.symbol"),
  101193. split: pureOnly("symbol/split", "es6.symbol"),
  101194. toPrimitive: pureOnly("symbol/to-primitive", "es6.symbol"),
  101195. toStringTag: pureOnly("symbol/to-string-tag", "es6.symbol"),
  101196. unscopables: pureOnly("symbol/unscopables", "es6.symbol")
  101197. }
  101198. };
  101199. var webPolyfills = {
  101200. "web.timers": {},
  101201. "web.immediate": {},
  101202. "web.dom.iterable": {}
  101203. };
  101204. var purePolyfills = {
  101205. "es6.parse-float": {},
  101206. "es6.parse-int": {},
  101207. "es7.string.at": {}
  101208. };
  101209. function addPlatformSpecificPolyfills(targets, method, polyfills) {
  101210. var targetNames = Object.keys(targets);
  101211. var isAnyTarget = !targetNames.length;
  101212. var isWebTarget = targetNames.some(function (name) {
  101213. return name !== "node";
  101214. });
  101215. return Object.assign(Object.assign(Object.assign({}, polyfills), method === "usage-pure" ? purePolyfills : null), isAnyTarget || isWebTarget ? webPolyfills : null);
  101216. }
  101217. function hasMinVersion(minVersion, runtimeVersion) {
  101218. if (!runtimeVersion || !minVersion) return true;
  101219. if (semver.valid(runtimeVersion)) runtimeVersion = "^" + runtimeVersion;
  101220. return !semver.intersects("<" + minVersion, runtimeVersion) && !semver.intersects(">=8.0.0", runtimeVersion);
  101221. }
  101222. var _ref$1 = undefined || babel,
  101223. t$2 = _ref$1.types;
  101224. var presetEnvCompat = "#__secret_key__@babel/preset-env__compatibility";
  101225. var runtimeCompat$2 = "#__secret_key__@babel/runtime__compatibility";
  101226. var has = Function.call.bind(Object.hasOwnProperty);
  101227. var index$2 = definePolyfillProvider(function (api, _ref2) {
  101228. var _ref2$presetEnvCompat = _ref2[presetEnvCompat];
  101229. _ref2$presetEnvCompat = _ref2$presetEnvCompat === void 0 ? {} : _ref2$presetEnvCompat;
  101230. var entryInjectRegenerator = _ref2$presetEnvCompat.entryInjectRegenerator,
  101231. _ref2$runtimeCompat = _ref2[runtimeCompat$2];
  101232. _ref2$runtimeCompat = _ref2$runtimeCompat === void 0 ? {} : _ref2$runtimeCompat;
  101233. var useBabelRuntime = _ref2$runtimeCompat.useBabelRuntime,
  101234. runtimeVersion = _ref2$runtimeCompat.runtimeVersion,
  101235. _ref2$runtimeCompat$e = _ref2$runtimeCompat.ext,
  101236. ext = _ref2$runtimeCompat$e === void 0 ? ".js" : _ref2$runtimeCompat$e;
  101237. var resolve = api.createMetaResolver({
  101238. global: BuiltIns$1,
  101239. "static": StaticProperties$1,
  101240. instance: InstanceProperties$1
  101241. });
  101242. var debug = api.debug,
  101243. shouldInjectPolyfill = api.shouldInjectPolyfill,
  101244. method = api.method;
  101245. var polyfills = addPlatformSpecificPolyfills(api.targets, method, corejs2BuiltIns);
  101246. var coreJSBase = useBabelRuntime ? useBabelRuntime + "/core-js" : method === "usage-pure" ? "core-js/library/fn" : "core-js/modules";
  101247. function inject(name, utils) {
  101248. if (typeof name === "string") {
  101249. if (has(polyfills, name) && shouldInjectPolyfill(name)) {
  101250. debug(name);
  101251. utils.injectGlobalImport(coreJSBase + "/" + name + ".js");
  101252. }
  101253. return;
  101254. }
  101255. name.forEach(function (name) {
  101256. return inject(name, utils);
  101257. });
  101258. }
  101259. function maybeInjectPure(desc, hint, utils) {
  101260. var pure = desc.pure,
  101261. meta = desc.meta,
  101262. name = desc.name;
  101263. if (!pure || !shouldInjectPolyfill(name)) return;
  101264. if (runtimeVersion && meta && meta.minRuntimeVersion && !hasMinVersion(meta && meta.minRuntimeVersion, runtimeVersion)) {
  101265. return;
  101266. }
  101267. return utils.injectDefaultImport(coreJSBase + "/" + pure + ext, hint);
  101268. }
  101269. return {
  101270. name: "corejs2",
  101271. polyfills: polyfills,
  101272. entryGlobal: function entryGlobal(meta, utils, path) {
  101273. if (meta.kind === "import" && meta.source === "core-js") {
  101274. debug(null);
  101275. inject(Object.keys(polyfills), utils);
  101276. if (entryInjectRegenerator) {
  101277. utils.injectGlobalImport("regenerator-runtime/runtime.js");
  101278. }
  101279. path.remove();
  101280. }
  101281. },
  101282. usageGlobal: function usageGlobal(meta, utils) {
  101283. var resolved = resolve(meta);
  101284. if (!resolved) return;
  101285. var deps = resolved.desc.global;
  101286. if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
  101287. var low = meta.object.toLowerCase();
  101288. deps = deps.filter(function (m) {
  101289. return m.includes(low);
  101290. });
  101291. }
  101292. inject(deps, utils);
  101293. },
  101294. usagePure: function usagePure(meta, utils, path) {
  101295. if (meta.kind === "in") {
  101296. if (meta.key === "Symbol.iterator") {
  101297. path.replaceWith(t$2.callExpression(utils.injectDefaultImport(coreJSBase + "/is-iterable" + ext, "isIterable"), [path.node.right]));
  101298. }
  101299. return;
  101300. }
  101301. if (path.parentPath.isUnaryExpression({
  101302. operator: "delete"
  101303. })) return;
  101304. if (meta.kind === "property") {
  101305. if (!path.isMemberExpression()) return;
  101306. if (!path.isReferenced()) return;
  101307. if (meta.key === "Symbol.iterator" && shouldInjectPolyfill("es6.symbol") && path.parentPath.isCallExpression({
  101308. callee: path.node
  101309. }) && path.parent.arguments.length === 0) {
  101310. path.parentPath.replaceWith(t$2.callExpression(utils.injectDefaultImport(coreJSBase + "/get-iterator" + ext, "getIterator"), [path.node.object]));
  101311. path.skip();
  101312. return;
  101313. }
  101314. }
  101315. var resolved = resolve(meta);
  101316. if (!resolved) return;
  101317. var id = maybeInjectPure(resolved.desc, resolved.name, utils);
  101318. if (id) path.replaceWith(id);
  101319. },
  101320. visitor: method === "usage-global" && {
  101321. YieldExpression: function YieldExpression(path) {
  101322. if (path.node.delegate) {
  101323. inject("web.dom.iterable", api.getUtils(path));
  101324. }
  101325. },
  101326. "ForOfStatement|ArrayPattern": function ForOfStatementArrayPattern(path) {
  101327. CommonIterators$1.forEach(function (name) {
  101328. return inject(name, api.getUtils(path));
  101329. });
  101330. }
  101331. }
  101332. };
  101333. });
  101334. var data = require$$0$3;
  101335. var getModulesListForTargetVersion = getModulesListForTargetVersion$2;
  101336. var entries = require$$0$2;
  101337. var corejs3ShippedProposalsList = new Set(["esnext.global-this", "esnext.string.match-all"]);
  101338. var polyfillsOrder = {};
  101339. Object.keys(data).forEach(function (name, index) {
  101340. polyfillsOrder[name] = index;
  101341. });
  101342. var define = function define(pure, global, name, exclude) {
  101343. if (name === void 0) {
  101344. name = global[0];
  101345. }
  101346. return {
  101347. name: name,
  101348. pure: pure,
  101349. global: global.sort(function (a, b) {
  101350. return polyfillsOrder[a] - polyfillsOrder[b];
  101351. }),
  101352. exclude: exclude
  101353. };
  101354. };
  101355. var typed = function typed(name) {
  101356. return define(null, [name].concat(TypedArrayDependencies));
  101357. };
  101358. var ArrayNatureIterators = ["es.array.iterator", "web.dom-collections.iterator"];
  101359. var CommonIterators = ["es.string.iterator"].concat(ArrayNatureIterators);
  101360. var ArrayNatureIteratorsWithTag = ["es.object.to-string"].concat(ArrayNatureIterators);
  101361. var CommonIteratorsWithTag = ["es.object.to-string"].concat(_toConsumableArray(CommonIterators));
  101362. var TypedArrayDependencies = ["es.typed-array.copy-within", "es.typed-array.every", "es.typed-array.fill", "es.typed-array.filter", "es.typed-array.find", "es.typed-array.find-index", "es.typed-array.for-each", "es.typed-array.includes", "es.typed-array.index-of", "es.typed-array.iterator", "es.typed-array.join", "es.typed-array.last-index-of", "es.typed-array.map", "es.typed-array.reduce", "es.typed-array.reduce-right", "es.typed-array.reverse", "es.typed-array.set", "es.typed-array.slice", "es.typed-array.some", "es.typed-array.sort", "es.typed-array.subarray", "es.typed-array.to-locale-string", "es.typed-array.to-string", "es.object.to-string", "es.array.iterator", "es.array-buffer.slice"];
  101363. var TypedArrayStaticMethods = {
  101364. from: define(null, ["es.typed-array.from"]),
  101365. of: define(null, ["es.typed-array.of"])
  101366. };
  101367. var PromiseDependencies = ["es.promise", "es.object.to-string"];
  101368. var PromiseDependenciesWithIterators = [].concat(PromiseDependencies, _toConsumableArray(CommonIterators));
  101369. var SymbolDependencies = ["es.symbol", "es.symbol.description", "es.object.to-string"];
  101370. var MapDependencies = ["es.map", "esnext.map.delete-all", "esnext.map.every", "esnext.map.filter", "esnext.map.find", "esnext.map.find-key", "esnext.map.includes", "esnext.map.key-of", "esnext.map.map-keys", "esnext.map.map-values", "esnext.map.merge", "esnext.map.reduce", "esnext.map.some", "esnext.map.update"].concat(_toConsumableArray(CommonIteratorsWithTag));
  101371. var SetDependencies = ["es.set", "esnext.set.add-all", "esnext.set.delete-all", "esnext.set.difference", "esnext.set.every", "esnext.set.filter", "esnext.set.find", "esnext.set.intersection", "esnext.set.is-disjoint-from", "esnext.set.is-subset-of", "esnext.set.is-superset-of", "esnext.set.join", "esnext.set.map", "esnext.set.reduce", "esnext.set.some", "esnext.set.symmetric-difference", "esnext.set.union"].concat(_toConsumableArray(CommonIteratorsWithTag));
  101372. var WeakMapDependencies = ["es.weak-map", "esnext.weak-map.delete-all"].concat(_toConsumableArray(CommonIteratorsWithTag));
  101373. var WeakSetDependencies = ["es.weak-set", "esnext.weak-set.add-all", "esnext.weak-set.delete-all"].concat(_toConsumableArray(CommonIteratorsWithTag));
  101374. var URLSearchParamsDependencies = ["web.url"].concat(_toConsumableArray(CommonIteratorsWithTag));
  101375. var BuiltIns = {
  101376. AggregateError: define("aggregate-error", ["esnext.aggregate-error"].concat(_toConsumableArray(CommonIterators))),
  101377. ArrayBuffer: define(null, ["es.array-buffer.constructor", "es.array-buffer.slice", "es.object.to-string"]),
  101378. DataView: define(null, ["es.data-view", "es.array-buffer.slice", "es.object.to-string"]),
  101379. Date: define(null, ["es.date.to-string"]),
  101380. Float32Array: typed("es.typed-array.float32-array"),
  101381. Float64Array: typed("es.typed-array.float64-array"),
  101382. Int8Array: typed("es.typed-array.int8-array"),
  101383. Int16Array: typed("es.typed-array.int16-array"),
  101384. Int32Array: typed("es.typed-array.int32-array"),
  101385. Uint8Array: typed("es.typed-array.uint8-array"),
  101386. Uint8ClampedArray: typed("es.typed-array.uint8-clamped-array"),
  101387. Uint16Array: typed("es.typed-array.uint16-array"),
  101388. Uint32Array: typed("es.typed-array.uint32-array"),
  101389. Map: define("map/index", MapDependencies),
  101390. Number: define(null, ["es.number.constructor"]),
  101391. Observable: define("observable/index", ["esnext.observable", "esnext.symbol.observable", "es.object.to-string"].concat(_toConsumableArray(CommonIteratorsWithTag))),
  101392. Promise: define("promise/index", PromiseDependencies),
  101393. RegExp: define(null, ["es.regexp.constructor", "es.regexp.exec", "es.regexp.to-string"]),
  101394. Set: define("set/index", SetDependencies),
  101395. Symbol: define("symbol/index", SymbolDependencies),
  101396. URL: define("url/index", ["web.url"].concat(_toConsumableArray(URLSearchParamsDependencies))),
  101397. URLSearchParams: define("url-search-params/index", URLSearchParamsDependencies),
  101398. WeakMap: define("weak-map/index", WeakMapDependencies),
  101399. WeakSet: define("weak-set/index", WeakSetDependencies),
  101400. clearImmediate: define("clear-immediate", ["web.immediate"]),
  101401. compositeKey: define("composite-key", ["esnext.composite-key"]),
  101402. compositeSymbol: define("composite-symbol", ["esnext.composite-symbol"]),
  101403. fetch: define(null, PromiseDependencies),
  101404. globalThis: define("global-this", ["es.global-this"]),
  101405. parseFloat: define("parse-float", ["es.parse-float"]),
  101406. parseInt: define("parse-int", ["es.parse-int"]),
  101407. queueMicrotask: define("queue-microtask", ["web.queue-microtask"]),
  101408. setImmediate: define("set-immediate", ["web.immediate"]),
  101409. setInterval: define("set-interval", ["web.timers"]),
  101410. setTimeout: define("set-timeout", ["web.timers"])
  101411. };
  101412. var StaticProperties = {
  101413. Array: {
  101414. from: define("array/from", ["es.array.from", "es.string.iterator"]),
  101415. isArray: define("array/is-array", ["es.array.is-array"]),
  101416. of: define("array/of", ["es.array.of"])
  101417. },
  101418. ArrayBuffer: {
  101419. isView: define(null, ["es.array-buffer.is-view"])
  101420. },
  101421. Date: {
  101422. now: define("date/now", ["es.date.now"])
  101423. },
  101424. JSON: {
  101425. stringify: define("json/stringify", [], "es.symbol")
  101426. },
  101427. Math: {
  101428. DEG_PER_RAD: define("math/deg-per-rad", ["esnext.math.deg-per-rad"]),
  101429. RAD_PER_DEG: define("math/rad-per-deg", ["esnext.math.rad-per-deg"]),
  101430. acosh: define("math/acosh", ["es.math.acosh"]),
  101431. asinh: define("math/asinh", ["es.math.asinh"]),
  101432. atanh: define("math/atanh", ["es.math.atanh"]),
  101433. cbrt: define("math/cbrt", ["es.math.cbrt"]),
  101434. clamp: define("math/clamp", ["esnext.math.clamp"]),
  101435. clz32: define("math/clz32", ["es.math.clz32"]),
  101436. cosh: define("math/cosh", ["es.math.cosh"]),
  101437. degrees: define("math/degrees", ["esnext.math.degrees"]),
  101438. expm1: define("math/expm1", ["es.math.expm1"]),
  101439. fround: define("math/fround", ["es.math.fround"]),
  101440. fscale: define("math/fscale", ["esnext.math.fscale"]),
  101441. hypot: define("math/hypot", ["es.math.hypot"]),
  101442. iaddh: define("math/iaddh", ["esnext.math.iaddh"]),
  101443. imul: define("math/imul", ["es.math.imul"]),
  101444. imulh: define("math/imulh", ["esnext.math.imulh"]),
  101445. isubh: define("math/isubh", ["esnext.math.isubh"]),
  101446. log10: define("math/log10", ["es.math.log10"]),
  101447. log1p: define("math/log1p", ["es.math.log1p"]),
  101448. log2: define("math/log2", ["es.math.log2"]),
  101449. radians: define("math/radians", ["esnext.math.radians"]),
  101450. scale: define("math/scale", ["esnext.math.scale"]),
  101451. seededPRNG: define("math/seeded-prng", ["esnext.math.seeded-prng"]),
  101452. sign: define("math/sign", ["es.math.sign"]),
  101453. signbit: define("math/signbit", ["esnext.math.signbit"]),
  101454. sinh: define("math/sinh", ["es.math.sinh"]),
  101455. tanh: define("math/tanh", ["es.math.tanh"]),
  101456. trunc: define("math/trunc", ["es.math.trunc"]),
  101457. umulh: define("math/umulh", ["esnext.math.umulh"])
  101458. },
  101459. Map: {
  101460. from: define(null, ["esnext.map.from"].concat(_toConsumableArray(MapDependencies))),
  101461. groupBy: define(null, ["esnext.map.group-by"].concat(_toConsumableArray(MapDependencies))),
  101462. keyBy: define(null, ["esnext.map.key-by"].concat(_toConsumableArray(MapDependencies))),
  101463. of: define(null, ["esnext.map.of"].concat(_toConsumableArray(MapDependencies)))
  101464. },
  101465. Number: {
  101466. EPSILON: define("number/epsilon", ["es.number.epsilon"]),
  101467. MAX_SAFE_INTEGER: define("number/max-safe-integer", ["es.number.max-safe-integer"]),
  101468. MIN_SAFE_INTEGER: define("number/min-safe-integer", ["es.number.min-safe-integer"]),
  101469. fromString: define("number/from-string", ["esnext.number.from-string"]),
  101470. isFinite: define("number/is-finite", ["es.number.is-finite"]),
  101471. isInteger: define("number/is-integer", ["es.number.is-integer"]),
  101472. isNaN: define("number/is-nan", ["es.number.is-nan"]),
  101473. isSafeInteger: define("number/is-safe-integer", ["es.number.is-safe-integer"]),
  101474. parseFloat: define("number/parse-float", ["es.number.parse-float"]),
  101475. parseInt: define("number/parse-int", ["es.number.parse-int"])
  101476. },
  101477. Object: {
  101478. assign: define("object/assign", ["es.object.assign"]),
  101479. create: define("object/create", ["es.object.create"]),
  101480. defineProperties: define("object/define-properties", ["es.object.define-properties"]),
  101481. defineProperty: define("object/define-property", ["es.object.define-property"]),
  101482. entries: define("object/entries", ["es.object.entries"]),
  101483. freeze: define("object/freeze", ["es.object.freeze"]),
  101484. fromEntries: define("object/from-entries", ["es.object.from-entries", "es.array.iterator"]),
  101485. getOwnPropertyDescriptor: define("object/get-own-property-descriptor", ["es.object.get-own-property-descriptor"]),
  101486. getOwnPropertyDescriptors: define("object/get-own-property-descriptors", ["es.object.get-own-property-descriptors"]),
  101487. getOwnPropertyNames: define("object/get-own-property-names", ["es.object.get-own-property-names"]),
  101488. getOwnPropertySymbols: define("object/get-own-property-symbols", ["es.symbol"]),
  101489. getPrototypeOf: define("object/get-prototype-of", ["es.object.get-prototype-of"]),
  101490. is: define("object/is", ["es.object.is"]),
  101491. isExtensible: define("object/is-extensible", ["es.object.is-extensible"]),
  101492. isFrozen: define("object/is-frozen", ["es.object.is-frozen"]),
  101493. isSealed: define("object/is-sealed", ["es.object.is-sealed"]),
  101494. keys: define("object/keys", ["es.object.keys"]),
  101495. preventExtensions: define("object/prevent-extensions", ["es.object.prevent-extensions"]),
  101496. seal: define("object/seal", ["es.object.seal"]),
  101497. setPrototypeOf: define("object/set-prototype-of", ["es.object.set-prototype-of"]),
  101498. values: define("object/values", ["es.object.values"])
  101499. },
  101500. Promise: {
  101501. all: define(null, PromiseDependenciesWithIterators),
  101502. allSettled: define(null, ["es.promise.all-settled"].concat(_toConsumableArray(PromiseDependenciesWithIterators))),
  101503. any: define(null, ["esnext.promise.any"].concat(_toConsumableArray(PromiseDependenciesWithIterators))),
  101504. race: define(null, PromiseDependenciesWithIterators),
  101505. "try": define(null, ["esnext.promise.try"].concat(_toConsumableArray(PromiseDependenciesWithIterators)))
  101506. },
  101507. Reflect: {
  101508. apply: define("reflect/apply", ["es.reflect.apply"]),
  101509. construct: define("reflect/construct", ["es.reflect.construct"]),
  101510. defineMetadata: define("reflect/define-metadata", ["esnext.reflect.define-metadata"]),
  101511. defineProperty: define("reflect/define-property", ["es.reflect.define-property"]),
  101512. deleteMetadata: define("reflect/delete-metadata", ["esnext.reflect.delete-metadata"]),
  101513. deleteProperty: define("reflect/delete-property", ["es.reflect.delete-property"]),
  101514. get: define("reflect/get", ["es.reflect.get"]),
  101515. getMetadata: define("reflect/get-metadata", ["esnext.reflect.get-metadata"]),
  101516. getMetadataKeys: define("reflect/get-metadata-keys", ["esnext.reflect.get-metadata-keys"]),
  101517. getOwnMetadata: define("reflect/get-own-metadata", ["esnext.reflect.get-own-metadata"]),
  101518. getOwnMetadataKeys: define("reflect/get-own-metadata-keys", ["esnext.reflect.get-own-metadata-keys"]),
  101519. getOwnPropertyDescriptor: define("reflect/get-own-property-descriptor", ["es.reflect.get-own-property-descriptor"]),
  101520. getPrototypeOf: define("reflect/get-prototype-of", ["es.reflect.get-prototype-of"]),
  101521. has: define("reflect/has", ["es.reflect.has"]),
  101522. hasMetadata: define("reflect/has-metadata", ["esnext.reflect.has-metadata"]),
  101523. hasOwnMetadata: define("reflect/has-own-metadata", ["esnext.reflect.has-own-metadata"]),
  101524. isExtensible: define("reflect/is-extensible", ["es.reflect.is-extensible"]),
  101525. metadata: define("reflect/metadata", ["esnext.reflect.metadata"]),
  101526. ownKeys: define("reflect/own-keys", ["es.reflect.own-keys"]),
  101527. preventExtensions: define("reflect/prevent-extensions", ["es.reflect.prevent-extensions"]),
  101528. set: define("reflect/set", ["es.reflect.set"]),
  101529. setPrototypeOf: define("reflect/set-prototype-of", ["es.reflect.set-prototype-of"])
  101530. },
  101531. Set: {
  101532. from: define(null, ["esnext.set.from"].concat(_toConsumableArray(SetDependencies))),
  101533. of: define(null, ["esnext.set.of"].concat(_toConsumableArray(SetDependencies)))
  101534. },
  101535. String: {
  101536. fromCodePoint: define("string/from-code-point", ["es.string.from-code-point"]),
  101537. raw: define("string/raw", ["es.string.raw"])
  101538. },
  101539. Symbol: {
  101540. asyncIterator: define("symbol/async-iterator", ["es.symbol.async-iterator"]),
  101541. dispose: define("symbol/dispose", ["esnext.symbol.dispose"]),
  101542. "for": define("symbol/for", [], "es.symbol"),
  101543. hasInstance: define("symbol/has-instance", ["es.symbol.has-instance", "es.function.has-instance"]),
  101544. isConcatSpreadable: define("symbol/is-concat-spreadable", ["es.symbol.is-concat-spreadable", "es.array.concat"]),
  101545. iterator: define("symbol/iterator", ["es.symbol.iterator"].concat(_toConsumableArray(CommonIteratorsWithTag))),
  101546. keyFor: define("symbol/key-for", [], "es.symbol"),
  101547. match: define("symbol/match", ["es.symbol.match", "es.string.match"]),
  101548. observable: define("symbol/observable", ["esnext.symbol.observable"]),
  101549. patternMatch: define("symbol/pattern-match", ["esnext.symbol.pattern-match"]),
  101550. replace: define("symbol/replace", ["es.symbol.replace", "es.string.replace"]),
  101551. search: define("symbol/search", ["es.symbol.search", "es.string.search"]),
  101552. species: define("symbol/species", ["es.symbol.species", "es.array.species"]),
  101553. split: define("symbol/split", ["es.symbol.split", "es.string.split"]),
  101554. toPrimitive: define("symbol/to-primitive", ["es.symbol.to-primitive", "es.date.to-primitive"]),
  101555. toStringTag: define("symbol/to-string-tag", ["es.symbol.to-string-tag", "es.object.to-string", "es.math.to-string-tag", "es.json.to-string-tag"]),
  101556. unscopables: define("symbol/unscopables", ["es.symbol.unscopables"])
  101557. },
  101558. WeakMap: {
  101559. from: define(null, ["esnext.weak-map.from"].concat(_toConsumableArray(WeakMapDependencies))),
  101560. of: define(null, ["esnext.weak-map.of"].concat(_toConsumableArray(WeakMapDependencies)))
  101561. },
  101562. WeakSet: {
  101563. from: define(null, ["esnext.weak-set.from"].concat(_toConsumableArray(WeakSetDependencies))),
  101564. of: define(null, ["esnext.weak-set.of"].concat(_toConsumableArray(WeakSetDependencies)))
  101565. },
  101566. Int8Array: TypedArrayStaticMethods,
  101567. Uint8Array: TypedArrayStaticMethods,
  101568. Uint8ClampedArray: TypedArrayStaticMethods,
  101569. Int16Array: TypedArrayStaticMethods,
  101570. Uint16Array: TypedArrayStaticMethods,
  101571. Int32Array: TypedArrayStaticMethods,
  101572. Uint32Array: TypedArrayStaticMethods,
  101573. Float32Array: TypedArrayStaticMethods,
  101574. Float64Array: TypedArrayStaticMethods
  101575. };
  101576. var InstanceProperties = {
  101577. at: define("instance/at", ["esnext.string.at"]),
  101578. anchor: define(null, ["es.string.anchor"]),
  101579. big: define(null, ["es.string.big"]),
  101580. bind: define("instance/bind", ["es.function.bind"]),
  101581. blink: define(null, ["es.string.blink"]),
  101582. bold: define(null, ["es.string.bold"]),
  101583. codePointAt: define("instance/code-point-at", ["es.string.code-point-at"]),
  101584. codePoints: define("instance/code-points", ["esnext.string.code-points"]),
  101585. concat: define("instance/concat", ["es.array.concat"], undefined, ["String"]),
  101586. copyWithin: define("instance/copy-within", ["es.array.copy-within"]),
  101587. description: define(null, ["es.symbol", "es.symbol.description"]),
  101588. endsWith: define("instance/ends-with", ["es.string.ends-with"]),
  101589. entries: define("instance/entries", ArrayNatureIteratorsWithTag),
  101590. every: define("instance/every", ["es.array.every"]),
  101591. exec: define(null, ["es.regexp.exec"]),
  101592. fill: define("instance/fill", ["es.array.fill"]),
  101593. filter: define("instance/filter", ["es.array.filter"]),
  101594. "finally": define(null, ["es.promise.finally"].concat(PromiseDependencies)),
  101595. find: define("instance/find", ["es.array.find"]),
  101596. findIndex: define("instance/find-index", ["es.array.find-index"]),
  101597. fixed: define(null, ["es.string.fixed"]),
  101598. flags: define("instance/flags", ["es.regexp.flags"]),
  101599. flatMap: define("instance/flat-map", ["es.array.flat-map", "es.array.unscopables.flat-map"]),
  101600. flat: define("instance/flat", ["es.array.flat"]),
  101601. fontcolor: define(null, ["es.string.fontcolor"]),
  101602. fontsize: define(null, ["es.string.fontsize"]),
  101603. forEach: define("instance/for-each", ["es.array.for-each", "web.dom-collections.for-each"]),
  101604. includes: define("instance/includes", ["es.array.includes", "es.string.includes"]),
  101605. indexOf: define("instance/index-of", ["es.array.index-of"]),
  101606. italic: define(null, ["es.string.italics"]),
  101607. join: define(null, ["es.array.join"]),
  101608. keys: define("instance/keys", ArrayNatureIteratorsWithTag),
  101609. lastIndex: define(null, ["esnext.array.last-index"]),
  101610. lastIndexOf: define("instance/last-index-of", ["es.array.last-index-of"]),
  101611. lastItem: define(null, ["esnext.array.last-item"]),
  101612. link: define(null, ["es.string.link"]),
  101613. map: define("instance/map", ["es.array.map"]),
  101614. match: define(null, ["es.string.match", "es.regexp.exec"]),
  101615. matchAll: define("instance/match-all", ["es.string.match-all"]),
  101616. name: define(null, ["es.function.name"]),
  101617. padEnd: define("instance/pad-end", ["es.string.pad-end"]),
  101618. padStart: define("instance/pad-start", ["es.string.pad-start"]),
  101619. reduce: define("instance/reduce", ["es.array.reduce"]),
  101620. reduceRight: define("instance/reduce-right", ["es.array.reduce-right"]),
  101621. repeat: define("instance/repeat", ["es.string.repeat"]),
  101622. replace: define(null, ["es.string.replace", "es.regexp.exec"]),
  101623. replaceAll: define("instance/replace-all", ["esnext.string.replace-all"]),
  101624. reverse: define("instance/reverse", ["es.array.reverse"]),
  101625. search: define(null, ["es.string.search", "es.regexp.exec"]),
  101626. slice: define("instance/slice", ["es.array.slice"]),
  101627. small: define(null, ["es.string.small"]),
  101628. some: define("instance/some", ["es.array.some"]),
  101629. sort: define("instance/sort", ["es.array.sort"]),
  101630. splice: define("instance/splice", ["es.array.splice"]),
  101631. split: define(null, ["es.string.split", "es.regexp.exec"]),
  101632. startsWith: define("instance/starts-with", ["es.string.starts-with"]),
  101633. strike: define(null, ["es.string.strike"]),
  101634. sub: define(null, ["es.string.sub"]),
  101635. sup: define(null, ["es.string.sup"]),
  101636. toFixed: define(null, ["es.number.to-fixed"]),
  101637. toISOString: define(null, ["es.date.to-iso-string"]),
  101638. toJSON: define(null, ["es.date.to-json", "web.url.to-json"]),
  101639. toPrecision: define(null, ["es.number.to-precision"]),
  101640. toString: define(null, ["es.object.to-string", "es.regexp.to-string", "es.date.to-string"]),
  101641. trim: define("instance/trim", ["es.string.trim"]),
  101642. trimEnd: define("instance/trim-end", ["es.string.trim-end"]),
  101643. trimLeft: define("instance/trim-left", ["es.string.trim-start"]),
  101644. trimRight: define("instance/trim-right", ["es.string.trim-end"]),
  101645. trimStart: define("instance/trim-start", ["es.string.trim-start"]),
  101646. values: define("instance/values", ArrayNatureIteratorsWithTag),
  101647. __defineGetter__: define(null, ["es.object.define-getter"]),
  101648. __defineSetter__: define(null, ["es.object.define-setter"]),
  101649. __lookupGetter__: define(null, ["es.object.lookup-getter"]),
  101650. __lookupSetter__: define(null, ["es.object.lookup-setter"])
  101651. };
  101652. var CommonInstanceDependencies = new Set(["es.object.to-string", "es.object.define-getter", "es.object.define-setter", "es.object.lookup-getter", "es.object.lookup-setter", "es.regexp.exec"]);
  101653. var _ref = undefined || babel,
  101654. t$1 = _ref.types;
  101655. function callMethod(path, id) {
  101656. var object = path.node.object;
  101657. var context1, context2;
  101658. if (t$1.isIdentifier(object)) {
  101659. context1 = object;
  101660. context2 = t$1.cloneNode(object);
  101661. } else {
  101662. context1 = path.scope.generateDeclaredUidIdentifier("context");
  101663. context2 = t$1.assignmentExpression("=", t$1.cloneNode(context1), object);
  101664. }
  101665. path.replaceWith(t$1.memberExpression(t$1.callExpression(id, [context2]), t$1.identifier("call")));
  101666. path.parentPath.unshiftContainer("arguments", context1);
  101667. }
  101668. function isCoreJSSource(source) {
  101669. if (typeof source === "string") {
  101670. source = source.replace(/\\/g, "/").replace(/(\/(index)?)?(\.js)?$/i, "").toLowerCase();
  101671. }
  101672. return hasOwnProperty.call(entries, source) && entries[source];
  101673. }
  101674. function coreJSModule(name) {
  101675. return "core-js/modules/" + name + ".js";
  101676. }
  101677. function coreJSPureHelper(name, useBabelRuntime, ext) {
  101678. return useBabelRuntime ? useBabelRuntime + "/core-js/" + name + ext : "core-js-pure/features/" + name + ".js";
  101679. }
  101680. var _ref2 = undefined || babel,
  101681. t = _ref2.types;
  101682. var runtimeCompat$1 = "#__secret_key__@babel/runtime__compatibility";
  101683. var esnextFallback = function esnextFallback(name, cb) {
  101684. if (cb(name)) return true;
  101685. if (!name.startsWith("es.")) return false;
  101686. var fallback = "esnext." + name.slice(3);
  101687. if (!data[fallback]) return false;
  101688. return cb(fallback);
  101689. };
  101690. var index$1 = definePolyfillProvider(function (_ref3, _ref4) {
  101691. var getUtils = _ref3.getUtils,
  101692. method = _ref3.method,
  101693. shouldInjectPolyfill = _ref3.shouldInjectPolyfill,
  101694. createMetaResolver = _ref3.createMetaResolver,
  101695. debug = _ref3.debug,
  101696. babel = _ref3.babel;
  101697. var _ref4$version = _ref4.version,
  101698. version = _ref4$version === void 0 ? 3 : _ref4$version,
  101699. proposals = _ref4.proposals,
  101700. shippedProposals = _ref4.shippedProposals,
  101701. _ref4$runtimeCompat = _ref4[runtimeCompat$1];
  101702. _ref4$runtimeCompat = _ref4$runtimeCompat === void 0 ? {} : _ref4$runtimeCompat;
  101703. var useBabelRuntime = _ref4$runtimeCompat.useBabelRuntime,
  101704. _ref4$runtimeCompat$e = _ref4$runtimeCompat.ext,
  101705. ext = _ref4$runtimeCompat$e === void 0 ? ".js" : _ref4$runtimeCompat$e;
  101706. var isWebpack = babel.caller(function (caller) {
  101707. return (caller == null ? void 0 : caller.name) === "babel-loader";
  101708. });
  101709. var resolve = createMetaResolver({
  101710. global: BuiltIns,
  101711. "static": StaticProperties,
  101712. instance: InstanceProperties
  101713. });
  101714. var available = new Set(getModulesListForTargetVersion(version));
  101715. var coreJSPureBase = useBabelRuntime ? proposals ? useBabelRuntime + "/core-js" : useBabelRuntime + "/core-js-stable" : proposals ? "core-js-pure/features" : "core-js-pure/stable";
  101716. function maybeInjectGlobalImpl(name, utils) {
  101717. if (shouldInjectPolyfill(name)) {
  101718. debug(name);
  101719. utils.injectGlobalImport(coreJSModule(name));
  101720. return true;
  101721. }
  101722. return false;
  101723. }
  101724. function maybeInjectGlobal(names, utils, fallback) {
  101725. if (fallback === void 0) {
  101726. fallback = true;
  101727. }
  101728. for (var _iterator = _createForOfIteratorHelperLoose(names), _step; !(_step = _iterator()).done;) {
  101729. var name = _step.value;
  101730. if (fallback) {
  101731. esnextFallback(name, function (name) {
  101732. return maybeInjectGlobalImpl(name, utils);
  101733. });
  101734. } else {
  101735. maybeInjectGlobalImpl(name, utils);
  101736. }
  101737. }
  101738. }
  101739. function maybeInjectPure(desc, hint, utils, object) {
  101740. if (desc.pure && !(object && desc.exclude && desc.exclude.includes(object)) && esnextFallback(desc.name, shouldInjectPolyfill)) {
  101741. return utils.injectDefaultImport(coreJSPureBase + "/" + desc.pure + ext, hint);
  101742. }
  101743. }
  101744. return {
  101745. name: "corejs3",
  101746. polyfills: data,
  101747. filterPolyfills: function filterPolyfills(name) {
  101748. if (!available.has(name)) return false;
  101749. if (proposals || method === "entry-global") return true;
  101750. if (shippedProposals && corejs3ShippedProposalsList.has(name)) {
  101751. return true;
  101752. }
  101753. return !name.startsWith("esnext.");
  101754. },
  101755. entryGlobal: function entryGlobal(meta, utils, path) {
  101756. if (meta.kind !== "import") return;
  101757. var modules = isCoreJSSource(meta.source);
  101758. if (!modules) return;
  101759. if (modules.length === 1 && meta.source === coreJSModule(modules[0]) && shouldInjectPolyfill(modules[0])) {
  101760. debug(null);
  101761. return;
  101762. }
  101763. maybeInjectGlobal(modules, utils, false);
  101764. path.remove();
  101765. },
  101766. usageGlobal: function usageGlobal(meta, utils) {
  101767. var resolved = resolve(meta);
  101768. if (!resolved) return;
  101769. var deps = resolved.desc.global;
  101770. if (resolved.kind !== "global" && meta.object && meta.placement === "prototype") {
  101771. var low = meta.object.toLowerCase();
  101772. deps = deps.filter(function (m) {
  101773. return m.includes(low) || CommonInstanceDependencies.has(m);
  101774. });
  101775. }
  101776. maybeInjectGlobal(deps, utils);
  101777. },
  101778. usagePure: function usagePure(meta, utils, path) {
  101779. if (meta.kind === "in") {
  101780. if (meta.key === "Symbol.iterator") {
  101781. path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper("is-iterable", useBabelRuntime, ext), "isIterable"), [path.node.right]));
  101782. }
  101783. return;
  101784. }
  101785. if (path.parentPath.isUnaryExpression({
  101786. operator: "delete"
  101787. })) return;
  101788. var isCall;
  101789. if (meta.kind === "property") {
  101790. if (!path.isMemberExpression()) return;
  101791. if (!path.isReferenced()) return;
  101792. isCall = path.parentPath.isCallExpression({
  101793. callee: path.node
  101794. });
  101795. if (meta.key === "Symbol.iterator") {
  101796. if (!shouldInjectPolyfill("es.symbol.iterator")) return;
  101797. if (isCall) {
  101798. if (path.parent.arguments.length === 0) {
  101799. path.parentPath.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper("get-iterator", useBabelRuntime, ext), "getIterator"), [path.node.object]));
  101800. path.skip();
  101801. } else {
  101802. callMethod(path, utils.injectDefaultImport(coreJSPureHelper("get-iterator-method", useBabelRuntime, ext), "getIteratorMethod"));
  101803. }
  101804. } else {
  101805. path.replaceWith(t.callExpression(utils.injectDefaultImport(coreJSPureHelper("get-iterator-method", useBabelRuntime, ext), "getIteratorMethod"), [path.node.object]));
  101806. }
  101807. return;
  101808. }
  101809. }
  101810. var resolved = resolve(meta);
  101811. if (!resolved) return;
  101812. if (useBabelRuntime && resolved.desc.pure && resolved.desc.pure.slice(-6) === "/index") {
  101813. resolved = Object.assign(Object.assign({}, resolved), {}, {
  101814. desc: Object.assign(Object.assign({}, resolved.desc), {}, {
  101815. pure: resolved.desc.pure.slice(0, -6)
  101816. })
  101817. });
  101818. }
  101819. if (resolved.kind === "global") {
  101820. var id = maybeInjectPure(resolved.desc, resolved.name, utils);
  101821. if (id) path.replaceWith(id);
  101822. } else if (resolved.kind === "static") {
  101823. var _id = maybeInjectPure(resolved.desc, resolved.name, utils, meta.object);
  101824. if (_id) path.replaceWith(_id);
  101825. } else if (resolved.kind === "instance") {
  101826. var _id2 = maybeInjectPure(resolved.desc, resolved.name + "InstanceProperty", utils, meta.object);
  101827. if (!_id2) return;
  101828. if (isCall) {
  101829. callMethod(path, _id2);
  101830. } else {
  101831. path.replaceWith(t.callExpression(_id2, [path.node.object]));
  101832. }
  101833. }
  101834. },
  101835. visitor: method === "usage-global" && {
  101836. CallExpression: function CallExpression(path) {
  101837. if (path.get("callee").isImport()) {
  101838. var utils = getUtils(path);
  101839. if (isWebpack) {
  101840. maybeInjectGlobal(PromiseDependenciesWithIterators, utils);
  101841. } else {
  101842. maybeInjectGlobal(PromiseDependencies, utils);
  101843. }
  101844. }
  101845. },
  101846. Function: function Function(path) {
  101847. if (path.node.async) {
  101848. maybeInjectGlobal(PromiseDependencies, getUtils(path));
  101849. }
  101850. },
  101851. "ForOfStatement|ArrayPattern": function ForOfStatementArrayPattern(path) {
  101852. maybeInjectGlobal(CommonIterators, getUtils(path));
  101853. },
  101854. SpreadElement: function SpreadElement(path) {
  101855. if (!path.parentPath.isObjectExpression()) {
  101856. maybeInjectGlobal(CommonIterators, getUtils(path));
  101857. }
  101858. },
  101859. YieldExpression: function YieldExpression(path) {
  101860. if (path.node.delegate) {
  101861. maybeInjectGlobal(CommonIterators, getUtils(path));
  101862. }
  101863. }
  101864. }
  101865. };
  101866. });
  101867. var runtimeCompat = "#__secret_key__@babel/runtime__compatibility";
  101868. var index = definePolyfillProvider(function (_ref, options) {
  101869. var debug = _ref.debug;
  101870. var _options$runtimeCompa = options[runtimeCompat];
  101871. _options$runtimeCompa = _options$runtimeCompa === void 0 ? {} : _options$runtimeCompa;
  101872. var useBabelRuntime = _options$runtimeCompa.useBabelRuntime;
  101873. var pureName = useBabelRuntime ? useBabelRuntime + "/regenerator" : "regenerator-runtime";
  101874. return {
  101875. name: "regenerator",
  101876. polyfills: ["regenerator-runtime"],
  101877. usageGlobal: function usageGlobal(meta, utils) {
  101878. if (isRegenerator(meta)) {
  101879. debug("regenerator-runtime");
  101880. utils.injectGlobalImport("regenerator-runtime/runtime.js");
  101881. }
  101882. },
  101883. usagePure: function usagePure(meta, utils, path) {
  101884. if (isRegenerator(meta)) {
  101885. path.replaceWith(utils.injectDefaultImport(pureName, "regenerator-runtime"));
  101886. }
  101887. }
  101888. };
  101889. });
  101890. var isRegenerator = function isRegenerator(meta) {
  101891. return meta.kind === "global" && meta.name === "regeneratorRuntime";
  101892. };
  101893. var pluginCoreJS2 = index$2["default"] || index$2;
  101894. var pluginCoreJS3 = index$1["default"] || index$1;
  101895. var pluginRegenerator = index["default"] || index;
  101896. function filterStageFromList(list, stageList) {
  101897. return Object.keys(list).reduce(function (result, item) {
  101898. if (!stageList.has(item)) {
  101899. result[item] = list[item];
  101900. }
  101901. return result;
  101902. }, {});
  101903. }
  101904. var pluginLists = {
  101905. withProposals: {
  101906. withoutBugfixes: pluginsFiltered,
  101907. withBugfixes: Object.assign({}, pluginsFiltered, bugfixPluginsFiltered)
  101908. },
  101909. withoutProposals: {
  101910. withoutBugfixes: filterStageFromList(pluginsFiltered, shippedProposals.proposalPlugins),
  101911. withBugfixes: filterStageFromList(Object.assign({}, pluginsFiltered, bugfixPluginsFiltered), shippedProposals.proposalPlugins)
  101912. }
  101913. };
  101914. function getPluginList(proposals, bugfixes) {
  101915. if (proposals) {
  101916. if (bugfixes) return pluginLists.withProposals.withBugfixes;else return pluginLists.withProposals.withoutBugfixes;
  101917. } else {
  101918. if (bugfixes) return pluginLists.withoutProposals.withBugfixes;else return pluginLists.withoutProposals.withoutBugfixes;
  101919. }
  101920. }
  101921. var getPlugin = function getPlugin(pluginName) {
  101922. var plugin = availablePlugins$1[pluginName]();
  101923. if (!plugin) {
  101924. throw new Error("Could not find plugin \"" + pluginName + "\". Ensure there is an entry in ./available-plugins.js for it.");
  101925. }
  101926. return plugin;
  101927. };
  101928. var transformIncludesAndExcludes = function transformIncludesAndExcludes(opts) {
  101929. return opts.reduce(function (result, opt) {
  101930. var target = opt.match(/^(es|es6|es7|esnext|web)\./) ? "builtIns" : "plugins";
  101931. result[target].add(opt);
  101932. return result;
  101933. }, {
  101934. all: opts,
  101935. plugins: new Set(),
  101936. builtIns: new Set()
  101937. });
  101938. };
  101939. var getModulesPluginNames = function getModulesPluginNames(_ref) {
  101940. var modules = _ref.modules,
  101941. transformations = _ref.transformations,
  101942. shouldTransformESM = _ref.shouldTransformESM,
  101943. shouldTransformDynamicImport = _ref.shouldTransformDynamicImport,
  101944. shouldTransformExportNamespaceFrom = _ref.shouldTransformExportNamespaceFrom,
  101945. shouldParseTopLevelAwait = _ref.shouldParseTopLevelAwait;
  101946. var modulesPluginNames = [];
  101947. if (modules !== false && transformations[modules]) {
  101948. if (shouldTransformESM) {
  101949. modulesPluginNames.push(transformations[modules]);
  101950. }
  101951. if (shouldTransformDynamicImport && shouldTransformESM && modules !== "umd") {
  101952. modulesPluginNames.push("proposal-dynamic-import");
  101953. } else {
  101954. if (shouldTransformDynamicImport) {
  101955. console.warn("Dynamic import can only be supported when transforming ES modules" + " to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.");
  101956. }
  101957. modulesPluginNames.push("syntax-dynamic-import");
  101958. }
  101959. } else {
  101960. modulesPluginNames.push("syntax-dynamic-import");
  101961. }
  101962. if (shouldTransformExportNamespaceFrom) {
  101963. modulesPluginNames.push("proposal-export-namespace-from");
  101964. } else {
  101965. modulesPluginNames.push("syntax-export-namespace-from");
  101966. }
  101967. if (shouldParseTopLevelAwait) {
  101968. modulesPluginNames.push("syntax-top-level-await");
  101969. }
  101970. return modulesPluginNames;
  101971. };
  101972. var getPolyfillPlugins = function getPolyfillPlugins(_ref2) {
  101973. var useBuiltIns = _ref2.useBuiltIns,
  101974. corejs = _ref2.corejs,
  101975. polyfillTargets = _ref2.polyfillTargets,
  101976. include = _ref2.include,
  101977. exclude = _ref2.exclude,
  101978. proposals = _ref2.proposals,
  101979. shippedProposals = _ref2.shippedProposals,
  101980. regenerator = _ref2.regenerator,
  101981. debug = _ref2.debug;
  101982. var polyfillPlugins = [];
  101983. if (useBuiltIns === "usage" || useBuiltIns === "entry") {
  101984. var pluginOptions = {
  101985. method: useBuiltIns + "-global",
  101986. version: corejs ? corejs.toString() : undefined,
  101987. targets: polyfillTargets,
  101988. include: include,
  101989. exclude: exclude,
  101990. proposals: proposals,
  101991. shippedProposals: shippedProposals,
  101992. debug: debug
  101993. };
  101994. if (corejs) {
  101995. if (useBuiltIns === "usage") {
  101996. if (corejs.major === 2) {
  101997. polyfillPlugins.push([pluginCoreJS2, pluginOptions], [legacyBabelPolyfillPlugin, {
  101998. usage: true
  101999. }]);
  102000. } else {
  102001. polyfillPlugins.push([pluginCoreJS3, pluginOptions], [legacyBabelPolyfillPlugin, {
  102002. usage: true,
  102003. deprecated: true
  102004. }]);
  102005. }
  102006. if (regenerator) {
  102007. polyfillPlugins.push([pluginRegenerator, {
  102008. method: "usage-global",
  102009. debug: debug
  102010. }]);
  102011. }
  102012. } else {
  102013. if (corejs.major === 2) {
  102014. polyfillPlugins.push([legacyBabelPolyfillPlugin, {
  102015. regenerator: regenerator
  102016. }], [pluginCoreJS2, pluginOptions]);
  102017. } else {
  102018. polyfillPlugins.push([pluginCoreJS3, pluginOptions], [legacyBabelPolyfillPlugin, {
  102019. deprecated: true
  102020. }]);
  102021. if (!regenerator) {
  102022. polyfillPlugins.push([removeRegeneratorEntryPlugin, pluginOptions]);
  102023. }
  102024. }
  102025. }
  102026. }
  102027. }
  102028. return polyfillPlugins;
  102029. };
  102030. function getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv) {
  102031. if (optionsTargets != null && optionsTargets.esmodules && optionsTargets.browsers) {
  102032. console.warn("\n@babel/preset-env: esmodules and browsers targets have been specified together.\n`browsers` target, `" + optionsTargets.browsers.toString() + "` will be ignored.\n");
  102033. }
  102034. return getTargets$2(optionsTargets, {
  102035. ignoreBrowserslistConfig: ignoreBrowserslistConfig,
  102036. configPath: configPath,
  102037. browserslistEnv: browserslistEnv
  102038. });
  102039. }
  102040. function supportsStaticESM(caller) {
  102041. return !!(caller != null && caller.supportsStaticESM);
  102042. }
  102043. function supportsDynamicImport(caller) {
  102044. return !!(caller != null && caller.supportsDynamicImport);
  102045. }
  102046. function supportsExportNamespaceFrom(caller) {
  102047. return !!(caller != null && caller.supportsExportNamespaceFrom);
  102048. }
  102049. function supportsTopLevelAwait(caller) {
  102050. return !!(caller != null && caller.supportsTopLevelAwait);
  102051. }
  102052. var presetEnv = declare(function (api, opts) {
  102053. api.assertVersion(7);
  102054. var babelTargets = api.targets();
  102055. var _normalizeOptions = normalizeOptions$3(opts),
  102056. bugfixes = _normalizeOptions.bugfixes,
  102057. configPath = _normalizeOptions.configPath,
  102058. debug = _normalizeOptions.debug,
  102059. optionsExclude = _normalizeOptions.exclude,
  102060. forceAllTransforms = _normalizeOptions.forceAllTransforms,
  102061. ignoreBrowserslistConfig = _normalizeOptions.ignoreBrowserslistConfig,
  102062. optionsInclude = _normalizeOptions.include,
  102063. loose = _normalizeOptions.loose,
  102064. modules = _normalizeOptions.modules,
  102065. shippedProposals$1 = _normalizeOptions.shippedProposals,
  102066. spec = _normalizeOptions.spec,
  102067. optionsTargets = _normalizeOptions.targets,
  102068. useBuiltIns = _normalizeOptions.useBuiltIns,
  102069. _normalizeOptions$cor = _normalizeOptions.corejs,
  102070. corejs = _normalizeOptions$cor.version,
  102071. proposals = _normalizeOptions$cor.proposals,
  102072. browserslistEnv = _normalizeOptions.browserslistEnv;
  102073. var targets = babelTargets;
  102074. if (semver$4.lt(api.version, "7.13.0") || opts.targets || opts.configPath || opts.browserslistEnv || opts.ignoreBrowserslistConfig) {
  102075. {
  102076. var hasUglifyTarget = false;
  102077. if (optionsTargets != null && optionsTargets.uglify) {
  102078. hasUglifyTarget = true;
  102079. delete optionsTargets.uglify;
  102080. console.warn("\nThe uglify target has been deprecated. Set the top level\noption `forceAllTransforms: true` instead.\n");
  102081. }
  102082. }
  102083. targets = getLocalTargets(optionsTargets, ignoreBrowserslistConfig, configPath, browserslistEnv);
  102084. }
  102085. var transformTargets = forceAllTransforms || hasUglifyTarget ? {} : targets;
  102086. var include = transformIncludesAndExcludes(optionsInclude);
  102087. var exclude = transformIncludesAndExcludes(optionsExclude);
  102088. var compatData = getPluginList(shippedProposals$1, bugfixes);
  102089. var shouldSkipExportNamespaceFrom = modules === "auto" && (api.caller == null ? void 0 : api.caller(supportsExportNamespaceFrom)) || modules === false && !isRequired("proposal-export-namespace-from", transformTargets, {
  102090. compatData: compatData,
  102091. includes: include.plugins,
  102092. excludes: exclude.plugins
  102093. });
  102094. var modulesPluginNames = getModulesPluginNames({
  102095. modules: modules,
  102096. transformations: moduleTransformations,
  102097. shouldTransformESM: modules !== "auto" || !(api.caller != null && api.caller(supportsStaticESM)),
  102098. shouldTransformDynamicImport: modules !== "auto" || !(api.caller != null && api.caller(supportsDynamicImport)),
  102099. shouldTransformExportNamespaceFrom: !shouldSkipExportNamespaceFrom,
  102100. shouldParseTopLevelAwait: !api.caller || api.caller(supportsTopLevelAwait)
  102101. });
  102102. var pluginNames = filterItems(compatData, include.plugins, exclude.plugins, transformTargets, modulesPluginNames, getOptionSpecificExcludesFor({
  102103. loose: loose
  102104. }), shippedProposals.pluginSyntaxMap);
  102105. removeUnnecessaryItems(pluginNames, overlappingPlugins);
  102106. removeUnsupportedItems(pluginNames, api.version);
  102107. var polyfillPlugins = getPolyfillPlugins({
  102108. useBuiltIns: useBuiltIns,
  102109. corejs: corejs,
  102110. polyfillTargets: targets,
  102111. include: include.builtIns,
  102112. exclude: exclude.builtIns,
  102113. proposals: proposals,
  102114. shippedProposals: shippedProposals$1,
  102115. regenerator: pluginNames.has("transform-regenerator"),
  102116. debug: debug
  102117. });
  102118. var pluginUseBuiltIns = useBuiltIns !== false;
  102119. var plugins = Array.from(pluginNames).map(function (pluginName) {
  102120. if (pluginName === "proposal-class-properties" || pluginName === "proposal-private-methods" || pluginName === "proposal-private-property-in-object") {
  102121. return [getPlugin(pluginName), {
  102122. loose: loose ? "#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error" : "#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"
  102123. }];
  102124. }
  102125. return [getPlugin(pluginName), {
  102126. spec: spec,
  102127. loose: loose,
  102128. useBuiltIns: pluginUseBuiltIns
  102129. }];
  102130. }).concat(polyfillPlugins);
  102131. if (debug) {
  102132. console.log("@babel/preset-env: `DEBUG` option");
  102133. console.log("\nUsing targets:");
  102134. console.log(JSON.stringify(prettifyTargets(targets), null, 2));
  102135. console.log("\nUsing modules transform: " + modules.toString());
  102136. console.log("\nUsing plugins:");
  102137. pluginNames.forEach(function (pluginName) {
  102138. logPlugin(pluginName, targets, compatData);
  102139. });
  102140. if (!useBuiltIns) {
  102141. console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.");
  102142. }
  102143. }
  102144. return {
  102145. plugins: plugins
  102146. };
  102147. });
  102148. function normalizeOptions$2(options) {
  102149. if (options === void 0) {
  102150. options = {};
  102151. }
  102152. var _options = options,
  102153. all = _options.all;
  102154. var _options2 = options,
  102155. allowDeclareFields = _options2.allowDeclareFields;
  102156. {
  102157. return {
  102158. all: all,
  102159. allowDeclareFields: allowDeclareFields
  102160. };
  102161. }
  102162. }
  102163. var presetFlow = declare(function (api, opts) {
  102164. api.assertVersion(7);
  102165. var _normalizeOptions = normalizeOptions$2(opts),
  102166. all = _normalizeOptions.all,
  102167. allowDeclareFields = _normalizeOptions.allowDeclareFields;
  102168. return {
  102169. plugins: [[transformFlowStripTypes, {
  102170. all: all,
  102171. allowDeclareFields: allowDeclareFields
  102172. }]]
  102173. };
  102174. });
  102175. var PURE_CALLS = new Map([["react", ["cloneElement", "createContext", "createElement", "createFactory", "createRef", "forwardRef", "isValidElement", "memo", "lazy"]], ["react-dom", ["createPortal"]]]);
  102176. var transformReactPure = declare(function (api) {
  102177. api.assertVersion(7);
  102178. return {
  102179. name: "transform-react-pure-annotations",
  102180. visitor: {
  102181. CallExpression: function CallExpression(path) {
  102182. if (isReactCall(path)) {
  102183. annotateAsPure(path);
  102184. }
  102185. }
  102186. }
  102187. };
  102188. });
  102189. function isReactCall(path) {
  102190. if (!isMemberExpression(path.node.callee)) {
  102191. var callee = path.get("callee");
  102192. for (var _iterator = _createForOfIteratorHelperLoose(PURE_CALLS), _step; !(_step = _iterator()).done;) {
  102193. var _step$value = _slicedToArray$2(_step.value, 2),
  102194. module = _step$value[0],
  102195. methods = _step$value[1];
  102196. for (var _iterator2 = _createForOfIteratorHelperLoose(methods), _step2; !(_step2 = _iterator2()).done;) {
  102197. var method = _step2.value;
  102198. if (callee.referencesImport(module, method)) {
  102199. return true;
  102200. }
  102201. }
  102202. }
  102203. return false;
  102204. }
  102205. for (var _iterator3 = _createForOfIteratorHelperLoose(PURE_CALLS), _step3; !(_step3 = _iterator3()).done;) {
  102206. var _step3$value = _slicedToArray$2(_step3.value, 2),
  102207. _module = _step3$value[0],
  102208. _methods = _step3$value[1];
  102209. var object = path.get("callee.object");
  102210. if (object.referencesImport(_module, "default") || object.referencesImport(_module, "*")) {
  102211. for (var _iterator4 = _createForOfIteratorHelperLoose(_methods), _step4; !(_step4 = _iterator4()).done;) {
  102212. var _method = _step4.value;
  102213. if (isIdentifier(path.node.callee.property, {
  102214. name: _method
  102215. })) {
  102216. return true;
  102217. }
  102218. }
  102219. return false;
  102220. }
  102221. }
  102222. return false;
  102223. }
  102224. function normalizeOptions$1(options) {
  102225. if (options === void 0) {
  102226. options = {};
  102227. }
  102228. {
  102229. var _options = options,
  102230. pragma = _options.pragma,
  102231. pragmaFrag = _options.pragmaFrag;
  102232. var _options2 = options,
  102233. pure = _options2.pure,
  102234. _options2$throwIfName = _options2.throwIfNamespace,
  102235. throwIfNamespace = _options2$throwIfName === void 0 ? true : _options2$throwIfName,
  102236. _options2$runtime = _options2.runtime,
  102237. runtime = _options2$runtime === void 0 ? "classic" : _options2$runtime,
  102238. importSource = _options2.importSource,
  102239. useBuiltIns = _options2.useBuiltIns,
  102240. useSpread = _options2.useSpread;
  102241. if (runtime === "classic") {
  102242. pragma = pragma || "React.createElement";
  102243. pragmaFrag = pragmaFrag || "React.Fragment";
  102244. }
  102245. var development = !!options.development;
  102246. return {
  102247. development: development,
  102248. importSource: importSource,
  102249. pragma: pragma,
  102250. pragmaFrag: pragmaFrag,
  102251. pure: pure,
  102252. runtime: runtime,
  102253. throwIfNamespace: throwIfNamespace,
  102254. useBuiltIns: useBuiltIns,
  102255. useSpread: useSpread
  102256. };
  102257. }
  102258. }
  102259. var presetReact = declare(function (api, opts) {
  102260. api.assertVersion(7);
  102261. var _normalizeOptions = normalizeOptions$1(opts),
  102262. development = _normalizeOptions.development,
  102263. importSource = _normalizeOptions.importSource,
  102264. pragma = _normalizeOptions.pragma,
  102265. pragmaFrag = _normalizeOptions.pragmaFrag,
  102266. pure = _normalizeOptions.pure,
  102267. runtime = _normalizeOptions.runtime,
  102268. throwIfNamespace = _normalizeOptions.throwIfNamespace;
  102269. return {
  102270. plugins: [[development ? transformReactJSXDevelopment : transformReactJSX, {
  102271. importSource: importSource,
  102272. pragma: pragma,
  102273. pragmaFrag: pragmaFrag,
  102274. runtime: runtime,
  102275. throwIfNamespace: throwIfNamespace,
  102276. pure: pure,
  102277. useBuiltIns: !!opts.useBuiltIns,
  102278. useSpread: opts.useSpread
  102279. }], transformReactDisplayName, pure !== false && transformReactPure].filter(Boolean)
  102280. };
  102281. });
  102282. var v = new OptionValidator("@babel/preset-typescript");
  102283. function normalizeOptions(options) {
  102284. if (options === void 0) {
  102285. options = {};
  102286. }
  102287. var _options = options,
  102288. _options$allowNamespa = _options.allowNamespaces,
  102289. allowNamespaces = _options$allowNamespa === void 0 ? true : _options$allowNamespa,
  102290. jsxPragma = _options.jsxPragma,
  102291. onlyRemoveTypeImports = _options.onlyRemoveTypeImports;
  102292. var jsxPragmaFrag = v.validateStringOption("jsxPragmaFrag", options.jsxPragmaFrag, "React.Fragment");
  102293. var allExtensions = v.validateBooleanOption("allExtensions", options.allExtensions, false);
  102294. var isTSX = v.validateBooleanOption("isTSX", options.isTSX, false);
  102295. if (isTSX) {
  102296. v.invariant(allExtensions, "isTSX:true requires allExtensions:true");
  102297. }
  102298. return {
  102299. allExtensions: allExtensions,
  102300. allowNamespaces: allowNamespaces,
  102301. isTSX: isTSX,
  102302. jsxPragma: jsxPragma,
  102303. jsxPragmaFrag: jsxPragmaFrag,
  102304. onlyRemoveTypeImports: onlyRemoveTypeImports
  102305. };
  102306. }
  102307. var presetTypescript = declare(function (api, opts) {
  102308. api.assertVersion(7);
  102309. var _normalizeOptions = normalizeOptions(opts),
  102310. allExtensions = _normalizeOptions.allExtensions,
  102311. allowNamespaces = _normalizeOptions.allowNamespaces,
  102312. isTSX = _normalizeOptions.isTSX,
  102313. jsxPragma = _normalizeOptions.jsxPragma,
  102314. jsxPragmaFrag = _normalizeOptions.jsxPragmaFrag,
  102315. onlyRemoveTypeImports = _normalizeOptions.onlyRemoveTypeImports;
  102316. var pluginOptions = function pluginOptions(isTSX) {
  102317. return {
  102318. allowDeclareFields: opts.allowDeclareFields,
  102319. allowNamespaces: allowNamespaces,
  102320. isTSX: isTSX,
  102321. jsxPragma: jsxPragma,
  102322. jsxPragmaFrag: jsxPragmaFrag,
  102323. onlyRemoveTypeImports: onlyRemoveTypeImports
  102324. };
  102325. };
  102326. return {
  102327. overrides: allExtensions ? [{
  102328. plugins: [[transformTypeScript, pluginOptions(isTSX)]]
  102329. }] : [{
  102330. test: /\.ts$/,
  102331. plugins: [[transformTypeScript, pluginOptions(false)]]
  102332. }, {
  102333. test: /\.tsx$/,
  102334. plugins: [[transformTypeScript, pluginOptions(true)]]
  102335. }]
  102336. };
  102337. });
  102338. var scriptTypes = ["text/jsx", "text/babel"];
  102339. var headEl;
  102340. var inlineScriptCount = 0;
  102341. function transformCode(transformFn, script) {
  102342. var source;
  102343. if (script.url != null) {
  102344. source = script.url;
  102345. } else {
  102346. source = "Inline Babel script";
  102347. inlineScriptCount++;
  102348. if (inlineScriptCount > 1) {
  102349. source += " (" + inlineScriptCount + ")";
  102350. }
  102351. }
  102352. return transformFn(script.content, buildBabelOptions(script, source)).code;
  102353. }
  102354. function buildBabelOptions(script, filename) {
  102355. var presets = script.presets;
  102356. if (!presets) {
  102357. if (script.type === "module") {
  102358. presets = ["react", ["env", {
  102359. targets: {
  102360. esmodules: true
  102361. },
  102362. modules: false
  102363. }]];
  102364. } else {
  102365. presets = ["react", "env"];
  102366. }
  102367. }
  102368. return {
  102369. filename: filename,
  102370. presets: presets,
  102371. plugins: script.plugins || ["proposal-class-properties", "proposal-object-rest-spread", "transform-flow-strip-types"],
  102372. sourceMaps: "inline",
  102373. sourceFileName: filename
  102374. };
  102375. }
  102376. function run(transformFn, script) {
  102377. var scriptEl = document.createElement("script");
  102378. if (script.type) {
  102379. scriptEl.setAttribute("type", script.type);
  102380. }
  102381. scriptEl.text = transformCode(transformFn, script);
  102382. headEl.appendChild(scriptEl);
  102383. }
  102384. function load(url, successCallback, errorCallback) {
  102385. var xhr = new XMLHttpRequest();
  102386. xhr.open("GET", url, true);
  102387. if ("overrideMimeType" in xhr) {
  102388. xhr.overrideMimeType("text/plain");
  102389. }
  102390. xhr.onreadystatechange = function () {
  102391. if (xhr.readyState === 4) {
  102392. if (xhr.status === 0 || xhr.status === 200) {
  102393. successCallback(xhr.responseText);
  102394. } else {
  102395. errorCallback();
  102396. throw new Error("Could not load " + url);
  102397. }
  102398. }
  102399. };
  102400. return xhr.send(null);
  102401. }
  102402. function getPluginsOrPresetsFromScript(script, attributeName) {
  102403. var rawValue = script.getAttribute(attributeName);
  102404. if (rawValue === "") {
  102405. return [];
  102406. }
  102407. if (!rawValue) {
  102408. return null;
  102409. }
  102410. return rawValue.split(",").map(function (item) {
  102411. return item.trim();
  102412. });
  102413. }
  102414. function loadScripts(transformFn, scripts) {
  102415. var result = [];
  102416. var count = scripts.length;
  102417. function check() {
  102418. var script, i;
  102419. for (i = 0; i < count; i++) {
  102420. script = result[i];
  102421. if (script.loaded && !script.executed) {
  102422. script.executed = true;
  102423. run(transformFn, script);
  102424. } else if (!script.loaded && !script.error && !script.async) {
  102425. break;
  102426. }
  102427. }
  102428. }
  102429. scripts.forEach(function (script, i) {
  102430. var scriptData = {
  102431. async: script.hasAttribute("async"),
  102432. type: script.getAttribute("data-type"),
  102433. error: false,
  102434. executed: false,
  102435. plugins: getPluginsOrPresetsFromScript(script, "data-plugins"),
  102436. presets: getPluginsOrPresetsFromScript(script, "data-presets")
  102437. };
  102438. if (script.src) {
  102439. result[i] = Object.assign({}, scriptData, {
  102440. content: null,
  102441. loaded: false,
  102442. url: script.src
  102443. });
  102444. load(script.src, function (content) {
  102445. result[i].loaded = true;
  102446. result[i].content = content;
  102447. check();
  102448. }, function () {
  102449. result[i].error = true;
  102450. check();
  102451. });
  102452. } else {
  102453. result[i] = Object.assign({}, scriptData, {
  102454. content: script.innerHTML,
  102455. loaded: true,
  102456. url: script.getAttribute("data-module") || null
  102457. });
  102458. }
  102459. });
  102460. check();
  102461. }
  102462. function runScripts(transformFn, scripts) {
  102463. headEl = document.getElementsByTagName("head")[0];
  102464. if (!scripts) {
  102465. scripts = document.getElementsByTagName("script");
  102466. }
  102467. var jsxScripts = [];
  102468. for (var i = 0; i < scripts.length; i++) {
  102469. var script = scripts.item(i);
  102470. var type = script.type.split(";")[0];
  102471. if (scriptTypes.indexOf(type) !== -1) {
  102472. jsxScripts.push(script);
  102473. }
  102474. }
  102475. if (jsxScripts.length === 0) {
  102476. return;
  102477. }
  102478. console.warn("You are using the in-browser Babel transformer. Be sure to precompile " + "your scripts for production - https://babeljs.io/docs/setup/");
  102479. loadScripts(transformFn, jsxScripts);
  102480. }
  102481. var _window;
  102482. var isArray = Array.isArray || function (arg) {
  102483. return Object.prototype.toString.call(arg) === "[object Array]";
  102484. };
  102485. function loadBuiltin(builtinTable, name) {
  102486. if (isArray(name) && typeof name[0] === "string") {
  102487. if (Object.prototype.hasOwnProperty.call(builtinTable, name[0])) {
  102488. return [builtinTable[name[0]]].concat(name.slice(1));
  102489. }
  102490. return;
  102491. } else if (typeof name === "string") {
  102492. return builtinTable[name];
  102493. }
  102494. return name;
  102495. }
  102496. function processOptions(options) {
  102497. var presets = (options.presets || []).map(function (presetName) {
  102498. var preset = loadBuiltin(availablePresets, presetName);
  102499. if (preset) {
  102500. if (isArray(preset) && typeof preset[0] === "object" && Object.prototype.hasOwnProperty.call(preset[0], "buildPreset")) {
  102501. preset[0] = Object.assign({}, preset[0], {
  102502. buildPreset: preset[0].buildPreset
  102503. });
  102504. }
  102505. } else {
  102506. throw new Error("Invalid preset specified in Babel options: \"" + presetName + "\"");
  102507. }
  102508. return preset;
  102509. });
  102510. var plugins = (options.plugins || []).map(function (pluginName) {
  102511. var plugin = loadBuiltin(availablePlugins, pluginName);
  102512. if (!plugin) {
  102513. throw new Error("Invalid plugin specified in Babel options: \"" + pluginName + "\"");
  102514. }
  102515. return plugin;
  102516. });
  102517. return Object.assign({
  102518. babelrc: false
  102519. }, options, {
  102520. presets: presets,
  102521. plugins: plugins
  102522. });
  102523. }
  102524. function transform(code, options) {
  102525. return transform$2(code, processOptions(options));
  102526. }
  102527. function transformFromAst(ast, code, options) {
  102528. return transformFromAst$1(ast, code, processOptions(options));
  102529. }
  102530. var availablePlugins = {};
  102531. var availablePresets = {};
  102532. var buildExternalHelpers = babelBuildExternalHelpers;
  102533. function registerPlugin(name, plugin) {
  102534. if (Object.prototype.hasOwnProperty.call(availablePlugins, name)) {
  102535. console.warn("A plugin named \"" + name + "\" is already registered, it will be overridden");
  102536. }
  102537. availablePlugins[name] = plugin;
  102538. }
  102539. function registerPlugins(newPlugins) {
  102540. Object.keys(newPlugins).forEach(function (name) {
  102541. return registerPlugin(name, newPlugins[name]);
  102542. });
  102543. }
  102544. function registerPreset(name, preset) {
  102545. if (Object.prototype.hasOwnProperty.call(availablePresets, name)) {
  102546. if (name === "env") {
  102547. console.warn("@babel/preset-env is now included in @babel/standalone, please remove @babel/preset-env-standalone");
  102548. } else {
  102549. console.warn("A preset named \"" + name + "\" is already registered, it will be overridden");
  102550. }
  102551. }
  102552. availablePresets[name] = preset;
  102553. }
  102554. function registerPresets(newPresets) {
  102555. Object.keys(newPresets).forEach(function (name) {
  102556. return registerPreset(name, newPresets[name]);
  102557. });
  102558. }
  102559. registerPlugins(all);
  102560. registerPresets({
  102561. env: presetEnv,
  102562. es2015: preset2015,
  102563. es2016: function es2016() {
  102564. return {
  102565. plugins: [availablePlugins["transform-exponentiation-operator"]]
  102566. };
  102567. },
  102568. es2017: function es2017() {
  102569. return {
  102570. plugins: [availablePlugins["transform-async-to-generator"]]
  102571. };
  102572. },
  102573. react: presetReact,
  102574. "stage-0": presetStage0,
  102575. "stage-1": presetStage1,
  102576. "stage-2": presetStage2,
  102577. "stage-3": presetStage3,
  102578. "es2015-loose": {
  102579. presets: [[preset2015, {
  102580. loose: true
  102581. }]]
  102582. },
  102583. "es2015-no-commonjs": {
  102584. presets: [[preset2015, {
  102585. modules: false
  102586. }]]
  102587. },
  102588. typescript: presetTypescript,
  102589. flow: presetFlow
  102590. });
  102591. var version = "7.14.7";
  102592. function onDOMContentLoaded() {
  102593. transformScriptTags();
  102594. }
  102595. if (typeof window !== "undefined" && (_window = window) != null && _window.addEventListener) {
  102596. window.addEventListener("DOMContentLoaded", onDOMContentLoaded, false);
  102597. }
  102598. function transformScriptTags(scriptTags) {
  102599. runScripts(transform, scriptTags);
  102600. }
  102601. function disableScriptTags() {
  102602. window.removeEventListener("DOMContentLoaded", onDOMContentLoaded);
  102603. }
  102604. exports.availablePlugins = availablePlugins;
  102605. exports.availablePresets = availablePresets;
  102606. exports.buildExternalHelpers = buildExternalHelpers;
  102607. exports.disableScriptTags = disableScriptTags;
  102608. exports.registerPlugin = registerPlugin;
  102609. exports.registerPlugins = registerPlugins;
  102610. exports.registerPreset = registerPreset;
  102611. exports.registerPresets = registerPresets;
  102612. exports.transform = transform;
  102613. exports.transformFromAst = transformFromAst;
  102614. exports.transformScriptTags = transformScriptTags;
  102615. exports.version = version;
  102616. Object.defineProperty(exports, '__esModule', { value: true });
  102617. })));
  102618. /*** TESTS ***/
  102619. describe(
  102620. "@babel/standalone",
  102621. () => {
  102622. let Babel = global.Babel;
  102623. it("handles the es2015-no-commonjs preset", () => {
  102624. const output = Babel.transform('const getMessage = () => "Hello World"', {
  102625. presets: ["es2015-no-commonjs"],
  102626. }).code;
  102627. expect(output).toBe(
  102628. "var getMessage = function getMessage() {\n" +
  102629. ' return "Hello World";\n' +
  102630. "};",
  102631. );
  102632. });
  102633. it("handles the es2015-loose preset", () => {
  102634. const output = Babel.transform("class A {}", {
  102635. sourceType: "script",
  102636. presets: ["es2015-loose"],
  102637. }).code;
  102638. expect(output).toBe('var A = function A() {\n "use strict";\n};');
  102639. });
  102640. it("handles the typescript preset", () => {
  102641. const output = Babel.transform("var a: string;", {
  102642. presets: [["typescript", { allExtensions: true }]],
  102643. }).code;
  102644. expect(output).toBe("var a;");
  102645. });
  102646. it("handles the flow preset", () => {
  102647. const output = Babel.transform("var a: string;", {
  102648. presets: ["flow"],
  102649. }).code;
  102650. expect(output).toBe("var a;");
  102651. });
  102652. it("can translate simple ast", () => {
  102653. const ast = {
  102654. type: "Program",
  102655. start: 0,
  102656. end: 2,
  102657. directives: [],
  102658. body: [
  102659. {
  102660. type: "ExpressionStatement",
  102661. start: 0,
  102662. end: 1,
  102663. expression: {
  102664. type: "NumericLiteral",
  102665. start: 0,
  102666. end: 2,
  102667. value: 42,
  102668. raw: "42",
  102669. },
  102670. },
  102671. ],
  102672. sourceType: "script",
  102673. };
  102674. const output = Babel.transformFromAst(ast, "42", {
  102675. presets: ["es2015"],
  102676. }).code;
  102677. expect(output).toBe("42;");
  102678. });
  102679. it("handles the react preset", () => {
  102680. const output = Babel.transform(
  102681. "const someDiv = <div>{getMessage()}</div>",
  102682. {
  102683. presets: [["react", { runtime: "classic" }]],
  102684. },
  102685. ).code;
  102686. expect(output).toBe(
  102687. 'const someDiv = /*#__PURE__*/React.createElement("div", null, getMessage());',
  102688. );
  102689. });
  102690. it("handles presets with options", () => {
  102691. const output = Babel.transform("export let x", {
  102692. presets: [["es2015", { modules: false }]],
  102693. }).code;
  102694. expect(output).toBe("export var x;");
  102695. });
  102696. it("handles specifying a plugin by name", () => {
  102697. const output = Babel.transform('const getMessage = () => "Hello World"', {
  102698. plugins: ["transform-arrow-functions"],
  102699. }).code;
  102700. // Transforms arrow syntax but NOT "const".
  102701. expect(output).toBe(
  102702. "const getMessage = function () {\n" +
  102703. ' return "Hello World";\n' +
  102704. "};",
  102705. );
  102706. });
  102707. it("handles plugins with options", () => {
  102708. const output = Babel.transform("`${x}`", {
  102709. plugins: [["transform-template-literals", { loose: true }]],
  102710. }).code;
  102711. expect(output).toBe('"" + x;');
  102712. });
  102713. it("throws on invalid preset name", () => {
  102714. expect(() =>
  102715. Babel.transform("var foo", { presets: ["lolfail"] }),
  102716. ).toThrow(/Invalid preset specified in Babel options: "lolfail"/);
  102717. });
  102718. it("throws on invalid plugin name", () => {
  102719. expect(() =>
  102720. Babel.transform("var foo", { plugins: ["lolfail"] }),
  102721. ).toThrow(/Invalid plugin specified in Babel options: "lolfail"/);
  102722. });
  102723. describe("env preset", () => {
  102724. it("works w/o targets", () => {
  102725. const output = Babel.transform("const a = 1;", {
  102726. sourceType: "script",
  102727. presets: [["env", { targets: { browsers: "ie 6" } }]],
  102728. }).code;
  102729. expect(output).toBe("var a = 1;");
  102730. });
  102731. it("doesn't transpile `const` with chrome 60", () => {
  102732. const output = Babel.transform("const a = 1;", {
  102733. sourceType: "script",
  102734. presets: [
  102735. [
  102736. "env",
  102737. {
  102738. targets: {
  102739. chrome: 60,
  102740. },
  102741. },
  102742. ],
  102743. ],
  102744. }).code;
  102745. expect(output).toBe("const a = 1;");
  102746. });
  102747. it("transpiles `const` with chrome 60 and preset-es2015", () => {
  102748. const output = Babel.transform("const a = 1;", {
  102749. sourceType: "script",
  102750. presets: [
  102751. [
  102752. "env",
  102753. {
  102754. targets: {
  102755. chrome: 60,
  102756. },
  102757. },
  102758. ],
  102759. "es2015",
  102760. ],
  102761. }).code;
  102762. expect(output).toBe("var a = 1;");
  102763. });
  102764. it("uses transform-new-targets plugin", () => {
  102765. const output = Babel.transform("function Foo() {new.target}", {
  102766. sourceType: "script",
  102767. presets: [["env", { targets: { browsers: "ie 6" } }]],
  102768. }).code;
  102769. expect(output).toBe(
  102770. "function Foo() {\n this instanceof Foo ? this.constructor : void 0;\n}",
  102771. );
  102772. });
  102773. it("regenerator works", () => {
  102774. const output = Babel.transform("function* fn() {}", {
  102775. sourceType: "module",
  102776. targets: { ie: 11 },
  102777. presets: ["env"],
  102778. }).code;
  102779. expect(output).toMatch(/regeneratorRuntime\.mark\(fn\)/);
  102780. });
  102781. });
  102782. describe("custom plugins and presets", () => {
  102783. const lolizer = () => ({
  102784. visitor: {
  102785. Identifier(path) {
  102786. path.node.name = "LOL";
  102787. },
  102788. },
  102789. });
  102790. it("allows custom plugins to be registered", () => {
  102791. Babel.registerPlugin("lolizer", lolizer);
  102792. const output = Babel.transform(
  102793. "function helloWorld() { alert(hello); }",
  102794. { plugins: ["lolizer"] },
  102795. );
  102796. expect(output.code).toBe(`function LOL() {
  102797. LOL(LOL);
  102798. }`);
  102799. });
  102800. it("allows custom presets to be registered", () => {
  102801. Babel.registerPreset("lulz", { plugins: [lolizer] });
  102802. const output = Babel.transform(
  102803. "function helloWorld() { alert(hello); }",
  102804. { presets: ["lulz"] },
  102805. );
  102806. expect(output.code).toBe(`function LOL() {
  102807. LOL(LOL);
  102808. }`);
  102809. });
  102810. });
  102811. });